Prefer Display over Debug#16112
Conversation
|
@SpecificProtagonist feel free to review or point out good places to use |
Display over DebugDisplay 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 |
bushrat011899
left a comment
There was a problem hiding this comment.
I think this is good, but as stated I would open an issue for a lint which keeps this change maintained long-term.
SpecificProtagonist
left a comment
There was a problem hiding this comment.
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>
…vy into consistent-formatting
|
@BenjaminBrienen CI failures are real; I think you need to revert a couple of things here. |
# Objective Fixes bevyengine#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: bevyengine#11478 ## Testing CI should catch the mistakes ## Migration Guide `bevy::utils::{dbg,info,warn,error}` were removed. Use `bevy::utils::tracing::{debug,info,warn,error}` instead. --------- Co-authored-by: SpecificProtagonist <vincentjunge@posteo.net>
# Objective Fixes bevyengine#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: bevyengine#11478 ## Testing CI should catch the mistakes ## Migration Guide `bevy::utils::{dbg,info,warn,error}` were removed. Use `bevy::utils::tracing::{debug,info,warn,error}` instead. --------- Co-authored-by: SpecificProtagonist <vincentjunge@posteo.net>
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.