chore(ci): replace pin-msrv.sh with cargo-rbmt and committed lockfiles - #494
chore(ci): replace pin-msrv.sh with cargo-rbmt and committed lockfiles#494EliteCoder18 wants to merge 3 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #494 +/- ##
==========================================
+ Coverage 80.93% 80.96% +0.02%
==========================================
Files 24 24
Lines 5482 5489 +7
Branches 247 247
==========================================
+ Hits 4437 4444 +7
Misses 968 968
Partials 77 77
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
ea9ef2a to
5789c83
Compare
…-std c7adcfd fix(manifest): correct serde feature configuration for no-std (Rishit Modi) Pull request description: ### Description This PR fixes a bug where the optional serde dependency implicitly leaks the standard library into no-std builds. Previously, serde was missing `default-features = false` in the `[dependencies]` block. When downstream crates attempted to compile miniscript for bare-metal targets (e.g., thumbv7m-none-eabi) using minimal-version dependency resolution, Cargo would resolve serde with its default "std" feature enabled, causing immediate compilation failures. ### Notes to the reviewers I encountered this feature leakage while working on integrating cargo-rbmt CI checks over in bdk_wallet (specifically in this PR: bitcoindevkit/bdk_wallet#494). When the rbmt matrix runs its minimal dependency sweep on no-std bare-metal targets, it exposes this missing feature configuration. Applying this fix locally allowed the embedded target compilation to pass cleanly. ### Changelog notice - Added default-features = false to the optional serde dependency. - Explicitly opted into the alloc feature for serde. - Updated the std feature array to use the weak dependency activation syntax (`"serde?/std"`) ACKs for top commit: trevarj: Nice find. ACK c7adcfd apoelstra: ACK c7adcfd; successfully ran local tests Tree-SHA512: 33c2993856cfa70cba83f4b0f95b5bd9df04d6a50db3485d13ec18ea4d7c9f613f50ad86e6b53f1ad9cf7642165cd67d736a3e81f8f9b480084bb38a67ad728d
|
The The relevant fixes are rust-miniscript#987 and bdk#2227. Once both changes are released, bdk_wallet can update to those released versions, regenerate the rbmt lockfiles, and rerun the full CI matrix. After that, this PR should be ready for review and merge. |
Description
Closes #400
Closes #79
Part of #410
Replaces the fragile
ci/pin-msrv.shdependency-pinning script with a two-lockfile strategy usingcargo-rbmtthe same tooling used by therust-bitcoinproject. This implements the approachProblem
ci/pin-msrv.shpinned specific transitive dependency versions viacargo update --preciseat build time. This was brittle: every time a dependency chain changed, someone had to manually discover which packages needed pinning and update the script by hand. It also couldn't be replicated locally without running the same script in the same order.Solution
Two versioned lockfiles are now committed to the repository:
Cargo-minimal.lock:- Minimal compatible versions used for the MSRV buildCargo-recent.lock:- Recent/latest compatible versions used for the stable buildCI copies the appropriate lockfile to
Cargo.lockbefore building and passes--lockedtocargo build/cargo test, giving fully reproducible builds that contributors can replicate locally.A new
check-lockfilesCI job runscargo rbmt lockand fails if the committed lockfiles drift from whatcargo-rbmtwould generate, so staleness is caught automatically on every PR.Files changed
Cargo-minimal.lock&&Cargo-recent.lock: committed lockfiles generated bycargo rbmt lockci/install-rbmt.sh: installscargo-rbmtat the version pinned inrbmt-versionrbmt-version: pinscargo-rbmtat0.3.0for auditable, cached installsCargo.toml: adds[package.metadata.rbmt.*]config with toolchain versions and feature exclusions for no-std; fixesbdk_chain(hashbrown) andminiscript(no-std) feature flags for no-std targets; pins dev-dependency versions for lock stability.github/workflows/cont_integration.yml: replacespin-msrv.shstep with lockfile copy and--locked; addscheck-lockfilesjobCONTRIBUTING.md: documents how to regenerate lockfiles whenCargo.tomlchangesci/pin-msrv.sh: deletedNotes to the reviewers
[package.metadata.rbmt.test].exclude_featureslist inCargo.tomltellscargo-rbmtwhich features to skip in its matrix — needed to avoid pullingstd-only crates (anyhow,bdk_file_store, etc.) into no-std feature combos.nightlytoolchain entry under[package.metadata.rbmt.toolchains]is required bycargo-rbmt's.rust-bitcoinmanages their MSRV CI see theirCargo-minimal.lockfor reference.Cargo.tomlchange:Changelog notice
Cargo-minimal.lockandCargo-recent.locklockfiles; fix no-std feature flags forbdk_chain(hashbrown) andminiscript(no-std)ci/pin-msrv.shwithcargo-rbmt; copy lockfile before build and add--locked; addcheck-lockfilesjob to detect stale lockfiles on every PRCONTRIBUTING.mdandREADME.mdChecklists
All Submissions:
just pbefore pushingNew Features: