est31 / cargo-udeps

Find unused dependencies in Cargo.toml
Other
1.75k stars 46 forks source link

proc-macro2@1.0.59 is broken on latest version of Rust nightly #180

Closed 9oelM closed 1 year ago

9oelM commented 1 year ago

cargo-udeps does not directly depend on proc-macro2, but it depends on packages that depend on proc-macro2.

https://github.com/est31/cargo-udeps/blob/4e42942710d498974085d2aa8ddafafdbd5225e5/Cargo.lock#L2010-L2017

The problem is that cargo-udeps needs Rust nightly to run, but it cannot run on the latest version of Rust nightly right now. The latest version that can still work, according to the issue in rust-lang, should be nightly-2023-06-27. So this means any user running nightly that is later than nightly-2023-06-27 cannot install cargo-udeps.

The reason it broke is that starting from nightly-2023-06-28, Rust nightly changed the name of a preview feature, and proc-macro2 is referring to that feature that does not exist anymore.

We can indeed confirm that it fails on the latest version of Rust nightly and succeeds on nightly-2023-06-27:

So we need to tell the users to use nightly-2023-06-27 as the latest possible version of Rust for now and bump proc-macro2 to ^1.0.60 somehow in this repo because 1.0.60 is the version that they removed the non-existent feature.

9oelM commented 1 year ago

cc @est31

est31 commented 1 year ago

Thanks for the report! I've done a cargo update to update all the dependencies.