Skip to content

Commit 69702c3

Browse files
authored
Clean up S.N.Tensors project in main (#94378)
* Clean up S.N.Tensors project in main - Remove stale build targets - Remove ifdefs for .NET 8 - Remove stale IVT * Add CompatibilitySupressions * Address request to add net6.0/net7.0 package suppressions
1 parent 0421836 commit 69702c3

File tree

4 files changed

+146
-160
lines changed

4 files changed

+146
-160
lines changed

src/libraries/System.Numerics.Tensors/ref/System.Numerics.Tensors.csproj

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22

33
<PropertyGroup>
44
<TargetFrameworks>$(NetCoreAppCurrent);$(NetCoreAppPrevious);$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum)</TargetFrameworks>
5-
<TargetFrameworks Condition="'$(DotNetBuildFromSource)' != 'true'">$(TargetFrameworks);net7.0;net6.0</TargetFrameworks>
65
</PropertyGroup>
76

87
<ItemGroup>
98
<Compile Include="System.Numerics.Tensors.cs" />
109
</ItemGroup>
1110

12-
<ItemGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net7.0'))">
11+
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
1312
<Compile Include="System.Numerics.Tensors.netcore.cs" />
1413
</ItemGroup>
1514

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- https://learn.microsoft.com/en-us/dotnet/fundamentals/package-validation/diagnostic-ids -->
3+
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
4+
5+
<!-- net6.0 and net7.0 aren't supported by the current package and any errors should be suppressed. -->
6+
<Suppression>
7+
<Left>lib/net6.0/System.Numerics.Tensors.dll</Left>
8+
<Right>lib/netstandard2.0/System.Numerics.Tensors.dll</Right>
9+
<IsBaselineSuppression>true</IsBaselineSuppression>
10+
</Suppression>
11+
<Suppression>
12+
<Left>lib/net7.0/System.Numerics.Tensors.dll</Left>
13+
<Right>lib/netstandard2.0/System.Numerics.Tensors.dll</Right>
14+
<IsBaselineSuppression>true</IsBaselineSuppression>
15+
</Suppression>
16+
17+
<Suppression>
18+
<DiagnosticId>CP0001</DiagnosticId>
19+
<Target>T:System.Numerics.Tensors.ArrayTensorExtensions</Target>
20+
<Left>lib/net462/System.Numerics.Tensors.dll</Left>
21+
<Right>lib/net462/System.Numerics.Tensors.dll</Right>
22+
<IsBaselineSuppression>true</IsBaselineSuppression>
23+
</Suppression>
24+
<Suppression>
25+
<DiagnosticId>CP0001</DiagnosticId>
26+
<Target>T:System.Numerics.Tensors.CompressedSparseTensor`1</Target>
27+
<Left>lib/net462/System.Numerics.Tensors.dll</Left>
28+
<Right>lib/net462/System.Numerics.Tensors.dll</Right>
29+
<IsBaselineSuppression>true</IsBaselineSuppression>
30+
</Suppression>
31+
<Suppression>
32+
<DiagnosticId>CP0001</DiagnosticId>
33+
<Target>T:System.Numerics.Tensors.DenseTensor`1</Target>
34+
<Left>lib/net462/System.Numerics.Tensors.dll</Left>
35+
<Right>lib/net462/System.Numerics.Tensors.dll</Right>
36+
<IsBaselineSuppression>true</IsBaselineSuppression>
37+
</Suppression>
38+
<Suppression>
39+
<DiagnosticId>CP0001</DiagnosticId>
40+
<Target>T:System.Numerics.Tensors.SparseTensor`1</Target>
41+
<Left>lib/net462/System.Numerics.Tensors.dll</Left>
42+
<Right>lib/net462/System.Numerics.Tensors.dll</Right>
43+
<IsBaselineSuppression>true</IsBaselineSuppression>
44+
</Suppression>
45+
<Suppression>
46+
<DiagnosticId>CP0001</DiagnosticId>
47+
<Target>T:System.Numerics.Tensors.Tensor</Target>
48+
<Left>lib/net462/System.Numerics.Tensors.dll</Left>
49+
<Right>lib/net462/System.Numerics.Tensors.dll</Right>
50+
<IsBaselineSuppression>true</IsBaselineSuppression>
51+
</Suppression>
52+
<Suppression>
53+
<DiagnosticId>CP0001</DiagnosticId>
54+
<Target>T:System.Numerics.Tensors.Tensor`1</Target>
55+
<Left>lib/net462/System.Numerics.Tensors.dll</Left>
56+
<Right>lib/net462/System.Numerics.Tensors.dll</Right>
57+
<IsBaselineSuppression>true</IsBaselineSuppression>
58+
</Suppression>
59+
<Suppression>
60+
<DiagnosticId>CP0001</DiagnosticId>
61+
<Target>T:System.Numerics.Tensors.ArrayTensorExtensions</Target>
62+
<Left>lib/net8.0/System.Numerics.Tensors.dll</Left>
63+
<Right>lib/net8.0/System.Numerics.Tensors.dll</Right>
64+
<IsBaselineSuppression>true</IsBaselineSuppression>
65+
</Suppression>
66+
<Suppression>
67+
<DiagnosticId>CP0001</DiagnosticId>
68+
<Target>T:System.Numerics.Tensors.CompressedSparseTensor`1</Target>
69+
<Left>lib/net8.0/System.Numerics.Tensors.dll</Left>
70+
<Right>lib/net8.0/System.Numerics.Tensors.dll</Right>
71+
<IsBaselineSuppression>true</IsBaselineSuppression>
72+
</Suppression>
73+
<Suppression>
74+
<DiagnosticId>CP0001</DiagnosticId>
75+
<Target>T:System.Numerics.Tensors.DenseTensor`1</Target>
76+
<Left>lib/net8.0/System.Numerics.Tensors.dll</Left>
77+
<Right>lib/net8.0/System.Numerics.Tensors.dll</Right>
78+
<IsBaselineSuppression>true</IsBaselineSuppression>
79+
</Suppression>
80+
<Suppression>
81+
<DiagnosticId>CP0001</DiagnosticId>
82+
<Target>T:System.Numerics.Tensors.SparseTensor`1</Target>
83+
<Left>lib/net8.0/System.Numerics.Tensors.dll</Left>
84+
<Right>lib/net8.0/System.Numerics.Tensors.dll</Right>
85+
<IsBaselineSuppression>true</IsBaselineSuppression>
86+
</Suppression>
87+
<Suppression>
88+
<DiagnosticId>CP0001</DiagnosticId>
89+
<Target>T:System.Numerics.Tensors.Tensor</Target>
90+
<Left>lib/net8.0/System.Numerics.Tensors.dll</Left>
91+
<Right>lib/net8.0/System.Numerics.Tensors.dll</Right>
92+
<IsBaselineSuppression>true</IsBaselineSuppression>
93+
</Suppression>
94+
<Suppression>
95+
<DiagnosticId>CP0001</DiagnosticId>
96+
<Target>T:System.Numerics.Tensors.Tensor`1</Target>
97+
<Left>lib/net8.0/System.Numerics.Tensors.dll</Left>
98+
<Right>lib/net8.0/System.Numerics.Tensors.dll</Right>
99+
<IsBaselineSuppression>true</IsBaselineSuppression>
100+
</Suppression>
101+
<Suppression>
102+
<DiagnosticId>CP0001</DiagnosticId>
103+
<Target>T:System.Numerics.Tensors.ArrayTensorExtensions</Target>
104+
<Left>lib/netstandard2.0/System.Numerics.Tensors.dll</Left>
105+
<Right>lib/netstandard2.0/System.Numerics.Tensors.dll</Right>
106+
<IsBaselineSuppression>true</IsBaselineSuppression>
107+
</Suppression>
108+
<Suppression>
109+
<DiagnosticId>CP0001</DiagnosticId>
110+
<Target>T:System.Numerics.Tensors.CompressedSparseTensor`1</Target>
111+
<Left>lib/netstandard2.0/System.Numerics.Tensors.dll</Left>
112+
<Right>lib/netstandard2.0/System.Numerics.Tensors.dll</Right>
113+
<IsBaselineSuppression>true</IsBaselineSuppression>
114+
</Suppression>
115+
<Suppression>
116+
<DiagnosticId>CP0001</DiagnosticId>
117+
<Target>T:System.Numerics.Tensors.DenseTensor`1</Target>
118+
<Left>lib/netstandard2.0/System.Numerics.Tensors.dll</Left>
119+
<Right>lib/netstandard2.0/System.Numerics.Tensors.dll</Right>
120+
<IsBaselineSuppression>true</IsBaselineSuppression>
121+
</Suppression>
122+
<Suppression>
123+
<DiagnosticId>CP0001</DiagnosticId>
124+
<Target>T:System.Numerics.Tensors.SparseTensor`1</Target>
125+
<Left>lib/netstandard2.0/System.Numerics.Tensors.dll</Left>
126+
<Right>lib/netstandard2.0/System.Numerics.Tensors.dll</Right>
127+
<IsBaselineSuppression>true</IsBaselineSuppression>
128+
</Suppression>
129+
<Suppression>
130+
<DiagnosticId>CP0001</DiagnosticId>
131+
<Target>T:System.Numerics.Tensors.Tensor</Target>
132+
<Left>lib/netstandard2.0/System.Numerics.Tensors.dll</Left>
133+
<Right>lib/netstandard2.0/System.Numerics.Tensors.dll</Right>
134+
<IsBaselineSuppression>true</IsBaselineSuppression>
135+
</Suppression>
136+
<Suppression>
137+
<DiagnosticId>CP0001</DiagnosticId>
138+
<Target>T:System.Numerics.Tensors.Tensor`1</Target>
139+
<Left>lib/netstandard2.0/System.Numerics.Tensors.dll</Left>
140+
<Right>lib/netstandard2.0/System.Numerics.Tensors.dll</Right>
141+
<IsBaselineSuppression>true</IsBaselineSuppression>
142+
</Suppression>
143+
</Suppressions>

src/libraries/System.Numerics.Tensors/src/System.Numerics.Tensors.csproj

+2-14
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,9 @@
22

33
<PropertyGroup>
44
<TargetFrameworks>$(NetCoreAppCurrent);$(NetCoreAppPrevious);$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum)</TargetFrameworks>
5-
<TargetFrameworks Condition="'$(DotNetBuildFromSource)' != 'true'">$(TargetFrameworks);net7.0;net6.0</TargetFrameworks>
65
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
76
<IsPackable>true</IsPackable>
87
<PackageDescription>Provides support for operating over tensors.</PackageDescription>
9-
<!-- Disabling baseline validation since this is a brand new package.
10-
Once this package has shipped a stable version, the following line
11-
should be removed in order to re-enable validation. -->
12-
<DisablePackageBaselineValidation>true</DisablePackageBaselineValidation>
138
<GenAPIExcludeApiList>ReferenceAssemblyExclusions.txt</GenAPIExcludeApiList>
149
</PropertyGroup>
1510

@@ -18,19 +13,12 @@
1813
<Compile Include="System\ThrowHelper.cs" />
1914
</ItemGroup>
2015

21-
<ItemGroup Condition="!$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net7.0'))">
22-
<Compile Include="System\Numerics\Tensors\TensorPrimitives.netstandard.cs" />
23-
</ItemGroup>
24-
25-
<ItemGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net7.0'))">
16+
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
2617
<Compile Include="System\Numerics\Tensors\TensorPrimitives.netcore.cs" />
2718
</ItemGroup>
2819

29-
<ItemGroup>
30-
<InternalsVisibleTo Include="System.Numerics.Tensors.Tests" Key="00240000048000009400000006020000002400005253413100040000010001004b86c4cb78549b34bab61a3b1800e23bfeb5b3ec390074041536a7e3cbd97f5f04cf0f857155a8928eaa29ebfd11cfbbad3ba70efea7bda3226c6a8d370a4cd303f714486b6ebc225985a638471e6ef571cc92a4613c00b8fa65d61ccee0cbe5f36330c9a01f4183559f1bef24cc2917c6d913e3a541333a1d05d9bed22b38cb" />
31-
</ItemGroup>
32-
3320
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
21+
<Compile Include="System\Numerics\Tensors\TensorPrimitives.netstandard.cs" />
3422
<PackageReference Include="System.Memory" Version="$(SystemMemoryVersion)" />
3523
<ProjectReference Include="$(LibrariesProjectRoot)Microsoft.Bcl.Numerics\src\Microsoft.Bcl.Numerics.csproj" />
3624
</ItemGroup>

0 commit comments

Comments
 (0)