-
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
Yarn_install fails to reinstall when install input files change #1601
Comments
@gregmagolan was just looking into something similar, I think there's a fix coming when #1596 is released but I don't know if you need to take some action |
I’ve read through that PR, and I’m still not quite sure how I would leverage that env var to ensure my scripts are tracked. Could you please explain how I might use it? |
@alexeagle @gregmagolan My issue is that if I change some patches used by patch-packages, bazel will not re-run yarn install and apply those patches on other machines. Is there a way that I can declare arbitrary labels as deps/data for my yarn install so it re-runs correctly? |
It would seem that there are a few of open bug reports related to not invalidating the yarn/npm install
I think the root cause of these issues is that the I think we need a method to add arbitrary files that when changed, invalidates the install and forces a new one to occur. Would you guys agree/disagree? |
Any thoughts on this @gregmagolan or @alexeagle? Currently I have to make sure change an arbitrary dependency whenever I update a patch or else the patch may not be applied for everyone. This leads to a confusing process. |
@joeljeske Thanks for gather all the issue numbers. I'll put this on my list for as it looks like its causing a lot of pain. Non breaking so I'll cut a 1.6.2 once fixed. |
@joeljeske I was unable to reproduce the issue with data not causing yarn_install to re-run even with I did, however, fix up the doc string of |
On further thought, I think what you're observing is that the Label passed to With the fix in #1866, the labels in |
Ok, thank you for the detailed explanations. There was an issue with the label to data that I corrected. That, combined with the docs mentioning that it is not used, led me to not look further at it. (I have gotten spoiled by Bazel typically erroring fast on typos and didn't even consider it) |
Well, I spoke a little too soon @gregmagolan . I did have the issue you mentioned with an incorrect label. After fixing it, it still did not fix the issue. I had used a filegroup of the patches with a |
@joeljeske AFAIK, globs don't work in the WORKSPACE file. I think this is a Bazel limitation although at the moment I can't remember the reason. |
I am using
patch-package
to patch a couple of npm packages. I have the issue where yarn_install does not appropriately run when I change or add new patches. I have attempted to declare the patches as dependencies in thedata
attr of theyarn_install
but as the docs say:symlink_node_modules
is true by default (and I think I want to keep it true). So what is the best practice way to declare files as dependency for this workspace rule?The text was updated successfully, but these errors were encountered: