Summary#
- keep optional dependencies when installing staged desktop production dependencies
- add regression coverage for the staged desktop install arguments
Root cause#
Windows nightly desktop builds crash-loop because @ff-labs/fff-node depends on ffi-rs, and ffi-rs loads its platform binary from optional dependencies.
The desktop artifact builder used vp install --prod --no-optional, so the packaged app omitted @yuuang/ffi-rs-win32-x64-msvc. The backend then failed before readiness, so the Electron window never opened.
Impact#
Windows desktop packages can include runtime-required platform optional dependencies such as ffi-rs native packages.
Closes #3104
Validation#
vp test run scripts/build-desktop-artifact.test.ts
vp check
vp run typecheck
vp check reports existing unrelated lint warnings and no errors. I also installed a local Docker Wine image (t3code-electron-builder-wine:local) and successfully ran vp run dist:desktop:win:x64 -- --keep-stage inside it; the build completed and reported T3-Code-0.0.27-x64.exe, .blockmap, and builder-debug.yml artifacts.
Note
Include optional dependencies in desktop package builds#
Removes --no-optional from the vp install arguments in build-desktop-artifact.ts, so optional dependencies are now installed during staging. Extracts the install args into a new exported resolveStageInstallArgs function and adds a test asserting the flag is absent.
Macroscope summarized 5271a24.
Note
Low Risk
Narrow change to desktop build staging install flags; slightly larger install footprint but fixes a known Windows runtime failure.
Overview
Staged desktop artifact builds no longer pass --no-optional when running vp install --prod, so platform-specific optional packages (e.g. ffi-rs Windows native binaries required by @ff-labs/fff-node) are included in the packaged app.
Install arguments are centralized in a new exported resolveStageInstallArgs(), and a unit test locks in ["install", "--prod"] without --no-optional.
Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 5271a244d88dfd99b2335159e0e46c49b40bccf1. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).
Important
Review skipped#
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID:
a6305e31-bd74-4c07-a4ca-7cd3758dc46cYou can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share