[
https://issues.apache.org/jira/browse/THRIFT-2921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14640888#comment-14640888
]
Michael Oliver commented on THRIFT-2921:
----------------------------------------
I found a clean way that both Erlang 16 and 18 can be supported, though I will
need help to implement it. The idea is essentially
https://blog.kempkens.io/posts/supporting-deprecated-types-with-erlang-mk/
In the t_erl_generator.cc file, we have:
{noformat}
return "dict:dict()";
{noformat}
If we can find a way to grab the Erlang version installed on the system,
passing it as an option or as a preprocessor directive, we can do something like
{noformat}
#ifdef ERLANG_NAMESPACED_TYPES
return "dict:dict()";
#else
return "dict()";
#endif
{noformat}
The part I need help with is getting the Erlang version into the C code.
I opened another issue to track this here:
https://issues.apache.org/jira/browse/THRIFT-3264
> Make Erlang impl ready for OTP 18 release (dict/0 and set/0 are deprecated)
> ---------------------------------------------------------------------------
>
> Key: THRIFT-2921
> URL: https://issues.apache.org/jira/browse/THRIFT-2921
> Project: Thrift
> Issue Type: Improvement
> Components: Erlang - Compiler
> Reporter: Jens Geyer
> Assignee: Michael Oliver
> Fix For: 0.9.3
>
>
> Using Erlang OTP 17, I get the following deprecation warnings:
> {code}
> en-erl/thrift_test_types.hrl:48: Warning: type dict/0 is deprecated and will
> be removed in OTP 18.0; use use dict:dict/0 or preferably dict:dict/2
> gen-erl/thrift_test_types.hrl:55: Warning: type set/0 is deprecated and will
> be removed in OTP 18.0; use use sets:set/0 or preferably sets:set/1
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)