Skip to content

Commit d51d084

Browse files
committed
explain how to add a tool
1 parent 56e3ad3 commit d51d084

File tree

1 file changed

+28
-5
lines changed

1 file changed

+28
-5
lines changed

toolstate.md

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ rules are for when which tools are (not) allowed to break.
4141

4242
## Updating the toolstate repository
4343

44-
Updating the [toolstate repository][toolstate] happens in two steps: when CI
44+
Updating the [toolstate repository] happens in two steps: when CI
4545
runs on the `auto` branch (where bors moves a PR to test if it is good for
4646
integration), the "tool" runners for the individual platforms (at the time of
4747
writing, Linux and Windows) each submit a JSON file to the repository recording
@@ -52,12 +52,35 @@ actually entirely passed CI and bors moves it to the `master` branch, the
5252
These scripts also automatically ping some people and create issues when tools
5353
break.
5454

55-
For further details, see the comments in the involved files:
56-
[`checktools.sh`](https://github.com/rust-lang/rust/blob/master/src/ci/docker/x86_64-gnu-tools/checktools.sh),
57-
[`publish_toolstate.py`](https://github.com/rust-lang/rust/blob/master/src/tools/publish_toolstate.py),
58-
as well as the other files mentioned there.
55+
For further details, see the comments in the involved files: [`checktools.sh`],
56+
[`publish_toolstate.py`] as well as the other files mentioned there.
5957

58+
## Adding a tool
59+
60+
To add a new tool to be tracked, the following steps must be taken:
61+
62+
1. Create a PR to rust-lang/rust that adds the submodule along with any
63+
necessary build system / bootstrap updates. Be careful that the tests
64+
properly support `--no-fail-fast`.
65+
2. Include changes to [`checktools.sh`]:
66+
- Build the tool at the top. This is the step that actually generates the
67+
JSON status for the tool. When `save-toolstates` is set in
68+
`config.toml`, the rust build system will write a JSON file with the
69+
status of each test.
70+
- Add the tool to `status_check` with whether it should be a beta blocker
71+
or not.
72+
3. Update [`publish_toolstate.py`] to add the tool. This includes a list of
73+
people to ping if the tool is broken, and its source repo. (Note: At the
74+
time of this writing, these users must have permissions to be assignable on
75+
rust-lang/rust GitHub.)
76+
4. Submit a PR to the [toolstate repository] to manually add the tool to the
77+
[`latest.json`] file.
78+
79+
[`checktools.sh`]: https://github.com/rust-lang/rust/blob/master/src/ci/docker/x86_64-gnu-tools/checktools.sh
80+
[`publish_toolstate.py`]: https://github.com/rust-lang/rust/blob/master/src/tools/publish_toolstate.py
81+
[`latest.json`]: https://github.com/rust-lang-nursery/rust-toolstate/blob/master/_data/latest.json
6082
[Book]: https://doc.rust-lang.org/book/
6183
[Reference]: https://doc.rust-lang.org/reference/
6284
[toolstate]: https://rust-lang-nursery.github.io/rust-toolstate/
85+
[toolstate repository]: https://github.com/rust-lang-nursery/rust-toolstate/
6386
[forge]: index.html

0 commit comments

Comments
 (0)