Update clap usage in poc and fixture generator
eozturk1 opened this issue · comments
Ercan Ozturk commented
Some functions have been deprecated in clap, we should replace them with the replace their use.
❯ cargo test
warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
package: /Users/eoz/src/Github/novifinancial/akd/akd_client/Cargo.toml
workspace: /Users/eoz/src/Github/novifinancial/akd/Cargo.toml
Compiling akd_test_tools v0.7.0 (/Users/eoz/src/Github/novifinancial/akd/akd_test_tools)
Compiling akd v0.7.0 (/Users/eoz/src/Github/novifinancial/akd/akd)
Compiling akd_mysql v0.7.0 (/Users/eoz/src/Github/novifinancial/akd/akd_mysql)
Compiling akd_client v0.7.0 (/Users/eoz/src/Github/novifinancial/akd/akd_client)
warning: use of deprecated variant `clap::ArgAction::StoreValue`: Replaced with `ArgAction::Set` or `ArgAction::Append`
--> akd_test_tools/src/fixture_generator/parser.rs:55:15
|
55 | parse(try_from_str = parse_user_events),
| ^^^^^^^^^^^^
|
= note: `#[warn(deprecated)]` on by default
warning: use of deprecated variant `clap::ArgAction::StoreValue`: Replaced with `ArgAction::Set` or `ArgAction::Append`
--> akd_test_tools/src/fixture_generator/parser.rs:62:9
|
62 | pub epochs: u32,
| ^^^^^^
warning: use of deprecated variant `clap::ArgAction::StoreValue`: Replaced with `ArgAction::Set` or `ArgAction::Append`
--> akd_test_tools/src/fixture_generator/parser.rs:68:9
|
68 | pub max_updates: u32,
| ^^^^^^^^^^^
warning: use of deprecated variant `clap::ArgAction::StoreValue`: Replaced with `ArgAction::Set` or `ArgAction::Append`
--> akd_test_tools/src/fixture_generator/parser.rs:74:9
|
74 | pub min_updates: u32,
| ^^^^^^^^^^^
warning: use of deprecated variant `clap::ArgAction::StoreValue`: Replaced with `ArgAction::Set` or `ArgAction::Append`
--> akd_test_tools/src/fixture_generator/parser.rs:80:9
|
80 | pub capture_states: Option<Vec<u32>>,
| ^^^^^^^^^^^^^^
warning: use of deprecated variant `clap::ArgAction::StoreValue`: Replaced with `ArgAction::Set` or `ArgAction::Append`
--> akd_test_tools/src/fixture_generator/parser.rs:88:9
|
88 | pub capture_deltas: Option<Vec<u32>>,
| ^^^^^^^^^^^^^^
warning: use of deprecated variant `clap::ArgAction::StoreValue`: Replaced with `ArgAction::Set` or `ArgAction::Append`
--> akd_test_tools/src/fixture_generator/parser.rs:93:9
|
93 | pub out: Option<String>,
| ^^^
warning: use of deprecated associated function `clap::ArgMatches::is_present`: Replaced with either `ArgAction::SetTrue` or `ArgMatches::contains_id(...)`
--> akd_test_tools/src/fixture_generator/parser.rs:100:31
|
100 | pub no_generated_updates: bool,
| ^^^^
warning: use of deprecated associated function `clap::Arg::<'help>::multiple_occurrences`: Replaced with `Arg::action` (Issue #3772)
--> akd_test_tools/src/fixture_generator/parser.rs:57:16
|
57 | pub users: Vec<User>,
| ^^^
warning: use of deprecated associated function `clap::Arg::<'help>::validator`: Replaced with `Arg::value_parser(...)`
--> akd_test_tools/src/fixture_generator/parser.rs:55:30
|
55 | parse(try_from_str = parse_user_events),
| ^^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `clap::Arg::<'help>::multiple_occurrences`: Replaced with `Arg::action` (Issue #3772)
--> akd_test_tools/src/fixture_generator/parser.rs:54:9
|
54 | multiple_occurrences = true,
| ^^^^^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `clap::Arg::<'help>::validator`: Replaced with `Arg::value_parser(...)`
--> akd_test_tools/src/fixture_generator/parser.rs:62:9
|
62 | pub epochs: u32,
| ^^^^^^
warning: use of deprecated associated function `clap::Arg::<'help>::validator`: Replaced with `Arg::value_parser(...)`
--> akd_test_tools/src/fixture_generator/parser.rs:68:9
|
68 | pub max_updates: u32,
| ^^^^^^^^^^^
warning: use of deprecated associated function `clap::Arg::<'help>::validator`: Replaced with `Arg::value_parser(...)`
--> akd_test_tools/src/fixture_generator/parser.rs:74:9
|
74 | pub min_updates: u32,
| ^^^^^^^^^^^
warning: use of deprecated associated function `clap::Arg::<'help>::multiple_occurrences`: Replaced with `Arg::action` (Issue #3772)
--> akd_test_tools/src/fixture_generator/parser.rs:80:25
|
80 | pub capture_states: Option<Vec<u32>>,
| ^^^^^^
warning: use of deprecated associated function `clap::Arg::<'help>::validator`: Replaced with `Arg::value_parser(...)`
--> akd_test_tools/src/fixture_generator/parser.rs:80:9
|
80 | pub capture_states: Option<Vec<u32>>,
| ^^^^^^^^^^^^^^
warning: use of deprecated associated function `clap::Arg::<'help>::multiple_occurrences`: Replaced with `Arg::action` (Issue #3772)
--> akd_test_tools/src/fixture_generator/parser.rs:88:25
|
88 | pub capture_deltas: Option<Vec<u32>>,
| ^^^^^^
warning: use of deprecated associated function `clap::Arg::<'help>::validator`: Replaced with `Arg::value_parser(...)`
--> akd_test_tools/src/fixture_generator/parser.rs:88:9
|
88 | pub capture_deltas: Option<Vec<u32>>,
| ^^^^^^^^^^^^^^
warning: use of deprecated associated function `clap::Arg::<'help>::validator`: Replaced with `Arg::value_parser(...)`
--> akd_test_tools/src/fixture_generator/parser.rs:93:9
|
93 | pub out: Option<String>,
| ^^^
warning: `akd_test_tools` (lib) generated 19 warnings
warning: `akd_test_tools` (lib test) generated 19 warnings (19 duplicates)
Compiling akd_integration_tests v0.0.0 (/Users/eoz/src/Github/novifinancial/akd/integration_tests)
Compiling akd_app v0.0.0 (/Users/eoz/src/Github/novifinancial/akd/poc)
warning: use of deprecated variant `clap::ArgAction::StoreValue`: Replaced with `ArgAction::Set` or `ArgAction::Append`
--> poc/src/main.rs:65:9
|
65 | num_users: u64,
| ^^^^^^^^^
|
= note: `#[warn(deprecated)]` on by default
warning: use of deprecated variant `clap::ArgAction::StoreValue`: Replaced with `ArgAction::Set` or `ArgAction::Append`
--> poc/src/main.rs:66:9
|
66 | num_updates_per_user: u64,
| ^^^^^^^^^^^^^^^^^^^^
warning: use of deprecated variant `clap::ArgAction::StoreValue`: Replaced with `ArgAction::Set` or `ArgAction::Append`
--> poc/src/main.rs:70:9
|
70 | num_users: u64,
| ^^^^^^^^^
warning: use of deprecated variant `clap::ArgAction::StoreValue`: Replaced with `ArgAction::Set` or `ArgAction::Append`
--> poc/src/main.rs:71:9
|
71 | num_lookups_per_user: u64,
| ^^^^^^^^^^^^^^^^^^^^
warning: use of deprecated variant `clap::ArgAction::StoreValue`: Replaced with `ArgAction::Set` or `ArgAction::Append`
--> poc/src/main.rs:74:21
|
74 | BenchDbInsert { num_users: u64 },
| ^^^^^^^^^
warning: use of deprecated variant `clap::ArgAction::StoreValue`: Replaced with `ArgAction::Set` or `ArgAction::Append`
--> poc/src/main.rs:99:5
|
99 | console_debug: PublicLogLevels,
| ^^^^^^^^^^^^^
warning: use of deprecated variant `clap::ArgAction::StoreValue`: Replaced with `ArgAction::Set` or `ArgAction::Append`
--> poc/src/main.rs:110:5
|
110 | mysql_insert_depth: usize,
| ^^^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `clap::Arg::<'help>::validator`: Replaced with `Arg::value_parser(...)`
--> poc/src/main.rs:65:9
|
65 | num_users: u64,
| ^^^^^^^^^
warning: use of deprecated associated function `clap::Arg::<'help>::validator`: Replaced with `Arg::value_parser(...)`
--> poc/src/main.rs:66:9
|
66 | num_updates_per_user: u64,
| ^^^^^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `clap::Arg::<'help>::validator`: Replaced with `Arg::value_parser(...)`
--> poc/src/main.rs:70:9
|
70 | num_users: u64,
| ^^^^^^^^^
warning: use of deprecated associated function `clap::Arg::<'help>::validator`: Replaced with `Arg::value_parser(...)`
--> poc/src/main.rs:71:9
|
71 | num_lookups_per_user: u64,
| ^^^^^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `clap::Arg::<'help>::validator`: Replaced with `Arg::value_parser(...)`
--> poc/src/main.rs:74:21
|
74 | BenchDbInsert { num_users: u64 },
| ^^^^^^^^^
warning: use of deprecated associated function `clap::ArgMatches::is_present`: Replaced with either `ArgAction::SetTrue` or `ArgMatches::contains_id(...)`
--> poc/src/main.rs:85:16
|
85 | memory_db: bool,
| ^^^^
warning: use of deprecated associated function `clap::ArgMatches::is_present`: Replaced with either `ArgAction::SetTrue` or `ArgMatches::contains_id(...)`
--> poc/src/main.rs:89:12
|
89 | debug: bool,
| ^^^^
warning: use of deprecated associated function `clap::Arg::<'help>::possible_values`: Replaced with `Arg::value_parser(PossibleValuesParser::new(...)).takes_value(true)`
--> poc/src/main.rs:99:20
|
99 | console_debug: PublicLogLevels,
| ^^^^^^^^^^^^^^^
warning: use of deprecated associated function `clap::Arg::<'help>::validator`: Replaced with `Arg::value_parser(...)`
--> poc/src/main.rs:110:5
|
110 | mysql_insert_depth: usize,
| ^^^^^^^^^^^^^^^^^^