fresh-cat-90827
12/19/2022, 8:12 PM./pants dependencies --my-flag
. The docs show how to add an option for a new subsystem, but I wonder if one can hook up into an existing goal?fast-nail-55400
12/19/2022, 8:16 PMfast-nail-55400
12/19/2022, 8:16 PMfresh-cat-90827
12/19/2022, 8:18 PM./pants dependencies
would show all dependencies, but I am looking into adding an option defined in my in-repo plugin to avoid doing ./pants dependencies | xargs command ... | xargs command
. Using cli.alias
won't work as it involves chaining multiple commands. I'd like instead to do this in Python before emitting output from the very first command.fast-nail-55400
12/19/2022, 8:20 PMfast-nail-55400
12/19/2022, 8:21 PMfresh-cat-90827
12/19/2022, 8:21 PMdependencies
goal, so the option wouldn't interfere with the semantics at all. Essentially the last step filtering before returningfresh-cat-90827
12/19/2022, 8:22 PMfast-nail-55400
12/19/2022, 8:22 PMfast-nail-55400
12/19/2022, 8:23 PM@goal_rule
for that particular goal) will provide that result typefast-nail-55400
12/19/2022, 8:23 PMfresh-cat-90827
12/19/2022, 8:24 PMfast-nail-55400
12/19/2022, 8:25 PMmy-deps
) and then either copy/paste the impl of dependencies
goal or call its impl (which now keeps its same type) but pass in a Console
wrapper that does the filteringfast-nail-55400
12/19/2022, 8:25 PMfresh-cat-90827
12/19/2022, 8:26 PMfresh-cat-90827
12/19/2022, 8:26 PMfast-nail-55400
12/19/2022, 8:27 PMfast-nail-55400
12/19/2022, 8:27 PMfresh-cat-90827
12/19/2022, 8:32 PMfresh-cat-90827
12/19/2022, 8:33 PMfast-nail-55400
12/19/2022, 8:34 PMbitter-ability-32190
12/19/2022, 8:43 PM