Skip to content

Extract async navigation portions of https://github.com/dotnet/roslyn/pull/55635#55891

Merged
CyrusNajmabadi merged 46 commits intodotnet:mainfrom
CyrusNajmabadi:holdDocs3
Aug 26, 2021
Merged

Extract async navigation portions of https://github.com/dotnet/roslyn/pull/55635#55891
CyrusNajmabadi merged 46 commits intodotnet:mainfrom
CyrusNajmabadi:holdDocs3

Conversation

@CyrusNajmabadi
Copy link
Copy Markdown
Contributor

#55635 Is a bit large in the amount of change it causes (and potential risk it introduces). Thsi PR pulls out the portions of that PR that update several codepaths to be async and to avoid sync-over-async-over-sync-etc.

@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner August 25, 2021 18:45
@CyrusNajmabadi CyrusNajmabadi requested a review from a team August 25, 2021 18:45
@ghost ghost added the Area-IDE label Aug 25, 2021
FunctionId.CommandHandler_FindAllReference,
KeyValueLogMessage.Create(LogType.UserAction, m => m["type"] = "streaming"),
cancellationToken))
try
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this is jus tmoving to a try/finally so all return paths call ONCompletedAsync.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

viewing this PR with whitespace off will help.

i => GoToDefinitionHelpers.GetDefinitions(
i, solution, thirdPartyNavigationAllowed: false, cancellationToken)).ToImmutableArray();

var title = string.Format(EditorFeaturesResources._0_implemented_members,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this entire synchronous codepath will hopefully go away in a future PR.

Copy link
Copy Markdown
Member

@davidwengier davidwengier left a comment

Choose a reason for hiding this comment

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

I can't comment on the implications of this but that changes themselves seem okay ¯\_(ツ)_/¯

@CyrusNajmabadi CyrusNajmabadi merged commit c37c15b into dotnet:main Aug 26, 2021
@CyrusNajmabadi CyrusNajmabadi deleted the holdDocs3 branch August 26, 2021 17:12
@ghost ghost added this to the Next milestone Aug 26, 2021
if (presenter != null)
{
// Can only navigate or present items on UI thread.
await threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@CyrusNajmabadi there's a bunch of ConfigureAwait(false)es after this -- expected?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

taken offline. yes :)

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.

4 participants