Skip to content

Commit d766fda

Browse files
committed
fix(ci): give the web build a heap ceiling and repair stale typecheck filters
The `apps/pythinker-web` vite build needs just over 2 GB of old space since the workspace file editor pulled Monaco into the production graph. macOS runners default to a ~2053 MB ceiling, so three jobs died with exit 134: Desktop Release's `mac` and Release's `darwin-x64` / `darwin-arm64` native bundles. Linux and Windows runners default higher and stayed green, which is why CI never caught it. Setting the ceiling in the package's own build script covers every consumer — CI, Nix, both release workflows and local builds — and stays portable, unlike a `NODE_OPTIONS=` prefix, which cmd.exe rejects on the Windows desktop job. Measured floor: 2048 MB fails, 2560 MB passes; the build peaks near 2.2 GB. Separately, `pnpm --filter <name>` exits 0 when nothing matches, so three typecheck gates had gone quietly dead: `@pymodel/dashboard-server` and `@pymodel/dashboard-web` matched nothing after the vis rename, and `pythinker-code` matched the CLI directory instead of the VS Code extension (`pythinker`), leaving the extension unchecked. Resolving each filter before running it turns a stale name back into a failure.
1 parent ae4211f commit d766fda

3 files changed

Lines changed: 20 additions & 12 deletions

File tree

.github/workflows/ci.yml

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -136,13 +136,21 @@ jobs:
136136
echo "Typechecking ${config}"
137137
pnpm dlx --package @typescript/native-preview@beta tsgo -p "${config}" --noEmit
138138
done
139-
- name: Typecheck VS Code extension
140-
run: pnpm --filter pythinker-code run typecheck
141-
- name: Typecheck pythinker-web (vue-tsc)
142-
run: pnpm --filter @pymodel/pythinker-web run typecheck
143-
- name: Typecheck dashboard-server
144-
run: pnpm --filter @pymodel/dashboard-server run typecheck
145-
- name: Typecheck dashboard-web
146-
run: pnpm --filter @pymodel/dashboard-web run typecheck
147-
- name: Typecheck desktop
148-
run: pnpm --filter @pymodel/pythinker-desktop run typecheck
139+
# `pnpm --filter <name>` exits 0 when nothing matches, so a renamed
140+
# package silently turns its gate into a no-op. Three of these filters
141+
# had already gone stale that way: `@pymodel/dashboard-server` and
142+
# `@pymodel/dashboard-web` matched nothing after the vis rename, and
143+
# `pythinker-code` matched the CLI directory instead of the VS Code
144+
# extension (`pythinker`), so the extension was never typechecked here.
145+
# Resolving each filter first turns a stale name back into a failure.
146+
- name: Typecheck workspace apps
147+
run: |
148+
set -euo pipefail
149+
for package in pythinker @pymodel/pythinker-web @pymodel/vis-server @pymodel/vis-web @pymodel/pythinker-desktop; do
150+
if [ -z "$(pnpm ls --filter "$package" --depth -1 --parseable)" ]; then
151+
echo "No workspace package matches the filter '${package}'" >&2
152+
exit 1
153+
fi
154+
echo "Typechecking ${package}"
155+
pnpm --filter "$package" run typecheck
156+
done
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"sourceHash": "dcb2227d96cf476915942656bc127bb1d7801258b01daa6995ee76e915ff199b",
2+
"sourceHash": "39adcc1ccb551ac03f06fe2152c6a69004701da14fd2535f8b26202cb9d27c14",
33
"sourceFileCount": 389
44
}

apps/pythinker-web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"type": "module",
77
"scripts": {
88
"dev": "vite",
9-
"build": "vite build",
9+
"build": "node --max-old-space-size=4096 ./node_modules/vite/bin/vite.js build",
1010
"typecheck": "vue-tsc --noEmit",
1111
"test": "vitest run",
1212
"check:style": "node scripts/check-style.mjs",

0 commit comments

Comments
 (0)