-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Potentially Upcoming Minor Breaking Change #808
Labels
M-breaking-change
Meta: Implementing or merging this will introduce a breaking change.
Comments
kbknapp
added
M-breaking-change
Meta: Implementing or merging this will introduce a breaking change.
T: RFC / question
labels
Jan 5, 2017
This was referenced Jan 5, 2017
Closed
kbknapp
changed the title
Upcoming Minor Breaking Change
Potentially Upcoming Minor Breaking Change
Jan 5, 2017
kbknapp
added a commit
that referenced
this issue
Apr 5, 2017
…ion of help messages One can now use `App::print_long_help` or `App::write_long_help` Note that `App::write_long_help` is **NOT** affected by #808 in the manner that `App::write_help` help is and thus should be preferred if at all possible.
kbknapp
added a commit
that referenced
this issue
Jan 24, 2018
…p::write_help Contains a *MINOR* breaking change. App::write_help now requires `&mut self` instead of `&self`. This fixes a major bug where the help message is entirely incorrect. More can be found at #808 I've decided to make this change because it was preventing further progress. Anyone's code who breaks the fix is trivial: ```rust // OLD BROKEN let app = App::new("broken"); let mut out = io::stdout(); app.write_help(&mut out).expect("failed to write to stdout"); // NEW FIX let mut app = App::new("broken"); // <-- let mut let mut out = io::stdout(); app.write_help(&mut out).expect("failed to write to stdout"); ``` Closes #808
kbknapp
added a commit
that referenced
this issue
Jan 31, 2018
A full list of deprecations is: * App::version_message -> App::mut_arg * App::version_short -> App::mut_arg * App::help_message -> App::mut_arg * App::help_short -> App::mut_arg * App::from_yaml -> serde * App::usage -> App::override_usage (+no longer assumes leading \t) * App::help -> App::override_help * App::template -> App::help_template * App::args_from_usage -> App::args(&str) * App::arg_from_usage -> App::arg(Arg::from) * App::write_help -> &self -> &mut self (#808) * App::gen_completions -> clap_completions::generate * App::gen_completions_to -> clap_completions::generate_to * App::get_matches_safe -> App::try_get_matches (#950 Lib Blitz naming consistency) * App::get_matches_from_safe -> App::try_get_matches_from (#950 Lib Blitz naming consistency) * App::get_matches_safe_borrow -> App::try_get_matches_from_mut (#950 Lib Blitz naming consistency)
This was referenced May 13, 2020
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
(Note: Those who already responded in the PR, need not repeat there answer. I'm simply moving the discussion to allow progress without breaking code 😉)
Proposed Minor Breaking Change in an upcoming release
There is a very minor breaking change that I'd like to make in an upcoming release without bumping the major version. Why is the major version not bumped? The following items:
Details:
App::write_help
would require&mut self
instead of&self
. This allows theApp::write_help
to actually print the true and full help message, which isn't happening currently. That's it.This means if you use
Change your code to:
Note
mut
app.However, if you used
No change is required
A search on github found the following users of said feature. Please respond if you have objections to this release (specifically the change to your code when using
App::write_help
).Relates to #801
The text was updated successfully, but these errors were encountered: