-
Notifications
You must be signed in to change notification settings - Fork 16
Process the -parameter flag
#128
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
Conversation
Signed-off-by: Luke Maurer <[email protected]>
Signed-off-by: Luke Maurer <[email protected]>
7970ee1 to
2d98e61
Compare
Signed-off-by: Luke Maurer <[email protected]>
8a2e471 to
d630a72
Compare
|
I think this needs to get rebased for the tests to pass on CI |
Yeah, I was expecting the tests to merge before being run? Anyway, they should pass now |
liam923
left a comment
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.
Thanks for the easy-to-read tests.
I'd like to see a couple tests that demonstrate that Merlin does the right thing when files/configuations change. Maybe:
- The parameter changes (ie,
p.mliis edited and then recompiled) - The set of parameters change (ie, start passing
-parameter Qto a file that had been using-parameter P)
I'd also like to see a test where the -parameter flag is passed via a .merlin file. .merlin files are how we pass configuration to Merlin in our build system. To do this, you'll want to put a file named .merlin in the same directory as the .ml file. The contents should probably be:
S .
B .
FLG -parameter P
And then you won't need to pass -parameter on the command line. Note that you can create the .merlin file in the test (and then delete it) so that it isn't sitting around for all the tests that explicitly pass the flag.
Signed-off-by: Luke Maurer <[email protected]>
Signed-off-by: Luke Maurer <[email protected]>
Signed-off-by: Luke Maurer <[email protected]>
Signed-off-by: Luke Maurer <[email protected]>
e5c12e4 to
d1f0a06
Compare
The flags for parameterized modules are already being parsed, but
-parameteris similar to the load path in that it needs to be set up before typechecking begins. Without this feature, editing any module in a parameterized library gives an error for every reference to a parameter or to another parameterized module.This feature sets up the parameters at the same time the load path is initialized, which is also when the compiler does it. The parameters are kept in
Env.persistent_env, which is already handled by theLocal_storemechanism, so they should stay in sync with all the other bits of global state lying around.