[3.23.1] backport #14466#14471
Merged
Merged
Conversation
…4466) ## Summary Gate the dune-version-bound deduplication in generated opam files (introduced in ocaml#14175 and shipped in 3.23.0) on `(lang dune 3.23)`. Projects at earlier lang versions get the pre-14175 `And [lang; user]` shape. Fixes ocaml#14436 Related: ocaml#14175 (cherry picked from commit eb4a64a) Signed-off-by: Robin Bate Boerop <me@robinbb.com>
There was a problem hiding this comment.
Pull request overview
Backports #14466 to the 3.23.1 release branch by making dune version-bound deduplication in generated opam files conditional on the project language version being at least (lang dune 3.23), restoring pre-3.23 output stability for projects on earlier lang versions.
Changes:
- Gate
dunedependency constraint deduplication (merge_dune_constraints) ondune_version >= (3, 23); earlier lang versions keep the priorAnd [lang_constraint; user_constraint]shape. - Extend the blackbox test to cover the non-deduplicated behavior for
(lang dune 3.22)and adjust expectations/paths for(lang dune 3.23)’sGenerated_with_diffopam generation mode. - Add a changelog entry documenting the fix for #14436.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| test/blackbox-tests/test-cases/dune-project-meta/dune-dep.t | Adds regression coverage for constraint dedup gating and updates assertions for _build/default opam output in lang 3.23+. |
| src/dune_rules/opam_create.ml | Implements the lang-version gate: only deduplicate dune lower bounds starting at (3, 23). |
| doc/changes/fixed/14436.md | Documents the user-visible behavioral change and its motivation (#14436). |
Collaborator
Author
|
For reviewers: the diff in this backport is bit-for-bit identical to #14466's contribution to main. |
shonfeder
approved these changes
May 10, 2026
Member
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport #14466 onto 3.23.1-rc