Skip to content

test(merlin): cover hidden transitive private-module aliases - #16848

Merged
Alizter merged 1 commit into
ocaml:mainfrom
DirkEmmett:test/16531-merlin-hidden-includes
Oct 29, 2026
Merged

Alizter merged 1 commit into
ocaml:mainfrom
DirkEmmett:test/16531-merlin-hidden-includes

Conversation

@DirkEmmett

Copy link
Copy Markdown
Contributor

Split out from #16629 as requested in #16629 (comment).

Extends the existing #16531 reproduction to hidden transitive dependencies. The test records the missing hidden CMI path, demonstrates that adding it with -H restores alias typing, and checks that direct private-module and hidden-dependency names remain inaccessible. No production code changes.

Validation: dune build @check @fmt @runtest passed locally with OCaml 5.5.0 and ppxlib 0.39.0. A real Merlin smoke check confirmed that this tests-only branch preserves the reported alias error.

Intended to land before the fix in #16629. Tests only; no changelog entry is needed. Please apply the no changelog label.

Extend the existing reproduction for ocaml#16531 to hidden transitive dependencies. Verify that adding the missing hidden CMI directory restores alias typing without making direct private names visible.

Signed-off-by: Dirk Emmett <[email protected]>
@Alizter
Alizter merged commit da93d31 into ocaml:main Oct 29, 2026
37 of 39 checks passed
@Alizter Alizter added this to the 3.26.0 milestone Oct 30, 2026
rgrinberg pushed a commit that referenced this pull request Nov 7, 2026
Depends on #16848 (tests-only; merge first).

Public aliases backed by private modules can build successfully but fail
in Merlin because Dune omits their hidden CMI directory. Add the missing
`BH` paths for local direct and hidden transitive dependencies,
preserving annotation paths and existing visibility.

The test setup is submitted separately in #16848; this branch builds on
that commit and changes the expectations to require successful alias
typing. Until the tests PR lands, GitHub's main-based diff includes the
shared test commit. [Fix-only
comparison](DirkEmmett/dune@test/16531-merlin-hidden-includes...fix/16531-merlin-hidden-includes).

Fixes #16531.

Validation: `dune build @check @fmt @runtest` passed locally on both
branches with OCaml 5.5.0 and ppxlib 0.39.0. Actual Merlin 5.8.1 queries
confirmed that the tests-only branch retains the alias error and this
fix restores typing, completion, and navigation while direct private
names remain inaccessible.

Signed-off-by: Dirk Emmett <[email protected]>
Co-authored-by: Dirk Emmett <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants