-
Notifications
You must be signed in to change notification settings - Fork 317
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
Avoid needless concatenations of warning/error messages #3465
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.
Looks semantically dangerous if left as is.
engine/runtime/src/main/scala/org/enso/compiler/pass/analyse/GatherDiagnostics.scala
Outdated
Show resolved
Hide resolved
engine/runtime/src/main/scala/org/enso/compiler/pass/analyse/GatherDiagnostics.scala
Outdated
Show resolved
Hide resolved
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.
Now it's awesome :)
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.
Thanks, much easier to parse equals
Pull Request Description
While investigating #182234656 I've noticed that
GatherDiagnostics
callsdistinctBy
and usesmessage
string. However such string has to be composed and that takes time:This PR eliminates the need for concatenation by associating each
Diagnostic
with an array ofkeys
used to computeequals
andhashCode
.Important Notes
Checklist
Please include the following checklist in your PR: