Repository navigation
test(merlin): cover hidden transitive private-module aliases - #16848
Merged
Merged
Conversation
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]>
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]>
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.
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
-Hrestores alias typing, and checks that direct private-module and hidden-dependency names remain inaccessible. No production code changes.Validation:
dune build @check @fmt @runtestpassed 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 changeloglabel.