|
| 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 also removing its 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 is deprecated for about one and a half year now |
| 11 | +([rust-lang/rust-clippy#2712]) and emits an unsilenceable warning since then. |
| 12 | +Now that compiler plugins are officially deprecated ([rust-lang/rust#64675]), |
| 13 | +Clippy will remove its support for the plugin interface completely |
| 14 | +([rust-lang/rust-clippy#4714]). |
| 15 | + |
| 16 | +[rust-lang/rust-clippy#2712]: https://github.com/rust-lang/rust-clippy/pull/2712 |
| 17 | +[rust-lang/rust#64675]: https://github.com/rust-lang/rust/pull/64675 |
| 18 | +[rust-lang/rust-clippy#4714]: https://github.com/rust-lang/rust-clippy/pull/4714 |
| 19 | + |
| 20 | +### How do I migrate from the plugin interface? |
| 21 | + |
| 22 | +Since some crates are still using the Clippy plugin interface, we want to |
| 23 | +provide a guide on how to migrate to `cargo clippy`. |
| 24 | + |
| 25 | +1. `Cargo.toml`: Remove every occurrence of the `clippy` dependency and the |
| 26 | + `clippy` feature. |
| 27 | +2. Completely remove every occurrence of `feature(plugin)` and `plugin(clippy)`. |
| 28 | +3. Replace every occurrence of `feature = "clippy"` with `feature = |
| 29 | + "cargo-clippy"`. The `cargo-clippy` feature is automatically enabled when |
| 30 | + running `cargo clippy`. |
| 31 | +4. CI: You now have to install Clippy via rustup, with `rustup component add |
| 32 | + clippy`. Once it is installed you can just run `cargo clippy` (for more usage |
| 33 | + instructions, see the [Clippy `README`]). Note that Clippy is not included in |
| 34 | + every nightly, but you can check its availability on the [rustup components |
| 35 | + history] page. |
| 36 | + |
| 37 | +[Clippy `README`]: https://github.com/rust-lang/rust-clippy#usage |
| 38 | +[rustup components history]: https://rust-lang.github.io/rustup-components-history/index.html |
| 39 | + |
| 40 | +### Where should I go if I have more questions? |
| 41 | + |
| 42 | +If you need help with migrating from the plugin interface, you can contact us |
| 43 | +via [Discord] or open an issue on [GitHub]. |
| 44 | + |
| 45 | +[Discord]: https://discord.gg/vNNtpyD |
| 46 | +[GitHub]: https://github.com/rust-lang/clippy/issues/new |
0 commit comments