Skip to content

Commit e25513c

Browse files
committed
Attempt to fix the component manifest problem for rls-preview
cc rust-lang#44270
1 parent 133aefc commit e25513c

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

src/bootstrap/dist.rs

+13-4
Original file line numberDiff line numberDiff line change
@@ -1081,8 +1081,14 @@ impl Step for Rls {
10811081
.arg("--output-dir").arg(&distdir(build))
10821082
.arg("--non-installed-overlay").arg(&overlay)
10831083
.arg(format!("--package-name={}-{}", name, target))
1084-
.arg("--component-name=rls")
10851084
.arg("--legacy-manifest-dirs=rustlib,cargo");
1085+
1086+
if build.config.channel == "nightly" {
1087+
cmd.arg("--component-name=rls");
1088+
} else {
1089+
cmd.arg("--component-name=rls-preview");
1090+
}
1091+
10861092
build.run(&mut cmd);
10871093
distdir(build).join(format!("{}-{}.tar.gz", name, target))
10881094
}
@@ -1279,9 +1285,12 @@ impl Step for Extended {
12791285
cp_r(&work.join(&format!("{}-{}", pkgname(build, "rust-std"), target))
12801286
.join(format!("rust-std-{}", target)),
12811287
&exe.join("rust-std"));
1282-
cp_r(&work.join(&format!("{}-{}", pkgname(build, "rls"), target))
1283-
.join("rls"),
1284-
&exe.join("rls"));
1288+
let rls_path = if build.config.channel == "nightly" {
1289+
work.join(&format!("{}-{}", pkgname(build, "rls"), target)).join("rls")
1290+
} else {
1291+
work.join(&format!("{}-{}", pkgname(build, "rls"), target)).join("rls-preview")
1292+
};
1293+
cp_r(&rls_path, &exe.join("rls"));
12851294
cp_r(&work.join(&format!("{}-{}", pkgname(build, "rust-analysis"), target))
12861295
.join(format!("rust-analysis-{}", target)),
12871296
&exe.join("rust-analysis"));

0 commit comments

Comments
 (0)