aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/run.ts
diff options
context:
space:
mode:
authorveetaha <[email protected]>2020-05-31 03:13:08 +0100
committerveetaha <[email protected]>2020-05-31 03:21:45 +0100
commitd605ec9c321392d9c7ee4b440c560e1e405d92e6 (patch)
tree58d16996d1d1a05733dcc85ae4efddc563b3d3b1 /editors/code/src/run.ts
parenta419cedb1cc661349a022262c8b03993e063252f (diff)
Change Runnable.bin -> Runnable.kind
As per matklad, we now pass the responsibility for finding the binary to the frontend. Also, added caching for finding the binary path to reduce the amount of filesystem interactions.
Diffstat (limited to 'editors/code/src/run.ts')
-rw-r--r--editors/code/src/run.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/editors/code/src/run.ts b/editors/code/src/run.ts
index 2a7a429cf..401cb76af 100644
--- a/editors/code/src/run.ts
+++ b/editors/code/src/run.ts
@@ -1,6 +1,7 @@
1import * as vscode from 'vscode'; 1import * as vscode from 'vscode';
2import * as lc from 'vscode-languageclient'; 2import * as lc from 'vscode-languageclient';
3import * as ra from './lsp_ext'; 3import * as ra from './lsp_ext';
4import * as toolchain from "./toolchain";
4 5
5import { Ctx, Cmd } from './ctx'; 6import { Ctx, Cmd } from './ctx';
6import { startDebugSession, getDebugConfiguration } from './debug'; 7import { startDebugSession, getDebugConfiguration } from './debug';
@@ -175,7 +176,7 @@ export function createTask(spec: ra.Runnable): vscode.Task {
175 const definition: CargoTaskDefinition = { 176 const definition: CargoTaskDefinition = {
176 type: 'cargo', 177 type: 'cargo',
177 label: spec.label, 178 label: spec.label,
178 command: spec.bin, 179 command: toolchain.getPathForExecutable(spec.kind),
179 args: spec.extraArgs ? [...spec.args, '--', ...spec.extraArgs] : spec.args, 180 args: spec.extraArgs ? [...spec.args, '--', ...spec.extraArgs] : spec.args,
180 env: spec.env, 181 env: spec.env,
181 }; 182 };