-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
cargo update SPEC
broken if branch name contains plus sign
#14779
Comments
I believe this has already been fixed with the v4 lockfile format. v4 will be the default in Rust 1.83. The v4 format is supported back to Rust 1.78. You can update your lockfile to v4 by deleting it and rebuilding it with the beta or nightly toolchain. Or if you are adventurous, just edit the Cargo.lock file and change the version to 4 and run |
I just confirmed that this is related to the <=v3 lockfile formats. |
This also happens on older versions of Cargo like 1.68.0. This seems like a corner case between updating a selected package. When |
BTW the presence of [package]
name = "foo"
edition = "2021"
[dependencies]
empty-library = { git = "https://github.com/weihanglo/empty-library.git", branch = "中文branch+cool%/&|@#bba41cab#123" } |
Given the complexity (it doesn't seem hard but would need a bunch of extra code), I am not sure if it is worth a fix. |
While this is a nasty papercut, I propose this as a wont-fix and close this for reasons below
|
Problem
I have a crates.io patch pointing to a git repo and branch, and the branch name contains a plus sign.
That plus sign seems to break
cargo update MY_DEP
: (cargo update works fine)Steps
I've built a minimal reproducer repo:
Possible Solution(s)
No response
Notes
The plain
cargo update
output looks weird, too:Note how it is Removing w/o plus sign, adding with plus sign, for the same branch.
Version
The text was updated successfully, but these errors were encountered: