lunush / rates

Currency exchange rates in your terminal 🇺🇦
Apache License 2.0
96 stars 6 forks source link

Problems with cargo build #2

Closed cbjuju closed 3 years ago

cbjuju commented 3 years ago

I cloned this git repository and ran cargo build, which gave me the following error.

error[E0107]: wrong number of type arguments: expected 3, found 2
  --> /home/sudip/.cargo/registry/src/github.com-1ecc6299db9ec823/h2-0.3.0/src/proto/streams/store.rs:15:10
   |
15 |     ids: IndexMap<StreamId, SlabIndex>,
   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 3 type arguments

error: aborting due to previous error

For more information about this error, try `rustc --explain E0107`.
error: could not compile `h2`

I got the same error even when I had just this code inside main.rs

fn main() -> Result<(), std::io::Error> {
    Ok(())
}

Output of rustc --version is rustc 1.50.0 (cb75ad5db 2021-02-10). I am learning Rust and I wanted to take this code apart as an exercise, not just install it as a command line tool (which I was able to do using cargo install).

lunush commented 3 years ago

Hi and sorry for the delay! I missed the notification.

I just cloned the repo and cargo build ran without any issues. I am using the latest stable toolchain. Do you still have this problem? I would guess that it was the issue with cargo registry and now it works fine.

cbjuju commented 3 years ago

I did a rustup update and did a fresh clone of the repository and ran cargo build again. But the exact same problem still persists. Output of rustc --version is now rustc 1.51.0 (2fd73fabe 2021-03-23). If it helps : I am using Ubuntu 18.04.

Some noob questions : A cargo registry issue would mean that one of the dependencies of this project is out of date, right ? Does rustup update update the whole toolchain or does it update just the compiler ?

lunush commented 3 years ago

A cargo registry issue would mean that one of the dependencies of this project is out of date, right ?

I meant a maintainer of the dependency accidently uploaded broken code and then promptly fixed it.

Does rustup update update the whole toolchain or does it update just the compiler ?

The whole toolchain. You can get more info by running rustup help. GitHub isn't the best place to ask this kind of questions when you can search them up in minutes.

Considering your issue, this is very strange. I just switched from openssl to rustls and ci runner (which is Ubuntu 18.04) compiles it successfully. If you still have the same issue, try deleting ~/.cargo/registry/cache or $CARGO_HOME/registry/cache if you've set it. If this doesn't help either, I don't think I'll be able to help you.

I'll close this issue for now. If you think there something I should fix on my side, feel free to let me know and we'll see what I can do.