@@ -345,26 +345,29 @@ Currently building Rust will also build the following external projects:
345
345
346
346
* [ clippy] ( https://github.com/rust-lang-nursery/rust-clippy )
347
347
* [ miri] ( https://github.com/solson/miri )
348
+ * [ rustfmt] ( https://github.com/rust-lang-nursery/rustfmt )
349
+ * [ rls] ( https://github.com/rust-lang-nursery/rls/ )
348
350
349
- If your changes break one of these projects, you need to fix them by opening
350
- a pull request against the broken project asking to put the fix on a branch.
351
- Then you can disable the tool building via ` src/tools/toolstate.toml ` .
352
- Once the branch containing your fix is likely to be merged, you can point
353
- the affected submodule at this branch.
351
+ We allow breakage of these tools in the nightly channel. Maintainers of these
352
+ projects will be notified of the breakages and should fix them as soon as
353
+ possible.
354
354
355
- Don't forget to also add your changes with
355
+ After the external is fixed, one could add the changes with
356
356
357
- ```
357
+ ``` sh
358
358
git add path/to/submodule
359
359
```
360
360
361
361
outside the submodule.
362
362
363
- In order to prepare your PR, you can run the build locally by doing
363
+ In order to prepare your tool-fixing PR, you can run the build locally by doing
364
364
` ./x.py build src/tools/TOOL ` . If you will be editing the sources
365
365
there, you may wish to set ` submodules = false ` in the ` config.toml `
366
366
to prevent ` x.py ` from resetting to the original branch.
367
367
368
+ Breakage is not allowed in the beta and stable channels, and must be addressed
369
+ before the PR is merged.
370
+
368
371
#### Breaking Tools Built With The Compiler
369
372
[ breaking-tools-built-with-the-compiler ] : #breaking-tools-built-with-the-compiler
370
373
@@ -382,12 +385,12 @@ tests.
382
385
That means that, in the default state, you can't update the compiler without first
383
386
fixing rustfmt, rls and the other tools that the compiler builds.
384
387
385
- Luckily, a feature was [ added to Rust's build] ( https://github.com/rust-lang/rust/pull/45243 )
386
- to make all of this easy to handle. The idea is that you mark the tools as "broken",
388
+ Luckily, a feature was [ added to Rust's build] ( https://github.com/rust-lang/rust/issues/45861 )
389
+ to make all of this easy to handle. The idea is that we allow these tools to be "broken",
387
390
so that the rust-lang/rust build passes without trying to build them, then land the change
388
391
in the compiler, wait for a nightly, and go update the tools that you broke. Once you're done
389
- and the tools are working again, you go back in the compiler and change the tools back
390
- from "broken" .
392
+ and the tools are working again, you go back in the compiler and update the tools
393
+ so they can be distributed again .
391
394
392
395
This should avoid a bunch of synchronization dances and is also much easier on contributors as
393
396
there's no need to block on rls/rustfmt/other tools changes going upstream.
@@ -406,15 +409,10 @@ Here are those same steps in detail:
406
409
4 . (optional) Maintainers of these submodules will ** not** merge the PR. The PR can't be
407
410
merged because CI will be broken. You'll want to write a message on the PR referencing
408
411
your change, and how the PR should be merged once your change makes it into a nightly.
409
- 5 . Update ` src/tools/toolstate.toml ` to indicate that the tool in question is "broken",
410
- that will disable building it on CI. See the documentation in that file for the exact
411
- configuration values you can use.
412
- 6 . Commit the changes to ` src/tools/toolstate.toml ` , ** do not update submodules in your commit** ,
413
- and then update the PR you have for rust-lang/rust.
414
- 7 . Wait for your PR to merge.
415
- 8 . Wait for a nightly
416
- 9 . (optional) Help land your PR on the upstream repository now that your changes are in nightly.
417
- 10 . (optional) Send a PR to rust-lang/rust updating the submodule, reverting ` src/tools/toolstate.toml ` back to a "building" or "testing" state.
412
+ 5 . Wait for your PR to merge.
413
+ 6 . Wait for a nightly
414
+ 7 . (optional) Help land your PR on the upstream repository now that your changes are in nightly.
415
+ 8 . (optional) Send a PR to rust-lang/rust updating the submodule.
418
416
419
417
#### Updating submodules
420
418
[ updating-submodules ] : #updating-submodules
@@ -446,14 +444,14 @@ failed to run: ~/rust/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --ma
446
444
If you haven't used the ` [patch] `
447
445
section of ` Cargo.toml ` before, there is [ some relevant documentation about it
448
446
in the cargo docs] ( http://doc.crates.io/manifest.html#the-patch-section ) . In
449
- addition to that, you should read the
447
+ addition to that, you should read the
450
448
[ Overriding dependencies] ( http://doc.crates.io/specifying-dependencies.html#overriding-dependencies )
451
449
section of the documentation as well.
452
450
453
451
Specifically, the following [ section in Overriding dependencies] ( http://doc.crates.io/specifying-dependencies.html#testing-a-bugfix ) reveals what the problem is:
454
452
455
453
> Next up we need to ensure that our lock file is updated to use this new version of uuid so our project uses the locally checked out copy instead of one from crates.io. The way [ patch] works is that it'll load the dependency at ../path/to/uuid and then whenever crates.io is queried for versions of uuid it'll also return the local version.
456
- >
454
+ >
457
455
> This means that the version number of the local checkout is significant and will affect whether the patch is used. Our manifest declared uuid = "1.0" which means we'll only resolve to >= 1.0.0, < 2.0.0, and Cargo's greedy resolution algorithm also means that we'll resolve to the maximum version within that range. Typically this doesn't matter as the version of the git repository will already be greater or match the maximum version published on crates.io, but it's important to keep this in mind!
458
456
459
457
This says that when we updated the submodule, the version number in our
0 commit comments