-
Notifications
You must be signed in to change notification settings - Fork 413
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
feat(dune): support +
prefixes for PPX CLI flags
#11234
base: main
Are you sure you want to change the base?
feat(dune): support +
prefixes for PPX CLI flags
#11234
Conversation
+
prefixes for PPX CLI flags
I think this needs to be versioned. You can version this under dune's own language or melange's. Depending on how stable you'd like to keep this feature. |
Why do you think this needs to be versioned? I believe the previous behavior would just plainly return an error, so we shouldn't have anyone depending on these features, right? |
Suppose that somebody would try to use this feature in a publicly released project. That person would need to remember to update the constraints in their project file to require at least dune 3.18. Without the version check, it is very likely that the person would forget to add this constraint, or they might even do it incorrectly, if they misremember which version of dune introduced this feature. Downstream user of this project might then encounter build failures should they build with an older version of dune. If we add a version check, we make this scenario more or less impossible. It's true that the above argument is applicable to basically any user visible change in dune, but I think it works best for features. As for bug fixes, it's good that users can benefit from those without opting in. I think that this PR is certainly more of a feature than a bug fix. |
absolutely, thanks for the explainer! |
8cdabdc
to
493b6f9
Compare
@rgrinberg ready for another look. |
with | ||
| Yes, _ -> Right s | ||
| _, Yes when syntax_version >= (3, 18) -> Right s | ||
| (No | Unknown _), _ -> |
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 think you could improve the error message here with a hint for prefix = "+"
when syntax_version < (3, 18)
Signed-off-by: Antonio Nuno Monteiro <[email protected]>
Signed-off-by: Antonio Nuno Monteiro <[email protected]>
Signed-off-by: Antonio Nuno Monteiro <[email protected]>
Signed-off-by: Antonio Nuno Monteiro <[email protected]>
493b6f9
to
e57cc15
Compare
this is useful for cases like
melange.ppx
which emit alerts and allow to configure them via-alert ...
.