Skip to content

Commit

Permalink
Revert "fix: feature-flag function reflection benchmarks"
Browse files Browse the repository at this point in the history
This reverts commit e4c29fb.
  • Loading branch information
BD103 committed Dec 19, 2024
1 parent e094b4d commit 806d8c5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
7 changes: 1 addition & 6 deletions benches/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ bevy_math = { path = "../crates/bevy_math" }
bevy_picking = { path = "../crates/bevy_picking", features = [
"bevy_mesh_picking_backend",
] }
bevy_reflect = { path = "../crates/bevy_reflect" }
bevy_reflect = { path = "../crates/bevy_reflect", features = ["functions"] }
bevy_render = { path = "../crates/bevy_render" }
bevy_tasks = { path = "../crates/bevy_tasks" }
bevy_utils = { path = "../crates/bevy_utils" }
Expand All @@ -27,11 +27,6 @@ glam = "0.29"
rand = "0.8"
rand_chacha = "0.3"

[features]
# Enabling function reflection currently breaks our `reflection_types` example due to feature-flag
# merging. Once function reflection is enabled by default this can be removed.
reflect_functions = ["bevy_reflect/functions"]

# Make `bevy_render` compile on Linux with x11 windowing. x11 vs. Wayland does not matter here
# because the benches do not actually open any windows.
[target.'cfg(target_os = "linux")'.dev-dependencies]
Expand Down
10 changes: 1 addition & 9 deletions benches/benches/bevy_reflect/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,16 @@

use criterion::criterion_main;

#[cfg(feature = "reflect_functions")]
mod function;
mod list;
mod map;
mod path;
mod r#struct;

criterion_main!(
function_benches,
function::benches,
list::benches,
map::benches,
path::benches,
r#struct::benches,
);

// The `criterion_main!` macro doesn't support `#[cfg(...)]` annotations, so we have to create a
// separate function instead.
fn function_benches() {
#[cfg(feature = "reflect_functions")]
function::benches();
}

0 comments on commit 806d8c5

Please sign in to comment.