Skip to content
This repository was archived by the owner on Nov 18, 2022. It is now read-only.

Commit 3333323

Browse files
committed
Remove rls.root option
rls.path is a better option, we don't need two ways and I don't think anyone uses this one any more
1 parent 0637e21 commit 3333323

File tree

3 files changed

+2
-23
lines changed

3 files changed

+2
-23
lines changed

contributing.md

+2-8
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,8 @@ from https://www.rustup.rs/.
2727
### Via Source
2828

2929
Check out the RLS source code, following the [directions](https://github.com/rust-lang-nursery/rls/blob/master/contributing.md).
30-
For the plugin to find the RLS, set the `rls.root` setting to the
31-
root of your rls checkout (e.g., `/Source/rls`):
32-
33-
34-
### Via an executable
35-
36-
Similar to above, but use the `rls.path` and point it at the RLS executable
37-
(e.g., `/rls/target/release/rls`). Note that you must include the name of the
30+
Point the `rls.path` setting at the RLS executable (e.g.,
31+
`/rls/target/release/rls`). Note that you must include the name of the
3832
executable, not just the path.
3933

4034

src/configuration.ts

-7
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,6 @@ export class RLSConfiguration {
4141
* specified, RLS will be spawned by executing a file at the given path.
4242
*/
4343
public readonly rlsPath: string | null;
44-
/**
45-
* Hidden option that can be specified via `"rls.root"` key (e.g. to `/home/<user>/rls/repo`).
46-
* If specified, RLS will be spawned by executing `cargo run --release` under a given working
47-
* directory.
48-
*/
49-
public readonly rlsRoot: string | null;
5044

5145
public static loadFromWorkspace(): RLSConfiguration {
5246
const configuration = workspace.getConfiguration();
@@ -65,7 +59,6 @@ export class RLSConfiguration {
6559

6660
// Hidden options that are not exposed to the user
6761
this.rlsPath = configuration.get('rls.path', null);
68-
this.rlsRoot = configuration.get('rls.root', null);
6962
}
7063

7164
private static readRevealOutputChannelOn(configuration: WorkspaceConfiguration) {

src/extension.ts

-8
Original file line numberDiff line numberDiff line change
@@ -81,20 +81,12 @@ async function makeRlsEnv(setLibPath = false): Promise<any> {
8181
async function makeRlsProcess(): Promise<child_process.ChildProcess> {
8282
// Allow to override how RLS is started up.
8383
const rls_path = CONFIGURATION.rlsPath;
84-
const rls_root = CONFIGURATION.rlsRoot;
8584

8685
let childProcessPromise: Promise<child_process.ChildProcess>;
8786
if (rls_path) {
8887
const env = await makeRlsEnv(true);
8988
console.info('running ' + rls_path);
9089
childProcessPromise = Promise.resolve(child_process.spawn(rls_path, [], { env }));
91-
} else if (rls_root) {
92-
const env = await makeRlsEnv();
93-
console.info('running `cargo run` in ' + rls_root);
94-
childProcessPromise = Promise.resolve(child_process.spawn(
95-
CONFIGURATION.rustupPath, ['run', CONFIGURATION.channel, 'cargo', 'run', '--release'],
96-
{ cwd: rls_root, env })
97-
);
9890
} else {
9991
const env = await makeRlsEnv();
10092
console.info('running with rustup');

0 commit comments

Comments
 (0)