Skip to content

Commit 3ee3778

Browse files
committed
Add metadata to dist::JsonDocs
1 parent 61f64eb commit 3ee3778

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
@@ -1130,6 +1130,7 @@ mod snapshot {
11301130
[build] rustc 0 <host> -> RustInstaller 1 <host>
11311131
[dist] docs <host>
11321132
[doc] rustc 2 <host> -> std 2 <host> crates=[]
1133+
[dist] rustc 2 <host> -> json-docs 3 <host>
11331134
[dist] mingw <host>
11341135
[build] rustc 0 <host> -> GenerateCopyright 1 <host>
11351136
[dist] rustc <host>
@@ -1193,6 +1194,7 @@ mod snapshot {
11931194
[build] rustc 0 <host> -> RustInstaller 1 <host>
11941195
[dist] docs <host>
11951196
[doc] rustc 2 <host> -> std 2 <host> crates=[]
1197+
[dist] rustc 2 <host> -> json-docs 3 <host>
11961198
[dist] mingw <host>
11971199
[build] rustc 1 <host> -> rust-analyzer-proc-macro-srv 2 <host>
11981200
[build] rustc 0 <host> -> GenerateCopyright 1 <host>
@@ -1279,7 +1281,9 @@ mod snapshot {
12791281
[dist] docs <host>
12801282
[dist] docs <target1>
12811283
[doc] rustc 2 <host> -> std 2 <host> crates=[]
1284+
[dist] rustc 2 <host> -> json-docs 3 <host>
12821285
[doc] rustc 2 <host> -> std 2 <target1> crates=[]
1286+
[dist] rustc 2 <host> -> json-docs 3 <target1>
12831287
[dist] mingw <host>
12841288
[dist] mingw <target1>
12851289
[build] rustc 0 <host> -> GenerateCopyright 1 <host>
@@ -1341,6 +1345,7 @@ mod snapshot {
13411345
[build] rustc 0 <host> -> RustInstaller 1 <host>
13421346
[dist] docs <host>
13431347
[doc] rustc 2 <host> -> std 2 <host> crates=[]
1348+
[dist] rustc 2 <host> -> json-docs 3 <host>
13441349
[dist] mingw <host>
13451350
[build] rustc 0 <host> -> GenerateCopyright 1 <host>
13461351
[dist] rustc <host>
@@ -1421,7 +1426,9 @@ mod snapshot {
14211426
[dist] docs <host>
14221427
[dist] docs <target1>
14231428
[doc] rustc 2 <host> -> std 2 <host> crates=[]
1429+
[dist] rustc 2 <host> -> json-docs 3 <host>
14241430
[doc] rustc 2 <host> -> std 2 <target1> crates=[]
1431+
[dist] rustc 2 <host> -> json-docs 3 <target1>
14251432
[dist] mingw <host>
14261433
[dist] mingw <target1>
14271434
[build] rustc 0 <host> -> GenerateCopyright 1 <host>
@@ -1477,6 +1484,7 @@ mod snapshot {
14771484
[build] rustc 0 <host> -> RustInstaller 1 <host>
14781485
[dist] docs <target1>
14791486
[doc] rustc 2 <host> -> std 2 <target1> crates=[]
1487+
[dist] rustc 2 <host> -> json-docs 3 <target1>
14801488
[dist] mingw <target1>
14811489
[build] rustc 2 <host> -> std 2 <target1>
14821490
[dist] rustc 2 <host> -> std 2 <target1>
@@ -1531,6 +1539,7 @@ mod snapshot {
15311539
[build] rustc 0 <host> -> RustInstaller 1 <host>
15321540
[dist] docs <target1>
15331541
[doc] rustc 2 <host> -> std 2 <target1> crates=[]
1542+
[dist] rustc 2 <host> -> json-docs 3 <target1>
15341543
[dist] mingw <target1>
15351544
[build] rustdoc 2 <target1>
15361545
[build] rustc 1 <host> -> rust-analyzer-proc-macro-srv 2 <target1>
@@ -1555,6 +1564,7 @@ mod snapshot {
15551564
[dist] rustc 1 <host> -> miri 2 <target1>
15561565
[build] rustc 1 <host> -> LlvmBitcodeLinker 2 <target1>
15571566
[doc] rustc 2 <target1> -> std 2 <target1> crates=[]
1567+
[dist] rustc 2 <target1> -> json-docs 3 <target1>
15581568
[dist] rustc 1 <host> -> extended 2 <target1>
15591569
[dist] reproducible-artifacts <target1>
15601570
");
@@ -1672,6 +1682,7 @@ mod snapshot {
16721682
[build] rustc 0 <host> -> RustInstaller 1 <host>
16731683
[dist] docs <host>
16741684
[doc] rustc 2 <host> -> std 2 <host> crates=[]
1685+
[dist] rustc 2 <host> -> json-docs 3 <host>
16751686
[dist] mingw <host>
16761687
[build] rustc 0 <host> -> GenerateCopyright 1 <host>
16771688
[dist] rustc <host>

0 commit comments

Comments
 (0)