aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/doc/src
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2010-05-06 15:37:46 +0200
committerBjörn Gustavsson <[email protected]>2010-05-06 16:50:24 +0200
commit3f8f87ec0ec647884111186968271eff990decc5 (patch)
tree1e4b150654207cb3199105381930307cefc24559 /lib/stdlib/doc/src
parent56bb6dd185486f993c944ca0aa08cba571f36522 (diff)
downloadotp-3f8f87ec0ec647884111186968271eff990decc5.tar.gz
otp-3f8f87ec0ec647884111186968271eff990decc5.tar.bz2
otp-3f8f87ec0ec647884111186968271eff990decc5.zip
Make beam_lib:cmp/2 stricter
The beam_lib:cmp/2 function only compares the executable parts of the BEAM files, not attributes or abstract code. Since the types and specs (used by Dialyzer) are contained in the abstract code, beam_lib:cmp/2 will return 'ok' if the only difference between two BEAM file are in the types or specs. If an Erlang/OTP system is installed in a revision control system, and beam_lib:cmp/2 is used to avoid committing unchanged but newly compiled BEAM files, BEAM files with no other changes than in types or specs may not get updated, which can problems if Dialyzer or the debugger is run. To avoid that problem, change beam_lib:cmp/2 to compare all chunks *except* for the "CInf" chunk. The "CInf" chunk contains the compilation time, compiler options, and compiler version.
Diffstat (limited to 'lib/stdlib/doc/src')
-rw-r--r--lib/stdlib/doc/src/beam_lib.xml7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/stdlib/doc/src/beam_lib.xml b/lib/stdlib/doc/src/beam_lib.xml
index b9286f1402..27308e02f3 100644
--- a/lib/stdlib/doc/src/beam_lib.xml
+++ b/lib/stdlib/doc/src/beam_lib.xml
@@ -347,9 +347,10 @@ chunkref() = chunkname() | chunkid()</code>
</type>
<desc>
<p>Compares the contents of two BEAM files. If the module names
- are the same, and the chunks with the identifiers
- <c>"Code"</c>, <c>"ExpT"</c>, <c>"ImpT"</c>, <c>"StrT"</c>,
- and <c>"Atom"</c> have the same contents in both files,
+ are the same, and all chunks except for the <c>"CInf"</c> chunk
+ (the chunk containing the compilation information which is
+ returned by <c>Module:module_info(compile)</c>)
+ have the same contents in both files,
<c>ok</c> is returned. Otherwise an error message is returned.</p>
</desc>
</func>