[erlang-questions] ets:tid() type

Kostis Sagonas <>
Sun Aug 28 12:00:18 CEST 2011


On 08/28/11 12:55, Roberto Ostinelli wrote:
> Dear list,
>
> I'm defining a spec using the ets:tid() remote type. While everything
> goes well on R14xx, I've reports from users that modules do not compile
> on centos with R13B04 [not sure if the OS is relevant here].
>
> The error they get is:
>
> $ make
> /usr/local/bin/erlc -W -I include -o ebin src//.erl
> src/acceptor.erl:85: referring to built-in type tid as a remote type;
> please take out the module name
> make: **/ [all] Error 1
>
> I've read about some issues on tid() definition, so my question is:
> should I just adapt my specs to any() instead of ets:tid() so that the
> code compiles on previous versions? I can't obviously use tid() alone on
> R14xx as it is then an undefined type.

This type used to be a hard-coded builtin in R13 and became a type 
exported from the 'ets' module (where it clearly belongs) in R14.

If you want your code to be compilable with different Erlang/OTP 
versions, the best solution is doing this as part of a configure option 
(see e.g. the code of Scalaris for a good example on how to do this).

But I would really recommend to the users of R13 to switch to R14. There 
are many good reasons to do that.

Kostis



More information about the erlang-questions mailing list