Skip to content

Make --preserve-symlinks and --preserve-symlinks-main work in the runtime and bundler - #36757

Open
robobun wants to merge 11 commits into
mainfrom
farm/b87aa853/preserve-symlinks
Open

Make --preserve-symlinks and --preserve-symlinks-main work in the runtime and bundler#36757
robobun wants to merge 11 commits into
mainfrom
farm/b87aa853/preserve-symlinks

refactor: extract bun_sys::realpath_by_open and RuntimeOptions::prese…

8527c2a
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Aug 2, 2026 in 35m 54s

Code review found 1 important issue

Found 1 candidates, confirmed 1. See review comments for details.

Details

Severity Count
🔴 Important 1
🟡 Nit 0
🟣 Pre-existing 0
Severity File:Line Issue
🔴 Important src/jsc/VirtualMachine.rs:4099-4108 --preserve-symlinks-main is not applied to worker entry points despite the '(workers included)' claim

Annotations

Check failure on line 4108 in src/jsc/VirtualMachine.rs

See this annotation in the file changed.

@claude claude / Claude Code Review

--preserve-symlinks-main is not applied to worker entry points despite the '(workers included)' claim

The `(workers included)` claim here doesn't hold for the `--preserve-symlinks-main`-on / `--preserve-symlinks`-off direction: the worker entry path goes through `resolve_entry_point_specifier` (web_worker.rs:1716-1743), which returns `entry_path.text` unconditionally and discards `.pretty`/`.is_symlink` before `_resolve` ever runs — so the `Some(true)` recovery arm can never fire for a symlinked worker entry (the link spelling was thrown away). The `Some(false)` direction does work, since `realp