@@ -169,7 +169,8 @@ the issue in question.
169
169
As a developer to this repository, you don't have to treat the following external projects
170
170
differently from other crates that are directly in this repo:
171
171
172
- * Clippy
172
+ * [ Clippy] ( https://github.com/rust-lang/rust-clippy )
173
+ * [ rustfmt] ( https://github.com/rust-lang/rustfmt )
173
174
174
175
They are just regular files and directories. This is in contrast to ` submodule ` dependencies
175
176
(see below for those). Only tool authors will actually use any operations here.
@@ -233,7 +234,6 @@ subtrees) actually needs to use `git subtree`.
233
234
Currently building Rust will also build the following external projects:
234
235
235
236
* [ miri] ( https://github.com/rust-lang/miri )
236
- * [ rustfmt] ( https://github.com/rust-lang/rustfmt )
237
237
* [ rls] ( https://github.com/rust-lang/rls/ )
238
238
239
239
We allow breakage of these tools in the nightly channel. Maintainers of these
@@ -261,16 +261,16 @@ before the PR is merged.
261
261
Rust's build system builds a number of tools that make use of the
262
262
internals of the compiler. This includes
263
263
[ RLS] ( https://github.com/rust-lang/rls ) and
264
- [ rustfmt ] ( https://github.com/rust-lang/rustfmt ) . If these tools
264
+ [ miri ] ( https://github.com/rust-lang/miri ) . If these tools
265
265
break because of your changes, you may run into a sort of "chicken and egg"
266
266
problem. These tools rely on the latest compiler to be built so you can't update
267
267
them to reflect your changes to the compiler until those changes are merged into
268
268
the compiler. At the same time, you can't get your changes merged into the compiler
269
269
because the rust-lang/rust build won't pass until those tools build and pass their
270
270
tests.
271
271
272
- That means that, in the default state, you can 't update the compiler without first
273
- fixing rustfmt , rls and the other tools that the compiler builds.
272
+ That would mean that, in the default state, you couldn 't update the compiler without first
273
+ fixing miri , rls and the other tools that the compiler builds.
274
274
275
275
Luckily, a feature was [ added to Rust's build] ( https://github.com/rust-lang/rust/issues/45861 )
276
276
to make all of this easy to handle. The idea is that we allow these tools to be "broken",
@@ -280,7 +280,7 @@ and the tools are working again, you go back in the compiler and update the tool
280
280
so they can be distributed again.
281
281
282
282
This should avoid a bunch of synchronization dances and is also much easier on contributors as
283
- there's no need to block on rls/rustfmt /other tools changes going upstream.
283
+ there's no need to block on rls/miri /other tools changes going upstream.
284
284
285
285
Here are those same steps in detail:
286
286
@@ -290,8 +290,8 @@ Here are those same steps in detail:
290
290
from resetting to the original branch after you make your changes. If you
291
291
need to [ update any submodules to their latest versions] ( #updating-submodules ) ,
292
292
see the section of this file about that for more information.
293
- 2 . (optional) Run ` ./x.py test src/tools/rustfmt ` (substituting the submodule
294
- that broke for ` rustfmt ` ). Fix any errors in the submodule (and possibly others).
293
+ 2 . (optional) Run ` ./x.py test src/tools/rls ` (substituting the submodule
294
+ that broke for ` rls ` ). Fix any errors in the submodule (and possibly others).
295
295
3 . (optional) Make commits for your changes and send them to upstream repositories as a PR.
296
296
4 . (optional) Maintainers of these submodules will ** not** merge the PR. The PR can't be
297
297
merged because CI will be broken. You'll want to write a message on the PR referencing
@@ -303,27 +303,27 @@ Here are those same steps in detail:
303
303
304
304
#### Updating submodules
305
305
306
- These instructions are specific to updating ` rustfmt ` , however they may apply
306
+ These instructions are specific to updating ` rls ` , however they may apply
307
307
to the other submodules as well. Please help by improving these instructions
308
308
if you find any discrepancies or special cases that need to be addressed.
309
309
310
- To update the ` rustfmt ` submodule, start by running the appropriate
310
+ To update the ` rls ` submodule, start by running the appropriate
311
311
[ ` git submodule ` command] ( https://git-scm.com/book/en/v2/Git-Tools-Submodules ) .
312
312
For example, to update to the latest commit on the remote master branch,
313
313
you may want to run:
314
314
```
315
- git submodule update --remote src/tools/rustfmt
315
+ git submodule update --remote src/tools/rls
316
316
```
317
317
If you run ` ./x.py build ` now, and you are lucky, it may just work. If you see
318
318
an error message about patches that did not resolve to any crates, you will need
319
319
to complete a few more steps which are outlined with their rationale below.
320
320
321
321
* (This error may change in the future to include more information.)*
322
322
```
323
- error: failed to resolve patches for `https://github.com/rust-lang/rustfmt `
323
+ error: failed to resolve patches for `https://github.com/rust-lang/rls `
324
324
325
325
Caused by:
326
- patch for `rustfmt-nightly ` in `https://github.com/rust-lang/rustfmt ` did not resolve to any crates
326
+ patch for `rls ` in `https://github.com/rust-lang/rls ` did not resolve to any crates
327
327
failed to run: ~/rust/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path ~/rust/src/bootstrap/Cargo.toml
328
328
```
329
329
@@ -354,14 +354,14 @@ reveals what the problem is:
354
354
> crates.io, but it's important to keep this in mind!
355
355
356
356
This says that when we updated the submodule, the version number in our
357
- ` src/tools/rustfmt /Cargo.toml ` changed. The new version is different from
357
+ ` src/tools/rls /Cargo.toml ` changed. The new version is different from
358
358
the version in ` Cargo.lock ` , so the build can no longer continue.
359
359
360
360
To resolve this, we need to update ` Cargo.lock ` . Luckily, cargo provides a
361
361
command to do this easily.
362
362
363
363
```
364
- $ cargo update -p rustfmt-nightly
364
+ $ cargo update -p rls
365
365
```
366
366
367
367
This should change the version listed in ` Cargo.lock ` to the new version you updated
0 commit comments