-
Notifications
You must be signed in to change notification settings - Fork 415
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2426 from nojb/explicit_context
Add (paths ...) field to (context ...) definition
- Loading branch information
Showing
13 changed files
with
113 additions
and
4 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
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,3 @@ | ||
(executable | ||
(name hello) | ||
(promote (until-clean))) |
Binary file not shown.
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 @@ | ||
let () = | ||
Printf.printf "Hello: %s\n%!" (Sys.getenv "FOO") |
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,8 @@ | ||
(alias | ||
(name default) | ||
(deps bin/hello.exe) | ||
(action (run hello.exe))) | ||
|
||
;; Note that if you try the above on Windows it will fail because the program in | ||
;; the (run ...) action is supposed to **not** contain the .exe extension, but | ||
;; if we remove it then it will fail on Unix systems. |
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 @@ | ||
(lang dune 1.12) |
5 changes: 5 additions & 0 deletions
5
test/blackbox-tests/test-cases/workspace-paths/dune-workspace
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,5 @@ | ||
(lang dune 1.12) | ||
|
||
(context | ||
(default | ||
(paths (PATH bin :standard) (FOO a b /c \ b)))) |
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 @@ | ||
$ dune build | ||
hello alias default | ||
Hello: $TESTCASE_ROOT/a:/c | ||
|
||
$ mkdir sub | ||
$ cat > sub/dune-workspace <<EOF | ||
> (lang dune 1.12) | ||
> (context | ||
> (default | ||
> (paths (FOO a) (FOO b)))) | ||
> EOF | ||
$ cat > sub/dune-project <<EOF | ||
> (lang dune 1.12) | ||
> EOF | ||
$ dune build --root sub | ||
Entering directory 'sub' | ||
File "dune-workspace", line 4, characters 19-22: | ||
4 | (paths (FOO a) (FOO b)))) | ||
^^^ | ||
Error: the variable "FOO" can appear at most once in this stanza. | ||
[1] |