Skip to content

Pin blake3 to 1.8.2 in anchor test Cargo.lock to avoid edition2024 build failure#1004

Merged
lorisleiva merged 1 commit into
mainfrom
pin-blake3-1.8.2-to-fix-edition2024-build
Jun 2, 2026
Merged

Pin blake3 to 1.8.2 in anchor test Cargo.lock to avoid edition2024 build failure#1004
lorisleiva merged 1 commit into
mainfrom
pin-blake3-1.8.2-to-fix-edition2024-build

Conversation

@lorisleiva

Copy link
Copy Markdown
Member

This PR fixes the @codama/dynamic-client#test build failure that started hitting main after PR #994 was merged.

Root cause (revised)

The failing CI run:

@codama/dynamic-client:test: error: failed to parse manifest at `.../blake3-1.8.3/Cargo.toml`
Caused by:
  feature `edition2024` is required
  The package requires the Cargo feature called `edition2024`, but that feature
  is not stabilized in this version of Cargo (1.84.0 (12fe57a9d 2025-04-07)).

blake3 1.8.3 was published recently and switched its manifest to Rust edition 2024 (stabilized in 1.85). anchor build (invoked by dynamic-client's test:setup) shells out to cargo-build-sbf, which uses the Anchor 0.32.1 / Solana platform-tools bundled Cargo at 1.84.0 — not the host Cargo (1.93.0) installed by the workflow's dtolnay/rust-toolchain step, and not anything controlled by the agave CLI release pinned via SOLANA_VERSION. The bundled Cargo can't parse blake3 1.8.3's manifest, so the build fails during dependency resolution, well before any SBF compilation begins.

The merge of #994 didn't cause the breakage; it just retriggered CI on a fresh runner that re-resolved blake3 to the new version. Any push around this time would have hit the same wall.

Earlier (no-op) attempt

An earlier attempt in this PR's history bumped SOLANA_VERSION from 3.1.8 to 3.1.14, on the theory that the agave CLI controls the bundled toolchain. It does not — the platform-tools Rust/Cargo are pinned by Anchor's installed SBF toolchain, independent of the agave CLI version. That bump has been reverted; this PR ships only the lockfile pin.

Fix

cargo update -p blake3 --precise 1.8.2 inside packages/dynamic-client/test/programs/anchor/. blake3 1.8.2 is the last edition-2021 release (verified via crates.io) and satisfies solana-blake3-hasher's ^1 requirement.

Three entries in Cargo.lock move:

  • blake3 1.8.3 → 1.8.2 (version + checksum + drops cpufeatures dep that 1.8.3 added).
  • constant_time_eq 0.4.2 → 0.3.1 (reconciled to match what blake3 1.8.2 wants).

No manifests change. The pin stays local to Cargo.lock; a future deliberate cargo update (unqualified) can move blake3 forward whenever the platform-tools bundled Cargo catches up to edition 2024. CI doesn't run blanket cargo update, so the lock stays put.

Verification

CI is the verification gate. Locally we don't have the Solana platform-tools toolchain to reproduce the anchor build invocation.

Marked draft so you can review before merging.

…ild failure

`blake3 1.8.3` switched its manifest to Rust edition 2024 (stabilized in 1.85). `anchor build` invokes `cargo-build-sbf`, which uses the Anchor 0.32.1 / Solana platform-tools bundled Cargo at 1.84.0 — that Cargo cannot parse the new manifest and the test step fails on `Cargo.toml` resolution, well before any SBF compilation begins. The agave CLI version (`SOLANA_VERSION`) does not control the platform-tools toolchain, so an earlier attempt at bumping it (3.1.8 → 3.1.14) was a no-op for this failure and has been reverted.

Pins `blake3` to `1.8.2` (the last edition-2021 release; same `^1` range, satisfies `solana-blake3-hasher`'s requirement) directly in `packages/dynamic-client/test/programs/anchor/Cargo.lock` via `cargo update -p blake3 --precise 1.8.2`. The resolver also reconciles `constant_time_eq` from 0.4.2 to 0.3.1 to match what blake3 1.8.2 wants and drops the `cpufeatures` dep blake3 1.8.3 added. No manifest changes — only the lockfile moves, so the pin doesn't follow into other workspaces and a future deliberate `cargo update` can move forward when the bundled toolchain has caught up.
@changeset-bot

changeset-bot Bot commented Jun 2, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: a691a47

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@lorisleiva lorisleiva marked this pull request as ready for review June 2, 2026 14:29
@lorisleiva lorisleiva merged commit 572d0fc into main Jun 2, 2026
4 checks passed
@lorisleiva lorisleiva deleted the pin-blake3-1.8.2-to-fix-edition2024-build branch June 2, 2026 14:29
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.

1 participant