Skip to content

Compute solution explorer diagnostic descriptors in OOP process.#79802

Merged
CyrusNajmabadi merged 7 commits intodotnet:mainfrom
CyrusNajmabadi:oopDiagnosticDescriptors
Aug 6, 2025
Merged

Compute solution explorer diagnostic descriptors in OOP process.#79802
CyrusNajmabadi merged 7 commits intodotnet:mainfrom
CyrusNajmabadi:oopDiagnosticDescriptors

Conversation

@CyrusNajmabadi
Copy link
Contributor

This is needed so that hte VS ui properly updates when analyzers change on disk.

}
}

private async Task<(ImmutableArray<BaseItem>, ImmutableArray<BaseItem>)> GetLatestItemsAsync(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

definitely view with whitespace off.

@CyrusNajmabadi
Copy link
Contributor Author

@jasonmalinowski ptal.

@CyrusNajmabadi CyrusNajmabadi changed the title Compute diagnostic descriptors in OOP process. Compute solution explorer diagnostic descriptors in OOP process. Aug 6, 2025
using Microsoft.VisualStudio.Language.Intellisense;
using Microsoft.VisualStudio.Shell;
using Roslyn.Utilities;
using VSLangProj140;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed in followup pr.

async ValueTask<ImmutableArray<DiagnosticDescriptor>> GetDiagnosticDescriptorsAsync()
{
// Call out to oop to do this if possible. This way we don't actually load the analyzers in proc.
// this also allows
Copy link
Member

Choose a reason for hiding this comment

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

what does it allow 😆

Copy link
Member

Choose a reason for hiding this comment

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

image

I suspect this is supposed to mean that we also support refreshing this if the underlying analyzer changes.

@CyrusNajmabadi CyrusNajmabadi merged commit 498e8d3 into dotnet:main Aug 6, 2025
25 checks passed
@CyrusNajmabadi CyrusNajmabadi deleted the oopDiagnosticDescriptors branch August 6, 2025 19:39
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Aug 6, 2025
Comment on lines +129 to +130
var analyzerReference = project.AnalyzerReferences
.First(r => r.FullPath == analyzerReferenceFullPath);
Copy link
Member

Choose a reason for hiding this comment

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

Do we not support sending an AnalyzerReference across the wire directly?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

not currently. since an AnalyzerRef can truly be just an in-memory object (this is how tests often work for example) as opposed to something necessarily backed by a file/bytes. This is similar to MetadataReference which has PortableExecutionReference, and this is similar to how we have handled those sorts of entities in the past between processes.

Note: syncing is able to send hte bytes over (if a reference backed by bytes), but API calls then need an appropriate way to reference that entity (which uses file paths).

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants