Skip to content

Commit 503153e

Browse files
committed
Auto merge of #46554 - kennytm:45861-step-4-5-6-7-upload-test-result-and-remove-toolstate-toml, r=alexcrichton
[auto-toolstate] Upload the toolstate result to an external git repository, and removes BuildExpectation This PR consists of 3 commits. 1. (Steps 4–6) The `toolstate.json` output previously collected is now pushed to the https://github.com/rust-lang-nursery/rust-toolstate repository. 2. (Step 7) Revert commit ab018c7, thus removing all traces of `BuildExpectation` and `toolstate.toml`. 3. (Step 8) Adjust CONTRIBUTION.md for the new procedure. These are the last steps of #45861. After this PR, the toolstate will be automatically computed and published to https://rust-lang-nursery.github.io/rust-toolstate/. There is no need to manage toolstate.toml again. Closes #45861.
2 parents 269827c + 44954ab commit 503153e

22 files changed

+429
-334
lines changed

.travis.yml

+13
Original file line numberDiff line numberDiff line change
@@ -179,13 +179,26 @@ matrix:
179179
- env: IMAGE=x86_64-gnu-incremental
180180
if: branch = auto
181181

182+
- stage: publish toolstate
183+
if: branch = master AND type = push
184+
before_install: []
185+
install: []
186+
cache: false
187+
sudo: false
188+
script:
189+
MESSAGE_FILE=$(mktemp -t msg.XXXXXX);
190+
. src/ci/docker/x86_64-gnu-tools/repo.sh;
191+
commit_toolstate_change "$MESSAGE_FILE" "$TRAVIS_BUILD_DIR/src/tools/publish_toolstate.py" "$(git rev-parse HEAD)" "$(git log --format=%s -n1 HEAD)" "$MESSAGE_FILE"
192+
182193
env:
183194
global:
184195
- SCCACHE_BUCKET=rust-lang-ci-sccache2
185196
- SCCACHE_REGION=us-west-1
186197
- AWS_ACCESS_KEY_ID=AKIAJAMV3QAMMA6AXHFQ
187198
# AWS_SECRET_ACCESS_KEY=...
188199
- secure: "j96XxTVOSUf4s4r4htIxn/fvIa5DWbMgLqWl7r8z2QfgUwscmkMXAwXuFNc7s7bGTpV/+CgDiMFFM6BAFLGKutytIF6oA02s9b+usQYnM0th7YQ2AIgm9GtMTJCJp4AoyfFmh8F2faUICBZlfVLUJ34udHEe35vOklix+0k4WDo="
200+
# TOOLSTATE_REPO_ACCESS_TOKEN=...
201+
- secure: "cFh8thThqEJLC98XKI5pfqflUzOlxsYPRW20AWRaYOOgYHPTiGWypTXiPbGSKaeAXTZoOA+DpQtEmefc0U6lt9dHc7a/MIaK6isFurjlnKYiLOeTruzyu1z7PWCeZ/jKXsU2RK/88DBtlNwfMdaMIeuKj14IVfpepPPL71ETbuk="
189202

190203
before_install:
191204
- zcat $HOME/docker/rust-ci.tar.gz | docker load || true

CONTRIBUTING.md

+19-21
Original file line numberDiff line numberDiff line change
@@ -369,26 +369,29 @@ Currently building Rust will also build the following external projects:
369369

370370
* [clippy](https://github.com/rust-lang-nursery/rust-clippy)
371371
* [miri](https://github.com/solson/miri)
372+
* [rustfmt](https://github.com/rust-lang-nursery/rustfmt)
373+
* [rls](https://github.com/rust-lang-nursery/rls/)
372374

373-
If your changes break one of these projects, you need to fix them by opening
374-
a pull request against the broken project asking to put the fix on a branch.
375-
Then you can disable the tool building via `src/tools/toolstate.toml`.
376-
Once the branch containing your fix is likely to be merged, you can point
377-
the affected submodule at this branch.
375+
We allow breakage of these tools in the nightly channel. Maintainers of these
376+
projects will be notified of the breakages and should fix them as soon as
377+
possible.
378378

379-
Don't forget to also add your changes with
379+
After the external is fixed, one could add the changes with
380380

381-
```
381+
```sh
382382
git add path/to/submodule
383383
```
384384

385385
outside the submodule.
386386

387-
In order to prepare your PR, you can run the build locally by doing
387+
In order to prepare your tool-fixing PR, you can run the build locally by doing
388388
`./x.py build src/tools/TOOL`. If you will be editing the sources
389389
there, you may wish to set `submodules = false` in the `config.toml`
390390
to prevent `x.py` from resetting to the original branch.
391391

392+
Breakage is not allowed in the beta and stable channels, and must be addressed
393+
before the PR is merged.
394+
392395
#### Breaking Tools Built With The Compiler
393396
[breaking-tools-built-with-the-compiler]: #breaking-tools-built-with-the-compiler
394397

@@ -406,12 +409,12 @@ tests.
406409
That means that, in the default state, you can't update the compiler without first
407410
fixing rustfmt, rls and the other tools that the compiler builds.
408411

409-
Luckily, a feature was [added to Rust's build](https://github.com/rust-lang/rust/pull/45243)
410-
to make all of this easy to handle. The idea is that you mark the tools as "broken",
412+
Luckily, a feature was [added to Rust's build](https://github.com/rust-lang/rust/issues/45861)
413+
to make all of this easy to handle. The idea is that we allow these tools to be "broken",
411414
so that the rust-lang/rust build passes without trying to build them, then land the change
412415
in the compiler, wait for a nightly, and go update the tools that you broke. Once you're done
413-
and the tools are working again, you go back in the compiler and change the tools back
414-
from "broken".
416+
and the tools are working again, you go back in the compiler and update the tools
417+
so they can be distributed again.
415418

416419
This should avoid a bunch of synchronization dances and is also much easier on contributors as
417420
there's no need to block on rls/rustfmt/other tools changes going upstream.
@@ -430,15 +433,10 @@ Here are those same steps in detail:
430433
4. (optional) Maintainers of these submodules will **not** merge the PR. The PR can't be
431434
merged because CI will be broken. You'll want to write a message on the PR referencing
432435
your change, and how the PR should be merged once your change makes it into a nightly.
433-
5. Update `src/tools/toolstate.toml` to indicate that the tool in question is "broken",
434-
that will disable building it on CI. See the documentation in that file for the exact
435-
configuration values you can use.
436-
6. Commit the changes to `src/tools/toolstate.toml`, **do not update submodules in your commit**,
437-
and then update the PR you have for rust-lang/rust.
438-
7. Wait for your PR to merge.
439-
8. Wait for a nightly
440-
9. (optional) Help land your PR on the upstream repository now that your changes are in nightly.
441-
10. (optional) Send a PR to rust-lang/rust updating the submodule, reverting `src/tools/toolstate.toml` back to a "building" or "testing" state.
436+
5. Wait for your PR to merge.
437+
6. Wait for a nightly
438+
7. (optional) Help land your PR on the upstream repository now that your changes are in nightly.
439+
8. (optional) Send a PR to rust-lang/rust updating the submodule.
442440

443441
#### Updating submodules
444442
[updating-submodules]: #updating-submodules

appveyor.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ environment:
55
AWS_SECRET_ACCESS_KEY:
66
secure: 7Y+JiquYedOAgnUU26uL0DPzrxmTtR+qIwG6rNKSuWDffqU3vVZxbGXim9QpTO80
77
SCCACHE_DIGEST: f808afabb4a4eb1d7112bcb3fa6be03b61e93412890c88e177c667eb37f46353d7ec294e559b16f9f4b5e894f2185fe7670a0df15fd064889ecbd80f0c34166c
8+
TOOLSTATE_REPO_ACCESS_TOKEN:
9+
secure: PTZiSxJMVUZ0VnMR5i13E4OagbXfglj7pcskDQiKufVrDm13mLoI0vDJAEM35+bY
810

911
# By default schannel checks revocation of certificates unlike some other SSL
1012
# backends, but we've historically had problems on CI where a revocation
@@ -27,8 +29,8 @@ environment:
2729

2830
# MSVC tools tests
2931
- MSYS_BITS: 64
30-
SCRIPT: src/ci/docker/x86_64-gnu-tools/checktools.sh x.py toolstates.json
31-
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --save-toolstates=toolstates.json
32+
SCRIPT: src/ci/docker/x86_64-gnu-tools/checktools.sh x.py /tmp/toolstates.json windows
33+
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --save-toolstates=/tmp/toolstates.json --enable-test-miri
3234

3335
# 32/64-bit MinGW builds.
3436
#

0 commit comments

Comments
 (0)