Skip to content

[3.23.1] backport #14466#14471

Merged
shonfeder merged 1 commit into
ocaml:3.23.1-rcfrom
robinbb:backport-14466
May 10, 2026
Merged

[3.23.1] backport #14466#14471
shonfeder merged 1 commit into
ocaml:3.23.1-rcfrom
robinbb:backport-14466

Conversation

@robinbb
Copy link
Copy Markdown
Collaborator

@robinbb robinbb commented May 9, 2026

Backport #14466 onto 3.23.1-rc

…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>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 dune dependency constraint deduplication (merge_dune_constraints) on dune_version >= (3, 23); earlier lang versions keep the prior And [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)’s Generated_with_diff opam 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).

@robinbb
Copy link
Copy Markdown
Collaborator Author

robinbb commented May 9, 2026

For reviewers: the diff in this backport is bit-for-bit identical to #14466's contribution to main.

@shonfeder
Copy link
Copy Markdown
Member

Thanks!

@shonfeder shonfeder merged commit 0570839 into ocaml:3.23.1-rc May 10, 2026
35 checks passed
@robinbb robinbb deleted the backport-14466 branch May 10, 2026 22:56
@robinbb robinbb removed the request for review from Leonidas-from-XIV May 10, 2026 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants