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

refactor: remove clio dependency to fix compilation issues #1072

Merged
merged 2 commits into from
Nov 11, 2024

Conversation

sasa-tomic
Copy link
Member

Eliminate the clio dependency and update the handling of private_key_pem in AuthOpts to use a String instead of InputPath. This change simplifies the code and improves the management of private key paths.

error[E0599]: the method `value_parser` exists for reference `&&&&&&_infer_ValueParser_for<InputPath>`, but its trait bounds were not satisfied
    --> rs/cli/src/commands/mod.rs:99:5
     |
99   |     /// Path to private key file (in PEM format)
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method cannot be called on `&&&&&&_infer_ValueParser_for<InputPath>` due to unsatisfied trait bounds
     |
    ::: /home/sat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/clap_builder-4.5.20/src/builder/value_parser.rs:2423:1
     |
2423 | pub struct _infer_ValueParser_for<T>(std::marker::PhantomData<T>);
     | ------------------------------------ doesn't satisfy `_: _impls_FromStr`
     |
    ::: /home/sat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/clio-0.3.5/src/input.rs:374:1
     |
374  | pub struct InputPath {
     | -------------------- doesn't satisfy 7 bounds
     |
     = note: the following trait bounds were not satisfied:
             `clio::InputPath: clap::ValueEnum`
             which is required by `&&&&&clap::builder::_infer_ValueParser_for<clio::InputPath>: clap::builder::impl_prelude::_impls_ValueEnum`
             `clio::InputPath: clap::builder::ValueParserFactory`
             which is required by `&&&&&&clap::builder::_infer_ValueParser_for<clio::InputPath>: clap::builder::impl_prelude::_impls_ValueParserFactory`
             `clio::InputPath: std::convert::From<std::ffi::OsString>`
             which is required by `&&&&clap::builder::_infer_ValueParser_for<clio::InputPath>: clap::builder::impl_prelude::_impls_From_OsString`
             `clio::InputPath: std::convert::From<&'s std::ffi::OsStr>`
             which is required by `&&&clap::builder::_infer_ValueParser_for<clio::InputPath>: clap::builder::impl_prelude::_impls_From_OsStr`
             `clio::InputPath: std::convert::From<std::string::String>`
             which is required by `&&clap::builder::_infer_ValueParser_for<clio::InputPath>: clap::builder::impl_prelude::_impls_From_String`
             `clio::InputPath: std::convert::From<&'s str>`
             which is required by `&clap::builder::_infer_ValueParser_for<clio::InputPath>: clap::builder::impl_prelude::_impls_From_str`
             `clio::InputPath: std::str::FromStr`
             which is required by `clap::builder::_infer_ValueParser_for<clio::InputPath>: clap::builder::impl_prelude::_impls_FromStr`
     = note: this error originates in the macro `clap::value_parser` (in Nightly builds, run with -Z macro-backtrace for more info)

For more information about this error, try `rustc --explain E0599`.
error: could not compile `dre` (lib test) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
error: could not compile `dre` (lib) due to 2 previous errors

@sasa-tomic sasa-tomic requested a review from a team as a code owner November 11, 2024 17:01
@sasa-tomic sasa-tomic enabled auto-merge (squash) November 11, 2024 17:09
@sasa-tomic sasa-tomic merged commit 1042b62 into main Nov 11, 2024
4 checks passed
@sasa-tomic sasa-tomic deleted the sat-fix-clio-compilation branch November 11, 2024 17:23
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.

2 participants