I'm trying to check for unused dependencies using the cargo-udeps crate, but when I do it seems to reference this file .cargo/git/checkouts/substrate-a7fa553ead635512/816fc31/frame/support/procedural/tools/src/syn_ext.rs:50:14
let syn::group::$name { token, content } = syn::group::$parse(input)?;
Which complains that the group module is private so it cannot access it.
But keep in mind I'm not using the syn crate within my project but I think a dependency in my project may be using it.
Thank you for your response @Cerber-Ursi , It says version '=1.0.58' doesn't exist, so I decided to try version =1.0.98, Which i then still ended up having the same error.
Could you copy the exact error from cargo check and the full Cargo.toml? This version definitely do exist, so this must be some kind of configuration issue.
# Cargo check
note: the module `group` is defined here
--> /.cargo/registry/src/github.com-1ecc6299db9ec823/syn-1.0.98/src/lib.rs:304:1
|
304 | mod group;
| ^^^^^^^^^^
error[E0603]: module `group` is private
--> /.cargo/git/checkouts/substrate-a7fa553ead635512/816fc31/frame/support/procedural/tools/src/syn_ext.rs:50:14
|
50 | let syn::group::$name { token, content } = syn::group::$parse(input)?;
| ^^^^^ private module
|
note: the module `group` is defined here
--> /.cargo/registry/src/github.com-1ecc6299db9ec823/syn-1.0.98/src/lib.rs:304:1
|
304 | mod group;
| ^^^^^^^^^^
Compiling sp-runtime-interface-proc-macro v4.0.0-dev (https://github.com/darwinia-network/substrate?branch=darwinia-v0.12.4#816fc31b)
For more information about this error, try `rustc --explain E0603`.
error: could not compile `frame-support-procedural-tools` due to 2 previous errors
Aha, so you're using you own fork of substrate, it seems, and the offending file is not updated there yet. It might be better if you're able to pull the updates from upstream, but if that's impossible, you could run cargo tree -i syn to see what dependency is pulling the newer version and what version does it really require. Maybe it's somewhere between 1.0.58 and 1.0.98, when syn::group was still available.