Skip to content
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

Reuse Roslyn's analyzer assembly loader #2236

Merged

Conversation

jasonmalinowski
Copy link
Contributor

@jasonmalinowski jasonmalinowski commented Sep 17, 2021

Roslyn has made some improvements to better handle the case where analyzers or generators have a mix of assembly versions, such as in microsoft/CsWin32#218. The Roslyn changes were made in dotnet/roslyn#56432, and this consumes it.

Copy link
Member

@filipw filipw left a comment

Choose a reason for hiding this comment

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

thanks a lot for keeping this up to date

Roslyn has made some improvements to better handle the case where
analyzers or generators have a mix of assembly versions, such as
in microsoft/CsWin32#218. The Roslyn
changes were made in dotnet/roslyn#56432, and
this consumes it.
{
public static class ShadowCopyAnalyzerAssemblyLoader
{
public static readonly IAnalyzerAssemblyLoader Instance = OmnisharpAnalyzerAssemblyLoaderFactory.CreateShadowCopyAnalyzerAssemblyLoader();
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 is here because the Omnisharp.Host project doesn't have internals access to Microsoft.CodeAnalysis.ExternalAccess.Omnisharp; I don't know if that was an accidental oversight or intentional layering, but following it for now.

Copy link
Member

Choose a reason for hiding this comment

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

I'm sure it just wasn't necessary for the initial round of reflection removal. This seems fine for now.

@jasonmalinowski
Copy link
Contributor Author

This is now ready for review now that we sorted everything else out.

@jasonmalinowski jasonmalinowski marked this pull request as ready for review January 26, 2022 21:22
@JoeRobich JoeRobich merged commit 12559b1 into OmniSharp:master Jan 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants