From 61b42b9f288b9a724a75ce91a575aeaaf045eb4b Mon Sep 17 00:00:00 2001 From: Jonathan Cornaz Date: Tue, 23 Nov 2021 22:51:46 +0100 Subject: [PATCH] fix(macro_utils): get_path not considering that the crate maybe directly used --- crates/bevy_macro_utils/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/bevy_macro_utils/src/lib.rs b/crates/bevy_macro_utils/src/lib.rs index 98e72e6a89e26..c3e68c4a4964e 100644 --- a/crates/bevy_macro_utils/src/lib.rs +++ b/crates/bevy_macro_utils/src/lib.rs @@ -34,7 +34,9 @@ impl BevyManifest { const BEVY_INTERNAL: &str = "bevy_internal"; let find_in_deps = |deps: &DepsSet| -> Option { - let package = if let Some(dep) = deps.get(BEVY) { + let package = if let Some(dep) = deps.get(name) { + return Some(get_path(dep.package().unwrap_or(name))); + } else if let Some(dep) = deps.get(BEVY) { dep.package().unwrap_or(BEVY) } else if let Some(dep) = deps.get(BEVY_INTERNAL) { dep.package().unwrap_or(BEVY_INTERNAL)