From 41949748a6123fd6061eb984a47f4fe780525e63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauren=C8=9Biu=20Nicola?= Date: Tue, 15 Jun 2021 09:32:53 +0300 Subject: [PATCH] Use objects instead of bools for markers in package.json --- crates/rust-analyzer/src/config.rs | 4 ++-- editors/code/package.json | 4 ++-- xtask/src/dist.rs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/rust-analyzer/src/config.rs b/crates/rust-analyzer/src/config.rs index 3b20d741a0d..5588c15da0d 100644 --- a/crates/rust-analyzer/src/config.rs +++ b/crates/rust-analyzer/src/config.rs @@ -1062,8 +1062,8 @@ fn generate_package_json_config() { let package_json_path = project_root().join("editors/code/package.json"); let mut package_json = fs::read_to_string(&package_json_path).unwrap(); - let start_marker = " \"$generated-start\": false,\n"; - let end_marker = " \"$generated-end\": false\n"; + let start_marker = " \"$generated-start\": {},\n"; + let end_marker = " \"$generated-end\": {}\n"; let start = package_json.find(start_marker).unwrap() + start_marker.len(); let end = package_json.find(end_marker).unwrap(); diff --git a/editors/code/package.json b/editors/code/package.json index 0f3ed48a0e3..a88a5c44ee7 100644 --- a/editors/code/package.json +++ b/editors/code/package.json @@ -389,7 +389,7 @@ "default": {}, "markdownDescription": "Optional settings passed to the debug engine. Example: `{ \"lldb\": { \"terminal\":\"external\"} }`" }, - "$generated-start": false, + "$generated-start": {}, "rust-analyzer.assist.importGranularity": { "markdownDescription": "How imports should be grouped into use statements.", "default": "crate", @@ -841,7 +841,7 @@ "Search for all symbols kinds" ] }, - "$generated-end": false + "$generated-end": {} } }, "problemPatterns": [ diff --git a/xtask/src/dist.rs b/xtask/src/dist.rs index 3a67294c5e0..c7363688afc 100644 --- a/xtask/src/dist.rs +++ b/xtask/src/dist.rs @@ -45,8 +45,8 @@ fn dist_client(version: &str, release_tag: &str) -> Result<()> { patch .replace(r#""version": "0.4.0-dev""#, &format!(r#""version": "{}""#, version)) .replace(r#""releaseTag": null"#, &format!(r#""releaseTag": "{}""#, release_tag)) - .replace(r#""$generated-start": false,"#, "") - .replace(",\n \"$generated-end\": false", ""); + .replace(r#""$generated-start": {},"#, "") + .replace(",\n \"$generated-end\": {}", ""); if nightly { patch.replace(