-
-
Notifications
You must be signed in to change notification settings - Fork 631
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regularize the help system #10999
Comments
Feedback please! |
This is great, I love changing My main concern is
We already now have a |
Uniformity in this way strikes me as a good idea. Right now pants also responds to the |
I don't see such a subsystem. Do you mean Maybe it should simply be called |
Oh, it is already |
pants/src/python/pants/backend/python/target_types.py Lines 87 to 88 in 9dbaaca
|
Huh, I had to pull to get that python-distribution subsystem in my client, so my git grep didn't find it. |
Either way, we can rename. And we should rename this one, since it's not (currently) setting a default value for a target-level field, which would be the rationale for having them share a name. |
Also reserves some names that cannot be used as scopes or aliases ('global', 'targets', 'goals') so that `./pants help <name>` is unambiguous. Works towards addressing pantsbuild#10999. Also removes some cruft from test_extension_loader.py. [ci skip-rust] [ci skip-build-wheels]
See pantsbuild#10999. [ci skip-rust] [ci skip-build-wheels]
Also reserves some names that cannot be used as scopes or aliases ('global', 'targets', 'goals') so that `./pants help <name>` is unambiguous. Works towards addressing #10999. Also removes some cruft from test_extension_loader.py.
…ntsbuild#11007) See pantsbuild#10999. [ci skip-rust] [ci skip-build-wheels]
…uild#11004) Also reserves some names that cannot be used as scopes or aliases ('global', 'targets', 'goals') so that `./pants help <name>` is unambiguous. Works towards addressing pantsbuild#10999. Also removes some cruft from test_extension_loader.py.
This proposal highlights the potentially confusing location that One of the great accomplishments of v2.0.0 is that it makes learning the tool It seems to me that the UI for If that is true, then the current behavior when one types
And this proposal would probably simplify the output to two lines, getting rid of the "list goals" line. It might be worthwhile to be more verbose here to help those who are discovering Typing
Subsystems as a target for
Something not mentioned is The fewer the number of built in goals, the easier I think it will be for people and organizations to use |
I forgot about |
Instead of it being the only help-related functionality implemented as a standalone goal. Also replaces `./pants goals` with `./pants help goals`, and makes various other improvements to help, such as not showing global option help when you just enter `./pants help`, so that the usage message fits in a single screen. Addresses pantsbuild#10999. [ci skip-rust] [ci skip-build-wheels]
I agree with this. One step further, I think completely get rid of It's far too subtle that you need to run Our
Yes, e.g. When you say |
Instead of it being the only help-related functionality implemented as a standalone goal. Also replaces `./pants goals` with `./pants help goals`, and makes various other improvements to help, such as not showing global option help when you just enter `./pants help`, so that the usage message fits in a single screen. Addresses pantsbuild#10999. [ci skip-rust] [ci skip-build-wheels]
Instead of it being the only help-related functionality implemented as a standalone goal. Also replaces `./pants goals` with `./pants help goals`, and makes various other improvements to help, such as not showing global option help when you just enter `./pants help`, so that the usage message fits in a single screen. Addresses pantsbuild#10999. [ci skip-rust] [ci skip-build-wheels]
Addressed in #11022 |
That's not quite true, because there are many global options. Under this proposal you would see them via |
@rcuza Thanks for the feedback! |
Re getting rid of advanced help, I'm not so sure. It can get VERY verbose. |
@benjyw |
It does contain all the help info, exactly. |
Instead of it being the only help-related functionality implemented as a standalone goal. Also replaces `./pants goals` with `./pants help goals`, and makes various other improvements to help, such as not showing global option help when you just enter `./pants help`, so that the usage message fits in a single screen. Addresses #10999. [ci skip-rust] [ci skip-build-wheels]
This is now implemented through #11022 🚀 |
There are a few quirks with the current CLI help system:
./pants help
(for global options) and./pants help <subsystem>
for subsystem options../pants help-advanced [<subsystem>]
../pants goals
../pants target-type
, which is implemented as a goal, not as part of the help system.I propose the following changes, for uniformity:
./pants help
shows the usage message, but no global option help. That way it fits on a single screen../pants help goals
shows goals../pants help targets
shows target types../pants help <target_type>
shows help for that target type../pants help(-advanced) global
shows global option help../pants help(-advanced) <subsystem>
shows help for the options in that subsystem.Note that this means that
goals
,targets
,global
and target type aliases cannot be subsystem names. That seems like a good idea anyway to avoid confusion.We had discussed having a convention where the subsystem
target_type
can be used for setting default values for field on the corresponding target_type. If we do so we can have./pants help <target_type>
express that special-case fact, but for now the prohibition on overlapping names above will actually help reserve the namespace for that possibility.The text was updated successfully, but these errors were encountered: