From 32f7615cc897b9b15c7587c45ffbc1174d8b3ec9 Mon Sep 17 00:00:00 2001 From: Mac L Date: Mon, 15 Dec 2025 07:20:12 +0400 Subject: [PATCH] Update `syn` to `2.0.110` (#8563) #8547 We are currently using an older version of `syn` in `test_random_derive`. Updating this removes one of the sources of `syn` `1.0.109` in our dependency tree. Co-Authored-By: Mac L Co-Authored-By: Michael Sproul --- Cargo.lock | 2 +- Cargo.toml | 2 +- common/test_random_derive/src/lib.rs | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7383d4e1fe..6ed7bfd0b6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8920,7 +8920,7 @@ name = "test_random_derive" version = "0.2.0" dependencies = [ "quote", - "syn 1.0.109", + "syn 2.0.110", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index c2094a46ba..d5d1687c76 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -238,7 +238,7 @@ store = { path = "beacon_node/store" } strum = { version = "0.27", features = ["derive"] } superstruct = "0.10" swap_or_not_shuffle = { path = "consensus/swap_or_not_shuffle" } -syn = "1" +syn = "2" sysinfo = "0.26" system_health = { path = "common/system_health" } task_executor = { path = "common/task_executor" } diff --git a/common/test_random_derive/src/lib.rs b/common/test_random_derive/src/lib.rs index 3017936f1a..bf57d79aaa 100644 --- a/common/test_random_derive/src/lib.rs +++ b/common/test_random_derive/src/lib.rs @@ -8,7 +8,8 @@ use syn::{DeriveInput, parse_macro_input}; /// The field attribute is: `#[test_random(default)]` fn should_use_default(field: &syn::Field) -> bool { field.attrs.iter().any(|attr| { - attr.path.is_ident("test_random") && attr.tokens.to_string().replace(' ', "") == "(default)" + attr.path().is_ident("test_random") + && matches!(&attr.meta, syn::Meta::List(list) if list.tokens.to_string().replace(' ', "") == "default") }) }