-
Notifications
You must be signed in to change notification settings - Fork 26
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
feature: force ignore directory, or respect underscore convention? #35
Comments
As workaround, you can choose to not send those files to acme-lsp:
Check you don't have any old configuration with
The regexp is not ideal because it will also exclude other directories with underscore in them. I need to investigate why acme-lsp is getting into infinite loop. I wasn't able to reproduce the issue on vscode. |
Cool, thanks, I'll try it out tomorrow.
yeah, fair enough. It should be fine for my use-case and my daily work though, so I can definitely live with that in the meantime.
|
the exclusion regex seems to do the trick for now, thanks! |
It's actually not a infinite loop I originally thought. It's just really slow because it redraws the whole window after each new diagnostic. I think I can make it fast for few hundred diagnostics, but it's going to be a challenge for 1000+ diagnostics. So, I've opened a gopls issue: golang/go#39563 |
All current diagnostics were being written every time we received a new diagnostics update. Instead, we now queue diagnostics and write them every second if the queue changed. Update #35
Ah ok, good to know. I must admit I probably only left acme-lsp to run for a minute tops, as the CPU usage was making my laptop noisy, so I never saw it actually stop spewing diagnostics. |
I think the issue was fixed on gopls v0.5.0, which was released last month. Closing. |
Hi,
In an existing github project where I contribute (https://github.com/containous/yaegi), they have a "_test" directory at the root, containing .go files, each of them being a main package.
I know they're not supposed to have more than one main in a directory, but on the other hand, since the directory starts with an underscore, it is ignored by the go tool ('go test ./...' at the root runs fine), as I think is the convention.
The reason I'm bringing this up, is because it seems acme-lsp chokes on that structure. If I add the project with L ws+, most things work fine with the L commands. However, as soon as I open in acme one of the files in the _test dir, acme-lsp seems to enter an infinite loop and burning CPU, spewing errors in /LSP/Diagnostics forever.
So don't you think acme-lsp should ignore any file or directory starting with an underscore, as the go tool does? Or if not, could we have a configuration option that tells it to ignore a specific directory? If not, can you think of any other work-around I could use?
I was thinking that in the meantime maybe I could add build tags to all of the files in the _test directory, but I'm not sure that would do the trick, I haven't tried yet.
The text was updated successfully, but these errors were encountered: