Skip to content
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

Fold target help into the help system. #11022

Merged
merged 3 commits into from Oct 22, 2020
Merged

Conversation

benjyw
Copy link
Sponsor Contributor

@benjyw benjyw commented Oct 22, 2020

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]

@benjyw
Copy link
Sponsor Contributor Author

benjyw commented Oct 22, 2020

Screen Shot 2020-10-22 at 2 17 49 PM

@benjyw
Copy link
Sponsor Contributor Author

benjyw commented Oct 22, 2020

Screen Shot 2020-10-22 at 2 18 40 PM

Screen Shot 2020-10-22 at 2 18 26 PM

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]
@benjyw
Copy link
Sponsor Contributor Author

benjyw commented Oct 22, 2020

Screen Shot 2020-10-22 at 2 20 51 PM

Copy link
Contributor

@Eric-Arellano Eric-Arellano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is excellent! Thank you!

print(f"\nPants {pants_version()}")
print("\nUsage:\n")
print_cmd(
"[option ...] [goal ...] [file/target ...]",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can also add options after the specs, which is often much more convenient.

Suggested change
"[option ...] [goal ...] [file/target ...]",
"[option ...] [goal ...] [file/target ...] [option ...]",

Copy link
Sponsor Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, but only if there are specs, I think. Otherwise the options will be bound to the goal scope, which gets complicated to explain.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that's correct.

# Rust tests and lints will be skipped. Delete if not intended.
[ci skip-rust]

# Building wheels and fs_util will be skipped. Delete if not intended.
[ci skip-build-wheels]
# Rust tests and lints will be skipped. Delete if not intended.
[ci skip-rust]

# Building wheels and fs_util will be skipped. Delete if not intended.
[ci skip-build-wheels]
@coveralls
Copy link

Coverage Status

Coverage remained the same at 0.0% when pulling 0e9e0f5 on benjyw:help_things2 into 8da1680 on pantsbuild:master.

@benjyw benjyw merged commit 1b90250 into pantsbuild:master Oct 22, 2020
@benjyw benjyw deleted the help_things2 branch October 22, 2020 21:46
Eric-Arellano pushed a commit to Eric-Arellano/pants that referenced this pull request Oct 22, 2020
[ci skip-rust]

[ci skip-build-wheels]

# Conflicts:
#	src/python/pants/bin/local_pants_runner.py
Eric-Arellano added a commit that referenced this pull request Oct 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants