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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable alloc feature for base64 dependency #14

Closed
dvzrv opened this issue May 4, 2024 · 1 comment 路 Fixed by #16
Closed

Enable alloc feature for base64 dependency #14

dvzrv opened this issue May 4, 2024 · 1 comment 路 Fixed by #16

Comments

@dvzrv
Copy link

dvzrv commented May 4, 2024

Hi! 馃憢

I'm using this crate in the context of nethsm.
I noticed that I am no longer able to upgrade my lock file as this leads to clippy failing:

    Checking nethsm-sdk-rs v1.0.0
error[E0599]: no method named `encode` found for struct `GeneralPurpose` in the current scope
   --> /home/dave/.local/state/cargo/registry/src/index.crates.io-6f17d22bba15001f/nethsm-sdk-rs-1.0.0/src/apis/mod.rs:122:51
    |
122 |     format!("Basic {}", general_purpose::STANDARD.encode(string)).to_string()
    |                                                   ^^^^^^ method not found in `GeneralPurpose`

This appears to be broken if base64 >=0.22.0 is pulled in by another dependency in the tree.

Do you have a timeline for updating/ adapting this crate (its last release is from six months ago)?

@robin-nitrokey
Copy link
Member

The cause for this problem is that we do not enable the alloc feature for base64 in our Cargo.toml. Probably some dependency does, but when it updates base64 to an incompatible version, the feature is no longer enabled for our version.

You should be able to temporarily fix this on your side by manually pulling in base64 and activating the feature:

[dependencies]
base64 = { version = "0.21", default-features = false, features = ["alloc"] }

@robin-nitrokey robin-nitrokey changed the title Dependencies for base64 are out of date Enable alloc feature for base64 dependency May 6, 2024
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 a pull request may close this issue.

2 participants