Skip to content

Commit 96567b6

Browse files
committed
fix(ci): work around rolldown@1.0.1 binding tokio panic
The npm-published rolldown@1.0.1 binding enables the mimalloc v3 feature (`crates/rolldown_binding/Cargo.toml` rolldown#9349), which panics with `[internal exception] blocking task ran twice` in tokio when tsdown drives rolldown through vp pack on darwin-arm64. The result is that vp pack exits silently after "Build start", which breaks every CLI snap test that bundles via vp pack (command-pack, command-pack-exe, command-pack-external, command-pack-monorepo, vp-cache-monorepo-missing, vp-pack-cache-disabled). Force the binding download to use rolldown@1.0.0 while keeping the 1.0.1 JS sources (and the pluginutils relocation that depends on them). The 1.0.0 binding is ABI-compatible with the surface vite-plus exercises through tsdown/rolldown. Revert once an upstream rolldown release ships without mimalloc v3 or fixes the panic. The command-staged-broken-config snap.txt also rolls back to its pre-PR form because the diagnostic prefix comes from the binding's bundled oxc — `Error: Unexpected token` (1.0.0/oxc 0.128) vs. `Unexpected token` (1.0.1/oxc 0.130).
1 parent 8976c24 commit 96567b6

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

  • .github/actions/download-rolldown-binaries
  • packages/cli/snap-tests-global/command-staged-broken-config

.github/actions/download-rolldown-binaries/action.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,15 @@ runs:
4242
export VERSION=$(npm view --json rolldown | jq -r '.version')
4343
echo "Warning: rolldown source not found, using npm latest: ${VERSION}"
4444
fi
45+
# Workaround: the published rolldown@1.0.1 binding enables mimalloc v3,
46+
# which panics with "blocking task ran twice" (tokio) when tsdown drives
47+
# rolldown via vp pack. Downgrade the binding to 1.0.1's predecessor
48+
# until rolldown ships a fix. The 1.0.0 binding is ABI-compatible with
49+
# the 1.0.1 JS sources for the surface vite-plus uses.
50+
if [ "${VERSION}" = "1.0.1" ]; then
51+
echo "Workaround: forcing binding version 1.0.0 (see download-rolldown-binaries comment)"
52+
export VERSION="1.0.0"
53+
fi
4554
npm pack "@rolldown/binding-${TARGET}@${VERSION}"
4655
tar -xzf "rolldown-binding-${TARGET}-${VERSION}.tgz"
4756
if [ -d "./rolldown/packages/rolldown/src" ]; then

packages/cli/snap-tests-global/command-staged-broken-config/snap.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
failed to load config from <cwd>/vite.config.ts
44
Failed to load vite.config: Build failed with 1 error:
55

6-
[PARSE_ERROR] Unexpected token
6+
[PARSE_ERROR] Error: Unexpected token
77
╭─[ vite.config.ts:5:42 ]
88
99
5 │ // syntax error: missing closing brace

0 commit comments

Comments
 (0)