@@ -158,6 +158,8 @@ static DOCS_TARGETS: &[&str] = &[
158158
159159static MINGW : & [ & str ] = & [ "i686-pc-windows-gnu" , "x86_64-pc-windows-gnu" ] ;
160160
161+ static NIGHTLY_ONLY_COMPONENTS : & [ & str ] = & [ "miri-preview" , "rust-analyzer-preview" ] ;
162+
161163#[ derive( Serialize ) ]
162164#[ serde( rename_all = "kebab-case" ) ]
163165struct Manifest {
@@ -222,6 +224,7 @@ struct Builder {
222224 rust_release : String ,
223225 cargo_release : String ,
224226 rls_release : String ,
227+ rust_analyzer_release : String ,
225228 clippy_release : String ,
226229 rustfmt_release : String ,
227230 llvm_tools_release : String ,
@@ -237,6 +240,7 @@ struct Builder {
237240 rust_version : Option < String > ,
238241 cargo_version : Option < String > ,
239242 rls_version : Option < String > ,
243+ rust_analyzer_version : Option < String > ,
240244 clippy_version : Option < String > ,
241245 rustfmt_version : Option < String > ,
242246 llvm_tools_version : Option < String > ,
@@ -245,6 +249,7 @@ struct Builder {
245249 rust_git_commit_hash : Option < String > ,
246250 cargo_git_commit_hash : Option < String > ,
247251 rls_git_commit_hash : Option < String > ,
252+ rust_analyzer_git_commit_hash : Option < String > ,
248253 clippy_git_commit_hash : Option < String > ,
249254 rustfmt_git_commit_hash : Option < String > ,
250255 llvm_tools_git_commit_hash : Option < String > ,
@@ -274,6 +279,7 @@ fn main() {
274279 let s3_address = args. next ( ) . unwrap ( ) ;
275280 let cargo_release = args. next ( ) . unwrap ( ) ;
276281 let rls_release = args. next ( ) . unwrap ( ) ;
282+ let rust_analyzer_release = args. next ( ) . unwrap ( ) ;
277283 let clippy_release = args. next ( ) . unwrap ( ) ;
278284 let miri_release = args. next ( ) . unwrap ( ) ;
279285 let rustfmt_release = args. next ( ) . unwrap ( ) ;
@@ -290,6 +296,7 @@ fn main() {
290296 rust_release,
291297 cargo_release,
292298 rls_release,
299+ rust_analyzer_release,
293300 clippy_release,
294301 rustfmt_release,
295302 llvm_tools_release,
@@ -305,6 +312,7 @@ fn main() {
305312 rust_version : None ,
306313 cargo_version : None ,
307314 rls_version : None ,
315+ rust_analyzer_version : None ,
308316 clippy_version : None ,
309317 rustfmt_version : None ,
310318 llvm_tools_version : None ,
@@ -313,6 +321,7 @@ fn main() {
313321 rust_git_commit_hash : None ,
314322 cargo_git_commit_hash : None ,
315323 rls_git_commit_hash : None ,
324+ rust_analyzer_git_commit_hash : None ,
316325 clippy_git_commit_hash : None ,
317326 rustfmt_git_commit_hash : None ,
318327 llvm_tools_git_commit_hash : None ,
@@ -327,6 +336,7 @@ enum PkgType {
327336 RustSrc ,
328337 Cargo ,
329338 Rls ,
339+ RustAnalyzer ,
330340 Clippy ,
331341 Rustfmt ,
332342 LlvmTools ,
@@ -341,6 +351,7 @@ impl PkgType {
341351 "rust-src" => RustSrc ,
342352 "cargo" => Cargo ,
343353 "rls" | "rls-preview" => Rls ,
354+ "rust-analyzer" | "rust-analyzer-preview" => RustAnalyzer ,
344355 "clippy" | "clippy-preview" => Clippy ,
345356 "rustfmt" | "rustfmt-preview" => Rustfmt ,
346357 "llvm-tools" | "llvm-tools-preview" => LlvmTools ,
@@ -355,6 +366,7 @@ impl Builder {
355366 self . rust_version = self . version ( "rust" , "x86_64-unknown-linux-gnu" ) ;
356367 self . cargo_version = self . version ( "cargo" , "x86_64-unknown-linux-gnu" ) ;
357368 self . rls_version = self . version ( "rls" , "x86_64-unknown-linux-gnu" ) ;
369+ self . rust_analyzer_version = self . version ( "rust-analyzer" , "x86_64-unknown-linux-gnu" ) ;
358370 self . clippy_version = self . version ( "clippy" , "x86_64-unknown-linux-gnu" ) ;
359371 self . rustfmt_version = self . version ( "rustfmt" , "x86_64-unknown-linux-gnu" ) ;
360372 self . llvm_tools_version = self . version ( "llvm-tools" , "x86_64-unknown-linux-gnu" ) ;
@@ -363,6 +375,8 @@ impl Builder {
363375 self . rust_git_commit_hash = self . git_commit_hash ( "rust" , "x86_64-unknown-linux-gnu" ) ;
364376 self . cargo_git_commit_hash = self . git_commit_hash ( "cargo" , "x86_64-unknown-linux-gnu" ) ;
365377 self . rls_git_commit_hash = self . git_commit_hash ( "rls" , "x86_64-unknown-linux-gnu" ) ;
378+ self . rust_analyzer_git_commit_hash =
379+ self . git_commit_hash ( "rust-analyzer" , "x86_64-unknown-linux-gnu" ) ;
366380 self . clippy_git_commit_hash = self . git_commit_hash ( "clippy" , "x86_64-unknown-linux-gnu" ) ;
367381 self . rustfmt_git_commit_hash = self . git_commit_hash ( "rustfmt" , "x86_64-unknown-linux-gnu" ) ;
368382 self . llvm_tools_git_commit_hash =
@@ -436,6 +450,7 @@ impl Builder {
436450 package ( "rust-docs" , DOCS_TARGETS ) ;
437451 package ( "rust-src" , & [ "*" ] ) ;
438452 package ( "rls-preview" , HOSTS ) ;
453+ package ( "rust-analyzer-preview" , HOSTS ) ;
439454 package ( "clippy-preview" , HOSTS ) ;
440455 package ( "miri-preview" , HOSTS ) ;
441456 package ( "rustfmt-preview" , HOSTS ) ;
@@ -469,6 +484,7 @@ impl Builder {
469484 "rustfmt-preview" ,
470485 "clippy-preview" ,
471486 "rls-preview" ,
487+ "rust-analyzer-preview" ,
472488 "rust-src" ,
473489 "llvm-tools-preview" ,
474490 "rust-analysis" ,
@@ -543,6 +559,7 @@ impl Builder {
543559 host_component( "clippy-preview" ) ,
544560 host_component( "miri-preview" ) ,
545561 host_component( "rls-preview" ) ,
562+ host_component( "rust-analyzer-preview" ) ,
546563 host_component( "rustfmt-preview" ) ,
547564 host_component( "llvm-tools-preview" ) ,
548565 host_component( "rust-analysis" ) ,
@@ -612,8 +629,8 @@ impl Builder {
612629 . map ( |version| ( version, true ) )
613630 . unwrap_or_default ( ) ; // `is_present` defaults to `false` here.
614631
615- // Miri is nightly-only; never ship it for other trains.
616- if pkgname == "miri-preview" && self . rust_release != "nightly" {
632+ // Never ship nightly-only components for other trains.
633+ if self . rust_release != "nightly" && NIGHTLY_ONLY_COMPONENTS . contains ( & pkgname ) {
617634 is_present = false ; // Pretend the component is entirely missing.
618635 }
619636
@@ -671,6 +688,9 @@ impl Builder {
671688 RustSrc => format ! ( "rust-src-{}.tar.gz" , self . rust_release) ,
672689 Cargo => format ! ( "cargo-{}-{}.tar.gz" , self . cargo_release, target) ,
673690 Rls => format ! ( "rls-{}-{}.tar.gz" , self . rls_release, target) ,
691+ RustAnalyzer => {
692+ format ! ( "rust-analyzer-{}-{}.tar.gz" , self . rust_analyzer_release, target)
693+ }
674694 Clippy => format ! ( "clippy-{}-{}.tar.gz" , self . clippy_release, target) ,
675695 Rustfmt => format ! ( "rustfmt-{}-{}.tar.gz" , self . rustfmt_release, target) ,
676696 LlvmTools => format ! ( "llvm-tools-{}-{}.tar.gz" , self . llvm_tools_release, target) ,
@@ -684,6 +704,7 @@ impl Builder {
684704 match PkgType :: from_component ( component) {
685705 Cargo => & self . cargo_version ,
686706 Rls => & self . rls_version ,
707+ RustAnalyzer => & self . rust_analyzer_version ,
687708 Clippy => & self . clippy_version ,
688709 Rustfmt => & self . rustfmt_version ,
689710 LlvmTools => & self . llvm_tools_version ,
@@ -697,6 +718,7 @@ impl Builder {
697718 match PkgType :: from_component ( component) {
698719 Cargo => & self . cargo_git_commit_hash ,
699720 Rls => & self . rls_git_commit_hash ,
721+ RustAnalyzer => & self . rust_analyzer_git_commit_hash ,
700722 Clippy => & self . clippy_git_commit_hash ,
701723 Rustfmt => & self . rustfmt_git_commit_hash ,
702724 LlvmTools => & self . llvm_tools_git_commit_hash ,
0 commit comments