bevy/crates
Ben Frankel 7cb97852a5
Remove second generic from .add_before, .add_after (#14285)
# Objective

```rust
// Currently:
builder.add_after::<FooPlugin, _>(BarPlugin);
// After this PR:
builder.add_after::<FooPlugin>(BarPlugin);
```

This removes some weirdness and better parallels the rest of the
`PluginGroupBuilder` API.

## Solution

Define a helper method `type_id_of_val` to use in `.add_before` and
`.add_after` instead of `TypeId::of::<T>` (which requires the plugin
type to be nameable, preventing `impl Plugin` from being used).

## Testing

Ran `cargo run -p ci lints` successfully.

## Migration Guide

Removed second generic from `PluginGroupBuilder` methods: `add_before`
and `add_after`.

```rust
// Before:
DefaultPlugins
    .build()
    .add_before::<WindowPlugin, _>(FooPlugin)
    .add_after::<WindowPlugin, _>(BarPlugin)

// After:
DefaultPlugins
    .build()
    .add_before::<WindowPlugin>(FooPlugin)
    .add_after::<WindowPlugin>(BarPlugin)
```

---------

Co-authored-by: BD103 <59022059+BD103@users.noreply.github.com>
2024-07-15 15:58:14 +00:00
..
bevy_a11y Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_animation Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_app Remove second generic from .add_before, .add_after (#14285) 2024-07-15 15:58:14 +00:00
bevy_asset add debug logging to ascertain the base path the asset server is using (#13820) 2024-07-15 14:00:43 +00:00
bevy_audio Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_color Fix intra-doc links and make CI test them (#14076) 2024-07-11 13:08:31 +00:00
bevy_core Rename bevy_core::name::DebugName to bevy_core::name::NameOrEntity (#14211) 2024-07-15 15:21:41 +00:00
bevy_core_pipeline Add support for skybox transformation (#14267) 2024-07-15 15:53:20 +00:00
bevy_derive Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_dev_tools Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_diagnostic Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_dylib Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_dynamic_plugin Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_ecs Fix inaccurate docs for Commands::spawn_empty (#14234) 2024-07-15 15:32:20 +00:00
bevy_encase_derive Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_gilrs Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_gizmos Fix intra-doc links and make CI test them (#14076) 2024-07-11 13:08:31 +00:00
bevy_gltf Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_hierarchy Minimal Bubbling Observers (#13991) 2024-07-15 13:39:41 +00:00
bevy_input Expose Winit's KeyEvent::repeat in KeyboardInput (#14161) 2024-07-15 14:52:33 +00:00
bevy_internal bevy_reflect: Feature-gate function reflection (#14174) 2024-07-14 15:55:31 +00:00
bevy_log Fix intra-doc links and make CI test them (#14076) 2024-07-11 13:08:31 +00:00
bevy_macro_utils Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_math bevy_math: faster sphere sampling (#14168) 2024-07-15 15:01:18 +00:00
bevy_mikktspace Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_pbr Faster MeshletMesh deserialization (#14193) 2024-07-15 15:06:02 +00:00
bevy_picking Fix intra-doc links and make CI test them (#14076) 2024-07-11 13:08:31 +00:00
bevy_ptr Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_reflect Implement FromIterator/IntoIterator for dynamic types (#14250) 2024-07-15 15:38:11 +00:00
bevy_render Fix overflow in RenderLayers::iter_layers (#14264) 2024-07-15 15:50:36 +00:00
bevy_scene Align Scene::write_to_world_with to match DynamicScene::write_to_world_with (#13855) 2024-07-15 14:04:09 +00:00
bevy_sprite Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_state Make initial StateTransition run before PreStartup (#14208) 2024-07-15 15:08:54 +00:00
bevy_tasks Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_text Fix intra-doc links and make CI test them (#14076) 2024-07-11 13:08:31 +00:00
bevy_time Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_transform Fix intra-doc links and make CI test them (#14076) 2024-07-11 13:08:31 +00:00
bevy_ui Clean up UiSystem system sets (#14228) 2024-07-15 15:27:38 +00:00
bevy_utils Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_window Fix intra-doc links and make CI test them (#14076) 2024-07-11 13:08:31 +00:00
bevy_winit Expose Winit's KeyEvent::repeat in KeyboardInput (#14161) 2024-07-15 14:52:33 +00:00