-
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.
Merge pull request #2660 from Julow/warn_unused_prepro_deps_later
Warn about unused preprocessor_deps
- Loading branch information
Showing
10 changed files
with
82 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
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
11 changes: 11 additions & 0 deletions
11
test/blackbox-tests/test-cases/unused-preprocessor-deps/dune
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,11 @@ | ||
(executable | ||
(name a) | ||
(modules a) | ||
;(preprocess (pps ppx_deriving.std)) | ||
(preprocessor_deps does-not-exist.txt)) | ||
|
||
(library | ||
(name b) | ||
(modules b) | ||
(preprocess future_syntax) | ||
(preprocessor_deps does-not-exist.txt)) |
27 changes: 27 additions & 0 deletions
27
test/blackbox-tests/test-cases/unused-preprocessor-deps/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,27 @@ | ||
`preprocessor_deps` is provided without `preprocess` and is ignored. | ||
Should warn. | ||
|
||
$ touch a.ml b.ml | ||
|
||
$ echo "(lang dune 1.11)" > dune-project | ||
$ echo "(allow_approximate_merlin)" >> dune-project | ||
$ dune build | ||
File "dune", line 5, characters 1-39: | ||
5 | (preprocessor_deps does-not-exist.txt)) | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
Warning: This preprocessor_deps field will be ignored because no preprocessor | ||
is configured. | ||
File "dune", line 11, characters 1-39: | ||
11 | (preprocessor_deps does-not-exist.txt)) | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
Warning: This preprocessor_deps field will be ignored because no preprocessor | ||
is configured. | ||
|
||
$ echo "(lang dune 2.0)" > dune-project | ||
$ dune build | ||
File "dune", line 5, characters 1-39: | ||
5 | (preprocessor_deps does-not-exist.txt)) | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
Error: This preprocessor_deps field will be ignored because no preprocessor | ||
is configured. | ||
[1] |