Version 2.12.0-169.0.dev
Merge commit '3ee3dac08ef290fce8923258b754ac36782949f6' into 'dev'
diff --git a/pkg/analysis_server/lib/src/lsp/server_capabilities_computer.dart b/pkg/analysis_server/lib/src/lsp/server_capabilities_computer.dart
index 658d9b1..97c8de4 100644
--- a/pkg/analysis_server/lib/src/lsp/server_capabilities_computer.dart
+++ b/pkg/analysis_server/lib/src/lsp/server_capabilities_computer.dart
@@ -8,6 +8,9 @@
import 'package:analysis_server/src/lsp/lsp_analysis_server.dart';
import 'package:analysis_server/src/lsp/semantic_tokens/legend.dart';
+/// Semantic tokens temporarily disabled due to a race condition.
+const enableSemanticTokens = false;
+
/// Helper for reading client dynamic registrations which may be ommitted by the
/// client.
class ClientDynamicRegistrations {
@@ -41,7 +44,7 @@
Method.workspace_willRenameFiles,
// Sematic tokens are all registered under a single "method" as the
// actual methods are controlled by the server capabilities.
- CustomMethods.semanticTokenDynamicRegistration,
+ if (enableSemanticTokens) CustomMethods.semanticTokenDynamicRegistration,
];
final ClientCapabilities _capabilities;
@@ -233,17 +236,18 @@
FoldingRangeRegistrationOptions>.t1(
true,
),
- semanticTokensProvider: dynamicRegistrations.semanticTokens
- ? null
- : Either2<SemanticTokensOptions,
- SemanticTokensRegistrationOptions>.t1(
- SemanticTokensOptions(
- legend: semanticTokenLegend.lspLegend,
- full: Either2<bool, SemanticTokensOptionsFull>.t2(
- SemanticTokensOptionsFull(delta: false),
+ semanticTokensProvider:
+ dynamicRegistrations.semanticTokens || !enableSemanticTokens
+ ? null
+ : Either2<SemanticTokensOptions,
+ SemanticTokensRegistrationOptions>.t1(
+ SemanticTokensOptions(
+ legend: semanticTokenLegend.lspLegend,
+ full: Either2<bool, SemanticTokensOptionsFull>.t2(
+ SemanticTokensOptionsFull(delta: false),
+ ),
+ ),
),
- ),
- ),
executeCommandProvider: ExecuteCommandOptions(
commands: Commands.serverSupportedCommands,
workDoneProgress: true,
@@ -446,7 +450,7 @@
Method.workspace_didChangeConfiguration,
);
register(
- dynamicRegistrations.semanticTokens,
+ dynamicRegistrations.semanticTokens && enableSemanticTokens,
CustomMethods.semanticTokenDynamicRegistration,
SemanticTokensRegistrationOptions(
documentSelector: fullySupportedTypes,
diff --git a/pkg/analysis_server/test/lsp/initialization_test.dart b/pkg/analysis_server/test/lsp/initialization_test.dart
index ce2263f..fad9377 100644
--- a/pkg/analysis_server/test/lsp/initialization_test.dart
+++ b/pkg/analysis_server/test/lsp/initialization_test.dart
@@ -131,7 +131,8 @@
expect(initResult.capabilities.foldingRangeProvider, isNotNull);
expect(initResult.capabilities.workspace.fileOperations.willRename,
equals(ServerCapabilitiesComputer.fileOperationRegistrationOptions));
- expect(initResult.capabilities.semanticTokensProvider, isNotNull);
+ expect(initResult.capabilities.semanticTokensProvider,
+ enableSemanticTokens ? isNotNull : isNull);
expect(didGetRegisterCapabilityRequest, isFalse);
}
diff --git a/tools/VERSION b/tools/VERSION
index f214593..2eefe21 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 2
MINOR 12
PATCH 0
-PRERELEASE 168
+PRERELEASE 169
PRERELEASE_PATCH 0
\ No newline at end of file