jam1garner / binrw

A Rust crate for helping parse and rebuild binary data using ✨macro magic✨.
https://binrw.rs
MIT License
620 stars 36 forks source link

[Feature Request] update syn version in `binrw_derive` to `2` #285

Open Neutron3529 opened 3 months ago

Neutron3529 commented 3 months ago

Currently lots of famous crate, including clap_derive, thiserror_impl uses syn with version 2, updating the version of syn to 2 might save several seconds of compile time.

I'm just wondering whether there exists such plan, since I tried update the syn version, but failed since impl<T> quote::spanned::Spanned for SpannedValue<T> never possible due to the :Sealed limitation.

I have to firstly read the full code and then I can updating the code.

I know how much the work is, thus I'm just wonder.

csnover commented 3 months ago

That trait sealing change is why the version is not updated. There’s no plan to update unless someone else does the work. Getting syn to do what we need it to do sucked (due to a combination of missing specialisation in rustc and the design of syn making it impossible to get access to certain things, though I don’t remember any more what those things are).

Neutron3529 commented 3 months ago

Thank you for your reply, feel free to close such issue if it is needed:) (or keep it open until someone decided to help update the syn version to 2)