Skip to content

Cargo resolves different versions of dependencies (with different MSRV) from Cargo 1.60 and up #728

@johannesvollmer

Description

@johannesvollmer

Hi! I'm using GitHub Workflows to check PRs. I also added a check ensuring that all PRs conform to the rust-version defined in the projects Cargo.toml. However, it seems I got something wrong. Do you have an idea what could be the problem? :)

Here's what I've got:

verify-msrv:
    runs-on: ubuntu-latest
    name: verify minimum supported rust version (ubuntu)
    timeout-minutes: 30

    # we are using the `cargo-msrv` app
    # https://github.com/foresterre/cargo-msrv

    steps:
      - uses: actions/checkout@v2

      - name: Install or use cached foresterre/cargo-msrv
        uses: baptiste0928/cargo-install@v1
        with:
          crate: cargo-msrv

      - name: Verify the Rustc version declared in `cargo.toml`
        run: |
          cargo-msrv verify

(see https://github.com/johannesvollmer/exrs/blob/a4aa0acc9fe9d4467eabf47cb647ff99dc7b10b5/.github/workflows/rust.yml#L39)

I checked that your tool returns exit codes. Somehow, the check does not fail though. This is the output I get from GitHub:

Run cargo-msrv verify
  cargo-msrv verify
  shell: /usr/bin/bash -e {0}
Fetching index
Verifying the Minimum Supported Rust Version (MSRV) for toolchain x86_64-unknown-linux-gnu
Using check command cargo check

(see https://github.com/johannesvollmer/exrs/actions/runs/5441981161/jobs/9896601827?pr=191)

Shouldn't there be more text? The same command correctly fails on my local machine. Maybe you have an idea? :)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions