• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pantsbuild / pants / 8929
0%
main: 93%

Build:
Build:
LAST BUILD BRANCH: use_pants_lock_in_uv
DEFAULT BRANCH: main
Ran 05 Feb 2016 04:12AM UTC
Jobs 7
Files 0
Run time –
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
8929

push

travis-ci

patricklaw
Introduce ignore_patterns option

Original motivation:
`npm install` command creates a lot of `BUILD.md` files which pants fail to interpret as pants `BUILD` files.

Other problems:
Currently there is no good way to prevent some directories / `BUILD` files from parsing. `spec_path` stands only for spec prefixes, `exclude_target_regexp` for targets.
Ability to exclude some directories not only based on prefixes can be useful in more cases than original motivation: with it we can exclude `node_modules` and `bower_components` directories from scanning which can be good for performance. Also there are `/target/` exclusion in Square's code which is also target for this change.

Solution:
Introduce `ignore_patterns` option which behave like `.gitignore` but for pants `BUILD` files.
Dependency on `pathspec` library (sources: https://github.com/cpburnz/python-path-specification) was added to make .gitignore-like filtration. It doesn't contain any `C/C++` extensions.

Performance impact:
I've checked `ignore_patterns` on big twitter repository trying to execute "scanning heavy" commands such as `filter` and `dependees`. There is no noticeable impact on `scan_build_files` performance (about 15%, but in general it's only about 2%) and some noticeable impact on `get_build_files_family` performance (about `x2.5`, but in general it's only about 7%).

But executions of `get_build_files_family` can be much faster as their result most likely was calculated already in `scan_build_files`. I will publish follow-up PR with this change.
Upd: I've implemented the fix and it doesn't seems to make situation better. Also it doesn't work well with `spec_excludes` code. So I've decided to return to this question after all deprecated code will be removed and with profiler.

5-6 diff contains `spec_excludes` deprecation and deprecation of ability to filter broken `BUILD` files using `exclude_target_regexp`.

Testing Done:
https://travis-ci.org/ttim/pants/builds/107142688

Also I've tested `--spec-excludes` after deprecation and checked `exclude_target_regexp` for ignoring `BUILD` files.

Bugs closed: 2880

Reviewed at https://rbcommons.com/s/twitter/r/3414/
Jobs
ID Job ID Ran Files Coverage
1 8929.1 (CI_FLAGS="-cjlpn 'Various pants self checks'") 05 Feb 2016 04:12AM UTC 0
Travis Job 8929.1
4 8929.4 (CI_FLAGS="-fkmsrcjlp 'Python contrib tests'") 05 Feb 2016 04:22AM UTC 0
Travis Job 8929.4
6 8929.6 (CI_FLAGS="-fkmsrjlpn -i 1/6 'Python integration tests for pants - shard 2'") 05 Feb 2016 04:17AM UTC 0
Travis Job 8929.6
7 8929.7 (CI_FLAGS="-fkmsrjlpn -i 2/6 'Python integration tests for pants - shard 3'") 05 Feb 2016 04:21AM UTC 0
Travis Job 8929.7
8 8929.8 (CI_FLAGS="-fkmsrjlpn -i 3/6 'Python integration tests for pants - shard 4'") 05 Feb 2016 04:23AM UTC 0
Travis Job 8929.8
9 8929.9 (CI_FLAGS="-fkmsrjlpn -i 4/6 'Python integration tests for pants - shard 5'") 05 Feb 2016 04:24AM UTC 0
Travis Job 8929.9
10 8929.10 (CI_FLAGS="-fkmsrjlpn -i 5/6 'Python integration tests for pants - shard 6'") 05 Feb 2016 04:27AM UTC 0
Travis Job 8929.10
Source Files on build 8929
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #8929
  • 6f4b8511 on github
  • Prev Build on master (#8913)
  • Next Build on master (#8937)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc