-
Notifications
You must be signed in to change notification settings - Fork 215
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
Have to restart VS Code every time I make a change to a generator or add a library #1987
Comments
Hey! Thanks a lot for the report @alexstanbury. I just recently ran into this myself, something is up with the daemon process :) |
This comment was marked as outdated.
This comment was marked as outdated.
|
Btw I've pushed a fix for this in the nx repo, I'll let you know once it's released. |
Thanks, can you link me to the fix? I'd like to implement it myself asap as I'm trying to write generators at the moment. |
You can check out the CONTRIBUTING.MD to see how to release a local version from master for your own testing :) |
Essentially VSCode slows to a crawl, file saving, deletion etc, would trigger prettier via "file participants" but it would just load for like 30-45s per file change. Super annoying disabling prettier fixes it but it's not a great solution. NX console didn't seem to be the issue, at least not for me. But I'm curious about this fix. Do we have a release forecast for it ? |
No idea what would be the issue here... but if you disable |
Hey @alexstanbury can you check whether this still happens on the latest nx & nx console? |
I have the same issue with 17.1.3. I'll try to schedule an upgrade and report back if it helps. May a while though. |
Please also include some logs :)
Thank you! I appreciate you helping out around the repo @joeldbirch |
hey! any insights? Is it still happening? |
Sorry for not getting back to you sooner, I have literally not used NX since filing the issue until this week, so your prompt was exceptional timing! I'm happy to report that I am not seeing the issue anymore, I created a test generator following the docs here. Then I hardcoded the output path, generated a lib, then changed the path, saved the file and ran it again, and the updated path was used. So it's safe to assume the fix has worked 👍 I also see the projects list update when going into NX console after generating a project, so that's working too 👍 The only very slight thing I noticed, is if I generate a project/lib using NX console, the list does not update until next time I open it. This isn't a big deal but it would be nice for it to update in real time, but I expect there are reasons why it doesn't. Thanks for sorting it 🥇 |
that's great to hear! The updates should be as instantaneous as possible so you're right it is an issue. I'm working on some things to improve behavior in this area so it should be better soon! |
If I make some changes to a generator file, or create a new library or anything like that, I have to reload VS code before it will show in NX console generators, for example if I then want to remove it. I've tried clicking the refresh nx workspace button and running the command, and restarting the TS server, but nothing helps. Only a restart of VS code will produce the correct behaviour.
Expected Behavior
NX console should reflect the changes I have made to the workspace. The generator when run should be the latest version I have saved. The drop down to show projects/libs should show any projects/libs I have just added. Instead, it seems to cache a snapshot of the workspace that was there when I first opened VS code and use that until I restart. Frustrating to say the least.
Steps to Reproduce
Or
Environment
Nx Report:
The text was updated successfully, but these errors were encountered: