Commit Graph

12 Commits

Author SHA1 Message Date
Danny Tuppeny 1b6399759a [analyzer] Migrate remaining LSP tests to null-safe
Change-Id: I7a2befd9d46b93ebeb84c40f33121f077f3d6f1a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196284
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-21 16:41:50 +00:00
Konstantin Shcheglov e97f1bdbf0 Switch analysis_server to language 2.12, so null safety, but opt-out files.
This should allow doing partial migration, specifically protocol files,
which are imported by other libraries, but are a small library cycle
that does not import much outside of it.

Change-Id: I904c05d6d5b444ee9a9dbd1f7ada12aabdcc5165
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193583
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-30 23:39:37 +00:00
Danny Tuppeny d4e5a14627 [Analyzer] Use SymbolKind.EnumMember when client supports it
Fixes https://github.com/Dart-Code/Dart-Code/issues/2945.

Change-Id: Ifdfade387c97c9bf1162e048b2d18930a726806a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171286
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <danny@tuppeny.com>
2020-11-10 17:58:54 +00:00
Danny Tuppeny 7b6c102137 [Analyzer] Encode/decode LSP payloads in tests to ensure they behave the same as real messages
Change-Id: Ia9efb2d5ba02fe60560b8deb663856ec27c79a87
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162745
Commit-Queue: Danny Tuppeny <danny@tuppeny.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-09-15 20:10:11 +00:00
Danny Tuppeny 047c0f860a [Analyzer] Support analyzing open files without open workspaces
This introduces the concept of temporary analysis roots, used to ensure loose files that are opened can be analyzed even when there are no other analysis roots (and therefore no existing analysis drivers).

Fixes https://github.com/Dart-Code/Dart-Code/issues/2764.

Change-Id: I6b208f7c2fe8b538d7254691221fb72604ef156e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161500
Commit-Queue: Danny Tuppeny <danny@tuppeny.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-09-02 17:46:02 +00:00
Danny Tuppeny 3b4e9f6db0 Fix LSP workspace symbols to always have a SymbolKind
Bug: https://github.com/dart-lang/sdk/issues/40636
Change-Id: I28855dac790291a16717c20cf46c33dfae23e9ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135902
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <danny@tuppeny.com>
2020-02-14 16:45:27 +00:00
Brian Wilkerson 58a9c22f80 Add return types to more methods in analysis_server
Change-Id: I65bed353bcff4f991faf8c3bdde979789a8d962b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134000
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-30 21:43:34 +00:00
Danny Tuppeny f7e288e3ad Return empty responses instead of errors for non-Dart files in LSP server
Previously we could return "invalid path" responses for any non-Dart files. This allows clients to send requests for other files and just successful (though empty) responses.

Change-Id: I192e83ac2ebd2124c03c22e3e048a066cfd33f17
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101990
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <dantup@google.com>
2019-05-13 09:04:36 +00:00
Danny Tuppeny 7d4a6cc7e3 Change setup of capabilities in LSP tests to allow easier chaining
Change-Id: I6bc2743d64e7eb263f34f9c12140588d35b1482e
Reviewed-on: https://dart-review.googlesource.com/c/87065
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-12-12 15:52:45 +00:00
Danny Tuppeny 179b96e796 Remove unnecessary awaits in LSP tests
Change-Id: I7a3fb27a43593561b4793514909699d2a09e2f88
Reviewed-on: https://dart-review.googlesource.com/c/85744
Auto-Submit: Danny Tuppeny <dantup@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-12-03 16:32:07 +00:00
Danny Tuppeny a354fd99a8 Add LSP support for flat symbol lists for older clients
Change-Id: Id74b34ea295a6733b374a820c6d596a11070f666
Reviewed-on: https://dart-review.googlesource.com/c/85561
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <dantup@google.com>
2018-11-29 16:37:38 +00:00
Danny Tuppeny 67c00eff46 Add basic support for hierarchical document symbols
Change-Id: I376ca6f974875aace2d8a7fd9f6e1cd593d5527e
Reviewed-on: https://dart-review.googlesource.com/c/85485
Commit-Queue: Danny Tuppeny <dantup@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-11-28 18:21:15 +00:00