Code actions not provided if code action provider takes ~2 seconds or longer #232679
Labels
bug
Issue identified by VS Code Team member as probable bug
candidate
Issue identified as probable candidate for fixing in the next release
editor-code-actions
Editor inplace actions (Ctrl + .)
insiders-released
Patch has been released in VS Code Insiders
regression
Something that used to work is now broken
verified
Verification succeeded
Milestone
Does this issue occur when all extensions are disabled?: No
Issue:
If a code action provider takes ~2 seconds (or longer) to provide code actions, actions from that provider will not be shown in the lightbulb. This seems to be a behavior change between 1.94.2 and 1.95.0.
I suspect that this will be a fairly impactful issue for the C# extension. We first noticed this when all our code action integration tests started failing after the update to 1.95.0 with all our code actions missing from the lightbulb (we 'fixed' it by rolling back the vscode version temporarily - dotnet/vscode-csharp#7708).
This vscode side change looks potentially related - 7f269ef#diff-de403ad3613f99afdc0e0c040d79b78e556bbd6bdc462cfb40bd857e354f0a43L122
I'm not sure if this was intentionally applied to all lightbulb invocations (instead of just on save), but if it was I would ask to reconsider. While we endeavor to provide code actions quickly, there are many scenarios where it can take additional time. For example, slow analyzers, running source generators, or during project loading. The timeout is quite short, and I have hit this at least a few times already today while using our extension.
Steps to Reproduce:
For a repro, see this commit - dibarbet/vscode-extension-samples@18b3a30
The text was updated successfully, but these errors were encountered: