Hello all,
let me describe a ocamlmktop-specific compilation problem that I encountered :
I have two modules, let's call them A and B, that are completely unrelated (in the sense
that the contents of the file a.ml does not contain any
reference "B." to the module B, the .depend file created with
ocamldep indicates that a.ml is not a dependency for b.cmo,
and vice versa). But the following sequence of actions causes trouble :
(*starting from an "up-to-date" make, with all .cmo's files created without
error or warning *)
1) Changing the implementation of the module A (in down-to-earth terms,
changing the contents of a.ml)
2) Recompiling with make (essentially a sequence of "ocamlc -c" actions
applied to a.ml and other modules that depend on A)
So far,so good. At this point, I thus have new "a.cmo&a.cmi" files and old
"b.cmi&b.cmo" files.
3) If I try to create my custom toplevel from all the .cmo files with ocamlmktop,
I get the error message
"Files a.cmo and b.cmo make inconsistent assumptions over interface A
make : *** [toplevel] Error 2"
So it seems that the old b.cmo file remembers things about the
a.cmi file, even though the two modules are unrelated. I can get around
the problem by using a "make clean" and recompiling everything from
scratch, but that's definitely unsatisfying ...
Has anyone else experienced a similar problem ? Any suggestions ?
Thank in advance.
Ewan
.