Skip to content

fix(ledger): re-checkout app/rust/.cargo/config.toml after Rust cache restore#105

Merged
chcmedeiros merged 1 commit into
mainfrom
fix/cargo-config-cache-clobber
Jun 22, 2026
Merged

fix(ledger): re-checkout app/rust/.cargo/config.toml after Rust cache restore#105
chcmedeiros merged 1 commit into
mainfrom
fix/cargo-config-cache-clobber

Conversation

@chcmedeiros

Copy link
Copy Markdown
Collaborator

The Rust dependency cache in _ledger_main.yml stores ${cargo_home} =
app/rust/.cargo, which includes the tracked config.toml. actions/cache
restores it after actions/checkout, so a cache produced before the
nightly migration overwrites the checked-out config.toml with a
pre-migration copy that still sets build-std-features = ["panic_immediate_abort"].
nightly-2025-12-05 rejects that (it is now the immediate-abort panic
strategy, not a build-std feature), so build_ledger / build_package_*
fail with could not compile core.

This bit every app adopting the nightly/immediate-abort migration
(app-icp #54, app-avalanche #61, app-oasis #34): the change builds fine
locally and in zondax/ledger-app-builder:latest with a clean cargo, but
CI restored the poisoned cache over it.

Fix: after each Rust cache restore, re-checkout the committed
config.toml from HEAD so the in-repo config always wins. Works even
with the existing poisoned caches (no cache deletion needed) and is a
no-op for apps without a tracked app/rust/.cargo/config.toml.

Note: the moving v3 tag was already force-moved to this commit to
unblock the in-flight PRs; this PR lands the same fix on main so it is
not lost if v3 is recut.

… restore

The Rust dependency cache stores ${cargo_home} = app/rust/.cargo, which
includes the tracked config.toml. actions/cache restores it *after*
checkout, so a cache from before the nightly migration overwrites the
checked-out config.toml with a pre-migration copy that still sets
build-std-features = ["panic_immediate_abort"]. nightly-2025-12-05
rejects that (it is now the immediate-abort panic strategy, not a
build-std feature), so build_ledger/build_package fail to compile core.

Re-checkout the committed config.toml from HEAD right after each Rust
cache restore so the in-repo config always wins. Survives existing
poisoned caches without needing them deleted.
@chcmedeiros chcmedeiros merged commit c90c53d into main Jun 22, 2026
1 check passed
@chcmedeiros chcmedeiros deleted the fix/cargo-config-cache-clobber branch June 22, 2026 13:15
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