From 5f53f7c741ed5bcab88e9a4fb97d865b0dfb7e9e Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 18 Aug 2016 16:58:38 +0200 Subject: [PATCH] remove debugBrkFileWatcherPort --- src/vs/code/electron-main/env.ts | 16 ---------------- src/vs/code/electron-main/window.ts | 1 - src/vs/code/electron-main/windows.ts | 1 - src/vs/code/node/argv.ts | 1 - .../platform/environment/common/environment.ts | 2 -- .../environment/node/environmentService.ts | 5 ----- .../files/electron-browser/fileService.ts | 5 ----- .../workbench/services/files/node/fileService.ts | 3 +-- .../files/node/watcher/unix/watcherService.ts | 6 +----- 9 files changed, 2 insertions(+), 38 deletions(-) diff --git a/src/vs/code/electron-main/env.ts b/src/vs/code/electron-main/env.ts index eca0695e171..00e0abd8946 100644 --- a/src/vs/code/electron-main/env.ts +++ b/src/vs/code/electron-main/env.ts @@ -55,20 +55,6 @@ export interface IEnvService { createPaths(): TPromise; } -function getNumericValue(value: string, defaultValue: number, fallback: number = void 0) { - const numericValue = parseInt(value); - - if (types.isNumber(numericValue)) { - return numericValue; - } - - if (value) { - return defaultValue; - } - - return fallback; -} - export class EnvService implements IEnvService { _serviceBrand: any; @@ -143,7 +129,6 @@ export class EnvService implements IEnvService { const argv = parseArgs(args); const paths = parsePathArguments(this._currentWorkingDirectory, argv._, argv.goto); - const debugBrkFileWatcherPort = getNumericValue(argv.debugBrkFileWatcherPort, void 0); this._cliArgs = Object.freeze({ _: [], @@ -153,7 +138,6 @@ export class EnvService implements IEnvService { debugPluginHost: argv.debugPluginHost, debugBrkPluginHost: argv.debugBrkPluginHost, logExtensionHostCommunication: argv.logExtensionHostCommunication, - debugBrkFileWatcherPort: debugBrkFileWatcherPort ? String(debugBrkFileWatcherPort) : void 0, 'new-window': argv['new-window'], 'reuse-window': argv['reuse-window'], goto: argv.goto, diff --git a/src/vs/code/electron-main/window.ts b/src/vs/code/electron-main/window.ts index 4c2d80766c4..b819574cdd9 100644 --- a/src/vs/code/electron-main/window.ts +++ b/src/vs/code/electron-main/window.ts @@ -378,7 +378,6 @@ export class VSCodeWindow { // in plugin development mode. These options are all development related. if (this.isPluginDevelopmentHost && cli) { configuration.verbose = cli.verbose; - configuration.debugBrkFileWatcherPort = cli.debugBrkFileWatcherPort; configuration.debugPluginHost = cli.debugPluginHost; configuration.debugBrkPluginHost = cli.debugBrkPluginHost; configuration.extensionHomePath = cli.extensionHomePath; diff --git a/src/vs/code/electron-main/windows.ts b/src/vs/code/electron-main/windows.ts index d313a2a87cd..97e60bfe248 100644 --- a/src/vs/code/electron-main/windows.ts +++ b/src/vs/code/electron-main/windows.ts @@ -906,7 +906,6 @@ export class WindowsManager implements IWindowsService { if (!configuration.extensionDevelopmentPath && currentWindowConfig && !!currentWindowConfig.extensionDevelopmentPath) { configuration.extensionDevelopmentPath = currentWindowConfig.extensionDevelopmentPath; configuration.verbose = currentWindowConfig.verbose; - configuration.debugBrkFileWatcherPort = currentWindowConfig.debugBrkFileWatcherPort; configuration.debugBrkPluginHost = currentWindowConfig.debugBrkPluginHost; configuration.debugPluginHost = currentWindowConfig.debugPluginHost; configuration.extensionHomePath = currentWindowConfig.extensionHomePath; diff --git a/src/vs/code/node/argv.ts b/src/vs/code/node/argv.ts index 89a888d3f83..26c4774d60b 100644 --- a/src/vs/code/node/argv.ts +++ b/src/vs/code/node/argv.ts @@ -20,7 +20,6 @@ export interface ParsedArgs extends minimist.ParsedArgs { performance?: boolean; verbose?: boolean; logExtensionHostCommunication?: boolean; - debugBrkFileWatcherPort?: string; 'disable-extensions'?: boolean; extensionHomePath?: string; extensionDevelopmentPath?: string; diff --git a/src/vs/platform/environment/common/environment.ts b/src/vs/platform/environment/common/environment.ts index 2b5c82709cc..423e5642f7a 100644 --- a/src/vs/platform/environment/common/environment.ts +++ b/src/vs/platform/environment/common/environment.ts @@ -33,6 +33,4 @@ export interface IEnvironmentService { isBuilt: boolean; verbose: boolean; performance: boolean; - - debugBrkFileWatcherPort: number; } \ No newline at end of file diff --git a/src/vs/platform/environment/node/environmentService.ts b/src/vs/platform/environment/node/environmentService.ts index 062d00123b5..e4010033b97 100644 --- a/src/vs/platform/environment/node/environmentService.ts +++ b/src/vs/platform/environment/node/environmentService.ts @@ -61,9 +61,6 @@ export class EnvironmentService implements IEnvironmentService { get performance(): boolean { return this.args.performance; } get logExtensionHostCommunication(): boolean { return this.args.logExtensionHostCommunication; } - private _debugBrkFileWatcherPort: number; - get debugBrkFileWatcherPort(): number { return this._debugBrkFileWatcherPort; } - constructor(private args: IEnvironment) { this._appRoot = path.dirname(URI.parse(require.toUrl('')).fsPath); this._userDataPath = args['user-data-dir'] || paths.getDefaultUserDataPath(process.platform); @@ -81,8 +78,6 @@ export class EnvironmentService implements IEnvironmentService { const { port, brk } = parseExtensionHostPort(args, this.isBuilt); this._debugExtensionHostPort = port; this._debugBrkExtensionHost = brk; - - this._debugBrkFileWatcherPort = (typeof args.debugBrkFileWatcherPort === 'string') ? Number(args.debugBrkFileWatcherPort) : void 0; } } diff --git a/src/vs/workbench/services/files/electron-browser/fileService.ts b/src/vs/workbench/services/files/electron-browser/fileService.ts index fc925ced549..bf722511185 100644 --- a/src/vs/workbench/services/files/electron-browser/fileService.ts +++ b/src/vs/workbench/services/files/electron-browser/fileService.ts @@ -63,13 +63,8 @@ export class FileService implements IFileService { encodingOverride: encodingOverride, watcherIgnoredPatterns: watcherIgnoredPatterns, verboseLogging: environmentService.verbose, - debugBrkFileWatcherPort: environmentService.debugBrkFileWatcherPort }; - if (typeof environmentService.debugBrkFileWatcherPort === 'number') { - console.warn(`File Watcher STOPPED on first line for debugging on port ${environmentService.debugBrkFileWatcherPort}`); - } - // create service let workspace = this.contextService.getWorkspace(); this.raw = new NodeFileService(workspace ? workspace.resource.fsPath : void 0, fileServiceConfig, this.eventService); diff --git a/src/vs/workbench/services/files/node/fileService.ts b/src/vs/workbench/services/files/node/fileService.ts index 3b32f4d9d03..83c5eb6ddb9 100644 --- a/src/vs/workbench/services/files/node/fileService.ts +++ b/src/vs/workbench/services/files/node/fileService.ts @@ -47,7 +47,6 @@ export interface IFileServiceOptions { watcherIgnoredPatterns?: string[]; disableWatcher?: boolean; verboseLogging?: boolean; - debugBrkFileWatcherPort?: number; } function etag(stat: fs.Stats): string; @@ -129,7 +128,7 @@ export class FileService implements IFileService { } private setupUnixWorkspaceWatching(): void { - this.workspaceWatcherToDispose = new UnixWatcherService(this.basePath, this.options.watcherIgnoredPatterns, this.eventEmitter, this.options.errorLogger, this.options.verboseLogging, this.options.debugBrkFileWatcherPort).startWatching(); + this.workspaceWatcherToDispose = new UnixWatcherService(this.basePath, this.options.watcherIgnoredPatterns, this.eventEmitter, this.options.errorLogger, this.options.verboseLogging).startWatching(); } public resolveFile(resource: uri, options?: IResolveFileOptions): TPromise { diff --git a/src/vs/workbench/services/files/node/watcher/unix/watcherService.ts b/src/vs/workbench/services/files/node/watcher/unix/watcherService.ts index 2b299d58214..722fe5de4c8 100644 --- a/src/vs/workbench/services/files/node/watcher/unix/watcherService.ts +++ b/src/vs/workbench/services/files/node/watcher/unix/watcherService.ts @@ -25,8 +25,7 @@ export class FileWatcher { private ignored: string[], private eventEmitter: IEventService, private errorLogger: (msg: string) => void, - private verboseLogging: boolean, - private debugBrkFileWatcherPort: number + private verboseLogging: boolean ) { this.isDisposed = false; this.restartCounter = 0; @@ -34,9 +33,6 @@ export class FileWatcher { public startWatching(): () => void { const args = ['--type=watcherService']; - if (typeof this.debugBrkFileWatcherPort === 'number') { - args.push(`--debug-brk=${this.debugBrkFileWatcherPort}`); - } const client = new Client( uri.parse(require.toUrl('bootstrap')).fsPath,