Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Track callsite for observers & hooks #15607

Merged
Prev Previous commit
Next Next commit
address review comments
SpecificProtagonist committed Jan 22, 2025
commit f34cc9f159a660ad70d9bee2d69cd110292f73a5
2 changes: 1 addition & 1 deletion crates/bevy_ecs/src/hierarchy.rs
Original file line number Diff line number Diff line change
@@ -283,7 +283,7 @@ pub fn validate_parent_has_component<C: Component>(
// TODO: print name here once Name lives in bevy_ecs
let name: Option<String> = None;
warn!(
"{}warning[B0004]: {name} with the {ty_name} component has a parent without {ty_name}.\n\
"warning[B0004]: {}{name} with the {ty_name} component has a parent without {ty_name}.\n\
This will cause inconsistent behaviors! See: https://bevyengine.org/learn/errors/b0004",
caller.map(|c| format!("{c}: ")).unwrap_or_default(),
ty_name = ShortName::of::<C>(),
1 change: 0 additions & 1 deletion crates/bevy_ecs/src/world/entity_ref.rs
Original file line number Diff line number Diff line change
@@ -2196,7 +2196,6 @@ impl<'w> EntityWorldMut<'w> {
#[inline]
pub(crate) fn clear_with_caller(
&mut self,

#[cfg(feature = "track_location")] caller: &'static Location<'static>,
) -> &mut Self {
self.assert_not_despawned();