-
Notifications
You must be signed in to change notification settings - Fork 62
Use rust-bitcoin-maintainer-tools and re-write CI #119
Use rust-bitcoin-maintainer-tools and re-write CI #119
Conversation
Looks like the We also probably want to pin nightly rustc in the same PR. |
bf1f843
to
bb77e42
Compare
78f6004
to
0513663
Compare
0513663
to
6ffa4a3
Compare
Note please the recent and minimal lock files are the same. I spent 10 minutes trying to fix them otherwise, but my fingers started to bleed. Also, I'll fix the lint job after #117 goes in. |
61dd7b8
to
ebeac68
Compare
I don't see whats up with the lint job, I can't reproduce locally? I tried, with |
@tcharding it looks like your lockfiles have It looks like serde 1.0.103 will work, which is what we have in the Cargo.toml for Anyway, to get this PR compiling we just need to bump the serde version. But separately I should go audit the lockfiles in rust-secp and rust-bitcoin. |
Since this crate is MSRV 1.48 still, I wasn't able to use the other repos lock files for guidance. Simply using |
Oh the MSRV thing is going to be a problem if we want to move this to |
Nope, no reason. Let's do it. |
a98253a
to
5cf4293
Compare
Now includes the MSRV bump, are you ok to do that in this PR or is that too much going on? |
5cf4293
to
dd4d0d3
Compare
Not sure whats up with the lint fail. |
The lint failure looks like an outdated version of serde is being used. |
oh thanks, nice. I'll try to fix that up. |
0035623
to
10972a7
Compare
Still having trouble with your lockfiles. I will try to figure it out and submit a diff. |
b234fcd
to
af66b21
Compare
Rebased to pick up the MSRV bump. Also added a patch upgrading |
af66b21
to
a065c9f
Compare
contrib/crates.sh
Outdated
#!/usr/bin/env bash | ||
|
||
# Crates in this workspace to test (excl. fuzz an integration-tests). | ||
CRATES=(".") # Non-workspaces don't have crates. |
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 a065c9f:
What is going on with this file? What does "non-workspaces don't have crates" mean, and does this actually exclude testing the fuzz
and integration-test
crates, and why?
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 yes you are correct this should include fuzz
, and I have that wrong in miniscript
as well. The comment is also wrong and was always wrong, I wrote "Non-workspcase" when I meant "repos that have crate root in the same directory as repo root" (I don't know the name for that). We need to keep the "." so it should be
CRATES=("." "fuzz") # Some comment about the dot directory.
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 you want then
# Directories of workspaces to test
CRATES=("." "fuzz")
Saying "crates in this workspace" is just confusing. Workspaces are crates.
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.
BTW the reason I'm complaining about this is that the existing lockfiles don't work with MSRV, which you can tell if you try to compile the integration_test
workspace.
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 I also forgot that this crate is 1.48 still, at least that was not in my mind yesterday.
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 there's the problem, I bumped the MSRV in this PR - I'll pull it out into a separate one. We bumped to 1.63 last week.
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.
Alright, I'm well confused. I copied Cargo-recent.lock
to Cargo.lock
and cd'ed into integration_test
and ran
cargo +1.63.0 --locked check
And it was ok.
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 just went right ahead and added fuzz
and integration_test
to CRATES
also.
FTR, note that we do not run the integration_test/run.sh
script now or previously.
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 I also forgot that this crate is 1.48 still
What the hell was I thinking
d4ed555
to
6ece4f0
Compare
In preparation for using a pinned nightly in CI add a `nightly-version` file and also a `justfile` that uses it.
Use the newly release patch version of `honggfuzz`.
Clippy emits: error: initializer for `thread_local` value can be made `const` As suggested make the call const.
df170ac
to
04dc4b2
Compare
If you run |
hmm, something is not quite right then because that should have been caught by CI. I'll investigate further. |
Found the bug in |
As we have been doing in other crates, use the new maintainer tools test script we created from `rust-bitcoin/rust-bitcoin-maintainer-tools/ci`. - This should not change test coverage in any meaningful way. - The integration tests are not currently run in CI, this patch preserves that behaviour. - Introduces recent/minimal lock files.
04dc4b2
to
8f17794
Compare
Oh, neat. I feel much better about what a PITA this PR has been. Apparently we needed to use the maintainer tools on a crate whose CI was a total mess :). |
Ok, this one should be right to merge if it gets past your local CI. |
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 8f17794 successfully ran local tests
Import the `rust-jsonrpc` crate from https://github.com/apoelstra/rust-jsonrpc using current tip of master `59646e6 Merge apoelstra/rust-jsonrpc#119: Use rust-bitcoin-maintainer-tools and re-write CI` Full commit hash: 59646e6e6ac95f07998133b1709e4a1fa2dbc7bd Do so using the following commands: mkdir jsonrpc mkdir jsonrpc/contrib rsync -avz ../../rust-jsonrpc/master/README.md jsonrpc rsync -avz ../../rust-jsonrpc/master/src jsonrpc rsync -avz ../../rust-jsonrpc/master/contrib/test_vars.sh jsonrpc/contrib Then: - Update `contrib/crates.sh` to include `jsonrpc`. - Remove workspaces from `jsonrpc/Cargo.toml`. - Add `jsonrpc` to repository workspace.
Import the `rust-jsonrpc` crate from https://github.com/apoelstra/rust-jsonrpc using current tip of master `59646e6 Merge apoelstra/rust-jsonrpc#119: Use rust-bitcoin-maintainer-tools and re-write CI` Full commit hash: 59646e6e6ac95f07998133b1709e4a1fa2dbc7bd Do so using the following commands: mkdir jsonrpc mkdir jsonrpc/contrib rsync -avz ../../rust-jsonrpc/master/README.md jsonrpc rsync -avz ../../rust-jsonrpc/master/src jsonrpc rsync -avz ../../rust-jsonrpc/master/contrib/test_vars.sh jsonrpc/contrib Then: - Update `contrib/crates.sh` to include `jsonrpc`. - Remove workspaces from `jsonrpc/Cargo.toml`. - Add `jsonrpc` to repository workspace (and add patch section). Note, this PR does not bring over the `fuzz` directory, that will be done separately. Also we do not copy the integration testing because we get sufficient coverage from the current integration tests.
Import the `rust-jsonrpc` crate from https://github.com/apoelstra/rust-jsonrpc using current tip of master `59646e6 Merge apoelstra/rust-jsonrpc#119: Use rust-bitcoin-maintainer-tools and re-write CI` Full commit hash: 59646e6e6ac95f07998133b1709e4a1fa2dbc7bd Do so using the following commands: mkdir jsonrpc mkdir jsonrpc/contrib rsync -avz ../../rust-jsonrpc/master/README.md jsonrpc rsync -avz ../../rust-jsonrpc/master/src jsonrpc rsync -avz ../../rust-jsonrpc/master/contrib/test_vars.sh jsonrpc/contrib Then: - Update `contrib/crates.sh` to include `jsonrpc`. - Remove workspaces from `jsonrpc/Cargo.toml`. - Add `jsonrpc` to repository workspace (and add patch section). Note, this PR does not bring over the `fuzz` directory, that will be done separately. Also we do not copy the integration testing because we get sufficient coverage from the current integration tests.
Import the `rust-jsonrpc` crate from https://github.com/apoelstra/rust-jsonrpc using current tip of master `59646e6 Merge apoelstra/rust-jsonrpc#119: Use rust-bitcoin-maintainer-tools and re-write CI` Full commit hash: 59646e6e6ac95f07998133b1709e4a1fa2dbc7bd Do so using the following commands: mkdir jsonrpc mkdir jsonrpc/contrib rsync -avz ../../rust-jsonrpc/master/README.md jsonrpc rsync -avz ../../rust-jsonrpc/master/src jsonrpc rsync -avz ../../rust-jsonrpc/master/contrib/test_vars.sh jsonrpc/contrib Then: - Update `contrib/crates.sh` to include `jsonrpc`. - Remove workspaces from `jsonrpc/Cargo.toml`. - Add `jsonrpc` to repository workspace (and add patch section). Note, this PR does not bring over the `fuzz` directory, that will be done separately. Also we do not copy the integration testing because we get sufficient coverage from the current integration tests.
Import the fuzzing from `jsonrpc` source: https://github.com/apoelstra/rust-jsonrpc commit hash: `59646e6e6ac95f07998133b1709e4a1fa2dbc7bd` commit: `59646e6 Merge apoelstra/rust-jsonrpc#119: Use rust-bitcoin-maintainer-tools and re-write CI` Then I update the `generate-files.sh` script to mimic a recent one from `rust-bitcoin`. Add a README explaining how we got to the current state.
Import the fuzzing from `jsonrpc` source: https://github.com/apoelstra/rust-jsonrpc commit hash: `59646e6e6ac95f07998133b1709e4a1fa2dbc7bd` commit: `59646e6 Merge apoelstra/rust-jsonrpc#119: Use rust-bitcoin-maintainer-tools and re-write CI` Then I update the `generate-files.sh` script to mimic a recent one from `rust-bitcoin`. Add a README explaining how we got to the current state.
7238857 Add fuzzing for jsonrpc (Tobin C. Harding) 49b72c1 Import jsonrpc crate (Tobin C. Harding) 45addbd justfile: Add a docs build command (Tobin C. Harding) Pull request description: Import the `rust-jsonrpc` crate from https://github.com/apoelstra/rust-jsonrpc using current tip of master `59646e6 Merge apoelstra/rust-jsonrpc#119: Use rust-bitcoin-maintainer-tools and re-write CI` Full commit hash: 59646e6e6ac95f07998133b1709e4a1fa2dbc7bd Do so using the following commands: mkdir jsonrpc mkdir jsonrpc/contrib rsync -avz ../../rust-jsonrpc/master/README.md jsonrpc rsync -avz ../../rust-jsonrpc/master/src jsonrpc rsync -avz ../../rust-jsonrpc/master/contrib/test_vars.sh jsonrpc/contrib Then: - Update `contrib/crates.sh` to include `jsonrpc`. - Remove workspaces from `jsonrpc/Cargo.toml`. - Add `jsonrpc` to repository workspace. Finally import fuzzing, and fix up to mimic current `rust-bitcoin` setup. ACKs for top commit: apoelstra: ACK 7238857 successfully ran local tests Tree-SHA512: 309c214d50e78bcd67b49b8f68df91792100d95fda65a6ec700c422d28d64f41498e52f4eabeebcfae46685ee997ffb8c444180863d8f8003ed542a5ed80d174
As we have been doing in other crates, use the new maintainer tools test script we created from
rust-bitcoin/rust-bitcoin-maintainer-tools/ci
.