Skip to content
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

melange: add test to show flags passed from env #6656

Merged
merged 3 commits into from
Dec 12, 2022

Conversation

jchavarri
Copy link
Collaborator

Fixes #6572. The PR just adds a test to demonstrate the functionality, but the implementation was added in #6569 inadvertently, as Dune_env and Dune_file both decode using the same function in Ocaml_flags:

let+ flags = Ocaml_flags.Spec.decode

and+ flags = Ocaml_flags.Spec.decode

Unless I'm missing something.

@jchavarri jchavarri added the melange Melange rules and generator label Dec 8, 2022
@rgrinberg
Copy link
Member

I believe that it works, but how does this test verify that? How could I tell the flags are being passed?

@jchavarri
Copy link
Collaborator Author

I believe that it works, but how does this test verify that? How could I tell the flags are being passed?

Sorry, I am not sure what you mean. I refactored the test to proceed in 2 steps: first show the failing case, and then the fix using env, so the behavior becomes more obvious. Please let me know if this clarifies it or there is something else I'm missing.

@jchavarri jchavarri requested a review from rgrinberg December 12, 2022 12:03
@rgrinberg rgrinberg merged commit 4dff505 into ocaml:main Dec 12, 2022
@jchavarri jchavarri deleted the melange/compile-flags-in-env branch December 12, 2022 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
melange Melange rules and generator
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add melange support to the env stanza
2 participants