bevy/examples/3d
Joona Aalto 7b1c9f192e
Adopt consistent FooSystems naming convention for system sets (#18900)
# Objective

Fixes a part of #14274.

Bevy has an incredibly inconsistent naming convention for its system
sets, both internally and across the ecosystem.

<img alt="System sets in Bevy"
src="https://github.com/user-attachments/assets/d16e2027-793f-4ba4-9cc9-e780b14a5a1b"
width="450" />

*Names of public system set types in Bevy*

Most Bevy types use a naming of `FooSystem` or just `Foo`, but there are
also a few `FooSystems` and `FooSet` types. In ecosystem crates on the
other hand, `FooSet` is perhaps the most commonly used name in general.
Conventions being so wildly inconsistent can make it harder for users to
pick names for their own types, to search for system sets on docs.rs, or
to even discern which types *are* system sets.

To reign in the inconsistency a bit and help unify the ecosystem, it
would be good to establish a common recommended naming convention for
system sets in Bevy itself, similar to how plugins are commonly suffixed
with `Plugin` (ex: `TimePlugin`). By adopting a consistent naming
convention in first-party Bevy, we can softly nudge ecosystem crates to
follow suit (for types where it makes sense to do so).

Choosing a naming convention is also relevant now, as the [`bevy_cli`
recently adopted
lints](https://github.com/TheBevyFlock/bevy_cli/pull/345) to enforce
naming for plugins and system sets, and the recommended naming used for
system sets is still a bit open.

## Which Name To Use?

Now the contentious part: what naming convention should we actually
adopt?

This was discussed on the Bevy Discord at the end of last year, starting
[here](<https://discord.com/channels/691052431525675048/692572690833473578/1310659954683936789>).
`FooSet` and `FooSystems` were the clear favorites, with `FooSet` very
narrowly winning an unofficial poll. However, it seems to me like the
consensus was broadly moving towards `FooSystems` at the end and after
the poll, with Cart
([source](https://discord.com/channels/691052431525675048/692572690833473578/1311140204974706708))
and later Alice
([source](https://discord.com/channels/691052431525675048/692572690833473578/1311092530732859533))
and also me being in favor of it.

Let's do a quick pros and cons list! Of course these are just what I
thought of, so take it with a grain of salt.

`FooSet`:

- Pro: Nice and short!
- Pro: Used by many ecosystem crates.
- Pro: The `Set` suffix comes directly from the trait name `SystemSet`.
- Pro: Pairs nicely with existing APIs like `in_set` and
`configure_sets`.
- Con: `Set` by itself doesn't actually indicate that it's related to
systems *at all*, apart from the implemented trait. A set of what?
- Con: Is `FooSet` a set of `Foo`s or a system set related to `Foo`? Ex:
`ContactSet`, `MeshSet`, `EnemySet`...

`FooSystems`:

- Pro: Very clearly indicates that the type represents a collection of
systems. The actual core concept, system(s), is in the name.
- Pro: Parallels nicely with `FooPlugins` for plugin groups.
- Pro: Low risk of conflicts with other names or misunderstandings about
what the type is.
- Pro: In most cases, reads *very* nicely and clearly. Ex:
`PhysicsSystems` and `AnimationSystems` as opposed to `PhysicsSet` and
`AnimationSet`.
- Pro: Easy to search for on docs.rs.
- Con: Usually results in longer names.
- Con: Not yet as widely used.

Really the big problem with `FooSet` is that it doesn't actually
describe what it is. It describes what *kind of thing* it is (a set of
something), but not *what it is a set of*, unless you know the type or
check its docs or implemented traits. `FooSystems` on the other hand is
much more self-descriptive in this regard, at the cost of being a bit
longer to type.

Ultimately, in some ways it comes down to preference and how you think
of system sets. Personally, I was originally in favor of `FooSet`, but
have been increasingly on the side of `FooSystems`, especially after
seeing what the new names would actually look like in Avian and now
Bevy. I prefer it because it usually reads better, is much more clearly
related to groups of systems than `FooSet`, and overall *feels* more
correct and natural to me in the long term.

For these reasons, and because Alice and Cart also seemed to share a
preference for it when it was previously being discussed, I propose that
we adopt a `FooSystems` naming convention where applicable.

## Solution

Rename Bevy's system set types to use a consistent `FooSet` naming where
applicable.

- `AccessibilitySystem` → `AccessibilitySystems`
- `GizmoRenderSystem` → `GizmoRenderSystems`
- `PickSet` → `PickingSystems`
- `RunFixedMainLoopSystem` → `RunFixedMainLoopSystems`
- `TransformSystem` → `TransformSystems`
- `RemoteSet` → `RemoteSystems`
- `RenderSet` → `RenderSystems`
- `SpriteSystem` → `SpriteSystems`
- `StateTransitionSteps` → `StateTransitionSystems`
- `RenderUiSystem` → `RenderUiSystems`
- `UiSystem` → `UiSystems`
- `Animation` → `AnimationSystems`
- `AssetEvents` → `AssetEventSystems`
- `TrackAssets` → `AssetTrackingSystems`
- `UpdateGizmoMeshes` → `GizmoMeshSystems`
- `InputSystem` → `InputSystems`
- `InputFocusSet` → `InputFocusSystems`
- `ExtractMaterialsSet` → `MaterialExtractionSystems`
- `ExtractMeshesSet` → `MeshExtractionSystems`
- `RumbleSystem` → `RumbleSystems`
- `CameraUpdateSystem` → `CameraUpdateSystems`
- `ExtractAssetsSet` → `AssetExtractionSystems`
- `Update2dText` → `Text2dUpdateSystems`
- `TimeSystem` → `TimeSystems`
- `AudioPlaySet` → `AudioPlaybackSystems`
- `SendEvents` → `EventSenderSystems`
- `EventUpdates` → `EventUpdateSystems`

A lot of the names got slightly longer, but they are also a lot more
consistent, and in my opinion the majority of them read much better. For
a few of the names I took the liberty of rewording things a bit;
definitely open to any further naming improvements.

There are still also cases where the `FooSystems` naming doesn't really
make sense, and those I left alone. This primarily includes system sets
like `Interned<dyn SystemSet>`, `EnterSchedules<S>`, `ExitSchedules<S>`,
or `TransitionSchedules<S>`, where the type has some special purpose and
semantics.

## Todo

- [x] Should I keep all the old names as deprecated type aliases? I can
do this, but to avoid wasting work I'd prefer to first reach consensus
on whether these renames are even desired.
- [x] Migration guide
- [x] Release notes
2025-05-06 15:18:03 +00:00
..
3d_scene.rs
3d_shapes.rs Add binned 2d/3d Wireframe render phase (#18587) 2025-04-09 21:34:53 +00:00
3d_viewport_to_world.rs Make Query::single (and friends) return a Result (#18082) 2025-03-02 19:51:56 +00:00
animated_material.rs aligning public apis of Time,Timer and Stopwatch (#15962) 2024-10-16 21:09:32 +00:00
anisotropy.rs Add a Sphere to anisotropy example (#17676) 2025-02-05 20:23:43 +00:00
anti_aliasing.rs Add bevy_anti_aliasing (#18323) 2025-03-19 18:40:32 +00:00
atmosphere.rs Procedural atmospheric scattering (#16314) 2025-01-23 22:52:46 +00:00
atmospheric_fog.rs Merge Style properties into Node. Use ComputedNode for computed properties. (#15975) 2024-10-18 22:25:33 +00:00
auto_exposure.rs Revert "Replace Ambient Lights with Environment Map Lights (#17482)" (#18167) 2025-03-05 23:08:46 +00:00
blend_modes.rs Allow clippy::too_many_arguments to lint without warnings (#17249) 2025-01-09 07:26:15 +00:00
bloom_3d.rs Anamorphic Bloom (#17096) 2025-01-06 18:43:21 +00:00
camera_sub_view.rs simplify example, replace get_single to Single Query (#16187) 2024-11-01 18:25:42 +00:00
clearcoat.rs Don't reëxport bevy_image from bevy_render (#16163) 2024-11-10 06:54:38 +00:00
clustered_decals.rs Disable clustered decals on Metal. (#17554) 2025-01-27 05:39:07 +00:00
color_grading.rs Relationships (non-fragmenting, one-to-many) (#17398) 2025-01-18 22:20:30 +00:00
decal.rs Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
deferred_rendering.rs Add bevy_anti_aliasing (#18323) 2025-03-19 18:40:32 +00:00
depth_of_field.rs Merge Style properties into Node. Use ComputedNode for computed properties. (#15975) 2024-10-18 22:25:33 +00:00
edit_material_on_gltf.rs Add edit_material_on_gltf example (#17677) 2025-02-05 22:45:20 +00:00
fog_volumes.rs Revert "Replace Ambient Lights with Environment Map Lights (#17482)" (#18167) 2025-03-05 23:08:46 +00:00
fog.rs Revert "Replace Ambient Lights with Environment Map Lights (#17482)" (#18167) 2025-03-05 23:08:46 +00:00
generate_custom_mesh.rs Make Query::single (and friends) return a Result (#18082) 2025-03-02 19:51:56 +00:00
irradiance_volumes.rs Revert "Replace Ambient Lights with Environment Map Lights (#17482)" (#18167) 2025-03-05 23:08:46 +00:00
lighting.rs Revert "Replace Ambient Lights with Environment Map Lights (#17482)" (#18167) 2025-03-05 23:08:46 +00:00
lightmaps.rs Revert "Replace Ambient Lights with Environment Map Lights (#17482)" (#18167) 2025-03-05 23:08:46 +00:00
lines.rs
load_gltf_extras.rs Merge Style properties into Node. Use ComputedNode for computed properties. (#15975) 2024-10-18 22:25:33 +00:00
load_gltf.rs aligning public apis of Time,Timer and Stopwatch (#15962) 2024-10-16 21:09:32 +00:00
mesh_ray_cast.rs Rename RayCastSettings to MeshRayCastSettings (#16703) 2024-12-10 03:27:42 +00:00
meshlet.rs Add external assets to .gitignore (#17388) 2025-01-17 01:20:14 +00:00
mixed_lighting.rs Switch ChildOf back to tuple struct (#18672) 2025-04-02 00:10:10 +00:00
motion_blur.rs Remove WebGL padding from MotionBlur (#18727) 2025-04-06 20:00:59 +00:00
occlusion_culling.rs Adopt consistent FooSystems naming convention for system sets (#18900) 2025-05-06 15:18:03 +00:00
order_independent_transparency.rs Relationships (non-fragmenting, one-to-many) (#17398) 2025-01-18 22:20:30 +00:00
orthographic.rs Improve API for scaling orthographic cameras (#15969) 2024-10-17 17:50:06 +00:00
parallax_mapping.rs Don't reëxport bevy_image from bevy_render (#16163) 2024-11-10 06:54:38 +00:00
parenting.rs aligning public apis of Time,Timer and Stopwatch (#15962) 2024-10-16 21:09:32 +00:00
pbr.rs Fix confusing comment in pbr example (#16996) 2024-12-29 22:45:17 +00:00
pcss.rs Add bevy_anti_aliasing (#18323) 2025-03-19 18:40:32 +00:00
post_processing.rs Merge Style properties into Node. Use ComputedNode for computed properties. (#15975) 2024-10-18 22:25:33 +00:00
query_gltf_primitives.rs Cosmetic tweaks to query_gltf_primitives (#16102) 2024-10-27 19:06:19 +00:00
reflection_probes.rs Merge Style properties into Node. Use ComputedNode for computed properties. (#15975) 2024-10-18 22:25:33 +00:00
render_to_texture.rs aligning public apis of Time,Timer and Stopwatch (#15962) 2024-10-16 21:09:32 +00:00
rotate_environment_map.rs Don't reëxport bevy_image from bevy_render (#16163) 2024-11-10 06:54:38 +00:00
scrolling_fog.rs Add bevy_anti_aliasing (#18323) 2025-03-19 18:40:32 +00:00
shadow_biases.rs Fix shadow_biases example (#18303) 2025-03-14 19:50:49 +00:00
shadow_caster_receiver.rs
skybox.rs Revert "Replace Ambient Lights with Environment Map Lights (#17482)" (#18167) 2025-03-05 23:08:46 +00:00
specular_tint.rs Revert "Replace Ambient Lights with Environment Map Lights (#17482)" (#18167) 2025-03-05 23:08:46 +00:00
spherical_area_lights.rs Revert "Replace Ambient Lights with Environment Map Lights (#17482)" (#18167) 2025-03-05 23:08:46 +00:00
split_screen.rs Store UI render target info locally per node (#17579) 2025-02-10 07:27:58 +00:00
spotlight.rs Revert "Replace Ambient Lights with Environment Map Lights (#17482)" (#18167) 2025-03-05 23:08:46 +00:00
ssao.rs Add bevy_anti_aliasing (#18323) 2025-03-19 18:40:32 +00:00
ssr.rs Add bevy_anti_aliasing (#18323) 2025-03-19 18:40:32 +00:00
texture.rs
tonemapping.rs Fix tonemapping example when using a local image (#19061) 2025-05-05 17:39:32 +00:00
transmission.rs Add bevy_anti_aliasing (#18323) 2025-03-19 18:40:32 +00:00
transparency_3d.rs Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
two_passes.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
update_gltf_scene.rs aligning public apis of Time,Timer and Stopwatch (#15962) 2024-10-16 21:09:32 +00:00
vertex_colors.rs
visibility_range.rs Switch ChildOf back to tuple struct (#18672) 2025-04-02 00:10:10 +00:00
volumetric_fog.rs Revert "Replace Ambient Lights with Environment Map Lights (#17482)" (#18167) 2025-03-05 23:08:46 +00:00
wireframe.rs Add binned 2d/3d Wireframe render phase (#18587) 2025-04-09 21:34:53 +00:00