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
Integrate option value derivation into help. #10313
Conversation
[ci skip-rust-tests]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great stuff! Thanks.
The normal help now shows value derivation for each displayed option.
Should it maybe only render the value if it is different from the default?
I had it that way at first, but I found it subjectively worse than being consistent. |
[ci skip-rust-tests]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wonderful! Excellent work.
"--level", | ||
type=LogLevel, | ||
default=LogLevel.INFO, | ||
recursive=True, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe save this for a followup so that it shows up in the changelog as a distinct change. Stu has been planning to remove recursive options.
# Rust tests will be skipped. Delete if not intended. [ci skip-rust-tests]
[ci skip-rust-tests]
options
goal, which was overly complex.adding a
details
field toRankedValue
.Parser._compute_value
(although it is still huge).current value, not the HARDCODED default.
os.environ
/sys.argv
in various placesin the options system. You now have to be explicit about passing those through.
args
maybe not including the binary namein tests. Now
args[0]
must always be the binary name (that is,./pants
).A future change will provide a way to dump all help info, including the
value derivation history, out to JSON.
[ci skip-rust-tests]