From fbb786088eb0413f26e781fd4c4ad9fb5f7dcec2 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 6 Jun 2017 15:43:43 -0700 Subject: [PATCH] Remove experimental autobuild --- extensions/typescript/package.nls.json | 1 - .../src/features/bufferSyncSupport.ts | 2 +- extensions/typescript/src/typescriptMain.ts | 5 ++--- extensions/typescript/src/typescriptService.ts | 1 - .../typescript/src/typescriptServiceClient.ts | 18 ++---------------- 5 files changed, 5 insertions(+), 22 deletions(-) diff --git a/extensions/typescript/package.nls.json b/extensions/typescript/package.nls.json index c2cf5917496..d2028875402 100644 --- a/extensions/typescript/package.nls.json +++ b/extensions/typescript/package.nls.json @@ -8,7 +8,6 @@ "typescript.check.tscVersion": "Check if a global install TypeScript compiler (e.g. tsc) differs from the used TypeScript language service.", "typescript.tsserver.log": "Enables logging of the TS server to a file. This log can be used to diagnose TS Server issues. The log may contain file paths, source code, and other potentially sensitive information from your project.", "typescript.tsserver.trace": "Enables tracing of messages sent to the TS server. This trace can be used to diagnose TS Server issues. The trace may contain file paths, source code, and other potentially sensitive information from your project.", - "typescript.tsserver.experimentalAutoBuild": "Enables experimental auto build. Requires 1.9 dev or 2.x tsserver version and a restart of VS Code after changing it.", "typescript.validate.enable": "Enable/disable TypeScript validation.", "typescript.format.enable": "Enable/disable default TypeScript formatter.", "javascript.format.enable": "Enable/disable default JavaScript formatter.", diff --git a/extensions/typescript/src/features/bufferSyncSupport.ts b/extensions/typescript/src/features/bufferSyncSupport.ts index 9cdaf802b21..216eebde2ed 100644 --- a/extensions/typescript/src/features/bufferSyncSupport.ts +++ b/extensions/typescript/src/features/bufferSyncSupport.ts @@ -229,7 +229,7 @@ export default class BufferSyncSupport { } public requestDiagnostic(file: string): void { - if (!this._validate || this.client.experimentalAutoBuild) { + if (!this._validate) { return; } diff --git a/extensions/typescript/src/typescriptMain.ts b/extensions/typescript/src/typescriptMain.ts index e217aa00400..50d5d4cc980 100644 --- a/extensions/typescript/src/typescriptMain.ts +++ b/extensions/typescript/src/typescriptMain.ts @@ -94,7 +94,7 @@ export function activate(context: ExtensionContext): void { let clientHost: TypeScriptServiceClientHost | undefined; return () => { if (!clientHost) { - clientHost = new TypeScriptServiceClientHost(standardLanguageDescriptions, context.storagePath, context.workspaceState, plugins); + clientHost = new TypeScriptServiceClientHost(standardLanguageDescriptions, context.workspaceState, plugins); context.subscriptions.push(clientHost); const host = clientHost; @@ -456,7 +456,6 @@ class TypeScriptServiceClientHost implements ITypescriptServiceClientHost { constructor( descriptions: LanguageDescription[], - storagePath: string | undefined, workspaceState: Memento, plugins: TypeScriptServerPlugin[] ) { @@ -478,7 +477,7 @@ class TypeScriptServiceClientHost implements ITypescriptServiceClientHost { this.versionStatus = new VersionStatus(); this.disposables.push(this.versionStatus); - this.client = new TypeScriptServiceClient(this, storagePath, workspaceState, this.versionStatus, plugins, this.disposables); + this.client = new TypeScriptServiceClient(this, workspaceState, this.versionStatus, plugins, this.disposables); this.languagePerId = Object.create(null); for (const description of descriptions) { const manager = new LanguageProvider(this.client, description); diff --git a/extensions/typescript/src/typescriptService.ts b/extensions/typescript/src/typescriptService.ts index dd24447e929..f2ad09da59a 100644 --- a/extensions/typescript/src/typescriptService.ts +++ b/extensions/typescript/src/typescriptService.ts @@ -85,7 +85,6 @@ export interface ITypescriptServiceClient { logTelemetry(eventName: string, properties?: { [prop: string]: string }): void; - experimentalAutoBuild: boolean; apiVersion: API; checkGlobalTSCVersion: boolean; diff --git a/extensions/typescript/src/typescriptServiceClient.ts b/extensions/typescript/src/typescriptServiceClient.ts index 4f68a6991fb..ba756961c9b 100644 --- a/extensions/typescript/src/typescriptServiceClient.ts +++ b/extensions/typescript/src/typescriptServiceClient.ts @@ -20,10 +20,10 @@ import Logger from './utils/logger'; import VersionStatus from './utils/versionStatus'; import * as is from './utils/is'; +import TelemetryReporter from './utils/telemetry'; +import Tracer from './utils/tracer'; import * as nls from 'vscode-nls'; -import TelemetryReporter from "./utils/telemetry"; -import Tracer from "./utils/tracer"; const localize = nls.loadMessageBundle(); interface CallbackItem { @@ -231,7 +231,6 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient private _onReady: { promise: Promise; resolve: () => void; reject: () => void; }; private configuration: TypeScriptServiceConfiguration; private _checkGlobalTSCVersion: boolean; - private _experimentalAutoBuild: boolean; private tracer: Tracer; private readonly logger: Logger = new Logger(); private tsServerLogFile: string | null = null; @@ -256,7 +255,6 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient constructor( private readonly host: ITypescriptServiceClientHost, - private readonly storagePath: string | undefined, private readonly workspaceState: Memento, private readonly versionStatus: VersionStatus, private readonly plugins: TypeScriptServerPlugin[], @@ -279,7 +277,6 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient this.callbacks = new CallbackMap(); this.configuration = TypeScriptServiceConfiguration.loadFromWorkspace(); - this._experimentalAutoBuild = false; // configuration.get('typescript.tsserver.experimentalAutoBuild', false); this._apiVersion = new API('1.0.0'); this._checkGlobalTSCVersion = true; this.tracer = new Tracer(this.logger); @@ -338,10 +335,6 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient return this._onTypesInstallerInitializationFailed.event; } - public get experimentalAutoBuild(): boolean { - return this._experimentalAutoBuild; - } - public get checkGlobalTSCVersion(): boolean { return this._checkGlobalTSCVersion; } @@ -741,13 +734,6 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient let configureOptions: Proto.ConfigureRequestArguments = { hostInfo: 'vscode' }; - if (this._experimentalAutoBuild && this.storagePath) { - try { - fs.mkdirSync(this.storagePath); - } catch (error) { - } - // configureOptions.autoDiagnostics = true; - } this.execute('configure', configureOptions); this.setCompilerOptionsForInferredProjects(); if (resendModels) { -- GitLab