Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: do not hide lib interface module #6549

Merged
merged 2 commits into from
Nov 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
Unreleased
----------

- Do not shadow library interface modules (#6549, fixes #6545, @rgrinberg)

- Move `$ dune ocaml-merlin -dump-config=$dir` to `$ dune ocaml merlin
dump-config $dir`. (#6547, @rgrinberg)

Expand Down
5 changes: 4 additions & 1 deletion src/dune_rules/module_compilation.ml
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,10 @@ module Alias_module = struct
{ local_name; obj_name })
in
let shadowed =
if Dune_project.dune_version project < (3, 5) then []
if
Dune_project.dune_version project < (3, 5)
|| Modules.lib_interface modules = None
then []
else
match Modules.alias_module modules with
| None -> []
Expand Down
3 changes: 0 additions & 3 deletions test/blackbox-tests/test-cases/alias-module-generated.t
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ wrap module is generated by dune.

(** @canonical Foo.Bar *)
module Bar = Foo__Bar

module Foo = struct end
[@@deprecated "this module is shadowed"]

The final `Foo` module should not be marked as deprecated/shadowed, since it
does not shadow any module.