-
Couldn't load subscription status.
- Fork 70
Enable bitcoin_hashes v0.14.0
#76
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
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -50,7 +50,7 @@ jobs: | |
| DO_NO_STD: true | ||
| run: ./contrib/test.sh | ||
|
|
||
| MSRV: | ||
| MSRV-1.41: | ||
| name: Test - 1.41.1 toolchain | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
|
|
@@ -66,6 +66,54 @@ jobs: | |
| DO_FEATURE_MATRIX: true | ||
| run: ./contrib/test.sh | ||
|
|
||
| MSRV-1.48: | ||
| name: Test - 1.48.1 toolchain | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| steps: | ||
| - name: Checkout Crate | ||
| uses: actions/checkout@v3 | ||
| - name: Checkout Toolchain | ||
| uses: dtolnay/[email protected] | ||
| - name: Running test script | ||
| env: | ||
| DO_NO_STD: true | ||
| DO_FEATURE_MATRIX: true | ||
| run: ./contrib/test.sh | ||
|
|
||
| MSRV-1.51: | ||
| name: Test - 1.51.1 toolchain | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| steps: | ||
| - name: Checkout Crate | ||
| uses: actions/checkout@v3 | ||
| - name: Checkout Toolchain | ||
| uses: dtolnay/[email protected] | ||
| - name: Running test script | ||
| env: | ||
| DO_NO_STD: true | ||
| DO_FEATURE_MATRIX: true | ||
| run: ./contrib/test.sh | ||
|
|
||
| MSRV-1.56: | ||
| name: Test - 1.56.0 toolchain | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| steps: | ||
| - name: Checkout Crate | ||
| uses: actions/checkout@v3 | ||
| - name: Checkout Toolchain | ||
| uses: dtolnay/[email protected] | ||
| - name: Running test script | ||
| env: | ||
| DO_NO_STD: true | ||
| DO_FEATURE_MATRIX: true | ||
| run: ./contrib/test.sh | ||
|
|
||
| Arch32bit: | ||
| name: Test 32-bit version | ||
| runs-on: ubuntu-latest | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,9 +33,9 @@ This crate supports Rust v1.41.1 and up and works with `no_std`. | |
|
|
||
| The `bitcoin_hashes` range dependency effects the MSRV as follows | ||
|
|
||
| - `bitcoin_hashes v0.12`: MSRV v1.41.1 | ||
| - `bitcoin_hashes v0.13`: MSRV v1.48.0 | ||
| - `bitcoin_hashes v0.14`: MSRV v1.56.1 | ||
| - `bitcoin_hashes v0.12`: MSRV `v1.41.1` | ||
| - `bitcoin_hashes v0.13`: MSRV `v1.48.0` | ||
| - `bitcoin_hashes v0.14`: MSRV `v1.56.1` | ||
|
|
||
| When using older version of Rust, you might have to pin the versions of several crates, for an up-to-date list refer to [`contrib/test.sh`](contrib/test.sh): | ||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: Spurious whitespace here. |
||
|
|
@@ -47,4 +47,4 @@ cargo update --package "tinyvec" --precise "1.6.0" | |
| cargo update --package "unicode-normalization" --precise "0.1.22" | ||
| ``` | ||
|
|
||
| If you enable the `zeroize` feature the MSRV becomes 1.51. | ||
| If you enable the `zeroize` feature the MSRV becomes `v1.51.0`. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,6 +20,24 @@ if cargo --version | grep "1\.41"; then | |
| cargo update --package "unicode-normalization" --precise "0.1.22" | ||
| fi | ||
|
|
||
| # Pin dependencies as required if we are using MSRV toolchain. | ||
| if cargo --version | grep "1\.48"; then | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No super strong opinion, but in LDK we use such a pattern (just an example, see https://github.com/lightningdevkit/rust-lightning/blob/0.2/ci/ci-tests.sh): RUSTC_MINOR_VERSION=$(rustc --version | awk '{ split($2,a,"."); print a[2] }')
# The backtrace v0.3.75 crate relies on rustc 1.82
[ "$RUSTC_MINOR_VERSION" -lt 82 ] && cargo update -p backtrace --precise "0.3.74" --verboseSeems this could be a bit cleaner/less error prone if we start handling even more different rust versions. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I just hope that once we hit rust version |
||
| cp Cargo-minimal.lock Cargo.lock | ||
| cargo check --locked | ||
| rm Cargo.lock | ||
|
|
||
| cargo update --package "bitcoin_hashes" --precise "0.13.0" | ||
| fi | ||
|
|
||
| # Pin dependencies as required if we are using MSRV toolchain. | ||
| if cargo --version | grep "1\.56"; then | ||
| cp Cargo-minimal.lock Cargo.lock | ||
| cargo check --locked | ||
| rm Cargo.lock | ||
|
|
||
| cargo update --package "bitcoin_hashes" --precise "0.14.0" | ||
| fi | ||
|
|
||
| echo "********* Testing std *************" | ||
| # Test without any features other than std first | ||
| cargo test --verbose --no-default-features --features="std" | ||
|
|
@@ -34,7 +52,7 @@ do | |
| cargo build --verbose --features="$feature" --no-default-features | ||
| done | ||
|
|
||
| if cargo --version | grep -v "1\.41"; then | ||
| if cargo --version | grep "1\.51"; then | ||
| cargo build --verbose --features="zeroize" --no-default-features | ||
| fi | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this no longer true, i.e., why don't we have to pin back the other dependencies below?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possibly a faulty rebase conflict resolution? I made changes to these lines in #86 and this PR was open forever. @tcharding
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I just clobbered them because over the last year (since edition 2018 came into rust-bitcoin) I've barely ever had to pin anymore. Admittedly not the best reason for the change, I've put it back how it was.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it depends which MSRV you are targeting, a lot of the bip39 deps seem to have bumped their MSRV in minor version releases. I only had to pin for the old rust version tests back then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In rust-bitcoin and related crates we've avoided pinning by using fixed lockfiles, which we basically never update even though we should. That's why you haven't had to deal with this crap @tcharding.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, eventually we might want to discuss doing a conservative MSRV bump here (1.41 seems very old by now, for every standard), potentially just aligning it with the
rust-bitcoinpolicy.But, for now, that's out-of-scope of this PR. And if we already have the checks in place, there probably is no rush to do so.