[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 14:23:31 CET 2014

On 02/07/2014 02:08 PM, Motiejus Jakštys wrote:
>> Instead you should use this value:
>> 1> App = kernel.
>> kernel
>> 2> application:get_key(App, vsn).
>> {ok,"2.16.3"}
> This is valid, but works when it is possible and not crazily expensive
> to do this at runtime.

Well it *is* cheap and you can also keep it in your state as the only 
time it may change is during a release upgrade.

 > My use case is a library which has -callback
> support. Should we generate behaviours using behaviour_info/1 or
> -callback (pre-R15 or R15+)? Sure, we can take the cowboy approach (pun
> intended): do not support legacy OTP versions. But what if I can and
> want to, and that's the only thing keeping users with R13B04 away from
> my library?

Cowboy does R15B01+. Not even R15B. The reason is that many things 
simply do not work at all in R15B and lower, regardless of -callback 
use. R15B01 is only slightly better as there are still various ssl 
issues, and to be honest I got a couple test case failing that I still 
need to look at, and depending on what I find I may be forced to just 
drop that version.

The code compiling on an older version is great, but not enough to 
determine that your code actually works with it.

You could always take the approach the OTP team does. Support current 
version + 2 versions back. Since R17 is coming soon, that means you can 
drop R14 without worrying about it. R14 people can always use an older 
version of your application.

Loïc Hoguin

More information about the erlang-questions mailing list