Skip to content

Drop unused install packages and fetch binaries with Node (#377) - #382

Merged
jtklein-agents merged 3 commits into
spec/370-electron-build-and-runtime-packages-currentfrom
377-drop-unused-install-packages-and-fetch-binaries-with-node
Nov 25, 2026
Merged

jtklein-agents merged 3 commits into
spec/370-electron-build-and-runtime-packages-currentfrom
377-drop-unused-install-packages-and-fetch-binaries-with-node

Conversation

@jtklein-agents

Copy link
Copy Markdown
Owner

Closes #377

Summary

yarn download-binaries now uses Node fetch and extract-zip, and it skips the download when the binaries are already present.

 download-binaries
-  if static/bin/raxml-ng exists        # never true: the zip unpacks to <OS>/
-    return
-  download(url, static/bin, extract)   # `download` package
+  if static/bin/<OS>/ has files
+    remove static/bin/__MACOSX
+    return
+  fetch(url), fail on non-OK
+  write zip to temp file
+  extract-zip → static/bin            # keeps execute bits
+  remove temp file, static/bin/__MACOSX

Install drops packages nothing uses any more:

 package.json
-  "postinstall": "run-s postinstall-deps postinstall-patch postinstall-electron"
+  "postinstall": "run-s postinstall-deps postinstall-electron"
-  patch-package, postinstall-postinstall, download, electron-download
+  extract-zip (dev)
-sentry-symbols.js                     # only user of electron-download

BUILD.md now says native crash symbols are not uploaded.

Evidence

  • Before: every run downloaded again, because the existence check looked at static/bin/raxml-ng. It also left static/bin/__MACOSX behind.
    After: on macOS, run against a scratch static/:

    run 1: Binaries missing, downloading from '.../v24.09.28/Mac.zip'... Done!
           static/bin → Mac/ only (no __MACOSX)
           -rwxr--r-- Mac/raxml-ng ; raxml-ng --version → RAxML-NG v. 1.2.2
    run 2: Binaries exist!                      # no download
    stale __MACOSX + binaries present: Binaries exist!, __MACOSX removed
    
  • yarn lint, yarn typecheck and yarn test pass (474 tests). The Ubuntu and Windows downloads, the Linux execute bits and the e2e runs are left to this PR's CI matrix.

Merge Danger

Door: two-way

Revert restores the packages and the script.

Blast Radius: install/CI

The change touches install and the CI binary step on all three hosts. If an earlier unzip stopped halfway, the <OS> folder isn't empty, so the script skips the download and won't repair it. To fix that, delete static/bin/<OS> and run it again. The packaged app is unchanged.

🤖 Generated with Claude Code

jtklein-agents and others added 3 commits November 25, 2026 23:18
Remove electron-download, patch-package, postinstall-postinstall and
download, the postinstall-patch script, and sentry-symbols.js.
download-binaries now fetches the release zip with Node fetch, unpacks
it with extract-zip, removes the __MACOSX folder, and skips the download
when static/bin/<OS>/ already holds files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ime-packages-current' into 377-merge

# Conflicts:
#	yarn.lock
…ime-packages-current' into 377-merge

# Conflicts:
#	yarn.lock
@jtklein-agents
jtklein-agents merged commit f53b1d0 into spec/370-electron-build-and-runtime-packages-current Nov 25, 2026
9 checks passed
@jtklein-agents
jtklein-agents deleted the 377-drop-unused-install-packages-and-fetch-binaries-with-node branch November 25, 2026 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant