Skip to content
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 4 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
# Downloaded packages and build tools.
/lkg
/packages
/Tools
# output location
artifacts/

packages/

/tests/scripts/current
/release
/debug
/Proto

# Patches that may have been generated by scripts.
# (These aren't generally useful to commit directly; if anything, they should be applied.)
Expand Down Expand Up @@ -218,7 +215,6 @@ times
/tests/fsharpqa/testenv/bin/System.ValueTuple.dll
source_link.json
.vs/
/VSRelease/net40/bin
System.ValueTuple.dll
tests/fsharpqa/testenv/bin/System.ValueTuple.dll
lib/netcore/fsc/bin/
Expand Down
63 changes: 33 additions & 30 deletions .vsts-pr.yaml
Original file line number Diff line number Diff line change
@@ -1,31 +1,34 @@
phases:
- phase: Linux
queue:
name: Hosted Linux Preview
timeoutInMinutes: 90
parallel: 2
jobs:
- job: Linux
pool:
vmImage: ubuntu-16.04
timeoutInMinutes: 90
strategy:
maxParallel: 2
matrix:
release_default:
_command: ./mono/cibuild.sh
_args: release
dotnet_sdk:
_command: make
_args: Configuration=release
# disabled until it can be properly fixed
release_fcs:
_command: ./fcs/build.sh
_args: Build
steps:
- script: $(_command) $(_args)
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/tests/TestResults'
ArtifactName: 'Linux $(_command) $(_args)'
publishLocation: Container
continueOnError: true
condition: failed()
- script: $(_command) $(_args)
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/TestResults'
ArtifactName: 'Linux $(_command) $(_args)'
publishLocation: Container
continueOnError: true
condition: failed()

- phase: Windows
queue:
name: Hosted VS2017
timeoutInMinutes: 90
parallel: 7
- job: Windows
pool:
vmImage: vs2017-win2016
timeoutInMinutes: 120
strategy:
maxParallel: 7
matrix:
ci_part1:
_command: build.cmd
Expand All @@ -49,11 +52,11 @@ phases:
_command: fcs\build.cmd
_args: TestAndNuget
steps:
- script: $(_command) $(_args)
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.SourcesDirectory)\tests\TestResults'
ArtifactName: 'Windows $(_command) $(_args)'
publishLocation: Container
continueOnError: true
condition: failed()
- script: $(_command) $(_args)
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.SourcesDirectory)\artifacts\TestResults'
ArtifactName: 'Windows $(_command) $(_args)'
publishLocation: Container
continueOnError: true
condition: failed()
3 changes: 3 additions & 0 deletions CoordinateXlif.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<Project>
<Target Name = "CoordinateXlif" DependsOnTargets="GenerateFSharpTextResources" BeforeTargets="GetXlfSources" />
</Project>
6 changes: 6 additions & 0 deletions FSharp.Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<Project>

<Import Project="FSharpBuild.Directory.Build.props" Condition = " '$(FSharpTestCompilerVersion)' == '' "/>
<Import Project="FSharpTests.Directory.Build.props" Condition = " '$(FSharpTestCompilerVersion)' != '' "/>

</Project>
7 changes: 7 additions & 0 deletions FSharp.Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project>

<Import Project="FSharpBuild.Directory.Build.targets" Condition = " '$(FSharpTestCompilerVersion)' == '' "/>
<Import Project="FSharpTests.Directory.Build.targets" Condition = " '$(FSharpTestCompilerVersion)' != '' "/>
<Import Project="CoordinateXlif.targets" Condition = " '$(FSharpBuildAssemblyFile)' != '' and '$(XliffTasksAssembly)' != '' "/>

</Project>
53 changes: 53 additions & 0 deletions FSharp.Profiles.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -->
<Project>

<PropertyGroup Condition="$(TargetFramework.StartsWith('net4'))">
<DefineConstants Condition="'$(MonoPackaging)' == 'true'">$(DefineConstants);CROSS_PLATFORM_COMPILER</DefineConstants>
<DefineConstants>$(DefineConstants);ENABLE_MONO_SUPPORT</DefineConstants>
<DefineConstants>$(DefineConstants);BE_SECURITY_TRANSPARENT</DefineConstants>
<DefineConstants>$(DefineConstants);FX_LCIDFROMCODEPAGE</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="$(TargetFramework.StartsWith('netstandard')) OR $(TargetFramework.StartsWith('netcoreapp'))">
<DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants>
<DefineConstants>$(DefineConstants);NETSTANDARD1_6</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_APP_DOMAINS</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_ARRAY_LONG_LENGTH</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_BEGINEND_READWRITE</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_BINARY_SERIALIZATION</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_CONVERTER</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_DEFAULT_DEPENDENCY_TYPE</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_CORHOST_SIGNER</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_EVENTWAITHANDLE_IDISPOSABLE</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_EXIT_CONTEXT_FLAGS</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_HEAPTERMINATION</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_LINKEDRESOURCES</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_LOADER_OPTIMIZATION</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_PARAMETERIZED_THREAD_START</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_PDB_READER</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_PDB_WRITER</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_REFLECTION_MODULE_HANDLES</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_REFLECTION_ONLY</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_RUNTIMEENVIRONMENT</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_SECURITY_PERMISSIONS</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_SERVERCODEPAGES</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_SYMBOLSTORE</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_SYSTEM_CONFIGURATION</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_THREAD</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_THREADABORT</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_WAITONE_MILLISECONDS</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_WEB_CLIENT</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_WIN_REGISTRY</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_WINFORMS</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_INDENTED_TEXT_WRITER</DefineConstants>
<DefineConstants>$(DefineConstants);FX_REDUCED_EXCEPTIONS</DefineConstants>
<DefineConstants>$(DefineConstants);FX_REDUCED_CONSOLE</DefineConstants>
<DefineConstants>$(DefineConstants);FX_RESHAPED_REFEMIT</DefineConstants>
<DefineConstants>$(DefineConstants);FX_RESHAPED_GLOBALIZATION</DefineConstants>
<DefineConstants>$(DefineConstants);FX_RESHAPED_REFLECTION</DefineConstants>
<DefineConstants>$(DefineConstants);FX_RESHAPED_MSBUILD</DefineConstants>
<OtherFlags>$(OtherFlags) --simpleresolution</OtherFlags>
</PropertyGroup>

</Project>
82 changes: 82 additions & 0 deletions FSharpBuild.Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
<Project>

<Import Project="build\targets\AssemblyVersions.props" />
<Import Project="build\targets\PackageVersions.props" />
<Import Project="build\targets\GitHash.props" />
<Import Project="build\targets\CommonPackages.targets" />

<!-- directory locations -->
<PropertyGroup>
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
<RepoRoot>$(MSBuildThisFileDirectory)</RepoRoot>
<FSharpSourcesRoot>$(RepoRoot)src</FSharpSourcesRoot>
<ArtifactsDir>$(RepoRoot)artifacts</ArtifactsDir>
<ToolsRoot>$(ArtifactsDir)\toolset</ToolsRoot>
<ArtifactsBinDir>$(ArtifactsDir)\bin</ArtifactsBinDir>
<ArtifactsObjDir>$(ArtifactsDir)\obj</ArtifactsObjDir>
<ArtifactsPackagesDir>$(ArtifactsDir)\packages</ArtifactsPackagesDir>
<BaseOutputPath>$(ArtifactsBinDir)\$(MSBuildProjectName)</BaseOutputPath>
<BaseIntermediateOutputPath>$(ArtifactsObjDir)\$(MSBuildProjectName)</BaseIntermediateOutputPath>
<SymStoreDirectory>$(ArtifactsDir)\SymStore</SymStoreDirectory>
<ProtoOutputPath Condition="'$(OS)' != 'Unix'">$(ArtifactsBinDir)\fsc\Proto\net46</ProtoOutputPath>
<ProtoOutputPath Condition="'$(OS)' == 'Unix'">$(ArtifactsBinDir)/fsc/Proto/netcoreapp2.1</ProtoOutputPath>
<ValueTupleImplicitPackageVersion>4.4.0</ValueTupleImplicitPackageVersion>
</PropertyGroup>

<!-- nuget -->
<PropertyGroup>
<!-- default NuGet package restore location -->
<NuGetPackageRoot Condition="'$(NuGetPackageRoot)' == ''">$(NUGET_PACKAGES)</NuGetPackageRoot>
<NuGetPackageRoot Condition="'$(NuGetPackageRoot)' == '' AND '$(OS)' == 'Windows_NT'">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
<NuGetPackageRoot Condition="'$(NuGetPackageRoot)' == '' AND '$(OS)' != 'Windows_NT'">$(HOME)/.nuget/packages/</NuGetPackageRoot>
<!-- ensure there is a trailing slash -->
<NuGetPackageRoot Condition="!HasTrailingSlash('$(NuGetPackageRoot)') AND '$(OS)' == 'Windows_NT'">$(NuGetPackageRoot)\</NuGetPackageRoot>
<NuGetPackageRoot Condition="!HasTrailingSlash('$(NuGetPackageRoot)') AND '$(OS)' != 'Windows_NT'">$(NuGetPackageRoot)/</NuGetPackageRoot>
<!-- ensure all NuGet packages come from the `$(NuGetPackageRoot)` variable -->
<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
</PropertyGroup>

<!-- mono -->
<PropertyGroup Condition="'$(OS)' == 'Unix'">
<MonoPackaging Condition="$(TargetFramework.StartsWith('net4'))">true</MonoPackaging>
<FrameworkPathOverride Condition="'$(TargetFramework)' == 'net45'">/usr/lib/mono/4.5-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(TargetFramework)' == 'net46'">/usr/lib/mono/4.6-api</FrameworkPathOverride>
</PropertyGroup>

<!-- signing -->
<PropertyGroup>
<SkipSigning>false</SkipSigning>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>$(FSharpSourcesRoot)\fsharp\msft.pubkey</AssemblyOriginatorKeyFile>
<StrongNames>true</StrongNames>
<DelaySign>true</DelaySign>
</PropertyGroup>
<PropertyGroup Condition="'$(MonoPackaging)' == 'true'">
<AssemblyOriginatorKeyFile>$(FSharpSourcesRoot)\fsharp\test.snk</AssemblyOriginatorKeyFile>
<DelaySign>false</DelaySign>
<DefineConstants>STRONG_NAME_FSHARP_COMPILER_WITH_TEST_KEY;$(DefineConstants)</DefineConstants>
</PropertyGroup>

<!-- localization -->
<PropertyGroup>
<EnableXlfLocalization Condition="'$(EnableXlfLocalization)' == '' AND ('$(Configuration)' == 'Proto' OR '$(MonoPackaging)' == 'true')">false</EnableXlfLocalization>
<UpdateXlfOnBuild Condition="'$(CI)' != '1'">true</UpdateXlfOnBuild>
</PropertyGroup>

<!-- other -->
<PropertyGroup>
<DebugType>portable</DebugType>
<MicroBuildAssemblyFileLanguage>fs</MicroBuildAssemblyFileLanguage>
<UseStandardResourceNames>false</UseStandardResourceNames>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>

<!-- SDK targets override -->
<PropertyGroup Condition="'$(Configuration)' != 'Proto' AND Exists('$(ProtoOutputPath)')">
<FSharpTargetsPath>$(ProtoOutputPath)\Microsoft.FSharp.Targets</FSharpTargetsPath>
<FSharpPropsShim>$(ProtoOutputPath)\Microsoft.FSharp.NetSdk.props</FSharpPropsShim>
<FSharpTargetsShim>$(ProtoOutputPath)\Microsoft.FSharp.NetSdk.targets</FSharpTargetsShim>
<FSharpOverridesTargetsShim>$(ProtoOutputPath)\Microsoft.FSharp.Overrides.NetSdk.targets</FSharpOverridesTargetsShim>
</PropertyGroup>

</Project>
42 changes: 42 additions & 0 deletions FSharpBuild.Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<Project>

<Import Project="FSharp.Profiles.props" />

<PropertyGroup>
<XlfLanguages>en;$(XlfLanguages)</XlfLanguages>
</PropertyGroup>

<PropertyGroup Condition="'$(UseAssetTargetFallback)' == 'true'">
<!--
HACK: Necessary because the `netstandard1.6` version of FSharp.Compiler.Private requires a package that isn't
necessary for `net46`, but the package has a requirement on `net462`. The reference is excluded from the build
during `net46`, but for purposes of restore needs to be present.
-->
<AssetTargetFallback>$(AssetTargetFallback);net462</AssetTargetFallback>
</PropertyGroup>

<PropertyGroup>
<CompileDependsOn>$(CompileDependsOn);CopyAndSubstituteTextFiles</CompileDependsOn>
</PropertyGroup>

<Target Name="CopyAndSubstituteTextFiles"
Inputs="@(CopyAndSubstituteText)"
Outputs="@(CopyAndSubstituteText->'$(OutDir)%(TargetFilename)')">
<PropertyGroup>
<_ReplacementText>$([System.IO.File]::ReadAllText('%(CopyAndSubstituteText.FullPath)'))</_ReplacementText>
<_ReplacementText Condition="'%(CopyAndSubstituteText.Pattern1)' != ''">$(_ReplacementText.Replace('%(CopyAndSubstituteText.Pattern1)', '%(CopyAndSubstituteText.Replacement1)'))</_ReplacementText>
<_ReplacementText Condition="'%(CopyAndSubstituteText.Pattern2)' != ''">$(_ReplacementText.Replace('%(CopyAndSubstituteText.Pattern2)', '%(CopyAndSubstituteText.Replacement2)'))</_ReplacementText>
</PropertyGroup>
<WriteLinesToFile File="$(OutDir)%(CopyAndSubstituteText.TargetFilename)" Lines="$(_ReplacementText)" Overwrite="true" />
<!-- Make sure it will get cleaned -->
<CreateItem Include="$(OutDir)%(CopyAndSubstituteText.TargetFilename)">
<Output TaskParameter="Include" ItemName="FileWrites" />
</CreateItem>
</Target>

<Import Project="build\targets\NGenOrCrossGen.targets" />
<Import Project="build\targets\ConvertPortablePdbs.targets" />
<Import Project="build\targets\GenerateAssemblyAttributes.targets" />
<Import Project="build\targets\GenerateInternalsVisibleTo.targets" />

</Project>
14 changes: 8 additions & 6 deletions NuGet.Config
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>

<solution>
<add key="disableSourceControlIntegration" value="true" />
</solution>
<packageSources>
<!--To inherit the global NuGet package sources remove the <clear/> line below -->
<!-- Only specify feed for Arcade SDK (see https://github.com/Microsoft/msbuild/issues/2982) -->
<packageSources>
<clear />
<add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="dotnet-core" value="https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json" />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
</packageSources>

</configuration>
<disabledPackageSources>
<clear />
</disabledPackageSources>
</configuration>
19 changes: 13 additions & 6 deletions PublishToBlob.proj
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,33 @@
<PropertyGroup>
<FeedTasksPackage>Microsoft.DotNet.Build.Tasks.Feed</FeedTasksPackage>
<!-- This version should be kept in sync with `packages.config` -->
<FeedTasksPackageVersion>2.1.0-prerelease-02419-02</FeedTasksPackageVersion>
<FeedTasksPackageVersion>2.2.0-beta.19066.1</FeedTasksPackageVersion>
</PropertyGroup>

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

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

<PropertyGroup>
<ArtifactsLogDir>$(MSBuildThisFileDirectory)artifacts\log\$(Configuration)\</ArtifactsLogDir>
<Platform Condition="'$(Platform)' == ''">AnyCPU</Platform>
<PlatformName Condition="'$(PlatformName)' == ''">$(Platform)</PlatformName>
<AssetManifestFilePath>$(ArtifactsLogDir)AssetManifest\$(OS)-$(PlatformName).xml</AssetManifestFilePath>
</PropertyGroup>

<Target Name="Build">
<PushToBlobFeed ExpectedFeedUrl="$(ExpectedFeedUrl)"
AccountKey="$(AccountKey)"
ItemsToPush="@(NuGetPackages)"
Overwrite="$(PublishOverwrite)"
ManifestBuildData="Location=$(ExpectedFeedUrl)"
ManifestRepoUri="$(ManifestRepoUri)"
ManifestBranch="$(ManifestBranch)"
ManifestBuildId="$(ManifestBuildId)"
ManifestCommit="$(ManifestCommit)"
ManifestName="fsharp"
SkipCreateManifest="false" />
AssetManifestPath="$(AssetManifestFilePath)" />
</Target>

</Project>
1 change: 1 addition & 0 deletions RoslynPackageVersion.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.9.0-beta8-63208-01
Loading