vscode-clangd icon indicating copy to clipboard operation
vscode-clangd copied to clipboard

Highlight outdated clangd version in logs when appropriate

Open ravenblackx opened this issue 1 year ago • 2 comments

When clangd crashes in vscode (and in my case drops a core dump) there is no indication if the clangd version is "not latest", which was the case for me. There is the action clangd: Check for language server updates, but it's not particularly discoverable, and, at the user level, I wasn't even aware that the clangd version was not distributed with the extension, leading me to pointlessly file this issue and thereby waste someone else's time.

It would be nice if the crash log event performed a version check and highlighted it like "you're running an unsupported version of clangd, try updating to [latest version], (update instructions link)" if the version is older than the recommended one. There is a popup for "crashed five times so not restarting" which would also be a fine place to do that check (or even just, as a very low-effort option, suggest to the user running the check for language server updates action).

ravenblackx avatar Sep 24 '24 16:09 ravenblackx

One thing to determine to implement something like this is what is considered "unsupported".

Is only the latest version considered supported? If so, how soon after the release of a new version is the old version considered unsupported?

HighCommander4 avatar Sep 24 '24 20:09 HighCommander4

Well, that problem is easily solved by changing the wording a bit, it doesn't have to say unsupported. "You are not running the latest stable version" would be fine. The point of the idea is if you have a recurring crash, 1. updating might fix it, and 2. reporting a bug while running an older version would most likely be a waste of your time and the triage person's time.

(In my case updating did fix the recurring crash but now I occasionally instead get "clangd eats all the memory and basically crashes the whole host". Much more rarely than the crashes, but also much more difficult to file a useful bug because there's no stack trace and when it happens everything else stops responding so I can't attach gdb to it or anything either. Probably need to wrap it in a ulimit script or something.)

Edit: when I wrote "unsupported" I was thinking in the sense of "probably nobody is going to investigate your bug report" rather than "it's not going to get security patches" or "it's not expected to run" or whatever.

ravenblackx avatar Sep 25 '24 00:09 ravenblackx