-
Notifications
You must be signed in to change notification settings - Fork 413
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature: add --stop-on-first-error CLI option
We expose a CLI option called --stop-on-first-error that exposes to the user the internal behaviour of stopping the build on the first encountered error. - [x] option documentation - [x] changelog - [x] test Signed-off-by: Ali Caglayan <alizter@gmail.com>
- Loading branch information
Showing
8 changed files
with
40 additions
and
0 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,2 @@ | ||
- Add `--stop-on-first-error` option to `dune build` which will terminate the build when | ||
the first error message is encountered. (#8400, @pmwhite) |
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 run = syntax error |
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 run = syntax error |
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 foo) | ||
(modules foo bar baz)) |
1 change: 1 addition & 0 deletions
1
test/blackbox-tests/test-cases/stop-on-first-error.t/dune-project
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 3.10) |
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 @@ | ||
let () = | ||
Bar.run (); | ||
Baz.run () |
19 changes: 19 additions & 0 deletions
19
test/blackbox-tests/test-cases/stop-on-first-error.t/run.t
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,19 @@ | ||
Here we demonstrate the --stop-on-first-error behaviour. | ||
|
||
$ dune build | ||
File "bar.ml", line 1, characters 10-16: | ||
1 | let run = syntax error | ||
^^^^^^ | ||
Error: Unbound value syntax | ||
File "baz.ml", line 1, characters 10-16: | ||
1 | let run = syntax error | ||
^^^^^^ | ||
Error: Unbound value syntax | ||
[1] | ||
|
||
$ dune build --stop-on-first-error | ||
File "bar.ml", line 1, characters 10-16: | ||
1 | let run = syntax error | ||
^^^^^^ | ||
Error: Unbound value syntax | ||
[1] |