bevy/crates/bevy_hierarchy
aecsocket 164f01b7a4 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 22:10:25 +01:00
..
src Fix bevy_hierarchy failing to compile without reflect feature (#16428) 2024-11-19 22:10:25 +01:00
Cargo.toml Release 0.15.0-rc.3 2024-11-05 23:26:31 +01:00
README.md Add README.md to all crates (#13184) 2024-05-02 18:56:00 +00:00

Bevy Hierarchy

License Crates.io Downloads Docs Discord