about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2023-02-08 20:01:28 -0800
committerGitHub <noreply@github.com>2023-02-08 20:01:28 -0800
commit3e07554fd73079a38a7d659676c2ada99db47d93 (patch)
treedd40e9d754e085d07687fcfaf62a031dac9177c1
parentae2ecff04b3029030d0aa0dff57a4f8eaf1a6747 (diff)
parent730470c8dd9b605333f84119e501193d06966528 (diff)
downloadrust-3e07554fd73079a38a7d659676c2ada99db47d93.tar.gz
rust-3e07554fd73079a38a7d659676c2ada99db47d93.zip
Rollup merge of #107819 - clubby789:x-py-root, r=jyn514
Set `rust-analyzer.check.invocationLocation` to `root`

Add
```json
    "rust-analyzer.check.invocationLocation": "root",
    "rust-analyzer.check.invocationStrategy": "once",
```
to the bundled VS code config. This prevents an error with r-a invoking `python3 x.py` in `src/bootstrap` where `x.py` does not exist.

r? ``@jyn514``
-rw-r--r--src/bootstrap/setup.rs8
-rw-r--r--src/etc/vscode_settings.json2
2 files changed, 7 insertions, 3 deletions
diff --git a/src/bootstrap/setup.rs b/src/bootstrap/setup.rs
index c98a5245084..2b613ad50ee 100644
--- a/src/bootstrap/setup.rs
+++ b/src/bootstrap/setup.rs
@@ -24,10 +24,12 @@ pub enum Profile {
 }
 
 /// A list of historical hashes of `src/etc/vscode_settings.json`.
-/// New entries should be appended whenever this is updated so we can detected
+/// New entries should be appended whenever this is updated so we can detect
 /// outdated vs. user-modified settings files.
-static SETTINGS_HASHES: &[&str] =
-    &["ea67e259dedf60d4429b6c349a564ffcd1563cf41c920a856d1f5b16b4701ac8"];
+static SETTINGS_HASHES: &[&str] = &[
+    "ea67e259dedf60d4429b6c349a564ffcd1563cf41c920a856d1f5b16b4701ac8",
+    "56e7bf011c71c5d81e0bf42e84938111847a810eee69d906bba494ea90b51922",
+];
 static VSCODE_SETTINGS: &str = include_str!("../etc/vscode_settings.json");
 
 impl Profile {
diff --git a/src/etc/vscode_settings.json b/src/etc/vscode_settings.json
index cd61a38c5da..04c34ce91c0 100644
--- a/src/etc/vscode_settings.json
+++ b/src/etc/vscode_settings.json
@@ -1,4 +1,6 @@
 {
+    "rust-analyzer.check.invocationLocation": "root",
+    "rust-analyzer.check.invocationStrategy": "once",
     "rust-analyzer.checkOnSave.overrideCommand": [
         "python3",
         "x.py",