-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Add back symlinks in fs cache #1453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
The experimental Nextjs feature |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed we don't reference the behavior of symlinks w.r.t. the cache. Should we add a warning/note somewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removes code for hard links, which wasn't being used. Removes `CopyOrLinkFile`, which means symlink handling needs to be pushed down to `CopyFile`, so `CopyFile` now handles symlinks (broken or otherwise). Caching behavior is unchanged from the base branch (See #1453). Also removes `SameFile`, which is no longer necessary now that we don't expect to be dealing with hard links. The calls in tests have been replaced with helpers that check file contents and file mode.
This brings back some behavior from before #1354. The filesystem cache will save all symlinks, and restore non-broken symlinks to files. Symlinks to directories continue to get restored as empty directories. Still TBD what we're going to do with broken symlinks in the filesystem cache, they currently are not restored.
For reference: the http cache saves and restores all symlinks.