-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add integration tests to ensure that error context data is being sent to clients (both LSP and legacy protocol) #44907
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
Comments
I'm not sure who to assign this to--perhaps @bwilkerson? |
@devoncarew do you think anyone will have a chance to work on this before the branch cut? |
Do we not already have coverage here? This isn't about testing for the presence of the messages in general - that's covered by #45068 and the test.py work (#44905). This is just to make sure that we're populating the information in the protocol messages to IDEs? @bwilkerson / @DanTup - is this already covered by existing tests? |
There's a test in LSP here: sdk/pkg/analysis_server/test/lsp/diagnostic_test.dart Lines 129 to 144 in 3ce1969
It's not currently testing the specific text/location (it may be worth extending to do that), though it is ensuring there is a |
I don't think we have an "integration" test for the legacy protocol (where "integration" here means end-to-end). We do have tests to ensure that we correctly convert analysis errors from the |
@bwilkerson I'm not sure what you mean by "end-to-end", but we do have several tests in I think it would be an adequate test to make a test similar to |
Yep, those are what I was talking about as well. |
I missed the "integration" part. I've opened https://dart-review.googlesource.com/c/sdk/+/193800/ that adds an LSP integration test that checks the contexts come through (unlike the test I noted above, these spawn the server in another process and then communicate with it exactly as a client would - although the in-process tests for the LSP server exercise essentially the same stack including the full protocol classes, just without the process boundary and using an in-memory filesystem). |
See #44907. Change-Id: I780e584a0e624aac232439d3f87cf1fb1284ef9f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193800 Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Brian Wilkerson <[email protected]>
(Parent issue #44897)
As of a42244f, the analyzer now generates context messages in some circumstances explaining why type promotion failed. We should ensure that we have adequate integration tests to verify that these context messages are being delivered to analysis server clients. We should test both the LSP protocol (used by VSCode) and the legacy protocol (used by IntelliJ).
Related: #44901, #44902.
The text was updated successfully, but these errors were encountered: