forked from pantsbuild/pants
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Exclude only roots for exclude-target-regexp in v2 (pantsbuild#4578)
### Problem The `v2` engine implemented the `exclude-target-regexp` option differently from the `v1` engine, in that it completely excluded targets immediately after parsing. While that arguably aligned with the option's docstring, it did not align with the implementation in the `v1` engine, which had the effect of only filtering target roots. Real usecases in the wild (see twitter-archive/commons#451) were depending on the behaviour of filtering only roots, and the result of filtering targets completely out of the graph when other things are depending on them is always some sort of error. ### Solution Align the behaviour of `v2` with `v1` by only filtering root targets, clarify the doc string, and add a test that excluding a dependency still allows the dependee to be built. ### Result The behaviour of the `v1` engine for this case is preserved in `v2`. Users who want to completely ignore a BUILD file can use the more granular `--build-ignore` option to do so. Fixes pantsbuild#4573
- Loading branch information
Stu Hood
authored
May 12, 2017
1 parent
ed0202f
commit df19f57
Showing
12 changed files
with
64 additions
and
120 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
5 changes: 5 additions & 0 deletions
5
testprojects/src/java/org/pantsbuild/testproject/phrases/TrustyCompanion.java
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 @@ | ||
package org.pantsbuild.testproject.phrases; | ||
|
||
public class TrustyCompanion { | ||
public static String VALUE = "trusty companion"; | ||
} |
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