From 146131bae622ec8f6a07bd0ce2d945243343f32c Mon Sep 17 00:00:00 2001 From: Kalita Alexey Date: Sat, 24 Jun 2017 09:08:54 +0300 Subject: [PATCH 1/2] Added `"rust.rustup.nightlyToolchain"`. --- package.json | 8 + .../configuration/RlsConfiguration.ts | 14 +- src/components/configuration/Rustup.ts | 119 +++---- src/extension.ts | 335 +++++++++++------- 4 files changed, 272 insertions(+), 204 deletions(-) diff --git a/package.json b/package.json index 2b2b51c..68b76f7 100644 --- a/package.json +++ b/package.json @@ -477,6 +477,14 @@ "string", "null" ] + }, + "nightlyToolchain": { + "default": null, + "description": "The nightly toolchain to use for installing RLS and related components and running RLS", + "type": [ + "string", + "null" + ] } } }, diff --git a/src/components/configuration/RlsConfiguration.ts b/src/components/configuration/RlsConfiguration.ts index c50fc76..8720220 100644 --- a/src/components/configuration/RlsConfiguration.ts +++ b/src/components/configuration/RlsConfiguration.ts @@ -27,6 +27,13 @@ export class RlsConfiguration { return new RlsConfiguration(rustup, rustSource, executableUserPath); } + /** + * Returns if there is some executable path specified by the user + */ + public isExecutableUserPathSet(): boolean { + return this._executableUserPath !== undefined; + } + /** * Returns a path to RLS executable */ @@ -47,7 +54,12 @@ export class RlsConfiguration { // When the user specifies some executable path, the user expects the extension not to add // some arguments if (this._executableUserPath === undefined && this._rustup && this._rustup.isRlsInstalled()) { - return ['run', 'nightly', 'rls'].concat(this._userArgs); + const userToolchain = this._rustup.getUserNightlyToolchain(); + if (!userToolchain) { + // It is actually impossible because `isRlsInstalled` uses `getUserNightlyToolchain` + return this._userArgs; + } + return ['run', userToolchain.toString(true, false), 'rls'].concat(this._userArgs); } else { return this._userArgs; } diff --git a/src/components/configuration/Rustup.ts b/src/components/configuration/Rustup.ts index 7e24079..23969e7 100644 --- a/src/components/configuration/Rustup.ts +++ b/src/components/configuration/Rustup.ts @@ -27,12 +27,6 @@ export class Rustup { */ private pathToRustSourceCode: string | undefined; - /** - * A path to the executable of RLS. - * It can be undefined if the component "rls" is not installed - */ - private pathToRlsExecutable: string | undefined; - /** * Components received by invoking rustup */ @@ -48,6 +42,10 @@ export class Rustup { */ private _userToolchain: Toolchain | undefined; + /** + * The nightly toolchain chosen by the user + */ + private _userNightlyToolchain: Toolchain | undefined; /** * Returns the executable of Rustup @@ -70,26 +68,6 @@ export class Rustup { return rustup; } - /** - * Return either the only nightly toolchain or undefined if there is no nightly toolchain or - * there are several nightly toolchains - */ - public getNightlyToolchain(logger: ChildLogger): Toolchain | undefined { - const functionLogger = logger.createChildLogger('getNightlyToolchain: '); - const nightlyToolchains = this.getNightlyToolchains(); - switch (nightlyToolchains.length) { - case 0: - functionLogger.error('There is no nightly toolchain'); - return undefined; - case 1: - functionLogger.debug('There is only one nightly toolchain'); - return nightlyToolchains[0]; - default: - functionLogger.debug(`There are ${nightlyToolchains.length} nightly toolchains`); - return undefined; - } - } - /** * Returns either the default toolchain or undefined if there are no installed toolchains */ @@ -109,6 +87,10 @@ export class Rustup { return this.toolchains; } + public getNightlyToolchains(): Toolchain[] { + return this.toolchains.filter(t => t.channel === 'nightly'); + } + /** * Checks if the toolchain is installed * @param toolchain The toolchain to check @@ -125,10 +107,24 @@ export class Rustup { } /** - * Returns either the path to the executable of RLS or undefined + * Returns either the nightly toolchain chosen by the user or undefined */ - public getPathToRlsExecutable(): string | undefined { - return this.pathToRlsExecutable; + public getUserNightlyToolchain(): Toolchain | undefined { + return this._userNightlyToolchain; + } + + /** + * Sets the new value of the nightly toolchain in the object and in the configuration + * @param toolchain The new value + */ + public setUserNightlyToolchain(toolchain: Toolchain | undefined): void { + if (this._userNightlyToolchain === toolchain) { + return; + } + this._userNightlyToolchain = toolchain; + updateUserConfigurationParameter(c => { + c.nightlyToolchain = toolchain ? toolchain.toString(true, false) : null; + }); } /** @@ -143,7 +139,9 @@ export class Rustup { return; } this._userToolchain = toolchain; - updateUserConfigurationParameter(c => c.toolchain = toolchain ? toolchain.toString(true, false) : null); + updateUserConfigurationParameter(c => { + c.toolchain = toolchain ? toolchain.toString(true, false) : null; + }); } /** @@ -188,7 +186,7 @@ export class Rustup { */ public async installRls(): Promise { const logger = this.logger.createChildLogger('installRls: '); - const nightlyToolchain = this.getNightlyToolchain(logger); + const nightlyToolchain = this.getUserNightlyToolchain(); if (!nightlyToolchain) { logger.error('no nightly toolchain'); return false; @@ -197,17 +195,7 @@ export class Rustup { nightlyToolchain, Rustup.getRlsComponentName() ); - if (!isComponentInstalled) { - return false; - } - // We need to update the field - await this.updatePathToRlsExecutable(); - if (!this.pathToRlsExecutable) { - logger.error('RLS had been installed successfully, but we failed to find it in PATH. This should have not happened'); - - return false; - } - return true; + return isComponentInstalled; } /** @@ -216,7 +204,7 @@ export class Rustup { */ public async installRustAnalysis(): Promise { const logger = this.logger.createChildLogger('installRustAnalysis: '); - const nightlyToolchain = this.getNightlyToolchain(logger); + const nightlyToolchain = this.getUserNightlyToolchain(); if (!nightlyToolchain) { logger.error('no nightly toolchain'); return false; @@ -291,31 +279,13 @@ export class Rustup { } } - /** - * Checks if the executable of RLS is installed. - * This method assigns either a path to the executable or undefined to the field `pathToRlsExecutable`, depending on if the executable is found - * This method is asynchronous because it checks if the executable exists - */ - public async updatePathToRlsExecutable(): Promise { - const logger = this.logger.createChildLogger('updatePathToRlsExecutable: '); - this.pathToRlsExecutable = undefined; - const rlsPath: string | undefined = await FileSystem.findExecutablePath('rls'); - logger.debug(`rlsPath=${rlsPath}`); - if (!rlsPath) { - // RLS is installed via Rustup, but isn't found. Let a user know about it - logger.error(`Rustup had reported that RLS had been installed, but RLS wasn't found in PATH=${process.env.PATH}`); - return; - } - this.pathToRlsExecutable = rlsPath; - } - /** * Requests Rustup give a list of components, parses it, checks if RLS is present in the list and returns if it is * @returns true if RLS can be installed otherwise false */ public canInstallRls(): boolean { const logger = this.logger.createChildLogger('canInstallRls: '); - const nightlyToolchain = this.getNightlyToolchain(logger); + const nightlyToolchain = this.getUserNightlyToolchain(); if (!nightlyToolchain) { logger.error('no nightly toolchain'); return false; @@ -343,7 +313,7 @@ export class Rustup { */ public isRlsInstalled(): boolean { const logger = this.logger.createChildLogger('isRlsInstalled: '); - const nightlyToolchain = this.getNightlyToolchain(logger); + const nightlyToolchain = this.getUserNightlyToolchain(); if (!nightlyToolchain) { logger.error('no nightly toolchain'); return false; @@ -357,7 +327,7 @@ export class Rustup { */ public isRustAnalysisInstalled(): boolean { const logger = this.logger.createChildLogger('isRustAnalysisInstalled: '); - const nightlyToolchain = this.getNightlyToolchain(logger); + const nightlyToolchain = this.getUserNightlyToolchain(); if (!nightlyToolchain) { logger.error('no nightly toolchain'); return false; @@ -371,7 +341,7 @@ export class Rustup { */ public canInstallRustAnalysis(): boolean { const logger = this.logger.createChildLogger('canInstallRustAnalysis: '); - const nightlyToolchain = this.getNightlyToolchain(logger); + const nightlyToolchain = this.getUserNightlyToolchain(); if (!nightlyToolchain) { logger.error('no nightly toolchain'); return false; @@ -502,20 +472,15 @@ export class Rustup { * @param logger A value for the field `logger` * @param pathToRustcSysRoot A value for the field `pathToRustcSysRoot` * @param pathToRustSourceCode A value for the field `pathToRustSourceCode` - * @param pathToRlsExecutable A value fo the field `pathToRlsExecutable` */ private constructor(logger: ChildLogger) { this.logger = logger; this.pathToRustcSysRoot = undefined; this.pathToRustSourceCode = undefined; - this.pathToRlsExecutable = undefined; this.components = {}; this.toolchains = []; this._userToolchain = getUserToolchain(); - } - - private getNightlyToolchains(): Toolchain[] { - return this.toolchains.filter(t => t.channel === 'nightly'); + this._userNightlyToolchain = getUserNightlyToolchain(); } /** @@ -580,12 +545,12 @@ function getUserConfiguration(): any { return rustupConfiguration; } -function getUserToolchain(): Toolchain | undefined { +function getToolchainFromConfigurationParameter(parameter: string): Toolchain | undefined { const rustupConfiguration = getUserConfiguration(); if (!rustupConfiguration) { return undefined; } - const toolchainAsString = rustupConfiguration.toolchain; + const toolchainAsString = rustupConfiguration[parameter]; if (!toolchainAsString) { return undefined; } @@ -597,6 +562,14 @@ function getUserToolchain(): Toolchain | undefined { } } +function getUserNightlyToolchain(): Toolchain | undefined { + return getToolchainFromConfigurationParameter('nightlyToolchain'); +} + +function getUserToolchain(): Toolchain | undefined { + return getToolchainFromConfigurationParameter('toolchain'); +} + function updateUserConfigurationParameter(updateParameter: (c: any) => void): void { let configuration = getUserConfiguration(); if (!configuration) { diff --git a/src/extension.ts b/src/extension.ts index 5da7393..8595fbe 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -59,33 +59,6 @@ async function askPermissionToInstall(what: string): Promise { return choice === installChoice; } -/** - * Handles the case when rustup reported that the nightly toolchain wasn't installed - * @param logger The logger to log messages - * @param rustup The rustup - */ -async function handleMissingNightlyToolchain(logger: ChildLogger, rustup: Rustup): Promise { - const functionLogger = logger.createChildLogger('handleMissingNightlyToolchain: '); - const permissionGranted = await askPermissionToInstall('the nightly toolchain'); - functionLogger.debug(`permissionGranted=${permissionGranted}`); - if (!permissionGranted) { - return false; - } - window.showInformationMessage('The nightly toolchain is being installed. It can take a while. Please be patient'); - const toolchainInstalled = await rustup.installToolchain('nightly'); - functionLogger.debug(`toolchainInstalled=${toolchainInstalled}`); - if (!toolchainInstalled) { - return false; - } - const nightlyToolchain = rustup.getNightlyToolchain(functionLogger); - if (!nightlyToolchain) { - functionLogger.error('the nightly toolchain has not been installed'); - return false; - } - await rustup.updateComponents(nightlyToolchain); - return true; -} - class RlsMode { private _configuration: Configuration; private _rlsConfiguration: RlsConfiguration; @@ -124,21 +97,52 @@ class RlsMode { return false; } } - if (!this._rlsConfiguration.getExecutablePath()) { + if (!this._rlsConfiguration.isExecutableUserPathSet()) { logger.debug('no RLS executable'); - if (this._rustup) { - logger.debug('has rustup'); - const rlsInstalled = await this.handleMissingRls(); - if (!rlsInstalled) { - logger.debug('RLS has not been installed'); - this._configuration.setMode(undefined); - return false; - } - } else { + if (!this._rustup) { logger.debug('no rustup'); - await this.handleMissingRlsAndRustup(); + await this.informUserThatModeCannotBeUsedAndAskToSwitchToAnotherMode('neither RLS executable path is specified nor rustup is installed'); + return false; + } + // If the user wants to use the RLS mode and doesn't specify any executable path and rustup is installed, then the user wants the extension to take care of RLS and stuff + if (this._rustup.getNightlyToolchains().length === 0) { + // Since RLS can be installed only for some nightly toolchain and the user does + // not have any, then the extension should install it. + await this.handleMissingNightlyToolchain(); + } + // Despite the fact that some nightly toolchains may be installed, the user might have + // chosen some toolchain which isn't installed now + processPossibleSetButMissingUserToolchain( + logger, + this._rustup, + 'nightly toolchain', + (r: Rustup) => r.getUserNightlyToolchain(), + (r: Rustup) => r.setUserNightlyToolchain + ); + if (!this._rustup.getUserNightlyToolchain()) { + // Either the extension havecleared the user nightly toolchain or the user haven't + // chosen it yet. Either way we need to ask the user to choose some nightly toolchain + await handleMissingRustupUserToolchain( + logger, + 'nightly toolchain', + this._rustup.getNightlyToolchains.bind(this._rustup), + this._rustup.setUserNightlyToolchain.bind(this._rustup) + ); + } + const userNightlyToolchain = this._rustup.getUserNightlyToolchain(); + if (!userNightlyToolchain) { + await await this.informUserThatModeCannotBeUsedAndAskToSwitchToAnotherMode('neither RLS executable path is specified nor any nightly toolchain is chosen'); return false; } + const userToolchain = this._rustup.getUserToolchain(); + if (userNightlyToolchain && (!userToolchain || !userToolchain.equals(userNightlyToolchain))) { + await this._rustup.updateComponents(userNightlyToolchain); + } + await this.processPossiblyMissingRlsComponents(); + } + if (!this._rlsConfiguration.getExecutablePath()) { + await this.informUserThatModeCannotBeUsedAndAskToSwitchToAnotherMode('RLS is not found'); + return false; } if (this._rlsConfiguration.getUseRustfmt() === undefined) { logger.debug('User has not decided whether rustfmt should be used yet'); @@ -193,10 +197,83 @@ class RlsMode { return true; } - private async handleMissingRlsAndRustup(): Promise { - const logger = this._logger.createChildLogger('handleMissingRlsAndRustup: '); - logger.debug('enter'); - const message = 'You have chosen RLS mode, but neither RLS nor rustup is installed'; + private async processPossiblyMissingRlsComponents(): Promise { + async function installComponent(componentName: string, installComponent: () => Promise): Promise { + window.showInformationMessage(`${componentName} is being installed. It can take a while`); + const componentInstalled = await installComponent(); + logger.debug(`${componentName} has been installed=${componentInstalled} `); + if (componentInstalled) { + window.showInformationMessage(`${componentName} has been installed successfully`); + } else { + window.showErrorMessage(`${componentName} has not been installed. Check the output channel "Rust Logging"`); + } + return componentInstalled; + } + const logger = this._logger.createChildLogger('processPossiblyMissingRlsComponents: '); + if (!this._rustup) { + logger.error('no rustup; this method should not have been called'); + return; + } + const userToolchain = this._rustup.getUserNightlyToolchain(); + if (!userToolchain) { + logger.error('no user toolchain; this method should have not have been called'); + return; + } + if (this._rustup.isRlsInstalled()) { + logger.debug('RLS is installed'); + } else { + logger.debug('RLS is not installed'); + if (this._rustup.canInstallRls()) { + logger.debug('RLS can be installed'); + } else { + logger.error('RLS cannot be installed'); + return; + } + const userAgreed = await askPermissionToInstall('RLS'); + if (!userAgreed) { + return; + } + const rlsInstalled = await installComponent( + 'RLS', + async () => { return this._rustup && await this._rustup.installRls(); } + ); + if (rlsInstalled) { + logger.debug('RLS has been installed'); + } else { + logger.error('RLS has not been installed'); + return; + } + } + if (this._rustup.isRustAnalysisInstalled()) { + logger.debug('rust-analysis is installed'); + } else { + logger.debug('rust-analysis is not installed'); + if (this._rustup.canInstallRustAnalysis()) { + logger.debug('rust-analysis can be installed'); + } else { + logger.error('rust-analysis cannot be installed'); + return; + } + const userAgreed = await askPermissionToInstall('rust-analysis'); + if (!userAgreed) { + return; + } + const rustAnalysisInstalled = await installComponent( + 'rust-analysis', + async () => { return this._rustup && await this._rustup.installRustAnalysis(); } + ); + if (rustAnalysisInstalled) { + logger.debug('rust-analysis has been installed'); + } else { + logger.debug('rust-analysis has not been installed'); + } + } + } + + private async informUserThatModeCannotBeUsedAndAskToSwitchToAnotherMode(reason: string): Promise { + const logger = this._logger.createChildLogger('informUserThatModeCannotBeUsedAndAskToSwitchToAnotherMode: '); + logger.debug(`reason=${reason}`); + const message = `You have chosen RLS mode, but ${reason}`; const switchToLegacyModeChoice = 'Switch to Legacy mode'; const askMeLaterChoice = 'Ask me later'; const choice = await window.showErrorMessage(message, switchToLegacyModeChoice, askMeLaterChoice); @@ -216,6 +293,47 @@ class RlsMode { } } + /** + * Handles the case when rustup reported that the nightly toolchain wasn't installed + * @param logger The logger to log messages + * @param rustup The rustup + */ + private async handleMissingNightlyToolchain(): Promise { + const logger = this._logger.createChildLogger('handleMissingNightlyToolchain: '); + if (!this._rustup) { + logger.error('no rustup; the method should not have been called'); + return false; + } + if (this._rustup.getNightlyToolchains().length !== 0) { + logger.error('there are nightly toolchains; the method should not have been called'); + return false; + } + const permissionGranted = await askPermissionToInstall('the nightly toolchain'); + logger.debug(`permissionGranted=${permissionGranted}`); + if (!permissionGranted) { + return false; + } + window.showInformationMessage('The nightly toolchain is being installed. It can take a while. Please be patient'); + const toolchainInstalled = await this._rustup.installToolchain('nightly'); + logger.debug(`toolchainInstalled=${toolchainInstalled}`); + if (!toolchainInstalled) { + return false; + } + const toolchains = this._rustup.getNightlyToolchains(); + switch (toolchains.length) { + case 0: + logger.error('the nightly toolchain has not been installed'); + return false; + case 1: + logger.debug('the nightly toolchain has been installed'); + return true; + default: + logger.error(`more than one toolchain detected; toolchains=${toolchains}`); + return false; + } + + } + private async handleMissingValueForUseRustfmt(): Promise { const logger = this._logger.createChildLogger('handleMissingValueForUseRustfmt: '); logger.debug('enter'); @@ -275,77 +393,13 @@ class RlsMode { break; } } - - /** - * Handles the case when the user does not have RLS. - * It tries to install RLS if it is possible - */ - private async handleMissingRls(): Promise { - async function installComponent(componentName: string, installComponent: () => Promise): Promise { - window.showInformationMessage(`${componentName} is being installed. It can take a while`); - const componentInstalled = await installComponent(); - logger.debug(`${componentName} has been installed= ${componentInstalled} `); - if (componentInstalled) { - window.showInformationMessage(`${componentName} has been installed successfully`); - } else { - window.showErrorMessage(`${componentName} has not been installed. Check the output channel "Rust Logging"`); - } - return componentInstalled; - } - const logger = this._logger.createChildLogger('handleMissingRls: '); - if (!this._rustup) { - logger.error('no rustup; this method should not have been called'); - return false; - } - const rustup = this._rustup; - if (await askPermissionToInstall('RLS')) { - logger.debug('Permission to install RLS has been granted'); - } else { - logger.debug('Permission to install RLS has not granted'); - return false; - } - if (!this._rustup.getNightlyToolchain(logger)) { - logger.debug('The nightly toolchain is not installed'); - await handleMissingNightlyToolchain(logger, rustup); - if (!rustup.getNightlyToolchain(logger)) { - logger.debug('The nightly toolchain is not installed'); - return false; - } - } - if (rustup.canInstallRls()) { - logger.debug('RLS can be installed'); - } else { - logger.error('RLS cannot be installed'); - return false; - } - const rlsInstalled = await installComponent( - 'RLS', - async () => { return await rustup.installRls(); } - ); - if (rlsInstalled) { - logger.debug('RLS has been installed'); - } else { - logger.error('RLS has not been installed'); - return false; - } - if (this._rustup.isRustAnalysisInstalled()) { - logger.debug('rust-analysis is installed'); - } else if (this._rustup.canInstallRustAnalysis()) { - logger.debug('rust-analysis can be installed'); - } else { - logger.error('rust-analysis cannot be installed'); - return false; - } - return await installComponent( - 'rust-analysis', - async () => { return await rustup.installRustAnalysis(); } - ); - } } async function handleMissingRustupUserToolchain( - logger: RootLogger, - rustup: Rustup + logger: ChildLogger, + toolchainKind: string, + getToolchains: () => Toolchain[], + setToolchain: (toolchain: Toolchain | undefined) => void ): Promise { class Item implements QuickPickItem { public toolchain: Toolchain; @@ -359,9 +413,9 @@ async function handleMissingRustupUserToolchain( } } const functionLogger = logger.createChildLogger('handleMissingRustupUserToolchain: '); - functionLogger.debug('enter'); - await window.showInformationMessage('To properly function, the extension needs to know what toolchain you want to use'); - const toolchains = rustup.getToolchains(); + functionLogger.debug(`toolchainKind=${toolchainKind}`); + await window.showInformationMessage(`To properly function, the extension needs to know what ${toolchainKind} you want to use`); + const toolchains = getToolchains(); if (toolchains.length === 0) { functionLogger.error('no toolchains'); return; @@ -372,25 +426,53 @@ async function handleMissingRustupUserToolchain( if (!item) { return; } - rustup.setUserToolchain(item.toolchain); + setToolchain(item.toolchain); +} + +function processPossibleSetButMissingUserToolchain( + logger: ChildLogger, + rustup: Rustup, + toolchainKind: string, + getToolchain: (rustup: Rustup) => Toolchain | undefined, + setToolchain: (rustup: Rustup) => (toolchain: Toolchain | undefined) => void +): void { + const functionLogger = logger.createChildLogger('processPossibleSetButMissingUserToolchain: '); + functionLogger.debug(`toolchainKind=${toolchainKind}`); + const userToolchain = getToolchain(rustup); + if (userToolchain === undefined) { + functionLogger.debug(`no user ${toolchainKind}`); + return; + } + if (rustup.isToolchainInstalled(userToolchain)) { + functionLogger.debug(`user ${toolchainKind} is installed`); + return; + } + logger.error(`user ${toolchainKind} is not installed`); + window.showErrorMessage(`The specified ${toolchainKind} is not installed`); + setToolchain(rustup)(undefined); } export async function activate(ctx: ExtensionContext): Promise { const loggingManager = new LoggingManager(); const logger = loggingManager.getLogger(); + const functionLogger = logger.createChildLogger('activate: '); const rustup = await Rustup.create(logger.createChildLogger('Rustup: ')); if (rustup) { await rustup.updateToolchains(); - { - const userToolchain = rustup.getUserToolchain(); - if (userToolchain !== undefined && !rustup.isToolchainInstalled(userToolchain)) { - logger.error('user toolchain is not installed'); - window.showErrorMessage('The specified toolchain is not installed'); - rustup.setUserToolchain(undefined); - } - } + processPossibleSetButMissingUserToolchain( + functionLogger, + rustup, + 'toolchain', + (r: Rustup) => r.getUserToolchain(), + (r: Rustup) => r.setUserToolchain + ); if (!rustup.getUserToolchain()) { - await handleMissingRustupUserToolchain(logger, rustup); + await handleMissingRustupUserToolchain( + functionLogger, + 'toolchain', + rustup.getToolchains.bind(rustup), + rustup.setUserToolchain.bind(rustup) + ); } const userToolchain = rustup.getUserToolchain(); if (userToolchain) { @@ -398,13 +480,6 @@ export async function activate(ctx: ExtensionContext): Promise { await rustup.updateComponents(userToolchain); await rustup.updatePathToRustSourceCodePath(); } - const nightlyToolchain = rustup.getNightlyToolchain(logger.createChildLogger('activate: ')); - if (nightlyToolchain && (!userToolchain || !userToolchain.equals(nightlyToolchain))) { - await rustup.updateComponents(nightlyToolchain); - if (rustup.isRlsInstalled()) { - await rustup.updatePathToRlsExecutable(); - } - } } const rustSource = await RustSource.create(rustup); const configuration = new Configuration(logger.createChildLogger('Configuration: ')); From d699765f87461134f4ff2dd170be7c95cb74a490 Mon Sep 17 00:00:00 2001 From: Kalita Alexey Date: Sat, 24 Jun 2017 09:18:35 +0300 Subject: [PATCH 2/2] Documented --- doc/common_configuration_parameters.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/common_configuration_parameters.md b/doc/common_configuration_parameters.md index 8d50820..0917e50 100644 --- a/doc/common_configuration_parameters.md +++ b/doc/common_configuration_parameters.md @@ -10,3 +10,8 @@ This configuration parameter specifies which toolchain the extension will invoke It is used for getting sysroot, installing components, invoking Cargo However there are few exceptions. Currently RLS is available for nightly hence RLS and rust-analysis are installed for the nightly toolchain. + +### nightlyToolchain + +This configuration parameter specifies which toolchain the extension will invoke rustup with. +It is used for installing RLS and related stuff.