Closed skittles1412 closed 1 year ago
Thank you for the request, and thanks again for the detailed request!
I have not tried the extension, but there is a possible stability issue I can see, detailed below. And installing (or allowing the install of) another extension is a vouch on supporting it. Thus, from a technical perspective, it means investing additional time -- even if now it would take 3 lines to add support. Thus, I am reluctant to add this.
I see that it's version 0.1.24. This usually means that it is not stable enough just yet.
Also, looking through the issues, it seems that there are many small improvements still waiting, and annoying bugs ( https://github.com/clangd/vscode-clangd/issues/94 and https://github.com/clangd/vscode-clangd/issues/494 ). If these would happen in the contest, it would have a really bad thing. (for example, hitting multiple crashes, one would try restarting the LSP, which could hit the other bug)
I have not investigated for more than 20 minutes, so I might very well be mistaken. If there is any additional insight You (or others interested in the extension) can give, I would be happy to hear.
PS on a personal note, I like the idea of a VSCode extension straight from LLVM and clangd. I would really like to be mistaken :)
I have been using the clangd extension for a long time; even on very large C/C++ code bases. I have seen my fair share of clangd crashes, it does happen from time to time, though I want to emphasize that it is not the norm in my experience. Nonetheless, I would only feel comfortable adding it if it is made clear, that it is provided on an "as-is" basis. (I believe this should be the case for every (most?) vscode extensions that area shipped.) We cannot really do more than
clangd
(this is done automatically by extension), and if that fails, then.cache/clangd
directory from the workspaceif it starts crashing.
Hi,
Thanks for taking the time to look at the extension.
I believe the first bug you mentioned is triggered only when clangd hasn't been activated yet. For example, the bug would be triggered if a contestant opened VSCode then attempted to restart the language server before opening any .cpp files. Restarting the language server after it has crashed should work fine.
I think despite the versioning, the extension is fairly stable. It's an official extension (and in fact the only official clangd editor extension, as far as I can tell) and is recommended by clangd (source).
If you don’t have strong feelings about an editor, we suggest you try out VSCode, it has excellent language server support and most faithfully demonstrates what clangd can do.
I believe there are other editors in the current VM configured to use clangd as a language server. I don't think the vscode extension would be necessarily more buggy or error-prone than those editors. The language server crashing is a real possibility, but it also isn't specific to this extension. In that case, restarting the language server doesn't take too long (less than a minute) and contestants can still code, albeit without intellisense.
All that said, I understand that one more extension would mean one more thing to keep track of and manage. I don't wish for it to cause too much of a burden, and I'd understand if the final decision is to not include the extension.
Once again, thanks for your time.
Can you confirm that an (LSP, vscode) restart or cache cleanup removes any possible issue? @pobrn
No files are corrupted, VSCode is able to start up...?
The issues I have experienced were mostly related to clangd
, not the extension itself. And as far as I can tell clangd
is shipped, so I cannot see any reason not to provide the vscode extension for it.
Can you confirm that an (LSP, vscode) restart or cache cleanup removes any possible issue?
All I can say is that in the vast majority of cases restarting clangd
and/or removing its data about the workspace (.cache/clangd
) were enough to make it work again.
Hi,
Would it be possible to include the VSCode clangd extension (vsix file from github releases at https://github.com/clangd/vscode-clangd/releases/download/0.1.24/vscode-clangd-0.1.24.vsix)?
It's better and more powerful than the currently installed c++ extension in terms of intellisense.
However, if installed, users would need to disable the intellisense of the current c++ extension to avoid conflicts, so probably it'll need to be included but not installed by default.
Thanks!