-
-
Notifications
You must be signed in to change notification settings - Fork 745
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
Switch to Roslyn component versioning #1251
Conversation
e9d3e96
to
b3cefe4
Compare
<Target Name="_RefitAnalyzerMultiTargeting" | ||
Condition="'$(SupportsRoslynComponentVersioning)' != 'true'" | ||
AfterTargets="ResolvePackageDependenciesForBuild;ResolveNuGetPackageAssets" | ||
DependsOnTargets="_RefitGatherAnalyzers"> | ||
|
||
<ItemGroup> | ||
<!-- Remove our analyzers targeting roslyn4.x --> | ||
<Analyzer Remove="@(_RefitAnalyzer)" | ||
Condition="$([System.String]::Copy('%(_RefitAnalyzer.Identity)').IndexOf('roslyn4')) >= 0"/> | ||
</ItemGroup> | ||
</Target> |
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.
📝 The addition here is special handling to support .NET SDK prior to 6.0 RC 2
<Target Name="_RefitRemoveAnalyzers" | ||
Condition="'$(DisableRefitSourceGenerator)' == 'true'" | ||
AfterTargets="ResolvePackageDependenciesForBuild;ResolveNuGetPackageAssets" | ||
DependsOnTargets="_RefitGatherAnalyzers"> | ||
|
||
<!-- Remove all our analyzers --> | ||
<ItemGroup> | ||
<Analyzer Remove="@(_RefitAnalyzer)" /> | ||
</ItemGroup> | ||
</Target> |
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.
📝 The addition here is special handling to allow users to disable the Refit source generator using a build property
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.
This looks good to me
Note that .NET 6 SDK RC 2 is not yet available on the downloads page, so for the (very) near-term future this change might appear to just disable the incremental source generator features. |
@sharwell I'm going to wait until RC2 is published before merging and publishing update to this. Do we still need the pre-RC 2 handling checks? Is that needed for .NET 5 / earlier SDK's to not break? |
Yes, otherwise earlier SDKs will be back in the place that led to #1222 |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
DisableRefitSourceGenerator
to true (derived from MultiTargetRoslynComponent.targets)Closes #1244