From 6cdb8b1bd47222184f40e7a2963745a1b87c4e7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Garillot?= Date: Sun, 4 Jan 2026 14:49:47 -0500 Subject: [PATCH] ci: clear cargo registry cache before workspace publish dry-run The workspace publish dry-run fails with `unresolved import miden_utils_sync::OnceLockCompat` during verification. This happens because cached registry data from previous CI runs can interfere with cargo's temp registry used for workspace dependency resolution. During verification, cargo should use the packaged v0.21.0 from the temp registry, but stale cache entries may cause it to resolve against crates.io data instead (where v0.20.1 lacks OnceLockCompat). Clear ~/.cargo/registry/{cache,index,src} before the dry-run to ensure fresh resolution without interference from cached data. Closes #2505 --- .github/actions/workspace-release/action.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/actions/workspace-release/action.yml b/.github/actions/workspace-release/action.yml index 35615ea7d5..354ae3e29e 100644 --- a/.github/actions/workspace-release/action.yml +++ b/.github/actions/workspace-release/action.yml @@ -66,6 +66,21 @@ runs: echo "Cleaning target/package directory to ensure fresh state" rm -rf target/package + # Clear cargo registry to ensure fresh resolution during verification. + # This prevents issues where cached metadata from previous runs + # might interfere with workspace dependency feature resolution + # during the verification step (related to cargo#14283, cargo#14789). + # Specifically, this ensures the temp registry used during workspace + # publish verification doesn't conflict with cached crates.io data. + - name: Clear cargo registry for fresh resolution + if: ${{ inputs.mode == 'dry-run' }} + shell: bash + run: | + echo "Clearing cargo registry for fresh resolution" + rm -rf ~/.cargo/registry/cache + rm -rf ~/.cargo/registry/index + rm -rf ~/.cargo/registry/src + # Dry-run vs real publish - name: Dry-run workspace publish if: ${{ inputs.mode == 'dry-run' }}