From 7ac4ea7fec018f76eed5b5c10fc96ba3d9b969be Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 9 Dec 2019 18:05:49 +0100 Subject: [PATCH] Allow disabling sysroot Might be helpful for debugging --- editors/code/src/config.ts | 5 +++++ editors/code/src/server.ts | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts index 95c3f42e50f..fb9e55dd6fe 100644 --- a/editors/code/src/config.ts +++ b/editors/code/src/config.ts @@ -26,6 +26,8 @@ export class Config { public excludeGlobs = []; public useClientWatching = false; public featureFlags = {}; + // for internal use + public withSysroot: null | boolean = null; public cargoWatchOptions: CargoWatchOptions = { enableOnStartup: 'ask', trace: 'off', @@ -148,5 +150,8 @@ export class Config { if (config.has('featureFlags')) { this.featureFlags = config.get('featureFlags') || {}; } + if (config.has('withSysroot')) { + this.withSysroot = config.get('withSysroot') || false; + } } } diff --git a/editors/code/src/server.ts b/editors/code/src/server.ts index b346c08288d..e767b6f1b0d 100644 --- a/editors/code/src/server.ts +++ b/editors/code/src/server.ts @@ -57,7 +57,8 @@ export class Server { maxInlayHintLength: Server.config.maxInlayHintLength, excludeGlobs: Server.config.excludeGlobs, useClientWatching: Server.config.useClientWatching, - featureFlags: Server.config.featureFlags + featureFlags: Server.config.featureFlags, + withSysroot: Server.config.withSysroot }, traceOutputChannel }; -- 2.44.0