summaryrefslogtreecommitdiffstats
path: root/CONTRIBUTING.md
diff options
context:
space:
mode:
authorSunjay Varma <varma.sunjay@gmail.com>2017-10-07 21:53:43 -0400
committerSunjay Varma <varma.sunjay@gmail.com>2017-10-17 23:05:45 -0400
commitbd4907d534a1894e28a1f3cf672022e29eabf194 (patch)
treeb5cc6070809c4efe48cbf489e3b1e26d74c07e61 /CONTRIBUTING.md
parentAuto merge of #45344 - kennytm:rollup, r=kennytm (diff)
downloadgrust-bd4907d534a1894e28a1f3cf672022e29eabf194.tar.gz
grust-bd4907d534a1894e28a1f3cf672022e29eabf194.tar.bz2
grust-bd4907d534a1894e28a1f3cf672022e29eabf194.tar.xz
Documenting the process for when rustfmt/rls breakk because of your changes
Diffstat (limited to 'CONTRIBUTING.md')
-rw-r--r--CONTRIBUTING.md38
1 files changed, 38 insertions, 0 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index a86742d7bd..c6c62a8c7b 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -363,6 +363,44 @@ outside the submodule.
363It can also be more convenient during development to set `submodules = false` 363It can also be more convenient during development to set `submodules = false`
364in the `config.toml` to prevent `x.py` from resetting to the original branch. 364in the `config.toml` to prevent `x.py` from resetting to the original branch.
365 365
366#### Breaking rustfmt or rls
367
368Rust's build system also builds the
369[RLS](https://github.com/rust-lang-nursery/rls)
370and [rustfmt](https://github.com/rust-lang-nursery/rustfmt). If these tools
371break because of your changes, you may run into a sort of "chicken and egg"
372problem. Both tools rely on the latest compiler to be built so you can't update
373them until the changes you are making to the compiler land. In the meantime, you
374can't land your changes to the compiler because the build won't pass until those
375tools are fixed.
376
377That means that, in the default state, you can't update the compiler without
378fixing rustfmt and rls first.
379
380When this happens, follow these steps:
381
3821. First, if it doesn't exist already, create a `config.toml` by copying
383 `config.toml.example` in the root directory of the Rust repository.
384 Set `submodules = false` in the `[build]` section. This will prevent `x.py`
385 from resetting to the original branch after you make your changes.
3862. Run `./x.py test src/tools/rustfmt`. Fix any errors in the submodule itself
387 (the `src/tools/rustfmt` directory) until it works.
3883. Run `./x.py test src/tools/rls`. Fix any errors in the submodule itself
389 (the `src/tools/rls` directory) until it works.
3904. Make a commit for `rustfmt`, if necessary, and send a PR to the master
391 branch of rust-lang-nursery/rustfmt
3925. Do the same, if necessary for the RLS
3936. A maintainer of rls/rustfmt will **not** merge the PR. The PR can't be
394 merged because CI will be broken. Instead a new branch will be created,
395 and the PR will be pushed to the branch (the PR is left open)
3967. On your branch, update the rls/rustfmt submodules to these branches
3978. Commit the changes, update your PR to rust-lang/rust
3989. Wait for the branch to merge
39910. Wait for a nightly
40011. A maintainer of rls/rustfmt will merge the original PRs to rls/rustfmt
40112. Eventually the rls/rustfmt submodules will get re-updated back to the
402 master branch
403
366## Writing Documentation 404## Writing Documentation
367[writing-documentation]: #writing-documentation 405[writing-documentation]: #writing-documentation
368 406