Skip to content

test(menhir): repro for inferred types that name the alias module - #16946

Merged
anmonteiro merged 1 commit into
mainfrom
menhir-inference-shadowed-alias-module
Nov 8, 2026
Merged

anmonteiro merged 1 commit into
mainfrom
menhir-inference-shadowed-alias-module

Conversation

@shonfeder

@shonfeder shonfeder commented Nov 8, 2026 •

Copy link
Copy Markdown
Member

#16464 changed how module opens are handled during inference, triggered during menhir rules. This offers a minimal repro of the related errors detected in the 3.25.0~alpha1 revdeps run at ocaml/opam-repository#31082.

The related failure in CI is https://opam.ci.ocaml.org/github/ocaml/opam-repository/commit/6b2dc4292a7fe02b2ac183f092630bee19d98729/variant/compilers,4.14,dune.3.25.0~alpha1,revdeps,melange.3.0.0-414

@anmonteiro, since this is only affecting melange and apparently only on 4.14, and since (if my debugging is correct) it follows from a change you introduced, I think you are best positioned to evaluate the impact.

Is this something we should fix and backport before releasing #16604 do you think? Is the needed fix clear to you?

@shonfeder
shonfeder marked this pull request as draft November 8, 2026 03:22
#16464 changed how module opens are
handled during inference, triggered during menhir rules. This offers a
minimal repro of the related errors detected in the 3.25.0~alpha1
revdeps run at ocaml/opam-repository#31082.

Signed-off-by: Shon Feder <[email protected]>
@shonfeder
shonfeder force-pushed the menhir-inference-shadowed-alias-module branch from f3c2d8e to df9ed06 Compare November 8, 2026 03:44
@shonfeder shonfeder mentioned this pull request Nov 8, 2026
62 tasks done
@anmonteiro
anmonteiro marked this pull request as ready for review November 8, 2026 05:25
@anmonteiro
anmonteiro merged commit fe9ecca into main Nov 8, 2026
36 of 37 checks passed
@anmonteiro
anmonteiro deleted the menhir-inference-shadowed-alias-module branch November 8, 2026 05:25
anmonteiro added a commit to anmonteiro/dune that referenced this pull request Nov 8, 2026
Keep normal module opens alongside the private inference alias so the short-path printer can resolve imported types through accessible paths. Update the reproducer from ocaml#16946 to check successful compilation and the inferred type.

Signed-off-by: Antonio Nuno Monteiro <[email protected]>
@anmonteiro
anmonteiro restored the menhir-inference-shadowed-alias-module branch November 8, 2026 05:32
anmonteiro added a commit to anmonteiro/dune that referenced this pull request Nov 8, 2026
Keep normal module opens alongside the private inference alias so the short-path printer can resolve imported types through accessible paths. Update the reproducer from ocaml#16946 to check successful compilation and the inferred type.

Signed-off-by: Antonio Nuno Monteiro <[email protected]>
@anmonteiro
anmonteiro deleted the menhir-inference-shadowed-alias-module branch November 8, 2026 05:33
anmonteiro added a commit that referenced this pull request Nov 8, 2026
Fix Menhir inference for imported types that refer to guarded alias
modules.

Fixes the regression from #16464 reproduced in #16946.

01a1b975-a696-7a32-bc0a-070cda37a5af

---------

Signed-off-by: Antonio Nuno Monteiro <[email protected]>
@Alizter Alizter added this to the 3.26.0 milestone Nov 8, 2026
anmonteiro pushed a commit that referenced this pull request Nov 8, 2026
…6946)

#16464 changed how module opens are
handled during inference, triggered during menhir rules. This offers a
minimal repro of the related errors detected in the 3.25.0~alpha1
revdeps run at ocaml/opam-repository#31082.

The related failure in CI is
https://opam.ci.ocaml.org/github/ocaml/opam-repository/commit/6b2dc4292a7fe02b2ac183f092630bee19d98729/variant/compilers,4.14,dune.3.25.0~alpha1,revdeps,melange.3.0.0-414

@anmonteiro, since this is only affecting melange and apparently only on
4.14, and since (if my debugging is correct) it follows from a change
you introduced, I think you are best positioned to evaluate the impact.

Is this something we should fix and backport before releasing #16520 do
you think? Is the needed fix clear to you?

Signed-off-by: Shon Feder <[email protected]>
(cherry picked from commit fe9ecca)
Signed-off-by: Antonio Nuno Monteiro <[email protected]>
anmonteiro added a commit that referenced this pull request Nov 8, 2026
Fix Menhir inference for imported types that refer to guarded alias
modules.

Fixes the regression from #16464 reproduced in #16946.

01a1b975-a696-7a32-bc0a-070cda37a5af

---------

Signed-off-by: Antonio Nuno Monteiro <[email protected]>
(cherry picked from commit 0e05bfa)
Signed-off-by: Antonio Nuno Monteiro <[email protected]>
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.

3 participants