forked from twitter/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.
[engine] Proper implementation of
**
globs in the v2 engine
We don't have a proper implementation of trailing ** matching in the new engine. Currently "**" matches 1 or more levels of dirs, while in gitignore syntax and also in zsh spec, "**" should match 0 or more levels of dirs. For example, we expect "**" behaves like following: ** -> matches everything, recursively. dir/** -> matches everything under dir, recursively. **/*.py -> matches every dir recursively, searching for files with a .py extension (even in cwd). This review does following: 1. implement "**" matching logic as specified above. 2. add test cases in test_fs.py and test_path_globs.py. 3. add some missing dependencies in test BUILD files. Testing Done: ci green: https://travis-ci.org/pantsbuild/pants/builds/141203951 Bugs closed: 3413, 3589, 3608 Fixes: pantsbuild#3413 Fixes: pantsbuild#3589 Reviewed at https://rbcommons.com/s/twitter/r/4034/
- Loading branch information
Showing
9 changed files
with
127 additions
and
49 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,4 @@ | ||
jvm_app( | ||
name='trailing_glob_doublestar', | ||
bundles=[bundle(fileset=globs('test_dir/**'))] | ||
) |
1 change: 1 addition & 0 deletions
1
testprojects/tests/java/org/pantsbuild/build_parsing/test_dir/.keep
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 @@ | ||
# This (empty) directory is a dependency of a test, so we use a hidden file to allow git to track the directory. |
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