Skip to content

Commit 2f93c17

Browse files
committed
docs: Help migrate with default features
1 parent 3772bdf commit 2f93c17

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

CHANGELOG.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,10 @@ Steps:
125125
2. *If using Builder API*: Explicitly set the `arg.action(ArgAction::...)` on each argument (`StoreValue` for options and `IncOccurrences` for flags)
126126
3. Run `cargo check --features clap/deprecated` and resolve all deprecation warnings
127127
4. Upgrade to v4
128-
5. Resolve compiler errors
129-
6. Resolve behavior changes (see "subtle changes" under BREAKING CHANGES)
130-
7. *At your leisure:* resolve new deprecation notices
128+
5. *If `default-features = false`*, run `cargo add clap -F help,usage,error-context`
129+
6. Resolve compiler errors
130+
7. Resolve behavior changes (see "subtle changes" under BREAKING CHANGES)
131+
8. *At your leisure:* resolve new deprecation notices
131132

132133
Example test (derive):
133134
```rust
@@ -155,7 +156,7 @@ fn verify_cli() {
155156
}
156157
```
157158

158-
Note: the idomatic / recommended way of specifying different types of args in the Builder API has changed:
159+
Note: the idiomatic / recommended way of specifying different types of args in the Builder API has changed:
159160

160161
Before
161162
```rust
@@ -184,7 +185,7 @@ Subtle changes (i.e. compiler won't catch):
184185
- `mut_arg` can no longer be used to customize help and version arguments, instead disable them (`Command::disable_help_flag`, `Command::disable_version_flag`) and provide your own (#4056)
185186
- Removed lifetimes from `Command`, `Arg`, `ArgGroup`, and `PossibleValue`, assuming `'static`. `string` feature flag will enable support for `String`s (#1041, #2150, #4223)
186187
- `arg!(--flag <value>)` is now optional, instead of required. Add `.required(true)` at the end to restore the original behavior (#4206)
187-
- Added default feature flags, `help`, `usage` and `error-context` (#4236)
188+
- Added default feature flags, `help`, `usage` and `error-context`, requiring adding them back in if `default-features = false` (#4236)
188189
- *(parser)* Always fill in `""` argument for external subcommands to make it easier to distinguish them from built-in commands (#3263)
189190
- *(parser)* Short flags now have higher precedence than hyphen values with `Arg::allow_hyphen_values`, to be consistent with `Command::allow_hyphen_values` (#4187)
190191
- *(parser)* `Arg::value_terminator` must be its own argument on the CLI rather than being in a delimited list (#4025)

0 commit comments

Comments
 (0)