Skip to content

Conversation

@tcharding
Copy link
Member

@tcharding tcharding commented Jul 14, 2023

Use the more terse hashes by way of the package field in the manifest.

Allows us to remove the ugly feature alias "bitcoin-hashes" -> "bitcoin_hashes" and removes all the bother with the underscore.

@tcharding tcharding marked this pull request as draft July 14, 2023 03:01
@tcharding tcharding force-pushed the 07-14-hashes-dep branch 3 times, most recently from 8f94237 to 446e045 Compare July 17, 2023 23:41
@tcharding tcharding marked this pull request as ready for review July 17, 2023 23:42
alloc = ["secp256k1-sys/alloc"]
bitcoin-hashes = ["bitcoin_hashes"] # Feature alias because of the underscore.
bitcoin-hashes-std = ["std", "bitcoin_hashes", "bitcoin_hashes/std"]
hashes-std = ["std", "hashes/std"]
Copy link
Member

Choose a reason for hiding this comment

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

Whenever we hit MSRV 1.60 we can replace all the -std ones with:
std = ["hashes?/std"]

Copy link
Member Author

Choose a reason for hiding this comment

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

Already tracked here: rust-bitcoin/rust-bitcoin#1722 but thanks for mentioning, I didn't actually know what "weak dependencies" meant - TIL.

elichai
elichai previously approved these changes Jul 19, 2023
Copy link
Member

@elichai elichai left a comment

Choose a reason for hiding this comment

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

ACK, only went over the diff 446e045

sanket1729
sanket1729 previously approved these changes Jul 19, 2023
Copy link
Member

@sanket1729 sanket1729 left a comment

Choose a reason for hiding this comment

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

utACK 446e045.

@tcharding tcharding dismissed stale reviews from sanket1729 and elichai via 299952b July 20, 2023 01:09
@tcharding tcharding force-pushed the 07-14-hashes-dep branch 2 times, most recently from 299952b to c5279be Compare July 20, 2023 01:11
@tcharding tcharding marked this pull request as draft July 20, 2023 03:56
@tcharding tcharding force-pushed the 07-14-hashes-dep branch 2 times, most recently from dd78b87 to a522bf2 Compare August 14, 2023 04:54
@tcharding tcharding marked this pull request as ready for review August 14, 2023 04:55
@tcharding tcharding marked this pull request as draft August 14, 2023 06:18
@tcharding
Copy link
Member Author

I botched the rebase, will fix tomorrow.

@tcharding tcharding force-pushed the 07-14-hashes-dep branch 4 times, most recently from 6cec5e7 to c965c94 Compare August 15, 2023 04:50
Use the more terse `hashes` by way of the `package` field in the
manifest.

Allows us to remove the ugly feature alias "bitcoin-hashes" ->
"bitcoin_hashes" and removes all the bother with the underscore.

Why did we not think of this 2 years ago?
Now that we have `hashes` as the crate name of `bitcoin_hashes` we can
slightly clean up the import statements.

This is based on the convention we have to import things directly from
the crate if we depend on it and not from the crate level re-export.
@tcharding tcharding marked this pull request as ready for review August 15, 2023 04:55
Copy link
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 6fdd3b1

@apoelstra apoelstra merged commit 1f9c01a into rust-bitcoin:master Aug 15, 2023
chain-forgexcr45 added a commit to chain-forgexcr45/rust-secp256k1 that referenced this pull request Sep 28, 2025
…/feature

6fdd3b1da518e828545dcec54340f9ea6f81c741 Clean up hashes import statements (Tobin C. Harding)
6d7c653b64a48aa80486f87907418992dd63d49b Use hashes instead of bitcoin_hashes (Tobin C. Harding)

Pull request description:

  Use the more terse `hashes` by way of the `package` field in the manifest.

  Allows us to remove the ugly feature alias "bitcoin-hashes" -> "bitcoin_hashes" and removes all the bother with the underscore.

ACKs for top commit:
  apoelstra:
    ACK 6fdd3b1da518e828545dcec54340f9ea6f81c741

Tree-SHA512: 2c6c81b6ef900bfe930df48ddd32e795997c107a2a94b9e2ea014da0be7aefaa952e1259ddb570b30f5ad7e94c0a9443b691645cb386a8d0349dc7a81f659ed6
william2332-limf added a commit to william2332-limf/rust-secp256k1 that referenced this pull request Oct 2, 2025
…/feature

6fdd3b1da518e828545dcec54340f9ea6f81c741 Clean up hashes import statements (Tobin C. Harding)
6d7c653b64a48aa80486f87907418992dd63d49b Use hashes instead of bitcoin_hashes (Tobin C. Harding)

Pull request description:

  Use the more terse `hashes` by way of the `package` field in the manifest.

  Allows us to remove the ugly feature alias "bitcoin-hashes" -> "bitcoin_hashes" and removes all the bother with the underscore.

ACKs for top commit:
  apoelstra:
    ACK 6fdd3b1da518e828545dcec54340f9ea6f81c741

Tree-SHA512: 2c6c81b6ef900bfe930df48ddd32e795997c107a2a94b9e2ea014da0be7aefaa952e1259ddb570b30f5ad7e94c0a9443b691645cb386a8d0349dc7a81f659ed6
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.

4 participants