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

reflection: deprecate #[reflect(Debug)] #11625

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

soqb
Copy link
Contributor

@soqb soqb commented Jan 30, 2024

Objective

  • Many types add #[reflect(Debug)] to their reflected types when we can provide the same functionality without needing any annotations.

Solution

  • Introduce the bevy_reflect::__macro_exports::DebugSpecialization trait which follows the case-studies (stable) specialization model.
  • Add functionality to bevy_reflect_derive to emit deprecation warnings. see bevy_reflect_derive::utility for implementation notes.

Changelog

  • #[reflect(Debug)] is deprecated.

Migration Guide

  • The #[reflect(Debug)] syntax is deprecated and the functionality is builtin. Remove relevant registration.

@alice-i-cecile alice-i-cecile added C-Code-Quality A section of code that is hard to understand or change C-Usability A targeted quality-of-life change that makes Bevy easier to use A-Reflection Runtime information about types labels Jan 30, 2024
@soqb
Copy link
Contributor Author

soqb commented Jan 31, 2024

i had some real bad problems with git in this PR. i'll see if i can un-delete what i broke tonight.

Co-authored-by: Jan Hohenheim <jan@hohenheim.ch>
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-Code-Quality A section of code that is hard to understand or change C-Usability A targeted quality-of-life change that makes Bevy easier to use
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants