Open stefanvanburen opened 1 month ago
I followed the reproduction steps and cannot reproduce. Can you try this again with your setup but with a CLI built from HEAD?
Yeah, the panic
is seemingly fixed with the latest HEAD. However, it does look like things seemingly spin with an empty module cache (i.e., after running a buf registry cc
). My nvim instance shows LSP notifications, and without the cache populated the LSP seemingly will just spin trying to resolve the non-existent images. (Not sure if this relates to #3397 or not.)
Some example logs, from :LspLog
, that seemingly just spin over and over:
{"level":"warn","time":"2024-10-14T10:49:09.882-0400","message":"notify returned","method":"$/progress"}
{"level":"warn","time":"2024-10-14T10:49:09.882-0400","message":"notify returned","method":"$/progress"}
{"level":"warn","time":"2024-10-14T10:49:09.882-0400","message":"notify returned","method":"textDocument/publishDiagnostics"}
{"level":"warn","time":"2024-10-14T10:49:09.882-0400","message":"notify returned","method":"$/progress"}
{"level":"warn","time":"2024-10-14T10:49:09.882-0400","message":"notify returned","method":"$/progress"
{"level":"warn","time":"2024-10-14T10:49:09.882-0400","message":"notify returned","method":"$/progress"}
{"level":"warn","time":"2024-10-14T10:49:09.882-0400","message":"notify returned","method":"$/progress"}
{"level":"warn","time":"2024-10-14T10:49:09.882-0400","message":"notify returned","method":"$/progress"}
{"level":"warn","time":"2024-10-14T10:49:09.882-0400","message":"could not find image for \\"file:///Users/stefanvanburen/.cache/buf/v3/modules/b5/buf.build/bufbuild/protovalidate/b983156c5e994cc9892e0ce3e64e17e0/files/buf/validate/priv/private.proto\\""}}
Anyway — perhaps worth a separate issue, as it seems like the LSP should be able to manage the cache, but happy if you want to close this particular one out.
Yeah I don't think this is quite as much of an issue. Let's close it.
Let's keep this open, but retitle the issue - while the panic is fixed, the LSP still doesn't function with an empty cache. The rest of the CLI populates the cache on demand, without explicit intervention from the user, and the LSP ought to do the same.
GitHub repository with your minimal reproducible example (do not fill out this field with "github.com/bufbuild/buf" or we will automatically close your issue, see the instructions above!)
https://github.com/bufbuild/registry-proto
Commands
Output
From
:messages
:From
:LspLog
:Expected Output
No
panic
.Anything else?
Ideally, the LSP should handle downloading required modules to the cache.