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

Clean up type registrations #12314

Merged

Conversation

james7132
Copy link
Member

Objective

Fix #12304. Remove unnecessary type registrations thanks to #4154.

Solution

Conservatively remove type registrations. Keeping the top level components, resources, and events, but dropping everything else that is a type of a member of those types.

@james7132 james7132 added C-Code-Quality A section of code that is hard to understand or change A-Reflection Runtime information about types labels Mar 5, 2024
Copy link
Contributor

@pablo-lua pablo-lua left a comment

Choose a reason for hiding this comment

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

I did a little search in some places. Looks good, thank you, but I have a comment.

.register_type::<CascadeShadowConfig>()
.register_type::<Cascades>()
.register_type::<CascadesVisibleEntities>()
.register_type::<ClusterConfig>()
.register_type::<ClusterFarZMode>()
Copy link
Contributor

@pablo-lua pablo-lua Mar 5, 2024

Choose a reason for hiding this comment

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

Can't we remove ClusterFarZMode? After all, ClusterZConfig has this types in fields.
ClusterConfig has some types too.

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually, this file has some other kinds that can be removed as well.

Copy link
Member Author

Choose a reason for hiding this comment

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

Should be more cleaned up now.

@alice-i-cecile alice-i-cecile 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 Mar 6, 2024
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Mar 6, 2024
Merged via the queue into bevyengine:main with commit 9e5db9a Mar 6, 2024
30 checks passed
spectria-limina pushed a commit to spectria-limina/bevy that referenced this pull request Mar 9, 2024
# Objective
Fix bevyengine#12304. Remove unnecessary type registrations thanks to bevyengine#4154.

## Solution
Conservatively remove type registrations. Keeping the top level
components, resources, and events, but dropping everything else that is
a type of a member of those types.
@james7132 james7132 deleted the cleanup-type-registrations branch March 10, 2024 07:27
@BD103 BD103 added the C-Breaking-Change A breaking change to Bevy's public API that needs to be noted in a migration guide label Jun 13, 2024
Copy link
Contributor

It looks like your PR is a breaking change, but you didn't provide a migration guide.

Could you add some context on what users should update when this change get released in a new version of Bevy?
It will be used to help writing the migration guide for the version. Putting it after a ## Migration Guide will help it get automatically picked up by our tooling.

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-Breaking-Change A breaking change to Bevy's public API that needs to be noted in a migration guide C-Code-Quality A section of code that is hard to understand or change S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clean up type registrations
4 participants