Skip to content

Commit 8beaf72

Browse files
authored
Merge pull request #885 from baronfel/integrate-visualfsharp
integrate visualfsharp's latest master
2 parents 8909b22 + 0f9853d commit 8beaf72

File tree

311 files changed

+21603
-4998
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

311 files changed

+21603
-4998
lines changed

.gitignore

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1-
# Downloaded packages and build tools.
2-
/lkg
3-
/packages
4-
/Tools
1+
# output location
2+
artifacts/
3+
4+
packages/
55

66
/tests/scripts/current
7-
/release
8-
/debug
9-
/Proto
107

118
# Patches that may have been generated by scripts.
129
# (These aren't generally useful to commit directly; if anything, they should be applied.)
@@ -218,7 +215,6 @@ times
218215
/tests/fsharpqa/testenv/bin/System.ValueTuple.dll
219216
source_link.json
220217
.vs/
221-
/VSRelease/net40/bin
222218
System.ValueTuple.dll
223219
tests/fsharpqa/testenv/bin/System.ValueTuple.dll
224220
lib/netcore/fsc/bin/

.vsts-pr.yaml

Lines changed: 33 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,34 @@
1-
phases:
2-
- phase: Linux
3-
queue:
4-
name: Hosted Linux Preview
5-
timeoutInMinutes: 90
6-
parallel: 2
1+
jobs:
2+
- job: Linux
3+
pool:
4+
vmImage: ubuntu-16.04
5+
timeoutInMinutes: 90
6+
strategy:
7+
maxParallel: 2
78
matrix:
8-
release_default:
9-
_command: ./mono/cibuild.sh
10-
_args: release
9+
dotnet_sdk:
10+
_command: make
11+
_args: Configuration=release
12+
# disabled until it can be properly fixed
1113
release_fcs:
1214
_command: ./fcs/build.sh
1315
_args: Build
1416
steps:
15-
- script: $(_command) $(_args)
16-
- task: PublishBuildArtifacts@1
17-
inputs:
18-
PathtoPublish: '$(Build.SourcesDirectory)/tests/TestResults'
19-
ArtifactName: 'Linux $(_command) $(_args)'
20-
publishLocation: Container
21-
continueOnError: true
22-
condition: failed()
17+
- script: $(_command) $(_args)
18+
- task: PublishBuildArtifacts@1
19+
inputs:
20+
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/TestResults'
21+
ArtifactName: 'Linux $(_command) $(_args)'
22+
publishLocation: Container
23+
continueOnError: true
24+
condition: failed()
2325

24-
- phase: Windows
25-
queue:
26-
name: Hosted VS2017
27-
timeoutInMinutes: 90
28-
parallel: 7
26+
- job: Windows
27+
pool:
28+
vmImage: vs2017-win2016
29+
timeoutInMinutes: 120
30+
strategy:
31+
maxParallel: 7
2932
matrix:
3033
ci_part1:
3134
_command: build.cmd
@@ -49,11 +52,11 @@ phases:
4952
_command: fcs\build.cmd
5053
_args: TestAndNuget
5154
steps:
52-
- script: $(_command) $(_args)
53-
- task: PublishBuildArtifacts@1
54-
inputs:
55-
PathtoPublish: '$(Build.SourcesDirectory)\tests\TestResults'
56-
ArtifactName: 'Windows $(_command) $(_args)'
57-
publishLocation: Container
58-
continueOnError: true
59-
condition: failed()
55+
- script: $(_command) $(_args)
56+
- task: PublishBuildArtifacts@1
57+
inputs:
58+
PathtoPublish: '$(Build.SourcesDirectory)\artifacts\TestResults'
59+
ArtifactName: 'Windows $(_command) $(_args)'
60+
publishLocation: Container
61+
continueOnError: true
62+
condition: failed()

CoordinateXlif.targets

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<Project>
2+
<Target Name = "CoordinateXlif" DependsOnTargets="GenerateFSharpTextResources" BeforeTargets="GetXlfSources" />
3+
</Project>

FSharp.Directory.Build.props

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<Project>
2+
3+
<Import Project="FSharpBuild.Directory.Build.props" Condition = " '$(FSharpTestCompilerVersion)' == '' "/>
4+
<Import Project="FSharpTests.Directory.Build.props" Condition = " '$(FSharpTestCompilerVersion)' != '' "/>
5+
6+
</Project>

FSharp.Directory.Build.targets

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<Project>
2+
3+
<Import Project="FSharpBuild.Directory.Build.targets" Condition = " '$(FSharpTestCompilerVersion)' == '' "/>
4+
<Import Project="FSharpTests.Directory.Build.targets" Condition = " '$(FSharpTestCompilerVersion)' != '' "/>
5+
<Import Project="CoordinateXlif.targets" Condition = " '$(FSharpBuildAssemblyFile)' != '' and '$(XliffTasksAssembly)' != '' "/>
6+
7+
</Project>

FSharp.Profiles.props

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -->
3+
<Project>
4+
5+
<PropertyGroup Condition="$(TargetFramework.StartsWith('net4'))">
6+
<DefineConstants Condition="'$(MonoPackaging)' == 'true'">$(DefineConstants);CROSS_PLATFORM_COMPILER</DefineConstants>
7+
<DefineConstants>$(DefineConstants);ENABLE_MONO_SUPPORT</DefineConstants>
8+
<DefineConstants>$(DefineConstants);BE_SECURITY_TRANSPARENT</DefineConstants>
9+
<DefineConstants>$(DefineConstants);FX_LCIDFROMCODEPAGE</DefineConstants>
10+
</PropertyGroup>
11+
12+
<PropertyGroup Condition="$(TargetFramework.StartsWith('netstandard')) OR $(TargetFramework.StartsWith('netcoreapp'))">
13+
<DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants>
14+
<DefineConstants>$(DefineConstants);NETSTANDARD1_6</DefineConstants>
15+
<DefineConstants>$(DefineConstants);FX_NO_APP_DOMAINS</DefineConstants>
16+
<DefineConstants>$(DefineConstants);FX_NO_ARRAY_LONG_LENGTH</DefineConstants>
17+
<DefineConstants>$(DefineConstants);FX_NO_BEGINEND_READWRITE</DefineConstants>
18+
<DefineConstants>$(DefineConstants);FX_NO_BINARY_SERIALIZATION</DefineConstants>
19+
<DefineConstants>$(DefineConstants);FX_NO_CONVERTER</DefineConstants>
20+
<DefineConstants>$(DefineConstants);FX_NO_DEFAULT_DEPENDENCY_TYPE</DefineConstants>
21+
<DefineConstants>$(DefineConstants);FX_NO_CORHOST_SIGNER</DefineConstants>
22+
<DefineConstants>$(DefineConstants);FX_NO_EVENTWAITHANDLE_IDISPOSABLE</DefineConstants>
23+
<DefineConstants>$(DefineConstants);FX_NO_EXIT_CONTEXT_FLAGS</DefineConstants>
24+
<DefineConstants>$(DefineConstants);FX_NO_HEAPTERMINATION</DefineConstants>
25+
<DefineConstants>$(DefineConstants);FX_NO_LINKEDRESOURCES</DefineConstants>
26+
<DefineConstants>$(DefineConstants);FX_NO_LOADER_OPTIMIZATION</DefineConstants>
27+
<DefineConstants>$(DefineConstants);FX_NO_PARAMETERIZED_THREAD_START</DefineConstants>
28+
<DefineConstants>$(DefineConstants);FX_NO_PDB_READER</DefineConstants>
29+
<DefineConstants>$(DefineConstants);FX_NO_PDB_WRITER</DefineConstants>
30+
<DefineConstants>$(DefineConstants);FX_NO_REFLECTION_MODULE_HANDLES</DefineConstants>
31+
<DefineConstants>$(DefineConstants);FX_NO_REFLECTION_ONLY</DefineConstants>
32+
<DefineConstants>$(DefineConstants);FX_NO_RUNTIMEENVIRONMENT</DefineConstants>
33+
<DefineConstants>$(DefineConstants);FX_NO_SECURITY_PERMISSIONS</DefineConstants>
34+
<DefineConstants>$(DefineConstants);FX_NO_SERVERCODEPAGES</DefineConstants>
35+
<DefineConstants>$(DefineConstants);FX_NO_SYMBOLSTORE</DefineConstants>
36+
<DefineConstants>$(DefineConstants);FX_NO_SYSTEM_CONFIGURATION</DefineConstants>
37+
<DefineConstants>$(DefineConstants);FX_NO_THREAD</DefineConstants>
38+
<DefineConstants>$(DefineConstants);FX_NO_THREADABORT</DefineConstants>
39+
<DefineConstants>$(DefineConstants);FX_NO_WAITONE_MILLISECONDS</DefineConstants>
40+
<DefineConstants>$(DefineConstants);FX_NO_WEB_CLIENT</DefineConstants>
41+
<DefineConstants>$(DefineConstants);FX_NO_WIN_REGISTRY</DefineConstants>
42+
<DefineConstants>$(DefineConstants);FX_NO_WINFORMS</DefineConstants>
43+
<DefineConstants>$(DefineConstants);FX_NO_INDENTED_TEXT_WRITER</DefineConstants>
44+
<DefineConstants>$(DefineConstants);FX_REDUCED_EXCEPTIONS</DefineConstants>
45+
<DefineConstants>$(DefineConstants);FX_REDUCED_CONSOLE</DefineConstants>
46+
<DefineConstants>$(DefineConstants);FX_RESHAPED_REFEMIT</DefineConstants>
47+
<DefineConstants>$(DefineConstants);FX_RESHAPED_GLOBALIZATION</DefineConstants>
48+
<DefineConstants>$(DefineConstants);FX_RESHAPED_REFLECTION</DefineConstants>
49+
<DefineConstants>$(DefineConstants);FX_RESHAPED_MSBUILD</DefineConstants>
50+
<OtherFlags>$(OtherFlags) --simpleresolution</OtherFlags>
51+
</PropertyGroup>
52+
53+
</Project>

FSharpBuild.Directory.Build.props

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
<Project>
2+
3+
<Import Project="build\targets\AssemblyVersions.props" />
4+
<Import Project="build\targets\PackageVersions.props" />
5+
<Import Project="build\targets\GitHash.props" />
6+
<Import Project="build\targets\CommonPackages.targets" />
7+
8+
<!-- directory locations -->
9+
<PropertyGroup>
10+
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
11+
<RepoRoot>$(MSBuildThisFileDirectory)</RepoRoot>
12+
<FSharpSourcesRoot>$(RepoRoot)src</FSharpSourcesRoot>
13+
<ArtifactsDir>$(RepoRoot)artifacts</ArtifactsDir>
14+
<ToolsRoot>$(ArtifactsDir)\toolset</ToolsRoot>
15+
<ArtifactsBinDir>$(ArtifactsDir)\bin</ArtifactsBinDir>
16+
<ArtifactsObjDir>$(ArtifactsDir)\obj</ArtifactsObjDir>
17+
<ArtifactsPackagesDir>$(ArtifactsDir)\packages</ArtifactsPackagesDir>
18+
<BaseOutputPath>$(ArtifactsBinDir)\$(MSBuildProjectName)</BaseOutputPath>
19+
<BaseIntermediateOutputPath>$(ArtifactsObjDir)\$(MSBuildProjectName)</BaseIntermediateOutputPath>
20+
<SymStoreDirectory>$(ArtifactsDir)\SymStore</SymStoreDirectory>
21+
<ProtoOutputPath Condition="'$(OS)' != 'Unix'">$(ArtifactsBinDir)\fsc\Proto\net46</ProtoOutputPath>
22+
<ProtoOutputPath Condition="'$(OS)' == 'Unix'">$(ArtifactsBinDir)/fsc/Proto/netcoreapp2.1</ProtoOutputPath>
23+
<ValueTupleImplicitPackageVersion>4.4.0</ValueTupleImplicitPackageVersion>
24+
</PropertyGroup>
25+
26+
<!-- nuget -->
27+
<PropertyGroup>
28+
<!-- default NuGet package restore location -->
29+
<NuGetPackageRoot Condition="'$(NuGetPackageRoot)' == ''">$(NUGET_PACKAGES)</NuGetPackageRoot>
30+
<NuGetPackageRoot Condition="'$(NuGetPackageRoot)' == '' AND '$(OS)' == 'Windows_NT'">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
31+
<NuGetPackageRoot Condition="'$(NuGetPackageRoot)' == '' AND '$(OS)' != 'Windows_NT'">$(HOME)/.nuget/packages/</NuGetPackageRoot>
32+
<!-- ensure there is a trailing slash -->
33+
<NuGetPackageRoot Condition="!HasTrailingSlash('$(NuGetPackageRoot)') AND '$(OS)' == 'Windows_NT'">$(NuGetPackageRoot)\</NuGetPackageRoot>
34+
<NuGetPackageRoot Condition="!HasTrailingSlash('$(NuGetPackageRoot)') AND '$(OS)' != 'Windows_NT'">$(NuGetPackageRoot)/</NuGetPackageRoot>
35+
<!-- ensure all NuGet packages come from the `$(NuGetPackageRoot)` variable -->
36+
<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
37+
</PropertyGroup>
38+
39+
<!-- mono -->
40+
<PropertyGroup Condition="'$(OS)' == 'Unix'">
41+
<MonoPackaging Condition="$(TargetFramework.StartsWith('net4'))">true</MonoPackaging>
42+
<FrameworkPathOverride Condition="'$(TargetFramework)' == 'net45'">/usr/lib/mono/4.5-api</FrameworkPathOverride>
43+
<FrameworkPathOverride Condition="'$(TargetFramework)' == 'net46'">/usr/lib/mono/4.6-api</FrameworkPathOverride>
44+
</PropertyGroup>
45+
46+
<!-- signing -->
47+
<PropertyGroup>
48+
<SkipSigning>false</SkipSigning>
49+
<SignAssembly>true</SignAssembly>
50+
<AssemblyOriginatorKeyFile>$(FSharpSourcesRoot)\fsharp\msft.pubkey</AssemblyOriginatorKeyFile>
51+
<StrongNames>true</StrongNames>
52+
<DelaySign>true</DelaySign>
53+
</PropertyGroup>
54+
<PropertyGroup Condition="'$(MonoPackaging)' == 'true'">
55+
<AssemblyOriginatorKeyFile>$(FSharpSourcesRoot)\fsharp\test.snk</AssemblyOriginatorKeyFile>
56+
<DelaySign>false</DelaySign>
57+
<DefineConstants>STRONG_NAME_FSHARP_COMPILER_WITH_TEST_KEY;$(DefineConstants)</DefineConstants>
58+
</PropertyGroup>
59+
60+
<!-- localization -->
61+
<PropertyGroup>
62+
<EnableXlfLocalization Condition="'$(EnableXlfLocalization)' == '' AND ('$(Configuration)' == 'Proto' OR '$(MonoPackaging)' == 'true')">false</EnableXlfLocalization>
63+
<UpdateXlfOnBuild Condition="'$(CI)' != '1'">true</UpdateXlfOnBuild>
64+
</PropertyGroup>
65+
66+
<!-- other -->
67+
<PropertyGroup>
68+
<DebugType>portable</DebugType>
69+
<MicroBuildAssemblyFileLanguage>fs</MicroBuildAssemblyFileLanguage>
70+
<UseStandardResourceNames>false</UseStandardResourceNames>
71+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
72+
</PropertyGroup>
73+
74+
<!-- SDK targets override -->
75+
<PropertyGroup Condition="'$(Configuration)' != 'Proto' AND Exists('$(ProtoOutputPath)')">
76+
<FSharpTargetsPath>$(ProtoOutputPath)\Microsoft.FSharp.Targets</FSharpTargetsPath>
77+
<FSharpPropsShim>$(ProtoOutputPath)\Microsoft.FSharp.NetSdk.props</FSharpPropsShim>
78+
<FSharpTargetsShim>$(ProtoOutputPath)\Microsoft.FSharp.NetSdk.targets</FSharpTargetsShim>
79+
<FSharpOverridesTargetsShim>$(ProtoOutputPath)\Microsoft.FSharp.Overrides.NetSdk.targets</FSharpOverridesTargetsShim>
80+
</PropertyGroup>
81+
82+
</Project>
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<Project>
2+
3+
<Import Project="FSharp.Profiles.props" />
4+
5+
<PropertyGroup>
6+
<XlfLanguages>en;$(XlfLanguages)</XlfLanguages>
7+
</PropertyGroup>
8+
9+
<PropertyGroup Condition="'$(UseAssetTargetFallback)' == 'true'">
10+
<!--
11+
HACK: Necessary because the `netstandard1.6` version of FSharp.Compiler.Private requires a package that isn't
12+
necessary for `net46`, but the package has a requirement on `net462`. The reference is excluded from the build
13+
during `net46`, but for purposes of restore needs to be present.
14+
-->
15+
<AssetTargetFallback>$(AssetTargetFallback);net462</AssetTargetFallback>
16+
</PropertyGroup>
17+
18+
<PropertyGroup>
19+
<CompileDependsOn>$(CompileDependsOn);CopyAndSubstituteTextFiles</CompileDependsOn>
20+
</PropertyGroup>
21+
22+
<Target Name="CopyAndSubstituteTextFiles"
23+
Inputs="@(CopyAndSubstituteText)"
24+
Outputs="@(CopyAndSubstituteText->'$(OutDir)%(TargetFilename)')">
25+
<PropertyGroup>
26+
<_ReplacementText>$([System.IO.File]::ReadAllText('%(CopyAndSubstituteText.FullPath)'))</_ReplacementText>
27+
<_ReplacementText Condition="'%(CopyAndSubstituteText.Pattern1)' != ''">$(_ReplacementText.Replace('%(CopyAndSubstituteText.Pattern1)', '%(CopyAndSubstituteText.Replacement1)'))</_ReplacementText>
28+
<_ReplacementText Condition="'%(CopyAndSubstituteText.Pattern2)' != ''">$(_ReplacementText.Replace('%(CopyAndSubstituteText.Pattern2)', '%(CopyAndSubstituteText.Replacement2)'))</_ReplacementText>
29+
</PropertyGroup>
30+
<WriteLinesToFile File="$(OutDir)%(CopyAndSubstituteText.TargetFilename)" Lines="$(_ReplacementText)" Overwrite="true" />
31+
<!-- Make sure it will get cleaned -->
32+
<CreateItem Include="$(OutDir)%(CopyAndSubstituteText.TargetFilename)">
33+
<Output TaskParameter="Include" ItemName="FileWrites" />
34+
</CreateItem>
35+
</Target>
36+
37+
<Import Project="build\targets\NGenOrCrossGen.targets" />
38+
<Import Project="build\targets\ConvertPortablePdbs.targets" />
39+
<Import Project="build\targets\GenerateAssemblyAttributes.targets" />
40+
<Import Project="build\targets\GenerateInternalsVisibleTo.targets" />
41+
42+
</Project>

NuGet.Config

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
3-
43
<solution>
54
<add key="disableSourceControlIntegration" value="true" />
65
</solution>
7-
<packageSources>
8-
<!--To inherit the global NuGet package sources remove the <clear/> line below -->
6+
<!-- Only specify feed for Arcade SDK (see https://github.com/Microsoft/msbuild/issues/2982) -->
7+
<packageSources>
98
<clear />
10-
<add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" />
9+
<add key="dotnet-core" value="https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json" />
10+
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
1111
</packageSources>
12-
13-
</configuration>
12+
<disabledPackageSources>
13+
<clear />
14+
</disabledPackageSources>
15+
</configuration>

PublishToBlob.proj

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,33 @@
1010
<PropertyGroup>
1111
<FeedTasksPackage>Microsoft.DotNet.Build.Tasks.Feed</FeedTasksPackage>
1212
<!-- This version should be kept in sync with `packages.config` -->
13-
<FeedTasksPackageVersion>2.1.0-prerelease-02419-02</FeedTasksPackageVersion>
13+
<FeedTasksPackageVersion>2.2.0-beta.19066.1</FeedTasksPackageVersion>
1414
</PropertyGroup>
1515

1616
<Import Project="$(MSBuildThisFileDirectory)packages\$(FeedTasksPackage).$(FeedTasksPackageVersion)\build\$(FeedTasksPackage).targets" />
1717

1818
<ItemGroup>
19-
<!-- this should pick up both *.nupkg and *.symbols.nupkg -->
20-
<NuGetPackages Include="$(MSBuildThisFileDirectory)$(Configuration)\artifacts\Microsoft.FSharp.Compiler.*.nupkg" />
19+
<!-- the string '-rtm-' is important, because that's the package with a per-build unique version number -->
20+
<NuGetPackages Include="$(MSBuildThisFileDirectory)artifacts\packages\$(Configuration)\Microsoft.FSharp.Compiler.*-rtm-*.nupkg" />
2121
</ItemGroup>
2222

23+
<PropertyGroup>
24+
<ArtifactsLogDir>$(MSBuildThisFileDirectory)artifacts\log\$(Configuration)\</ArtifactsLogDir>
25+
<Platform Condition="'$(Platform)' == ''">AnyCPU</Platform>
26+
<PlatformName Condition="'$(PlatformName)' == ''">$(Platform)</PlatformName>
27+
<AssetManifestFilePath>$(ArtifactsLogDir)AssetManifest\$(OS)-$(PlatformName).xml</AssetManifestFilePath>
28+
</PropertyGroup>
29+
2330
<Target Name="Build">
2431
<PushToBlobFeed ExpectedFeedUrl="$(ExpectedFeedUrl)"
2532
AccountKey="$(AccountKey)"
2633
ItemsToPush="@(NuGetPackages)"
27-
Overwrite="$(PublishOverwrite)"
34+
ManifestBuildData="Location=$(ExpectedFeedUrl)"
35+
ManifestRepoUri="$(ManifestRepoUri)"
2836
ManifestBranch="$(ManifestBranch)"
2937
ManifestBuildId="$(ManifestBuildId)"
3038
ManifestCommit="$(ManifestCommit)"
31-
ManifestName="fsharp"
32-
SkipCreateManifest="false" />
39+
AssetManifestPath="$(AssetManifestFilePath)" />
3340
</Target>
3441

3542
</Project>

0 commit comments

Comments
 (0)