fix(wgsl): resolve tmpdir symlink before comparing webpack fileDependencies on macOS - #382
Merged
matiasngf merged 2 commits intoSep 1, 2026
Conversation
Contributor
|
@ColinL-code is attempting to deploy a commit to the Vercel Labs Team on Vercel. A member of the Team first needs to authorize it. |
matiasngf
approved these changes
Sep 1, 2026
matiasngf
left a comment
Collaborator
There was a problem hiding this comment.
Reviewed the test-only path canonicalization and its security impact. The change correctly resolves macOS /var → /private/var path differences without altering production behavior. Targeted webpack test passes locally (5/5).
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Collaborator
|
@ColinL-code can you please sign your commit?
|
ColinL-code
force-pushed
the
fix/webpack-real-test-macos-realpath
branch
from
September 1, 2026 03:14
3a3b62e to
5c873f0
Compare
Contributor
Author
|
Signed my commit |
matiasngf
enabled auto-merge
September 1, 2026 13:15
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.

Diagnosis
The "addDependency wiring" test in
webpack-real.test.tsasserts thatstats.compilation.fileDependenciescontains the transitively-importedhelper.wgsl. On macOS this assertion fails, even though the loader correctly registers the dependency.This is because
os.tmpdir()on macOS returns a path under/var/folders/..., but/varis itself a symlink to/private/var. Webpack's resolver follows symlinks by default, sofileDependenciesrecords the resolved/private/var/folders/.../helper.wgslpath, while the test compares against the un-resolved/var/folders/.../helper.wgslit wrote the fixture to. So the string comparison fails even though the file is tracked properly.Fix
Resolve the expected path with
fs.realpathbefore comparing.Evidence (before / after)
Before (macOS,
node v22.22.2):After: all 5 tests in
webpack-real.test.tspass.Gates run (macOS, Node 22.22.2)
pnpm typecheckpnpm test:fastNotes
No changeset included since this is a test-only change, no published package behavior affected.