Commit 65833ed
authored
Rollup merge of #111955 - jyn514:step-refactors, r=clubby789
bootstrap: Various Step refactors
This ended up being a bunch of only somewhat related changes, sorry 😓 on the bright side, they're all fairly small and well-commented in the commit messages.
- Document `ShouldRun::crates`
- Switch Steps from crates to crate_or_deps where possible
and document why the single remaining place can't switch
- Switch doc::{Std, Rustc} to `crate_or_deps`
Previously they were using `all_krates` and various hacks to determine
which crates to document. Switch them to `crate_or_deps` so `ShouldRun`
tells them which crate to document instead of having to guess.
This also makes a few other refactors:
- Remove the now unused `all_krates`; new code should only use
`crate_or_deps`.
- Add tests for documenting Std
- Remove the unnecessary `run_cargo_rustdoc_for` closure so that we only
run cargo once
- Give a more helpful error message when documenting a no_std target
- Use `builder.msg` in the Steps instead of `builder.info`
- Extend `msg` and `description` to work with any subcommand
Previously `description` only supported `Testing` and `Benchmarking`,
and `msg` gave weird results for `doc` (it would say `Docing`).
- Add a `make_run_crates` function and use it Rustc and Std
This fixes the panic from the previous commit.
- Allow checking individual crates
This is useful for profiling metadata generation.
This comes very close to removing all_krates, but doesn't quite -
there's one last usage left in `doc`. This is fixed in a later commit.
- Give a more helpful error when calling `cargo_crates_in_set` for an alias
Before:
```
thread 'main' panicked at 'no entry found for key', builder.rs:110:30
```
After:
```
thread 'main' panicked at 'missing crate for path library', check.rs:89:26
```File tree
8 files changed
+225
-167
lines changed- src/bootstrap
- builder
8 files changed
+225
-167
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| 106 | + | |
106 | 107 | | |
107 | 108 | | |
108 | 109 | | |
109 | 110 | | |
110 | | - | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
111 | 114 | | |
112 | 115 | | |
113 | 116 | | |
| |||
427 | 430 | | |
428 | 431 | | |
429 | 432 | | |
430 | | - | |
431 | | - | |
432 | | - | |
433 | | - | |
434 | | - | |
435 | | - | |
436 | | - | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | | - | |
441 | | - | |
442 | | - | |
443 | | - | |
444 | | - | |
445 | | - | |
446 | | - | |
447 | | - | |
448 | | - | |
449 | 433 | | |
450 | 434 | | |
451 | 435 | | |
| |||
458 | 442 | | |
459 | 443 | | |
460 | 444 | | |
| 445 | + | |
| 446 | + | |
461 | 447 | | |
462 | 448 | | |
463 | 449 | | |
| |||
487 | 473 | | |
488 | 474 | | |
489 | 475 | | |
490 | | - | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
491 | 485 | | |
492 | 486 | | |
493 | 487 | | |
| |||
641 | 635 | | |
642 | 636 | | |
643 | 637 | | |
644 | | - | |
| 638 | + | |
645 | 639 | | |
646 | 640 | | |
647 | 641 | | |
648 | | - | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
649 | 646 | | |
| 647 | + | |
650 | 648 | | |
651 | 649 | | |
652 | 650 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
69 | 80 | | |
70 | 81 | | |
71 | 82 | | |
| |||
144 | 155 | | |
145 | 156 | | |
146 | 157 | | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
147 | 161 | | |
148 | 162 | | |
149 | 163 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
| |||
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
15 | 23 | | |
16 | 24 | | |
17 | 25 | | |
| |||
66 | 74 | | |
67 | 75 | | |
68 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
69 | 83 | | |
70 | 84 | | |
71 | 85 | | |
72 | 86 | | |
73 | 87 | | |
74 | | - | |
| 88 | + | |
75 | 89 | | |
76 | 90 | | |
77 | 91 | | |
78 | | - | |
| 92 | + | |
| 93 | + | |
79 | 94 | | |
80 | 95 | | |
81 | 96 | | |
| |||
97 | 112 | | |
98 | 113 | | |
99 | 114 | | |
100 | | - | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
101 | 123 | | |
102 | 124 | | |
103 | 125 | | |
| |||
117 | 139 | | |
118 | 140 | | |
119 | 141 | | |
120 | | - | |
| 142 | + | |
| 143 | + | |
121 | 144 | | |
122 | 145 | | |
123 | 146 | | |
| |||
147 | 170 | | |
148 | 171 | | |
149 | 172 | | |
150 | | - | |
151 | | - | |
| 173 | + | |
| 174 | + | |
152 | 175 | | |
153 | 176 | | |
154 | 177 | | |
| |||
167 | 190 | | |
168 | 191 | | |
169 | 192 | | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
170 | 209 | | |
171 | 210 | | |
172 | 211 | | |
| |||
175 | 214 | | |
176 | 215 | | |
177 | 216 | | |
178 | | - | |
| 217 | + | |
179 | 218 | | |
180 | 219 | | |
181 | 220 | | |
182 | | - | |
| 221 | + | |
| 222 | + | |
183 | 223 | | |
184 | 224 | | |
185 | 225 | | |
| |||
200 | 240 | | |
201 | 241 | | |
202 | 242 | | |
203 | | - | |
| 243 | + | |
204 | 244 | | |
205 | 245 | | |
206 | 246 | | |
| |||
218 | 258 | | |
219 | 259 | | |
220 | 260 | | |
221 | | - | |
| 261 | + | |
222 | 262 | | |
223 | 263 | | |
224 | | - | |
225 | | - | |
| 264 | + | |
| 265 | + | |
226 | 266 | | |
227 | 267 | | |
228 | | - | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
229 | 272 | | |
230 | 273 | | |
231 | 274 | | |
| |||
268 | 311 | | |
269 | 312 | | |
270 | 313 | | |
271 | | - | |
| 314 | + | |
272 | 315 | | |
273 | 316 | | |
274 | 317 | | |
| |||
318 | 361 | | |
319 | 362 | | |
320 | 363 | | |
321 | | - | |
| 364 | + | |
322 | 365 | | |
323 | 366 | | |
324 | 367 | | |
| |||
386 | 429 | | |
387 | 430 | | |
388 | 431 | | |
389 | | - | |
| 432 | + | |
390 | 433 | | |
391 | 434 | | |
392 | 435 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
51 | 62 | | |
52 | 63 | | |
53 | 64 | | |
| |||
62 | 73 | | |
63 | 74 | | |
64 | 75 | | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | 76 | | |
72 | 77 | | |
73 | 78 | | |
74 | | - | |
| 79 | + | |
75 | 80 | | |
76 | 81 | | |
77 | 82 | | |
| |||
615 | 620 | | |
616 | 621 | | |
617 | 622 | | |
| 623 | + | |
| 624 | + | |
618 | 625 | | |
619 | 626 | | |
620 | 627 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
| 109 | + | |
114 | 110 | | |
115 | 111 | | |
116 | 112 | | |
| |||
0 commit comments