🤖 Flesh out bevy-0.19 and bevy-upgrade skills from research

Replace scaffold placeholders with full skill content:
- bevy-0.19: ECS cheat sheet, critical traps table, architecture guide, and 7 reference files
- bevy-upgrade: version migration workflow, transition references for 0.15→0.19, and 3 per-bump reference files
This commit is contained in:
2026-07-07 17:52:10 +02:00
parent 325e278af1
commit c661027d19
14 changed files with 927 additions and 53 deletions
@@ -0,0 +1,36 @@
# 0.18 → 0.19
Smaller than 0.17→0.18 but with one deep semantic change: resources became components. Official guide for the long tail: `https://bevy.org/learn/migration-guides/0-18-to-0-19/`.
## Renames & moves (mechanical)
| Old (0.18) | New (0.19) |
|------------|-----------|
| `Scene` / `SceneRoot` | `WorldAsset` / `WorldAssetRoot` |
| `AssetPath::resolve(&str)` / `resolve_embed(&str)` | `resolve_str()` / `resolve_embed_str()` (`resolve()`/`resolve_embed()` now take `&AssetPath`) |
| `Hdr` in `bevy_render` | `bevy_camera` |
| `Camera` screen-space specular transmission fields | `ScreenSpaceTransmission` component |
## API shape changes
- **`Assets::get_mut`** returns `AssetMut<A>` (mutation-tracked), not `&mut A`. Deref for access; code storing the `&mut A` needs restructuring.
- **`Ref<T>.clone()`** returns `Ref<T>`, not the inner value. Old code relying on clone-through must use `ref.deref().clone()`.
- **GLTF material loading** returns `GltfMaterial`; request a `StandardMaterial` with the `#Material0/std` label suffix.
- **`EntityComponentsTrigger`** gained archetype fields — exhaustive destructuring breaks; add `..`:
`let EntityComponentsTrigger { components, .. } = e.trigger();`
## Semantic shifts (audit, don't just compile)
- **Resources are components on abstract entities.** Consequences:
- `Query<Entity>` and other very broad queries now match resource entities. Any "iterate all entities" logic (cleanup sweeps, entity counts, serialization, debug overlays) silently includes resources — filter with `Without<IsResource>`.
- A type can no longer derive both `Component` and `Resource`. Split such types or pick one role.
- **Scene rename is semantic-adjacent**: `WorldAsset` naming reflects the same data model, but grep for the old names in strings/reflection paths, not just types.
## Porting checklist
1. `grep -rn "SceneRoot\|Scene>" ` — rename to `WorldAssetRoot`/`WorldAsset`.
2. `grep -rn "Query<Entity[,>]"` and other broad queries — add `Without<IsResource>` where resources must not appear.
3. `grep -rn "derive(Component" | grep "Resource"` — find dual-derive types; split them.
4. `grep -rn "get_mut" ` on `Assets<...>` — adapt to `AssetMut`.
5. `grep -rn "EntityComponentsTrigger {"` — add `..` to destructuring.
6. GLTF material handles — append `/std` labels where `StandardMaterial` is expected.