[erlang-questions] Version numbering scheme change and the implication / Re: [ANN] Erlang/OTP 17.0-rc1 has been released.
Loïc Hoguin
essen@REDACTED
Fri Feb 7 13:56:57 CET 2014
On 02/07/2014 01:44 PM, Motiejus Jakštys wrote:
> 2014.02.07 13:39, Fred Hebert rašė:
>> In this case, the macros are suddenly worthless or not representative
>> of the true dependency you are expressing -- the one on individual
>> application versions within an OTP release.
>
> I understand the argument; if that happens, we would end up with a
> User-Agent mess. Thankfully, there are not many Erlang vendors these days.
>
> However, the same argument applies to erlang:system_info(otp_release)
> and erlang:system_info(otp_version). Having these values in macros just
> make this information more easily available.
>
> So I would say: all or nothing?
These shouldn't be used the way you describe. It's not about Erlang
vendors, it's about what users put in their releases. If someone uses
your project in their release, and also had to update, say, the ssl
application to fix a bug (this happens all the time!), your project may
suddenly break.
Instead you should use this value:
1> App = kernel.
kernel
2> application:get_key(App, vsn).
{ok,"2.16.3"}
--
Loïc Hoguin
http://ninenines.eu
More information about the erlang-questions
mailing list