-
-
Notifications
You must be signed in to change notification settings - Fork 1k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Doesn't compile in WSL with ubuntu 20.04 #2535
Labels
C-bug
Category: Updating dependencies
Comments
This looks like nothing wsl or Ubuntu related. Just pure rust issue. But I
don't understand why indexmap is failing to compile.
…On Sun, Jun 13, 2021, 18:32 Charles Giguere ***@***.***> wrote:
Please complete the following tasks
- I have searched the discussions
<https://github.com/clap-rs/clap/discussions>
- I have searched the existing issues
Rust Version
rustc 1.52.1 (9bc8c42bb 2021-05-09)
Clap Version
3.0.0-beta.2
Minimal reproducible code
fn main() {
println!("Hello, world!");
}
in Cargo.toml
[package]name = "clap-test"version = "0.1.0"authors = ["author"]edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]clap = "3.0.0-beta.2"
Steps to reproduce the bug with the above code
run cargo build in wsl with ubuntu 20.04
Actual Behaviour
> cargo build
Compiling clap v3.0.0-beta.2
error[E0107]: this struct takes 3 type arguments but only 2 type arguments were supplied
--> /home/<username>/.cargo/registry/src/github.com-1ecc6299db9ec823/clap-3.0.0-beta.2/src/parse/matches/arg_matches.rs:77:22
|
77 | pub(crate) args: IndexMap<Id, MatchedArg>,
| ^^^^^^^^ -- ---------- supplied 2 type arguments
| |
| expected 3 type arguments
|
note: struct defined here, with 3 type parameters: `K`, `V`, `S`
--> /home/<username>/.cargo/registry/src/github.com-1ecc6299db9ec823/indexmap-1.6.2/src/map.rs:76:12
|
76 | pub struct IndexMap<K, V, S> {
| ^^^^^^^^ - - -
help: add missing type argument
|
77 | pub(crate) args: IndexMap<Id, MatchedArg, S>,
| ^^^
error: aborting due to previous error
For more information about this error, try `rustc --explain E0107`.
error: could not compile `clap`
To learn more, run the command again with --verbose.
Expected Behaviour
Compiles successfully when added as a dependency
Additional Context
I recently completely reinstalled wsl with ubuntu 20.04 and I have nothing
but the rust toolchain installed on top of the default installation and
anything required to compile rust projects. I can compile other projects
that do not use clap. Yes, I ran an apt update and apt upgrade. I tried
building a project using clap and saw this output. I then reproduced the
bug by adding the dependency to an empty project and I saw the same output
of clap not being able to compile.
I know this works correctly in my windows install, but I also compiled
that project yesterday in a ubuntu 18.04 not through wsl and it worked.
I'm not sure if the issue is with WSL or ubuntu 20.04
Debug Output
*No response*
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2535>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABKU345KHMNXMNE6ZLAJWDTSTTSLANCNFSM46T522JQ>
.
|
Looks like it's an issue with rust and WSL and ubuntu. There's a workaround at indexmap-rs/indexmap#144 (comment). |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Please complete the following tasks
Rust Version
rustc 1.52.1 (9bc8c42bb 2021-05-09)
Clap Version
3.0.0-beta.2
Minimal reproducible code
in Cargo.toml
Steps to reproduce the bug with the above code
run
cargo build
in wsl with ubuntu 20.04Actual Behaviour
Expected Behaviour
Compiles successfully when added as a dependency
Additional Context
I recently completely reinstalled wsl with ubuntu 20.04 and I have nothing but the rust toolchain installed on top of the default installation and anything required to compile rust projects. I can compile other projects that do not use clap. Yes, I ran an apt update and apt upgrade. I tried building a project using clap and saw this output. I then reproduced the bug by adding the dependency to an empty project and I saw the same output of clap not being able to compile.
I know this works correctly in my windows install, but I also compiled that project yesterday in a ubuntu 18.04 not through wsl and it worked.
I'm not sure if the issue is with WSL or ubuntu 20.04
Debug Output
No response
The text was updated successfully, but these errors were encountered: