Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

"multiple applicable items in scope" & "multiple flatten found" (while compiling from source) #8211

Closed
ghost opened this issue Mar 25, 2018 · 9 comments
Labels
F3-annoyance 💩 The client behaves within expectations, however this “expected behaviour” itself is at issue. M0-build 🏗 Building and build system. P9-somedaymaybe 🌞 Issue might be worth doing eventually.

Comments

@ghost
Copy link

ghost commented Mar 25, 2018

I'm running:

  • Which Parity version?:

commit 8c02211 (HEAD -> master, tag: nightly, origin/master, origin/HEAD)

  • Which operating system?:

Linux

  • How installed?:

not yet, compiling from source...

steps to reproduce

  1. git clone https://github.com/paritytech/parity
  2. cd parity
  3. cargo build --release
error[E0034]: multiple applicable items in scope
  --> /home/xftroxgpx/build/2nonpkgs/rust.stuff/parity/ethstore/src/accounts_dir/memory.rs:33:45
   |
33 |         Ok(self.accounts.read().values().cloned().flatten().collect())
   |                                                   ^^^^^^^ multiple `flatten` found
   |
   = note: candidate #1 is defined in an impl of the trait `std::iter::Iterator` for the type `std::iter::Cloned<_>`
   = note: candidate #2 is defined in an impl of the trait `itertools::Itertools` for the type `_`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0034`.
error: Could not compile `ethstore`.
warning: build failed, waiting for other jobs to finish...
error: build failed
rustc 1.26.0-dev (4be5d360c 2018-03-23)
binary: rustc
commit-hash: 4be5d360cd8a9338d1408b3998874313240db395
commit-date: 2018-03-23
host: x86_64-unknown-linux-gnu
release: 1.26.0-dev
LLVM version: 6.0

cargo 1.26.0-dev (bcd0300f 2018-03-23)
release: 1.26.0
commit-hash: bcd0300f0e2b572e81fa17e88dcb927aa95d6b4e
commit-date: 2018-03-23
@5chdn 5chdn added P5-sometimesoon 🌲 Issue is worth doing soon. F3-annoyance 💩 The client behaves within expectations, however this “expected behaviour” itself is at issue. M0-build 🏗 Building and build system. labels Mar 26, 2018
@5chdn 5chdn added this to the 1.11 milestone Mar 26, 2018
@niklasad1
Copy link
Collaborator

Yeah, but officially parity is on the stable channel of Rust as the rust-toolchain file specifies where those warnings doesn't show yet at least!

@kirushik kirushik added P9-somedaymaybe 🌞 Issue might be worth doing eventually. and removed P5-sometimesoon 🌲 Issue is worth doing soon. labels Mar 26, 2018
@kirushik
Copy link
Collaborator

I don't think rust-lang/rust#48213 is going to land in stable Rust anytime soon, so I'm lowering the priority.
Also, I don't see any reason to run on nightly, even in development — since both incremental compilation and RLS are available in stable.

@5chdn
Copy link
Contributor

5chdn commented Mar 27, 2018

I'm even further lowering the priority by closing this issue so we can take care once this actually is an issue :)

@5chdn 5chdn closed this as completed Mar 27, 2018
@ghost
Copy link
Author

ghost commented Sep 14, 2018

@5chdn Right now default Rust version is 1.29.0 and I am getting this error with default rust compiler 😂 Please reopen this issue.

@sandeep1116
Copy link

I am also facing same issue with default rust compile.

Compiling ethstore v0.2.0 (http://github.com/paritytech/parity?rev=991f0ca#991f0cac)
error[E0034]: multiple applicable items in scope
--> /Users/sandeepkumar/.cargo/git/checkouts/parity-dc9825eb65b3adf1/991f0ca/ethstore/src/accounts_dir/memory.rs:33:45
|
33 | Ok(self.accounts.read().values().cloned().flatten().collect())
| ^^^^^^^ multiple flatten found
|
= note: candidate #1 is defined in an impl of the trait std::iter::Iterator for the type std::iter::Cloned<_>
= note: candidate #2 is defined in an impl of the trait itertools::Itertools for the type _

error: aborting due to previous error

For more information about this error, try rustc --explain E0034.
error: Could not compile ethstore.
warning: build failed, waiting for other jobs to finish...
error: build failed
make: *** [target/release/bridge] Error 101

@niklasad1
Copy link
Collaborator

@eosclassicteam @sandakersmann

You must be compiling an old version of parity this was fixed for a long time ago, see 981554c#diff-47124c46f87ec7a3ff6ceb7561c573a7

@sierra-golf
Copy link

@eosclassicteam @sandakersmann

You must be compiling an old version of parity this was fixed for a long time ago, see 981554c#diff-47124c46f87ec7a3ff6ceb7561c573a7

Shouldn't that patch adopted in 1.x versions? I can't build 1.11.11 version (rust 1.30.0) with "multiple flatten found" error

@niklasad1
Copy link
Collaborator

niklasad1 commented Oct 30, 2018

@sierra-golf

parity version 1.11.11 is not supported by rust 1.30.0 you need to downgrade to 1.28.0 or earlier and it should work fine

@sierra-golf
Copy link

@niklasad1 thank you for clarifying that. I might add that in old-stable-* branches rust-toolchain file points to stable which is a bit misleading now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
F3-annoyance 💩 The client behaves within expectations, however this “expected behaviour” itself is at issue. M0-build 🏗 Building and build system. P9-somedaymaybe 🌞 Issue might be worth doing eventually.
Projects
None yet
Development

No branches or pull requests

5 participants