-
Notifications
You must be signed in to change notification settings - Fork 924
Adjusting help message #4865
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
Adjusting help message #4865
Conversation
On stable, running with `--help|-h` shows information about `file-lines` which is a nightly-only option. This commit removes all mention of `file-lines` from the help message on stable. There is room for improvement here; perhaps a new struct called, e.g., `StableOptions` could be added to complement the existing `GetOptsOptions` struct. `StableOptions` could have a field for each field in `GetOptsOptions`, with each field's value being a `bool` that specifies whether or not the option exists on stable. Or is this adding too much complexity?
Adjusting help message
Fixes #4798 |
The original changes proposed will be quite alright for covering #4798, no worries there. However, if you're interested in making any follow up proposals to improve the handling that'd be fine too! Probably worth noting that one of the many changes on the experimental v2 version actually switched over to using structopt (https://github.com/rust-lang/rustfmt/blob/rustfmt-2.0.0-rc.2/src/rustfmt/main.rs) so perhaps worth considering doing the same on the 1.x mainline |
Also for future reference I want to try to avoid merge commits as much as possible. They're strictly necessary for the sync process we use to get rustfmt pulled into the main repo for release, but outside those subtree push/pulls we shouldn't have them. If you end up willing and interested in working on anything else it'd be best to submit the pulls from feature branches that have are up to date/rebased against the trunk branch here. Our branching strategy has been a little funky here lately too, so don't hesitate to reach out here and/or in GitHub if you have any questions! |
On stable, running with `--help|-h` shows information about `file-lines` which is a nightly-only option. This commit removes all mention of `file-lines` from the help message on stable. There is room for improvement here; perhaps a new struct called, e.g., `StableOptions` could be added to complement the existing `GetOptsOptions` struct. `StableOptions` could have a field for each field in `GetOptsOptions`, with each field's value being a `bool` that specifies whether or not the option exists on stable. Or is this adding too much complexity?
On stable, running with `--help|-h` shows information about `file-lines` which is a nightly-only option. This commit removes all mention of `file-lines` from the help message on stable. There is room for improvement here; perhaps a new struct called, e.g., `StableOptions` could be added to complement the existing `GetOptsOptions` struct. `StableOptions` could have a field for each field in `GetOptsOptions`, with each field's value being a `bool` that specifies whether or not the option exists on stable. Or is this adding too much complexity?
NOTE: Originally had #4812 open to merge these changes, but checks were failing in weird ways. @calebcartwright suggested rebasing my branch onto
master
, but I decided to just delete my fork and start again, and make the changes again on a new feature branch (remove-nightly-help-from-stable
). I then merged into themaster
branch on my fork, and the checks passed there, so hopefully they'll be fine here.On stable, running with
--help|-h
shows information aboutfile-lines
which is a nightly-only option. This commit removes all mention of
file-lines
from the help message on stable.There is room for improvement here; perhaps a new struct called, e.g.,
StableOptions
could be added to complement the existingGetOptsOptions
struct.StableOptions
could have a field for eachfield in
GetOptsOptions
, with each field's value being abool
thatspecifies whether or not the option exists on stable. Or is this adding
too much complexity?