msvc dist extended: rust-analyzer is optional

The windows tarballs and installers expect rust-analyzer to be present, but
it's not always the case. For example, in try builds.
This commit is contained in:
Rémy Rakic 2023-06-04 16:20:08 +02:00
parent 8a4a6f79dd
commit a158053e35

View File

@ -1601,8 +1601,7 @@ fn filter(contents: &str, marker: &str) -> String {
prepare("cargo");
prepare("rust-analysis");
prepare("rust-std");
prepare("rust-analyzer");
for tool in &["clippy", "rust-docs", "rust-demangler", "miri"] {
for tool in &["clippy", "rust-analyzer", "rust-docs", "rust-demangler", "miri"] {
if built_tools.contains(tool) {
prepare(tool);
}
@ -1688,23 +1687,25 @@ fn filter(contents: &str, marker: &str) -> String {
.arg("-out")
.arg(exe.join("StdGroup.wxs")),
);
builder.run(
Command::new(&heat)
.current_dir(&exe)
.arg("dir")
.arg("rust-analyzer")
.args(&heat_flags)
.arg("-cg")
.arg("RustAnalyzerGroup")
.arg("-dr")
.arg("RustAnalyzer")
.arg("-var")
.arg("var.RustAnalyzerDir")
.arg("-out")
.arg(exe.join("RustAnalyzerGroup.wxs"))
.arg("-t")
.arg(etc.join("msi/remove-duplicates.xsl")),
);
if built_tools.contains("rust-analyzer") {
builder.run(
Command::new(&heat)
.current_dir(&exe)
.arg("dir")
.arg("rust-analyzer")
.args(&heat_flags)
.arg("-cg")
.arg("RustAnalyzerGroup")
.arg("-dr")
.arg("RustAnalyzer")
.arg("-var")
.arg("var.RustAnalyzerDir")
.arg("-out")
.arg(exe.join("RustAnalyzerGroup.wxs"))
.arg("-t")
.arg(etc.join("msi/remove-duplicates.xsl")),
);
}
if built_tools.contains("clippy") {
builder.run(
Command::new(&heat)