-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
ci: minimal version check #3131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
.github/workflows/ci.yml
Outdated
| toolchain: ${{ env.nightly }} | ||
| override: true | ||
| - name: "check --all-features -Z minimal-versions" | ||
| run: cargo check --all-features -Z minimal-versions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I remember correctly, cargo check -Z minimal-versions doesn't really do anything. It needs to be separated into cargo update -Z minimal-versions and cargo check.
Also, dev-dependencies may raise version requirements. Ideally, remove them before run cargo update -Z minimal-versions. (Also, note that Cargo.lock is actually shared within the workspace. However as far as I know, there is no workaround for this yet.)
So, I prefer to use commands like:
# Remove dev-dependencies from Cargo.toml to prevent the next `cargo update`
# from determining minimal versions based on dev-dependencies.
cargo hack --remove-dev-deps --workspace
# Update Cargo.lock to minimal version dependencies.
cargo update -Z minimal-versions
cargo check --all-features(See also pin-project's check-minimal-version script)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll try that.
Sorry, I forgot to mention the install of |
It seems |
710: Correct minimal versions check r=taiki-e a=taiki-e dev-dependencies may raise version requirements. Ideally, remove them before run `cargo update -Z mimimal-version`. See also tokio-rs/tokio#3131 (comment). Co-authored-by: Taiki Endo <[email protected]>
This checks that crates compile with the minimum allowed version of each dependency.