Skip to content

Commit fa593f3

Browse files
T-Grogithub-actions
authored andcommitted
Reduce duplicate test deps, downgrade roslyn used for testing (keep high one for vsintegration)
1 parent a9e3ec7 commit fa593f3

File tree

5 files changed

+34
-44
lines changed

5 files changed

+34
-44
lines changed

FSharp.sln

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio Version 17
4-
VisualStudioVersion = 17.1.32113.165
3+
# Visual Studio Version 18
4+
VisualStudioVersion = 18.0.11104.47 d18.0
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Core", "src\FSharp.Core\FSharp.Core.fsproj", "{DED3BBD7-53F4-428A-8C9F-27968E768605}"
77
EndProject
@@ -166,6 +166,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".VisualStudio", ".VisualStu
166166
docs\release-notes\.VisualStudio\17.9.md = docs\release-notes\.VisualStudio\17.9.md
167167
EndProjectSection
168168
EndProject
169+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "eng", "eng", "{79E058E4-79E9-4178-AFA4-A87C45373379}"
170+
ProjectSection(SolutionItems) = preProject
171+
eng\Version.Details.props = eng\Version.Details.props
172+
eng\Version.Details.xml = eng\Version.Details.xml
173+
eng\Versions.props = eng\Versions.props
174+
EndProjectSection
175+
EndProject
169176
Global
170177
GlobalSection(SolutionConfigurationPlatforms) = preSolution
171178
Debug|Any CPU = Debug|Any CPU

eng/Versions.props

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@
107107
<MicrosoftCodeAnalysisCSharpVersion>5.0.0-2.25480.7</MicrosoftCodeAnalysisCSharpVersion>
108108
<MicrosoftVisualStudioLanguageServicesVersion>5.0.0-2.25480.7</MicrosoftVisualStudioLanguageServicesVersion>
109109
<MicrosoftCodeAnalysisTestResourcesProprietaryVersion>2.0.28</MicrosoftCodeAnalysisTestResourcesProprietaryVersion>
110+
<!-- Roslyn for when we need to compile C# in tests. .dll hell caused by vstest makes newer version fail at runtime -->
111+
<RoslynForTestingButNotForVSLayer>4.14.0</RoslynForTestingButNotForVSLayer>
110112
<!-- -->
111113
<!-- Visual Studio Shell packages -->
112114
<MicrosoftVisualStudioInteropVersion>$(MicrosoftVisualStudioShellPackagesVersion)</MicrosoftVisualStudioInteropVersion>
@@ -158,10 +160,10 @@
158160
<!-- Making diff way too large, update separately later. e.g. to 6.0.0-rtm.21518.12 and 9.0.0-rc.2.24462.10 or via darc -->
159161
<MicrosoftNETCoreILDAsmVersion>5.0.0-preview.7.20364.11</MicrosoftNETCoreILDAsmVersion>
160162
<MicrosoftNETCoreILAsmVersion>5.0.0-preview.7.20364.11</MicrosoftNETCoreILAsmVersion>
161-
<MicrosoftNETTestSdkVersion>17.11.1</MicrosoftNETTestSdkVersion>
163+
<MicrosoftNETTestSdkVersion>17.14.1</MicrosoftNETTestSdkVersion>
162164
<NewtonsoftJsonVersion>13.0.3</NewtonsoftJsonVersion>
163165
<XUnitVersion>2.9.0</XUnitVersion>
164-
<XUnitRunnerVersion>2.8.2</XUnitRunnerVersion>
166+
<XUnitRunnerVersion>3.1.4</XUnitRunnerVersion>
165167
<XunitXmlTestLoggerVersion>3.1.17</XunitXmlTestLoggerVersion>
166168
<!-- -->
167169
</PropertyGroup>

tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,22 @@
6969

7070
<!-- Runtime dependencies. Beware. -->
7171
<ItemGroup>
72-
<PackageReference Include="Microsoft.NETCore.ILDAsm" Version="$(MicrosoftNETCoreILDAsmVersion)" />
73-
<PackageReference Include="Microsoft.NETCore.ILAsm" Version="$(MicrosoftNETCoreILAsmVersion)" />
72+
<PackageReference Include="Microsoft.NETCore.ILDAsm" Version="$(MicrosoftNETCoreILDAsmVersion)">
73+
<IncludeAssets>runtime; native</IncludeAssets>
74+
<PrivateAssets>all</PrivateAssets>
75+
</PackageReference>
76+
<PackageReference Include="Microsoft.NETCore.ILAsm" Version="$(MicrosoftNETCoreILAsmVersion)">
77+
<IncludeAssets>runtime; native</IncludeAssets>
78+
<PrivateAssets>all</PrivateAssets>
79+
</PackageReference>
80+
<PackageReference Include="Microsoft.Net.Compilers" Version="$(MicrosoftNetCompilersVersion)">
81+
<IncludeAssets>runtime; native</IncludeAssets>
82+
<PrivateAssets>all</PrivateAssets>
83+
</PackageReference>
84+
<PackageReference Include="Microsoft.DiaSymReader.PortablePdb" Version="$(MicrosoftDiaSymReaderPortablePdbVersion)">
85+
<PrivateAssets>all</PrivateAssets>
86+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
87+
</PackageReference>
7488
</ItemGroup>
7589

7690
<ItemGroup>
@@ -83,8 +97,6 @@
8397
</ItemGroup>
8498

8599
<ItemGroup Condition="'$(TargetFramework)' != '$(FSharpNetCoreProductTargetFramework)'">
86-
<PackageReference Include="System.Memory" Version="$(SystemMemoryVersion)" />
87-
<PackageReference Include="System.Buffers" Version="$(SystemBuffersVersion)" />
88100
<PackageReference Include="System.Reflection.Metadata" Version="$(SystemReflectionMetadataVersion)" />
89101
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="$(SystemDiagnosticsDiagnosticSourceVersion)" />
90102
</ItemGroup>
@@ -93,13 +105,8 @@
93105
</PropertyGroup>
94106
<ItemGroup>
95107
<PackageReference Include="System.Collections.Immutable" Version="$(SystemCollectionsImmutableVersion)" GeneratePathProperty="true" />
96-
<PackageReference Include="Microsoft.Net.Compilers" Version="$(MicrosoftNetCompilersVersion)" />
97-
<PackageReference Include="Microsoft.DiaSymReader.PortablePdb" Version="$(MicrosoftDiaSymReaderPortablePdbVersion)">
98-
<PrivateAssets>all</PrivateAssets>
99-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
100-
</PackageReference>
101-
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.Common" Version="$(MicrosoftCodeAnalysisVersion)" />
102-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="$(MicrosoftCodeAnalysisCSharpVersion)" />
108+
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.Common" Version="$(RoslynForTestingButNotForVSLayer)" />
109+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="$(RoslynForTestingButNotForVSLayer)" />
103110
<PackageReference Include="Microsoft.CodeAnalysis.Test.Resources.Proprietary" Version="$(MicrosoftCodeAnalysisTestResourcesProprietaryVersion)" />
104111
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.11.2" />
105112
<PackageReference Include="Newtonsoft.Json" Version="$(NewtonsoftJsonVersion)" />

tests/fsharp/Compiler/Language/OptionalInteropTests.fs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace FSharp.Compiler.UnitTests
44

5+
open System
56
open System.Collections.Immutable
67
open Xunit
78
open FSharp.Test
@@ -11,19 +12,10 @@ open Microsoft.CodeAnalysis
1112

1213
module OptionalInteropTests =
1314

14-
open System.Reflection
15-
16-
let showImmutableVersion () =
17-
let x = System.Collections.Immutable.ImmutableArray.Create<int>(System.ReadOnlySpan.op_Implicit([|1;2;3|]))
18-
printfn "Created ImmutableArray with length: %d ;; %A" x.Length x
19-
let asm = typeof<System.Collections.Immutable.ImmutableArray>.Assembly
20-
printfn "Loaded System.Collections.Immutable version: %s" (asm.GetName().Version.ToString())
21-
2215
[<Theory>]
2316
[<InlineData("5.0")>]
2417
[<InlineData("preview")>]
2518
let ``C# method with an optional parameter and called with an option type should compile`` langVersion =
26-
showImmutableVersion()
2719
let csSrc =
2820
"""
2921
using Microsoft.FSharp.Core;

tests/fsharp/FSharpSuite.Tests.fsproj

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Project Sdk="Microsoft.NET.Sdk">
33

44
<PropertyGroup>
5-
<TargetFrameworks>net472;$(FSharpNetCoreProductTargetFramework)</TargetFrameworks>
5+
<TargetFrameworks>net472;$(FSharpNetCoreProductTargetFramework)</TargetFrameworks>
66
<TargetFrameworks Condition="'$(OS)' == 'Unix' or '$(BUILDING_USING_DOTNET)' == 'true'">$(FSharpNetCoreProductTargetFramework)</TargetFrameworks>
77
<RuntimeIdentifiers>win-x86;win-x64</RuntimeIdentifiers>
88
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81</AssetTargetFallback>
@@ -112,27 +112,9 @@
112112
</ProjectReference>
113113
<ProjectReference Include="$(FSharpSourcesRoot)\fsc\fscAnyCpuProject\fscAnyCpu.fsproj" Condition="'$(TargetFramework)' == 'net472'" />
114114
<ProjectReference Include="$(FSharpSourcesRoot)\fsi\fsiAnyCpuProject\fsiAnyCpu.fsproj" Condition="'$(TargetFramework)' == 'net472'" />
115-
<ProjectReference Include="$(FSharpSourcesRoot)\fsc\fscProject\fsc.fsproj" >
115+
<ProjectReference Include="$(FSharpSourcesRoot)\fsc\fscProject\fsc.fsproj">
116116
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
117117
</ProjectReference>
118118
</ItemGroup>
119119

120-
<!-- Runtime dependencies. Beware. -->
121-
<ItemGroup>
122-
<PackageReference Include="Microsoft.NETCore.ILDAsm" Version="$(MicrosoftNETCoreILDAsmVersion)" />
123-
<PackageReference Include="Microsoft.NETCore.ILAsm" Version="$(MicrosoftNETCoreILAsmVersion)" />
124-
</ItemGroup>
125-
126-
<ItemGroup Condition="'$(TargetFramework)' != '$(FSharpNetCoreProductTargetFramework)'">
127-
<PackageReference Include="System.Memory" Version="$(SystemMemoryVersion)" />
128-
<PackageReference Include="System.Reflection.Metadata" Version="$(SystemReflectionMetadataVersion)" />
129-
</ItemGroup>
130-
131-
<ItemGroup>
132-
<PackageReference Include="Microsoft.Net.Compilers" Version="$(MicrosoftNetCompilersVersion)" />
133-
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.Common" Version="$(MicrosoftCodeAnalysisVersion)" />
134-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="$(MicrosoftCodeAnalysisCSharpVersion)" />
135-
<PackageReference Include="Microsoft.CodeAnalysis.Test.Resources.Proprietary" Version="$(MicrosoftCodeAnalysisTestResourcesProprietaryVersion)" />
136-
</ItemGroup>
137-
138120
</Project>

0 commit comments

Comments
 (0)