bevy/crates/bevy_reflect/derive/src
Gino Valente 705c144259
bevy_reflect: Remove ContainerAttributes::merge (#13303)
# Objective

Unblocks #11659.

Currently the `Reflect` derive macro has to go through a merge process
for each `#[reflect]`/`#[reflet_value]` attribute encountered on a
container type.

Not only is this a bit inefficient, but it also has a soft requirement
that we can compare attributes such that an error can be thrown on
duplicates, invalid states, etc.

While working on #11659 this proved to be challenging due to the fact
that `syn` types don't implement `PartialEq` or `Hash` without enabling
the `extra-traits` feature.

Ideally, we wouldn't have to enable another feature just to accommodate
this one use case.

## Solution

Removed `ContainerAttributes::merge`.

This was a fairly simple change as we could just have the parsing
functions take `&mut self` instead of returning `Self`.

## Testing

CI should build as there should be no user-facing change.
2024-05-09 18:17:54 +00:00
..
impls Finish the work on try_apply (#12646) 2024-05-08 14:26:01 +00:00
container_attributes.rs bevy_reflect: Remove ContainerAttributes::merge (#13303) 2024-05-09 18:17:54 +00:00
derive_data.rs bevy_reflect: Remove ContainerAttributes::merge (#13303) 2024-05-09 18:17:54 +00:00
documentation.rs Rename bevy_reflect_derive folder to derive (#13269) 2024-05-07 07:55:32 +00:00
enum_utility.rs Finish the work on try_apply (#12646) 2024-05-08 14:26:01 +00:00
field_attributes.rs Rename bevy_reflect_derive folder to derive (#13269) 2024-05-07 07:55:32 +00:00
from_reflect.rs Rename bevy_reflect_derive folder to derive (#13269) 2024-05-07 07:55:32 +00:00
lib.rs Rename bevy_reflect_derive folder to derive (#13269) 2024-05-07 07:55:32 +00:00
reflect_value.rs bevy_reflect: Remove ContainerAttributes::merge (#13303) 2024-05-09 18:17:54 +00:00
registration.rs Rename bevy_reflect_derive folder to derive (#13269) 2024-05-07 07:55:32 +00:00
serialization.rs Rename bevy_reflect_derive folder to derive (#13269) 2024-05-07 07:55:32 +00:00
trait_reflection.rs Rename bevy_reflect_derive folder to derive (#13269) 2024-05-07 07:55:32 +00:00
type_path.rs Rename bevy_reflect_derive folder to derive (#13269) 2024-05-07 07:55:32 +00:00
utility.rs Rename bevy_reflect_derive folder to derive (#13269) 2024-05-07 07:55:32 +00:00