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

generate-lockfile overwrites a checked-in Cargo.lock #15

Closed
andrewhalle opened this issue Aug 16, 2023 · 2 comments
Closed

generate-lockfile overwrites a checked-in Cargo.lock #15

andrewhalle opened this issue Aug 16, 2023 · 2 comments

Comments

@andrewhalle
Copy link

Copying actions-rs#163 to this fork.

Description

This action calls cargo generate-lockfile, which overwrites Cargo.lock according to cargo docs1

This command will create the Cargo.lock lockfile for the current package or workspace. If the lockfile already exists, it will be rebuilt with the latest available version of every package.

This negates the purpose of having a checked-in lockfile.

Proposed Fix

actions-rs#163 (comment)

Rather than call cargo generate-lockfile, call cargo metadata --format-version=1 >/dev/null instead.

Footnotes

  1. https://doc.rust-lang.org/cargo/commands/cargo-generate-lockfile.html

@tillmann-crabnebula
Copy link

FYI this is fixed in latest main but not released yet.

@tarcieri
Copy link
Member

Fixed in v2.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants