You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 6178 Reporter:@trefis Assigned to:@gasche Status: closed (set by @xavierleroy on 2016-12-07T10:36:49Z) Resolution: fixed Priority: low Severity: minor Target version: 4.02.2+dev / +rc1 Category: -for ocamlbuild use https://github.com/ocaml/ocamlbuild/issues
Bug description
When calling ocamlbuild with "-cflags -bin-annot", no cmt files are produced for module packs.
Looking at the sources (which I'm not familiar with) I'd guess that's because the "compile" tag is not set when building the pack, neither is "link", so "-lflags" won't be anymore useful.
There doesn't seem to be any command line option related to packs however, not that it would be that useful (one should probably decide whether packing should be considered as a compilation or linking step).
However while looking at the sources I also discovered that the "bin_annot" tag translate itself into "-bin-annot" only when "compile" is set as well, but not when "pack" is set.
That can be fixed by adding the following line to ocaml_specific.ml (you didn't need me to know that, but it makes me feel smarter to say it):
flag ["ocaml"; "bin_annot"; "pack"] (A "-bin-annot");;
The text was updated successfully, but these errors were encountered:
I think semantically pack is more of a linking step, but I'm not sure adding "link" to packing commands is safe: it may be the case that some -lflags are not well-supported by pack.
Considering "pack" a third step and using a pack-specific rule as you do is one way to fix the issue. You should highlight that users encountering your problem could add your "flag" line to their myocamlbuild.ml to solve it locally. But that means that other flags could possibly need to handle pack as well (eg. -thread; can you reproduce #6127 at the pack level?).
So I'd vote for investigating what breaks if we add "link" to pack, and if that's bad use your fix (generalized to other flags as well).
I think semantically pack is more of a linking step, but I'm not sure adding "link" to packing commands is safe: it may be the case that some -lflags are not well-supported by pack.
Yes, that worries me too.
Considering "pack" a third step and using a pack-specific rule as you do is one way to fix the issue.
Oh but I'm not doing anything : the "pack" tag already exists.
I merely pointed out the fact that even when you have these tag and the tag "bin_annot", the "-bin-annot" option is not added to the command line.
You should highlight that users encountering your problem could add your "flag" line to their myocamlbuild.ml to solve it locally.
I'm not sure many users browse mantis for documentation.
But the manual you just started rewriting could mention it.
other flags could possibly need to handle pack as well (eg. -thread; can you reproduce #6127 at the pack level?).
I didn't try it, but it's highly likely.
So I'd vote for investigating what breaks if we add "link" to pack, and if that's bad use your fix (generalized to other flags as well).
Well, it might come from my lack of knowledge of ocamlbuild internals, but I'd say there are quite distinct issues. (I should maybe have created to issues then, oh well.)
Original bug ID: 6178
Reporter: @trefis
Assigned to: @gasche
Status: closed (set by @xavierleroy on 2016-12-07T10:36:49Z)
Resolution: fixed
Priority: low
Severity: minor
Target version: 4.02.2+dev / +rc1
Category: -for ocamlbuild use https://github.com/ocaml/ocamlbuild/issues
Bug description
When calling ocamlbuild with "-cflags -bin-annot", no cmt files are produced for module packs.
Looking at the sources (which I'm not familiar with) I'd guess that's because the "compile" tag is not set when building the pack, neither is "link", so "-lflags" won't be anymore useful.
There doesn't seem to be any command line option related to packs however, not that it would be that useful (one should probably decide whether packing should be considered as a compilation or linking step).
However while looking at the sources I also discovered that the "bin_annot" tag translate itself into "-bin-annot" only when "compile" is set as well, but not when "pack" is set.
That can be fixed by adding the following line to ocaml_specific.ml (you didn't need me to know that, but it makes me feel smarter to say it):
The text was updated successfully, but these errors were encountered: