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

Use the BannedApiAnalyzer instead of the LinqPoison mechanism to ban Linq in the managed type system #86673

Merged
merged 3 commits into from
May 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
-->
<MicrosoftCodeAnalysisVersion_LatestVS>4.5.0</MicrosoftCodeAnalysisVersion_LatestVS>
<!-- Some of the analyzer dependencies used by ILLink project -->
<MicrosoftCodeAnalysisBannedApiAnalyzersVersion>3.3.2</MicrosoftCodeAnalysisBannedApiAnalyzersVersion>
<MicrosoftCodeAnalysisBannedApiAnalyzersVersion>3.3.5-beta1.23270.2</MicrosoftCodeAnalysisBannedApiAnalyzersVersion>
</PropertyGroup>
<!--
These packages affect the design-time experience in VS, so we update them at the same cadance as the MicrosoftCodeAnalysisVersion_LatestVS version.
Expand Down
20 changes: 0 additions & 20 deletions src/coreclr/tools/Common/TypeSystem/Common/LinqPoison.cs

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
N:System.Linq;The type system needs to be low level enough to be usable as an actual runtime type system. LINQ is not low level enough to be allowable in the type system.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Condition = "'$(EnableDiaSymReaderUse)' == 'true'" Include="Microsoft.DiaSymReader">
<PackageReference Condition="'$(EnableDiaSymReaderUse)' == 'true'" Include="Microsoft.DiaSymReader">
<Version>1.4.0</Version>
</PackageReference>
</ItemGroup>
Expand Down Expand Up @@ -252,9 +252,6 @@
<Compile Include="..\..\Common\TypeSystem\Common\LayoutInt.cs">
<Link>TypeSystem\Common\LayoutInt.cs</Link>
</Compile>
<Compile Include="..\..\Common\TypeSystem\Common\LinqPoison.cs">
<Link>TypeSystem\Common\LinqPoison.cs</Link>
</Compile>
<Compile Include="..\..\Common\TypeSystem\Common\MetadataType.cs">
<Link>TypeSystem\Common\MetadataType.cs</Link>
</Compile>
Expand Down Expand Up @@ -667,4 +664,15 @@
<Link>TypeSystem\Sorting\TypeSystemComparer.cs</Link>
</Compile>
</ItemGroup>

<ItemGroup>
<AdditionalFiles Include="BannedSymbols.txt" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" Version="$(MicrosoftCodeAnalysisBannedApiAnalyzersVersion)" Condition="'$(DotNetBuildFromSource)' != 'true'">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
</Project>