-
Notifications
You must be signed in to change notification settings - Fork 522
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
fix: invalidate installed npm repositories correctly (#1200) #1205
fix: invalidate installed npm repositories correctly (#1200) #1205
Conversation
|
||
bzlFile += `def install_${workspace}(): | ||
_maybe( | ||
copy_repository, | ||
name = "${workspace}", | ||
marker_file = "@${WORKSPACE}//_workspaces/${workspace}:_bazel_workspace_marker", | ||
# Ensure that changes to the node_modules cause the copy to re-execute |
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.
Apparently this doesn't actually work, so we need to force it by including the hash of the lock file.
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.
Thanks @JaredNeil. This looks like a good fix. I wonder if something has changed in Bazel as the lock_file
attribute worked 7 months ago when @alexeagle added it to fix the same issue.
Can you rebase to head? This will fix the examples/worker CI failure as it was missing the yarn.lock file which is now checked in.
Can you also remove the now unused lock_file
attribute in internal/copy_repository/copy_repository.bzl
?
c1f8d4c
to
4827723
Compare
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.
LGTM
Fixes #1200 |
Awesome thank you!! This was a nasty bug |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: #1200
What is the new behavior?
Repository is always copied when lock file changes.
Does this PR introduce a breaking change?
Other information