Skip to content

Resolve dart wrapper deps with MSRV awareness - #1868

Closed
chavic wants to merge 1 commit into
payjoin:masterfrom
chavic:chavic/dart-msrv-resolver
Closed

Resolve dart wrapper deps with MSRV awareness#1868
chavic wants to merge 1 commit into
payjoin:masterfrom
chavic:chavic/dart-msrv-resolver

Conversation

@chavic

@chavic chavic commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

Dart CI has failed on every branch since 2026-09-07 (last green run 2026-09-03): encoding_rs 0.8.40 was published with rust-version = 1.88, and the dart wrapper build hits it because it is the one build in CI that intentionally resolves dependencies fresh — dart/contrib/test.sh deletes native/Cargo.lock to mirror pub.dev consumers, whose native-assets hook builds the crate with no lockfile. The wrapper crate had no rust-version and the old resolver, so cargo picked 0.8.40 and hard-failed against the pinned 1.85.1 toolchain:

error: rustc 1.85.0 is not supported by the following packages:
  encoding_rs@0.8.40 requires rustc 1.88

This also means pub.dev installs on rustc < 1.88 are failing the same way right now, not just CI.

Fix: declare rust-version = "1.85" and use resolver v3 in native/Cargo.toml (the root workspace already uses v3), making the fresh resolution MSRV-aware so cargo falls back instead of failing:

Adding encoding_rs v0.8.35 (available: v0.8.40, requires Rust 1.88)

This addresses the failure class generically — the next transitive dependency to raise its MSRV in a patch release gets the same fallback — rather than pinning encoding_rs one-off. Complementary to #1815, which commits a lockfile for reproducible in-repo builds: consumers building through the pub.dev hook still benefit from MSRV-aware resolution. Same disease #1797 treated in the ubrn build.

Verified locally that resolution now selects 0.8.35; the dart CI jobs on this PR are the end-to-end check.

Disclosure: co-authored by Claude Fable

🤖 Generated with Claude Code

https://claude.ai/code/session_017MzBuv1zoMURfNEKKDka8d

The dart native-assets build resolves dependencies fresh on every
run: no lockfile ships to pub.dev consumers and contrib/test.sh
deletes native/Cargo.lock to match. With the old resolver a
transitive dependency that raises its MSRV in a patch release
breaks the build outright, as encoding_rs 0.8.40 (requires rustc
1.88) did on 2026-09-07 against the pinned 1.85.1 toolchain,
failing dart CI on every branch and pub.dev installs alike.

Declare rust-version and switch the wrapper workspace to resolver
v3 (as the root workspace already does) so cargo falls back to
MSRV-compatible versions instead:

    Adding encoding_rs v0.8.35 (available: v0.8.40, requires Rust 1.88)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017MzBuv1zoMURfNEKKDka8d

@DanGould DanGould left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove claude co-authorship please because we can't hold claude accountable

Comment on lines +2 to 7
# MSRV-aware dependency resolution: this build resolves fresh (no lockfile
# ships to pub.dev consumers), so prefer dependency versions compatible
# with rust-version instead of failing when a transitive dependency raises
# its MSRV in a patch release.
resolver = "3"

@DanGould DanGould Sep 8, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment w/ rationale in commit pls rather than here

@coveralls

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 34254017169

Coverage remained the same at 86.64%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 16474
Covered Lines: 14273
Line Coverage: 86.64%
Coverage Strength: 342.94 hits per line

💛 - Coveralls

@benalleng

Copy link
Copy Markdown
Collaborator

I actually already added the same changes in #1863. @chavic when you get a chance we can approve and merge that

@benalleng

Copy link
Copy Markdown
Collaborator

Closed as fixed in #1863

@benalleng benalleng closed this Sep 8, 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.

4 participants