Repository navigation
test(cache): check that cache hits restore output symlinks as links - #911
Merged
Merged
Conversation
The symlink e2e cases only checked that files were reachable through the restored paths, which a restore that copied the link targets would also pass. Add `vtt read-link` and check the link target after each cache hit in the `vtt` case. In the Nitro case, check that each path nf3 links is a symbolic link into `.nf3`, resolving both ends so the output matches with relative targets on Unix and absolute junction targets on Windows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fspy benchmarklinuxmacoswindows |
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.
Motivation
The symlink e2e cases added in #885 only check that files are reachable through the restored paths:
vtt print-file dist/pkg/index.jsin thevttcase, andrequirein the Nitro case. A restore that copied each link's target instead of recreating the link would pass them too. Replacing each restored link with a copy of its target leaves both cases passing, so they don't pin down what #885 fixed.Changes
vtt read-link <path>prints a link's target, and fails if the path isn't a symbolic link.output_globs___symlinks_restored_on_cache_hit: after each cache hit,vtt read-link dist/pkgmust printstore/pkg.nitro_build_restores_traced_dependency_links:check.cjschecks thatnode_modules/tsliband each package'snode_modules/tslibare symbolic links into.nf3. It resolves both ends withrealpath, so the output is the same with nf3's relative targets on Unix and its absolute junction targets on Windows.🤖 Generated with Claude Code