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

Use range dependencies #158

Merged
merged 3 commits into from
Apr 25, 2024
Merged

Conversation

tcharding
Copy link
Member

@tcharding tcharding commented Apr 10, 2024

The last couple of releases of bitcoincore-rpc and bitcoin_hashes have not required code changes here. This means we can use range dependencies. The benefit is that it makes the upgrade of other crates that use bitcoind easier.

Tested by pinning hashes with:

And then pinning bitcoincore-rpc with all of the dependencies in the range and running cargo check --all --all-features --all-targets

E.g (using cc as alias to the cargo check command above)

  • cargo update -p bitcoincore-rpc --precise 0.17.0 && cc
  • cargo update -p bitcoincore-rpc --precise 0.18.0 && cc
  • cargo update -p bitcoincore-rpc --precise 0.19.0 && cc

Bump the crate patch version so we can release this change in a point release. Since this is a pre-1.0 crate I believe this is ok to do.

@tcharding
Copy link
Member Author

Hey @RCasatta, the changelog entry for the 0.35.x series is missing. Do you want me to add that? (either as part of this or in a separate PR?)

@RCasatta
Copy link
Collaborator

utACK 2ff068f

the changelog entry for the 0.35.x series is missing. Do you want me to add that?

Yes please, and sorry that I forgot.

either as part of this or in a separate PR?

As you prefer

During the last two releases we forgot to add a changelog.
The last couple of releases of `bitcoincore-rpc` and `bitcoin_hashes`
have not required code changes here. This means we can use range
dependencies. The benefit is that it makes the upgrade of other crates
that use `bitcoind` easier.

Tested by pinning `hashes` with:

- cargo update -p [email protected] --precise 0.13.0
- cargo update -p [email protected] --precise 0.14.0

And then pinning `bitcoincore-rpc` with all of the dependencies in the
range and running `cargo check --all --all-features --all-targets`

E.g (using `cc` as alias to the cargo check command above)

- cargo update -p bitcoincore-rpc --precise 0.17.0 && cc
- cargo update -p bitcoincore-rpc --precise 0.18.0 && cc
- cargo update -p bitcoincore-rpc --precise 0.19.0 && cc

Bump the crate patch version so we can release this change in a point
release. Since this is a pre-1.0 crate I believe this is ok to do.
In preparation for release bump the minor version number.
@tcharding
Copy link
Member Author

Done! I put a separate patch up the front for the missing changelog entries, this PR as a patch, and then a final "bump version number" patch for you to tag and release please.

Also the tag for v0.34.2 is missing. Looks like it should have been on commit c5b2184 Bump minor version.

@@ -11,7 +11,7 @@ edition = "2018"
categories = ["cryptography::cryptocurrencies", "development-tools::testing"]

[dependencies]
bitcoincore-rpc = { version = "0.18.0" }
bitcoincore-rpc = { version = ">= 0.17.0, <= 0.19" }
Copy link
Member Author

Choose a reason for hiding this comment

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

Note, some nuance around the version number 0.19.0:

  • that version does not exist (but cargo is ok with non-existent value in the range)
  • that version has been created locally so we have some confidence that it will exist and will not break the build
  • we don't use some random high number because we don't want to break bitcoind by an unrelated later release of bitcoincore-rpc
  • we have to do a point release bumping the top of the range every time we have an upcoming bitcoincore-rpc release (implies everytime rust-bitcoin is releaseing)

@apoelstra
Copy link
Member

utACK 7694749

@tcharding tcharding mentioned this pull request Apr 25, 2024
@tcharding
Copy link
Member Author

Can we get this in please @RCasatta?

@RCasatta
Copy link
Collaborator

utACK 7694749

Sorry for taking so long, I forgot

going to release 0.35.2 soon

@RCasatta RCasatta merged commit 7694749 into rust-bitcoin:master Apr 25, 2024
18 checks passed
@tcharding
Copy link
Member Author

No sweat, thanks man!

@tcharding tcharding deleted the 04-10-range-deps branch May 1, 2024 03:16
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