-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Prefer Display
over Debug
#16112
Prefer Display
over Debug
#16112
Conversation
@SpecificProtagonist feel free to review or point out good places to use |
Display
over Debug
Display
over Debug
and format args consistently
Why is there a migration guide? There's no information in the description about this change. I would prefer this to be blocked until after the 0.15 is released, as it has high chances of conflicts during cherry picks. |
Controversial by extension of #16113 as it was used to do this PR |
I'm not the biggest fan of mixing widespread code formatting changes with changes in behavior. Did you do
I'll do that, or maybe I'll change them myself – but again, the PR probably shouldn't include both the code format changes too. But before that: Is there any criteria according to which we decide whether to use the short name in messages? E.g. I think the full name is useful when referring to systems. |
I agree with the changes made here, but I don't think it's worth it unless we have some lints to enforce the new standard. If we had |
|
Oh perfect! I would spin off just the addition of that lint into its own PR first, since that's enforceable. If there's an equivalent lint for the |
85a2026
to
959353b
Compare
Display
over Debug
and format args consistentlyDisplay
over Debug
959353b
to
ea27e9f
Compare
I refined this PR to not have the formatting changes |
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 think this is good, but as stated I would open an issue for a lint which keeps this change maintained long-term.
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.
Nice, this is much easier to review now!
I haven't seen any discussion of whether to use Debug
or Display
for entities – the former includes the raw bits, because that matches the serialized format, while the later is more concise.
Co-authored-by: SpecificProtagonist <vincentjunge@posteo.net>
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.
Nice one, leaving two minor suggestions.
…vy into consistent-formatting
@BenjaminBrienen CI failures are real; I think you need to revert a couple of things here. |
Objective
Fixes #16104
Solution
I removed all instances of
:?
and put them back one by one where it caused an error.I removed some bevy_utils helper functions that were only used in 2 places and don't add value. See: #11478
Testing
CI should catch the mistakes
Migration Guide
bevy::utils::{dbg,info,warn,error}
were removed. Usebevy::utils::tracing::{debug,info,warn,error}
instead.