Skip to content

Run the Bun dev child with the transpiler cache off - #1596

Closed
vivek7405 wants to merge 0 commit into
mainfrom
fix/bun-transpiler-cache-poison
Closed

vivek7405 wants to merge 0 commit into
mainfrom
fix/bun-transpiler-cache-poison

Conversation

@vivek7405

Copy link
Copy Markdown
Collaborator

Bun caches the transpile of any source over 50KB on disk. The cache key is the file's content, and the cached output keeps the absolute paths that a Bun.plugin onResolve returned. The dev alias resolver (#1575) returns absolute paths, so the cached output of a large app module was tied to the checkout that ran webjs dev first. Any other copy of the file (a worktree, a moved app, a later webjs start) then imported from that old directory. When the old directory was gone, the result was a 500. When it still existed, the page silently ran the other copy's code. This is why website / returned 500 on Bun in every local worktree, which failed test/bun/app-boot.mjs and site-seo-tags.

The supervisor now starts the Bun child with BUN_RUNTIME_TRANSPILER_CACHE_PATH=0. Bun reads that setting only at startup, which is why it has to be set on the child. New Bun proof: test/bun/dev-transpiler-cache.mjs fails when the fix is reverted. It is wired into ci.yml and webjs.ci.

https://claude.ai/code/session_01SZ72LSPAo4NvYvBDSD6RLo

@pilots-run

pilots-run Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Preview for 2483fd8 was not built: compose file has unsupported keys

Next: fix the listed keys in the compose file

@vivek7405

Copy link
Copy Markdown
Collaborator Author

Its commit landed in main through #1600 (cherry-picked unchanged), so this PR is now redundant.

@vivek7405 vivek7405 closed this Oct 7, 2026
@vivek7405
vivek7405 force-pushed the fix/bun-transpiler-cache-poison branch from ef8f838 to 2483fd8 Compare October 7, 2026 15:31
@vivek7405
vivek7405 deleted the fix/bun-transpiler-cache-poison branch October 7, 2026 15:32
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