-
Notifications
You must be signed in to change notification settings - Fork 42
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
Checkout HEAD
instead of master
#53
Conversation
In cargo, `HEAD` is updated instead of `master`. This mismatch means that the two refs can drift, depending on when cargo and this library last fetched changes. I believe this change will fix crate-ci/cargo-release#224. /~https://github.com/rust-lang/cargo/blob/0b2059e9811caa238a603f0300d9c5fb485000a6/src/cargo/sources/registry/remote.rs#L56
Thanks |
I am encountering the reverse situation. I am using the latest crates-index which updates the |
Also, looks like |
Yes, this PR didn't actually solve all the differences between how cargo sees the index and how this crate sees the index. My current theory is that it has to do with the |
Yeah, I am also seeing that cargo is updating the origin/master tag. |
@jtgeibel I found the issue. For us to be backward compatible to work with all cargo versions, the fix should be also fetching the @kornelski Or if you can publish a new patch with recent |
@pksunkara I'm not super familiar with the cargo codebase, but I believe the code you've linked to is related to dependency resolution, not interactions with the registry index. The next stable release (0.53) will include a change such that if your The registry index code is located in |
It's unclear to me what needs to be changed here. As far as I can tell reading HEAD is the correct way. |
No it is not. I have built and run the old cargo locally with a lot of debugging and logging. Cargo after updating the index reads the sha using this git resolve which returns the This sha is used to retrieve the crate info from git, which is why we are seeing the publish errors. @kornelski the fix is to also fetch the |
You are linking to the latest 0.53.0 release which is okay. But people would still use lot of old cargo versions which reads If we want to say that this library only supports rust 1.53.0 onwards, that's okay with me. I would just request a new patch release so that I can build a work around on my tool (which uses this lib). |
In cargo,
HEAD
is updated instead ofmaster
. This mismatch means that the two refs can drift, depending on when cargo and this library last fetched changes.I believe this change will fix crate-ci/cargo-release#224. In that bug, it is first confirmed (by fetching
master
) that a recently published crate is now available in the public index. Once the dependency is published, it should be safe to publish new crates which depend on it. However, when the next crate is published the local build fails becausecargo
is using a less recentHEAD
, which was not updated bycrates-index
.The change brings this implementation into alignment with
src/bare_index.rs
.