Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reflect UUID #8905

Merged
merged 4 commits into from
Jun 21, 2023
Merged

Reflect UUID #8905

merged 4 commits into from
Jun 21, 2023

Conversation

Joakker
Copy link
Contributor

@Joakker Joakker commented Jun 20, 2023

For those who wish to be able to #[reflect] stuff using the Uuid type

I'm very unfamiliar with the codebase, so please tell me if I'm missing something

@github-actions
Copy link
Contributor

Welcome, new contributor!

Please make sure you've read our contributing guide and we look forward to reviewing your pull request shortly ✨

@MrGVSV MrGVSV added C-Usability A targeted quality-of-life change that makes Bevy easier to use A-Reflection Runtime information about types labels Jun 20, 2023
@MrGVSV MrGVSV self-requested a review June 20, 2023 16:10
use bevy_reflect_derive::{impl_from_reflect_value, impl_reflect_value};
use bevy_utils::Uuid;

impl_reflect_value!(::bevy_utils::Uuid(Serialize, Deserialize));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also register some other traits? Namely Default, Debug, PartialEq, and Hash?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@@ -471,6 +472,7 @@ mod impls {
#[cfg(feature = "smallvec")]
pub use self::smallvec::*;
pub use self::std::*;
pub use self::uuid::*;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Is this needed? In fact, are any of these needed (since I'm pretty sure none of them export anything)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just followed what I saw

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's fine, we can leave it for now.

Copy link
Member

@MrGVSV MrGVSV left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thanks!

@Joakker
Copy link
Contributor Author

Joakker commented Jun 20, 2023

Thanks, happy to help!

@MrGVSV MrGVSV added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Jun 20, 2023
Copy link
Member

@cart cart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! this will help with #8624, which uses Uuid in one of the AssetId variants.

@cart cart added this pull request to the merge queue Jun 20, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 20, 2023
@james7132 james7132 added this pull request to the merge queue Jun 20, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 20, 2023
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Jun 21, 2023
Merged via the queue into bevyengine:main with commit af4336c Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Reflection Runtime information about types C-Usability A targeted quality-of-life change that makes Bevy easier to use S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

5 participants