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

dprint 0.46 fails to build via cargo without --locked flag #851

Closed
ksze opened this issue May 26, 2024 · 1 comment · Fixed by #852
Closed

dprint 0.46 fails to build via cargo without --locked flag #851

ksze opened this issue May 26, 2024 · 1 comment · Fixed by #852

Comments

@ksze
Copy link

ksze commented May 26, 2024

I manage my rust packages using cargo. I just tried to upgrade dprint from 0.45.1 to 0.46.0 using cargo, but I get this error message:

error[E0308]: mismatched types
   --> /home/kal/.cargo/registry/src/index.crates.io-6f17d22bba15001f/dprint-0.46.0/src/utils/url.rs:121:39
    |
121 |     agent = agent.tls_config(Arc::new(config));
    |                              -------- ^^^^^^ expected `rustls::client::client_conn::ClientConfig`, found `ClientConfig`
    |                              |
    |                              arguments to this function are incorrect
    |
    = note: `ClientConfig` and `rustls::client::client_conn::ClientConfig` have similar names, but are actually distinct types
note: `ClientConfig` is defined in crate `rustls`
   --> /home/kal/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rustls-0.21.12/src/client/client_conn.rs:128:1
    |
128 | pub struct ClientConfig {
    | ^^^^^^^^^^^^^^^^^^^^^^^
note: `rustls::client::client_conn::ClientConfig` is defined in crate `rustls`
   --> /home/kal/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rustls-0.22.4/src/client/client_conn.rs:150:1
    |
150 | pub struct ClientConfig {
    | ^^^^^^^^^^^^^^^^^^^^^^^
    = note: perhaps two different versions of crate `rustls` are being used?
note: associated function defined here
   --> /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/alloc/src/sync.rs:392:12

For more information about this error, try `rustc --explain E0308`.
error: could not compile `dprint` (bin "dprint") due to 1 previous error
error: failed to compile `dprint v0.46.0`, intermediate artifacts can be found at `/tmp/cargo-installWezSf7`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.


Updated 0 packages.
Failed to update dprint.
@dsherret
Copy link
Member

Thanks for reporting. As a temp workaround, install like so:

cargo install --locked dprint

@dsherret dsherret changed the title dprint 0.46 fails to build via cargo dprint 0.46 fails to build via cargo without --locked flag May 26, 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