Move excludes logic into cmd_line_spec_parser so it can filter out broken build targets.

Review Request #1566 - Created Jan. 5, 2015 and submitted

Information
Eric Ayers
pants
zundel/exclude-targets-before-injection
903
743374f...
Reviewers
pants-reviews
benjyw, jsirois, patricklaw
This is a revamp of https://rbcommons.com/s/twitter/r/930/.  The difference is that
this is now much easier after the options refactoring.

Added unit test.

Created a bogus BUILD file on the path:

mkdir -p some/dir
echo "BOGUS" >>some/dir/BUILD

and tried:

PANTS_DEV=1 ./pants goal compile :: --exclude-target-regexp='.some/dir.' --exclude-target-regexp='.android.'

Before this change, it fails:

AddressLookupError: name 'BOGUS' is not defined
 while executing BUILD file /Users/zundel/Src/pants/some/dir/BUILD
 Loading addresses from 'some/dir' failed.

Now, if you exclude the bad build file path, you can get past it.

Issues

  • 0
  • 2
  • 0
  • 2
Description From Last Updated
Benjy Weinberger
Benjy Weinberger
Patrick Lawson
Eric Ayers
John Sirois
Eric Ayers
Eric Ayers
Review request changed

Status: Closed (submitted)

Change Summary:

commit b3663c11d3ff059c874885f39ab5693fa61a4f6b

Loading...