Skip to content

bun-canary: Update to version 1.3.12-canary.1+0ff0065f9, fix checkver & autoupdate#2793

Merged
z-Fng merged 2 commits intomasterfrom
fix-bun-canary
Apr 7, 2026
Merged

bun-canary: Update to version 1.3.12-canary.1+0ff0065f9, fix checkver & autoupdate#2793
z-Fng merged 2 commits intomasterfrom
fix-bun-canary

Conversation

@z-Fng
Copy link
Copy Markdown
Member

@z-Fng z-Fng commented Apr 7, 2026

Migrate:

Unable to use semantic versioning, cannot guarantee that version numbers will strictly increase.

  • Use conventional PR title: <manifest-name[@version]|chore>: <general summary of the pull request>
  • I have read the Contributing Guide

Summary by CodeRabbit

  • New Features

    • Automatic CPU feature detection enables optimal binary selection during installation.
    • Legacy installation data automatically migrates to new location.
    • Environment configuration now properly managed with BUN_INSTALL variables.
  • Chores

    • Updated package version to latest canary release.
    • Download sources updated to use GitHub Canary releases directly.
    • Version checking mechanism improved.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 7, 2026

Walkthrough

Windows Bun canary manifest switched downloads from nightly.link to GitHub release assets, added arm64 support, added AVX2 CPU probing to pick x64 vs x64-baseline, migrated legacy ~\.bun into persistent storage, and reworked install, PATH persistence, and version/autoupdate logic.

Changes

Cohort / File(s) Summary
Bun Canary Package Manifest
bucket/bun-canary.json
Version bumped to 1.3.12-canary.1. Replaced nightly.link URLs with direct GitHub canary release ZIPs for x64 (regular + baseline) and arm64. Added pre_install script to migrate legacy ~\.bun, probe AVX2 on x64 or select arm64 binary, move bun.exe, and clean artifacts. Introduced installer.script/uninstaller.script to modify global PATH, persist entries (bin, install), env_set for BUN_* variables, updated checkver.script to extract revision from downloaded binary, and updated autoupdate/hash retrieval to use GitHub release assets.

Sequence Diagram(s)

sequenceDiagram
    participant Installer
    participant CPU as CPU Probe
    participant FS as Filesystem ($persist_dir)
    participant GitHub as GitHub Releases
    Installer->>FS: check if $persist_dir exists (migrate ~\.bun if absent)
    Installer->>CPU: probe AVX2 on x64
    alt arm64
        Installer->>GitHub: download bun-windows-aarch64.zip
    else x64 + AVX2
        Installer->>GitHub: download bun-windows-x64.zip
    else x64 without AVX2
        Installer->>GitHub: download bun-windows-x64-baseline.zip
    end
    GitHub-->>Installer: provide ZIP asset
    Installer->>FS: extract selected bun.exe into $dir and move to $persist_dir\bin
    Installer->>FS: remove other bun-windows-* artifacts
    Installer->>FS: update global PATH via installer.script
    Installer->>GitHub: (checkver) download x64 ZIP, extract and run bun.exe --revision
    GitHub-->>Installer: return revision string for autoupdate
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Poem

🐰 I hopped through releases, GitHub bright and new,
I sniffed for AVX2, then chose the proper shoe,
I moved old crumbs from ~\.bun with care,
Placed bun.exe in persistent lair,
PATH set, arm64 joins—happy hop! 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main changes: updating bun-canary to a new version and fixing checkver & autoupdate functionality.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The PR description includes conventional title, references related PRs, and confirms compliance with contributing guidelines, but lacks detailed explanation of changes made.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-bun-canary

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.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 7, 2026

Your changes did not pass all checks.

Please address the issues in the manifest and comment starting with /verify to rerun the checks.

bun-canary

  • Lint
  • Description
  • License
  • Hashes
  • Checkver
  • Autoupdate
  • Autoupdate Hash Extraction

Check the full log for details.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@bucket/bun-canary.json`:
- Around line 15-22: The manifest contains stale checksum values: update the
three "hash" entries shown (the two-element "hash" array and the "arm64"
object's "hash") by downloading the current canary release artifacts and
regenerating their SHA256 sums, then replace the old hash strings in
bun-canary.json; additionally verify that the second element of the "hash" array
matches the revision embedded in the downloaded binary to ensure the manifest
points to the correct canary build.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: fe7da723-be73-4618-a2b2-e284603f3819

📥 Commits

Reviewing files that changed from the base of the PR and between 77b0b0d and 7fd8a45.

📒 Files selected for processing (1)
  • bucket/bun-canary.json

Comment thread bucket/bun-canary.json Outdated
@z-Fng
Copy link
Copy Markdown
Member Author

z-Fng commented Apr 7, 2026

/verify

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 7, 2026

All changes look good.

Wait for review from human collaborators.

bun-canary

  • Lint
  • Description
  • License
  • Hashes
  • Checkver
  • Autoupdate
  • Autoupdate Hash Extraction

Check the full log for details.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
bucket/bun-canary.json (1)

74-86: Checkver script works but lacks error handling.

The approach of downloading and running bun.exe --revision is valid since canary versions aren't predictable from tags alone. However, if Invoke-WebRequest or Expand-Archive fails, temporary files may remain in the cache directory.

Consider wrapping in try/finally for cleanup, though this is minor for a checkver script.

♻️ Optional: Add error handling
 "checkver": {
     "script": [
         "$dl_url = 'https://github.com/oven-sh/bun/releases/download/canary/bun-windows-x64.zip'",
         "$dl_path = cache_path 'bun-canary' 'unknown' $dl_url",
         "$dl_dir = Split-Path -Path $dl_path -Parent",
-        "Invoke-WebRequest -Uri $dl_url -OutFile $dl_path",
-        "Expand-Archive -Path $dl_path -DestinationPath $dl_dir | Out-Null",
-        "$ver = & \"$dl_dir\\bun-windows-x64\\bun.exe\" --revision",
-        "Remove-Item -Path $dl_path, $dl_dir\\bun-windows-x64 -Recurse -Force",
-        "Write-Output $ver"
+        "try {",
+        "    Invoke-WebRequest -Uri $dl_url -OutFile $dl_path",
+        "    Expand-Archive -Path $dl_path -DestinationPath $dl_dir | Out-Null",
+        "    $ver = & \"$dl_dir\\bun-windows-x64\\bun.exe\" --revision",
+        "    Write-Output $ver",
+        "} finally {",
+        "    Remove-Item -Path $dl_path, $dl_dir\\bun-windows-x64 -Recurse -Force -ErrorAction SilentlyContinue",
+        "}"
     ],
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@bucket/bun-canary.json` around lines 74 - 86, The checkver script currently
downloads and expands bun and then reads its revision, but lacks error handling
and may leave cached files if Invoke-WebRequest or Expand-Archive fail; update
the "checkver" script to wrap the download, expansion, execution of
"$dl_dir\\bun-windows-x64\\bun.exe --revision", and the cleanup Remove-Item
calls in a try/finally block (or equivalent error-handling construct) so that
the Remove-Item cleanup runs regardless of failures, and ensure any caught
errors are re-thrown or surfaced so the check fails correctly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@bucket/bun-canary.json`:
- Around line 74-86: The checkver script currently downloads and expands bun and
then reads its revision, but lacks error handling and may leave cached files if
Invoke-WebRequest or Expand-Archive fail; update the "checkver" script to wrap
the download, expansion, execution of "$dl_dir\\bun-windows-x64\\bun.exe
--revision", and the cleanup Remove-Item calls in a try/finally block (or
equivalent error-handling construct) so that the Remove-Item cleanup runs
regardless of failures, and ensure any caught errors are re-thrown or surfaced
so the check fails correctly.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f4bb395c-ef75-49bf-9701-ff2f0b1d519f

📥 Commits

Reviewing files that changed from the base of the PR and between 7fd8a45 and 878be49.

📒 Files selected for processing (1)
  • bucket/bun-canary.json

Comment thread bucket/bun-canary.json
@z-Fng z-Fng merged commit f8f4244 into master Apr 7, 2026
5 checks passed
@z-Fng z-Fng deleted the fix-bun-canary branch April 7, 2026 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant