-
Notifications
You must be signed in to change notification settings - Fork 211
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
In yarn PNP the plugin keeps touching cache files, triggering reindexing #2062
Comments
hmm this shouldn't happen, you're right. Is |
No, because we're using zero-install so all the dependencies are checked into git. |
It seems to me like IntelliJ is picking up everything for indexing so it makes sense that it reindexes whenever a file in there changes. |
But it doesn't change! You can sit and cmd/alt+tab between the IDE and something else doing nothing. And VS Code also has the problem. Nothing is touching that directory (as evident by chokidar), only when nx-console is enabled, the touching starts.
Not an option unfortunately, the point is to not have it ignored in git
Doesn't change anything unfortunately. |
hmmm it makes sense that things in As to the yarn files that change though, that's an interesting thing I'm not sure how it happens... |
Ah yes, .nx is completely git ignored. It's .yarn/cache that's the problem here :) |
I've been able to reproduce this and I'll have an improvement in a PR soon. |
Great!
A note here - it's the plugin that performs the changes/touching. It's obvious if you monitor with chokidar (see my OP) |
yeah I know. We read the files to figure out what dependencies contain generators & executors so we can show them in Nx Console. So it makes sense that Nx Console is involved.
|
Current Behavior
When I enable the plugin in WebStorm, it keeps causing reindexations over and over again. I just need to switch out of WebStorm (triggering a WebStorm save I suppose?) and come back, and - reindexation!
My colleague who uses the plugin in VS Code has a similar problem (but VSC doesn't auto-save).
Turning the plugin off, this problem disappears.
Expected Behavior
It shouldn't reindex.
Steps to Reproduce
I've converted our classic yarn project to a latest (v4) yarn PNP project with zero-installs.
Meaning, instead of a
node_modules
we have all the packages checked into git in.yarn/cache
.Starting WebStorm or VS Code with nx-console enabled. Change a file and bam - reindexing.
Failure Logs / Images / Videos
I'm monitoring changed files with chokidar:
chokidar "*.*" "**/*.*" -c "echo '{path}'"
With nx-console plugin turned off:
With nx-console plugin turned on:
Environment
nx report (also tried on latest nx with same results):
The text was updated successfully, but these errors were encountered: