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

Fix: error[E0308]: mismatched types during cargo-xwin installation #2439

Merged
merged 1 commit into from
Jul 20, 2024

Conversation

Sahil2004
Copy link

Updated to include the correct command for installing cargo-xwin

Description

  • What does this PR change? Give us a brief description.
    This PR corrects the cargo-xwin installation command. With the previously written command, I was receiving the following error:
error[E0308]: mismatched types
   --> /home/sahil/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cargo-xwin-0.17.2/src/common.rs:642:40
    |
642 |         Ok(builder.tls_config(Arc::new(client_config)).build())
    |                               -------- ^^^^^^^^^^^^^ expected `ClientConfig`, found a different `ClientConfig`
    |                               |
    |                               arguments to this function are incorrect
    |
    = note: `ClientConfig` and `ClientConfig` have similar names, but are actually distinct types
note: `ClientConfig` is defined in crate `rustls`
   --> /home/sahil/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rustls-0.22.4/src/client/client_conn.rs:150:1
    |
150 | pub struct ClientConfig {
    | ^^^^^^^^^^^^^^^^^^^^^^^
note: `ClientConfig` is defined in crate `rustls`
   --> /home/sahil/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rustls-0.23.11/src/client/client_conn.rs:157:1
    |
157 | pub struct ClientConfig {
    | ^^^^^^^^^^^^^^^^^^^^^^^
    = note: perhaps two different versions of crate `rustls` are being used?
note: associated function defined here
   --> /home/sahil/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/sync.rs:392:12
    |
392 |     pub fn new(data: T) -> Arc<T> {
    |            ^^^

For more information about this error, try `rustc --explain E0308`.
error: could not compile `cargo-xwin` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: failed to compile `cargo-xwin v0.17.2`, intermediate artifacts can be found at `/tmp/cargo-installXcKzK1`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

But then I checked the documentation of cargo-xwin crate and found that installation command uses a --locked flag which fixed this issue for me and I was successfully able to build the app.

Here's the documentation for reference: Documentation - check the first command in Installation

  • Closes #
    None

Updated to include the correct command for installing cargo-xwin
@Sahil2004 Sahil2004 requested a review from a team as a code owner July 20, 2024 15:43
Copy link

netlify bot commented Jul 20, 2024

Deploy Preview for tauri-v1 ready!

Name Link
🔨 Latest commit d1f1eed
🔍 Latest deploy log https://app.netlify.com/sites/tauri-v1/deploys/669bdb0f942ac00008ff5aac
😎 Deploy Preview https://deploy-preview-2439--tauri-v1.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@dreyfus92 dreyfus92 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @Sahil2004, nice catch and thank you for updating it 😁

@dreyfus92 dreyfus92 merged commit 12d7760 into tauri-apps:v1 Jul 20, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

2 participants