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

Pin clap to ~3.1 #185

Merged
merged 3 commits into from Jun 13, 2022
Merged

Pin clap to ~3.1 #185

merged 3 commits into from Jun 13, 2022

Conversation

taiki-e
Copy link
Owner

@taiki-e taiki-e commented Jun 13, 2022

Derive macro receives a lot of deprecated warnings.

Refs: clap-rs/clap#3822

@taiki-e
Copy link
Owner Author

taiki-e commented Jun 13, 2022

log
warning: use of deprecated unit variant `clap::ArgAction::StoreValue`: Replaced with `ArgAction::Set` or `ArgAction::Append`
  --> src/cli.rs:74:5
   |
74 | /     /// Test only the specified binary
75 | |     #[clap(
76 | |         long,
77 | |         multiple_occurrences = true,
...  |
81 | |     )]
82 | |     pub(crate) bin: Vec<String>,
   | |_______________________________^
   |
   = note: `#[warn(deprecated)]` on by default

warning: use of deprecated unit variant `clap::ArgAction::StoreValue`: Replaced with `ArgAction::Set` or `ArgAction::Append`
  --> src/cli.rs:86:5
   |
86 | /     /// Test only the specified example
87 | |     #[clap(
88 | |         long,
89 | |         multiple_occurrences = true,
...  |
93 | |     )]
94 | |     pub(crate) example: Vec<String>,
   | |___________________________________^

warning: use of deprecated unit variant `clap::ArgAction::StoreValue`: Replaced with `ArgAction::Set` or `ArgAction::Append`
   --> src/cli.rs:98:5
    |
98  | /     /// Test only the specified test target
99  | |     #[clap(
100 | |         long,
101 | |         multiple_occurrences = true,
...   |
105 | |     )]
106 | |     pub(crate) test: Vec<String>,
    | |________________________________^

warning: use of deprecated unit variant `clap::ArgAction::StoreValue`: Replaced with `ArgAction::Set` or `ArgAction::Append`
   --> src/cli.rs:110:5
    |
110 | /     /// Test only the specified bench target
111 | |     #[clap(
112 | |         long,
113 | |         multiple_occurrences = true,
...   |
117 | |     )]
118 | |     pub(crate) bench: Vec<String>,
    | |_________________________________^

warning: use of deprecated unit variant `clap::ArgAction::StoreValue`: Replaced with `ArgAction::Set` or `ArgAction::Append`
   --> src/cli.rs:131:5
    |
131 | /     /// Package to run tests for
132 | |     // cargo allows the combination of --package and --workspace, but we reject
133 | |     // it because the situation where both flags are specified is odd.
134 | |     #[clap(
...   |
140 | |     )]
141 | |     pub(crate) package: Vec<String>,
    | |___________________________________^

warning: use of deprecated unit variant `clap::ArgAction::StoreValue`: Replaced with `ArgAction::Set` or `ArgAction::Append`
   --> src/cli.rs:145:5
    |
145 | /     /// Exclude packages from both the test and report
146 | |     #[clap(long, multiple_occurrences = true, value_name = "SPEC", requires = "workspace")]
147 | |     pub(crate) exclude: Vec<String>,
    | |___________________________________^

warning: use of deprecated unit variant `clap::ArgAction::StoreValue`: Replaced with `ArgAction::Set` or `ArgAction::Append`
   --> src/cli.rs:148:5
    |
148 | /     /// Exclude packages from the test (but not from the report)
149 | |     #[clap(long, multiple_occurrences = true, value_name = "SPEC", requires = "workspace")]
150 | |     pub(crate) exclude_from_test: Vec<String>,
    | |_____________________________________________^

warning: use of deprecated unit variant `clap::ArgAction::StoreValue`: Replaced with `ArgAction::Set` or `ArgAction::Append`
   --> src/cli.rs:151:5
    |
151 | /     /// Exclude packages from the report (but not from the test)
152 | |     #[clap(long, multiple_occurrences = true, value_name = "SPEC")]
153 | |     pub(crate) exclude_from_report: Vec<String>,
    | |_______________________________________________^

warning: use of deprecated unit variant `clap::ArgAction::StoreValue`: Replaced with `ArgAction::Set` or `ArgAction::Append`
   --> src/cli.rs:161:5
    |
161 | /     /// Unstable (nightly-only) flags to Cargo
162 | |     #[clap(short = 'Z', multiple_occurrences = true, value_name = "FLAG")]
163 | |     pub(crate) unstable_flags: Vec<String>,
    | |__________________________________________^

warning: use of deprecated unit variant `clap::ArgAction::StoreValue`: Replaced with `ArgAction::Set` or `ArgAction::Append`
   --> src/cli.rs:165:5
    |
165 | /     /// Arguments for the test binary
166 | |     #[clap(last = true)]
167 | |     pub(crate) args: Vec<String>,
    | |________________________________^

warning: use of deprecated unit variant `clap::ArgAction::StoreValue`: Replaced with `ArgAction::Set` or `ArgAction::Append`
   --> src/cli.rs:219:9
    |
219 | /         #[clap(multiple_values = true)]
220 | |         passthrough_options: Vec<String>,
    | |________________________________________^

warning: use of deprecated unit variant `clap::ArgAction::StoreValue`: Replaced with `ArgAction::Set` or `ArgAction::Append`
   --> src/cli.rs:280:5
    |
280 | /     /// Specify a file to write coverage data into.
281 | |     ///
282 | |     /// This flag can only be used together with --json, --lcov, or --text.
283 | |     /// See --output-dir for --html and --open.
...   |
290 | |     )]
291 | |     pub(crate) output_path: Option<Utf8PathBuf>,
    | |_______________________________________________^

warning: use of deprecated unit variant `clap::ArgAction::StoreValue`: Replaced with `ArgAction::Set` or `ArgAction::Append`
   --> src/cli.rs:292:5
    |
292 | /     /// Specify a directory to write coverage report into (default to `target/llvm-cov`).
293 | |     ///
294 | |     /// This flag can only be used together with --text, --html, or --open.
295 | |     /// See also --output-path.
...   |
304 | |     )]
305 | |     pub(crate) output_dir: Option<Utf8PathBuf>,
    | |______________________________________________^

warning: use of deprecated unit variant `clap::ArgAction::StoreValue`: Replaced with `ArgAction::Set` or `ArgAction::Append`
   --> src/cli.rs:307:5
    |
307 | /     /// Fail if `any` or `all` profiles cannot be merged (default to `any`)
308 | |     #[clap(long, value_name = "any|all", possible_values(&["any", "all"]), hide_possible_values = true)]
309 | |     pub(crate) failure_mode: Option<String>,
    | |___________________________________________^

warning: use of deprecated unit variant `clap::ArgAction::StoreValue`: Replaced with `ArgAction::Set` or `ArgAction::Append`
   --> src/cli.rs:310:5
    |
310 | /     /// Skip source code files with file paths that match the given regular expression.
311 | |     #[clap(long, value_name = "PATTERN", forbid_empty_values = true)]
312 | |     pub(crate) ignore_filename_regex: Option<String>,
    | |____________________________________________________^

warning: use of deprecated unit variant `clap::ArgAction::StoreValue`: Replaced with `ArgAction::Set` or `ArgAction::Append`
   --> src/cli.rs:328:5
    |
328 | /     /// Exit with a status of 1 if the total line coverage is less than MIN percent.
329 | |     #[clap(long, value_name = "MIN")]
330 | |     pub(crate) fail_under_lines: Option<f64>,
    | |____________________________________________^

warning: use of deprecated unit variant `clap::ArgAction::StoreValue`: Replaced with `ArgAction::Set` or `ArgAction::Append`
   --> src/cli.rs:331:5
    |
331 | /     /// Exit with a status of 1 if the uncovered lines are greater than MAX.
332 | |     #[clap(long, value_name = "MAX")]
333 | |     pub(crate) fail_uncovered_lines: Option<u64>,
    | |________________________________________________^

warning: use of deprecated unit variant `clap::ArgAction::StoreValue`: Replaced with `ArgAction::Set` or `ArgAction::Append`
   --> src/cli.rs:334:5
    |
334 | /     /// Exit with a status of 1 if the uncovered regions are greater than MAX.
335 | |     #[clap(long, value_name = "MAX")]
336 | |     pub(crate) fail_uncovered_regions: Option<u64>,
    | |__________________________________________________^

warning: use of deprecated unit variant `clap::ArgAction::StoreValue`: Replaced with `ArgAction::Set` or `ArgAction::Append`
   --> src/cli.rs:337:5
    |
337 | /     /// Exit with a status of 1 if the uncovered functions are greater than MAX.
338 | |     #[clap(long, value_name = "MAX")]
339 | |     pub(crate) fail_uncovered_functions: Option<u64>,
    | |____________________________________________________^

warning: use of deprecated unit variant `clap::ArgAction::StoreValue`: Replaced with `ArgAction::Set` or `ArgAction::Append`
   --> src/cli.rs:356:5
    |
356 | /     /// Number of parallel jobs, defaults to # of CPUs
357 | |     // Max value is u32::MAX: https://github.com/rust-lang/cargo/blob/0.62.0/src/cargo/util/command_prelude.rs#L356
358 | |     #[clap(short, long, value_name = "N")]
359 | |     pub(crate) jobs: Option<u32>,
    | |________________________________^

warning: use of deprecated unit variant `clap::ArgAction::StoreValue`: Replaced with `ArgAction::Set` or `ArgAction::Append`
   --> src/cli.rs:363:5
    |
363 | /     /// Build artifacts with the specified profile
364 | |     #[clap(long, value_name = "PROFILE-NAME")]
365 | |     pub(crate) profile: Option<String>,
    | |______________________________________^

warning: use of deprecated unit variant `clap::ArgAction::StoreValue`: Replaced with `ArgAction::Set` or `ArgAction::Append`
   --> src/cli.rs:366:5
    |
366 | /     /// Space or comma separated list of features to activate
367 | |     #[clap(short = 'F', long, multiple_occurrences = true, value_name = "FEATURES")]
368 | |     pub(crate) features: Vec<String>,
    | |____________________________________^

warning: use of deprecated unit variant `clap::ArgAction::StoreValue`: Replaced with `ArgAction::Set` or `ArgAction::Append`
   --> src/cli.rs:375:5
    |
375 | /     /// Build for the target triple
376 | |     ///
377 | |     /// When this option is used, coverage for proc-macro and build script will
378 | |     /// not be displayed because cargo does not pass RUSTFLAGS to them.
379 | |     #[clap(long, value_name = "TRIPLE")]
380 | |     pub(crate) target: Option<String>,
    | |_____________________________________^

warning: use of deprecated unit variant `clap::ArgAction::StoreValue`: Replaced with `ArgAction::Set` or `ArgAction::Append`
   --> src/cli.rs:400:5
    |
400 | /     /// Coloring
401 | |     // This flag will be propagated to both cargo and llvm-cov.
402 | |     #[clap(long, arg_enum, value_name = "WHEN")]
403 | |     pub(crate) color: Option<Coloring>,
    | |______________________________________^

warning: use of deprecated unit variant `clap::ArgAction::StoreValue`: Replaced with `ArgAction::Set` or `ArgAction::Append`
   --> src/cli.rs:460:5
    |
460 | /     /// Name of the bin target to run
461 | |     #[clap(long, multiple_occurrences = true, value_name = "NAME")]
462 | |     pub(crate) bin: Vec<String>,
    | |_______________________________^

warning: use of deprecated unit variant `clap::ArgAction::StoreValue`: Replaced with `ArgAction::Set` or `ArgAction::Append`
   --> src/cli.rs:463:5
    |
463 | /     /// Name of the example target to run
464 | |     #[clap(long, multiple_occurrences = true, value_name = "NAME")]
465 | |     pub(crate) example: Vec<String>,
    | |___________________________________^

warning: use of deprecated unit variant `clap::ArgAction::StoreValue`: Replaced with `ArgAction::Set` or `ArgAction::Append`
   --> src/cli.rs:466:5
    |
466 | /     /// Package with the target to run
467 | |     #[clap(short, long, value_name = "SPEC")]
468 | |     pub(crate) package: Option<String>,
    | |______________________________________^

warning: use of deprecated unit variant `clap::ArgAction::StoreValue`: Replaced with `ArgAction::Set` or `ArgAction::Append`
   --> src/cli.rs:476:5
    |
476 | /     /// Unstable (nightly-only) flags to Cargo
477 | |     #[clap(short = 'Z', multiple_occurrences = true, value_name = "FLAG")]
478 | |     pub(crate) unstable_flags: Vec<String>,
    | |__________________________________________^

warning: use of deprecated unit variant `clap::ArgAction::StoreValue`: Replaced with `ArgAction::Set` or `ArgAction::Append`
   --> src/cli.rs:480:5
    |
480 | /     /// Arguments for the test binary
481 | |     #[clap(last = true)]
482 | |     pub(crate) args: Vec<String>,
    | |________________________________^

warning: use of deprecated unit variant `clap::ArgAction::StoreValue`: Replaced with `ArgAction::Set` or `ArgAction::Append`
   --> src/cli.rs:520:5
    |
520 | /     /// Coloring
521 | |     #[clap(long, arg_enum, value_name = "WHEN")]
522 | |     pub(crate) color: Option<Coloring>,
    | |______________________________________^

warning: use of deprecated unit variant `clap::ArgAction::StoreValue`: Replaced with `ArgAction::Set` or `ArgAction::Append`
   --> src/cli.rs:530:5
    |
530 | /     /// Path to Cargo.toml
531 | |     #[clap(long, value_name = "PATH")]
532 | |     pub(crate) manifest_path: Option<Utf8PathBuf>,
    | |_________________________________________________^

warning: use of deprecated associated function `clap::ArgMatches::is_present`: Replaced with either `ArgAction::SetTrue` or `ArgMatches::contains_id(...)`
  --> src/cli.rs:48:26
   |
48 |     pub(crate) doctests: bool,
   |                          ^^^^

warning: use of deprecated associated function `clap::ArgMatches::is_present`: Replaced with either `ArgAction::SetTrue` or `ArgMatches::contains_id(...)`
  --> src/cli.rs:55:24
   |
55 |     pub(crate) no_run: bool,
   |                        ^^^^

warning: use of deprecated associated function `clap::ArgMatches::is_present`: Replaced with either `ArgAction::SetTrue` or `ArgMatches::contains_id(...)`
  --> src/cli.rs:58:30
   |
58 |     pub(crate) no_fail_fast: bool,
   |                              ^^^^

warning: use of deprecated associated function `clap::ArgMatches::is_present`: Replaced with either `ArgAction::SetTrue` or `ArgMatches::contains_id(...)`
  --> src/cli.rs:67:33
   |
67 |     pub(crate) ignore_run_fail: bool,
   |                                 ^^^^

warning: use of deprecated associated function `clap::ArgMatches::is_present`: Replaced with either `ArgAction::SetTrue` or `ArgMatches::contains_id(...)`
  --> src/cli.rs:70:23
   |
70 |     pub(crate) quiet: bool,
   |                       ^^^^

warning: use of deprecated associated function `clap::ArgMatches::is_present`: Replaced with either `ArgAction::SetTrue` or `ArgMatches::contains_id(...)`
  --> src/cli.rs:73:21
   |
73 |     pub(crate) lib: bool,
   |                     ^^^^

warning: use of deprecated associated function `clap::ArgMatches::is_present`: Replaced with either `ArgAction::SetTrue` or `ArgMatches::contains_id(...)`
  --> src/cli.rs:85:22
   |
85 |     pub(crate) bins: bool,
   |                      ^^^^

warning: use of deprecated associated function `clap::ArgMatches::is_present`: Replaced with either `ArgAction::SetTrue` or `ArgMatches::contains_id(...)`
  --> src/cli.rs:97:26
   |
97 |     pub(crate) examples: bool,
   |                          ^^^^

warning: use of deprecated associated function `clap::ArgMatches::is_present`: Replaced with either `ArgAction::SetTrue` or `ArgMatches::contains_id(...)`
   --> src/cli.rs:109:23
    |
109 |     pub(crate) tests: bool,
    |                       ^^^^

warning: use of deprecated associated function `clap::ArgMatches::is_present`: Replaced with either `ArgAction::SetTrue` or `ArgMatches::contains_id(...)`
   --> src/cli.rs:121:25
    |
121 |     pub(crate) benches: bool,
    |                         ^^^^

warning: use of deprecated associated function `clap::ArgMatches::is_present`: Replaced with either `ArgAction::SetTrue` or `ArgMatches::contains_id(...)`
   --> src/cli.rs:124:29
    |
124 |     pub(crate) all_targets: bool,
    |                             ^^^^

warning: use of deprecated associated function `clap::ArgMatches::is_present`: Replaced with either `ArgAction::SetTrue` or `ArgMatches::contains_id(...)`
   --> src/cli.rs:130:21
    |
130 |     pub(crate) doc: bool,
    |                     ^^^^

warning: use of deprecated associated function `clap::ArgMatches::is_present`: Replaced with either `ArgAction::SetTrue` or `ArgMatches::contains_id(...)`
   --> src/cli.rs:144:27
    |
144 |     pub(crate) workspace: bool,
    |                           ^^^^

warning: use of deprecated associated function `clap::Arg::<'help>::multiple_occurrences`: Replaced with `Arg::action` (Issue #3772)
  --> src/cli.rs:82:21
   |
82 |     pub(crate) bin: Vec<String>,
   |                     ^^^^^^^^^^^

warning: use of deprecated associated function `clap::Arg::<'help>::validator`: Replaced with `Arg::value_parser(...)`
  --> src/cli.rs:74:5
   |
74 | /     /// Test only the specified binary
75 | |     #[clap(
76 | |         long,
77 | |         multiple_occurrences = true,
...  |
81 | |     )]
82 | |     pub(crate) bin: Vec<String>,
   | |_______________________________^

warning: use of deprecated associated function `clap::Arg::<'help>::multiple_occurrences`: Replaced with `Arg::action` (Issue #3772)
  --> src/cli.rs:77:9
   |
77 |         multiple_occurrences = true,
   |         ^^^^^^^^^^^^^^^^^^^^

warning: use of deprecated associated function `clap::Arg::<'help>::multiple_occurrences`: Replaced with `Arg::action` (Issue #3772)
  --> src/cli.rs:94:25
   |
94 |     pub(crate) example: Vec<String>,
   |                         ^^^^^^^^^^^

warning: use of deprecated associated function `clap::Arg::<'help>::validator`: Replaced with `Arg::value_parser(...)`
  --> src/cli.rs:86:5
   |
86 | /     /// Test only the specified example
87 | |     #[clap(
88 | |         long,
89 | |         multiple_occurrences = true,
...  |
93 | |     )]
94 | |     pub(crate) example: Vec<String>,
   | |___________________________________^

warning: use of deprecated associated function `clap::Arg::<'help>::multiple_occurrences`: Replaced with `Arg::action` (Issue #3772)
  --> src/cli.rs:89:9
   |
89 |         multiple_occurrences = true,
   |         ^^^^^^^^^^^^^^^^^^^^

warning: use of deprecated associated function `clap::Arg::<'help>::multiple_occurrences`: Replaced with `Arg::action` (Issue #3772)
   --> src/cli.rs:106:22
    |
106 |     pub(crate) test: Vec<String>,
    |                      ^^^^^^^^^^^

warning: use of deprecated associated function `clap::Arg::<'help>::validator`: Replaced with `Arg::value_parser(...)`
   --> src/cli.rs:98:5
    |
98  | /     /// Test only the specified test target
99  | |     #[clap(
100 | |         long,
101 | |         multiple_occurrences = true,
...   |
105 | |     )]
106 | |     pub(crate) test: Vec<String>,
    | |________________________________^

warning: use of deprecated associated function `clap::Arg::<'help>::multiple_occurrences`: Replaced with `Arg::action` (Issue #3772)
   --> src/cli.rs:101:9
    |
101 |         multiple_occurrences = true,
    |         ^^^^^^^^^^^^^^^^^^^^

warning: use of deprecated associated function `clap::Arg::<'help>::multiple_occurrences`: Replaced with `Arg::action` (Issue #3772)
   --> src/cli.rs:118:23
    |
118 |     pub(crate) bench: Vec<String>,
    |                       ^^^^^^^^^^^

warning: use of deprecated associated function `clap::Arg::<'help>::validator`: Replaced with `Arg::value_parser(...)`
   --> src/cli.rs:110:5
    |
110 | /     /// Test only the specified bench target
111 | |     #[clap(
112 | |         long,
113 | |         multiple_occurrences = true,
...   |
117 | |     )]
118 | |     pub(crate) bench: Vec<String>,
    | |_________________________________^

warning: use of deprecated associated function `clap::Arg::<'help>::multiple_occurrences`: Replaced with `Arg::action` (Issue #3772)
   --> src/cli.rs:113:9
    |
113 |         multiple_occurrences = true,
    |         ^^^^^^^^^^^^^^^^^^^^

warning: use of deprecated associated function `clap::Arg::<'help>::multiple_occurrences`: Replaced with `Arg::action` (Issue #3772)
   --> src/cli.rs:141:25
    |
141 |     pub(crate) package: Vec<String>,
    |                         ^^^^^^^^^^^

warning: use of deprecated associated function `clap::Arg::<'help>::validator`: Replaced with `Arg::value_parser(...)`
   --> src/cli.rs:131:5
    |
131 | /     /// Package to run tests for
132 | |     // cargo allows the combination of --package and --workspace, but we reject
133 | |     // it because the situation where both flags are specified is odd.
134 | |     #[clap(
...   |
140 | |     )]
141 | |     pub(crate) package: Vec<String>,
    | |___________________________________^

warning: use of deprecated associated function `clap::Arg::<'help>::multiple_occurrences`: Replaced with `Arg::action` (Issue #3772)
   --> src/cli.rs:137:9
    |
137 |         multiple_occurrences = true,
    |         ^^^^^^^^^^^^^^^^^^^^

warning: use of deprecated associated function `clap::Arg::<'help>::multiple_occurrences`: Replaced with `Arg::action` (Issue #3772)
   --> src/cli.rs:147:25
    |
147 |     pub(crate) exclude: Vec<String>,
    |                         ^^^^^^^^^^^

warning: use of deprecated associated function `clap::Arg::<'help>::validator`: Replaced with `Arg::value_parser(...)`
   --> src/cli.rs:145:5
    |
145 | /     /// Exclude packages from both the test and report
146 | |     #[clap(long, multiple_occurrences = true, value_name = "SPEC", requires = "workspace")]
147 | |     pub(crate) exclude: Vec<String>,
    | |___________________________________^

warning: use of deprecated associated function `clap::Arg::<'help>::multiple_occurrences`: Replaced with `Arg::action` (Issue #3772)
   --> src/cli.rs:146:18
    |
146 |     #[clap(long, multiple_occurrences = true, value_name = "SPEC", requires = "workspace")]
    |                  ^^^^^^^^^^^^^^^^^^^^

warning: use of deprecated associated function `clap::Arg::<'help>::multiple_occurrences`: Replaced with `Arg::action` (Issue #3772)
   --> src/cli.rs:150:35
    |
150 |     pub(crate) exclude_from_test: Vec<String>,
    |                                   ^^^^^^^^^^^

warning: use of deprecated associated function `clap::Arg::<'help>::validator`: Replaced with `Arg::value_parser(...)`
   --> src/cli.rs:148:5
    |
148 | /     /// Exclude packages from the test (but not from the report)
149 | |     #[clap(long, multiple_occurrences = true, value_name = "SPEC", requires = "workspace")]
150 | |     pub(crate) exclude_from_test: Vec<String>,
    | |_____________________________________________^

warning: use of deprecated associated function `clap::Arg::<'help>::multiple_occurrences`: Replaced with `Arg::action` (Issue #3772)
   --> src/cli.rs:149:18
    |
149 |     #[clap(long, multiple_occurrences = true, value_name = "SPEC", requires = "workspace")]
    |                  ^^^^^^^^^^^^^^^^^^^^

warning: use of deprecated associated function `clap::Arg::<'help>::multiple_occurrences`: Replaced with `Arg::action` (Issue #3772)
   --> src/cli.rs:153:37
    |
153 |     pub(crate) exclude_from_report: Vec<String>,
    |                                     ^^^^^^^^^^^

warning: use of deprecated associated function `clap::Arg::<'help>::validator`: Replaced with `Arg::value_parser(...)`
   --> src/cli.rs:151:5
    |
151 | /     /// Exclude packages from the report (but not from the test)
152 | |     #[clap(long, multiple_occurrences = true, value_name = "SPEC")]
153 | |     pub(crate) exclude_from_report: Vec<String>,
    | |_______________________________________________^

warning: use of deprecated associated function `clap::Arg::<'help>::multiple_occurrences`: Replaced with `Arg::action` (Issue #3772)
   --> src/cli.rs:152:18
    |
152 |     #[clap(long, multiple_occurrences = true, value_name = "SPEC")]
    |                  ^^^^^^^^^^^^^^^^^^^^

warning: use of deprecated associated function `clap::Arg::<'help>::multiple_occurrences`: Replaced with `Arg::action` (Issue #3772)
   --> src/cli.rs:163:32
    |
163 |     pub(crate) unstable_flags: Vec<String>,
    |                                ^^^^^^^^^^^

warning: use of deprecated associated function `clap::Arg::<'help>::validator`: Replaced with `Arg::value_parser(...)`
   --> src/cli.rs:161:5
    |
161 | /     /// Unstable (nightly-only) flags to Cargo
162 | |     #[clap(short = 'Z', multiple_occurrences = true, value_name = "FLAG")]
163 | |     pub(crate) unstable_flags: Vec<String>,
    | |__________________________________________^

warning: use of deprecated associated function `clap::Arg::<'help>::multiple_occurrences`: Replaced with `Arg::action` (Issue #3772)
   --> src/cli.rs:162:25
    |
162 |     #[clap(short = 'Z', multiple_occurrences = true, value_name = "FLAG")]
    |                         ^^^^^^^^^^^^^^^^^^^^

warning: use of deprecated associated function `clap::Arg::<'help>::multiple_occurrences`: Replaced with `Arg::action` (Issue #3772)
   --> src/cli.rs:167:22
    |
167 |     pub(crate) args: Vec<String>,
    |                      ^^^^^^^^^^^

warning: use of deprecated associated function `clap::Arg::<'help>::validator`: Replaced with `Arg::value_parser(...)`
   --> src/cli.rs:165:5
    |
165 | /     /// Arguments for the test binary
166 | |     #[clap(last = true)]
167 | |     pub(crate) args: Vec<String>,
    | |________________________________^

warning: use of deprecated associated function `clap::Arg::<'help>::multiple_occurrences`: Replaced with `Arg::action` (Issue #3772)
   --> src/cli.rs:220:30
    |
220 |         passthrough_options: Vec<String>,
    |                              ^^^^^^^^^^^

warning: use of deprecated associated function `clap::Arg::<'help>::validator`: Replaced with `Arg::value_parser(...)`
   --> src/cli.rs:219:9
    |
219 | /         #[clap(multiple_values = true)]
220 | |         passthrough_options: Vec<String>,
    | |________________________________________^

warning: use of deprecated associated function `clap::ArgMatches::is_present`: Replaced with either `ArgAction::SetTrue` or `ArgMatches::contains_id(...)`
   --> src/cli.rs:242:22
    |
242 |     pub(crate) json: bool,
    |                      ^^^^

warning: use of deprecated associated function `clap::ArgMatches::is_present`: Replaced with either `ArgAction::SetTrue` or `ArgMatches::contains_id(...)`
   --> src/cli.rs:250:22
    |
250 |     pub(crate) lcov: bool,
    |                      ^^^^

warning: use of deprecated associated function `clap::ArgMatches::is_present`: Replaced with either `ArgAction::SetTrue` or `ArgMatches::contains_id(...)`
   --> src/cli.rs:259:22
    |
259 |     pub(crate) text: bool,
    |                      ^^^^

warning: use of deprecated associated function `clap::ArgMatches::is_present`: Replaced with either `ArgAction::SetTrue` or `ArgMatches::contains_id(...)`
   --> src/cli.rs:267:22
    |
267 |     pub(crate) html: bool,
    |                      ^^^^

warning: use of deprecated associated function `clap::ArgMatches::is_present`: Replaced with either `ArgAction::SetTrue` or `ArgMatches::contains_id(...)`
   --> src/cli.rs:272:22
    |
272 |     pub(crate) open: bool,
    |                      ^^^^

warning: use of deprecated associated function `clap::ArgMatches::is_present`: Replaced with either `ArgAction::SetTrue` or `ArgMatches::contains_id(...)`
   --> src/cli.rs:279:30
    |
279 |     pub(crate) summary_only: bool,
    |                              ^^^^

warning: use of deprecated associated function `clap::ArgMatches::is_present`: Replaced with either `ArgAction::SetTrue` or `ArgMatches::contains_id(...)`
   --> src/cli.rs:315:55
    |
315 |     pub(crate) disable_default_ignore_filename_regex: bool,
    |                                                       ^^^^

warning: use of deprecated associated function `clap::ArgMatches::is_present`: Replaced with either `ArgAction::SetTrue` or `ArgMatches::contains_id(...)`
   --> src/cli.rs:318:37
    |
318 |     pub(crate) hide_instantiations: bool,
    |                                     ^^^^

warning: use of deprecated associated function `clap::ArgMatches::is_present`: Replaced with either `ArgAction::SetTrue` or `ArgMatches::contains_id(...)`
   --> src/cli.rs:321:33
    |
321 |     pub(crate) no_cfg_coverage: bool,
    |                                 ^^^^

warning: use of deprecated associated function `clap::ArgMatches::is_present`: Replaced with either `ArgAction::SetTrue` or `ArgMatches::contains_id(...)`
   --> src/cli.rs:324:41
    |
324 |     pub(crate) no_cfg_coverage_nightly: bool,
    |                                         ^^^^

warning: use of deprecated associated function `clap::ArgMatches::is_present`: Replaced with either `ArgAction::SetTrue` or `ArgMatches::contains_id(...)`
   --> src/cli.rs:327:27
    |
327 |     pub(crate) no_report: bool,
    |                           ^^^^

warning: use of deprecated associated function `clap::ArgMatches::is_present`: Replaced with either `ArgAction::SetTrue` or `ArgMatches::contains_id(...)`
   --> src/cli.rs:342:36
    |
342 |     pub(crate) show_missing_lines: bool,
    |                                    ^^^^

warning: use of deprecated associated function `clap::ArgMatches::is_present`: Replaced with either `ArgAction::SetTrue` or `ArgMatches::contains_id(...)`
   --> src/cli.rs:345:38
    |
345 |     pub(crate) include_build_script: bool,
    |                                      ^^^^

warning: use of deprecated associated function `clap::Arg::<'help>::validator`: Replaced with `Arg::value_parser(...)`
   --> src/cli.rs:280:5
    |
280 | /     /// Specify a file to write coverage data into.
281 | |     ///
282 | |     /// This flag can only be used together with --json, --lcov, or --text.
283 | |     /// See --output-dir for --html and --open.
...   |
290 | |     )]
291 | |     pub(crate) output_path: Option<Utf8PathBuf>,
    | |_______________________________________________^

warning: use of deprecated associated function `clap::Arg::<'help>::forbid_empty_values`: Replaced with `Arg::value_parser(NonEmptyStringValueParser::new())`
   --> src/cli.rs:289:9
    |
289 |         forbid_empty_values = true
    |         ^^^^^^^^^^^^^^^^^^^

warning: use of deprecated associated function `clap::Arg::<'help>::validator`: Replaced with `Arg::value_parser(...)`
   --> src/cli.rs:292:5
    |
292 | /     /// Specify a directory to write coverage report into (default to `target/llvm-cov`).
293 | |     ///
294 | |     /// This flag can only be used together with --text, --html, or --open.
295 | |     /// See also --output-path.
...   |
304 | |     )]
305 | |     pub(crate) output_dir: Option<Utf8PathBuf>,
    | |______________________________________________^

warning: use of deprecated associated function `clap::Arg::<'help>::forbid_empty_values`: Replaced with `Arg::value_parser(NonEmptyStringValueParser::new())`
   --> src/cli.rs:303:9
    |
303 |         forbid_empty_values = true
    |         ^^^^^^^^^^^^^^^^^^^

warning: use of deprecated associated function `clap::Arg::<'help>::validator`: Replaced with `Arg::value_parser(...)`
   --> src/cli.rs:307:5
    |
307 | /     /// Fail if `any` or `all` profiles cannot be merged (default to `any`)
308 | |     #[clap(long, value_name = "any|all", possible_values(&["any", "all"]), hide_possible_values = true)]
309 | |     pub(crate) failure_mode: Option<String>,
    | |___________________________________________^

warning: use of deprecated associated function `clap::Arg::<'help>::possible_values`: Replaced with `Arg::value_parser(PossibleValuesParser::new(...)).takes_value(true)`
   --> src/cli.rs:308:42
    |
308 |     #[clap(long, value_name = "any|all", possible_values(&["any", "all"]), hide_possible_values = true)]
    |                                          ^^^^^^^^^^^^^^^

warning: use of deprecated associated function `clap::Arg::<'help>::validator`: Replaced with `Arg::value_parser(...)`
   --> src/cli.rs:310:5
    |
310 | /     /// Skip source code files with file paths that match the given regular expression.
311 | |     #[clap(long, value_name = "PATTERN", forbid_empty_values = true)]
312 | |     pub(crate) ignore_filename_regex: Option<String>,
    | |____________________________________________________^

warning: use of deprecated associated function `clap::Arg::<'help>::forbid_empty_values`: Replaced with `Arg::value_parser(NonEmptyStringValueParser::new())`
   --> src/cli.rs:311:42
    |
311 |     #[clap(long, value_name = "PATTERN", forbid_empty_values = true)]
    |                                          ^^^^^^^^^^^^^^^^^^^

warning: use of deprecated associated function `clap::Arg::<'help>::validator`: Replaced with `Arg::value_parser(...)`
   --> src/cli.rs:328:5
    |
328 | /     /// Exit with a status of 1 if the total line coverage is less than MIN percent.
329 | |     #[clap(long, value_name = "MIN")]
330 | |     pub(crate) fail_under_lines: Option<f64>,
    | |____________________________________________^

warning: use of deprecated associated function `clap::Arg::<'help>::validator`: Replaced with `Arg::value_parser(...)`
   --> src/cli.rs:331:5
    |
331 | /     /// Exit with a status of 1 if the uncovered lines are greater than MAX.
332 | |     #[clap(long, value_name = "MAX")]
333 | |     pub(crate) fail_uncovered_lines: Option<u64>,
    | |________________________________________________^

warning: use of deprecated associated function `clap::Arg::<'help>::validator`: Replaced with `Arg::value_parser(...)`
   --> src/cli.rs:334:5
    |
334 | /     /// Exit with a status of 1 if the uncovered regions are greater than MAX.
335 | |     #[clap(long, value_name = "MAX")]
336 | |     pub(crate) fail_uncovered_regions: Option<u64>,
    | |__________________________________________________^

warning: use of deprecated associated function `clap::Arg::<'help>::validator`: Replaced with `Arg::value_parser(...)`
   --> src/cli.rs:337:5
    |
337 | /     /// Exit with a status of 1 if the uncovered functions are greater than MAX.
338 | |     #[clap(long, value_name = "MAX")]
339 | |     pub(crate) fail_uncovered_functions: Option<u64>,
    | |____________________________________________________^

warning: use of deprecated associated function `clap::ArgMatches::is_present`: Replaced with either `ArgAction::SetTrue` or `ArgMatches::contains_id(...)`
   --> src/cli.rs:362:25
    |
362 |     pub(crate) release: bool,
    |                         ^^^^

warning: use of deprecated associated function `clap::ArgMatches::is_present`: Replaced with either `ArgAction::SetTrue` or `ArgMatches::contains_id(...)`
   --> src/cli.rs:371:30
    |
371 |     pub(crate) all_features: bool,
    |                              ^^^^

warning: use of deprecated associated function `clap::ArgMatches::is_present`: Replaced with either `ArgAction::SetTrue` or `ArgMatches::contains_id(...)`
   --> src/cli.rs:374:37
    |
374 |     pub(crate) no_default_features: bool,
    |                                     ^^^^

warning: use of deprecated associated function `clap::ArgMatches::is_present`: Replaced with either `ArgAction::SetTrue` or `ArgMatches::contains_id(...)`
   --> src/cli.rs:388:38
    |
388 |     pub(crate) coverage_target_only: bool,
    |                                      ^^^^

warning: use of deprecated associated function `clap::ArgMatches::occurrences_of`: Replaced with either `ArgAction::Count` or `ArgMatches::get_many(...).len()`
   --> src/cli.rs:398:31
    |
398 |     #[clap(short, long, parse(from_occurrences))]
    |                               ^^^^^^^^^^^^^^^^

warning: use of deprecated associated function `clap::ArgMatches::is_present`: Replaced with either `ArgAction::SetTrue` or `ArgMatches::contains_id(...)`
   --> src/cli.rs:409:35
    |
409 |     pub(crate) remap_path_prefix: bool,
    |                                   ^^^^

warning: use of deprecated associated function `clap::Arg::<'help>::validator`: Replaced with `Arg::value_parser(...)`
   --> src/cli.rs:356:5
    |
356 | /     /// Number of parallel jobs, defaults to # of CPUs
357 | |     // Max value is u32::MAX: https://github.com/rust-lang/cargo/blob/0.62.0/src/cargo/util/command_prelude.rs#L356
358 | |     #[clap(short, long, value_name = "N")]
359 | |     pub(crate) jobs: Option<u32>,
    | |________________________________^

warning: use of deprecated associated function `clap::Arg::<'help>::validator`: Replaced with `Arg::value_parser(...)`
   --> src/cli.rs:363:5
    |
363 | /     /// Build artifacts with the specified profile
364 | |     #[clap(long, value_name = "PROFILE-NAME")]
365 | |     pub(crate) profile: Option<String>,
    | |______________________________________^

warning: use of deprecated associated function `clap::Arg::<'help>::multiple_occurrences`: Replaced with `Arg::action` (Issue #3772)
   --> src/cli.rs:368:26
    |
368 |     pub(crate) features: Vec<String>,
    |                          ^^^^^^^^^^^

warning: use of deprecated associated function `clap::Arg::<'help>::validator`: Replaced with `Arg::value_parser(...)`
   --> src/cli.rs:366:5
    |
366 | /     /// Space or comma separated list of features to activate
367 | |     #[clap(short = 'F', long, multiple_occurrences = true, value_name = "FEATURES")]
368 | |     pub(crate) features: Vec<String>,
    | |____________________________________^

warning: use of deprecated associated function `clap::Arg::<'help>::multiple_occurrences`: Replaced with `Arg::action` (Issue #3772)
   --> src/cli.rs:367:31
    |
367 |     #[clap(short = 'F', long, multiple_occurrences = true, value_name = "FEATURES")]
    |                               ^^^^^^^^^^^^^^^^^^^^

warning: use of deprecated associated function `clap::Arg::<'help>::validator`: Replaced with `Arg::value_parser(...)`
   --> src/cli.rs:375:5
    |
375 | /     /// Build for the target triple
376 | |     ///
377 | |     /// When this option is used, coverage for proc-macro and build script will
378 | |     /// not be displayed because cargo does not pass RUSTFLAGS to them.
379 | |     #[clap(long, value_name = "TRIPLE")]
380 | |     pub(crate) target: Option<String>,
    | |_____________________________________^

warning: use of deprecated associated function `clap::Arg::<'help>::multiple_occurrences`: Replaced with `Arg::action` (Issue #3772)
   --> src/cli.rs:399:25
    |
399 |     pub(crate) verbose: u8,
    |                         ^^

warning: use of deprecated associated function `clap::Arg::<'help>::possible_values`: Replaced with `Arg::value_parser(PossibleValuesParser::new(...)).takes_value(true)`
   --> src/cli.rs:403:30
    |
403 |     pub(crate) color: Option<Coloring>,
    |                              ^^^^^^^^

warning: use of deprecated associated function `clap::ArgMatches::is_present`: Replaced with either `ArgAction::SetTrue` or `ArgMatches::contains_id(...)`
   --> src/cli.rs:459:23
    |
459 |     pub(crate) quiet: bool,
    |                       ^^^^

warning: use of deprecated associated function `clap::Arg::<'help>::multiple_occurrences`: Replaced with `Arg::action` (Issue #3772)
   --> src/cli.rs:462:21
    |
462 |     pub(crate) bin: Vec<String>,
    |                     ^^^^^^^^^^^

warning: use of deprecated associated function `clap::Arg::<'help>::validator`: Replaced with `Arg::value_parser(...)`
   --> src/cli.rs:460:5
    |
460 | /     /// Name of the bin target to run
461 | |     #[clap(long, multiple_occurrences = true, value_name = "NAME")]
462 | |     pub(crate) bin: Vec<String>,
    | |_______________________________^

warning: use of deprecated associated function `clap::Arg::<'help>::multiple_occurrences`: Replaced with `Arg::action` (Issue #3772)
   --> src/cli.rs:461:18
    |
461 |     #[clap(long, multiple_occurrences = true, value_name = "NAME")]
    |                  ^^^^^^^^^^^^^^^^^^^^

warning: use of deprecated associated function `clap::Arg::<'help>::multiple_occurrences`: Replaced with `Arg::action` (Issue #3772)
   --> src/cli.rs:465:25
    |
465 |     pub(crate) example: Vec<String>,
    |                         ^^^^^^^^^^^

warning: use of deprecated associated function `clap::Arg::<'help>::validator`: Replaced with `Arg::value_parser(...)`
   --> src/cli.rs:463:5
    |
463 | /     /// Name of the example target to run
464 | |     #[clap(long, multiple_occurrences = true, value_name = "NAME")]
465 | |     pub(crate) example: Vec<String>,
    | |___________________________________^

warning: use of deprecated associated function `clap::Arg::<'help>::multiple_occurrences`: Replaced with `Arg::action` (Issue #3772)
   --> src/cli.rs:464:18
    |
464 |     #[clap(long, multiple_occurrences = true, value_name = "NAME")]
    |                  ^^^^^^^^^^^^^^^^^^^^

warning: use of deprecated associated function `clap::Arg::<'help>::validator`: Replaced with `Arg::value_parser(...)`
   --> src/cli.rs:466:5
    |
466 | /     /// Package with the target to run
467 | |     #[clap(short, long, value_name = "SPEC")]
468 | |     pub(crate) package: Option<String>,
    | |______________________________________^

warning: use of deprecated associated function `clap::Arg::<'help>::multiple_occurrences`: Replaced with `Arg::action` (Issue #3772)
   --> src/cli.rs:478:32
    |
478 |     pub(crate) unstable_flags: Vec<String>,
    |                                ^^^^^^^^^^^

warning: use of deprecated associated function `clap::Arg::<'help>::validator`: Replaced with `Arg::value_parser(...)`
   --> src/cli.rs:476:5
    |
476 | /     /// Unstable (nightly-only) flags to Cargo
477 | |     #[clap(short = 'Z', multiple_occurrences = true, value_name = "FLAG")]
478 | |     pub(crate) unstable_flags: Vec<String>,
    | |__________________________________________^

warning: use of deprecated associated function `clap::Arg::<'help>::multiple_occurrences`: Replaced with `Arg::action` (Issue #3772)
   --> src/cli.rs:477:25
    |
477 |     #[clap(short = 'Z', multiple_occurrences = true, value_name = "FLAG")]
    |                         ^^^^^^^^^^^^^^^^^^^^

warning: use of deprecated associated function `clap::Arg::<'help>::multiple_occurrences`: Replaced with `Arg::action` (Issue #3772)
   --> src/cli.rs:482:22
    |
482 |     pub(crate) args: Vec<String>,
    |                      ^^^^^^^^^^^

warning: use of deprecated associated function `clap::Arg::<'help>::validator`: Replaced with `Arg::value_parser(...)`
   --> src/cli.rs:480:5
    |
480 | /     /// Arguments for the test binary
481 | |     #[clap(last = true)]
482 | |     pub(crate) args: Vec<String>,
    | |________________________________^

warning: use of deprecated associated function `clap::ArgMatches::is_present`: Replaced with either `ArgAction::SetTrue` or `ArgMatches::contains_id(...)`
   --> src/cli.rs:503:31
    |
503 |     pub(crate) export_prefix: bool,
    |                               ^^^^

warning: use of deprecated associated function `clap::ArgMatches::is_present`: Replaced with either `ArgAction::SetTrue` or `ArgMatches::contains_id(...)`
   --> src/cli.rs:510:27
    |
510 |     pub(crate) workspace: bool,
    |                           ^^^^

warning: use of deprecated associated function `clap::ArgMatches::occurrences_of`: Replaced with either `ArgAction::Count` or `ArgMatches::get_many(...).len()`
   --> src/cli.rs:518:31
    |
518 |     #[clap(short, long, parse(from_occurrences))]
    |                               ^^^^^^^^^^^^^^^^

warning: use of deprecated associated function `clap::Arg::<'help>::multiple_occurrences`: Replaced with `Arg::action` (Issue #3772)
   --> src/cli.rs:519:25
    |
519 |     pub(crate) verbose: u8,
    |                         ^^

warning: use of deprecated associated function `clap::Arg::<'help>::possible_values`: Replaced with `Arg::value_parser(PossibleValuesParser::new(...)).takes_value(true)`
   --> src/cli.rs:522:30
    |
522 |     pub(crate) color: Option<Coloring>,
    |                              ^^^^^^^^

warning: use of deprecated associated function `clap::ArgMatches::is_present`: Replaced with either `ArgAction::SetTrue` or `ArgMatches::contains_id(...)`
   --> src/cli.rs:535:24
    |
535 |     pub(crate) frozen: bool,
    |                        ^^^^

warning: use of deprecated associated function `clap::ArgMatches::is_present`: Replaced with either `ArgAction::SetTrue` or `ArgMatches::contains_id(...)`
   --> src/cli.rs:538:24
    |
538 |     pub(crate) locked: bool,
    |                        ^^^^

warning: use of deprecated associated function `clap::ArgMatches::is_present`: Replaced with either `ArgAction::SetTrue` or `ArgMatches::contains_id(...)`
   --> src/cli.rs:541:25
    |
541 |     pub(crate) offline: bool,
    |                         ^^^^

warning: use of deprecated associated function `clap::Arg::<'help>::validator`: Replaced with `Arg::value_parser(...)`
   --> src/cli.rs:530:5
    |
530 | /     /// Path to Cargo.toml
531 | |     #[clap(long, value_name = "PATH")]
532 | |     pub(crate) manifest_path: Option<Utf8PathBuf>,
    | |_________________________________________________^

warning: `cargo-llvm-cov` (bin "cargo-llvm-cov") generated 136 warnings

```
error: failed to download `clap_lex v0.2.2`

Caused by:
  unable to get packages from source

Caused by:
  failed to parse manifest at `/home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/clap_lex-0.2.2/Cargo.toml`

Caused by:
  feature `edition2021` is required

  this Cargo does not support nightly features, but if you
  switch to nightly channel you can add
  `cargo-features = ["edition2021"]` to enable this feature
```
@taiki-e
Copy link
Owner Author

taiki-e commented Jun 13, 2022

bors r+

@bors
Copy link
Contributor

bors bot commented Jun 13, 2022

Build succeeded:

@bors bors bot merged commit 97d167b into main Jun 13, 2022
@bors bors bot deleted the clap branch June 13, 2022 15:28
@@ -28,7 +28,7 @@ anyhow = "1.0.34"
atty = "0.2.11"
camino = "1.0.3"
cargo_metadata = "0.14"
clap = { version = "3.1", features = ["derive"] }
clap = { version = "~3.1", features = ["derive"] } # https://github.com/clap-rs/clap/issues/3822
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can now be reverted as deprecations are now off by default, see clap-rs/clap#3830 for details. When you do start working through the deprecations as part of upgrading to 4.0, we've also improved the warnings for derive users. See clap-rs/clap#3832 for examples.

btw is there a reason this project doesn't check-in the Cargo.lock? Generally, it is recommended to do so for programs and that would have prevented the unintended upgrade rather than needing to pin the dependency.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can now be reverted as deprecations are now off by default, see clap-rs/clap#3830 for details. When you do start working through the deprecations as part of upgrading to 4.0, we've also improved the warnings for derive users. See clap-rs/clap#3832 for examples.

Nice! Thanks for working on this problem!

btw is there a reason this project doesn't check-in the Cargo.lock? Generally, it is recommended to do so for programs and that would have prevented the unintended upgrade rather than needing to pin the dependency.

This is intentional. See #152 (comment) for details.

@taiki-e taiki-e mentioned this pull request Jun 15, 2022
bors bot added a commit that referenced this pull request Jun 15, 2022
187: Unpin clap version r=taiki-e a=taiki-e

See #185 (comment)

Co-authored-by: Taiki Endo <te316e89@gmail.com>
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.

None yet

2 participants