bevy/crates/bevy_hierarchy/src
aecsocket 81db6ec70a
Fix bevy_hierarchy failing to compile without reflect feature (#16428)
# Objective

Run this without this PR:
`cargo build -p bevy_hierarchy --no-default-features`

You'll get:
```
error[E0432]: unresolved import `bevy_reflect`
 --> crates/bevy_hierarchy/src/events.rs:2:5
  |
2 | use bevy_reflect::Reflect;
  |     ^^^^^^^^^^^^ use of undeclared crate or module `bevy_reflect`

For more information about this error, try `rustc --explain E0432`.
error: could not compile `bevy_hierarchy` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
```

Because of this line:
```rs
use bevy_reflect::Reflect;

#[derive(Event, Debug, Clone, PartialEq, Eq)]
#[cfg_attr(feature = "reflect", derive(Reflect), reflect(Debug, PartialEq))]
pub enum HierarchyEvent { .. }
```

## Solution

use FQN: `derive(bevy_reflect::Reflect)`

## Testing

`cargo build -p bevy_hierarchy --no-default-features`
2024-11-19 01:28:42 +00:00
..
components Add VisitEntities for generic and reflectable Entity iteration (#15425) 2024-09-30 17:32:03 +00:00
child_builder.rs Allow World::entity family of functions to take multiple entities and get multiple references back (#15614) 2024-10-07 15:21:40 +00:00
events.rs Fix bevy_hierarchy failing to compile without reflect feature (#16428) 2024-11-19 01:28:42 +00:00
hierarchy.rs Allow World::entity family of functions to take multiple entities and get multiple references back (#15614) 2024-10-07 15:21:40 +00:00
lib.rs Fix permissions of rust source files (#16310) 2024-11-09 16:34:38 +00:00
query_extension.rs Migrate from Query::single and friends to Single (#15872) 2024-10-13 20:32:06 +00:00
valid_parent_check_plugin.rs Add core and alloc over std Lints (#15281) 2024-09-27 00:59:59 +00:00