bdk icon indicating copy to clipboard operation
bdk copied to clipboard

Document MSRV policy and change MSRV to 1.49.0

Open notmandatory opened this issue 3 years ago • 12 comments

Description

Set MSRV policy to be at most Debian "testing" release version of rustc. Update build-test CI job matrix to use the current latest stable version and MSRV ~~1.56.0~~ 1.49.0.

Fixes #331 Fixes #496

Notes to the reviewers

Fixes CI error caused by tokio MSRV changing to 1.49.0, see #522.

I also changed from a fixed stable version (was 1.56.0) to the latest stable because we haven't been updating it manually and this will ensure we're always testing against current stable rust.

Checklists

All Submissions:

  • [x] I've signed all my commits
  • [x] I followed the contribution guidelines
  • [x] I ran cargo fmt and cargo clippy before committing

notmandatory avatar Feb 17 '22 04:02 notmandatory

Prior to merging I also need to change the required github checks to ~~1.56.0~~ 1.49.0 and stable.

notmandatory avatar Feb 17 '22 06:02 notmandatory

I would avoid bumping the MSRV unless we get stuck or have issues somewhere. Maybe our policy could be "at most" debian testing, meaning that we will never go above, but we'll still try to support older versions if we can

afilini avatar Feb 17 '22 14:02 afilini

I should have linked to the PR that triggered this PR: https://github.com/bitcoindevkit/bdk/pull/522#issuecomment-1042393238

Maybe we don't need to bump the MSRV all the way to 1.56.0, I'll see if we can get away with rust 1.48.0

notmandatory avatar Feb 17 '22 16:02 notmandatory

Looks like the tokio MSRV is now 1.49.0.

notmandatory avatar Feb 17 '22 17:02 notmandatory

As mentioned by @moneyball on Discord, the LDK team pinned their tokio version to ~1.14 instead of increasing their MSRV, see https://github.com/lightningdevkit/rust-lightning/pull/1315. I believe one downside of this approach is we won't be getting new tokio fixes or features unless that team plans to back port them to 1.14.x releases.

notmandatory avatar Feb 17 '22 19:02 notmandatory

Note that tokio does backport fixes, so I'm not sure how much of a concern it is in practice. As for MSRV of 1.49, that seems exceedingly recent - notably most linux distros still ship 1.41 (and rustup is rather unacceptable for anything security-conscious, like Bitcoin).

TheBlueMatt avatar Feb 17 '22 19:02 TheBlueMatt

@TheBlueMatt, good points. I created https://github.com/bitcoindevkit/bdk/pull/550 as a fix to get our CI working and then we can take our time to decide about any MSRV changes.

notmandatory avatar Feb 17 '22 20:02 notmandatory

I like and support this change. We recently upgraded all our other stuff to tokio 1.17 and it worked well with bdk up to 0.16. Now I tried upgrading bdk to 0.17 and got conflicts. With this change in place, we could upgrade to a newer bdk, without having to downgrade tokio.

ulrichard avatar Apr 01 '22 07:04 ulrichard

Another transitive dependency, http, has now updated their MSRV to 1.49, see #595.

notmandatory avatar Apr 29 '22 19:04 notmandatory

Note that even if a dep updates their MSRV you can keep the looser bound on the MSRV and users can pin-back with something like cargo update -p tokio --precise "1.14.1", which works to make the ldk-sample build with 1.41 even though by default it will try to build with a newer tokio.

TheBlueMatt avatar Apr 29 '22 19:04 TheBlueMatt

Note that even if a dep updates their MSRV you can keep the looser bound on the MSRV and users can pin-back with something like cargo update -p tokio --precise "1.14.1", which works to make the ldk-sample build with 1.41 even though by default it will try to build with a newer tokio.

That does seem like a clean way to do it, but if we used this approach would I also need to add that command to my CI pipeline matrix for testing with 1.46? If so I think it's easier to pin it in the Cargo.toml for now.

notmandatory avatar Apr 29 '22 19:04 notmandatory

Yes, you'd have to do that in CI as well. I suppose it'd be one thing if it were a truly ancient rustc, but 1.41 is still the version shipped on many distros, so its kinda hard to demand that for every user :/

TheBlueMatt avatar Apr 29 '22 19:04 TheBlueMatt

Hey, we are in the process of releasing BDK 1.0, which will under the hood work quite differently from the current BDK. For this reason, I'm closing all the PRs that don't really apply anymore. If you think this is a mistake, feel free to rebase on master and re-open!

danielabrozzoni avatar Mar 16 '23 17:03 danielabrozzoni