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

worker: apply --preserve-symlinks-main to a Worker's entry point

66a8e29
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Aug 2, 2026 in 23m 44s

Code review found 1 potential issue

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

Details

Severity Count
🔴 Important 0
🟡 Nit 1
🟣 Pre-existing 0
Severity File:Line Issue
🟡 Nit src/jsc/web_worker.rs:1743-1755 --preserve-symlinks-main incorrectly applied to Worker preload modules

Annotations

Check warning on line 1755 in src/jsc/web_worker.rs

See this annotation in the file changed.

@claude claude / Claude Code Review

--preserve-symlinks-main incorrectly applied to Worker preload modules

The `preserve_main` recovery added here also fires for the `create()` call site that resolves each entry in `preload_modules` (the loop at ~line 420), so with `--preserve-symlinks-main` on and `--preserve-symlinks` off, a symlinked Worker preload keeps its link path too — but preloads aren't the main module and should follow the general flag. Consider threading an `is_main_entry: bool` through `resolve_entry_point_specifier` (`true` from `spin()`, `false` from the preload loop), mirroring the `s