Skip to content

Add basic derives for Parity#361

Merged
apoelstra merged 3 commits intorust-bitcoin:masterfrom
sanket1729:parity_derives
Jan 6, 2022
Merged

Add basic derives for Parity#361
apoelstra merged 3 commits intorust-bitcoin:masterfrom
sanket1729:parity_derives

Conversation

@sanket1729
Copy link
Copy Markdown
Member

Sorry for getting another point release. This time I have tested against this branch for rust-bitcoin rust-bitcoin/rust-bitcoin#755. Hopefully, this is the last release.

Next release, we should have a Release Candidate for a couple of days before publishing a release.

@sanket1729
Copy link
Copy Markdown
Member Author

Another patch. This should be the last one. I have tested this downstream with rust-bitcoin @apoelstra

@sanket1729 sanket1729 force-pushed the parity_derives branch 5 times, most recently from 89b70c0 to 82c2169 Compare January 6, 2022 18:24
@sanket1729
Copy link
Copy Markdown
Member Author

I initially tried to do auto-derives for serde, but I was facing a lot of issues because of MSRV. It required me to do pinning for underlying dependencies for 1.29.

I have implemented a custom Visitor for Parity by basically pasting code.

@sanket1729 sanket1729 changed the title Wildcard export from key module Add basic derives for Parity Jan 6, 2022
Comment thread src/lib.rs
mod serde_util;

pub use key::{SecretKey, PublicKey, ONE_KEY, KeyPair, XOnlyPublicKey, Parity};
pub use key::*;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In 7059192:

Will this export non-public things?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually @TheBlueMatt pointed out to me that there's no way it could, since the top-level module doesn't have visibility into things in key that aren't pub.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope. If something is not defined pub, it won't be exported. We doing something similar to context.

Copy link
Copy Markdown
Member

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 1671dfc

@apoelstra apoelstra merged commit 6911734 into rust-bitcoin:master Jan 6, 2022
@tcharding
Copy link
Copy Markdown
Member

Thanks for scrambling to fix this all this @sanket1729

chain-forgexcr45 added a commit to chain-forgexcr45/rust-secp256k1 that referenced this pull request Sep 28, 2025
1671dfc2ed7f35fc71ee256392a34196b081744d Release 0.21.2 (sanket1729)
837be22e09b9e1a51eea26a67ec4112fcdf83d6e Basic derives for Parity (sanket1729)
7059192de9e1fb6cf24cb03e8be31a4d6b4f6587 Wildcard export from key module (sanket1729)

Pull request description:

  Sorry for getting another point release. This time I have tested against this branch for rust-bitcoin rust-bitcoin/rust-bitcoin#755. Hopefully, this is the last release.

  Next release, we should have a Release Candidate for a couple of days before publishing a release.

ACKs for top commit:
  apoelstra:
    ACK 1671dfc2ed7f35fc71ee256392a34196b081744d

Tree-SHA512: 263ad027da3da764bd76f719200382c47ba21a976caefc23ebef45d1c4be35ddfc80ce619b57326310aaab22bbf75ca7f1db80b45e95ec076584805efb791f3f
william2332-limf added a commit to william2332-limf/rust-secp256k1 that referenced this pull request Oct 2, 2025
1671dfc2ed7f35fc71ee256392a34196b081744d Release 0.21.2 (sanket1729)
837be22e09b9e1a51eea26a67ec4112fcdf83d6e Basic derives for Parity (sanket1729)
7059192de9e1fb6cf24cb03e8be31a4d6b4f6587 Wildcard export from key module (sanket1729)

Pull request description:

  Sorry for getting another point release. This time I have tested against this branch for rust-bitcoin rust-bitcoin/rust-bitcoin#755. Hopefully, this is the last release.

  Next release, we should have a Release Candidate for a couple of days before publishing a release.

ACKs for top commit:
  apoelstra:
    ACK 1671dfc2ed7f35fc71ee256392a34196b081744d

Tree-SHA512: 263ad027da3da764bd76f719200382c47ba21a976caefc23ebef45d1c4be35ddfc80ce619b57326310aaab22bbf75ca7f1db80b45e95ec076584805efb791f3f
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

Successfully merging this pull request may close these issues.

3 participants