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

IndexMap compilation fails "expected 3 type arguments" #151

Closed
PeterGrace opened this issue Aug 29, 2020 · 3 comments · Fixed by #267
Closed

IndexMap compilation fails "expected 3 type arguments" #151

PeterGrace opened this issue Aug 29, 2020 · 3 comments · Fixed by #267

Comments

@PeterGrace
Copy link

Hi, this is a weird issue that I stumbled upon that is roughly similar to #144 but I have some new information that may or may not be relevant.

   Compiling h2 v0.2.6
   Compiling futures v0.3.5
error[E0107]: wrong number of type arguments: expected 3, found 2
  --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/h2-0.2.6/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`.

What I found about this error, I found in an unrelated software tool's repository, issue here.

The root issue I am having is that I am building from an nfs mount that does not support extended file attributes, and so as a result the build of IndexMap is failing with the following:

rror: could not copy "/workspace/herald/target/debug/build/indexmap-62ff17e61db67c74/out/probe0.probe0.3a1fbbbh-cgu.0.rcgu.ll" to "/workspace/herald/target/debug/build/indexmap-62ff17e61db67c74/out/probe0.ll": Operation not supported (os error 95)

error: aborting due to previous error

error: could not copy "/workspace/herald/target/debug/build/indexmap-62ff17e61db67c74/out/probe1.probe1.3a1fbbbh-cgu.0.rcgu.ll" to "/workspace/herald/target/debug/build/indexmap-62ff17e61db67c74/out/probe1.ll": Operation not supported (os error 95)

error: aborting due to previous error

warning: autocfg could not probe for `std`
error: could not copy "/workspace/herald/target/debug/build/indexmap-62ff17e61db67c74/out/probe2.probe2.3a1fbbbh-cgu.0.rcgu.ll" to "/workspace/herald/target/debug/build/indexmap-62ff17e61db67c74/out/probe2.ll": Operation not supported (os error 95)

error: aborting due to previous error

From the issue #144 it sounds like that problem originated in autocfg but I'm not certain if this is the same situation here, as the other 260 includes I have for my package compiled without incident. I'm curious if there might be some part of IndexMap's compilation that might be prompting this attempt to read extended attributes and if possible, is there a way to skip that?

@cuviper
Copy link
Member

cuviper commented Aug 31, 2020

I think it is indeed the same as #144 with autocfg output, but I don't know how to improve that situation. If you can use a local target path as suggested there, things will probably be smoother.

To avoid it altogether, we should probably go ahead with #145 that will let you force-enable "std" support.

@nbrr
Copy link

nbrr commented Oct 25, 2020

I note that #145 has been merged. How do I make a dependency to use the std feature? I'm compiling something to wasm with yew as a dependency. Yew does have indexmap as a dependency but other crates it also seem to have it.

@cuviper
Copy link
Member

cuviper commented Oct 26, 2020

@nbrr You can add your own dependency with the feature enabled, and this will affect the entire dependency graph:

[dependencies]
indexmap = { version = "1.5.2", features = ["std"] }

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.

3 participants