🤖 fix: bundle macOS sharp runtimes for both architectures#3434
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7ad47eb605
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Install Darwin sharp optional dependencies for both x64 and arm64 before macOS packaging, and strengthen the packaged attach_file smoke test to assert the architecture-specific sharp/libvips assets are present. --- _Generated with `mux` • Model: `openai:gpt-5.5` • Thinking: `xhigh` • Cost: `$0.00`_ <!-- mux-attribution: model=openai:gpt-5.5 thinking=xhigh costs=0.00 -->
7ad47eb to
bb0d489
Compare
|
@codex review Please take another look. I replaced the wildcard CPU selector with two documented Bun installs ( |
|
@codex review Re-requesting review after the previous feedback was resolved and CI is now green. |
|
Codex Review: Didn't find any major issues. Swish! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
Fixes the Intel macOS startup failure from #3338 by ensuring macOS release packaging installs both Darwin
sharpruntime variants before Electron Builder copiesnode_modules, then verifies those architecture-specific assets in CI.Background
The published x64 macOS artifacts could contain only
@img/sharp-darwin-arm64/@img/sharp-libvips-darwin-arm64, causingsharpto fail at startup on Intel Macs when it tried to load the missingdarwin-x64runtime.Implementation
--cpu=x64and--cpu=arm64with--os=darwinbefore every macOS Electron Builder target.checkMacAttachFileRuntime.tsto inspect packaged app architectures withlipoand assert the exactsharpandlibvipspackages exist for each architecture.Validation
git diff --checkmake ensure-mac-sharp-runtime-depsnix shell nixpkgs#shfmt nixpkgs#shellcheck nixpkgs#hadolint -c make static-checkmake lint-actionlintRisks
Low-to-medium release-pipeline risk: this changes macOS packaging only, but it intentionally reruns
bun installbefore Electron Builder so the packagednode_modulestree includes both macOS native sharp runtimes. The smoke test now catches missing architecture-specific runtime assets before artifacts are uploaded.Generated with
mux• Model:openai:gpt-5.5• Thinking:xhigh• Cost:$0.00