-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Assume that module names that are not in
Env.t
are persistent (#2235)
Fix bug introduced by #2041 The environment used to lookup global identifiers coming from loaded cmi files was incomplete, leading to identifiers that could not be resolved. This patch fixes the issue by assuming that module names that are not found in the environment are always external. Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
- Loading branch information
1 parent
b955ac9
commit 5c828b5
Showing
8 changed files
with
52 additions
and
21 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
let x = 42 |
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,21 @@ | ||
(* TEST | ||
flags = "-no-alias-deps -w -49" | ||
compile_only = "true" | ||
files = "a2235.ml lib__2235.ml lib2235.ml user_of_lib2235.ml" | ||
* setup-ocamlc.byte-build-env | ||
** ocamlc.byte | ||
module = "lib__2235.ml" | ||
*** check-ocamlc.byte-output | ||
**** ocamlc.byte | ||
flags = "-no-alias-deps -w -49 -open Lib__2235 -o lib__A2235.cmo" | ||
module = "a2235.ml" | ||
***** check-ocamlc.byte-output | ||
****** ocamlc.byte | ||
flags = "-no-alias-deps -w -49 -open Lib__2235" | ||
module = "lib2235.ml" | ||
******* check-ocamlc.byte-output | ||
******** ocamlc.byte | ||
flags = "-no-alias-deps -w -49" | ||
module = "user_of_lib2235.ml" | ||
********* check-ocamlc.byte-output | ||
*) |
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 @@ | ||
module A2235 = A2235 |
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 @@ | ||
module A2235 = Lib__A2235 |
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
aliases.ml | ||
gpr2235.ml |
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,3 @@ | ||
open Lib2235 | ||
|
||
let x = A2235.x |
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