@@ -369,26 +369,29 @@ Currently building Rust will also build the following external projects:
369
369
370
370
* [ clippy] ( https://github.com/rust-lang-nursery/rust-clippy )
371
371
* [ miri] ( https://github.com/solson/miri )
372
+ * [ rustfmt] ( https://github.com/rust-lang-nursery/rustfmt )
373
+ * [ rls] ( https://github.com/rust-lang-nursery/rls/ )
372
374
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.
378
378
379
- Don't forget to also add your changes with
379
+ After the external is fixed, one could add the changes with
380
380
381
- ```
381
+ ``` sh
382
382
git add path/to/submodule
383
383
```
384
384
385
385
outside the submodule.
386
386
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
388
388
` ./x.py build src/tools/TOOL ` . If you will be editing the sources
389
389
there, you may wish to set ` submodules = false ` in the ` config.toml `
390
390
to prevent ` x.py ` from resetting to the original branch.
391
391
392
+ Breakage is not allowed in the beta and stable channels, and must be addressed
393
+ before the PR is merged.
394
+
392
395
#### Breaking Tools Built With The Compiler
393
396
[ breaking-tools-built-with-the-compiler ] : #breaking-tools-built-with-the-compiler
394
397
@@ -406,12 +409,12 @@ tests.
406
409
That means that, in the default state, you can't update the compiler without first
407
410
fixing rustfmt, rls and the other tools that the compiler builds.
408
411
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",
411
414
so that the rust-lang/rust build passes without trying to build them, then land the change
412
415
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 .
415
418
416
419
This should avoid a bunch of synchronization dances and is also much easier on contributors as
417
420
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:
430
433
4 . (optional) Maintainers of these submodules will ** not** merge the PR. The PR can't be
431
434
merged because CI will be broken. You'll want to write a message on the PR referencing
432
435
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.
442
440
443
441
#### Updating submodules
444
442
[ updating-submodules ] : #updating-submodules
0 commit comments