Skip to content

Commit 475e564

Browse files
authored
Merge pull request #435 from flip1995/clippy_plugin
Blog post on removing the Clippy plugin interface
2 parents 260ff85 + 3b47f7a commit 475e564

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
layout: post
3+
title: "Clippy is removing its plugin interface"
4+
author: Philipp Krones
5+
description: "Now that compiler plugins are deprecated, Clippy is removing its deprecated plugin interface"
6+
team: the Dev tools team (Clippy) <https://www.rust-lang.org/governance/teams/dev-tools#clippy>
7+
---
8+
9+
Today, we're announcing that Clippy will completely remove its plugin interface.
10+
Using the plugin interface has been deprecated for about one and a half year now
11+
([rust-lang/rust-clippy#2712]). Since then, an unsilenceable warning has been
12+
emitted. Now that compiler plugins are officially deprecated
13+
([rust-lang/rust#64675]), Clippy will remove its support for the plugin
14+
interface completely ([rust-lang/rust-clippy#4714]). This change will hit stable
15+
with version 1.41.0.
16+
17+
[rust-lang/rust-clippy#2712]: https://github.com/rust-lang/rust-clippy/pull/2712
18+
[rust-lang/rust#64675]: https://github.com/rust-lang/rust/pull/64675
19+
[rust-lang/rust-clippy#4714]: https://github.com/rust-lang/rust-clippy/pull/4714
20+
21+
### Does this post affect me?
22+
23+
Most likely, no. This post only affects you, if you're still using Clippy
24+
through its plugin interface. If you do so, you get the warning
25+
26+
```
27+
warning: the clippy plugin is being deprecated, please use cargo clippy or rls with the clippy feature
28+
```
29+
30+
when compiling your crate. If you don't see this warning, nothing will change
31+
for you.
32+
33+
### How do I migrate from the plugin interface?
34+
35+
If you are still using the Clippy plugin interface, here are some steps you can
36+
take to migrate to `cargo clippy`.
37+
38+
1. `Cargo.toml`: Remove every occurrence of the `clippy` dependency and the
39+
`clippy` feature.
40+
2. Completely remove every occurrence of `feature(plugin)` and `plugin(clippy)`.
41+
3. Replace every occurrence of `feature = "clippy"` with `feature =
42+
"cargo-clippy"`. The `cargo-clippy` feature is automatically enabled when
43+
running `cargo clippy`.
44+
4. CI: You now have to install Clippy via rustup, with `rustup component add
45+
clippy`. Once installed, you can run `cargo clippy` (for more usage
46+
instructions, see the [Clippy `README`]). Note that Clippy is not included in
47+
every nightly, but you can check its availability on the [rustup components
48+
history] page.
49+
50+
[Clippy `README`]: https://github.com/rust-lang/rust-clippy#usage
51+
[rustup components history]: https://rust-lang.github.io/rustup-components-history/index.html
52+
53+
### Where should I go if I have more questions?
54+
55+
If you need help with migrating from the plugin interface, you can contact us
56+
via [Discord] or open an issue on [GitHub].
57+
58+
[Discord]: https://discord.gg/vNNtpyD
59+
[GitHub]: https://github.com/rust-lang/clippy/issues/new

0 commit comments

Comments
 (0)