-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
dbg macro: align line number to 4 digits #58753
Conversation
r? @KodrAus (rust_highfive has picked a reviewer for you, use r? to override) |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
As I said on the issue, I am not sure that the common case would benefit from this change so I'm therefore not sure this is an improvement. |
ping from triage @Centril any updates on this? i'm assuming we can close this? |
@Dylan-DPC I'm not the reviewer; r? @alexcrichton |
Thanks for the PR @hellow554, and sorry for the delay! You're definitely right that I think we can change the output here at any time, so I think we're safe to do that. Given that this is a macro for debugging I think aligning the output seems reasonable to me in spirit, although for the actual formatting I might recommend something different. With a leading
which I believe would still solve the issue? Note though that this could be pretty confusing for programs that are always under a hundred lines or so. You'd always have a few spaces at the end and you may not know what they're used for. Additionally the filenames can change between modules, so this may also make it hard to align output across multiple modules. All-in-all I'm not entirely sure whether this ends up being worth it after digging into the details. While it's a mild cosmetic improvement it seems like a sort of niche one that brings a number of downsides with it which may not outweigh the benefit. |
That feels rather "empty" for lack of a better term.
Yep; I think we should also consider smaller modules. That feels like something to encourage. I think most modules should be sized between 100-999 so that aligns well for those. Aligning for 4 digits feels like encouraging the wrong thing. |
My point isn't so much the number of lines in a module itself but the difference between the filename length of |
☔ The latest upstream changes (presumably #59293) made this pull request unmergeable. Please resolve the merge conflicts. |
@alexcrichton Sure; I think yours is a good point as well ;) -- any thoughts on what to do here (...and ping from triage...)? |
Somehow this PR slipped through my notification center... |
Sounds good to me! |
Fixes #58647
I think this is worth getting some more people into this discussion. Thankfully according to the doc
So nobody can complain ;)