Allow the dependees goal and idea to respect the --spec_excludes option.
Review Request #1795 - Created Feb. 19, 2015 and submitted
|benjyw, nhoward_tw, patricklaw, tejal|
BuildFile.scan_buildfiles() now accept relative paths for spec_excludes.
BuildFile.dependants() now accepts the spec_excludes parameter.
Wire in spec_excludes into the dependees and idea goals.
Added unit tests for BuildFile.dependants() BuildFile.scan_buildfiles() and the dependees task.
Ran in the Square repo and it unlocks the dependees goal for us.
Fix build break - global options aren't available in Project() class.
Revision 2 (+68 -17)
I think this is OK, but I don't love repeatedly having to remember to pass spec_excludes into scan_buildfiles() everywhere.
Could we have scan_buildfiles() default to the global property if the argument isn't explicitly specified? As far as I can tell we have no cases where it wouldn't want to use that anyway. Possibly ditto for the build root? That might be a bigger change though so maybe not yet.
What is making me excited about this change is that we have users that want to be able to refactor libraries across the repo. This will allow them to do:./pants idea target:: $(./pants dependees target:lib)
Is there another way to do this? I may follow on with a change to goal idea that will pull in dependees automatically.
Of course, this is functionality I'd eventually like to see in the IntelliJ plugin.