Repository navigation
[3.23.1] backport #14434 - #14446
Merged
Merged
[3.23.1] backport #14434#14446
Conversation
Leonidas-from-XIV
requested changes
May 7, 2026
…caml#14434) ## Summary Fixes ocaml#14428. The 3.23 menhir auto-injection (ocaml#14168) was triggered by the project-wide `(using menhir ...)` extension and added `menhir` as a *new* dependency to every package's generated opam file, regardless of whether the package's own `(depends ...)` field declared it. In multi-package projects where only some packages used menhir, every package gained a spurious build-time dependency. The original ask in ocaml#10707 was narrower: when a generated opam file *already* lists `menhir`, fill in the lower bound `{>= "20180523"}` that dune's menhir rules require. This PR restricts the behaviour to that. ## Behaviour - A package that does not declare `(depends menhir)` no longer has `menhir` added by dune. - A package that declares bare `(depends menhir)` has the lower bound filled in. - A package whose `(depends ...)` already specifies a constraint (version bound, `{with-test}`, etc.) is preserved verbatim. - Gated on `(using menhir ...)` being enabled — without the extension, no upgrade. The convenience of auto-adding `menhir` for users who use a `(menhir ...)` stanza but forget to declare `(depends menhir)` is deliberately removed: the dependency-inference logic that supported it was the source of ocaml#14428 and out of scope for ocaml#10707. --------- Signed-off-by: Robin Bate Boerop <[email protected]> (cherry picked from commit b471f2f) Signed-off-by: Sudha Parimala <[email protected]>
20 tasks done
Leonidas-from-XIV
approved these changes
May 8, 2026
Leonidas-from-XIV
left a comment
Member
There was a problem hiding this comment.
LGTM; added @robinbb as original author of the fix for an additional pair of eyes.
Collaborator
|
@shonfeder has pointed out the the 'context' is empty - it's just the 3.23.1-rc base branch. And, I see that no changes have been made beyond Dune version changes 3.24 -> 3.23 in the test code. So, since 14434 was not substantially modified, this backport seems fine. I know of no reason why not to do it. |
robinbb
approved these changes
May 8, 2026
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 #14434 onto 3.23.1-rc