Skip to content

be precise in git dependency specification#6756

Merged
iximeow merged 1 commit into
mainfrom
ixi/cargo-what
Oct 2, 2024
Merged

be precise in git dependency specification#6756
iximeow merged 1 commit into
mainfrom
ixi/cargo-what

Conversation

@iximeow

@iximeow iximeow commented Oct 2, 2024

Copy link
Copy Markdown
Member

in #6585 i'd unintentionally removed the fragment from bhyve_api's source entry in Cargo.lock. it's not wrong, since it's still specifying the desired 11371b0..., but without the fragment at the end of the source Cargo parses this as a non-precise reference and updates the git repo tracking this dependency every time it resolves dependdencies. so, put the fragment back and be very clear to Cargo that once it has 11371b0... it does not need to do more git operations to try getting a newer version of the commit.

(this makes a bit more sense if you imagine source urls like git+https://github.com/foo.git?rev=main#1234: in the case where rev is a commit it's arguably a bug to fetch from remotes when you already have the commit..)

Cargo generally handles this automatically, compare with other version bumps. i suspect i got the lockfile in this state by resolving a merge conflict incorrectly.

@iximeow iximeow merged commit 03c4f24 into main Oct 2, 2024
@iximeow iximeow deleted the ixi/cargo-what branch October 2, 2024 20:34
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

Successfully merging this pull request may close these issues.

2 participants