Test with minimal dependency versions#1764
Conversation
561d424 to
cff6c38
Compare
6c61e10 Fix pinning (schemars and MSRV) (Tobin C. Harding) c8e38d6 hashes: Implement JsonSchema for sha256t::Hash<T> (Tobin C. Harding) Pull request description: This has grown due to now including pinning work also done in #1736, I decided to do this because the PRs conflict and doing it all here saves accidentally getting out of sync. And #1764 requires this PR. - Patch 1 is unchanged - Patch 2 now fixes pinning in bitcoin and hashes CI scripts and in the docs of both as well as the manifest stuff relating to `schemars` - phew. Fix: #1687 ACKs for top commit: Kixunil: ACK 6c61e10 apoelstra: ACK 6c61e10 Tree-SHA512: eae4aa9700817bab6ad444e07709e8b1a4ffb1625e08be6ba399abde38bf6f8e5ea216a0836e2e26dfaddc76c392802cd016738ea6e753a1bca2584d9d2a9796
d3399e0 to
5a6332d
Compare
apoelstra
left a comment
There was a problem hiding this comment.
ACK 5a6332d5dfd4733dd0390e26de88d81c69772e99
|
In my local scripts, I have a comment that says " |
|
I don't understand why this is showing up in this PR? If we cannot build "no-std" with 1.48 why is CI ok for current master? |
|
I think this is caused by old |
|
Neat. Apparently core2 0.3.2 works. I guess we need to set our minimal version to that. |
5a6332d to
c129eb6
Compare
|
Changes in force push
|
|
This is blocking |
apoelstra
left a comment
There was a problem hiding this comment.
ACK c129eb6d0016ddf110c9ed72300eee53a7ca769d
|
I haven't followed the details of this MR, but would it be hard to have support for this in the github CI matrix thing? So specify different versions to test for certain deps and then use I'm asking because in dependent crates it'd be nice to have easy access to ways to support multiple rust-bitcoin versions as well. Ofc this would be a great tool for the rust ecosystem as a whole, but as we know I don't think many other projects care enough about msrv and dep mgmt that this kind of thing would already exist in the CI tooling. |
contrib/test.sh
Outdated
There was a problem hiding this comment.
Is this like a format that GitHub CI will pick up and somehow make visible?
There was a problem hiding this comment.
This is some github syntax that gives color in their logs, @Kixunil found it but I didn't look up the docs when he told me about it.
There was a problem hiding this comment.
IIRC it's visible when you open the lock file from the PR. It was long time since I looked into it.
stevenroose
left a comment
There was a problem hiding this comment.
utACK e6dc6f48da7e79a3c2a188ad69ef8a9d8d799ad7
|
Would like an ack from @Kixunil as well since this is based on his work. @stevenroose yeah, I think this would be generally useful. This PR does introduce CI support for this (in contrib/test.sh) though in a little bit of a hacky way. I think we should merge this and then see what kind of problems we run into before cleaning it up and maybe trying to do a more general thing. I am curious what kind of support you'd like for downstream crates....I guess, ideally your downstream projects could "merge" these lockfiles from rust-bitcoin into their own. I'm not sure if there's any tool that can do that. |
Kixunil
left a comment
There was a problem hiding this comment.
Looks reasonable, will wait until rebase with proper review. Unfortunately despite having more time I find it harder to get myself into reviewing large PRs. (Yes Tobin, it could be WOE-related, still debugging.)
contrib/test.sh
Outdated
There was a problem hiding this comment.
IIRC it's visible when you open the lock file from the PR. It was long time since I looked into it.
What does WOE mean, Way Of Eating? |
`core2` versions 0.3.0 and 0.3.1 do not work with Rust 1.48.0, set minimum version to 0.3.2 in the `bitcoin` manifest.
c129eb6 to
485dcc5
Compare
|
I couldn't get a minimal honggfuzz dep because where ever I put |
Probably, but I'm not sure if we need to test with minimal dev dependencies. |
|
@tcharding I have had no problem with a minimal version of 0.5.55. |
|
Note that #1821 actually changes |
Yep, sweet. I think you are right, we can merge these in any order. |
Kixunil
left a comment
There was a problem hiding this comment.
Looks like there's a bug, the rest should be fine.
contrib/test.sh
Outdated
There was a problem hiding this comment.
face palm, thanks man. I added DEPS="recent minimal", and put quotes around $dep everywhere as suggested by shellcheck.
It could happen that we unknowingly depend on a new version of a crate without updating `Cargo.toml`. This could cause resolution issues for downstream users. It's also unclear for outsiders to see which dependencies we tested the crate with. This change commits two lock files: `minimal` and `recent`. `minimal` contains minimal depdendency versions, while `recent` contains dependency versions at the time of making the change. Further, this adds CI jobs to test with both lock files, CI job for `internals` crate, removes old `serde` pinning and prints a warning if `recent` is no longer up to date. (We may have to override it somehow if any crate breaks MSRV.) The documentation is also updated accordingly. Co-developed-by: Tobin C. Harding <me@tobin.cc> Closes rust-bitcoin#1230
485dcc5 to
c4c64c0
Compare
This replaces manual pins in the README and CI workflow. Close #337 based on rust-bitcoin/rust-bitcoin#1764
This replaces manual pins in the README and CI workflow. Close #337 based on rust-bitcoin/rust-bitcoin#1764
This is work originally done by Kixunil in #1272, I picked it up to help out. The only changes I made were rebasingg, updating the recent lock file, adding
--lockedto hashes contrib file, and adding a co-developed-by tag for accountability.It could happen that we unknowingly depend on a new version of a crate without updating
Cargo.toml. This could cause resolution issues for downstream users. It's also unclear for outsiders to know with which dependencies did we test the crate.This change commits two lock files:
minimalandrecent.minimalcontains minimal dependency versions, whilerecentcontains dependency versions at the time of making the change.Further, this adds CI jobs to test with both lock files, CI job for
internalscrate, removes oldserdepinning and prints a warning ifrecentis no longer up to date. (We may have to override it somehow if any crate breaks MSRV.)The documentation is also updated accordingly.
Closes #1230