Closed douweschulte closed 3 weeks ago
This is because I released a new version of mzpeaks
v0.21 last night that added those bounds to the PeakCollection::iter
method, thinking they would help the compiler. I reverted the change and released v0.22 which should fix the problem.
Thanks for the fast response, the iterator errors are gone indeed now. The double method errors are still there though. I have checked that cargo now indeed selects mzpeaks 0.22 when compiling mzdata 0.31.
All errors when compiling mzdata 0.31 with mzpeaks 0.22
`
help: disambiguate the method for candidate #1
|
323 | Self::Centroid(peaks) => SummaryOps::base_peak(&peaks),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: disambiguate the method for candidate #2
|
323 | Self::Centroid(peaks) => mzpeaks::PeakCollection::base_peak(&peaks),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error[E0034]: multiple applicable items in scope
--> C:\Users\5803969\.cargo\registry\src\index.crates.io-6f17d22bba15001f\mzdata-0.31.0\src\spectrum\peaks.rs:324:48
|
324 | Self::Deconvoluted(peaks) => peaks.base_peak(),
| ^^^^^^^^^ multiple `base_peak` found
|
note: candidate #1 is defined in an impl of the trait `SummaryOps` for the type `PeakSetVec `
help: disambiguate the method for candidate #1
|
324 | Self::Deconvoluted(peaks) => SummaryOps::base_peak(&peaks),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: disambiguate the method for candidate #2
|
324 | Self::Deconvoluted(peaks) => mzpeaks::PeakCollection::base_peak(&peaks),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error[E0034]: multiple applicable items in scope
--> C:\Users\5803969\.cargo\registry\src\index.crates.io-6f17d22bba15001f\mzdata-0.31.0\src\spectrum\peaks.rs:585:56
|
585 | RefPeakDataLevel::Centroid(peaks) => peaks.base_peak(),
| ^^^^^^^^^ multiple `base_peak` found
|
note: candidate #1 is defined in an impl of the trait `SummaryOps` for the type `PeakSetVec `
help: disambiguate the method for candidate #1
|
585 | RefPeakDataLevel::Centroid(peaks) => SummaryOps::base_peak(&peaks),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: disambiguate the method for candidate #2
|
585 | RefPeakDataLevel::Centroid(peaks) => mzpeaks::PeakCollection::base_peak(&peaks),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error[E0034]: multiple applicable items in scope
--> C:\Users\5803969\.cargo\registry\src\index.crates.io-6f17d22bba15001f\mzdata-0.31.0\src\spectrum\peaks.rs:586:60
|
586 | RefPeakDataLevel::Deconvoluted(peaks) => peaks.base_peak(),
| ^^^^^^^^^ multiple `base_peak` found
|
note: candidate #1 is defined in an impl of the trait `SummaryOps` for the type `PeakSetVec `
help: disambiguate the method for candidate #1
|
586 | RefPeakDataLevel::Deconvoluted(peaks) => SummaryOps::base_peak(&peaks),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: disambiguate the method for candidate #2
|
586 | RefPeakDataLevel::Deconvoluted(peaks) => mzpeaks::PeakCollection::base_peak(&peaks),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
For more information about this error, try `rustc --explain E0034`.
error: could not compile `mzdata` (lib) due to 4 previous errors
```
Interestingly enough this error always pops up for 0.31/30/29/28 even though version 0.29 worked before updating, so I assume some other recent change in mzpeaks is the root cause of this error.
Thank you for bearing with me as I fix this. I've released mzdata
v0.32.0 that should fix that problem and something else related to an unnecessary re-organization of symbols from mzsignal
.
Thanks so much for the quick fix! I am very happy to help being on the other end of the line in helping you figure this out. Just so you know if you really think some old version is not supposed to be used anymore you might want to look into 'yanking' those versions.
I updated to
mzdata
0.31 inrustyms
and it fails during compilation (see below). I am running rust 1.81 (latest stable). What am I doing wrong, as mzdata 0.31 obviously built successfully for it to be uploaded to crates.io. Forannotator
I had the feeling I had to pick a pair of mzdata and mzpeaks that worked together but here I only have mzdata.Full compilation error
` help: disambiguate the method for candidate #1 | 323 | Self::Centroid(peaks) => SummaryOps::base_peak(&peaks), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ help: disambiguate the method for candidate #2 | 323 | Self::Centroid(peaks) => mzpeaks::PeakCollection::base_peak(&peaks), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0034]: multiple applicable items in scope --> C:\Users\5803969\.cargo\registry\src\index.crates.io-6f17d22bba15001f\mzdata-0.31.0\src\spectrum\peaks.rs:324:48 | 324 | Self::Deconvoluted(peaks) => peaks.base_peak(), | ^^^^^^^^^ multiple `base_peak` found | note: candidate #1 is defined in an impl of the trait `SummaryOps` for the type `PeakSetVec`
--> C:\Users\5803969\.cargo\registry\src\index.crates.io-6f17d22bba15001f\mzdata-0.31.0\src\spectrum\peaks.rs:204:5
|
204 | fn base_peak(&self) -> CentroidPeak {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: candidate #2 is defined in an impl of the trait `mzpeaks::PeakCollection` for the type `PeakSetVec
` help: disambiguate the method for candidate #1 | 324 | Self::Deconvoluted(peaks) => SummaryOps::base_peak(&peaks), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ help: disambiguate the method for candidate #2 | 324 | Self::Deconvoluted(peaks) => mzpeaks::PeakCollection::base_peak(&peaks), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0034]: multiple applicable items in scope --> C:\Users\5803969\.cargo\registry\src\index.crates.io-6f17d22bba15001f\mzdata-0.31.0\src\spectrum\peaks.rs:585:56 | 585 | RefPeakDataLevel::Centroid(peaks) => peaks.base_peak(), | ^^^^^^^^^ multiple `base_peak` found | note: candidate #1 is defined in an impl of the trait `SummaryOps` for the type `PeakSetVec`
--> C:\Users\5803969\.cargo\registry\src\index.crates.io-6f17d22bba15001f\mzdata-0.31.0\src\spectrum\peaks.rs:135:5
|
135 | fn base_peak(&self) -> CentroidPeak {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: candidate #2 is defined in an impl of the trait `mzpeaks::PeakCollection` for the type `PeakSetVec
` help: disambiguate the method for candidate #1 | 585 | RefPeakDataLevel::Centroid(peaks) => SummaryOps::base_peak(&peaks), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ help: disambiguate the method for candidate #2 | 585 | RefPeakDataLevel::Centroid(peaks) => mzpeaks::PeakCollection::base_peak(&peaks), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0034]: multiple applicable items in scope --> C:\Users\5803969\.cargo\registry\src\index.crates.io-6f17d22bba15001f\mzdata-0.31.0\src\spectrum\peaks.rs:586:60 | 586 | RefPeakDataLevel::Deconvoluted(peaks) => peaks.base_peak(), | ^^^^^^^^^ multiple `base_peak` found | note: candidate #1 is defined in an impl of the trait `SummaryOps` for the type `PeakSetVec`
--> C:\Users\5803969\.cargo\registry\src\index.crates.io-6f17d22bba15001f\mzdata-0.31.0\src\spectrum\peaks.rs:204:5
|
204 | fn base_peak(&self) -> CentroidPeak {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: candidate #2 is defined in an impl of the trait `mzpeaks::PeakCollection` for the type `PeakSetVec
` help: disambiguate the method for candidate #1 | 586 | RefPeakDataLevel::Deconvoluted(peaks) => SummaryOps::base_peak(&peaks), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ help: disambiguate the method for candidate #2 | 586 | RefPeakDataLevel::Deconvoluted(peaks) => mzpeaks::PeakCollection::base_peak(&peaks), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Some errors have detailed explanations: E0034, E0277. For more information about an error, try `rustc --explain E0034`. error: could not compile `mzdata` (lib) due to 8 previous errors ```
Cargo tree output (only mzdata part)
Note: I tried 0.28..=0.31 and all gave the same error.