mirror of
https://github.com/bevyengine/bevy
synced 2024-11-25 22:20:20 +00:00
f1f07bec09
# Objective When trying to test a gizmos change I ran `cargo test -p bevy_gizmos` and the output had a lot of noise from warnings and failed doc errors. This was because I didn't have all of the features enabled. ## Solution I admit this might be pedantic, and am happy if the concensus is to reject it. Although it does reduce the lines of code, testing noise, and the amount of code compiled. I don't think it affects the complexity of public code, and it doesn't change much to the complexity of internal code. I've removed un-needed `bevy_render` imports in all of the gizmos docs examples, there's probably other unnecessary ones there too, but I haven't looked exhaustively. It isn't needed for those docs, and isn't available except in a subset of `cfg` combinations. I've also made several of the `use` statements slightly more specific. I shouldn't have changed the public interfaces, except that `GizmoMeshConfig` requires either `bevy_sprite` or `bevy_pbr`, as it does nothing without them. I've also avoided adding some systems and plugins in situations where they can't work. An example of this is where the `light` module depends on `all(feature = "bevy_pbr", feature = "bevy_render")`, but it has `use` statements that only require `bevy_render`. ## Testing During development I ran: ``` cargo check -p bevy_gizmos && cargo check -p bevy_gizmos --features=bevy_pbr && cargo check -p bevy_gizmos --features=bevy_sprite && cargo check -p bevy_gizmos --features=bevy_render ``` Afterwards I ran this just to be sure: ``` cargo check && cargo check --features=bevy_pbr && cargo check --features=bevy_sprite && cargo check --features=bevy_render ``` Finally I ran: ``` cargo test -p bevy_gizmos && cargo test -p bevy_gizmos --features=bevy_pbr && test check -p bevy_gizmos --features=bevy_sprite && cargo test -p bevy_gizmos --features=bevy_render ``` ## Migration Guide There shouldn't be any reason to migrate, although if for some reason you use `GizmoMeshConfig` and `bevy_render` but not `bevy_pbr` or `bevy_sprite` (such that it does nothing), then you will get an error that it no longer exists. |
||
---|---|---|
.. | ||
macros | ||
src | ||
Cargo.toml | ||
README.md |