Skip to content

Commit f2c339e

Browse files
committed
Pin Clippy to a nightly
1 parent b02b0c7 commit f2c339e

File tree

6 files changed

+19
-86
lines changed

6 files changed

+19
-86
lines changed

.github/workflows/clippy.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,6 @@ jobs:
5656
restore-keys: |
5757
${{ runner.os }}-x86_64-unknown-linux-gnu
5858
59-
- name: Master Toolchain Setup
60-
run: bash setup-toolchain.sh
61-
6259
# Run
6360
- name: Set LD_LIBRARY_PATH (Linux)
6461
run: |

.github/workflows/clippy_bors.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,6 @@ jobs:
105105
restore-keys: |
106106
${{ runner.os }}-${{ matrix.host }}
107107
108-
- name: Master Toolchain Setup
109-
run: bash setup-toolchain.sh
110-
env:
111-
HOST_TOOLCHAIN: ${{ matrix.host }}
112-
113108
# Run
114109
- name: Set LD_LIBRARY_PATH (Linux)
115110
if: runner.os == 'Linux'
@@ -192,9 +187,6 @@ jobs:
192187
restore-keys: |
193188
${{ runner.os }}-x86_64-unknown-linux-gnu
194189
195-
- name: Master Toolchain Setup
196-
run: bash setup-toolchain.sh
197-
198190
# Run
199191
- name: Build Integration Test
200192
run: cargo test --test integration --features integration --no-run
@@ -273,9 +265,6 @@ jobs:
273265
restore-keys: |
274266
${{ runner.os }}-x86_64-unknown-linux-gnu
275267
276-
- name: Master Toolchain Setup
277-
run: bash setup-toolchain.sh
278-
279268
# Download
280269
- name: Download target dir
281270
uses: actions/download-artifact@v1

CONTRIBUTING.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -182,18 +182,21 @@ That's why the `else_if_without_else` example uses the `register_early_pass` fun
182182
[early_lint_pass]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_lint/trait.EarlyLintPass.html
183183
[late_lint_pass]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_lint/trait.LateLintPass.html
184184

185-
## Fixing build failures caused by Rust
185+
## Syncing changes from [`rust-lang/rust`] to Clippy
186186

187-
Clippy currently gets built with `rustc` of the `rust-lang/rust` `master`
188-
branch. Most of the times we have to adapt to the changes and only very rarely
189-
there's an actual bug in Rust.
187+
Clippy currently gets built with a pinned nightly version.
190188

191-
If you decide to make Clippy work again with a Rust commit that breaks it, you
192-
have to sync the `rust-lang/rust-clippy` repository with the `subtree` copy of
193-
Clippy in the `rust-lang/rust` repository.
189+
In the `rust-lang/rust` repository, where rustc resides, there's a copy of Clippy
190+
that compiler hackers modify from time to time to adapt to changes in the unstable
191+
API of the compiler.
194192

195-
For general information about `subtree`s in the Rust repository see [Rust's
196-
`CONTRIBUTING.md`][subtree].
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.
197+
198+
For general information about `subtree`s in the Rust repository
199+
see [Rust's `CONTRIBUTING.md`][subtree].
197200

198201
### Patching git-subtree to work with big repos
199202

doc/basics.md

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
# Basics for hacking on Clippy
22

33
This document explains the basics for hacking on Clippy. Besides others, this
4-
includes how to set-up the development environment, how to build and how to test
5-
Clippy. For a more in depth description on the codebase take a look at [Adding
6-
Lints] or [Common Tools].
4+
includes how to build and test Clippy. For a more in depth description on
5+
the codebase take a look at [Adding Lints] or [Common Tools].
76

87
[Adding Lints]: https://github.com/rust-lang/rust-clippy/blob/master/doc/adding_lints.md
98
[Common Tools]: https://github.com/rust-lang/rust-clippy/blob/master/doc/common_tools_writing_lints.md
109

1110
- [Basics for hacking on Clippy](#basics-for-hacking-on-clippy)
1211
- [Get the code](#get-the-code)
13-
- [Setup](#setup)
1412
- [Building and Testing](#building-and-testing)
1513
- [`cargo dev`](#cargo-dev)
1614
- [PR](#pr)
@@ -36,31 +34,11 @@ git checkout master
3634
git rebase upstream/master
3735
# push to the master branch of your fork
3836
git push
39-
```
40-
41-
## Setup
42-
43-
Next we need to setup the toolchain to compile Clippy. Since Clippy heavily
44-
relies on compiler internals it is build with the latest rustc master. To get
45-
this toolchain, you can just use the `setup-toolchain.sh` script or use
46-
`rustup-toolchain-install-master`:
47-
48-
```bash
49-
bash setup-toolchain.sh
50-
# OR
51-
cargo install rustup-toolchain-install-master
52-
# For better IDE integration also add `-c rustfmt -c rust-src` (optional)
53-
rustup-toolchain-install-master -f -n master -c rustc-dev -c llvm-tools
54-
rustup override set master
55-
```
56-
57-
_Note:_ Sometimes you may get compiler errors when building Clippy, even if you
58-
didn't change anything. Normally those will be fixed by a maintainer in a few hours.
37+
```
5938

6039
## Building and Testing
6140

62-
Once the `master` toolchain is installed, you can build and test Clippy like
63-
every other Rust project:
41+
You can build and test Clippy like every other Rust project:
6442

6543
```bash
6644
cargo build # builds Clippy

rust-toolchain

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
nightly
1+
[toolchain]
2+
channel = "nightly-2020-11-29"
3+
components = ["llvm-tools-preview", "rustc-dev", "rust-src", "rustfmt"]

setup-toolchain.sh

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
 (0)