-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make codepaths sync that don't need to be async #76490
Conversation
@jasonmalinowski @JoeRobich ptal. |
@@ -92,17 +92,17 @@ private async Task<bool> TryInitializeAsync( | |||
{ | |||
if (_service.IsConstructorInitializerGeneration(_document, node, cancellationToken)) | |||
{ | |||
if (!await TryInitializeConstructorInitializerGenerationAsync(node, cancellationToken).ConfigureAwait(false)) | |||
if (!TryInitializeConstructorInitializerGeneration(node, cancellationToken)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The core api these were all calling into is SymbolFinder.FindSourceDefinitionAsync. This method is just a wrapper around the synchronous SymbolFinder.FindSourceDefinition method (but part of the public api, so we can't remove it). Updating all internal callers to call the synchronous version caused a lot of code to become synchronous.
|
||
/// <inheritdoc cref="FindSourceDefinitionAsync"/> | ||
internal static ISymbol? FindSourceDefinition( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved to shared location so it can be accessed by code-style layer as well.
@@ -241,8 +241,7 @@ public override SyntaxToken VisitToken(SyntaxToken token) | |||
|
|||
if (tokenNeedsConflictCheck) | |||
{ | |||
newToken = RenameAndAnnotateAsync(token, newToken, isRenameLocation, isOldText).WaitAndGetResult_CanCallOnBackground(_cancellationToken); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removing this WaitAndGetResult_CanCallOnBackground was the original goal here.
_solution, | ||
symbols, | ||
_cancellationToken) | ||
.WaitAndGetResult_CanCallOnBackground(_cancellationToken); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this oen as well.
No description provided.