diff options
author | veetaha <[email protected]> | 2020-05-31 03:13:08 +0100 |
---|---|---|
committer | veetaha <[email protected]> | 2020-05-31 03:21:45 +0100 |
commit | d605ec9c321392d9c7ee4b440c560e1e405d92e6 (patch) | |
tree | 58d16996d1d1a05733dcc85ae4efddc563b3d3b1 /editors/code/src/run.ts | |
parent | a419cedb1cc661349a022262c8b03993e063252f (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.ts | 3 |
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 @@ | |||
1 | import * as vscode from 'vscode'; | 1 | import * as vscode from 'vscode'; |
2 | import * as lc from 'vscode-languageclient'; | 2 | import * as lc from 'vscode-languageclient'; |
3 | import * as ra from './lsp_ext'; | 3 | import * as ra from './lsp_ext'; |
4 | import * as toolchain from "./toolchain"; | ||
4 | 5 | ||
5 | import { Ctx, Cmd } from './ctx'; | 6 | import { Ctx, Cmd } from './ctx'; |
6 | import { startDebugSession, getDebugConfiguration } from './debug'; | 7 | import { 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 | }; |