bevy/crates
BD103 20277006ce
Add benchmarks and compile_fail tests back to workspace (#16858)
# Objective

- Our benchmarks and `compile_fail` tests lag behind the rest of the
engine because they are not in the Cargo workspace, so not checked by
CI.
- Fixes #16801, please see it for further context!

## Solution

- Add benchmarks and `compile_fail` tests to the Cargo workspace.
- Fix any leftover formatting issues and documentation.

## Testing

- I think CI should catch most things!

## Questions

<details>
<summary>Outdated issue I was having with function reflection being
optional</summary>

The `reflection_types` example is failing in Rust-Analyzer for me, but
not a normal check.

```rust
error[E0004]: non-exhaustive patterns: `ReflectRef::Function(_)` not covered
   --> examples/reflection/reflection_types.rs:81:11
    |
81  |     match value.reflect_ref() {
    |           ^^^^^^^^^^^^^^^^^^^ pattern `ReflectRef::Function(_)` not covered
    |
note: `ReflectRef<'_>` defined here
   --> /Users/bdeep/dev/bevy/bevy/crates/bevy_reflect/src/kind.rs:178:1
    |
178 | pub enum ReflectRef<'a> {
    | ^^^^^^^^^^^^^^^^^^^^^^^
...
188 |     Function(&'a dyn Function),
    |     -------- not covered
    = note: the matched value is of type `ReflectRef<'_>`
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
126 ~         ReflectRef::Opaque(_) => {},
127 +         ReflectRef::Function(_) => todo!()
    |
```

I think it is because the following line is feature-gated:


cc0f6a8db4/examples/reflection/reflection_types.rs (L117-L122)

My theory for why this is happening is because the benchmarks enabled
`bevy_reflect`'s `function` feature, which gets merged with the rest of
the features when RA checks the workspace, but the `#[cfg(...)]` gate in
the example isn't detecting it:


cc0f6a8db4/benches/Cargo.toml (L19)

Any thoughts on how to fix this? It's not blocking, since the example
still compiles as normal, but it's just RA and the command `cargo check
--workspace --all-targets` appears to fail.

</summary>
2024-12-21 22:30:29 +00:00
..
bevy_a11y Replace bevy_a11y::Focus with InputFocus (#16863) 2024-12-18 00:16:19 +00:00
bevy_animation Remove bevy_core (#16897) 2024-12-19 18:36:51 +00:00
bevy_app Remove bevy_core (#16897) 2024-12-19 18:36:51 +00:00
bevy_asset Remove bevy_core (#16897) 2024-12-19 18:36:51 +00:00
bevy_audio Move Volume and GlobalVolume to own file (#16838) 2024-12-16 19:28:30 +00:00
bevy_color Deny derive_more error feature and replace it with thiserror (#16684) 2024-12-06 17:03:55 +00:00
bevy_core_pipeline Remove bevy_core (#16897) 2024-12-19 18:36:51 +00:00
bevy_derive Add benchmarks and compile_fail tests back to workspace (#16858) 2024-12-21 22:30:29 +00:00
bevy_dev_tools Draw the UI debug overlay using the UI renderer (#16693) 2024-12-11 00:49:47 +00:00
bevy_diagnostic Remove bevy_core (#16897) 2024-12-19 18:36:51 +00:00
bevy_dylib Generate links to definition in source code pages on docs.rs and dev-docs.bevyengine.org (#12965) 2024-07-29 23:10:16 +00:00
bevy_ecs Remove unused generic in DeferredWorld::trigger (#16911) 2024-12-21 04:15:22 +00:00
bevy_encase_derive Rust 1.83, allow -> expect (missing_docs) (#16561) 2024-12-16 23:27:57 +00:00
bevy_gilrs Deny derive_more error feature and replace it with thiserror (#16684) 2024-12-06 17:03:55 +00:00
bevy_gizmos Add dashed lines (#16884) 2024-12-18 20:43:58 +00:00
bevy_gltf Remove bevy_core (#16897) 2024-12-19 18:36:51 +00:00
bevy_hierarchy Remove bevy_core (#16897) 2024-12-19 18:36:51 +00:00
bevy_image Rust 1.83, allow -> expect (missing_docs) (#16561) 2024-12-16 23:27:57 +00:00
bevy_input Remove bevy_core (#16897) 2024-12-19 18:36:51 +00:00
bevy_input_focus Remove SetInputFocus helper trait (#16888) 2024-12-19 00:40:10 +00:00
bevy_internal Remove bevy_core (#16897) 2024-12-19 18:36:51 +00:00
bevy_log Use en-us locale for typos (#16037) 2024-10-20 18:55:17 +00:00
bevy_macro_utils Use one BevyManifest instance in proc macros (#16766) 2024-12-15 15:00:05 +00:00
bevy_math f32 -> Rot2 in bounding volume docs (#16848) 2024-12-17 00:12:49 +00:00
bevy_mesh Rust 1.83, allow -> expect (missing_docs) (#16561) 2024-12-16 23:27:57 +00:00
bevy_mikktspace Rust 1.83, allow -> expect (missing_docs) (#16561) 2024-12-16 23:27:57 +00:00
bevy_pbr make EntityHashMap and EntityHashSet proper types (#16912) 2024-12-20 20:55:45 +00:00
bevy_picking Rust 1.83, allow -> expect (missing_docs) (#16561) 2024-12-16 23:27:57 +00:00
bevy_ptr Fix MSRVs for standalone crates (#16333) 2024-11-17 09:38:13 +00:00
bevy_reflect Replace impl_param_set proc macro with a macro_rules macro (#16847) 2024-12-18 18:30:46 +00:00
bevy_remote BRP strict field in query (#16725) 2024-12-14 05:22:19 +00:00
bevy_render Remove bevy_core (#16897) 2024-12-19 18:36:51 +00:00
bevy_scene Add missing #[reflect(Component, Default)] to SceneRoot and DynamicSceneRoot. (#16816) 2024-12-15 19:18:22 +00:00
bevy_sprite Change GpuImage::size from UVec2 to Extent3d (#16815) 2024-12-17 19:08:09 +00:00
bevy_state Replace impl_param_set proc macro with a macro_rules macro (#16847) 2024-12-18 18:30:46 +00:00
bevy_tasks Remove bevy_core (#16897) 2024-12-19 18:36:51 +00:00
bevy_text fix tiny copy-paste mistake in bevy_text::font_atlas_set (#16667) 2024-12-10 03:17:09 +00:00
bevy_time Use en-us locale for typos (#16037) 2024-10-20 18:55:17 +00:00
bevy_transform track_change_detection: Also track spawns/despawns (#16047) 2024-12-17 04:46:31 +00:00
bevy_ui Change GpuImage::size from UVec2 to Extent3d (#16815) 2024-12-17 19:08:09 +00:00
bevy_utils Add no_std support to bevy_ecs (#16758) 2024-12-17 21:40:36 +00:00
bevy_window Replace bevy_a11y::Focus with InputFocus (#16863) 2024-12-18 00:16:19 +00:00
bevy_winit Replace bevy_a11y::Focus with InputFocus (#16863) 2024-12-18 00:16:19 +00:00