Commit cbd1b0b
committed
Give dynamically generated instructions on how to replicate errors during the build progress
Example output:
```
Checking stage0 rustdoc artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
Checking rustdoc v0.0.0 (/home/joshua/rustc/src/librustdoc)
error: expected item, found `/`
--> src/librustdoc/lib.rs:1:1
|
1 | /
| ^ expected item
error: aborting due to previous error
error: could not compile `rustdoc`
To learn more, run the command again with --verbose.
command did not execute successfully: "/home/joshua/rustc/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "check" "--target" "x86_64-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "8" "--release" "--manifest-path" "/home/joshua/rustc/src/tools/rustdoc/Cargo.toml" "--message-format" "json-render-diagnostics"
expected success, got: exit status: 101
note: failed while building bootstrap::check::Rustdoc
help: to replicate this failure, run `./x.py check src/librustdoc`
failed to run: /home/joshua/rustc/build/bootstrap/debug/bootstrap check src/librustdoc
Build completed unsuccessfully in 0:00:01
```
Happy to take suggestions on how to improve the error message :) right
now it's getting lost in all the other output. Maybe it makes sense to
use bold and colors?
This works by storing the current step at all times in a global Mutex
and registering an `at_exit` handler which looks up the current step.1 parent 34b9932 commit cbd1b0b
3 files changed
+68
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| 16 | + | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
| |||
60 | 62 | | |
61 | 63 | | |
62 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
63 | 69 | | |
64 | 70 | | |
65 | 71 | | |
| |||
333 | 339 | | |
334 | 340 | | |
335 | 341 | | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
336 | 362 | | |
337 | 363 | | |
338 | 364 | | |
| |||
1533 | 1559 | | |
1534 | 1560 | | |
1535 | 1561 | | |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
| 1566 | + | |
| 1567 | + | |
| 1568 | + | |
| 1569 | + | |
| 1570 | + | |
| 1571 | + | |
| 1572 | + | |
| 1573 | + | |
| 1574 | + | |
1536 | 1575 | | |
1537 | 1576 | | |
1538 | 1577 | | |
1539 | 1578 | | |
1540 | 1579 | | |
1541 | 1580 | | |
| 1581 | + | |
| 1582 | + | |
| 1583 | + | |
1542 | 1584 | | |
1543 | 1585 | | |
1544 | 1586 | | |
| |||
1557 | 1599 | | |
1558 | 1600 | | |
1559 | 1601 | | |
| 1602 | + | |
| 1603 | + | |
| 1604 | + | |
| 1605 | + | |
| 1606 | + | |
| 1607 | + | |
| 1608 | + | |
| 1609 | + | |
| 1610 | + | |
| 1611 | + | |
| 1612 | + | |
| 1613 | + | |
| 1614 | + | |
| 1615 | + | |
| 1616 | + | |
| 1617 | + | |
| 1618 | + | |
| 1619 | + | |
| 1620 | + | |
| 1621 | + | |
| 1622 | + | |
| 1623 | + | |
1560 | 1624 | | |
1561 | 1625 | | |
1562 | 1626 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
50 | 52 | | |
51 | 53 | | |
52 | 54 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
| 157 | + | |
157 | 158 | | |
158 | 159 | | |
159 | 160 | | |
| |||
0 commit comments