Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Allow pants to select targets by file(s) #5930
I've created a global option
Now users will be able to run goals on files without needing to know which target owns those files.
It is important to note that multiple target selection methods are not allowed, so it fails when more than one of
$ ./pants \ --owner-of=this/is/a/file/name.java \ # flag triggers owner lookup --owner-of=this/is/a/file/name/too.py \ # flag triggers owner lookup compile <another target>
left a comment
Thanks, looks good!
Would add basic integration tests of 1) the success case, 2) a case where a file exists but no target owns it (iirc, this will trigger a warning via an existing codepath, which the test should check for: you can see it when
It would likely also be ok to deprecate the
referenced this pull request
Jun 8, 2018
Could you clarify in the PR description about the behavior with