-
-
Notifications
You must be signed in to change notification settings - Fork 22k
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
[Core] Improve error messages with vformat
#98091
[Core] Improve error messages with vformat
#98091
Conversation
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 approve of the general pattern of replacing string concatenation with vformat format strings.
I'll look at the scope of adding all single case concatenations as well for completeness, and see if I'll just add them to this or do it as a potential future improvement Edit: They are quite extensive so leaving them for now until this has gotten more approval |
Will try some ideas for improving the performance of |
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.
Code looks good to me.
Will look at adding the remaining cases with fewer concatenations, but won't have the time today |
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.
Won't merge until those other concatenation cases you mentioned are addressed, but everything so far looks good!
Will try to get to them this week |
59ce671
to
afd3029
Compare
afd3029
to
38f9769
Compare
That covers most cases I belive, left some cases where I'm unsure about the safety, like in |
Thanks! |
Thank you! |
Limited to cases where the message contained more than one substitution, can expand to all cases in
core
but these are the more hard to read, keeping it in small batches and starting with this. Also made some minor improvements to the messages like adding'
and trailing periods in some cases to improve readability.Left the ones in
string.cpp
alone as they would likely cause recursion since at least someString
methods are used invformat
itself.See: #91521 (comment)