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
Test linking against camlp4 (fix #39399) #39468
Conversation
For a standalone version of the testcase, see https://github.com/Blaisorblade/ulex/tree/test-camlp4. EDIT: beware I am still no OCaml expert — I can tell this testcase makes sense, but an expert might have better ideas. I'd be comfortable with this being committed — a review from an OCaml might help. I'll try to find one. EDIT2: I asked on #ocaml. |
And sorry, I added revision after audit. I'll fix. EDIT: done, and hopefully I redid all the checks I should have. Sorry for the rush. |
And bump revision to force bottles being rebuilt for ocaml 4.07.1.
3dcba24
to
c40e083
Compare
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.
I have no idea about ocaml or camlp but I do have one homebrew remark.
Co-Authored-By: Blaisorblade <p.giarrusso@gmail.com>
e50a9ba
to
6e74ca8
Compare
Only remark on #ocaml was "if you wanted to test it I think it would make sense to attempt to use a macro, not just open the module". |
Thanks @Blaisorblade! Without contributions like yours it'd be impossible to keep homebrew going! 👍 🎉 |
Thanks, I appreciate you submitting this fix, as it's been causing problems for OCaml users (camlp4/camlp4#150). As a general rule, whenever the OCaml compiler package is upgraded, all dependent OCaml libraries should be recompiled and their Homebrew package revision bumped. The OCaml compiler doesnt guarantee ABI compat across releases, and has CRC checks to ensure consistent linking. So the test case in this PR will be most useful in spotting errors, but if there's some process the Homebrew team could use to ensure that the tests are run whenever the OCaml package is updated, that would be most appreciated. |
Thanks! IIUC the maintainers implied that this test is run when OCaml is upgraded, so next time the problem should be detected. @fxcoudert could you please confirm? But this test is just for camlp4 and will only rebuild camlp4. Do any other packages need this setup? E.g. homebrew packages camlp5, but opam builds won't use the system camlp5, so maybe they avoid this problem? Executables are statically linked, hence fine. |
It would be good to have the test for camlp5 -- it's still safer to recompile it with the host OCaml even if it's an executable. It might, for example, use Camlp4 is the only |
Whenever a formula is updated, our CI testing will run the tests for all the formulas that depend on it (including recursive dependences). So when a PR for
with the rebuilt Other formulas' tests need to be audited by someone with knowledge of how ocaml works. |
brew install --build-from-source <formula>
, where<formula>
is the name of the formula you're submitting?brew test <formula>
, where<formula>
is the name of the formula you're submitting?brew audit --strict <formula>
(after doingbrew install <formula>
)?Bump revision to rebuild against 4.07.1, and add test to detect that linking against camlp4 fails. I verified that
brew test
succeeds after rebuilding from source and fails with the current bottle.Fix #39399.