Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MPR#5101: Feature wish: ocamlbuild should track digests of external dependencies #221

Open
damiendoligez opened this issue Mar 3, 2017 · 7 comments

Comments

@damiendoligez
Copy link
Member

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..

@gasche
Copy link
Member

gasche commented Mar 3, 2017

This is hard, and related to #147, and we should try to solve both issues.

@whitequark
Copy link
Member

This is in direct conflict with #211 isn't it?

@gasche
Copy link
Member

gasche commented Mar 3, 2017

Did you mean to comment on the use-ocamlfind-by-default issue?

@whitequark
Copy link
Member

No, the link is right.

@ygrek
Copy link

ygrek commented Mar 3, 2017

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)

@DieracDelta
Copy link

DieracDelta commented Sep 30, 2020

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

@gasche
Copy link
Member

gasche commented Sep 30, 2020

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.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants