Skip to content

fix: honor the declared Rust 1.63 MSRV - #71

Open
kkdao wants to merge 2 commits into
bitcoindevkit:masterfrom
kkdao:fix/msrv-core-error
Open

fix: honor the declared Rust 1.63 MSRV#71
kkdao wants to merge 2 commits into
bitcoindevkit:masterfrom
kkdao:fix/msrv-core-error

Conversation

@kkdao

@kkdao kkdao commented Aug 21, 2026

Copy link
Copy Markdown

Description

Fixes #69

bdk_sp declares rust-version = "1.63" but implements core::error::Error, which needs 1.81, so the crate fails to build on its own MSRV with six E0433 errors. No CI job pinned it.

Switches those six to std::error::Error and adds a CI job that checks 1.63.

Notes to the reviewers

The crate isn't no_std and already links std, and receive::error and send::error use std::error::Error already, so this matches what's there rather than adding a convention.

Checked on pinned toolchains with the committed lockfile: 1.63 fails before, builds after, 1.81 builds either way. I confirmed the library actually builds on 1.63 rather than just that the six errors went away.

The job can't run from the workspace root — Cargo 1.63 can't parse it. [profile.mutants] uses the string form of debug, and five members inherit authors from [workspace.package], which needs Cargo 1.64. Since bdk_sp is the only crate declaring an MSRV, the job packages it and checks it in isolation, which is also what consumers get from crates.io. Library only; dev-dependencies aren't held to the MSRV.

Happy to raise rust-version to 1.81 instead if you'd rather — only the pinned version would change.

Changelog notice

Fixed: bdk_sp did not build on its declared MSRV of Rust 1.63, because encoding::error used core::error::Error.

Checklists

All Submissions:

Bugfixes:

  • This pull request breaks the existing API
  • I've added tests to reproduce the issue which are now passing
  • I'm linking the issue being fixed by this PR

kkdao added 2 commits August 21, 2026 17:35
`bdk_sp` declares `rust-version = "1.63"`, but `encoding::error` implements
`core::error::Error`, which was only stabilized in Rust 1.81. Building the
published crate on 1.63 fails with six E0433 "could not find `error` in `core`"
errors, so the declared MSRV is not met.

The crate is not `no_std` and already links `std`, and the other error modules
(`receive::error`, `send::error`) implement `std::error::Error` already. Using
`std::error::Error` here matches them and restores a 1.63 build.
CONTRIBUTING.md claimed the 1.63 MSRV was enforced by CI, but no job pinned it:
`rust.yml` only tested stable and coverage runs on nightly. That is how the
`core::error::Error` regression reached a release.

Cargo 1.63 cannot parse the workspace root, so the check cannot simply run from
it. `profile.mutants` uses the string form of `debug`, and sibling members
inherit `authors` from `[workspace.package]`, which Cargo stabilized in 1.64.
Since `bdk_sp` is the only crate declaring an MSRV, package it with a current
Cargo and check the result in isolation. That is also the shape consumers get
from crates.io, so it tests what they actually build.

The check covers the library only; dev-dependencies are not held to the MSRV.
@kkdao
kkdao force-pushed the fix/msrv-core-error branch from 8d9765f to a8523ae Compare August 21, 2026 21:36
@kkdao
kkdao marked this pull request as draft August 21, 2026 21:48
@kkdao
kkdao marked this pull request as ready for review August 21, 2026 21:56
@kkdao kkdao changed the title fix: honour the declared Rust 1.63 MSRV fix: honor the declared Rust 1.63 MSRV Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bdk_sp 0.2.0 does not satisfy its declared Rust 1.63 MSRV

1 participant