This simplifies an upcoming change switching from parsing LSP TypeScript definitions to using a new JSON definition (where items are not all in the same order).
Change-Id: I33672d645a8a96702dbfcbf1c090dfc8f5254960
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244404
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
This simplifies an upcoming change switching from parsing LSP TypeScript definitions to using a new JSON definition (where items are not all in the same order).
Change-Id: I773ce9ab174288ef5226b5f82f8ad7b8fb5f3693
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244245
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
In an upcoming change some types will between these files. To reduce the size of that (already very large) CL and because the distinction between spec-generated/custom-generated types was unnecessary anyway, this adds a single import for LSP protocol-related types.
Change-Id: I322447d6c979538c12014d87875176e1bf2adca7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244244
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
When we start identifying this synthetic `FieldDeclaration` with code `fo;`
as something that needs resolution (actually enclosing nodes require
declared elements), and use this `FieldDeclaration` as a starting point to
find the `CompletionTarget.entity`, we find the `VariableDeclaration` `fo`.
But if we start with `CompilationUnit` (as we used to), we find
`FieldDeclaration` `fo;`. Which gives different starting points for
contributors, and changes the resulting suggestions.
So, for now I will switch to using the whole parsed unit.
Change-Id: I153ae4de9faad2f8147f413b36dd8f2dd7bc5a6c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244380
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
PackageMapUriResolver is still based on Map.
Change-Id: I7d68f9dbc7d970b22c8e1a01d8e816b3e5723f34
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244047
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
This is the last set of changes in the analysis_server package.
Change-Id: I0cffd41118ba985fc1d90cc3ae25447abb62a212
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243934
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
ignore prefer_interpolation_to_compose_strings and
constant_identifier_names in generated files.
Change-Id: I963504e298f8e439734522fed9ac09911750f419
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243646
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
This involves a large refactoring of completion_metrics.dart, extracting
out some common code into completion_metrics_base.dart
The code in completion_metrics.dart and completion_metrics_base.dart is
largely unchanged, but restructured to fit the sub-class structure.
* Rename CompletionMetricsComputer -> CompletionQualityMetricsComputer,
as this is focused on quality metrics.
* Extract out applyOverlay and removeOverlay methods.
* Extract out computeSuggestionsAndMetrics, code which is run per
ExpectedCompletion.
* Extract out setupForResolution, for code custom to the quality
computer.
The meat of this change though is in completion_metrics_client.dart:
* _AnalysisServerClient is code which was extracted from
package:dartdev/src/analysis_server.dart. It may seem like an odd
choice when we have package:analysis_server_client, but I think
dartdev's client is fairly mature in creating a short-lived client,
and handling crashes, etc. If this should be re-combined with dartdev,
I think there are open questions about where that should live, and I'd
like to address that in a follow-up.
* The client does not perform overlays yet.
* The client does not track slowest requests yet.
* The client does not have support for performance metrics which DAS
tracks itself. Adding this is high priority.
Change-Id: Ib259f78e4646d10b61559bfd5700d98a95d14d43
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243522
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
+ add a simple page to render the timings in server diagnostics pages.
Change-Id: Ie8537cd38166677967ebe461b91334259b8883ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243322
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
These will be flagged by the next linter release which updates `non_constant_identifier_names` to flag local functions.
Change-Id: If663698d9cab270accd477a507071232905bc083
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242520
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
All tests have been migrated to PubPackageAnalysisServerTest.
Change-Id: Id6156e0a45772e1bf0d2acd9ece04639414442f0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242241
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>