-
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: let extensions generate opam constraints #10751
base: main
Are you sure you want to change the base?
Conversation
135befa
to
ec420a4
Compare
2a9167b
to
bbef12a
Compare
@rgrinberg, before I go further, does that approach look sensible? |
The idea itself seems fine. However, I'm wondering if the implementation is flexible enough. In particular, what if the extension is used only for the test suite? How would I make sure the generated constraint has with-test. |
The approach of the current implementation is to back off if the package appears in the package's dependencies in An alternative would be to add more precise knobs when parsing the |
(I'm open to suggestions someone has an idea for a better interface) |
Okay, well we can always add such an option later if there's demand. |
I think backing off if it is already detected in the dependencies is a good approach to allow the user to override it without additional syntax that the user would need to be aware of. I like it. And yes, it would be great to generate the Menhir dependency with the right lower-bound as I sometimes see packages fail the lower-bound check on opam-repository, having dune generate the depemendency with |
This adds a new feature where extensions can generate opam dependencies. For
example,
(using mdx x.y)
will includemdx
as an opam dependency.TODO: