-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Add assemblies and packages for new code style analyzer distribution #18285
Conversation
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.
Overall structure / infra looks good!
<file src="$thirdPartyNoticesPath$" target="" /> | ||
|
||
<!-- Scripts --> | ||
<file src="..\..\src\Setup\PowerShell\install.ps1" target="tools\" /> |
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.
Yes you need these if someone's installing the package to a packages.config-based project which is still the majority of projects out there.
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.
👍 Overall, this looks good.
My big concern is about how we do this transition with incurring perf/dll load issues in the default VS cases.
One approach might be including files in these projects as links/extracting the code out to a shared project. Not sure if people have other ideas. Otherwise, we're looking at 2dll loads for each language, which I'm not sure we'll get approval for without winning them back somewhere else.
src/NuGet/BuildNuGets.csx
Outdated
@@ -122,6 +124,8 @@ string[] TestPackageNames = { | |||
var PreReleaseOnlyPackages = new HashSet<string> | |||
{ | |||
"Microsoft.CodeAnalysis.Build.Tasks", | |||
"Microsoft.CodeAnalysis.CSharp.CodeStyle", | |||
"Microsoft.CodeAnalysis.VisualBasic.CodeStyle", |
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.
why are these pre-release only? When we ship a final release, we'll want to upload these?
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.
I literally took a guess and went with it, and then added @tmat as a required reviewer. 😆
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.
As the comment above says, are we not going to publish these on nuget?
In reply to: 108894557 [](ancestors = 108894557)
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.
We are planning to publish these on NuGet. Does that mean I should remove them from PreReleaseOnlyPackages
from the start (i.e. before they would actually be considered "ready for public release")?
Also, your comment only shows up in the Diff view for some reason. May I ask what client you used to create that comment?
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.
</metadata> | ||
<files> | ||
<file src="Dlls\CSharpCodeStyle\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll" target="analyzers\dotnet\cs" /> | ||
<file src="Dlls\CSharpCodeStyle\Microsoft.CodeAnalysis.CSharp.CodeStyle.xml" target="analyzers\dotnet\cs" /> |
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 if it makes sense to distribute these for analyzers.
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.
I was thinking the same thing. I'm pretty sure the answer is we don't need them, so I'll go ahead and remove them now.
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.
Looks like a great starting point. Thanks.
Oh, I'm worried about this too, but the big perf hit isn't going to be the DLL load. The switch from IDE- to NuGet-based analyzers will cause the code style analyzers to be regularly run against entire code bases, as opposed to only running them against files open in the IDE. I would not be surprised to find this leads to required perf work in both the code style analyzers themselves and the analyzer driver. On the bright side, improvements to the latter could lead to a big perf win for external analyzer projects which are already being shipped as NuGet packages. |
16d7b40
to
f2ed1cc
Compare
retest ubuntu_14_debug_prtest please |
ede889b
to
fd14e14
Compare
45db511
to
fadf696
Compare
@alrz It was not my original intent for the FxCop analyzers to move to these packages. The main short-term goal is to move several of the existing IDExxxx analyzers away from being IDE-specific to being able to run during command line builds (and thus on CI servers). We're facing some big hurdles right now related to the fact that some of these analyzers use APIs that are only available while working in the IDE (mostly related to configurable options). I wanted to get the first step of creating these projects out of the way so the 50 changed files you see here don't interfere with our ability to review upcoming proposals related to exposing options to analyzer authors in a uniform way. |
|
@jmarolf Okay, thanks for the response! Looking forward to them being released. |
Fixes #18278.
New analyzer packages:
New projects containing code distributed with the above packages:
New test projects:
Notes for specific reviewers:
@srivatsn: Please review the inclusion of install.ps1 and uninstall.ps1 in the new analyzer NuGet packages. Are these still necessary (or does NuGet automatically add references now), and if so, is this how you would include them?
@jaredpar I know you care about infrastructure, and also thanks for all the help leading up to this! 👏
@dpoeschl Is this enough of a foundation for us to work in parallel on the migration?
@Pilchie Please review the proposed NuGet package names and manner of distribution, etc.
@tmat Please review the change to BuildNuGets.csx.