diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index f1643edcfaa..739c4bea73c 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -96,7 +96,7 @@ export function createApiFactory(initData: IInitData, threadService: IThreadServ if (extension.enableProposedApi) { - if (initData.environment.isBuilt && !initData.environment.extensionDevelopmentPath) { + if (!initData.environment.enableProposedApi) { extension.enableProposedApi = false; console.warn('PROPOSED API is only available when developing an extension'); diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index 6637c5b3e35..c22d192f2ee 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -39,7 +39,7 @@ import { IApplyEditsOptions, TextEditorRevealType, ITextEditorConfigurationUpdat import { InternalTreeExplorerNodeContent } from 'vs/workbench/parts/explorers/common/treeExplorerViewModel'; export interface IEnvironment { - isBuilt: boolean; + enableProposedApi: boolean; appSettingsHome: string; disableExtensions: boolean; userExtensionsHome: string; diff --git a/src/vs/workbench/electron-browser/extensionHost.ts b/src/vs/workbench/electron-browser/extensionHost.ts index a5cf60ef1cc..cfaa68afc02 100644 --- a/src/vs/workbench/electron-browser/extensionHost.ts +++ b/src/vs/workbench/electron-browser/extensionHost.ts @@ -21,6 +21,7 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IWindowIPCService } from 'vs/workbench/services/window/electron-browser/windowService'; import { ChildProcess, fork } from 'child_process'; import { ipcRenderer as ipc } from 'electron'; +import product from 'vs/platform/product'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { ReloadWindowAction } from 'vs/workbench/electron-browser/actions'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; @@ -249,12 +250,13 @@ export class ExtensionHostProcessWorker { let initData: IInitData = { parentPid: process.pid, environment: { - isBuilt: this.environmentService.isBuilt, appSettingsHome: this.environmentService.appSettingsHome, disableExtensions: this.environmentService.disableExtensions, userExtensionsHome: this.environmentService.extensionsPath, extensionDevelopmentPath: this.environmentService.extensionDevelopmentPath, - extensionTestsPath: this.environmentService.extensionTestsPath + extensionTestsPath: this.environmentService.extensionTestsPath, + // globally disable proposed api when built and not insiders developing extensions + enableProposedApi: !this.environmentService.isBuilt || (!!this.environmentService.extensionDevelopmentPath && product.nameLong.indexOf('Insiders') >= 0) }, contextService: { workspace: this.contextService.getWorkspace()