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

Adjusting help message #4865

Merged
merged 2 commits into from
Jun 11, 2021
Merged

Adjusting help message #4865

merged 2 commits into from
Jun 11, 2021

Conversation

murchu27
Copy link
Contributor

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 the master branch on my fork, and the checks passed there, so hopefully they'll be fine here.


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?
@murchu27
Copy link
Contributor Author

Fixes #4798

@calebcartwright
Copy link
Member

calebcartwright commented Jun 11, 2021

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?

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

@calebcartwright
Copy link
Member

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!

@calebcartwright calebcartwright merged commit 0902edc into rust-lang:master Jun 11, 2021
calebcartwright pushed a commit to calebcartwright/rustfmt that referenced this pull request Jul 26, 2021
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?
calebcartwright pushed a commit that referenced this pull request Jul 26, 2021
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?
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.

2 participants