Skip to content

Commit 31e900b

Browse files
committed
Add metadata to dist::JsonDocs
1 parent c2e5c21 commit 31e900b

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

src/bootstrap/src/core/build_steps/dist.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ impl Step for Docs {
9696
}
9797
}
9898

99+
/// Builds the `rust-docs-json` installer component.
100+
/// It contains the documentation of the standard library in JSON format.
99101
#[derive(Debug, Clone, Hash, PartialEq, Eq)]
100102
pub struct JsonDocs {
101103
build_compiler: Compiler,
@@ -118,7 +120,6 @@ impl Step for JsonDocs {
118120
});
119121
}
120122

121-
/// Builds the `rust-docs-json` installer component.
122123
fn run(self, builder: &Builder<'_>) -> Option<GeneratedTarball> {
123124
let target = self.target;
124125
let directory = builder.ensure(crate::core::build_steps::doc::Std::from_build_compiler(
@@ -135,6 +136,10 @@ impl Step for JsonDocs {
135136
tarball.add_bulk_dir(directory, dest);
136137
Some(tarball.generate())
137138
}
139+
140+
fn metadata(&self) -> Option<StepMetadata> {
141+
Some(StepMetadata::dist("json-docs", self.target).built_by(self.build_compiler))
142+
}
138143
}
139144

140145
/// Builds the `rustc-docs` installer component.

src/bootstrap/src/core/builder/tests.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1142,6 +1142,7 @@ mod snapshot {
11421142
[build] rustc 0 <host> -> RustInstaller 1 <host>
11431143
[dist] docs <host>
11441144
[doc] rustc 2 <host> -> std 2 <host> crates=[]
1145+
[dist] rustc 2 <host> -> json-docs 3 <host>
11451146
[dist] mingw <host>
11461147
[build] rustc 0 <host> -> GenerateCopyright 1 <host>
11471148
[dist] rustc <host>
@@ -1205,6 +1206,7 @@ mod snapshot {
12051206
[build] rustc 0 <host> -> RustInstaller 1 <host>
12061207
[dist] docs <host>
12071208
[doc] rustc 2 <host> -> std 2 <host> crates=[]
1209+
[dist] rustc 2 <host> -> json-docs 3 <host>
12081210
[dist] mingw <host>
12091211
[build] rustc 1 <host> -> rust-analyzer-proc-macro-srv 2 <host>
12101212
[build] rustc 0 <host> -> GenerateCopyright 1 <host>
@@ -1291,7 +1293,9 @@ mod snapshot {
12911293
[dist] docs <host>
12921294
[dist] docs <target1>
12931295
[doc] rustc 2 <host> -> std 2 <host> crates=[]
1296+
[dist] rustc 2 <host> -> json-docs 3 <host>
12941297
[doc] rustc 2 <host> -> std 2 <target1> crates=[]
1298+
[dist] rustc 2 <host> -> json-docs 3 <target1>
12951299
[dist] mingw <host>
12961300
[dist] mingw <target1>
12971301
[build] rustc 0 <host> -> GenerateCopyright 1 <host>
@@ -1353,6 +1357,7 @@ mod snapshot {
13531357
[build] rustc 0 <host> -> RustInstaller 1 <host>
13541358
[dist] docs <host>
13551359
[doc] rustc 2 <host> -> std 2 <host> crates=[]
1360+
[dist] rustc 2 <host> -> json-docs 3 <host>
13561361
[dist] mingw <host>
13571362
[build] rustc 0 <host> -> GenerateCopyright 1 <host>
13581363
[dist] rustc <host>
@@ -1433,7 +1438,9 @@ mod snapshot {
14331438
[dist] docs <host>
14341439
[dist] docs <target1>
14351440
[doc] rustc 2 <host> -> std 2 <host> crates=[]
1441+
[dist] rustc 2 <host> -> json-docs 3 <host>
14361442
[doc] rustc 2 <host> -> std 2 <target1> crates=[]
1443+
[dist] rustc 2 <host> -> json-docs 3 <target1>
14371444
[dist] mingw <host>
14381445
[dist] mingw <target1>
14391446
[build] rustc 0 <host> -> GenerateCopyright 1 <host>
@@ -1489,6 +1496,7 @@ mod snapshot {
14891496
[build] rustc 0 <host> -> RustInstaller 1 <host>
14901497
[dist] docs <target1>
14911498
[doc] rustc 2 <host> -> std 2 <target1> crates=[]
1499+
[dist] rustc 2 <host> -> json-docs 3 <target1>
14921500
[dist] mingw <target1>
14931501
[build] rustc 2 <host> -> std 2 <target1>
14941502
[dist] rustc 2 <host> -> std 2 <target1>
@@ -1543,6 +1551,7 @@ mod snapshot {
15431551
[build] rustc 0 <host> -> RustInstaller 1 <host>
15441552
[dist] docs <target1>
15451553
[doc] rustc 2 <host> -> std 2 <target1> crates=[]
1554+
[dist] rustc 2 <host> -> json-docs 3 <target1>
15461555
[dist] mingw <target1>
15471556
[build] rustdoc 2 <target1>
15481557
[build] rustc 1 <host> -> rust-analyzer-proc-macro-srv 2 <target1>
@@ -1567,6 +1576,7 @@ mod snapshot {
15671576
[dist] rustc 1 <host> -> miri 2 <target1>
15681577
[build] rustc 1 <host> -> LlvmBitcodeLinker 2 <target1>
15691578
[doc] rustc 2 <target1> -> std 2 <target1> crates=[]
1579+
[dist] rustc 2 <target1> -> json-docs 3 <target1>
15701580
[dist] rustc 1 <host> -> extended 2 <target1>
15711581
[dist] reproducible-artifacts <target1>
15721582
");
@@ -1684,6 +1694,7 @@ mod snapshot {
16841694
[build] rustc 0 <host> -> RustInstaller 1 <host>
16851695
[dist] docs <host>
16861696
[doc] rustc 2 <host> -> std 2 <host> crates=[]
1697+
[dist] rustc 2 <host> -> json-docs 3 <host>
16871698
[dist] mingw <host>
16881699
[build] rustc 0 <host> -> GenerateCopyright 1 <host>
16891700
[dist] rustc <host>

0 commit comments

Comments
 (0)