-
Notifications
You must be signed in to change notification settings - Fork 358
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
Exclude inboxed analyzers from VerifyClosure task #7624
Conversation
As per https://github.com/dotnet/designs/blob/main/accepted/2021/InboxSourceGenerators.md inboxed source generators are placed under ref/ folder, and need to be excluded from RuntimePack reference check. Fixes broken build dotnet/windowsdesktop#1803
Tagged as critical as we're unable to build Windows Desktop, and thus won't be able to snap for Preview7. |
@@ -457,6 +457,9 @@ | |||
|
|||
<ItemGroup Condition="'$(PlatformPackageType)' == 'RuntimePack'"> | |||
<IgnoredReference Include="@(RuntimePackAsset->'%(FileName)')" /> | |||
<!-- Ignore inboxed analyzers --> | |||
<IgnoredReference Include="@(Reference->'%(FileName)')" |
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.
Analyzers shouldn’t be raised as references. They are not listed as references in the framework list. This is only happening because you are making an old SDK use a new ref pack. This can go away once you pick up a Preview7 SDK with dotnet/sdk@07768a0#diff-1b35791f7e51f6b95005b2fb7aa5e65ceca0d11578158af081003c91d97b4373R80
This workaround Is fine for now, but please delete it once you update the SDK.
They are not, see comment above. |
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.
Ok for now but please remove after Preview7
@lukas-lansky @MattGal: Can this be merged now? Thanks. |
/cc @dotnet/wpf-developers |
Actually, I hadn't realized this was in Arcade. You could have done this in the WindowsDesktop repo itself and save yourself having to wait for Arcade update. No need to do this in the shared framework SDK. The place to do so is here: https://github.com/dotnet/windowsdesktop/blob/2f830140b7df74ebcf518b73b9252534e751a7ef/pkg/windowsdesktop/sfx/Directory.Build.targets#L29-L40 You could simply list the single assembly name that's causing trouble: |
Upon closer inspection, this isn't just a validation problem. Those references are actually appearing in product binaries:
This is because C++/CLI doesn't behave like CSC WRT to only emitting references it uses. C++/CLI will produce assemblies with assembly refs regardless of whether or not the assembly is used. We need to prevent C++/CLI from seeing those references. |
As per https://github.com/dotnet/designs/blob/main/accepted/2021/InboxSourceGenerators.md inboxed source generators are placed under ref/ folder, and need to be excluded from RuntimePack reference check.
Fixes broken build dotnet/windowsdesktop#1803
Tested locally manually modifying C:\Development\windowsdesktop.packages\microsoft.dotnet.sharedframework.sdk\6.0.0-beta.21363.2\targets\sharedfx.targets and getting the build to pass: