[erlang-questions] -version or -vsn?
Kenneth Lundin
kenneth.lundin@REDACTED
Mon Feb 2 09:53:15 CET 2009
The -vsn attribute is special because it is used by the release
handler and upgrade functions in
the sasl application.
The -vsn attribute can be handled manually in the source code and
should then be set to
different values for different versions of the module. There is no
order of the values.
If no -vsn attribute is specified in the source code the compiler will
generate a value for the
-vsn attribute anyway. The value generated is the MD5 sum of the
abstract syntax tree and
it will differ only if there are changes that have impact on the code.
A change in a comment only will for example not result in a change of
the generated MD5 value.
We have discussed if we should always generate the MD5 value even if
the -vsn is specified (and put it under some other attribute name) but
we have not decided yet.
I think you should use the -vsn for you manual version (if you need to
have that) or use the
MD5 as is since -vsn is the value that is used by the release handler
and upgrade functions.
/Kenneth Erlang/OTP Ericsson
On Sat, Jan 31, 2009 at 5:58 PM, Steve Davis
<steven.charles.davis@REDACTED> wrote:
> I've noticed that if you use -version then -vsn is still recorded in
> Module:module_info(attributes) apparently as a 128 uuid. If you use -
> vsn, that uuid isn't generated... so is it better practice to use -
> version() in your source so that you have that serial UID to uniquely
> identify the beam from the vsn attribute?
>
> /s
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
>
More information about the erlang-questions
mailing list