apache / apache/opendal

ci: check all (or some) features for MSRV

Open
#6,197 2 comments 1 reaction 0 assignees View on GitHub
releases-note/ci
Dominant language
Rust
Stars
5.4k
Forks
825
Avg merge
1d 14m
Merged PRs (30d)
127

Description

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 specify `tokio=1`, but a dependency uses `tokio=1.x`, `generate-lockfile` will report error, and we should specify `tokio=1.x` instead.

Contributor guide

Open the contributing guide

Research direction

Start with Cargo.toml and the repository's CI workflow, then compare the referenced clap workflow and the MSRV minimal-versions guidance. Determine which feature combinations CI should check, make minimal-versions lockfile generation work with the declared dependency ranges, and verify that the MSRV checks run successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, rust
Domain
build-system, ci-cd
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.