-
Notifications
You must be signed in to change notification settings - Fork 412
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
Add support for x-maintenance-intent in dune-project #11274
base: main
Are you sure you want to change the base?
Conversation
8612074
to
a3a9074
Compare
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 contribution! 👍
You need to update the tests to reflect your changes. I would split this in two PRs: the part that updates the code and the part that updates Dune itself (in case it breaks for the former).
Also, could you add an entry into the changes directory?
a3a9074
to
2917028
Compare
Signed-off-by: ArthurW <[email protected]>
2917028
to
6314d7b
Compare
6314d7b
to
d1a4775
Compare
Thanks for the quick review! I've added tests, an entry in |
d1a4775
to
7b81397
Compare
test/blackbox-tests/test-cases/dune-project-meta/basic-generate.t
Outdated
Show resolved
Hide resolved
Signed-off-by: ArthurW <[email protected]>
Signed-off-by: ArthurW <[email protected]>
7b81397
to
be0a9b6
Compare
That sounds like a useful thing to do. Is there a need to validate this field at all? |
Signed-off-by: ArthurW <[email protected]>
34d5210
to
5353bb8
Compare
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.
Nice feature, however due to how we handle compatibility an upgrade from Dune 3.17 to 3.18 should not trigger user visible changes (that is only allowed via dune-lang), so my suggestion is to gate the generation to dune-lang 3.18+. That will also remove lots of test changes, since these wouldn't change anymore.
test/blackbox-tests/test-cases/dune-project-meta/basic-generate.t
Outdated
Show resolved
Hide resolved
This is perhaps not the right place to comment, because this is more about opam rather than dune, but if you generate Personally I'd like to see a much more explicitly elaborated story on how the How are the intent values to be interpreted by users and by opam-repository maintainers? How does it affect archiving? What happens if the maintainers just vanish? What sort of automation is planned based on that field? ... Like discussed in this PR, I would expect most people to just add Seriously, If I (and most other package authors) just set the field as ”latest” and be done with it, then how does that help? I'm sceptical that a field like this really helps. Intent is subjective. Actual behaviour is objective. People are optimistic and tend to lie about their own intentions. The expectation seems to be that package authors are good citizen and will carefully maintain the To me this If the idea is to use Or perhaps something like FYI: Much of the above is duplicated from what I posted on OCaml Discord on the opam-repository channel, before noticing this PR. |
Thanks, @polytypic, for reporting this!
Unfortunately, considering Dune is only implementing opam policies, this is not the right place to talk about it. My suggestion is to raise the issue on discuss.ocaml.org to make the discussion more public (Discord requires an account to be accessed). I would suggest this thread as it is the last one about the maintenance. Regarding your concerns, you raised interesting questions, and it is worth discussing them in the right place 😸 |
Signed-off-by: ArthurW <[email protected]>
With progress being made on the opam packages archiving policy, a lot of published packages are going to add an
x-maintenance-intent: ["..."]
to their opam files. When using dune to generate the opam files, adding this new field requires an extra.opam.template
file. Right now the custom opam templates escape hatch are fairly exceptional (~60 published projects uses them), so it would be nice for all the others to stay on the happy path if possible.In this PR, the opam
x-maintenance-intent: [...]
is only generated if the user specified(maintenance_intent ...)
in their dune-project. Perhaps it should produce["(latest)"]
by default?See #11272 (cc @hannesm)