@@ -182,21 +182,26 @@ That's why the `else_if_without_else` example uses the `register_early_pass` fun
182
182
[ early_lint_pass ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_lint/trait.EarlyLintPass.html
183
183
[ late_lint_pass ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_lint/trait.LateLintPass.html
184
184
185
- ## Syncing changes from [ ` rust-lang/rust ` ] to Clippy
185
+ ## Syncing changes between Clippy and [ ` rust-lang/rust ` ]
186
186
187
187
Clippy currently gets built with a pinned nightly version.
188
188
189
189
In the ` rust-lang/rust ` repository, where rustc resides, there's a copy of Clippy
190
190
that compiler hackers modify from time to time to adapt to changes in the unstable
191
191
API of the compiler.
192
192
193
- We need to sync these changes back to this repository periodically. If you want
194
- to help with that, you have to sync the ` rust-lang/rust-clippy ` repository with
195
- the ` subtree ` copy of Clippy in the ` rust-lang/rust ` repository, and update
196
- the ` rustc-toolchain ` file accordingly.
193
+ We need to sync these changes back to this repository periodically, and the changes
194
+ made to this repository in the meantime also need to be synced to the ` rust-lang/rust ` repository.
197
195
198
- For general information about ` subtree ` s in the Rust repository
199
- see [ Rust's ` CONTRIBUTING.md ` ] [ subtree ] .
196
+ To avoid flooding the ` rust-lang/rust ` PR queue, this two-way sync process is done
197
+ in a bi-weekly basis if there's no urgent changes. This is done starting on the day of
198
+ the Rust stable release and then every other week. That way we guarantee that we keep
199
+ this repo up to date with the latest compiler API, and every feature in Clippy is available
200
+ for 2 weeks in nightly, before it can get to beta. For reference, the first sync
201
+ following this cadence was performed the 2020-08-27.
202
+
203
+ This process is described in detail in the following sections. For general information
204
+ about ` subtree ` s in the Rust repository see [ Rust's ` CONTRIBUTING.md ` ] [ subtree ] .
200
205
201
206
### Patching git-subtree to work with big repos
202
207
@@ -225,13 +230,14 @@ This shell has a hardcoded recursion limit set to 1000. In order to make this pr
225
230
you need to force the script to run ` bash ` instead. You can do this by editing the first
226
231
line of the ` git-subtree ` script and changing ` sh ` to ` bash ` .
227
232
228
- ### Performing the sync
233
+ ### Performing the sync from [ ` rust-lang/rust ` ] to Clippy
229
234
230
235
Here is a TL;DR version of the sync process (all of the following commands have
231
236
to be run inside the ` rust ` directory):
232
237
233
- 1 . Clone the [ ` rust-lang/rust ` ] repository
234
- 2 . Sync the changes to the rust-copy of Clippy to your Clippy fork:
238
+ 1 . Clone the [ ` rust-lang/rust ` ] repository or make sure it is up to date.
239
+ 2 . Checkout the commit from the latest available nightly. You can get it using ` rustup check ` .
240
+ 3 . Sync the changes to the rust-copy of Clippy to your Clippy fork:
235
241
``` bash
236
242
# Make sure to change `your-github-name` to your github name in the following command
237
243
git subtree push -P src/tools/clippy
[email protected] :your-github-name/rust-clippy sync-from-rust
@@ -249,17 +255,11 @@ to be run inside the `rust` directory):
249
255
git checkout sync-from-rust
250
256
git merge upstream/master
251
257
` ` `
252
- 3 . Open a PR to ` rust-lang/rust-clippy` and wait for it to get merged (to
258
+ 4 . Open a PR to ` rust-lang/rust-clippy` and wait for it to get merged (to
253
259
accelerate the process ping the ` @rust-lang/clippy` team in your PR and/or
254
260
~ ~annoy~~ ask them in the [Zulip] stream.)
255
-
256
- # ## Syncing back changes in Clippy to [`rust-lang/rust`]
257
261
258
- To avoid flooding the [` rust-lang/rust` ] PR queue, changes in Clippy' s repo are synced back
259
- in a bi-weekly basis if there' s no urgent changes. This is done starting on the day of
260
- the Rust stable release and then every other week. That way we guarantee that
261
- every feature in Clippy is available for 2 weeks in nightly, before it can get to beta.
262
- For reference, the first sync following this cadence was performed the 2020-08-27.
262
+ # ## Performing the sync from Clippy to [`rust-lang/rust`]
263
263
264
264
All of the following commands have to be run inside the ` rust` directory.
265
265
0 commit comments