Open asfaltboy opened 1 month ago
@asfaltboy would you mind giving neotest-golang a go and report back if you experience similar issues with that adapter? (I'm the developer of it) I'd be curious to see how it performs on a project of the size you are describing.
It seems to behave exactly the same, in terms of not running any watched tests, and emitting similar / same log messages.
Is there anything I could add or try, to narrow down the root cause? I'm actually not convinced it's just about the size of the repo, maybe there are other factors at play?
I also see this notification once when starting a test, but I think it might be a red-herring:
2024-05-20T22:15:39 Error ERROR Error detected while processing User Autocommands for "LspDynamicCapability":
2024-05-20T22:15:39 Messages INFO Error executing lua callback: .../.local/share/nvim/lazy/LazyVim/lua/lazyvim/util/lsp.lua:64: attempt to call field 'supports_method' (a nil value)
stack traceback:
.../.local/share/nvim/lazy/LazyVim/lua/lazyvim/util/lsp.lua:64: in function <.../.local/share/nvim/lazy/LazyVim/lua/lazyvim/util/lsp.lua:60>
[builtin#36]: at 0x0103858820
...llar/neovim/0.9.5/share/nvim/runtime/lua/vim/lsp/rpc.lua:433: in function <...llar/neovim/0.9.5/share/nvim/runtime/lua/vim/lsp/rpc.lua:393>
Hmm. I think I would start with just some sort of elimination strategy, so to see if the size of the repo can be considered either part of the problem or not part of the problem. Like for example, you could try to start fresh in a new folder, then add in files and folders from the actual project gradually and retry in-between copying, until something causes this behavior you are experiencing.
You should be able to see files being watched and then at some point no longer being watched (with that continuous logging you mentioned).
Have you made sure you can watch a test in a minimal go test file?
In regards to the LazyVim error, are you on the latest LazyVim and Neovim 0.10.? The method mentioned is used here: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/plugins/lsp/init.lua
I've got a large repo with hundreds of packages, and thousands of files, and test watcher seems to not run any test on change.
Debug logs shows a lot of continuous messages such as:
Where the file names alternate between different files, and seem to be repeating. (note that 'registed' message is mis-typed in the actual code)
When saving a change in the test module, I see this emitted in the debug log:
Note: I shortened and obfuscated file/path to protect the identity of the code owner.