-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Update features to fork solution once instead of forking once per changed document. #73396
Update features to fork solution once instead of forking once per changed document. #73396
Conversation
produceItems: static async (document, callback, fallbackOptions, cancellationToken) => | ||
{ | ||
if (await document.IsGeneratedCodeAsync(cancellationToken).ConfigureAwait(false)) | ||
return; |
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.
view with whitespace off.
document = await RemoveUnnecessaryImportsWorkerAsync( | ||
document, | ||
CreateImports(document, names, withFormatterAnnotation: false), | ||
cancellationToken).ConfigureAwait(false); |
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 was wacky. we were updating the documents serially, and then doing a parallel processing of it below.
where TDocumentState : TextDocumentState | ||
{ | ||
return UpdateDocumentsInMultipleProjects(projectIdAndNewDocuments, addDocumentsToProjectState); | ||
} |
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.
removed this
=> oldDocument.TryGetText(out var oldText) && text == oldText; | ||
} | ||
|
||
private SolutionCompilationState WithDocumentContents<TContent>( |
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.
added this helper used by WithDocumentTexts and WithDocumentSyntaxRoots
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.
@@ -241,17 +242,26 @@ CodeAction CreateNewCodeAction(string actionName, bool allOccurrences, Introduce | |||
var rewriter = new IntroduceParameterDocumentRewriter(this, originalDocument, | |||
expression, methodSymbol, containingMethod, selectedCodeAction, fallbackOptions, allOccurrences); |
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.
i checked, and rewriter should be safe to use concurrently from within produceItems below.
@jasonmalinowski For review when you get back. |
No description provided.