OOP: Remove DiagnosticData.Workspace#35902
Merged
tmat merged 14 commits intodotnet:masterfrom Jun 3, 2019
Merged
Conversation
Member
Author
|
@heejaechang PTAL |
Member
Author
|
@dotnet/roslyn-ide |
src/VisualStudio/Core/Def/Implementation/TableDataSource/TableItem.cs
Outdated
Show resolved
Hide resolved
src/VisualStudio/Core/Def/Implementation/TableDataSource/VisualStudioBaseTodoListTable.cs
Outdated
Show resolved
Hide resolved
src/VisualStudio/Core/Def/Implementation/TaskList/ExternalErrorDiagnosticUpdateSource.cs
Outdated
Show resolved
Hide resolved
src/Workspaces/Core/Portable/Diagnostics/InternalDiagnosticsOptions.cs
Outdated
Show resolved
Hide resolved
Contributor
|
This is great. Nothing struck me as bad here. Though i didn't look closely at some parts of hte logic that seem a little on hte complex side. One concern i have (which may be better than how things worked before) is how resilient we are to the diagnostic data being stale wrt the current state of the workspace. Is the code the interacts between teh two suitably safe toward drift between them? |
| public static DiagnosticData CreateAnalyzerLoadFailureDiagnostic(string fullPath, AnalyzerLoadFailureEventArgs e) | ||
| { | ||
| return CreateAnalyzerLoadFailureDiagnostic(null, null, null, fullPath, e); | ||
| return CreateAnalyzerLoadFailureDiagnostic(projectId: null, language: null, fullPath, e); |
| public ImmutableArray<TItem> Deduplicate(IEnumerable<IList<TItem>> groupedItems) | ||
| => groupedItems.MergeDuplicatesOrderedBy(Order); | ||
|
|
||
| public abstract IEnumerable<TItem> Order(IEnumerable<TItem> groupedItems); |
Contributor
There was a problem hiding this comment.
maybe doc this a bit... it's not clear to me what'd going on.
| LinePosition trackingLinePosition; | ||
|
|
||
| if (workspace.IsDocumentOpen(documentId) && | ||
| (trackingLinePosition = GetTrackingLineColumn(document, index)) != LinePosition.Zero) |
Contributor
There was a problem hiding this comment.
i'm not sure i understand what's going on here. can you doc?
src/VisualStudio/Core/Def/Implementation/TableDataSource/DiagnosticTableItem.cs
Outdated
Show resolved
Hide resolved
src/VisualStudio/Core/Def/Implementation/TableDataSource/DiagnosticTableItem.cs
Show resolved
Hide resolved
| return builder.ToImmutableAndFree(); | ||
| } | ||
|
|
||
| private static TableItem<T> Deduplicate<T>(this IList<TableItem<T>> duplicatedItems) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Remove dependency on mutable state. The workspace the diagnostic data originated from is available thru
DiagnosticsUpdatedArgsand theDiagnosticDatado not need the reference.