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
Update what deps to pin #1977
Update what deps to pin #1977
Conversation
e9c358f
to
634f873
Compare
cargo update -p serde --precise 1.0.156 | ||
cargo update -p half --precise 1.7.1 |
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.
We still pin half
in the fuzz tests.
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.
This was a mistake on my part for not confirming ahead of time, but I'm not sure why these deps need to be pinned. @apoelstra mentioned they where out of sync now with contrib/test.sh #1969.
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's probably fine not to mention half
since downstream users won't need to pin it.
Re "not sure why", try compiling with 1.48.0 without the pin, and see what happens.
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 tested building rust-bitcoin as well as a downstream crate that depends on rust-bitcoin without the pinning and both built without a problem using cargo +1.48 build
. To build rust-bitcoin, I had to copy Cargo-recent.lock
-> Cargo.lock
. I tested the builds inside a clean bsd jail to be sure there wasn't any cargo cache or something like that.
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.
also note the downstream crate is pointing at the master branch on git that I tested.
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.
If you are using Cargo-recent.lock
then you're not testing the pins.
For my part I can't build with 1.48.0 with the current set of pins, because proc-macros2 doesn't build with the latest MSRV. When I add that pin, I then can't build because of some incompatibility with hashes
macros.
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.
After a clean install the pins in ./bitcoin/contrib/test.sh
without changing Cargo.lock
:
cargo update -p serde_json --precise 1.0.99
cargo update -p serde --precise 1.0.156
however this does not build for me.
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.
If you are using Cargo-recent.lock then you're not testing the pins.
If that's the case, then do the pins actually need to be run in ./bitcoin/contrib/test.sh
?
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 tested taking the pins out of test.sh and the test suits passes.
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.
ACK 634f873
Ok, the following series of actions doesn't work:
While the macro errors appear to originate inside the repo, they don't occur when I use Cargo-recent.lock. Investigating further.. Edit: Ok, the issue seems to be that after running Edit 2: Got it working. Updated code. I think that @yancyribbons is right that the |
Holy Moly, I did not get this step any time I tried to workout the pins. |
Confirming sequence of command posted above. So the readme needs to be something like:
|
Both cargo build and cargo test worked for me with the four pins:
I didn't need to run the following to run test:
note I tested this on a clean install. |
4b15562
to
df998f5
Compare
The README has been updated to include the four pins. |
This PR now has a stray "add max standard tx weight to transaction" commit in it which does not match any other PR. |
df998f5
to
8ac3eb2
Compare
@apoelstra thanks. Rebase gone bad I guess :) |
Looks good! As a separate PR we should add a test that directly tries to use the latest deps from cargo (and that will require the pins). |
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.
ACK 8ac3eb2
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.
ACK 8ac3eb2
Strange that you didn't need to pin #!/bin/sh
rm Cargo.lock
cargo +1.48.0 update
#cargo +1.48.0 build ## will fail, needs serde pins
# serde pins copied from contrib/test.sh
cargo update -p serde_json --precise 1.0.99
cargo update -p serde --precise 1.0.156
#cargo +1.48.0 build ## will fail, needs proc-macro2 pin
cargo update -p quote --precise 1.0.30 # needed to pin proc-macro2
cargo update -p proc-macro2 --precise 1.0.63
#cargo +1.48.0 build ## will fail, gives me macro errors
cargo +1.48.0 update -p bitcoin:0.30.1 --precise 0.30.0
# cargo +1.48.0 build ## will fail, needs serde_test pin
cargo update -p serde_test --precise 1.0.175
cargo +1.48.0 test |
@tcharding oh, oops. So, CI currently does not test pinning at all, because it exclusively tests with the fixed lockfiles. I think we do need the |
Yeah, sadly I can feel a multi hour bash hacking session coming on ... |
The following works for rust-minsicript Note that not all of these would be required as rust-miniscript also has a dev dependency on |
Oops yeah you're right, serde_test pin is required. I think maybe I accidently ran |
8ac3eb2
to
443a4c5
Compare
Added |
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.
ACK 443a4c5
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.
ACK 443a4c5
Update the deps to pin so that they match contrib/test.sh: https://github.com/rust-bitcoin/rust-bitcoin/blob/master/bitcoin/contrib/test.sh#L27