-
Notifications
You must be signed in to change notification settings - Fork 148
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 upgrade
fails to get crates version when using sparse registry
#841
Comments
Does it fail in practice from a user changing their config? From what I understand it shouldn't but I could be wrong. As for server side, crates.io will continue to support the git registry, so switching to sparse registry is for performance and for alternative registries that drop git registry support. Personally, I suspect the path to merging into cargo would be the faster / easier route. |
If the user had previously fetched the index, they would be fine. However, the main purpose of sparse registry is to speed up fresh setup, so new users after the change would be clueless because the error message is bad: Error: reference 'refs/heads/master' not found; class=Reference (4); code=NotFound (-3)
Caused by:
reference 'refs/heads/master' not found; class=Reference (4); code=NotFound (-3) From what I heard, cargo is currently on a feature freeze. I'm uncertain if this could make it into cargo before the default change. |
So this isn't a matter of |
I've tried to find reproduction steps for this to report this upstream but cannot reproduce this. I've tried
|
If you do |
I got this too. |
As a workaround, adding the following to # Because cargo-upgrade will fail otherwise
# https://github.com/killercup/cargo-edit/issues/841
[registries.crates-io]
protocol = "git" https://doc.rust-lang.org/cargo/reference/config.html#registriescrates-ioprotocol |
Just an fyi sparse becomes the default strategy in 1.70.0, due for release on the 1st of June https://releases.rs/docs/1.70.0/ Thanks all for your work! |
Until frewsxcv/rust-crates-index#87 is fixed, we will have no progression |
That was fixed last week, let's go ahead and upgrade it and see if it works |
To be clear, I would consider that a workaround (moving off of git) rather than a fix to the problem as using a git index at the same time as a parse index should work |
Since there will be no git repo locally after the change to use sparse registry, we need another way to figure out the latest version available.
The text was updated successfully, but these errors were encountered: