-
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
Unify code paths that update ordinary/additional/analyzerconfig documents #74441
Conversation
} | ||
} | ||
|
||
internal sealed class TouchAnalyzerConfigDocumentsAction( |
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.
Separate this action from ProjectCompilationOptionsAction
.
} | ||
|
||
return null; | ||
} | ||
} | ||
|
||
internal sealed class TouchAdditionalDocumentAction( | ||
internal sealed class TouchAdditionalDocumentsAction( |
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.
Allow multiple documents to be changed at the same time, like TouchDocumentsAction.
@@ -856,34 +869,36 @@ public ProjectState UpdateDocuments(ImmutableArray<DocumentState> newDocuments, | |||
} | |||
|
|||
public ProjectState UpdateAdditionalDocument(AdditionalDocumentState newDocument, bool contentChanged) | |||
=> UpdateAdditionalDocuments([AdditionalDocumentStates.GetRequiredState(newDocument.Id)], [newDocument], contentChanged); | |||
|
|||
public ProjectState UpdateAdditionalDocuments(ImmutableArray<AdditionalDocumentState> oldDocuments, ImmutableArray<AdditionalDocumentState> newDocuments, bool contentChanged) |
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.
Follow the same pattern as UpdateDocuments
4a654a8
to
7b2064b
Compare
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
c432a2c
to
38012d8
Compare
38012d8
to
8fbb4cd
Compare
@ToddGrun ptal |
|
||
// Must not be empty as we would have otherwise bailed out in the check above. | ||
Contract.ThrowIfTrue(newDocuments.IsEmpty); | ||
Contract.ThrowIfTrue(oldDocuments.IsEmpty); |
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.
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.
Not sure I follow. The contract has been there before.
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.
But it would have returned before hitting the contract failure previously, right?
src/Workspaces/Core/Portable/Workspace/Solution/SolutionCompilationState.cs
Show resolved
Hide resolved
src/Workspaces/Core/Portable/Workspace/Solution/SolutionCompilationState.cs
Show resolved
Hide resolved
src/Workspaces/Core/Portable/Workspace/Solution/SolutionCompilationState.cs
Show resolved
Hide resolved
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.
Refactoring of ProjectState and SolutionCompilationState.