[erlang-questions] BEAM file forwards/backwards compatibility

Björn Gustavsson bgustavsson@REDACTED
Fri Dec 16 09:09:31 CET 2011

On Fri, Dec 16, 2011 at 12:44 AM, Bernie Duggan <bernie@REDACTED> wrote:
> Hi all,
> A thread from earlier this year makes it clear that BEAM files are
> what I'll call "forwards compatible" for, nominally, 2 major versions.
> For example, beams compiles with R9 will run on R10 and R11. All
> great.
> My question, then, is what about "backwards compatibility"?
> Empirically, it appears that even minor release difference (compiled
> on R14B04 and attempting to run on R14B03) are enough to cause a file
> to be unable to be loaded , producing the error:
> {'cannot load',<some module>,get_file}
> Is this actually the expected behaviour, or should I be looking
> elsewhere for the cause of this problem? (If it's expected, no big
> deal, just as long as I know :)).

It is not the expected behavior.

We generally try to avoid introducing incompatibilities in the BEAM
format in minor releases.

In this case, the error message indicates that there was a
problem reading the BEAM file from the disk, not a problem
loading the BEAM code. My guess is that something is wrong
with the boot script or code paths.

Björn Gustavsson, Erlang/OTP, Ericsson AB

More information about the erlang-questions mailing list