Pin blake3 to 1.8.2 in anchor test Cargo.lock to avoid edition2024 build failure#1004
Merged
Merged
Conversation
…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.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes the
@codama/dynamic-client#testbuild failure that started hittingmainafter PR #994 was merged.Root cause (revised)
The failing CI run:
blake3 1.8.3was published recently and switched its manifest to Rust edition 2024 (stabilized in 1.85).anchor build(invoked bydynamic-client'stest:setup) shells out tocargo-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'sdtolnay/rust-toolchainstep, and not anything controlled by the agave CLI release pinned viaSOLANA_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
blake3to 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_VERSIONfrom 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.2insidepackages/dynamic-client/test/programs/anchor/.blake3 1.8.2is the last edition-2021 release (verified via crates.io) and satisfiessolana-blake3-hasher's^1requirement.Three entries in
Cargo.lockmove:blake3 1.8.3 → 1.8.2(version + checksum + dropscpufeaturesdep that 1.8.3 added).constant_time_eq 0.4.2 → 0.3.1(reconciled to match whatblake3 1.8.2wants).No manifests change. The pin stays local to
Cargo.lock; a future deliberatecargo update(unqualified) can move blake3 forward whenever the platform-tools bundled Cargo catches up to edition 2024. CI doesn't run blanketcargo 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 buildinvocation.Marked draft so you can review before merging.