In order to make some moves on auto-generating she...
# development
w
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
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
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
(Benjy is OOO this week.) @witty-crayon-22786 thoughts?
w
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
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?