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

Checksum change on second build #11

Closed
sphinxc0re opened this issue Dec 13, 2018 · 9 comments
Closed

Checksum change on second build #11

sphinxc0re opened this issue Dec 13, 2018 · 9 comments

Comments

@sphinxc0re
Copy link

I'm evaluating runng for a small project. I'm on macOS. When I do a fresh compilation of my project, everything is fine. Now, when I'm trying to compile a second time, I get this error:

$ cargo run  
error: checksum for `runng-sys v1.1.1+4` changed between lock files

this could be indicative of a few possible errors:

    * the lock file is corrupt
    * a replacement source in use (e.g. a mirror) returned a different checksum
    * the source itself may be corrupt in one way or another

unable to verify that `runng-sys v1.1.1+4` is the same as when the lockfile was generated

And it doesn't compile

@jeikabu
Copy link
Owner

jeikabu commented Dec 14, 2018

I primarily develop on OSX so it's definitely not OS-neglect. =)

Verified this happens for me as well with a new project. Tried a few different combinations and all have the same problem:

runng = "0.1"
runng-sys = "1.1.1"
runng-sys = "1.1.1+4"

In my own projects I tend to use the source rather than pulling the crate (i.e. runng = { version = "0.1", path = "../runng" }), so I'd not noticed this before.

Not sure if this is caused by:

I'll look into this, in the mean time you could git clone and reference the source. Thanks for reporting this.

@oysterpack
Copy link

I develop on ubuntu, and ran into the same issue. As an FYI, the nng does not have this issue. Once this issue is resolved, I will give it another try.

@jeikabu
Copy link
Owner

jeikabu commented Dec 30, 2018

It seems to be caused by cargo's partial support for semver meta-data.
If I un-yank the "1.1.1" crate everything is fine. If I yank "1.1.1" then "1.1.1+4" is pulled and you get the checksum error on second and later builds...

I'll leave "1.1.1" un-yanked so things build correctly from the crate. The only real difference between "1.1.1" and "1.1.1+4" is changes to get docs.rs working; they're both using nng 1.1.1.

With crates being permanent there doesn't seem to be a nice way to mirror the nng version and make trivial changes to crates...

@jeikabu jeikabu closed this as completed Dec 30, 2018
@sphinxc0re
Copy link
Author

I'm still getting this error:

$ cargo build             
  Downloaded runng-sys v1.1.1
error: failed to verify the checksum of `runng-sys v1.1.1`

Also, I ran

$ rm -rf target Cargo.lock

before

@jake-ruyi
Copy link
Collaborator

sigh it did work with a new project...

I needed to clear out the various ~/.cargo/registry/**/runng* folders to repro this.
But now it seems to be a different problem because it refuses to build even the first time.

I'll probably need to open another issue with cargo/crates.io since rust-lang/crates.io#1059 is already over a year old...

@jake-ruyi
Copy link
Collaborator

So this also happens with a test package I made (an empty library project).
I'll wait for feedback on rust-lang/cargo#6504 before I push more versions.

@jeikabu
Copy link
Owner

jeikabu commented Jan 4, 2019

Consensus is in, + build meta-data is verboten. I need to push new packages.

In cargo.toml:

runng-sys = "1.1.1-rc"
# OR
runng = "0.1.8"

I'd really like to keep the version of this aligned with NNG, so here's what seems to work:

  • runng-sys will be 1.1.1-rc.X
  • Dependent crates (e.g. runng) use 1.1.1-rc or a specific version like 1.1.1-rc.1 and the latest package gets pulled

@sphinxc0re
Copy link
Author

Thanks! It seems to be working

@jeikabu
Copy link
Owner

jeikabu commented Jan 4, 2019

Thanks for reporting it. Turns out cargo isn't quite as straight-forward as I thought. =)

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

4 participants