Fix detailed_trace! (#16452)

Alternative to #16450 

# Objective

detailed_trace! in its current form does not work  (and breaks CI)

## Solution

Fix detailed_trace by checking for the feature properly, adding it to
the correct crates, and removing it from the incorrect crates
This commit is contained in:
Carter Anderson 2024-11-20 14:01:33 -08:00 committed by GitHub
parent 4a6b686832
commit deda3f2522
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 4 additions and 3 deletions

View file

@ -18,6 +18,7 @@ bevy_debug_stepping = []
serialize = ["dep:serde"] serialize = ["dep:serde"]
track_change_detection = [] track_change_detection = []
reflect_functions = ["bevy_reflect", "bevy_reflect/functions"] reflect_functions = ["bevy_reflect", "bevy_reflect/functions"]
detailed_trace = []
[dependencies] [dependencies]
bevy_ptr = { path = "../bevy_ptr", version = "0.15.0-dev" } bevy_ptr = { path = "../bevy_ptr", version = "0.15.0-dev" }

View file

@ -24,7 +24,7 @@ trace = [
trace_chrome = ["bevy_log/tracing-chrome"] trace_chrome = ["bevy_log/tracing-chrome"]
trace_tracy = ["bevy_render?/tracing-tracy", "bevy_log/tracing-tracy"] trace_tracy = ["bevy_render?/tracing-tracy", "bevy_log/tracing-tracy"]
trace_tracy_memory = ["bevy_log/trace_tracy_memory"] trace_tracy_memory = ["bevy_log/trace_tracy_memory"]
detailed_trace = ["bevy_utils/detailed_trace"] detailed_trace = ["bevy_ecs/detailed_trace", "bevy_render?/detailed_trace"]
sysinfo_plugin = ["bevy_diagnostic/sysinfo_plugin"] sysinfo_plugin = ["bevy_diagnostic/sysinfo_plugin"]

View file

@ -30,6 +30,7 @@ ci_limits = []
webgl = ["wgpu/webgl"] webgl = ["wgpu/webgl"]
webgpu = ["wgpu/webgpu"] webgpu = ["wgpu/webgpu"]
ios_simulator = [] ios_simulator = []
detailed_trace = []
[dependencies] [dependencies]
# bevy # bevy

View file

@ -18,7 +18,6 @@ std = [
"ahash/runtime-rng", "ahash/runtime-rng",
] ]
alloc = ["hashbrown/default"] alloc = ["hashbrown/default"]
detailed_trace = []
serde = ["hashbrown/serde"] serde = ["hashbrown/serde"]
[dependencies] [dependencies]

View file

@ -411,7 +411,7 @@ pub fn error<E: Debug>(result: Result<(), E>) {
#[macro_export] #[macro_export]
macro_rules! detailed_trace { macro_rules! detailed_trace {
($($tts:tt)*) => { ($($tts:tt)*) => {
if cfg!(detailed_trace) { if cfg!(feature = "detailed_trace") {
$crate::tracing::trace!($($tts)*); $crate::tracing::trace!($($tts)*);
} }
} }