Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Assume that module names that are not in `Env.t` are persistent #2235
When loading a
In #2041, we made the assumption that this list of global identifiers corresponded to the list of imports written in the cmi file (
This is an issue as it breaks the compilation of anything using module aliases to namespace libraries.
This PR proposes to fix this issue by considering that any module that is not found at all in the environment is in fact a persistent module. This way, all global identifiers in cmi files will correctly be treated as persistent ones. It is no longer necessary to build the made up environment in
This patch needs to go in 4.08.
referenced this pull request
Feb 4, 2019
How do I do that?
FTR, this is my test:
Sorry, I have very superficial knowledge of ocamltest and I don't really understand what test_locations.ml is doing or how to encode my test in ocamltest comments.
I did the following manual testing: I tried to build dune with both trunk and this PR. It fails with trunk but passes with this PR. Do you mind if I don't add a test in the testsuite at this point? I'm happy to add a test in the future once I understand ocamltest better.
I do actually.
Btw, your test is nice for the issue you're intending to fix, but I think you should also add the test of MPR#6886, since it looks like the initial version of this GPR was reintroducing that bug.