-
Notifications
You must be signed in to change notification settings - Fork 412
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Show the context name for errors happening in "alt" contexts (#10414)
* test: add sample for multi-context error Signed-off-by: Javier Chávarri <javier.chavarri@gmail.com>
- Loading branch information
Showing
10 changed files
with
82 additions
and
29 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
- Show the context name for errors happening in non-default contexts. | ||
(#10414, @jchavarri) |
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
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
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,39 @@ | ||
$ cat > dune-project << EOF | ||
> (lang dune 3.15) | ||
> (using melange 0.1) | ||
> (package (name bar) (allow_empty)) | ||
> (package (name baz) (allow_empty)) | ||
> EOF | ||
|
||
$ cat > dune-workspace << EOF | ||
> (lang dune 3.15) | ||
> | ||
> (context default) | ||
> | ||
> (context | ||
> (default | ||
> (name melange))) | ||
> EOF | ||
$ cat > dune << EOF | ||
> (library | ||
> (name foo) | ||
> (public_name bar.foo) | ||
> (enabled_if (= %{context_name} "default"))) | ||
> (library | ||
> (name foo) | ||
> (public_name baz.foo) | ||
> (modes melange) | ||
> (enabled_if (= %{context_name} "melange"))) | ||
> EOF | ||
|
||
$ cat > foo.ml <<EOF | ||
> let t = Str.regexp | ||
> EOF | ||
|
||
$ dune build | ||
Context: melange | ||
File "foo.ml", line 1, characters 8-18: | ||
1 | let t = Str.regexp | ||
^^^^^^^^^^ | ||
Error: Unbound module Str | ||
[1] |