Skip to content
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

Use with recent Rust nightly fails with lockfile version error #31

Closed
clechasseur opened this issue Oct 5, 2024 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@clechasseur
Copy link

In my projects, I check for MSRV by installing Rust nightly, the minimum Rust version I support and then running the following command-line (more or less):

cargo minimal-versions check --target-dir target-minimal --workspace --lib --bins --all-features

A few days ago, I started seeing failures with a message like this:

info: running `cargo hack check --target-dir target-minimal --workspace --lib --bins --all-features`
running `cargo check --target-dir target-minimal --lib --bins --all-features` on mini_exercism (1/1)
  warning: unused manifest key: lints
  error: failed to parse lock file at: /home/runner/work/mini_exercism/mini_exercism/Cargo.lock
  
  Caused by:
    lock file version `4` was found, but this version of Cargo does not understand this lock file, perhaps Cargo needs to be updated?

Example: https://github.com/clechasseur/mini_exercism/actions/runs/11097764447/job/30829476960

I tried to run this locally by reverting to the Nightly build from 2024-09-24 and the error disappeared.

I'm not an expert but I think this may be caused by this: rust-lang/cargo@cf781da

It looks like they switched to a new lockfile version in Nightly, which probably means that the lockfile generated by cargo-minimal-versions is incompatible with pre-1.78 Rust (if I understand correctly).

My questions:

  1. Is my interpretation correct?
  2. If it is, is this something that I need to fix on my end, or does it require a change in cargo-minimal-versions?

Thanks for this excellent tool btw. 🙂

@taiki-e
Copy link
Owner

taiki-e commented Oct 5, 2024

Fixed in 0.1.29. Thanks for the report!

@taiki-e taiki-e added the bug Something isn't working label Oct 5, 2024
@clechasseur
Copy link
Author

That was fast! Thank you 🔥

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants