diff options
| author | Laurențiu Nicola <lnicola@dend.ro> | 2024-01-03 11:35:07 +0200 |
|---|---|---|
| committer | Laurențiu Nicola <lnicola@dend.ro> | 2024-01-03 11:35:07 +0200 |
| commit | f0108b9d5e63283fb9c0555f47bbc97c1f8b13a8 (patch) | |
| tree | b30316ddf90243a69b9ba96e2abac870f2661eb6 /src/tools/rust-analyzer/editors/code | |
| parent | e51e98dde6a60637b6a71b8105245b629ac3fe77 (diff) | |
| parent | 426d2842c1f0e5cc5e34bb37c7ac3ee0945f9746 (diff) | |
Merge commit '426d2842c1f0e5cc5e34bb37c7ac3ee0945f9746' into sync-from-ra2
Diffstat (limited to 'src/tools/rust-analyzer/editors/code')
4 files changed, 27 insertions, 17 deletions
diff --git a/src/tools/rust-analyzer/editors/code/package-lock.json b/src/tools/rust-analyzer/editors/code/package-lock.json index 1c94f13d745..8b9d5d4a746 100644 --- a/src/tools/rust-analyzer/editors/code/package-lock.json +++ b/src/tools/rust-analyzer/editors/code/package-lock.json @@ -21,7 +21,7 @@ "@types/vscode": "~1.78.1", "@typescript-eslint/eslint-plugin": "^6.0.0", "@typescript-eslint/parser": "^6.0.0", - "@vscode/test-electron": "^2.3.3", + "@vscode/test-electron": "^2.3.8", "@vscode/vsce": "^2.19.0", "esbuild": "^0.18.12", "eslint": "^8.44.0", @@ -763,15 +763,15 @@ } }, "node_modules/@vscode/test-electron": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/@vscode/test-electron/-/test-electron-2.3.3.tgz", - "integrity": "sha512-hgXCkDP0ibboF1K6seqQYyHAzCURgTwHS/6QU7slhwznDLwsRwg9bhfw1CZdyUEw8vvCmlrKWnd7BlQnI0BC4w==", + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/@vscode/test-electron/-/test-electron-2.3.8.tgz", + "integrity": "sha512-b4aZZsBKtMGdDljAsOPObnAi7+VWIaYl3ylCz1jTs+oV6BZ4TNHcVNC3xUn0azPeszBmwSBDQYfFESIaUQnrOg==", "dev": true, "dependencies": { "http-proxy-agent": "^4.0.1", "https-proxy-agent": "^5.0.0", "jszip": "^3.10.1", - "semver": "^7.3.8" + "semver": "^7.5.2" }, "engines": { "node": ">=16" diff --git a/src/tools/rust-analyzer/editors/code/package.json b/src/tools/rust-analyzer/editors/code/package.json index cfaf4213277..27ed8ac502b 100644 --- a/src/tools/rust-analyzer/editors/code/package.json +++ b/src/tools/rust-analyzer/editors/code/package.json @@ -57,7 +57,7 @@ "@types/vscode": "~1.78.1", "@typescript-eslint/eslint-plugin": "^6.0.0", "@typescript-eslint/parser": "^6.0.0", - "@vscode/test-electron": "^2.3.3", + "@vscode/test-electron": "^2.3.8", "@vscode/vsce": "^2.19.0", "esbuild": "^0.18.12", "eslint": "^8.44.0", @@ -586,6 +586,11 @@ "type": "string" } }, + "rust-analyzer.cargo.buildScripts.rebuildOnSave": { + "markdownDescription": "Rerun proc-macros building/build-scripts running when proc-macro\nor build-script sources change and are saved.", + "default": false, + "type": "boolean" + }, "rust-analyzer.cargo.buildScripts.useRustcWrapper": { "markdownDescription": "Use `RUSTC_WRAPPER=rust-analyzer` when running build scripts to\navoid checking unnecessary things.", "default": true, @@ -731,7 +736,7 @@ "uniqueItems": true }, "rust-analyzer.check.invocationLocation": { - "markdownDescription": "Specifies the working directory for running checks.\n- \"workspace\": run checks for workspaces in the corresponding workspaces' root directories.\n This falls back to \"root\" if `#rust-analyzer.cargo.check.invocationStrategy#` is set to `once`.\n- \"root\": run checks in the project's root directory.\nThis config only has an effect when `#rust-analyzer.cargo.check.overrideCommand#`\nis set.", + "markdownDescription": "Specifies the working directory for running checks.\n- \"workspace\": run checks for workspaces in the corresponding workspaces' root directories.\n This falls back to \"root\" if `#rust-analyzer.check.invocationStrategy#` is set to `once`.\n- \"root\": run checks in the project's root directory.\nThis config only has an effect when `#rust-analyzer.check.overrideCommand#`\nis set.", "default": "workspace", "type": "string", "enum": [ @@ -744,7 +749,7 @@ ] }, "rust-analyzer.check.invocationStrategy": { - "markdownDescription": "Specifies the invocation strategy to use when running the check command.\nIf `per_workspace` is set, the command will be executed for each workspace.\nIf `once` is set, the command will be executed once.\nThis config only has an effect when `#rust-analyzer.cargo.check.overrideCommand#`\nis set.", + "markdownDescription": "Specifies the invocation strategy to use when running the check command.\nIf `per_workspace` is set, the command will be executed for each workspace.\nIf `once` is set, the command will be executed once.\nThis config only has an effect when `#rust-analyzer.check.overrideCommand#`\nis set.", "default": "per_workspace", "type": "string", "enum": [ @@ -765,7 +770,7 @@ ] }, "rust-analyzer.check.overrideCommand": { - "markdownDescription": "Override the command rust-analyzer uses instead of `cargo check` for\ndiagnostics on save. The command is required to output json and\nshould therefore include `--message-format=json` or a similar option\n(if your client supports the `colorDiagnosticOutput` experimental\ncapability, you can use `--message-format=json-diagnostic-rendered-ansi`).\n\nIf you're changing this because you're using some tool wrapping\nCargo, you might also want to change\n`#rust-analyzer.cargo.buildScripts.overrideCommand#`.\n\nIf there are multiple linked projects/workspaces, this command is invoked for\neach of them, with the working directory being the workspace root\n(i.e., the folder containing the `Cargo.toml`). This can be overwritten\nby changing `#rust-analyzer.cargo.check.invocationStrategy#` and\n`#rust-analyzer.cargo.check.invocationLocation#`.\n\nAn example command would be:\n\n```bash\ncargo check --workspace --message-format=json --all-targets\n```\n.", + "markdownDescription": "Override the command rust-analyzer uses instead of `cargo check` for\ndiagnostics on save. The command is required to output json and\nshould therefore include `--message-format=json` or a similar option\n(if your client supports the `colorDiagnosticOutput` experimental\ncapability, you can use `--message-format=json-diagnostic-rendered-ansi`).\n\nIf you're changing this because you're using some tool wrapping\nCargo, you might also want to change\n`#rust-analyzer.cargo.buildScripts.overrideCommand#`.\n\nIf there are multiple linked projects/workspaces, this command is invoked for\neach of them, with the working directory being the workspace root\n(i.e., the folder containing the `Cargo.toml`). This can be overwritten\nby changing `#rust-analyzer.check.invocationStrategy#` and\n`#rust-analyzer.check.invocationLocation#`.\n\nAn example command would be:\n\n```bash\ncargo check --workspace --message-format=json --all-targets\n```\n.", "default": null, "type": [ "null", @@ -1690,11 +1695,14 @@ "name": "rust-panic", "patterns": [ { - "regexp": "^thread '.*' panicked at '(.*)', (.*):(\\d*):(\\d*)$", - "message": 1, - "file": 2, - "line": 3, - "column": 4 + "regexp": "^thread '.*' panicked at (.*):(\\d*):(\\d*):$", + "file": 1, + "line": 2, + "column": 3 + }, + { + "regexp": "(.*)", + "message": 1 } ] } diff --git a/src/tools/rust-analyzer/editors/code/src/debug.ts b/src/tools/rust-analyzer/editors/code/src/debug.ts index 06034e16480..d9c6b6ac456 100644 --- a/src/tools/rust-analyzer/editors/code/src/debug.ts +++ b/src/tools/rust-analyzer/editors/code/src/debug.ts @@ -135,8 +135,10 @@ async function getDebugConfiguration( let sourceFileMap = debugOptions.sourceFileMap; if (sourceFileMap === "auto") { // let's try to use the default toolchain - const commitHash = await getRustcId(wsFolder); - const sysroot = await getSysroot(wsFolder); + const [commitHash, sysroot] = await Promise.all([ + getRustcId(wsFolder), + getSysroot(wsFolder), + ]); const rustlib = path.normalize(sysroot + "/lib/rustlib/src/rust"); sourceFileMap = {}; sourceFileMap[`/rustc/${commitHash}/`] = rustlib; diff --git a/src/tools/rust-analyzer/editors/code/src/run.ts b/src/tools/rust-analyzer/editors/code/src/run.ts index 778cbc5762a..fc3f1acce54 100644 --- a/src/tools/rust-analyzer/editors/code/src/run.ts +++ b/src/tools/rust-analyzer/editors/code/src/run.ts @@ -43,7 +43,7 @@ export async function selectRunnable( return; } - // clear the list before we hook up listeners to to avoid invoking them + // clear the list before we hook up listeners to avoid invoking them // if the user happens to accept the placeholder item quickPick.items = []; |
