Skip to content

Switch to calling into IAsyncLightBulbSession directly to avoid polling.#57316

Merged
CyrusNajmabadi merged 6 commits intodotnet:mainfrom
CyrusNajmabadi:testAsyncDirectly
Oct 28, 2021
Merged

Switch to calling into IAsyncLightBulbSession directly to avoid polling.#57316
CyrusNajmabadi merged 6 commits intodotnet:mainfrom
CyrusNajmabadi:testAsyncDirectly

Conversation

@CyrusNajmabadi
Copy link
Copy Markdown
Contributor

@CyrusNajmabadi CyrusNajmabadi commented Oct 21, 2021

Fixes #57321
Fixes #57326

@ghost ghost added the Area-IDE label Oct 21, 2021
@CyrusNajmabadi CyrusNajmabadi marked this pull request as ready for review October 26, 2021 21:46
@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner October 26, 2021 21:46
Comment on lines -58 to -59
if (status is not QuerySuggestedActionCompletionStatus.Completed and
not QuerySuggestedActionCompletionStatus.Canceled)
Copy link
Copy Markdown
Contributor

@sharwell sharwell Oct 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 This (the old code) is completely broken, leading to issues like #57326. TryGetSuggestedActionSets ignores pending asynchronous requests and returns Completed instead of returning the aggregate status InProgress.

@CyrusNajmabadi CyrusNajmabadi requested a review from a team October 27, 2021 20:50
return true;

await suggestedAction.GetTestAccessor().InvokeAsync();
broker.DismissSession(view);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 This is the key difference. We explicitly dismiss the light bulb session before invoking the action from it.


const VSConstants.VSStd2KCmdID ECMD_SMARTTASKS = (VSConstants.VSStd2KCmdID)147;
var cmdID = ECMD_SMARTTASKS;
var cmdID = VSConstants.VSStd14CmdID.ShowQuickFixes;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 This is the action bound to Ctrl+.

@CyrusNajmabadi CyrusNajmabadi merged commit 5c3f1e9 into dotnet:main Oct 28, 2021
@ghost ghost added this to the Next milestone Oct 28, 2021
@allisonchou allisonchou modified the milestones: Next, 17.1.P2 Nov 30, 2021
@CyrusNajmabadi CyrusNajmabadi deleted the testAsyncDirectly branch February 1, 2022 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Integration tests fail to wait for async light bulb Light bulb menu showed up over Pick Members dialog

5 participants