little-zoo-57121
09/27/2022, 3:36 PMpants filter
may be broken? When using filter values that worked in 2.12 or trying anything different we just get the following cryptic error. The only value that does not result in this is --help
curved-television-6568
09/27/2022, 3:39 PMfilter
goal was deprecated in 2.13, and removed in 2.14:
User API Changes
⢠Deprecategoal now thatfilter
options can be used from any goal (#15600)filter
https://github.com/pantsbuild/pants/blob/main/src/python/pants/notes/2.13.x.md https://github.com/pantsbuild/pants/pull/15600
curved-television-6568
09/27/2022, 3:40 PMcurved-television-6568
09/27/2022, 3:42 PM./pants filter
on 2.13 you will get a deprecation message explaining how to adapt š (or just read the changes in the linked PR)little-zoo-57121
09/27/2022, 3:43 PMbitter-ability-32190
09/27/2022, 3:52 PMlittle-zoo-57121
09/27/2022, 3:53 PMbitter-ability-32190
09/27/2022, 3:57 PMhundreds-father-404
09/27/2022, 5:40 PMwitty-crayon-22786
09/27/2022, 5:41 PMwitty-crayon-22786
09/27/2022, 5:41 PMbitter-ability-32190
09/27/2022, 5:41 PMhundreds-father-404
09/27/2022, 5:42 PMhelp
to ignore ithundreds-father-404
09/27/2022, 5:44 PM⯠./pants black
Unknown goal: black
Use `./pants help` to get help.
Use `./pants help goals` to list goals.
⯠./pants filter
12:44:15.72 [ERROR] 'filter'
flat-zoo-31952
09/27/2022, 5:47 PMhundreds-father-404
09/27/2022, 5:48 PMThereās nothing good that comes of removing filter.Yeah, it's true. Other than maybe cluttering
./pants help goals
, which we could filter this out if we wanthundreds-father-404
09/27/2022, 5:48 PMfilter
foreverflat-zoo-31952
09/27/2022, 5:50 PMbitter-ability-32190
09/27/2022, 5:51 PMhundreds-father-404
09/27/2022, 5:52 PMfilter
keep working forever imo. Why force users to change already working scripts? It's literally like 20 lines of code for us to do thatbitter-ability-32190
09/27/2022, 5:53 PMfilter
may be 20 lines, but not all goals that travel this path will bewitty-crayon-22786
09/27/2022, 5:53 PMItās friendlier to letbecause itās not always so easy to maintain things like that. the policy needs to allow for some flexibility, because in some cases the burden of backwards compatibility is much higher.keep working forever imo. Why force users to change already working scripts? Itās literally like 20 lines of code for us to do thatfilter
curved-television-6568
09/27/2022, 5:53 PMwitty-crayon-22786
09/27/2022, 5:53 PMflat-zoo-31952
09/27/2022, 5:54 PMbitter-ability-32190
09/27/2022, 5:54 PMflat-zoo-31952
09/27/2022, 5:55 PMwitty-crayon-22786
09/27/2022, 5:57 PMbitter-ability-32190
09/27/2022, 6:01 PMflat-zoo-31952
09/27/2022, 6:02 PMbitter-ability-32190
09/27/2022, 6:02 PMflat-zoo-31952
09/27/2022, 6:03 PMwitty-crayon-22786
09/27/2022, 6:05 PMfilter
is clearly closer to one end of the spectrum.hundreds-father-404
09/27/2022, 6:08 PMhundreds-father-404
09/27/2022, 6:10 PMfilter
was a good example of that, it was deprecated (by me) from a purity perspective imo, which isn't compelling enough, given how it's 40 lines of code to supportcurved-television-6568
09/27/2022, 6:37 PM#pike
directive: https://pike.lysator.liu.se/docs/man/chapter_5.html#5.4flat-zoo-31952
09/28/2022, 1:10 PMcurved-television-6568
09/28/2022, 1:15 PMlittle-zoo-57121
09/28/2022, 1:19 PMflat-zoo-31952
09/28/2022, 1:29 PM./pants filter
should work in perpetuity with a deprecation warning. There's all kinds of reasons we want to keep it working for users into the future. One is that changing it imposes a cost on existing Pants "administrators" just for updating. It potentially breaks muscle memory for more causal users. And for newer users it makes it so the following things don't really work, which can lead to frustration or abandonment if they aren't able to solve their problems:
⢠Commands gleaned from older blog posts
⢠Techniques discovered from earlier aborted attempts at integration
⢠Suggestions from other users who may not be as up-to-date in their usage patternshundreds-father-404
09/28/2022, 2:36 PMshould work in perpetuity with a deprecation warning.Hm, yeah, I should add this to my PR restoring `filter`; we do want to encourage people to use the better approach
little-zoo-57121
09/28/2022, 3:23 PMtailor
now requiring targets in 2.14? I'm wondering about this as it's kind of supposed to be the thing telling me about the targets in my repo it foundflat-zoo-31952
09/28/2022, 3:46 PM./pants tailor '**'
is the command that will best approximate the old behavio that I've foundlittle-zoo-57121
09/28/2022, 3:51 PM./pants tailor
won't actually get you set up as before. Now you need to add args to the command for the thing that is supposed to put the build files in the project and/or check the build files. I've just always seen it as the goal that was telling me about the targets it found, but now I have to add to the invocation when I add say a new folder in my sourcewitty-crayon-22786
09/28/2022, 4:00 PM./pants tailor ::
should always be equivalent to ./pants tailor
from before, but yea: sorry for the trouble there.witty-crayon-22786
09/28/2022, 4:02 PMflat-zoo-31952
09/28/2022, 4:04 PMwitty-crayon-22786
09/28/2022, 4:04 PMhundreds-father-404
09/28/2022, 4:40 PMtailor
change:
⢠you can now say to run on only some things, like ./pants tailor project:: -project/but_not_me
⢠you can now use ./pants --changed-since=HEAD
tailor
And now, indeed, all goals behave the same way for CLI arguments, whereas before some were weird and special-cased like tailor
flat-zoo-31952
09/28/2022, 5:09 PMhundreds-father-404
09/28/2022, 5:20 PMflat-zoo-31952
09/28/2022, 5:29 PMcurved-television-6568
09/28/2022, 5:35 PMtailor2
, tailor3
⦠? š (as examples)