-
Notifications
You must be signed in to change notification settings - Fork 207
Add option to return rendered message when compiling via BSP #2781
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
50e0181 to
aa27753
Compare
|
Hey @tgodzik, re: test failures, I just pushed a fix to use Should I try to remove the line breaks? Or is there any other approach you'd suggest? |
aa27753 to
2961971
Compare
|
Yeah, that's always tricky, I see that we use somewhere: maybe something along these lines? |
|
I tried using I went ahead and extracted the logic in |
d84ea5f to
8443909
Compare
|
Okay this time I really think the tests are going to pass 😅. The logic to replace newlines wasn't accounting for standalone |
|
The most recent test failures look unrelated |
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.
LGTM!
xsbti.Problem#renderedcontains the full error message as it's rendered by the compiler, including the error code, file path and location, line of code and the carets highlighting which part of the line had the error.For example, this is what
xsbti.Problem#messagelooks like for a type mismatch:and this is what
xsbti.Problem#renderedlooks like:For tools like bleep that display errors on the command line, being able to show the full rendered message is ideal.
To support this, I've added a
--show-rendered-messageflag as suggested in Discord. When it's passed, theBspServerLoggerwill use therenderedmessage (when present) in place of the standardmessage.