Open damiendoligez opened 7 years ago
This is hard, and related to #147, and we should try to solve both issues.
This is in direct conflict with #211 isn't it?
Did you mean to comment on the use-ocamlfind-by-default issue?
No, the link is right.
If anything, this issue is an inconvenience, but #211 looks like a necessity (though it would be curious to see a project where calling ocamlfind query once for every dependency causes a huge slowdown)
Is there a flag or something that I can set to get ocamlbuild to relink every time I invoke the build command (even if there is no change to the source)? I'm running into this exact issue
If you just want to redo the linking step, removing the linked binary before building should be enough. In the general case where an external dependency changed under your feet, you need to redo some recompilation as well because the interfaces may have changed, etc. Then I don't know of a better solution than just running clean
; hopefully you do upgrade the rest of the world infrequently enough that this is not a big deal. (Hopefully because, given the fact that ocamlbuild is merely on life support these days, I don't think it is going to get new features or big implementation changes on this front.)
PR transferred from https://caml.inria.fr/mantis/view.php?id=5101 [original reporter: @ygrek]
Consider: the main program gets built and linked with external library version 1, then library is upgraded to version 2, program gets bult again but as no source changes occured (all digests are the same) ocamlbuild will not relink the final executable with the new library version. The same applies to all external dependencies : cmi, cmo, etc..