@@ -158,6 +158,8 @@ static DOCS_TARGETS: &[&str] = &[
158
158
159
159
static MINGW : & [ & str ] = & [ "i686-pc-windows-gnu" , "x86_64-pc-windows-gnu" ] ;
160
160
161
+ static NIGHTLY_ONLY_COMPONENTS : & [ & str ] = & [ "miri-preview" , "rust-analyzer-preview" ] ;
162
+
161
163
#[ derive( Serialize ) ]
162
164
#[ serde( rename_all = "kebab-case" ) ]
163
165
struct Manifest {
@@ -222,6 +224,7 @@ struct Builder {
222
224
rust_release : String ,
223
225
cargo_release : String ,
224
226
rls_release : String ,
227
+ rust_analyzer_release : String ,
225
228
clippy_release : String ,
226
229
rustfmt_release : String ,
227
230
llvm_tools_release : String ,
@@ -237,6 +240,7 @@ struct Builder {
237
240
rust_version : Option < String > ,
238
241
cargo_version : Option < String > ,
239
242
rls_version : Option < String > ,
243
+ rust_analyzer_version : Option < String > ,
240
244
clippy_version : Option < String > ,
241
245
rustfmt_version : Option < String > ,
242
246
llvm_tools_version : Option < String > ,
@@ -245,6 +249,7 @@ struct Builder {
245
249
rust_git_commit_hash : Option < String > ,
246
250
cargo_git_commit_hash : Option < String > ,
247
251
rls_git_commit_hash : Option < String > ,
252
+ rust_analyzer_git_commit_hash : Option < String > ,
248
253
clippy_git_commit_hash : Option < String > ,
249
254
rustfmt_git_commit_hash : Option < String > ,
250
255
llvm_tools_git_commit_hash : Option < String > ,
@@ -274,6 +279,7 @@ fn main() {
274
279
let s3_address = args. next ( ) . unwrap ( ) ;
275
280
let cargo_release = args. next ( ) . unwrap ( ) ;
276
281
let rls_release = args. next ( ) . unwrap ( ) ;
282
+ let rust_analyzer_release = args. next ( ) . unwrap ( ) ;
277
283
let clippy_release = args. next ( ) . unwrap ( ) ;
278
284
let miri_release = args. next ( ) . unwrap ( ) ;
279
285
let rustfmt_release = args. next ( ) . unwrap ( ) ;
@@ -290,6 +296,7 @@ fn main() {
290
296
rust_release,
291
297
cargo_release,
292
298
rls_release,
299
+ rust_analyzer_release,
293
300
clippy_release,
294
301
rustfmt_release,
295
302
llvm_tools_release,
@@ -305,6 +312,7 @@ fn main() {
305
312
rust_version : None ,
306
313
cargo_version : None ,
307
314
rls_version : None ,
315
+ rust_analyzer_version : None ,
308
316
clippy_version : None ,
309
317
rustfmt_version : None ,
310
318
llvm_tools_version : None ,
@@ -313,6 +321,7 @@ fn main() {
313
321
rust_git_commit_hash : None ,
314
322
cargo_git_commit_hash : None ,
315
323
rls_git_commit_hash : None ,
324
+ rust_analyzer_git_commit_hash : None ,
316
325
clippy_git_commit_hash : None ,
317
326
rustfmt_git_commit_hash : None ,
318
327
llvm_tools_git_commit_hash : None ,
@@ -327,6 +336,7 @@ enum PkgType {
327
336
RustSrc ,
328
337
Cargo ,
329
338
Rls ,
339
+ RustAnalyzer ,
330
340
Clippy ,
331
341
Rustfmt ,
332
342
LlvmTools ,
@@ -341,6 +351,7 @@ impl PkgType {
341
351
"rust-src" => RustSrc ,
342
352
"cargo" => Cargo ,
343
353
"rls" | "rls-preview" => Rls ,
354
+ "rust-analyzer" | "rust-analyzer-preview" => RustAnalyzer ,
344
355
"clippy" | "clippy-preview" => Clippy ,
345
356
"rustfmt" | "rustfmt-preview" => Rustfmt ,
346
357
"llvm-tools" | "llvm-tools-preview" => LlvmTools ,
@@ -355,6 +366,7 @@ impl Builder {
355
366
self . rust_version = self . version ( "rust" , "x86_64-unknown-linux-gnu" ) ;
356
367
self . cargo_version = self . version ( "cargo" , "x86_64-unknown-linux-gnu" ) ;
357
368
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" ) ;
358
370
self . clippy_version = self . version ( "clippy" , "x86_64-unknown-linux-gnu" ) ;
359
371
self . rustfmt_version = self . version ( "rustfmt" , "x86_64-unknown-linux-gnu" ) ;
360
372
self . llvm_tools_version = self . version ( "llvm-tools" , "x86_64-unknown-linux-gnu" ) ;
@@ -363,6 +375,8 @@ impl Builder {
363
375
self . rust_git_commit_hash = self . git_commit_hash ( "rust" , "x86_64-unknown-linux-gnu" ) ;
364
376
self . cargo_git_commit_hash = self . git_commit_hash ( "cargo" , "x86_64-unknown-linux-gnu" ) ;
365
377
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" ) ;
366
380
self . clippy_git_commit_hash = self . git_commit_hash ( "clippy" , "x86_64-unknown-linux-gnu" ) ;
367
381
self . rustfmt_git_commit_hash = self . git_commit_hash ( "rustfmt" , "x86_64-unknown-linux-gnu" ) ;
368
382
self . llvm_tools_git_commit_hash =
@@ -436,6 +450,7 @@ impl Builder {
436
450
package ( "rust-docs" , DOCS_TARGETS ) ;
437
451
package ( "rust-src" , & [ "*" ] ) ;
438
452
package ( "rls-preview" , HOSTS ) ;
453
+ package ( "rust-analyzer-preview" , HOSTS ) ;
439
454
package ( "clippy-preview" , HOSTS ) ;
440
455
package ( "miri-preview" , HOSTS ) ;
441
456
package ( "rustfmt-preview" , HOSTS ) ;
@@ -469,6 +484,7 @@ impl Builder {
469
484
"rustfmt-preview" ,
470
485
"clippy-preview" ,
471
486
"rls-preview" ,
487
+ "rust-analyzer-preview" ,
472
488
"rust-src" ,
473
489
"llvm-tools-preview" ,
474
490
"rust-analysis" ,
@@ -543,6 +559,7 @@ impl Builder {
543
559
host_component( "clippy-preview" ) ,
544
560
host_component( "miri-preview" ) ,
545
561
host_component( "rls-preview" ) ,
562
+ host_component( "rust-analyzer-preview" ) ,
546
563
host_component( "rustfmt-preview" ) ,
547
564
host_component( "llvm-tools-preview" ) ,
548
565
host_component( "rust-analysis" ) ,
@@ -612,8 +629,8 @@ impl Builder {
612
629
. map ( |version| ( version, true ) )
613
630
. unwrap_or_default ( ) ; // `is_present` defaults to `false` here.
614
631
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 ) {
617
634
is_present = false ; // Pretend the component is entirely missing.
618
635
}
619
636
@@ -671,6 +688,9 @@ impl Builder {
671
688
RustSrc => format ! ( "rust-src-{}.tar.gz" , self . rust_release) ,
672
689
Cargo => format ! ( "cargo-{}-{}.tar.gz" , self . cargo_release, target) ,
673
690
Rls => format ! ( "rls-{}-{}.tar.gz" , self . rls_release, target) ,
691
+ RustAnalyzer => {
692
+ format ! ( "rust-analyzer-{}-{}.tar.gz" , self . rust_analyzer_release, target)
693
+ }
674
694
Clippy => format ! ( "clippy-{}-{}.tar.gz" , self . clippy_release, target) ,
675
695
Rustfmt => format ! ( "rustfmt-{}-{}.tar.gz" , self . rustfmt_release, target) ,
676
696
LlvmTools => format ! ( "llvm-tools-{}-{}.tar.gz" , self . llvm_tools_release, target) ,
@@ -684,6 +704,7 @@ impl Builder {
684
704
match PkgType :: from_component ( component) {
685
705
Cargo => & self . cargo_version ,
686
706
Rls => & self . rls_version ,
707
+ RustAnalyzer => & self . rust_analyzer_version ,
687
708
Clippy => & self . clippy_version ,
688
709
Rustfmt => & self . rustfmt_version ,
689
710
LlvmTools => & self . llvm_tools_version ,
@@ -697,6 +718,7 @@ impl Builder {
697
718
match PkgType :: from_component ( component) {
698
719
Cargo => & self . cargo_git_commit_hash ,
699
720
Rls => & self . rls_git_commit_hash ,
721
+ RustAnalyzer => & self . rust_analyzer_git_commit_hash ,
700
722
Clippy => & self . clippy_git_commit_hash ,
701
723
Rustfmt => & self . rustfmt_git_commit_hash ,
702
724
LlvmTools => & self . llvm_tools_git_commit_hash ,
0 commit comments