Add Support for "exclude" to globs in BUILD files

Review Request #3828 - Created May 5, 2016 and submitted

Yujie Chen
3228, 3338
jsirois, stuhood, zundel

New Engine has to support "exclude" feature in globs to allow us to parse all BUILD files in the pantsbuild/pants repo.

Changes made:
1. in BaseGlobs class, handle "exclude" argument
2. LazyFileContent now takes 2 pathglobs, 1 for matching globs, 1 for excluding globs.
3. "exclude" logic is added to LazyFileContent class.
4. add a testproject "file_set" under testprojects/tests/python/pants/file_sets/. It has 1 BUILD file and multiple empty \*.py files.
5. add new tests in engine/exp/legacy/test_filemap_integration
6. fix a bug in apply_path_wildcard and apply_path_dir_wildcard in fnmatch should take basename of a path.

Things to note:
1. Nesting exclude is supported. (ie: exclude=\[globs('...', exclude=\[...\])\])


  • 0
  • 2
  • 1
  • 3
Description From Last Updated
Stu Hood
Yujie Chen
Yujie Chen
Stu Hood
Yi Cheng
Eric Ayers
Yujie Chen
Yi Cheng
Yujie Chen
Yujie Chen
Review request changed

Status: Closed (submitted)

Change Summary:

Merged as a5edfe0b335c6bb59feea50fc6822c70cc76a880