Skip to content
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

Recent ndk-sys yank is breaking CI. #369

Closed
Zageron opened this issue Nov 23, 2022 · 9 comments
Closed

Recent ndk-sys yank is breaking CI. #369

Zageron opened this issue Nov 23, 2022 · 9 comments

Comments

@Zageron
Copy link

Zageron commented Nov 23, 2022

Checksum is failing on ndk-sys 0.4.0.

https://github.com/Zageron/rrr/actions/runs/3529598287/jobs/5920752227

Etc...

@ogoffart
Copy link

ogoffart commented Nov 23, 2022

So it seems that the problem is that there is a version 0.4.0 and a version 0.4.0+25.0.8775105 on crates.io.
Apparently, the code in cargo get confused because the two version compare the same.

Cf rust-lang/cargo#6504 , rust-lang/crates.io#1059 , rust-lang/cargo#7180

The immediate solution would be to release ndk-sys 0.4.1 as soon as possible (I recommend re-publishing 0.4.0 as 0.4.1)

@MarijnS95
Copy link
Member

Duplicate of #368, and the offending crate has been yanked: I cannot repro this locally with a cargo update on a crate that consumes ndk-sys.

Could this possibly exhibit itself when an a cargo update (or in general downloading the initial crates.io index) was performed while the broken 0.4.0+25.0.8775105 release was live, leading to the crate being downloaded into ~/.cargo and considered by commands like cargo metadata going forward? That sounds like a followup cargo bug if it isn't able to recover from having previously downloaded a broken crate that's now been yanked, when it should instead be disregarded completely.
(None of the links shared by @ogoffart seem to describe this, but crates.io should disallow such publishes anyway 😶)

I was anyway planning on releasing a 0.4.1+23.1.7779620 to represent the version of the previous release, if that helps. Going forward we'll have to think more carefully about bumping this metadata version as our CI will immediately publish it as a release; any version upgrades should just be a release at that point.

@ogoffart
Copy link

I think there is a race condition in cargo and the bug happens only sometimes when downloading the crates from fresh cargo cache.
But now that 0.4.1+23.1.7779620 is released, the problem should be solved.
thank you!

@MarijnS95
Copy link
Member

I think there is a race condition in cargo

Is this reported upstream somewhere?

and the bug happens only sometimes when downloading the crates from fresh cargo cache.

Right, the CI run linked by @Zageron above indicates No cache found.; that CI run is from a few hours ago, well after I yanked the broken release yesterday which is strange to say the least.

But now that 0.4.1+23.1.7779620 is released, the problem should be solved. thank you!

Thanks, I'll close this as completed then unless you want to confirm it first!
(Confirmed to build and run fine on my crates)

@MarijnS95
Copy link
Member

MarijnS95 commented Nov 23, 2022

Hah I'm also running into the exact same issue randomly, perhaps because of still being Cargo.lock'ed into 0.4.0, despite (again) this crate being yanked well over a day ago and the ~/.cargo cache being completely empty/fresh. 😞

Is cargo really that buggy/racy, or am I holding it wrong?

@MarijnS95 MarijnS95 reopened this Nov 23, 2022
@MarijnS95
Copy link
Member

Reopening this because it's super easy to repro. On a cleaned ~/.cargo, all I need to do is force use of 0.4.0 (not 0.4.1!) with the semver string "=0.4.0" or use a Cargo.lock fixed (not yet updated) to 0.4.1. Then try to build, and before it even downloads the crate:

  Downloaded ndk-sys v0.4.0
error: failed to verify the checksum of `ndk-sys v0.4.0`

(There's no ndk-sys folder anywhere inside ~/.cargo/registry/{cache,src}/github.com-1ecc6299db9ec823/)

@eminence
Copy link

eminence commented Dec 3, 2022

See also: rust-lang/cargo#11412

@brianm-sra
Copy link

Please update file ndk-glue/Cargo.toml to reference version ndk-sys v0.4.1

On rust-lang/cargo#7180 it is mentioned

"I have since published 0.4.1 to help users resolve this issue,"

@MarijnS95
Copy link
Member

Not hearing anyone about this issue anymore, hoping it is resolved now (and will be much more careful pushing version changes in the future)! 🤞

MarijnS95 added a commit to MarijnS95/ndk that referenced this issue Jun 29, 2023
This again makes it possible to `patch` the latest `ndk-sys` crate used
in a dependency tree.  There are no backports from `0.4.0` -> `0.4.1`
and this version metadata was not matching the NDK version the crate is
generated from anyway to prevent the CI from releasing the same crate
version again with different version metadata (which results in `cargo`
errors locally, yet crates.io still allows uploading such a conflict:
rust-mobile#369 (comment)).
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

No branches or pull requests

5 participants