Skip to content
This repository has been archived by the owner on Mar 1, 2019. It is now read-only.

Project.build_lib: rule to build pack doesn't force all cmo's to exist #18

Open
agarwal opened this issue Jun 21, 2016 · 0 comments
Open

Comments

@agarwal
Copy link
Member

agarwal commented Jun 21, 2016

In the rule for converting a list of .cmo files to a packed .cmo, we assume that all ml_files previously exist. This seemed reasonable since we list these as the deps of the rule. However, ocamlbuild doesn't actually verify that a rules prods end up existing after it is run. Thus, could well end up in a situation where you think all the ml_files have been created but they haven't, and thus the call to ocamldep discards the non-existen ml_files from our list, and finally the pack gets created. There is no error but your pack doesn't include everything you wanted it to.

Not sure what the fix should be. We could:

  • Within this rule we could check that all the ml_files truly exist, but this only solves the problem here.
  • Somehow create rules that always check that their prods really got created. This isn't obvious because you have to do something after a rule is run, but ocamlbuild doesn't expose such a feature AFAIK.
@agarwal agarwal changed the title Project.build_pack: rule to build pack doesn't force all cmo's to exist Project.build_lib: rule to build pack doesn't force all cmo's to exist Jun 21, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant