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
Tool 1100 yarn workspace support #33
Conversation
…ory symlinks (but do not recurse into)
Codecov Report
@@ Coverage Diff @@
## master #33 +/- ##
==========================================
- Coverage 48.32% 43.05% -5.28%
==========================================
Files 6 6
Lines 478 432 -46
==========================================
- Hits 231 186 -45
Misses 216 216
+ Partials 31 30 -1
Continue to review full report at Codecov.
|
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.
Pls check my notes
cache_path.go
Outdated
// If case it a link to a directory outside of the cached paths (e.g. yarn workspaces), | ||
// will not add the linked directory to the cache, and will not invalidate cache if it changes. | ||
// If it links to a directory included in the cache already, then also ignoring it. | ||
// The directory contents will be added to the cache as regular files, so not need to check them twice. |
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.
so not need to check -> no need to check
cache_path.go
Outdated
return err | ||
} | ||
|
||
// Ignoring symlink target changes for cache invalidation. |
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 think this comments could be added to the file level comment block, as it is not strictly related to this code block only, but a more general functional description of this file.
cache_path.go
Outdated
} | ||
|
||
// Ignoring symlink target changes for cache invalidation. | ||
// If case it a link to a directory outside of the cached paths (e.g. yarn workspaces), |
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.
In case it is a link ...
If finding a symlink, we just ignore it as far as cache invalidation goes.
Yarn workspaces can create symlinks to directories outside of the node_modules folder, and do not want to follow these.
If the symlink (file or directory) points inside the cached folder, then I also do not want to follow those, as the files will be part of the cache anyway.
Yarn cache creates symlinks to executables (this seems to work currently)