Skip to content

fix(bun): prefer baseline linux releases (fix #879)#1048

Merged
coolaj86 merged 3 commits intowebinstall:mainfrom
Tori0419:codex/fix-bun-baseline-linux
Mar 9, 2026
Merged

fix(bun): prefer baseline linux releases (fix #879)#1048
coolaj86 merged 3 commits intowebinstall:mainfrom
Tori0419:codex/fix-bun-baseline-linux

Conversation

@Tori0419
Copy link
Copy Markdown
Contributor

@Tori0419 Tori0419 commented Mar 8, 2026

Fixes #879

Summary

  • keep Bun's -baseline Linux assets instead of filtering them out
  • prefer the baseline build over the default build for the same Linux x64 target
  • keep debug/profile builds excluded
  • add a narrow regression test for release ordering

Why

bun can select a non-baseline Linux binary that crashes with SIGILL on older/container CPUs.
This change makes the release list prefer the baseline variant when both assets exist for the same target.

Testing

  • added bun/releases.test.js covering:
    • baseline preferred over default Linux x64 assets
    • non-Linux asset order unchanged

Notes

I could not run the repo's Node-based lint/test commands locally in this environment because node/npm were unavailable.

@coolaj86
Copy link
Copy Markdown
Member

coolaj86 commented Mar 9, 2026

Weird, I thought I had fixed this years ago. Looks good. Testing now.

note: GitHub Releases seems to be having an outage (release downloads aren't working on my server or my home laptop), making it difficult to get a new testing environment up. I'll try again tomorrow.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates Bun’s release normalization so Linux -baseline assets are retained and preferred over the default Linux x64 assets to avoid SIGILL on older/container CPUs.

Changes:

  • Stop filtering out Bun Linux -baseline assets; continue filtering out -profile builds.
  • Prefer -baseline over default for the same Linux x64 target (including -musl) via release ordering.
  • Add a narrow regression test for Linux baseline preference and non-Linux ordering.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
bun/releases.js Refactors release filtering/normalization and adds baseline-preferred ordering logic for Linux x64 targets.
bun/releases.test.js Adds a node:test regression test for baseline ordering and non-Linux order preservation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread bun/releases.test.js Outdated
Comment thread bun/releases.js Outdated
@coolaj86 coolaj86 force-pushed the codex/fix-bun-baseline-linux branch 2 times, most recently from 649e0ef to f06943d Compare March 9, 2026 19:22
@coolaj86 coolaj86 force-pushed the codex/fix-bun-baseline-linux branch from f06943d to d739ca8 Compare March 9, 2026 19:24
Copy link
Copy Markdown
Member

@coolaj86 coolaj86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sort strategy alone didn't work, but I changed it to just use baseline when baseline is available and that solves the problem.

@coolaj86 coolaj86 merged commit d739ca8 into webinstall:main Mar 9, 2026
3 checks passed
@coolaj86
Copy link
Copy Markdown
Member

coolaj86 commented Mar 9, 2026

@detox-24 This was also kinda Ai slop (it didn't actually understand the problem to fix it correctly). However, it was at least attempting to address an actual problem.

@detox-24
Copy link
Copy Markdown
Member

detox-24 commented Mar 9, 2026

Ah! I gotta keep a sharper eye!

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.

[Bug] bun should prefer bun-baseline

4 participants