-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Don't show .to_bits
in Display
impl for Entity
#14011
Merged
alice-i-cecile
merged 3 commits into
bevyengine:main
from
alice-i-cecile:human-friendly-entity
Jun 25, 2024
Merged
Don't show .to_bits
in Display
impl for Entity
#14011
alice-i-cecile
merged 3 commits into
bevyengine:main
from
alice-i-cecile:human-friendly-entity
Jun 25, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alice-i-cecile
added
D-Trivial
Nice and easy! A great choice to get started with Bevy
A-ECS
Entities, components, systems, and events
C-Usability
A targeted quality-of-life change that makes Bevy easier to use
S-Needs-Review
Needs reviewer attention (from anyone!) to move forward
labels
Jun 25, 2024
kristoff3r
approved these changes
Jun 25, 2024
Co-authored-by: Kristoffer Søholm <k.soeholm@gmail.com>
@eidloi could I get your review here? |
viridia
approved these changes
Jun 25, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ran into this recently as well.
Exactly what I needed thanks! |
eidloi
approved these changes
Jun 25, 2024
Thanks y'all! |
mockersf
pushed a commit
that referenced
this pull request
Jun 25, 2024
accurate for debugging. To ensure that its can still be readily logged in error messages and inspectors, this PR added a more concise and human-friendly `Display` impl. However, users found this form too verbose: the `to_bits` information was unhelpful and too long. Fixes #13980. - Don't include `Entity::to_bits` in the `Display` implementation for `Entity`. This information can readily be accessed and logged for users who need it. - Also clean up the implementation of `Display` for `DebugName`, introduced in #13760, to simply use the new `Display` impl (since this was the desired format there). I've updated an existing test to verify the output of `Entity::display`. --------- Co-authored-by: Kristoffer Søholm <k.soeholm@gmail.com>
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-Trivial
Nice and easy! A great choice to get started with Bevy
S-Needs-Review
Needs reviewer attention (from anyone!) to move forward
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Objective
#12469 changed the
Debug
impl forEntity
, making sure it's actually accurate for debugging. To ensure that its can still be readily logged in error messages and inspectors, this PR added a more concise and human-friendlyDisplay
impl.However, users found this form too verbose: the
to_bits
information was unhelpful and too long. Fixes #13980.Solution
Entity::to_bits
in theDisplay
implementation forEntity
. This information can readily be accessed and logged for users who need it.Display
forDebugName
, introduced in Add Display implementation to DebugName. #13760, to simply use the newDisplay
impl (since this was the desired format there).Testing
I've updated an existing test to verify the output of
Entity::display
.