Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
service/dap: add throw reason to exception info #2524
service/dap: add throw reason to exception info #2524
Changes from all commits
c1c5958
f48dedb
716fbbc
29d7fba
5df3128
11883ec
b2b3938
c77b197
c12a0cf
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
You should be able to test this, just gate the assertion on the Go compiler being version 1.14 or 1.15 (which we still test via CI).
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.
The actual issue that is breaking this test is that the deadlock is not associated with a goroutine ID, so we can't request the exception info. This needs to be fixed too, but makes sense to do separately because we will likely want to add the thread that is running to display the stack trace etc.
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.
What about _fixtures/fatalerror.go? Does that one result in a selected goroutine, so you have an id linked to a description that you can check?
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 don't see that fixture. I could add a fixture to do a concurrent map read / write and I could test it that way.
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.
Huh! That's because it was in my local client. I was going to add it at some point, but never did. This is easier than concurrent map operations:
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.
Added the fixture and the test
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.
Sorry again for pointing to something that only I had :) Thank you for adding the test.
About the deadlock case with no thread id. I filed an issue against vscode a while back for displaying stopped reason even with no thread id: microsoft/vscode#124532. They seem to be taking it seriously. Can we think of a related way to associate exception info with a stop that has no thread id?
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.
The exception info is shown in the source code, so if its not associated with a thread with a stack trace, I think there would need to be a separate UI for it.