From 86459b02c5a18a505528b85749488e5d5968987d Mon Sep 17 00:00:00 2001 From: bunnie Date: Mon, 29 May 2023 00:40:17 +0800 Subject: [PATCH] fix cargo check environment for the latest vscode seems they refactored the way rust workspaces are handled and deprecated previous keywords and added some other features that break cargo check. This overrides all of that and manually configures cargo check to be harmonized with the hardware target environment. --- .vscode/settings.json | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 44c9a5b82..87327e126 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,15 @@ { - "rust-analyzer.checkOnSave.allTargets": false, "rust-analyzer.cargo.target":"riscv32imac-unknown-xous-elf", - "rust-analyzer.checkOnSave.extraArgs": ["--target-dir", "./target/check"], + "rust-analyzer.check.overrideCommand":[ + "cargo", + "check", + "--target", "riscv32imac-unknown-xous-elf", + "--target-dir", "target/analyzer", + "--features", "precursor", + "--features", "utralib/precursor", + "--features", "utralib/precursor-pvt", + "--message-format", "json" + ], "rust-analyzer.server.extraEnv": { "XOUS_SVD_FILE": "../precursors/soc.svd" }, @@ -13,7 +21,7 @@ "**/.hg": true, "**/CVS": true, "**/.DS_Store": true, - "**/Thumbs.db": true, + "**/Thumbs.db": true }, "cSpell.language": "en,fr" }