Mercurial > hg
changeset 50423:b88e9c707c95
rust: configure MSRV in Clippy
This setting makes Clippy never apply lints that are meant for
later versions. In case the target precise toolchain is the one
running, it does not make a difference, but this gives us a
machine-parseable specification that is pretty standard.
The README and `hg help rust` are updated to state that `clippy.toml`
is the single source of truth about that, also lifting a minor ambiguity:
it is fine if the MSRV is lagging behind the version in Debian testing.
author | Georges Racinet <georges.racinet@octobus.net> |
---|---|
date | Tue, 04 Apr 2023 11:58:35 +0200 |
parents | 498155b0ba41 |
children | ed052780ad5e |
files | mercurial/helptext/rust.txt rust/README.rst rust/clippy.toml |
diffstat | 3 files changed, 23 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/helptext/rust.txt Tue Apr 04 11:47:32 2023 +0200 +++ b/mercurial/helptext/rust.txt Tue Apr 04 11:58:35 2023 +0200 @@ -76,8 +76,9 @@ MSRV ==== -The minimum supported Rust version is currently 1.61.0. The project's policy is -to follow the version from Debian testing, to make the distributions' job easier. +The minimum supported Rust version is defined in `rust/clippy.toml`. +The project's policy is to keep it at or below the version from Debian testing, +to make the distributions' job easier. rhg ===
--- a/rust/README.rst Tue Apr 04 11:47:32 2023 +0200 +++ b/rust/README.rst Tue Apr 04 11:58:35 2023 +0200 @@ -79,9 +79,25 @@ Developing Rust =============== -The current version of Rust in use is ``1.61.0``, because it's what Debian -testing has. You can use ``rustup override set 1.61.0`` at the root of the repo -to make it easier on you. +Minimum Supported Rust Version +------------------------------ + +The minimum supported rust version (MSRV) is specified in the `Clippy`_ +configuration file at ``rust/clippy.toml``. It is set to be ``1.61.0`` as of +this writing, but keep in mind that the authoritative value is the one +from the configuration file. + +We bump it from time to time, with the general rule being that our +MSRV should not be greater that the version of the Rust toolchain +shipping with Debian testing, so that the Rust enhanced Mercurial can +be eventually packaged in Debian. + +To ensure that you are not depending on features introduced in later +versions, you can issue ``rustup override set x.y.z`` at the root of +the repository. + +Build and development +--------------------- Go to the ``hg-cpython`` folder::