This commit is contained in:
Kevin Ransom (msft) 2018-02-12 19:57:04 -08:00
Родитель d54c46888a
Коммит f4d3fb4df9
11 изменённых файлов: 72 добавлений и 10 удалений

2
.gitignore поставляемый
Просмотреть файл

@ -63,6 +63,8 @@ scripts/*.patch
/tests/fsharpqa/Source/CodeGen/EmittedIL/StaticInit/StaticInit_Module01.dll
/tests/fsharpqa/Source/CodeGen/EmittedIL/StaticInit/StaticInit_Module01.pdb
/tests/Xnet40-fsharpqa-suite-failures.log.*
/tests/fsharp/typeProviders/splitAssemblyTools/provider.dll
/tests/fsharp/typeProviders/splitAssemblyTypeproviders/provider.dll
/vsintegration/src/service/FsPkgs/FSharp.Project/FS/FSharp.ProjectSystem.FSharp.fsi
/vsintegration/src/service/FsPkgs/FSharp.Project/FS/ctofiles/
/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Utils.dll

Просмотреть файл

@ -33,7 +33,7 @@ WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and
<EnableDefaultCompileItems Condition=" '$(EnableDefaultCompileItems)' == '' ">false</EnableDefaultCompileItems> <!--- Do not glob F# source files -->
<EnableDefaultNoneItems Condition=" '$(EnableDefaultNoneItems)' == '' ">false</EnableDefaultNoneItems>
<DefaultValueTuplePackageVersion>4.3.1</DefaultValueTuplePackageVersion>
<DefaultFSharpPackageVersion>4.3.3</DefaultFSharpPackageVersion>
<DefaultFSharpPackageVersion>4.3.4</DefaultFSharpPackageVersion>
</PropertyGroup>
<PropertyGroup>

Просмотреть файл

@ -53,10 +53,11 @@ WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and
<PackProjectInputFile>$(MSBuildProjectFullPath)</PackProjectInputFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(DisableImplicitSystemValueTupleReference)' != 'true' ">
<PropertyGroup>
<_FrameworkNeedsValueTupleReference Condition=" ('$(TargetFrameworkIdentifier)' == '.NETStandard' or '$(TargetFrameworkIdentifier)' == '.NETCoreApp') and !('$(_TargetFrameworkVersionWithoutV)' >= '2.0') ">true</_FrameworkNeedsValueTupleReference>
<_FrameworkNeedsValueTupleReference Condition=" '$(TargetFrameworkIdentifier)' == '.NETFramework' and
('$(_TargetFrameworkVersionWithoutV)' == '4.0' or
('$(_TargetFrameworkVersionWithoutV)' == '' or
'$(_TargetFrameworkVersionWithoutV)' == '4.0' or
'$(_TargetFrameworkVersionWithoutV)' == '4.5' or
'$(_TargetFrameworkVersionWithoutV)' == '4.6' or
'$(_TargetFrameworkVersionWithoutV)' == '4.6.1' or
@ -71,16 +72,38 @@ WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and
<Target Name="FSharpCorePackageReferences" BeforeTargets="CollectPackageReferences;">
<ItemGroup>
<FSharpCorePackages Include="@(PackageReference)" Condition=" '%(Identity)' == 'FSharp.Core' " />
<PackageReference Update="FSharp.Core" Version ="$(FSharpCoreImplicitPackageVersion)" Condition=" ( ('$(FSharpCoreImplicitPackageVersion)' != '') and ('$(DisableImplicitFSharpCoreReference)' != 'true') and (@(FSharpCorePackages->Count()) == 1) ) and ('%(PackageReference.DefaultInclude)' == 'true') " />
<PackageReference Remove="FSharp.Core" Condition=" ('$(DisableImplicitFSharpCoreReference)' == 'true' or @(FSharpCorePackages->Count()) &gt; 1) and ('%(PackageReference.DefaultInclude)' == 'true') " />
<PackageReference Update="FSharp.Core" Version="$(FSharpCoreImplicitPackageVersion)"
Condition=" ('%(PackageReference.Identity)' == 'FSharp.Core')
and ('%(PackageReference.Version)' == '$(DefaultFSharpPackageVersion)')
and ('%(PackageReference.DefaultInclude)' == 'true')
and ('$(DisableImplicitFSharpCoreReference)' != 'true')
and ('$(FSharpCoreImplicitPackageVersion)' != '')
and (@(FSharpCorePackages->Count()) == 1) " />
<PackageReference Remove="FSharp.Core"
Condition=" (('$(DisableImplicitFSharpCoreReference)' == 'true') or (@(FSharpCorePackages->Count()) &gt; 1))
and ('%(PackageReference.Identity)' == 'FSharp.Core')
and ('%(PackageReference.Version)' == '$(DefaultFSharpPackageVersion)')
and ('%(PackageReference.DefaultInclude)' == 'true') " />
</ItemGroup>
</Target>
<Target Name="ValueTuplePackageReferences" BeforeTargets="CollectPackageReferences;">
<Message Text="PackageReferences: ValueTuplePackageReferences start : @(PackageReference)" />
<ItemGroup>
<ValueTuplePackagesPackages Include="@(PackageReference)" Condition=" '%(Identity)' == 'System.ValueTuple' " />
<PackageReference Update="System.ValueTuple" Version="$(ValueTupleImplicitPackageVersion)" Condition=" ( ('$(ValueTupleImplicitPackageVersion)' == '') and ('$(DisableImplicitSystemValueTupleReference)' != 'true') and ('$(_FrameworkNeedsValueTupleReference)' == 'true') and (@(ValueTuplePackages->Count()) == 1) and ('%(PackageReference.DefaultInclude)' == 'true') ) " />
<PackageReference Remove="System.ValueTuple" Condition=" ( ('$(DisableImplicitSystemValueTupleReference)' != 'true') or ('$(_FrameworkNeedsValueTupleReference)' != 'true') or (@(ValueTuplePackages->Count()) &gt; 1) ) and ('%(PackageReference.DefaultInclude)' == 'true') " />
<ValueTuplePackages Include="@(PackageReference)" Condition=" '%(Identity)' == 'System.ValueTuple' " />
<PackageReference Update="System.ValueTuple" Version="$(ValueTupleImplicitPackageVersion)"
Condition=" ('%(PackageReference.Identity)' == 'System.ValueTuple')
and ('%(PackageReference.Version)' == '$(DefaultValueTuplePackageVersion)')
and ('%(PackageReference.DefaultInclude)' == 'true')
and ('$(ValueTupleImplicitPackageVersion)' != '')
and ('$(DisableImplicitSystemValueTupleReference)' != 'true')
and ('$(_FrameworkNeedsValueTupleReference)' == 'true')
and (@(ValueTuplePackages->Count()) == 1) " />
<PackageReference Remove="System.ValueTuple"
Condition=" ( ('$(DisableImplicitSystemValueTupleReference)' == 'true') or ('$(_FrameworkNeedsValueTupleReference)' != 'true') or (@(ValueTuplePackages->Count()) &gt; 1) )
and ('%(PackageReference.Identity)' == 'System.ValueTuple')
and ('%(PackageReference.Version)' == '$(DefaultValueTuplePackageVersion)')
and ('%(PackageReference.DefaultInclude)' == 'true') " />
</ItemGroup>
</Target>

Просмотреть файл

@ -52,7 +52,7 @@
<HintPath Condition="'$(TargetDotnetProfile)' == 'net40'">$(FsCheckLibDir)\net45\FsCheck.dll</HintPath>
</Reference>
<Reference Include="System.ValueTuple">
<HintPath>..\..\..\packages\System.ValueTuple.4.3.1\lib\portable-net40+sl4+win8+wp8\System.ValueTuple.dll</HintPath>
<HintPath>..\..\packages\System.ValueTuple.4.3.1\lib\portable-net40+sl4+win8+wp8\System.ValueTuple.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>

Просмотреть файл

@ -3,10 +3,15 @@
<Import Project="Test.props" />
<!-- if no FSharp.Core is specified, ensure the default is present -->
<!-- if no System.ValueTuple is specified, ensure the default is present -->
<PropertyGroup>
<ExpectsFSharpCore>true</ExpectsFSharpCore>
<ExpectedFSharpCorePackageVersion>$(DefaultFSharpPackageVersion)</ExpectedFSharpCorePackageVersion>
<ExpectsValueTuple>true</ExpectsValueTuple>
<ExpectedValueTuplePackageVersion>$(DefaultValueTuplePackageVersion)</ExpectedValueTuplePackageVersion>
</PropertyGroup>
<Import Project="Test.targets" />

Просмотреть файл

@ -4,12 +4,15 @@
<PropertyGroup>
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
<DisableImplicitSystemValueTupleReference>true</DisableImplicitSystemValueTupleReference>
</PropertyGroup>
<!-- if $(DisableImplicitFSharpCoreReference) is set, ensure that FSharp.Core isn't present -->
<!-- if $(DisableImplicitValueTupleReference) is set, ensure that System.ValueTuple isn't present -->
<PropertyGroup>
<ExpectsFSharpCore>false</ExpectsFSharpCore>
<ExpectsValueTuple>false</ExpectsValueTuple>
</PropertyGroup>
<Import Project="Test.targets" />

Просмотреть файл

@ -4,17 +4,23 @@
<PropertyGroup>
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
<DisableImplicitSystemValueTupleReference>true</DisableImplicitSystemValueTupleReference>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="FSharp.Core" Version="99.99.99" />
<PackageReference Include="System.ValueTuple" Version="44.44.44" />
</ItemGroup>
<!-- if $(DisableImplicitFSharpCoreReference) is set and an explicit PackageReference is added, that version of FSharp.Core is present -->
<!-- if $(DisableImplicitValueTupleReference) is set and an explicit PackageReference is added, that version of System.ValueTuple is present -->
<PropertyGroup>
<ExpectsFSharpCore>true</ExpectsFSharpCore>
<ExpectedFSharpCorePackageVersion>99.99.99</ExpectedFSharpCorePackageVersion>
<ExpectsValueTuple>true</ExpectsValueTuple>
<ExpectedValueTuplePackageVersion>44.44.44</ExpectedValueTuplePackageVersion>
</PropertyGroup>
<Import Project="Test.targets" />

Просмотреть файл

@ -4,13 +4,18 @@
<PropertyGroup>
<FSharpCoreImplicitPackageVersion>99.99.99</FSharpCoreImplicitPackageVersion>
<ValueTupleImplicitPackageVersion>44.44.44</ValueTupleImplicitPackageVersion>
</PropertyGroup>
<!-- if $(FSharpCoreImplicitPackgeVersion) is specified, ensure that's used -->
<!-- if $(ValueTupleImplicitPackageVersion) is specified, ensure that's used -->
<PropertyGroup>
<ExpectsFSharpCore>true</ExpectsFSharpCore>
<ExpectedFSharpCorePackageVersion>99.99.99</ExpectedFSharpCorePackageVersion>
<ExpectsValueTuple>true</ExpectsValueTuple>
<ExpectedValueTuplePackageVersion>44.44.44</ExpectedValueTuplePackageVersion>
</PropertyGroup>
<Import Project="Test.targets" />

Просмотреть файл

@ -1,6 +1,7 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<TargetFramework Condition="'$(TargetFramework)' == ''">net46</TargetFramework>
<Configuration Condition="'$(Configuration)' == ''">release</Configuration>
<BinariesDirectory>$(MSBuildThisFileDirectory)..\..\..\..\$(Configuration)\net40\bin</BinariesDirectory>

Просмотреть файл

@ -2,12 +2,18 @@
<Import Project="$(BinariesDirectory)\Microsoft.FSharp.NetSdk.targets" />
<Target Name="Test" DependsOnTargets="FSharpCorePackageReferences">
<Target Name="Test" DependsOnTargets="FSharpCorePackageReferences;ValueTuplePackageReferences">
<Message Importance="High" Text="Testing : $(MSBuildProjectName)" />
<ItemGroup>
<FoundFSharpCorePackages Include="@(PackageReference)" Condition="'%(Identity)' == 'FSharp.Core'" />
<FoundValueTuplePackages Include="@(PackageReference)" Condition="'%(Identity)' == 'System.ValueTuple'" />
</ItemGroup>
<Message Importance="High" Text="Diagnostic TestTarget PackageReference = '@(PackageReference)' " />
<Message Importance="High" Text="Diagnostic TestTarget FoundFSharpCorePackages = '@(FoundFSharpCorePackages)' " />
<Message Importance="High" Text="Diagnostic TestTarget FoundValueTuplePackages = '@(FoundValueTuplePackages)' " />
<!-- check for invalid test settings -->
<Error Condition="'$(ExpectsFSharpCore)' != 'true' and '$(ExpectedFSharpCorePackageVersion)' != ''" Text="A test cannot specify both ExepctsFSharpCore=false and provide a value for ExpectedFSharpCorePackageVersion." />
@ -16,9 +22,17 @@
<Error Condition="'$(ExpectsFSharpCore)' != 'true' and @(FoundFSharpCorePackages->Count()) &gt; 0" Text="Expected no FSharp.Core to be present, but found version %(FoundFSharpCorePackages.Version)." />
<Error Condition="@(FoundFSharpCorePackages->Count()) &gt; 1" Text="Found more than one version of FSharp.Core; this should never happen: version=%(FoundFSharpCorePackages.Version)." />
<!-- validate there is only ever 0 or 1 System.ValueTuple present -->
<Error Condition="'$(ExpectsValueTuple)' == 'true' and @(FoundValueTuplePackages->Count()) == 0" Text="No System.ValueTuple reference found. Expected version $(ExpectedValueTuplePackageVersion)." />
<Error Condition="'$(ExpectsValueTuple)' != 'true' and @(FoundValueTuplePackages->Count()) &gt; 0" Text="Expected no System.ValueTuple to be present, but found version %(FoundValueTuplePackages.Version)." />
<Error Condition="@(FoundValueTuplePackages->Count()) &gt; 1" Text="Found more than one version of ValueTuple; this should never happen: version=%(FoundValueTuplePackages.Version)." />
<!-- validate the version of the listed FSharp.Core -->
<Error Condition="'$(ExpectsFSharpCore)' == 'true' and '%(FoundFSharpCorePackages.Version)' != '$(ExpectedFSharpCorePackageVersion)'" Text="Expected FSharp.Core version $(ExpectedFSharpCorePackageVersion) but found %(FoundFSharpCorePackages.Version)." />
<!-- validate the version of the listed System.ValueTuple -->
<Error Condition="'$(ExpectsValueTuple)' == 'true' and '%(FoundValueTuplePackages.Version)' != '$(ExpectedValueTuplePackageVersion)'" Text="Expected System.ValueTuple version $(ExpectedValueTuplePackageVersion) but found %(FoundValueTuplePackages.Version)." />
</Target>
</Project>

Просмотреть файл

@ -4,6 +4,7 @@
<ItemGroup>
<PackageReference Update="FSharp.Core" Version="99.99.99" />
<PackageReference Update="System.ValueTuple" Version="44.44.44" />
</ItemGroup>
<!-- honor updating the reference; this is what the NuGet package manager in Visual Studio does -->
@ -11,6 +12,8 @@
<PropertyGroup>
<ExpectsFSharpCore>true</ExpectsFSharpCore>
<ExpectedFSharpCorePackageVersion>99.99.99</ExpectedFSharpCorePackageVersion>
<ExpectsValueTuple>true</ExpectsValueTuple>
<ExpectedValueTuplePackageVersion>44.44.44</ExpectedValueTuplePackageVersion>
</PropertyGroup>
<Import Project="Test.targets" />