Skip to content

[bun install] Fix race condition when error occurs while extracting tarballs - #19751

Merged
Jarred-Sumner merged 1 commit into
mainfrom
jarred/bun-install-extract-tarball-race
May 19, 2025
Merged

Jarred-Sumner merged 1 commit into
mainfrom
jarred/bun-install-extract-tarball-race

Conversation

@Jarred-Sumner

@Jarred-Sumner Jarred-Sumner commented May 19, 2025 •

Copy link
Copy Markdown
Collaborator

What does this PR do?

This fixes a race condition when an error occurs while extracting tarballs caused by re-using the package manager's logger.Log while on a different thread.

This also adds BUN_FEATURE_FLAG_DISABLE_INSTALL_INDEX.

This also makes bun install exit with a non-zero status code when failing to install packages where before we would only do that sometimes. I'm not totally sure if that's the right call.

How did you verify your code works?

This could use a test. One interesting thing: we now duplicate error messages more consistently. We should remove the duplicate error too.

@robobun

robobun commented May 19, 2025 •

Copy link
Copy Markdown
Collaborator
Updated 2:14 AM PT - May 19th, 2025

✅ @Jarred-Sumner, your commit c14f46d8f2728ccdc0719159916b1f75f54c9374 passed in Build #16783! 🎉


🧪   To try this PR locally:

bunx bun-pr 19751

That installs a local version of the PR into your bun-19751 executable, so you can run:

bun-19751 --bun

@Jarred-Sumner
Jarred-Sumner merged commit 457c15e into main May 19, 2025
@Jarred-Sumner
Jarred-Sumner deleted the jarred/bun-install-extract-tarball-race branch May 19, 2025 18:55
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.

3 participants