Switch analysis_server to 2.15

So, we can use constructor tear-offs :-)

Change-Id: Ib819da7715e49496b01defa9dc3837bd70019134
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/240642
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
This commit is contained in:
Konstantin Shcheglov 2022-04-08 06:29:48 +00:00 committed by Commit Bot
parent 6b6e6da943
commit 1377e006fb
5 changed files with 18 additions and 30 deletions

View file

@ -69,7 +69,7 @@
"name": "analysis_server",
"rootUri": "../pkg/analysis_server",
"packageUri": "lib/",
"languageVersion": "2.14"
"languageVersion": "2.15"
},
{
"name": "analysis_server_client",

View file

@ -85,33 +85,21 @@ class AnalysisServer extends AbstractAnalysisServer {
/// A map from the name of a request to a function used to create a request
/// handler.
static final Map<String, HandlerGenerator> handlerGenerators = {
ANALYTICS_REQUEST_IS_ENABLED: (server, request, cancellationToken) =>
AnalyticsIsEnabledHandler(server, request, cancellationToken),
ANALYTICS_REQUEST_ENABLE: (server, request, cancellationToken) =>
AnalyticsEnableHandler(server, request, cancellationToken),
ANALYTICS_REQUEST_SEND_EVENT: (server, request, cancellationToken) =>
AnalyticsSendEventHandler(server, request, cancellationToken),
ANALYTICS_REQUEST_SEND_TIMING: (server, request, cancellationToken) =>
AnalyticsSendTimingHandler(server, request, cancellationToken),
ANALYTICS_REQUEST_IS_ENABLED: AnalyticsIsEnabledHandler.new,
ANALYTICS_REQUEST_ENABLE: AnalyticsEnableHandler.new,
ANALYTICS_REQUEST_SEND_EVENT: AnalyticsSendEventHandler.new,
ANALYTICS_REQUEST_SEND_TIMING: AnalyticsSendTimingHandler.new,
//
DIAGNOSTIC_REQUEST_GET_DIAGNOSTICS: (server, request, cancellationToken) =>
DiagnosticGetDiagnosticsHandler(server, request, cancellationToken),
DIAGNOSTIC_REQUEST_GET_SERVER_PORT: (server, request, cancellationToken) =>
DiagnosticGetServerPortHandler(server, request, cancellationToken),
DIAGNOSTIC_REQUEST_GET_DIAGNOSTICS: DiagnosticGetDiagnosticsHandler.new,
DIAGNOSTIC_REQUEST_GET_SERVER_PORT: DiagnosticGetServerPortHandler.new,
//
EXECUTION_REQUEST_CREATE_CONTEXT: (server, request, cancellationToken) =>
ExecutionCreateContextHandler(server, request, cancellationToken),
EXECUTION_REQUEST_DELETE_CONTEXT: (server, request, cancellationToken) =>
ExecutionDeleteContextHandler(server, request, cancellationToken),
EXECUTION_REQUEST_GET_SUGGESTIONS: (server, request, cancellationToken) =>
ExecutionGetSuggestionsHandler(server, request, cancellationToken),
EXECUTION_REQUEST_MAP_URI: (server, request, cancellationToken) =>
ExecutionMapUriHandler(server, request, cancellationToken),
EXECUTION_REQUEST_SET_SUBSCRIPTIONS: (server, request, cancellationToken) =>
ExecutionSetSubscriptionsHandler(server, request, cancellationToken),
EXECUTION_REQUEST_CREATE_CONTEXT: ExecutionCreateContextHandler.new,
EXECUTION_REQUEST_DELETE_CONTEXT: ExecutionDeleteContextHandler.new,
EXECUTION_REQUEST_GET_SUGGESTIONS: ExecutionGetSuggestionsHandler.new,
EXECUTION_REQUEST_MAP_URI: ExecutionMapUriHandler.new,
EXECUTION_REQUEST_SET_SUBSCRIPTIONS: ExecutionSetSubscriptionsHandler.new,
//
KYTHE_REQUEST_GET_KYTHE_ENTRIES: (server, request, cancellationToken) =>
KytheGetKytheEntriesHandler(server, request, cancellationToken),
KYTHE_REQUEST_GET_KYTHE_ENTRIES: KytheGetKytheEntriesHandler.new,
};
/// The channel from which requests are received and to which responses should

View file

@ -3,7 +3,7 @@ name: analysis_server
publish_to: none
environment:
sdk: '>=2.14.0 <3.0.0'
sdk: '>=2.15.0 <3.0.0'
dependencies:
_fe_analyzer_shared:

View file

@ -150,7 +150,8 @@ class LspServerClient {
var dartBinary = join(dartSdkPath, 'bin', 'dart');
var useSnapshot = true;
// Prevent flow analysis from marking code below as being dead.
const useSnapshot = 1 > 0;
String serverPath;
if (useSnapshot) {

View file

@ -622,9 +622,8 @@ class Server {
var dartBinary = path.join(dartSdkPath, 'bin', 'dart');
// The integration tests run 3x faster when run from snapshots (you need to
// run test.py with --use-sdk).
var useSnapshot = true;
// Prevent flow analysis from marking code below as being dead.
const useSnapshot = 1 > 0;
String serverPath;
if (useSnapshot) {