Skip to content

Conversation

@CyrusNajmabadi
Copy link
Contributor

No description provided.

@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner December 18, 2024 16:01
@ghost ghost added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Dec 18, 2024
@CyrusNajmabadi
Copy link
Contributor Author

@jasonmalinowski @JoeRobich ptal.

if (_service.IsConstructorInitializerGeneration(_document, node, cancellationToken))
{
if (!await TryInitializeConstructorInitializerGenerationAsync(node, cancellationToken).ConfigureAwait(false))
if (!TryInitializeConstructorInitializerGeneration(node, cancellationToken))
Copy link
Contributor Author

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.

=> Task.FromResult(SymbolFinderInternal.FindSourceDefinition(symbol, solution, cancellationToken));

/// <inheritdoc cref="FindSourceDefinitionAsync"/>
internal static ISymbol? FindSourceDefinition(
Copy link
Contributor Author

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.


if (tokenNeedsConflictCheck)
{
newToken = RenameAndAnnotateAsync(token, newToken, isRenameLocation, isOldText).WaitAndGetResult_CanCallOnBackground(_cancellationToken);
Copy link
Contributor Author

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);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this oen as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead VSCode

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants