这是indexloc提供的服务,不要输入任何密码
Skip to content

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

Merged
merged 5 commits into from
Aug 19, 2022
Merged

Add back symlinks in fs cache #1453

merged 5 commits into from
Aug 19, 2022

Conversation

gsoltis
Copy link
Contributor

@gsoltis gsoltis commented Jun 28, 2022

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.

@vercel
Copy link

vercel bot commented Jun 28, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated
turbo-site ⬜️ Ignored (Inspect) Visit Preview Aug 18, 2022 at 11:25PM (UTC)

@gsoltis gsoltis marked this pull request as ready for review June 28, 2022 22:50
@gsoltis
Copy link
Contributor Author

gsoltis commented Aug 18, 2022

The experimental Nextjs feature outputFileTracingRoot produces symlinks that hang our current implementation, this PR addresses that.

Copy link
Member

@chris-olszewski chris-olszewski left a 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?

Copy link
Member

@tknickman tknickman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@kodiakhq kodiakhq bot merged commit 5481b2b into main Aug 19, 2022
@tknickman tknickman deleted the gsoltis/add_back_symlink_cache branch August 23, 2022 18:00
kodiakhq bot pushed a commit that referenced this pull request Aug 25, 2022
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants