rust-qt / ritual

Use C++ libraries from Rust
Apache License 2.0
1.22k stars 49 forks source link

crate syn removed export as never been part of the public API #107

Closed davidedelpapa closed 3 years ago

davidedelpapa commented 3 years ago

qt_macro references syn::export that has been removed as never been part of the public API

Compilation of qt_macros fails due to the issue.

There are two places where it is called:

In both cases, it should be possible to use proc_macro::Span instead of passing from export; however it is a nightly only feature. Alternatively, there is the Span from proc_macro2 crate that offer the same functionalities outside of procedural macros (slot.rs should benefit?)

LoveIsGrief commented 3 years ago

While we're waiting for this to get merged, the functioning syn version is 1.0.17, but is there a way to force its use?

https://github.com/rust-qt/ritual/blob/880490edae89e7e0e5e4ec87c49fe76586513592/qt_macros/Cargo.toml#L14 only requires v1.0 so the patch version shouldn't matter.

Edit:

So, with cargo update -p $package --precise $version it's possible to force the version of a dependency in Cargo.lock. To get things to work without the PR, here's a workaround

cargo update -p serde_derive --precise 1.0.105
cargo update -p serde --precise 1.0.105
cargo update -p syn --precise 1.0.17

Versions gleaned from the https://github.com/rust-qt/examples/blob/master/Cargo.lock