Skip to content

Commit

Permalink
Use range dependency for hashes v0.12.0 - v0.13.0
Browse files Browse the repository at this point in the history
There are zero code changes required to support v.0.13.0 so we elect to
use a range dependency to make the upgrade path for downstream users
more pleasant.

Upgrade the dependency of `hashes` to be either v0.12.0 or v0.13.0

Use v0.13.0 in the recent/minimal lockfiles.
  • Loading branch information
tcharding committed Aug 25, 2023
1 parent 83a2245 commit e65bca5
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 15 deletions.
20 changes: 13 additions & 7 deletions Cargo-minimal.lock
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ dependencies = [
]

[[package]]
name = "bitcoin-private"
version = "0.1.0"
name = "bitcoin-internals"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "73290177011694f38ec25e165d0387ab7ea749a4b81cd4c80dae5988229f7a57"
checksum = "9425c3bf7089c983facbae04de54513cce73b41c7f9ff8c845b54e7bc64ebbfb"

[[package]]
name = "bitcoin_hashes"
version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5d7066118b13d4b20b23645932dfb3a81ce7e29f95726c2036fa33cd7b092501"
version = "0.13.0"
source = "git+https://github.com/tcharding/rust-bitcoin?branch=06-20-hashes-release#53f68383b74025a0885056de1d3ae812f6913bca"
dependencies = [
"bitcoin-private",
"bitcoin-internals",
"hex-conservative",
]

[[package]]
Expand Down Expand Up @@ -103,6 +103,12 @@ version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ee6c0438de3ca4d8cac2eec62b228e2f8865cfe9ebefea720406774223fa2d2e"

[[package]]
name = "hex-conservative"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "30ed443af458ccb6d81c1e7e661545f94d3176752fb1df2f543b902a1e0f51e2"

[[package]]
name = "itoa"
version = "0.3.0"
Expand Down
20 changes: 13 additions & 7 deletions Cargo-recent.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ dependencies = [
]

[[package]]
name = "bitcoin-private"
version = "0.1.0"
name = "bitcoin-internals"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "73290177011694f38ec25e165d0387ab7ea749a4b81cd4c80dae5988229f7a57"
checksum = "9425c3bf7089c983facbae04de54513cce73b41c7f9ff8c845b54e7bc64ebbfb"

[[package]]
name = "bitcoin_hashes"
version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5d7066118b13d4b20b23645932dfb3a81ce7e29f95726c2036fa33cd7b092501"
version = "0.13.0"
source = "git+https://github.com/tcharding/rust-bitcoin?branch=06-20-hashes-release#53f68383b74025a0885056de1d3ae812f6913bca"
dependencies = [
"bitcoin-private",
"bitcoin-internals",
"hex-conservative",
]

[[package]]
Expand Down Expand Up @@ -79,6 +79,12 @@ version = "1.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7"

[[package]]
name = "hex-conservative"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "30ed443af458ccb6d81c1e7e661545f94d3176752fb1df2f543b902a1e0f51e2"

[[package]]
name = "js-sys"
version = "0.3.61"
Expand Down
7 changes: 6 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ serde = { version = "1.0.103", default-features = false, optional = true }

# You likely only want to enable these if you explicitly do not want to use "std", otherwise enable
# the respective -std feature e.g., hashes-std
hashes = { package = "bitcoin_hashes", version = "0.12", default-features = false, optional = true }
hashes = { package = "bitcoin_hashes", version = ">= 0.12, <= 0.13", default-features = false, optional = true }
rand = { version = "0.8", default-features = false, optional = true }

[dev-dependencies]
Expand Down Expand Up @@ -69,3 +69,8 @@ required-features = ["rand-std"]
[workspace]
members = ["secp256k1-sys"]
exclude = ["no_std_test"]

# TODO: Remove this when hashes v.0.13.0 is released.
[patch.crates-io.bitcoin_hashes]
git = "https://github.com/tcharding/rust-bitcoin"
branch = "06-20-hashes-release"

0 comments on commit e65bca5

Please sign in to comment.