<@U0270C8HAHW> Re the JSON schema PR (<https://gi...
# development
@fresh-cat-90827 Re the JSON schema PR (https://github.com/pantsbuild/pants/pull/18177) - while I love the idea of it automatically being exported, it kinda begs the question of whether the help API is the best place for it. The API itself feels kinda clumsy, and moreso a leak that we use help to generate the json schema, so that's why it's run by the help goal?
Copy code
./pants help json-schema > "pantsbuild-$(./pants version).json"
Now, the only real reason I bring this up is because it ties into my shell completions thing that never really found a home, but fits alongside the schema creation. Uses help to generate a file as a result of processing said help: https://github.com/pantsbuild/pants/issues/16315 This whole thing ran into the problem of
not being a great place as of today, because it's mostly for venvs, and bloating the API with a custom
felt messy, and etc etc I guess the question is, since we'd have 2 items that rely on help to generate some sort of custom output files, is there a better location or a consolidation for this? If we end up as
pants help json-schema
being the play, then I'd also put
pants help completions
in there too
👍 1
./pants help-export json-schema
./pants help-export completions
That is similar to
./pants help-advanced
Yeah, I still find it a little strange to read
Buuuuut, it is related to intellisense/auto-complete, so ... you know... "help-ish"
`./pants help-json-schema`and
./pants help-completions
./pants help json-schema
reads as "help for the json-schema subsystem or target type" which is not what this is...
./pants export-pants-meta json-schema
./pants export-pants-meta completions
Riffing on
./pants export
I mean, my strong preference is
./pants --completions
./pants export completions
- but I'll take anywhere to put it 🙂
something under
makes more sense for both json-schema and completions than under
I'd prefer not to add more goals.
could work, but then how do we say "the thing I want exported is completions, not venvs"
So, my original interpretation (just by name, honestly) was that export was used to basically pull non-production-code pants "stuff" out of pants, and into the host filesystem (using "host" super loosely here). We also have an
goal. To me, it seems that the
goal is a reasonable place for an overhaul - but I think one of the problems here was that we didn't have access to
from the non-builtin goals? Memory is a bit foggy on that part.
I mean, just by the description too "Export Pants data for use in other tools, such as IDEs." - seems perfect for json schema + completions, if there is some way to make it happen that isn't an incredibly amount of work