From 655a2f81b1c3b47c13924c299e2ff672b78175c3 Mon Sep 17 00:00:00 2001 From: eugineerd Date: Wed, 16 Jul 2025 21:59:54 +0000 Subject: [PATCH] use uuid again since `proc_macro::Span` isn't unique enough --- crates/bevy_reflect/derive/Cargo.toml | 5 ++++- crates/bevy_reflect/derive/src/impls/common.rs | 18 +----------------- 2 files changed, 5 insertions(+), 18 deletions(-) diff --git a/crates/bevy_reflect/derive/Cargo.toml b/crates/bevy_reflect/derive/Cargo.toml index 3a2e8ef008..fbe2a00bcd 100644 --- a/crates/bevy_reflect/derive/Cargo.toml +++ b/crates/bevy_reflect/derive/Cargo.toml @@ -23,7 +23,7 @@ auto_register = [] # Enables automatic reflection using inventory. Not supported on all platforms. auto_register_inventory = ["auto_register"] # Enables automatic reflection on platforms not supported by inventory. See `load_type_registrations` for more info. -auto_register_static = ["auto_register"] +auto_register_static = ["auto_register", "dep:uuid"] [dependencies] bevy_macro_utils = { path = "../../bevy_macro_utils", version = "0.17.0-dev" } @@ -31,6 +31,9 @@ indexmap = "2.0" proc-macro2 = "1.0" quote = "1.0" syn = { version = "2.0", features = ["full", "extra-traits"] } +uuid = { version = "1.13.1", default-features = false, features = [ + "v4", +], optional = true } [target.'cfg(target_arch = "wasm32")'.dependencies] # TODO: Assuming all wasm builds are for the browser. Require `no_std` support to break assumption. diff --git a/crates/bevy_reflect/derive/src/impls/common.rs b/crates/bevy_reflect/derive/src/impls/common.rs index 8824fdcb10..eed7e22455 100644 --- a/crates/bevy_reflect/derive/src/impls/common.rs +++ b/crates/bevy_reflect/derive/src/impls/common.rs @@ -169,11 +169,8 @@ pub fn reflect_auto_registration(meta: &ReflectMeta) -> Option Option