-
Notifications
You must be signed in to change notification settings - Fork 233
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
uid_of_path can use the decl_id if shapes fail (#1700)
from goldfirere/fallback-to-decl_uid
- Loading branch information
Showing
5 changed files
with
100 additions
and
53 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
$ mkdir experimental | ||
$ mkdir unix | ||
|
||
$ cat >experimental/m_intf.ml <<'EOF' | ||
> module type S = sig val x : int end (* diff *) | ||
> EOF | ||
$ cat >experimental/exp.ml <<'EOF' | ||
> module M_intf = M_intf | ||
> EOF | ||
|
||
$ cat >unix/m_intf.ml <<'EOF' | ||
> module type S = sig val x : int end | ||
> EOF | ||
$ cat >unix/unix.ml <<'EOF' | ||
> module M_intf = M_intf | ||
> EOF | ||
|
||
$ cat >hack.ml <<'EOF' | ||
> let f (module R : Exp.M_intf.S) = | ||
> let _ = R.x in | ||
> () | ||
> EOF | ||
|
||
$ cd experimental | ||
$ $OCAMLC -keep-locs -bin-annot m_intf.ml exp.ml | ||
$ cd .. | ||
|
||
$ cd unix | ||
$ $OCAMLC -keep-locs -bin-annot m_intf.ml unix.ml | ||
$ cd .. | ||
|
||
$ $OCAMLC -keep-locs -bin-annot -I experimental/ -I linux/ hack.ml | ||
|
||
$ $MERLIN single locate -position 2:12 -look-for implementation \ | ||
> -build-path experimental -build-path unix \ | ||
> -source-path . -source-path unix -source-path experimental \ | ||
> -filename hack.ml <hack.ml | | ||
> sed 's/"file": ".*experimental.*"/"file": "experimental"/' | jq '.value' | ||
{ | ||
"file": "experimental", | ||
"pos": { | ||
"line": 1, | ||
"col": 20 | ||
} | ||
} | ||
|
This file contains 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