Retry extension Cargo dependency fetch The extension workflows build Pyrefly before packaging or testing the VS Code extension. A branch run hit a transient crates.io connection reset inside the actions-rust-cross cargo build step while fetching serde, which bypassed the retry wrapper because the fetch happened inside the third-party build action. Fetch the Pyrefly Cargo dependencies explicitly through the local retry-command action before either the cross-compile action or native cargo build runs. For cross targets, include the matrix target in cargo fetch so target-specific dependencies are covered. This keeps the existing Rust cache useful on warm runs and gives cold or invalidated caches retry coverage before the expensive build step.
diff --git a/.github/workflows/build_extension.yml b/.github/workflows/build_extension.yml index 13d4c9d..99f7b30 100644 --- a/.github/workflows/build_extension.yml +++ b/.github/workflows/build_extension.yml
@@ -126,6 +126,17 @@ - name: set jemalloc page size for ARM64 macOS if: ${{ matrix.arch == 'arm64' && matrix.platform == 'darwin' }} run: echo "JEMALLOC_SYS_WITH_LG_PAGE=14" >> ${{ matrix.github_env }} + - name: Fetch Cargo dependencies + uses: ./.github/actions/retry-command + env: + RUST_TARGET: ${{ matrix.rust_target }} + with: + command: | + if [ -n "$RUST_TARGET" ]; then + cargo fetch --locked --manifest-path pyrefly/Cargo.toml --target "$RUST_TARGET" + else + cargo fetch --locked --manifest-path pyrefly/Cargo.toml + fi - name: build pyrefly binary (cross-compile) if: ${{ matrix.rust_target != '' }} uses: houseabsolute/actions-rust-cross@v1