Disable dynamic routing when experimental project wide diagnostics are enabled

Fixes #132121

We don't track project loading state properly when project wide diagnostics are enable. Just disable it for now since this is an experimental feature
This commit is contained in:
Matt Bierner
2021-10-11 14:50:09 -07:00
parent abee3e885c
commit f47ae9e324

View File

@@ -56,11 +56,13 @@ export class TypeScriptServerSpawner {
): ITypeScriptServer {
let primaryServer: ITypeScriptServer;
const serverType = this.getCompositeServerType(version, capabilities, configuration);
const shouldUseSeparateDiagnosticsServer = this.shouldUseSeparateDiagnosticsServer(configuration);
switch (serverType) {
case CompositeServerType.SeparateSyntax:
case CompositeServerType.DynamicSeparateSyntax:
{
const enableDynamicRouting = serverType === CompositeServerType.DynamicSeparateSyntax;
const enableDynamicRouting = !shouldUseSeparateDiagnosticsServer && serverType === CompositeServerType.DynamicSeparateSyntax;
primaryServer = new SyntaxRoutingTsServer({
syntax: this.spawnTsServer(TsServerProcessKind.Syntax, version, configuration, pluginManager, cancellerFactory),
semantic: this.spawnTsServer(TsServerProcessKind.Semantic, version, configuration, pluginManager, cancellerFactory),
@@ -79,7 +81,7 @@ export class TypeScriptServerSpawner {
}
}
if (this.shouldUseSeparateDiagnosticsServer(configuration)) {
if (shouldUseSeparateDiagnosticsServer) {
return new GetErrRoutingTsServer({
getErr: this.spawnTsServer(TsServerProcessKind.Diagnostics, version, configuration, pluginManager, cancellerFactory),
primary: primaryServer,