Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
<!-- Event source location tracking -->
<!-- https://github.com/bevyengine/bevy/pull/16778 -->
<!-- Better source location tracking -->

<!-- TODO -->
Having a unified data model allows introspection and debugging tools to work for the entire engine:
For example, last release's `track_change_detection` feature flag lets you
automatically track by which line of source code any component (or resource) was inserted/mutated.

Now it also tracks which code
- triggered a hook or observer: `HookContext.caller`, `Trigger::caller()`
- sent an event: `EventId.caller`
- spawned or despawned an entity (until the entity index is reused): `EntityRef::spawned_by()`, `Entities::entity_get_spawned_or_despawned_by()`

And as a side effect, this leads to nicer error messages in some cases:
`Entity 0v1 was despawned by src/main.rs:10:11`.
Having outgrown its old name, the feature flag is now called `track_location`.
6 changes: 3 additions & 3 deletions release-content/0.16/release-notes/_release-notes.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ file_name = "unified_error_handling.md"

[[release_notes]]
title = "Better location tracking"
authors = ["@SpecificProtagonist"]
contributors = ["@alice-i-cecile", "Freya Pines", "@pin3-free", "@mweatherley"]
prs = [15607, 16047, 16778]
authors = ["@SpecificProtagonist", "@chescock"]
contributors = ["@alice-i-cecile", "Freya Pines", "@pin3-free", "@mweatherley", "@skimmedsquare"]
prs = [15607, 16047, 16778, 17075, 17602]
file_name = "16778_Event_source_location_tracking.md"

[[release_notes]]
Expand Down