Skip to content

Cannot build latest tag 0.5.0 #52

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

Closed
RCasatta opened this issue Jul 18, 2022 · 10 comments
Closed

Cannot build latest tag 0.5.0 #52

RCasatta opened this issue Jul 18, 2022 · 10 comments

Comments

@RCasatta
Copy link
Contributor

This fixes if we want to release 0.5.1

(FYI the error is also on the other tagged version but the 0.1.0)

diff --git a/Cargo.toml b/Cargo.toml
index 47b2b6f..d9b0d66 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -31,6 +31,7 @@ use-rand = ["rand", "secp256k1/rand"]
 
 [dependencies]
 secp256k1 = "0.20.0"
+secp256k1-sys = "=0.4.1"
 secp256k1-zkp-sys = { version = "0.5.0", default-features = false, path = "./secp256k1-zkp-sys" }
 rand = { version = "0.6", default-features = false, optional = true }
 serde = { version = "1.0", default-features = false, optional = true }
@apoelstra
Copy link
Contributor

Hmm, is the issue that we have broken secp-zkp with minor releases of secp-sys?

@RCasatta
Copy link
Contributor Author

I think yes, this happens

$~/git/rust-secp256k1-zkp((HEAD detached at 0.5.0))$ cargo check
    Checking secp256k1-zkp-sys v0.5.0 (/home/casatta/git/rust-secp256k1-zkp/secp256k1-zkp-sys)
error[E0119]: conflicting implementations of trait `std::hash::Hash` for type `zkp::Tag`
   --> secp256k1-zkp-sys/src/zkp.rs:478:1
    |
478 | impl_array_newtype!(Tag, c_uchar, 32);
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `zkp::Tag`
...
493 | impl hash::Hash for Tag {
    | ----------------------- first implementation here
    |
    = note: this error originates in the macro `impl_array_newtype` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `std::hash::Hash` for type `zkp::PedersenCommitment`
   --> secp256k1-zkp-sys/src/zkp.rs:514:1
    |
514 | impl_array_newtype!(PedersenCommitment, c_uchar, 64);
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `zkp::PedersenCommitment`
...
529 | impl hash::Hash for PedersenCommitment {
    | -------------------------------------- first implementation here
    |
    = note: this error originates in the macro `impl_array_newtype` (in Nightly builds, run with -Z macro-backtrace for more info)

For more information about this error, try `rustc --explain E0119`.
error: could not compile `secp256k1-zkp-sys` due to 2 previous errors

@apoelstra
Copy link
Contributor

I think we should just drop our explicit Hash impl rather than pinning secp-sys.

@RCasatta
Copy link
Contributor Author

yeah right, sorry, what maybe what is needed is a point release (0.5.1) which is tag 0.5.0 + 3db533c

Or a 0.6.0 release with current master

The pinning secp-sys is an hack I am using in a downstream lib

@apoelstra
Copy link
Contributor

I'm a bit confused what you mean by "a 0.6.0 release with current master" ... AFAICT such a release has been out for a month.

I can backport a fix though for 0.5.1.

@apoelstra
Copy link
Contributor

Ah, I understand, rust-secp-zkp*-sys* is not at 0.6.0. Oops.

@apoelstra
Copy link
Contributor

No, it is. @RCasatta are you able to bump to 0.6.0 or would you like me to create a 0.5.1?

@RCasatta
Copy link
Contributor Author

RCasatta commented Jul 21, 2022

Sorry, I wrongly assumed 0.6.0 wasn't released because I didn't see a tag.

If you can please tag 0.6.0 I can close this

@apoelstra
Copy link
Contributor

Sorry, it looks like I forgot to push the tag (it was there locally, which is why I couldn't figure out the problem).

I've pushed it, things should be good now.

@RCasatta
Copy link
Contributor Author

All good! Thanks

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

2 participants