Skip to content

Commit

Permalink
docs: mention that Clippy must be run with the MSRV (#4676)
Browse files Browse the repository at this point in the history
## Motivation

In #4675 I learnt the hard way that Tokio uses Clippy on its MSRV. 

## Solution

Document this in the contributor's guide.
  • Loading branch information
SabrinaJewson committed May 10, 2022
1 parent 71e18f7 commit 593b042
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Expand Up @@ -13,6 +13,14 @@ env:
rust_stable: stable
rust_nightly: nightly-2022-03-21
rust_clippy: 1.52.0
# When updating this, also update:
# - README.md
# - tokio/README.md
# - CONTRIBUTING.md
# - tokio/Cargo.toml
# - tokio-util/Cargo.toml
# - tokio-test/Cargo.toml
# - tokio-stream/Cargo.toml
rust_min: 1.49.0

defaults:
Expand Down
18 changes: 18 additions & 0 deletions CONTRIBUTING.md
Expand Up @@ -131,6 +131,24 @@ cargo check --all-features
cargo test --all-features
```

Clippy must be run using the MSRV, so Tokio can avoid having to `#[allow]` new
lints whose fixes would be incompatible with the current MSRV:

<!--
When updating this, also update:
- .github/workflows/ci.yml
- README.md
- tokio/README.md
- tokio/Cargo.toml
- tokio-util/Cargo.toml
- tokio-test/Cargo.toml
- tokio-stream/Cargo.toml
-->

```
cargo +1.49.0 clippy --all-features
```

When building documentation normally, the markers that list the features
required for various parts of Tokio are missing. To build the documentation
correctly, use this command:
Expand Down
12 changes: 12 additions & 0 deletions README.md
Expand Up @@ -163,6 +163,18 @@ several other libraries, including:

## Supported Rust Versions

<!--
When updating this, also update:
- .github/workflows/ci.yml
- CONTRIBUTING.md
- README.md
- tokio/README.md
- tokio/Cargo.toml
- tokio-util/Cargo.toml
- tokio-test/Cargo.toml
- tokio-stream/Cargo.toml
-->

Tokio will keep a rolling MSRV (minimum supported rust version) policy of **at
least** 6 months. When increasing the MSRV, the new Rust version must have been
released at least six months ago. The current MSRV is 1.49.0.
Expand Down
12 changes: 12 additions & 0 deletions tokio/README.md
Expand Up @@ -163,6 +163,18 @@ several other libraries, including:

## Supported Rust Versions

<!--
When updating this, also update:
- .github/workflows/ci.yml
- CONTRIBUTING.md
- README.md
- tokio/README.md
- tokio/Cargo.toml
- tokio-util/Cargo.toml
- tokio-test/Cargo.toml
- tokio-stream/Cargo.toml
-->

Tokio will keep a rolling MSRV (minimum supported rust version) policy of **at
least** 6 months. When increasing the MSRV, the new Rust version must have been
released at least six months ago. The current MSRV is 1.49.0.
Expand Down

0 comments on commit 593b042

Please sign in to comment.