Turbopack: Remove codepath for writing non-directory symbolic links - #96955
Open
bgw wants to merge 1 commit into
Open
Turbopack: Remove codepath for writing non-directory symbolic links#96955bgw wants to merge 1 commit into
bgw wants to merge 1 commit into
Conversation
Contributor
Failing test suitesCommit: 346cf64 | About building and testing Next.js
Expand output● app dir - navigation › middleware redirect › should change browser location when router.refresh() gets a redirect response Other failing CI jobs |
Contributor
Stats from current PR🟢 1 improvement
📊 All Metrics📖 Metrics GlossaryDev Server Metrics:
Build Metrics:
Change Thresholds:
⚡ Dev Server
📦 Dev Server (Webpack) (Legacy)📦 Dev Server (Webpack)
⚡ Production Builds
📦 Production Builds (Webpack) (Legacy)📦 Production Builds (Webpack)
📦 Bundle SizesBundle Sizes⚡ TurbopackClient Main Bundles
Server Middleware
Build DetailsBuild Manifests
Build Cache
📦 WebpackClient Main Bundles
Polyfills
Pages
Server Edge SSR
Middleware
Build DetailsBuild Manifests
Build Cache
🔄 Shared (bundler-independent)Runtimes
📎 Tarball URLCommit: 346cf64 |
bgw
marked this pull request as ready for review
August 8, 2026 01:18
lukesandberg
approved these changes
Aug 8, 2026
Comment on lines
+186
to
+189
| /// [`LinkTarget::Absolute`] targets are normalized and relative to the *filesystem root* (so | ||
| /// that absolute system paths never end up in the persistent cache). | ||
| /// [`LinkTarget::Relative`] targets are raw values read from the link — unnormalized, may | ||
| /// contain `..` — and are relative to the *directory containing the link*. |
Contributor
There was a problem hiding this comment.
nit: this restates LinkTarget docs, maybe amend those instead
Comment on lines
+81
to
+82
| /// The returned [`LinkTarget`] is root-relative and normalized for [`LinkTarget::Absolute`] | ||
| /// links, or the raw link-relative on-disk value for [`LinkTarget::Relative`] links. |
Contributor
There was a problem hiding this comment.
just restating the enum docs?, simplify?
| target: &LinkTarget, | ||
| ) -> Result<FileSystemPath> { | ||
| let (base, target) = match target { | ||
| LinkTarget::Absolute(target) => (link_path.root().owned().await?, target), |
Contributor
There was a problem hiding this comment.
nit: i think this can be non-async with FileSystemPath::new_normalized_unchecked(link_path.fs, target)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously, we had to
stat()the target of a link duringread_linkto determine if it was a file or a directory to store that inLinkType.This was pretty silly, because we only actually care about this in the write path: Directories on Windows can be written using junction points, which is preferred.
First, I tried splitting the data structures used for the read and write codepaths, so that we'd only pass this in for the write codepath, but then I realized that we never actually want to write file symlinks, and doing so would be a portability hazard for Windows, so this PR just removes support for that instead.