GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: cargo install uses Cargo.lock for installation by hofbi · Pull Request #3481 · pre-commit/pre-commit

Conversation

@hofbi

@hofbi hofbi commented Jun 7, 2025

Copy link
Copy Markdown

According to the cargo documentation, cargo does not care about the lockfile by default but will recompute which versions of dependencies to use. This can lead to issues such as EmbarkStudios/cargo-deny#771 where the release of a new upstream dependency breaks an existing unchanged pipeline.

Adding --locked to the cargo install to to force Cargo to use the packaged Cargo.lock file if it is available which should make rust hooks more reproducible.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@hofbi
fix: cargo install uses Cargo.lock for installation
9763f8d
hofbi
hofbi commented Jun 7, 2025
View reviewed changes
Comment thread pre_commit/languages/rust.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@hofbi
Update pre_commit/languages/rust.py
227ea2e
@asottile

asottile commented Jun 7, 2025

Copy link
Copy Markdown
Member

there's a duplicate patch / proposal in progress already

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@asottile asottile closed this Jun 7, 2025
@hofbi

hofbi commented Jun 7, 2025

Copy link
Copy Markdown
Author

I could not find anything related. The only open PR related to rust that I could find is #3235, which seems to be a new feature. Also, the last update was 10 months ago. Or is there anything you are working on which you did not push yet?

I am pretty sure, you understand the importance of lock files, so I wanted to make sure that this issue is fixed in time, being it with my PR or from someone else.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hofbi

hofbi commented Jun 9, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Author

@asottile I think I was able to find the duplicate you are referring to which should be #3163 solving #3162. Now I am a bit confused why the solution proposed either by my PR or #3163 is not what you expect? What would be your proposal to solve #3162? I am happy to support here.

If you are in favor of #3235, the current solution would not add any additional challenges. And even with hard coding the locked attribute, I don't see any usecase where someone would not want to install the dependencies as in the lockfile.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hofbi hofbi mentioned this pull request Jun 10, 2025
Bug: error: failed to compile cargo-deny v0.16.1 EmbarkStudios/cargo-deny#771
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@hofbi @asottile
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.