Skip to content

Commit ddcf45d

Browse files
committed
When simplifying canonical aliases, don't strip aliases
The logic behind stripping the Alias was that in the vast majority of cases, the canonical path points to a module that's the alias of the actual hidden module. This isn't always a valid assumption - for example in `base.caml`, which creates canonical aliases to stdlib.
1 parent 064fb0a commit ddcf45d

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

src/xref2/tools.ml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -941,13 +941,7 @@ and reresolve_module : Env.t -> Cpath.Resolved.module_ -> Cpath.Resolved.module_
941941
match
942942
resolve_module ~mark_substituted:true ~add_canonical:false env p2
943943
with
944-
| Ok (`Alias (_, p2'), _) ->
945-
`Canonical
946-
( reresolve_module env p,
947-
`Resolved (simplify_resolved_module_path env p2') )
948944
| Ok (p2', _) ->
949-
(* See, e.g. Base.Sexp for an example of where the canonical path might not be
950-
a simple alias *)
951945
`Canonical
952946
( reresolve_module env p,
953947
`Resolved (simplify_resolved_module_path env p2') )

0 commit comments

Comments
 (0)