solokeys/solo2-cli

cargo install solo2 fails to compile

aramboi opened this issue · 1 comments

I'm trying to install solo2 with cargo install solo2, but it fails to compile with:

error[E0599]: no variant or associated item named `PKCKS11` found for enum `uriparse::Scheme` in the current scope
   --> /Users/angel/.cargo/registry/src/github.com-1ecc6299db9ec823/pkcs11-uri-0.1.2/src/lib.rs:209:52
    |
209 |         if uri.scheme() != Some(&uriparse::Scheme::PKCKS11) {
    |                                                    ^^^^^^^
    |                                                    |
    |                                                    variant or associated item not found in `uriparse::Scheme<'_>`
    |                                                    help: there is a variant with a similar name: `PKCS11`

For more information about this error, try `rustc --explain E0599`.
error: could not compile `pkcs11-uri` due to previous error

Seems to be due to a typo in https://github.com/nickray/pkcs11-uri/ so I've opened a PR there nickray/pkcs11-uri#1.

The typo's root cause might be another dependency, namely https://github.com/sgodwincs/uriparse-rs/ which had the typo at one point, but it was corrected in sgodwincs/uriparse-rs#19 by @nickray and merged later. Might be that a uriparse version update in https://github.com/solokeys/solo2-cli repo triggered this.

I see @nickray is a contributor to both solo2 and pkcs11-uri, so they might be able to do a new release of pkcs11-uri with the fix and update the solo2 dependencies.

Rust version tested with:

% rustc -V -v
rustc 1.59.0 (9d1b2106e 2022-02-23)
binary: rustc
commit-hash: 9d1b2106e23b1abd32fce1f17267604a5102f57a
commit-date: 2022-02-23
host: aarch64-apple-darwin
release: 1.59.0
LLVM version: 13.0.0

This should work again now. In the future (if our dependencies do breaking changes in allegedly semver-compatible updates), use cargo install --locked.