Skip to content

Conversation

@Jondolf
Copy link
Contributor

@Jondolf Jondolf commented Jan 31, 2025

Objective

Follow-up to #17615.

Bevy's entity collection types like EntityHashSet no longer implement serde's Serialize and Deserialize after becoming newtypes instead of type aliases in #16912. This broke some types that support serde for me in Avian.

I also missed creating const constructors for EntityIndexMap and EntityIndexSet in #17615. Oops!

Solution

Implement Serialize and Deserialize for Bevy's entity collection types, and add const constructors for EntityIndexMap and EntityIndexSet.

I didn't implement ReflectSerialize or ReflectDeserialize here, because I had some trouble fixing the resulting errors, and they were not implemented previously either.

@Jondolf Jondolf added A-ECS Entities, components, systems, and events C-Usability A targeted quality-of-life change that makes Bevy easier to use X-Uncontroversial This work is generally agreed upon D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Jan 31, 2025
@alice-i-cecile alice-i-cecile added this to the 0.16 milestone Jan 31, 2025
@Jondolf Jondolf added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Jan 31, 2025
@mockersf mockersf added this pull request to the merge queue Feb 2, 2025
Merged via the queue into bevyengine:main with commit 9165fb0 Feb 2, 2025
33 checks passed
mrchantey pushed a commit to mrchantey/bevy that referenced this pull request Feb 4, 2025
…e#17620)

# Objective

Follow-up to bevyengine#17615.

Bevy's entity collection types like `EntityHashSet` no longer implement
serde's `Serialize` and `Deserialize` after becoming newtypes instead of
type aliases in bevyengine#16912. This broke some types that support serde for me
in Avian.

I also missed creating const constructors for `EntityIndexMap` and
`EntityIndexSet` in bevyengine#17615. Oops!

## Solution

Implement `Serialize` and `Deserialize` for Bevy's entity collection
types, and add const constructors for `EntityIndexMap` and
`EntityIndexSet`.

I didn't implement `ReflectSerialize` or `ReflectDeserialize` here,
because I had some trouble fixing the resulting errors, and they were
not implemented previously either.
joshua-holmes pushed a commit to joshua-holmes/bevy that referenced this pull request Feb 5, 2025
…e#17620)

# Objective

Follow-up to bevyengine#17615.

Bevy's entity collection types like `EntityHashSet` no longer implement
serde's `Serialize` and `Deserialize` after becoming newtypes instead of
type aliases in bevyengine#16912. This broke some types that support serde for me
in Avian.

I also missed creating const constructors for `EntityIndexMap` and
`EntityIndexSet` in bevyengine#17615. Oops!

## Solution

Implement `Serialize` and `Deserialize` for Bevy's entity collection
types, and add const constructors for `EntityIndexMap` and
`EntityIndexSet`.

I didn't implement `ReflectSerialize` or `ReflectDeserialize` here,
because I had some trouble fixing the resulting errors, and they were
not implemented previously either.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-ECS Entities, components, systems, and events C-Usability A targeted quality-of-life change that makes Bevy easier to use D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it X-Uncontroversial This work is generally agreed upon

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants