https://pantsbuild.org/ logo
#development
Title
# development
w

wide-midnight-78598

08/30/2022, 1:40 PM
In order to make some moves on auto-generating shell completions (https://github.com/pantsbuild/pants/issues/16315)... I was waiting until we have time to think a bit more about how
export
should work, and then see if we can build an option to generate completions, as well as a venv. I'm on the fence about whether this is better or worse, but using
export
(or any goal) feels more like... dunno... I always associate those to targets and production code (and `export`ing a dev env to help out), while completions are related to the Pants tooling itself. So what about doing something more like
--version
?
./pants --completions
?
cc @happy-kitchen-89482 @hundreds-father-404
It's still not as far as I would like to get, which is that the act of calling
./pants
would somehow place completions somewhere that could be sourced semi-automatically, buuuut, it might move us forward
b

bitter-ability-32190

08/30/2022, 2:51 PM
There's an open ticket to auto-update venvs when reqs change. I'm wondering if we can do the same here. Enable an option then any pants command implicitly updates the completion file?
đź‘Ť 1
w

wide-midnight-78598

08/30/2022, 3:04 PM
Oooh, yes, that's exactly what I'd want - I was thinking it would have to go in the pants script, which is blah
b

busy-vase-39202

08/31/2022, 7:00 PM
(Benjy is OOO this week.) @witty-crayon-22786 thoughts?
w

witty-crayon-22786

08/31/2022, 7:01 PM
So what about doing something more like
--version
?
./pants --completions
?
this would work too probably. goals don’t have access to the help APIs in general, but “BuiltinGoals” do. so a
./pants completions
would be possible.
w

wide-midnight-78598

08/31/2022, 9:16 PM
One of the discussions in the github ticket was avoiding proliferation of goals, hence why
export
+ option was a nice thing... I can proto a builtin, and then we can decide if it makes sense?