Skip to content

Commit 595a090

Browse files
committed
Merge remote-tracking branch 'upstream/main' into new-bundle
2 parents 6c28eb4 + c549b9e commit 595a090

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+986
-790
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ jobs:
293293
steps:
294294
- uses: actions/checkout@v4
295295
- name: Check for typos
296-
uses: crate-ci/typos@v1.32.0
296+
uses: crate-ci/typos@v1.33.1
297297
- name: Typos info
298298
if: failure()
299299
run: |

crates/bevy_app/src/app.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1484,8 +1484,8 @@ mod tests {
14841484
component::Component,
14851485
entity::Entity,
14861486
event::{Event, EventWriter, Events},
1487+
lifecycle::RemovedComponents,
14871488
query::With,
1488-
removal_detection::RemovedComponents,
14891489
resource::Resource,
14901490
schedule::{IntoScheduleConfigs, ScheduleLabel},
14911491
system::{Commands, Query},

crates/bevy_app/src/propagate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ use bevy_ecs::{
66
component::Component,
77
entity::Entity,
88
hierarchy::ChildOf,
9+
lifecycle::RemovedComponents,
910
query::{Changed, Or, QueryFilter, With, Without},
1011
relationship::{Relationship, RelationshipTarget},
11-
removal_detection::RemovedComponents,
1212
schedule::{IntoScheduleConfigs, SystemSet},
1313
system::{Commands, Local, Query},
1414
};

crates/bevy_core_pipeline/src/oit/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! Order Independent Transparency (OIT) for 3d rendering. See [`OrderIndependentTransparencyPlugin`] for more details.
22
33
use bevy_app::prelude::*;
4-
use bevy_ecs::{component::*, prelude::*};
4+
use bevy_ecs::{component::*, lifecycle::ComponentHook, prelude::*};
55
use bevy_math::UVec2;
66
use bevy_platform::collections::HashSet;
77
use bevy_platform::time::Instant;

crates/bevy_ecs/compile_fail/tests/ui/component_hook_relationship.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,4 @@ mod case4 {
6060
pub struct BarTargetOf(Entity);
6161
}
6262

63-
fn foo_hook(_world: bevy_ecs::world::DeferredWorld, _ctx: bevy_ecs::component::HookContext) {}
63+
fn foo_hook(_world: bevy_ecs::world::DeferredWorld, _ctx: bevy_ecs::lifecycle::HookContext) {}

crates/bevy_ecs/macros/src/component.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ impl HookAttributeKind {
434434
HookAttributeKind::Path(path) => path.to_token_stream(),
435435
HookAttributeKind::Call(call) => {
436436
quote!({
437-
fn _internal_hook(world: #bevy_ecs_path::world::DeferredWorld, ctx: #bevy_ecs_path::component::HookContext) {
437+
fn _internal_hook(world: #bevy_ecs_path::world::DeferredWorld, ctx: #bevy_ecs_path::lifecycle::HookContext) {
438438
(#call)(world, ctx)
439439
}
440440
_internal_hook
@@ -658,7 +658,7 @@ fn hook_register_function_call(
658658
) -> Option<TokenStream2> {
659659
function.map(|meta| {
660660
quote! {
661-
fn #hook() -> ::core::option::Option<#bevy_ecs_path::component::ComponentHook> {
661+
fn #hook() -> ::core::option::Option<#bevy_ecs_path::lifecycle::ComponentHook> {
662662
::core::option::Option::Some(#meta)
663663
}
664664
}

crates/bevy_ecs/src/archetype.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -693,39 +693,39 @@ impl Archetype {
693693

694694
/// Returns true if any of the components in this archetype have at least one [`OnAdd`] observer
695695
///
696-
/// [`OnAdd`]: crate::world::OnAdd
696+
/// [`OnAdd`]: crate::lifecycle::OnAdd
697697
#[inline]
698698
pub fn has_add_observer(&self) -> bool {
699699
self.flags().contains(ArchetypeFlags::ON_ADD_OBSERVER)
700700
}
701701

702702
/// Returns true if any of the components in this archetype have at least one [`OnInsert`] observer
703703
///
704-
/// [`OnInsert`]: crate::world::OnInsert
704+
/// [`OnInsert`]: crate::lifecycle::OnInsert
705705
#[inline]
706706
pub fn has_insert_observer(&self) -> bool {
707707
self.flags().contains(ArchetypeFlags::ON_INSERT_OBSERVER)
708708
}
709709

710710
/// Returns true if any of the components in this archetype have at least one [`OnReplace`] observer
711711
///
712-
/// [`OnReplace`]: crate::world::OnReplace
712+
/// [`OnReplace`]: crate::lifecycle::OnReplace
713713
#[inline]
714714
pub fn has_replace_observer(&self) -> bool {
715715
self.flags().contains(ArchetypeFlags::ON_REPLACE_OBSERVER)
716716
}
717717

718718
/// Returns true if any of the components in this archetype have at least one [`OnRemove`] observer
719719
///
720-
/// [`OnRemove`]: crate::world::OnRemove
720+
/// [`OnRemove`]: crate::lifecycle::OnRemove
721721
#[inline]
722722
pub fn has_remove_observer(&self) -> bool {
723723
self.flags().contains(ArchetypeFlags::ON_REMOVE_OBSERVER)
724724
}
725725

726726
/// Returns true if any of the components in this archetype have at least one [`OnDespawn`] observer
727727
///
728-
/// [`OnDespawn`]: crate::world::OnDespawn
728+
/// [`OnDespawn`]: crate::lifecycle::OnDespawn
729729
#[inline]
730730
pub fn has_despawn_observer(&self) -> bool {
731731
self.flags().contains(ArchetypeFlags::ON_DESPAWN_OBSERVER)

crates/bevy_ecs/src/bundle.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,13 @@ use crate::{
6666
RequiredComponents, StorageType, Tick,
6767
},
6868
entity::{Entities, Entity, EntityLocation},
69+
lifecycle::{ON_ADD, ON_INSERT, ON_REMOVE, ON_REPLACE},
6970
observer::Observers,
7071
prelude::World,
7172
query::DebugCheckedUnwrap,
7273
relationship::RelationshipHookMode,
7374
storage::{SparseSetIndex, SparseSets, Storages, Table, TableRow},
74-
world::{
75-
unsafe_world_cell::UnsafeWorldCell, EntityWorldMut, ON_ADD, ON_INSERT, ON_REMOVE,
76-
ON_REPLACE,
77-
},
75+
world::{unsafe_world_cell::UnsafeWorldCell, EntityWorldMut},
7876
};
7977
use alloc::{boxed::Box, vec, vec::Vec};
8078
use bevy_platform::collections::{HashMap, HashSet};
@@ -2700,7 +2698,7 @@ impl<E: BundleEffect> BundleEffect for Vec<E> {
27002698
#[cfg(test)]
27012699
mod tests {
27022700
use crate::{
2703-
archetype::ArchetypeCreated, component::HookContext, prelude::*, world::DeferredWorld,
2701+
archetype::ArchetypeCreated, lifecycle::HookContext, prelude::*, world::DeferredWorld,
27042702
};
27052703
use alloc::{boxed::Box, vec};
27062704

0 commit comments

Comments
 (0)