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

DotNet SDK 2.1.300 no longer loads satellite assemblies for StyleCop.Analyzers #2332

Closed
vweijsters opened this issue Jun 13, 2018 · 3 comments
Assignees
Milestone

Comments

@vweijsters
Copy link

A localization issue was reported for StyleCop.Analyzers when using SDK 2.1.300 (see DotNetAnalyzers/StyleCopAnalyzers#2715).
I've done builds with diagnostic logging for 2.1.201 and 2.1.300 and I've compared the output.
The logging for 2.1.201 shows that satellite assemblies for StyleCop.Analyzers are detected and used. The satellite assemblies are absent from the log file for 2.1.300.

TestDotNet.zip contains the test project used and the diagnostic log files when building with 2.1.201 and 2.1.300.

@livarcocc livarcocc added this to the 2.1.3xx milestone Jun 13, 2018
@livarcocc
Copy link
Contributor

@dsplaisted @nguerrera can one of you take a look when you have a chance?

@nguerrera nguerrera self-assigned this Jun 15, 2018
@nguerrera
Copy link
Contributor

Hmm, I did change things to stop passing every analyzer satellite as an analyzer to the compiler. This appeared to be a bug with over-aggressive pattern matching for analyzer assemblies in assets file.

My expectation was that like any other assembly, analyzers would find their satellites by convention next to them in culture-specific sub-folders. Therefore, there would be no need to pass them to the compiler.

I suspect the issue is that on CoreCLR, the compiler has the same problem that MSBuild once had: dotnet/msbuild#2203. I further suspect that the over-aggressive pattern matching was masking that by forcing the compiler to pre-load all analyzer satellites. If I'm right, I doubt it was deliberately designed to work that way as it would be bad for performance to require satellites for unused cultures to be loaded.

(Aside: we shouldn't even have any pattern matching of our own to identify analyzer assemblies, but NuGet still hasn't been updated to identify them for us as they do for compilation and runtime assets: NuGet/Home#6279)

cc @agocke @jaredpar

@nguerrera
Copy link
Contributor

This issue was moved to dotnet/roslyn#29014

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

No branches or pull requests

3 participants