-
-
Notifications
You must be signed in to change notification settings - Fork 672
Add Diagnostic class to represent a single diagnostic message #9494
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
Conversation
|
Thanks for your pull request and interest in making D better, @jacob-carlborg! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub fetch digger
dub run digger -- build "master + dmd#9494" |
|
|
No, the error is: |
|
Sounds more reasonable. Will fix |
7e82c50 to
4c20b49
Compare
|
Fixed. |
|
I want to put a hold on all this refactoring. I do not agree with the premise of it, and would like to revert #9350 I do not understand the value in adding hundreds and hundreds of lines of code that do next to nothing. What problem is it solving? |
The message is constructed on demand to be able to have the constructor pure and formatting the message in an impure way.
|
Rebased to upstream/master fix CircleCi. |
|
Not doing this, for reasons explained elsewhere. |
|
By collecting all the diagnostics, instead of reporting them directly, and pushing up to the caller it will be possible to make the lexer |
|
One thing I would really like long term is for all errors to be jam-packed with useful semantic information, such that they can be formatted in different contexts to best highlight that. (This is what I really mean when I say "xml error messages" on the forum, etc.) I actually think something like this is the logical first start: error messages represented not as strings, but as objects. It just wraps a string for now, but ultimately if this leads to those input strings all being eliminated (it can still output those strings though, but the input should put the details in more structure), I'd see it as being a good thing. |
The message is constructed on demand to be able to have the constructor pure and formatting the message in an impure way.
Extracted from #9480.