-
Notifications
You must be signed in to change notification settings - Fork 45
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
build and install annotation files #54
Conversation
Maybe you can put it in an AlphaFeature but I think it good like that. This PR is really nice ! I'm all for it. |
+1 for cmt/cmti files -- there should be no real downside except for this not being available on earlier OCaml revisions (3.12.1). |
OASISFileUtil.file_exists_case | ||
(List.map | ||
(Filename.concat path) | ||
(make_fnames modul [".annot";"cmti";".cmt"])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.cmti ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ocamlc -bin-annot -c intf.mli will produce intf.cmi and intf.cmti
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a dot missing in the "cmti" string above
The .annot is only available since 3.11.0, but I suppose this is totally fine and OASIS needs > 3.11 anyway. Also, I would like to have at least one test for this PR! |
I don't know how the tests work. |
You can create a _oasis + required files in test/data/TestOCamlbuild/annot (several directories already exist) and then create a test to check your expectation in test/TestOCamlbuild.ml. For example, you can look at: Thanks |
use ocamlbuild builtin bin_annot and annot tags instead of rolling our own. also remove some trailing whitespace
Turns out the existing tests already cover the cases I planned to test. So I ended up just adding the annotation files to files expected to be installed by the current tests. On OpenBSD I now get the following test results:
The test logs are here: ftp://gmerlin.de/pub/oasis/ Also I found the builtin bin_annot and annot tags in ocamlbuild and enabled them instead of adding custom -annot and -bin-annot flags. Problem is that ocamlbuild is not yet using -bin-annot when packing (http://caml.inria.fr/mantis/view.php?id=6599). |
The test suite fails at the point of packedlib.cmt. Not a big deal. Can you just remove this specific files and add a comment so that I can re-add it with the right logic when ocamlbuild will be released with the patch ? |
build and install annotation files
Hi,
it would be nice if oasis was able to build and install annotation files.
Is this sensible default behaviour? Do we need a knob to turn it off?