Cannot compile locally (works in the CI)
curquiza opened this issue · 3 comments
curquiza commented
I get an error when compiling locally:
$> cargo build
Compiling pin-project-internal v0.4.22
error[E0659]: `parse_quote_spanned` is ambiguous (`macro_rules` vs non-`macro_rules` from other module)
--> /Users/curquiza/.cargo/registry/src/github.com-1ecc6299db9ec823/pin-project-internal-0.4.22/src/pin_project/derive.rs:859:67
|
859 | proj_generics.make_where_clause().predicates.push(parse_quote_spanned! { span =>
| ^^^^^^^^^^^^^^^^^^^ ambiguous name
|
note: `parse_quote_spanned` could refer to the macro defined here
--> /Users/curquiza/.cargo/registry/src/github.com-1ecc6299db9ec823/pin-project-internal-0.4.22/src/utils.rs:22:1
|
22 | / macro_rules! parse_quote_spanned {
23 | | ($span:expr => $($tt:tt)*) => {
24 | | syn::parse2(quote::quote_spanned!($span => $($tt)*)).unwrap_or_else(|e| panic!("{}", e))
25 | | };
26 | | }
| |_^
note: `parse_quote_spanned` could also refer to the macro imported here
--> /Users/curquiza/.cargo/registry/src/github.com-1ecc6299db9ec823/pin-project-internal-0.4.22/src/pin_project/derive.rs:7:5
|
7 | *,
| ^
= help: use `self::parse_quote_spanned` to refer to this macro unambiguously
error[E0659]: `parse_quote_spanned` is ambiguous (`macro_rules` vs non-`macro_rules` from other module)
--> /Users/curquiza/.cargo/registry/src/github.com-1ecc6299db9ec823/pin-project-internal-0.4.22/src/pinned_drop.rs:108:21
|
108 | *path = parse_quote_spanned! { path.span() =>
| ^^^^^^^^^^^^^^^^^^^ ambiguous name
|
note: `parse_quote_spanned` could refer to the macro defined here
--> /Users/curquiza/.cargo/registry/src/github.com-1ecc6299db9ec823/pin-project-internal-0.4.22/src/utils.rs:22:1
|
22 | / macro_rules! parse_quote_spanned {
23 | | ($span:expr => $($tt:tt)*) => {
24 | | syn::parse2(quote::quote_spanned!($span => $($tt)*)).unwrap_or_else(|e| panic!("{}", e))
25 | | };
26 | | }
| |_^
note: `parse_quote_spanned` could also refer to the macro imported here
--> /Users/curquiza/.cargo/registry/src/github.com-1ecc6299db9ec823/pin-project-internal-0.4.22/src/pinned_drop.rs:3:50
|
3 | use syn::{spanned::Spanned, visit_mut::VisitMut, *};
| ^
= help: use `self::parse_quote_spanned` to refer to this macro unambiguously
For more information about this error, try `rustc --explain E0659`.
error: could not compile `pin-project-internal` due to 2 previous errors
More info:
- I've done
rustup update
- My versions:
rustup 1.24.3 (ce5817a94 2021-05-31)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.58.1 (db9d1b20b 2022-01-20)`
cargo 1.58.0 (f01b232bc 2022-01-19)
The CI work and seems to compile without any issue
sanders41 commented
@curquiza I can build without errors. If you run cargo clean
before building does it make a difference?
irevoire commented
Yeah I can’t reproduce either and it seem like the issue is coming from a dependency (pin-project-internal
) so my guess is also that it’s a problem with incremental compilation and a cargo clean should fix it.
curquiza commented
I did cargo clean and then cargo build but I still have the error
I removed the repo and cloned it again, now it works. Don't have the time to understand why 😅
Sorry for this issue, I'm closing it