opendal
opendal copied to clipboard
ci: check all (or some) features for MSRV
Context: https://github.com/apache/opendal/issues/6178
Currently we don't have any feature flags set in CI for MSRV.
However, directly turn on --all-features likely won't work, as many dependencies need to use higher toolchain version.
The solution is to use cargo +nightly generate-lockfile -Z minimal-versions
- ref: https://github.com/clap-rs/clap/blob/e2188d9af318f3287c1c5a52cba6b9dfebe7bb75/.github/workflows/ci.yml#L185-L186
- https://github.com/foresterre/cargo-msrv/issues/312
- To use this, we will need to fix our
Cargo.toml. e.g., if we specifytokio=1, but a dependency usestokio=1.x,generate-lockfilewill report error, and we should specifytokio=1.xinstead.
Maybe can try this https://doc.rust-lang.org/cargo/reference/config.html#resolverincompatible-rust-versions
I personally believe this won't be an issue anymore once our ecosystem is fully set up on Rust Edition 2024.