avencera / rustywind

CLI for organizing Tailwind CSS classes
Apache License 2.0
478 stars 27 forks source link

cargo install rustywind fail: compile error[E0308]: mismatched types #94

Closed Saplyn closed 8 months ago

Saplyn commented 8 months ago

Issue

When runs cargo install rustywind, it fails compile and complains about error[E0308]: mismatched types. Here's the full output:

$ cargo install rustywind
    Updating crates.io index
  Installing rustywind v0.21.0
    Updating crates.io index
   Compiling cfg-if v1.0.0
...
   Compiling rustls-webpki v0.101.7
   Compiling sct v0.7.1
   Compiling ureq v2.9.6
   Compiling rustywind v0.21.0
error[E0308]: mismatched types
   --> /home/{username}/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rustywind-0.21.0/src/options/vite.rs:25:43
    |
25  |         agent = agent.tls_config(Arc::new(ssl));
    |                                  -------- ^^^ 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/{username}/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rustls-0.21.10/src/client/client_conn.rs:128:1
    |
128 | pub struct ClientConfig {
    | ^^^^^^^^^^^^^^^^^^^^^^^
note: `ClientConfig` is defined in crate `rustls`
   --> /home/{username}/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rustls-0.22.2/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
   --> /home/{username}/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/sync.rs:386:12
    |
386 |     pub fn new(data: T) -> Arc<T> {
    |            ^^^

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

Env Info

$ rustup show 
Default host: x86_64-unknown-linux-gnu
rustup home:  /home/saplyn/.rustup

installed toolchains
--------------------

stable-x86_64-unknown-linux-gnu (default)
nightly-x86_64-unknown-linux-gnu

installed targets for active toolchain
--------------------------------------

wasm32-unknown-unknown
x86_64-unknown-linux-gnu

active toolchain
----------------

stable-x86_64-unknown-linux-gnu (default)
rustc 1.76.0 (07dca489a 2024-02-04)

$ screenfetch
                          ./+o+-       _@_
                  yyyyy- -yyyyyy+      OS: Ubuntu 22.04 jammy
               ://+//////-yyyyyyo      Kernel: x86_64 Linux 6.5.0-21-generic
           .++ .:/++++++/-.+sss/`      Uptime: 34m
         .:++o:  /++++++++/:--:/-      Packages: 2118
        o:+o+:++.`..```.-/oo+++++/     Shell: zsh 5.8.1
       .:+o:+o/.          `+sssoo+/    Resolution: 3840x1080
  .++/+:+oo+o:`             /sssooo.   DE: GNOME 41.7
 /+++//+:`oo+o               /::--:.   WM: Mutter
 \+/+o+++`o++o               ++////.   WM Theme: Adwaita
  .++.o+++oo+:`             /dddhhh.   GTK Theme: Flat-Remix-GTK-Green-Dark [GTK2/3]
       .+.o+oo:.          `oddhhhh+    Icon Theme: Flat-Remix-Green-Dark
        \+.++o+o``-````.:ohdhhhhh+     Font: Ubuntu Nerd Font 11
         `:o+++ `ohhhhhhhhyo++os:      Disk: 113G / 147G (81%)
           .o:`.syhhhhhhh/.oo++o`      CPU: AMD Ryzen 7 6800H with Radeon Graphics @ 16x 4.785GHz
               /osyyyyyyo++ooo+++/     GPU: NVIDIA GeForce RTX 3060 Laptop GPU
                   ````` +oo+++o\:     RAM: 10049MiB / 15218MiB
                          `oo++. 
Saplyn commented 8 months ago

Well, solved by cargo install rustywind --locked