-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Globally upgrade to syn 2.x and latest quote and proc_macro2 1x versions #13846
Globally upgrade to syn 2.x and latest quote and proc_macro2 1x versions #13846
Conversation
converting to draft because it looks like we might need some companions |
cumulus is already on syn 2.x and the latest for the other crates so no need for a cumulus companion |
Then not updating syn to 2.x makes no sense. |
Could you please just update to 2.x for syn? In general, cargo unifies across patch/minor releases which you already see with your pr here. You changed multiple Cargo.toml files, but the Cargo.lock wasn't changed. This means that we already used these versions. |
Yes, let me do that |
actually @bkchr it seems to be non-trivial. Upgrading to syn 2.x I get a ton of errors on substrate. For some reason cumulus is fine with it though |
Yes, we should update to @sam0x17 From a practical point of view it'd be the best to just update the deps to v2 one-by-one and fix the errors as you go. |
Cumulus probably proc-macro isn't that complex and maybe uses an api that didn't changed! |
note, will need to get drahnr/expander#6 merged if we want to do syn 2.x |
|
@bkchr I can't get polkadot to build with syn 2.0 without upgrading expander's syn to 2.0 as well. There is a very subtle conflict on Also, things that aren't ready to upgrade to syn 2 could just not use the new expander version and be fine I would think side note: upgrading expander was as simple as changing the version in Cargo.toml, so should be backwards compatible generally (other than this particular issue I would think) |
There is no commit on the companion. |
Pushed an hour or so ago:
|
This one causes the failure paritytech/polkadot@1c63df9 |
This is the error @bkchr, took me a good bit to figure out that it is because of syn versions: I tried a bunch of things to fix it including creating a new wrapper type |
So he accepted my PR, though no new release has been cut yet. I just pushed up a test commit manually updating the version of expander to use the latest git just to confirm that CI passes with it. Will remove that once he cuts a new release |
bot rebase |
Error: Command 'Command { std: cd "/storage/repositories/substrate" && "git" "merge" "origin/master" "--no-ff" "--no-edit", kill_on_drop: false }' failed with status Some(1); output: no output |
21f5c41
to
445a619
Compare
You don't really need to wait for him to publish -- you said before that |
he published an hour after he accepted my PR apparently so we good |
bot merge |
…ons (paritytech#13846) * globally upgrade quote to latest 1.0.x (1.0.26) * globally upgrade syn to final 1.0.x version (1.0.109) * globally upgrade proc-macro2 to 1.0.56 * upgrade to syn v2.0.13 and fix everything except NestedMeta * fix parse nested metadata code in decl_runtime_apis.rs * Port more stuff to syn 2.0 * Make the rest compile * Ignore error * update to syn 2.0.14 --------- Co-authored-by: Bastian Köcher <info@kchr.de>
polkadot companion: paritytech/polkadot#7022
Description
We have a lot of different versions of dtolnay's quote/syn/proc-macro2 crates floating around. Dtolnay recently came out with syn 2.x
This PR sets all versions of proc-macro2, syn, and quote to the versions listed below, which at the time of writing are the latest 1.x version for each crate (or 2.x in the case of syn)
This should improve compile-times since only one version of these crates will be compiled globally, and will also reduce confusing edge cases due to version differences
Crates Upgraded
proc-macro2 => 1.0.56
syn => 2.0.14
quote => 1.0.26