Comments (1)
Draft: Compatibility check cmd overrides with runner=rustup-run
December release
Override rustup run commands
By default, the Rustup run command used to test whether a toolchain is compatible, is rustup run <toolchain> cargo check
. If you wanted to use another command, you could already use cargo msrv -- <my command>
, e.g. cargo msrv -- cargo build
. This is necessary for example if you rely on a version of cargo which does not yet have cargo check
built in. Then, you could run both: cargo msrv --min 1.16
and cargo msrv --max 1.15 -- cargo build
, but this gets old, fast.
From cargo-msrv v0.16 it is also possible to override the compatibility check commands used. To do this, specify the following overrides in your Cargo.toml
:
[[package.metadata.msrv.override]]
runner = "rustup-run"
version_req = "<1.17"
compatibility_check = "cargo build"
NB: The combination runner
and version_req
must be unique. Also note that the version req follows the semver::VersionReq, spec with the following limitation: cargo-msrv only supports stable Rust releases.
By default, from this cargo-msrv release, we will override the compatibility check for Rust toolchains released prior to Rust 1.16
(cargo check
became available from Cargo 1.16
).
The precedence of overrides is as follows:
- Granular override defined in the Cargo.toml
>
- Global override specified via remainder CLI arguments (
cargo msrv -- <cmd>
)>
- Default compatibility check override
>
- Default compatibility check
Note that running two or more different commands (e.g. cargo build
vs cargo check
) does mean that you test your project for compatibility in different ways, which may not be consistent with each other.
Since it is unlikely that many people are still using a Rust toolchain before Rust 1.16 (released in 2017, on March 16th), the impact of the default override should be minimal.
from cargo-msrv.
Related Issues (20)
- indicatif 0.17.4 breaks rendering HOT 1
- feature: cargo-msrv rules (msrv by offset)
- feature: cargo-msrv suggest
- Cargo resolves different versions of dependencies (with different MSRV) from Cargo 1.60 and up HOT 14
- failure in GitLab runner: error: unexpected argument 'sh' found HOT 4
- verification does not respect workspace members with a virtual workspace HOT 4
- The code is hard to read/follow HOT 1
- Split expected and unexpected errors
- Failure on Github Actions HOT 2
- Custom check? HOT 4
- Docker image fails with GLIBC not found error HOT 2
- Use compilation target instead of build machine target for MSRV checks
- v0.16.0-beta.16 release builds failed: third party license files failed to generate HOT 1
- Add `--features` parameter
- Posible to install clippy for using it as a check? HOT 4
- Add `--workspace` flag to subcommand `find`
- Run tests which write to disk in temp dirs
- Coverage is broken due to aHash or crc32c <0.7.0 used in transitive dependency
- check if job result is a clippy false positive
- Add `--strict` flag to cargo msrv verify
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cargo-msrv.