Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix: include optional deps in desktop package #3105

ClosedStiensWout(GitHub profile, opens in a new tab)wants to merge 2 commits intomain fromrefs/pull/3105/headopened View on GitHub

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).
    1. coderabbitai[bot](GitHub profile, opens in a new tab)commented

      Important

      Review skipped

      Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

      ⚙️ Run configuration

      Configuration used: Repository UI

      Review profile: CHILL

      Plan: Pro

      Run ID: a6305e31-bd74-4c07-a4ca-7cd3758dc46c

      You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

      Use the checkbox below for a quick retry:

      • 🔍 Trigger review
      ✨ Finishing Touches
      🧪 Generate unit tests (beta)
      • Create PR with unit tests

      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
      Comment `@coderabbitai help` to get the list of available commands and usage tips.
    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched

    3. Approvability

      Verdict: Needs human review

      This change alters the desktop build process by including optional dependencies that were previously excluded. Changes to artifact packaging/deployment composition warrant verification of the intended impact.

      You can customize Macroscope's approvability policy. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    4. reinisalpins(GitHub profile, opens in a new tab) approved these changes

    5. juliusmarminge closed this

Sign in to join this conversation.