-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
Extension continually restarts when running Next.js dev server #149
Comments
Hey @tommy-mitchell thanks for the bug report. This is likely due that we watch certain globs of files that the next js dev process copies while running/changing things. You can see the files we are watching here and that we restart the extension when they are changed. This is because restarting the extension is the only way to reload some rules when they change. https://github.com/xojs/vscode-linter-xo/blob/master/client/extension.ts#L95 My guess is that you need the watcher to ignore the .next directory as we don't expose an API in the extension to ignore anything. However, you can set up vscode watcher to NOT signal xo extension when a dir changes with the setting TL;DR |
I couldn't seem to get // settings.json
"files.watcherExclude": {
"**/.next/**": true,
}, As a temporary fix I've just removed the On a related note, it may be helpful to rename |
So I created a nextjs project to test. I don't really use it myself, and I could NOT reproduce this issue on mac. I did not even need to add anything to files.watcherExclude, it just didn't restart on unrelated tsx file changes for me... this is my
I wonder if you are clobbering the defaults when you set just Anyway, now I am really unsure about this problem for you. If you have some extra time and would be willing, could you see if this problem reproduces on Vscode when you turn all other extensions off and use default settings? I think you might could create a throw away profile to do this, I honestly am not sure the best way to do it. I just need a way to isolate the problem a little better so we can be sure what's causing it. |
It seems that the longer I run the Next.js dev server, the slower the
xo
extension gets (when usingcodeActionsOnSave
, at least). Eventually, the extension crashes on every save:xo-next-crash.mp4
My configs are:
I used
DEBUG=* npx xo
to confirm that only my files are being linted (e.g. ignoresnode_modules/
,.next/
, etc). I'm not sure how further to inspect the extension to see why it's stalling.The text was updated successfully, but these errors were encountered: