From 713bcff2364ffe4e9f06bf30a345c4f7018060c0 Mon Sep 17 00:00:00 2001 From: Kiet Ho Date: Sun, 6 Sep 2026 18:52:24 -0700 Subject: [PATCH] fix(desktop): compile i18n catalogs before compile:app so release builds stop failing Every scheduled desktop canary since 09-04 has failed on all three platforms with: Could not resolve "../locales/en/messages" from "packages/i18n/src/index.ts" #7180 stopped committing the compiled Lingui catalogs and made them build artifacts, compiled by postinstall, the predev hooks, and turbo's build pipeline. It also gave the CLI a prebuild:dist hook because build-cli.yml installs with --ignore-scripts on Linux, which skips postinstall. build-desktop.yml has the same shape: `bun install --frozen --ignore-scripts` followed by a direct `bun run compile:app`, which goes through neither turbo nor predev. Nothing compiled the catalogs, so the renderer bundle failed to resolve them. The 09-04 canary that succeeded was the commit right before #7180; the first scheduled run at #7180 itself failed. release-desktop.yml shares the same reusable workflow, so the next versioned release would have failed too. Add a precompile:app hook that compiles the catalogs, mirroring the CLI's prebuild:dist. It covers canary, stable release, and the local `bun run build` path, whose prebuild chain also calls compile:app. Verified by deleting packages/i18n/locales/*/messages.ts and running CI's sequence (clean:dev, generate:icons, compile:app): the hook regenerated all 17 catalogs and the build completed. Claude-Session: https://claude.ai/code/session_018J3Doxr611zyon6Ctm32BW --- apps/desktop/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/desktop/package.json b/apps/desktop/package.json index fe36b465e42..9037fa24098 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -20,6 +20,7 @@ "bundle:cli": "bun run scripts/build-bundled-cli.ts", "predev": "bun run --filter=@superset/i18n build && cross-env NODE_ENV=development bun run clean:dev && bun run generate:icons && bun run bundle:cli && cross-env NODE_ENV=development bun run scripts/clean-launch-services.ts && cross-env NODE_ENV=development bun run scripts/patch-dev-protocol.ts", "dev": "bun scripts/dev.ts", + "precompile:app": "bun run --filter=@superset/i18n build", "compile:app": "cross-env NODE_OPTIONS=--max-old-space-size=8192 electron-vite build && bun run bundle:cli && bun run scripts/check-pty-daemon-bundle.ts", "check:pty-daemon-bundle": "bun run scripts/check-pty-daemon-bundle.ts", "profile:terminal-flood": "bun run scripts/cdp-terminal-flood-profile.ts",