[engine] Proper implementation of `**` globs in the v2 engine

Review Request #4034 - Created June 29, 2016 and submitted

Yujie Chen
3413, 3589, 3608
kwlzn, stuhood

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.

ci green:


  • 0
  • 1
  • 0
  • 1
Description From Last Updated
Yujie Chen
Stu Hood
Kris Wilson
Ity Kaul
Kris Wilson
Yujie Chen
Review request changed

Status: Closed (submitted)

Change Summary:

in c7cd71d25a7a1d1c499a2debc558c95fef352561. thanks, Kris, Stu and Ity!