Bump MSRV to Rust version 1.56.1#2188
Conversation
Kixunil
left a comment
There was a problem hiding this comment.
While technically correct, it keeps MSRV_MINOR at 48 in build.rs. It might be nicer to bump it and remove #[cfg(rust_*)] for versions less than or equal to 1.56.
Further, this version stabilized the rust-version field in Cargo.toml and we should set it. It might reduce the burden of bumping the numbers in the future if we can pull them from that field. The release notes of Rust 1.56 specifically say "we encourage CI systems
that support Rust code to include a crate's specified minimum version in the test matrix for that crate by default." but I didn't check if our CI supports it.
I think doing these makes sense in this PR but wouldn't block it.
bitcoin/src/taproot.rs
Outdated
There was a problem hiding this comment.
Oh, yeah, IntoIterator in arrays! 🎉 🎉 🎉
c084746 to
e729589
Compare
|
Implemented suggestions and squashed it all into a single patch, re-wrote git log and PR description to match new patch. |
Kixunil
left a comment
There was a problem hiding this comment.
ACK e729589955bb2b39c5178f255fdd40c3b68b46ee
|
Oh, sorry man was working while you reviewed. I added a patch to update to edition 2021. |
Kixunil
left a comment
There was a problem hiding this comment.
ACK 4ab2c2889630a150bd02328623af2218a36d5aa5
|
Oh, I just notice you didn't set |
|
Not on purpose, just an omission on my part. Will add |
Kixunil
left a comment
There was a problem hiding this comment.
ACK 5afcc2b8d5cb6453eb680cc8b6f2cacc4667ede4
|
cc @TheBlueMatt @stevenroose I'll give you two a week to comment or veto this, or else I'll merge it on Wednesday Nov 22. |
apoelstra
left a comment
There was a problem hiding this comment.
ACK 5afcc2b8d5cb6453eb680cc8b6f2cacc4667ede4
|
Any chance we could delay this for a month or so? We're waiting on one user to confirm that our bump beyond 1.48 didn't break their platform due to the implied glibc bump that came with it. |
|
@TheBlueMatt yep, for sure. We're in no particular rush. |
|
Well it won't be released right now anyway so it shouldn't matter? Or is that user using our |
|
Right, my point was more that its possible it will break that users' platform, and in that case we'd be back to square one and would have to consider whether this makes sense or what approach we'd take to upgrade past 1.48. |
|
We've confirmed we're good to go. LDK will be bumping to 1.63 soon (lightningdevkit/rust-lightning#2681) so this can go ahead whenever. |
5afcc2b to
dda8765
Compare
|
Thanks man! Rebased. |
|
Might as well do it now then, since we don't have a major release planned til April. |
apoelstra
left a comment
There was a problem hiding this comment.
ACK dda8765827e6d8807f4cac8e5186a20348718d64
Rust version 1.56.0 introduced edition 2021. Shortly afterwards, on October 21 2021 Rust version 1.56.1 was released. Debian stable is currently shipping `rustc 1.63.0`. Our stated MSRV policy is: In Debian stable and at least 2 years old. Therefore our MSRV policy is met by Rust version 1.56.1 and we can strat to bump our MSRV org wide. Start by bumping the `rust-bitcoin` and `hashes` MSRV to Rust 1.56.1, includes: - Update docs. - Update CI and remove pinning. - Update the build files and remove now stale cfg attributes rust_v_1_x for values less than the new MSRV. - Use new `IntoIterator` for arrays so we no longer need to allocate a vector to iterate. Links: - https://blog.rust-lang.org/2021/11/01/Rust-1.56.1.html - https://blog.rust-lang.org/2021/10/21/Rust-1.56.0.html - https://packages.debian.org/stable/rust/rustc
We just bumped the MSRV to Rust 1.56.1 which includes edition 2021. Update all crates in this repo to use edition 2021 and build/lint warnings.
Add `rust-version = 1.56.1` to all crates in the workspace i.e., including `fuzz` but excluding the various test crates.
dda8765 to
4d5415f
Compare
|
Rebased, no other changes. |
apoelstra
left a comment
There was a problem hiding this comment.
ACK dda8765827e6d8807f4cac8e5186a20348718d64
| @@ -1,5 +1,6 @@ | |||
| [workspace] | |||
There was a problem hiding this comment.
We should be able to remove all use statements importing TryFrom and TryInto now. Fine to do in as separate PR.
There was a problem hiding this comment.
Unusualy, clippy told me about a few instances of TryInto but all of them. And none of the TryFrom. I opened some files to play with clippy and ended up just doing the patch to remove them all. Its on top.
Now that MSRV is Rust 1.56.1 we no longer need to explicitly import `TryFrom` and `TryInto`. No clue why clippy didn't find these for us.
| MSRV="1\.48\.0" | ||
|
|
||
| # Test pinned versions. | ||
| if cargo --version | grep ${MSRV}; then |
Rust version 1.56.0 introduced edition 2021. Shortly afterwards, on October 21 2021 Rust version 1.56.1 was released.
Debian stable is currently shipping
rustc 1.63.0. Our stated MSRV policy is: In Debian stable and at least 2 years old. Therefore our MSRV policy is met by Rust version 1.56.1 and we can strat to bump our MSRV org wide. Start by bumping therust-bitcoinandhashesMSRV to Rust 1.56.1Start by bumping the
rust-bitcoinandhashesMSRV to Rust 1.56.1, includes:IntoIteratorfor arrays so we no longer need to allocate a vector to iterate.Links: