[erlang-bugs] system_info(nif_version) does not work

Eric Pailleau eric.pailleau@REDACTED
Wed Jan 21 19:49:07 CET 2015


Hi,
not really a distraction, but a very common problem. As I already wrote in a former mail, documentation do not give the first version where a function or a function argument is available. was not really a problem in the past when API was stable, but now a concern with functions inflation.
it might be clever, in addition of -spec , a -since or somewhat.
This way it would be easier to a tool, dialyzer or other to say what is the minimal erlang version needed by the code.  A big work, but could be done by community, I guess.
MHO.

« Envoyé depuis mon mobile » Eric

Daniel Goertzen <daniel.goertzen@REDACTED> a écrit :

>Oops, I didn't realize this was new.  Time for me to update.  Sorry for the
>distraction.
>
>Thanks,
>Dan.
>
>On Tue, Jan 20, 2015 at 4:25 PM, Steve Vinoski <vinoski@REDACTED> wrote:
>
>>
>>
>> On Tue, Jan 20, 2015 at 4:52 PM, Daniel Goertzen <
>> daniel.goertzen@REDACTED> wrote:
>>
>>> The documentation at...
>>>
>>> http://www.erlang.org/doc/man/erlang.html#system_info-1
>>>
>>> ... says I can get nif version information with
>>> erlang:system_info(nif_version).  This does not work.  See output below:
>>>
>>>
>>>
>>> $ erl
>>> Erlang/OTP 17 [erts-6.0.1] [source-deacab9] [64-bit] [smp:3:3]
>>> [async-threads:10] [hipe] [kernel-poll:false]
>>>
>>> Eshell V6.0.1  (abort with ^G)
>>> 1> erlang:system_info(nif_version).
>>> ** exception error: bad argument
>>>      in function  erlang:system_info/1
>>>         called as erlang:system_info(nif_version)
>>> 2>
>>>
>>>
>> Looks like this was added for 17.4. I tried it on 17.3 just to be sure,
>> and got the same failure you did. But for 17.4:
>>
>> $ erl
>> Erlang/OTP 17 [erts-6.3] [source] [64-bit] [smp:8:8] [ds:8:8:10]
>> [async-threads:10] [kernel-poll:false]
>>
>> Eshell V6.3  (abort with ^G)
>> 1> erlang:system_info(nif_version).
>> "2.7"
>>
>> --steve
>>
>
>_______________________________________________
>erlang-bugs mailing list
>erlang-bugs@REDACTED
>http://erlang.org/mailman/listinfo/erlang-bugs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20150121/7f295522/attachment.htm>


More information about the erlang-bugs mailing list