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

All these clap::Parser warnings in the layout21converters CLIs #34

Closed
dan-fritchman opened this issue Dec 15, 2022 · 2 comments
Closed

Comments

@dan-fritchman
Copy link
Owner

It seems they really really want us to update usage of many of these Parser fields:

warning: use of deprecated unit variant `clap::ArgAction::StoreValue`: Replaced with `ArgAction::Set` or `ArgAction::Append`
  --> layout21converters/src/gds2ser.rs:18:5
   |
18 |     gds: String,
   |     ^^^
   |
   = note: `#[warn(deprecated)]` on by default

warning: use of deprecated unit variant `clap::ArgAction::StoreValue`: Replaced with `ArgAction::Set` or `ArgAction::Append`
  --> layout21converters/src/gds2ser.rs:21:5
   |
21 |     fmt: String,
   |     ^^^

warning: use of deprecated unit variant `clap::ArgAction::StoreValue`: Replaced with `ArgAction::Set` or `ArgAction::Append`
  --> layout21converters/src/gds2ser.rs:24:5
   |
24 |     out: String,
   |     ^^^

warning: use of deprecated associated function `clap::ArgMatches::is_present`: Replaced with either `ArgAction::SetTrue` or `ArgMatches::contains_id(...)`
  --> layout21converters/src/gds2ser.rs:27:14
   |
27 |     verbose: bool,
   |              ^^^^

warning: use of deprecated associated function `clap::Arg::<'help>::validator`: Replaced with `Arg::value_parser(...)`
  --> layout21converters/src/gds2ser.rs:18:5
   |
18 |     gds: String,
   |     ^^^

warning: use of deprecated associated function `clap::Arg::<'help>::validator`: Replaced with `Arg::value_parser(...)`
  --> layout21converters/src/gds2ser.rs:21:5
   |
21 |     fmt: String,
   |     ^^^

warning: use of deprecated associated function `clap::Arg::<'help>::validator`: Replaced with `Arg::value_parser(...)`
  --> layout21converters/src/gds2ser.rs:24:5
   |
24 |     out: String,
   |     ^^^

warning: function `main` is never used
  --> layout21converters/src/gds2ser.rs:30:4
   |
30 | fn main() -> Result<(), Box<dyn Error>> {
   |    ^^^^
   |
   = note: `#[warn(dead_code)]` on by default

warning: function `parse_format` is never used
  --> layout21converters/src/gds2ser.rs:37:4
   |
37 | fn parse_format(format: &str) -> Result<SerializationFormat, Box<dyn Error>> {
   |    ^^^^^^^^^^^^

   Compiling layout21converters v0.2.1 (/Users/dan/dev/Vlsir/Layout21/layout21converters)
warning: `layout21converters` (lib) generated 9 warnings
warning: use of deprecated unit variant `clap::ArgAction::StoreValue`: Replaced with `ArgAction::Set` or `ArgAction::Append`
  --> layout21converters/src/lef2yaml.rs:16:5
   |
16 |     lef: String,
   |     ^^^
   |
   = note: `#[warn(deprecated)]` on by default

warning: use of deprecated unit variant `clap::ArgAction::StoreValue`: Replaced with `ArgAction::Set` or `ArgAction::Append`
  --> layout21converters/src/lef2yaml.rs:19:5
   |
19 |     yaml: String,
   |     ^^^^

warning: use of deprecated unit variant `clap::ArgAction::StoreValue`: Replaced with `ArgAction::Set` or `ArgAction::Append`
  --> layout21converters/src/proto2gds.rs:18:5
   |
18 |     proto: String,
   |     ^^^^^
   |
   = note: `#[warn(deprecated)]` on by default

warning: use of deprecated unit variant `clap::ArgAction::StoreValue`: Replaced with `ArgAction::Set` or `ArgAction::Append`
  --> layout21converters/src/gds2proto.rs:17:5
   |
17 |     gds: String,
   |     ^^^
   |
   = note: `#[warn(deprecated)]` on by default

warning: use of deprecated unit variant `clap::ArgAction::StoreValue`: Replaced with `ArgAction::Set` or `ArgAction::Append`
  --> layout21converters/src/proto2gds.rs:20:5
   |
20 |     gds: String,
   |     ^^^

warning: use of deprecated unit variant `clap::ArgAction::StoreValue`: Replaced with `ArgAction::Set` or `ArgAction::Append`
  --> layout21converters/src/proto2gds.rs:22:5
   |
22 |     tech: String,
   |     ^^^^

warning: use of deprecated unit variant `clap::ArgAction::StoreValue`: Replaced with `ArgAction::Set` or `ArgAction::Append`
  --> layout21converters/src/gds2proto.rs:20:5
   |
20 |     proto: String,
   |     ^^^^^

warning: use of deprecated associated function `clap::ArgMatches::is_present`: Replaced with either `ArgAction::SetTrue` or `ArgMatches::contains_id(...)`
  --> layout21converters/src/lef2yaml.rs:22:14
   |
22 |     verbose: bool,
   |              ^^^^

warning: use of deprecated associated function `clap::Arg::<'help>::validator`: Replaced with `Arg::value_parser(...)`
  --> layout21converters/src/lef2yaml.rs:16:5
   |
16 |     lef: String,
   |     ^^^

warning: use of deprecated associated function `clap::Arg::<'help>::validator`: Replaced with `Arg::value_parser(...)`
  --> layout21converters/src/lef2yaml.rs:19:5
   |
19 |     yaml: String,
   |     ^^^^

warning: use of deprecated associated function `clap::ArgMatches::is_present`: Replaced with either `ArgAction::SetTrue` or `ArgMatches::contains_id(...)`
  --> layout21converters/src/proto2gds.rs:24:14
   |
24 |     verbose: bool,
   |              ^^^^

warning: use of deprecated associated function `clap::ArgMatches::is_present`: Replaced with either `ArgAction::SetTrue` or `ArgMatches::contains_id(...)`
  --> layout21converters/src/gds2proto.rs:23:14
   |
23 |     verbose: bool,
   |              ^^^^

warning: use of deprecated associated function `clap::Arg::<'help>::validator`: Replaced with `Arg::value_parser(...)`
  --> layout21converters/src/proto2gds.rs:18:5
   |
18 |     proto: String,
   |     ^^^^^

warning: use of deprecated associated function `clap::Arg::<'help>::validator`: Replaced with `Arg::value_parser(...)`
  --> layout21converters/src/proto2gds.rs:20:5
   |
20 |     gds: String,
   |     ^^^

warning: use of deprecated associated function `clap::Arg::<'help>::validator`: Replaced with `Arg::value_parser(...)`
  --> layout21converters/src/proto2gds.rs:22:5
   |
22 |     tech: String,
   |     ^^^^

warning: use of deprecated associated function `clap::Arg::<'help>::validator`: Replaced with `Arg::value_parser(...)`
  --> layout21converters/src/gds2proto.rs:17:5
   |
17 |     gds: String,
   |     ^^^

warning: use of deprecated associated function `clap::Arg::<'help>::validator`: Replaced with `Arg::value_parser(...)`
  --> layout21converters/src/gds2proto.rs:20:5
   |
20 |     proto: String,
   |     ^^^^^

warning: `layout21converters` (bin "proto2gds" test) generated 7 warnings
warning: `layout21converters` (bin "gds2ser" test) generated 7 warnings (7 duplicates)
warning: `layout21converters` (lib test) generated 8 warnings (8 duplicates)
warning: `layout21converters` (bin "gds2proto" test) generated 5 warnings
warning: `layout21converters` (bin "lef2yaml" test) generated 5 warnings
@dan-fritchman
Copy link
Owner Author

56e40c6 fixed this by

  • Upgrading to clap ^4.0, and
  • Replacing all the #[clap] decorators with #[arg]

@dan-fritchman
Copy link
Owner Author

Merged in via #35

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

No branches or pull requests

1 participant