Skip to content

Commit 3ea8c00

Browse files
committed
integrate visualfsharp master
2 parents 593c683 + 1605352 commit 3ea8c00

33 files changed

+165
-521
lines changed

fcs/FSharp.Compiler.Service.MSBuild.v12/FSharp.Compiler.Service.MSBuild.v12.fsproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<FSharpSourcesRoot>$(MSBuildProjectDirectory)\..\..\src</FSharpSourcesRoot>
44
</PropertyGroup>
55
<Import Project="..\fcs.props" />
6+
<Import Project="..\netfx.props" />
67
<PropertyGroup>
78
<TargetFrameworks>net45</TargetFrameworks>
89
<OutputPath>..\..\$(Configuration.ToLower())\fcs</OutputPath>
@@ -23,10 +24,10 @@
2324
<Compile Include="..\..\src\fsharp\MSBuildReferenceResolver.fs">
2425
<Link>Service/MSBuildReferenceResolver.fs</Link>
2526
</Compile>
26-
<Reference Include="FSharp.Core">
27-
<HintPath>$(FSharpSourcesRoot)\..\packages\Microsoft.Portable.FSharp.Core.4.1.20\lib\profiles\net40\FSharp.Core.dll</HintPath>
28-
<Private>false</Private>
29-
</Reference>
27+
</ItemGroup>
28+
<ItemGroup>
29+
<PackageReference Include="FSharp.Core" Version="4.1.*" />
30+
<ProjectReference Include="..\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj" />
3031
<Reference Include="Microsoft.Build.Framework, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
3132
<HintPath>$(FSharpSourcesRoot)\..\fcs\dependencies\MSBuild.v12.0\Microsoft.Build.Framework.dll</HintPath>
3233
<Private>false</Private>
@@ -47,6 +48,5 @@
4748
<HintPath>$(FSharpSourcesRoot)\..\fcs\dependencies\MSBuild.v12.0\Microsoft.Build.Tasks.v12.0.dll</HintPath>
4849
<Private>false</Private>
4950
</Reference>
50-
<ProjectReference Include="..\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj" />
5151
</ItemGroup>
5252
</Project>

fcs/FSharp.Compiler.Service.ProjectCracker/FSharp.Compiler.Service.ProjectCracker.fsproj

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<FSharpSourcesRoot>$(MSBuildProjectDirectory)\..\..\src</FSharpSourcesRoot>
44
</PropertyGroup>
55
<Import Project="..\fcs.props" />
6+
<Import Project="..\netfx.props" />
67
<PropertyGroup>
78
<TargetFrameworks>net45</TargetFrameworks>
89
<OutputPath>..\..\$(Configuration.ToLower())\fcs</OutputPath>
@@ -26,11 +27,8 @@
2627
<Content Include="..\..\release\fcs\net45\FSharp.Compiler.Service.ProjectCrackerTool.exe" PackagePath="utilities\net45" />
2728
<Content Include="..\..\release\fcs\net45\FSharp.Compiler.Service.ProjectCrackerTool.exe.config" PackagePath="utilities\net45" />
2829
</ItemGroup>
29-
<ItemGroup Condition="'$(TargetFramework)' == 'net45'">
30-
<Reference Include="FSharp.Core">
31-
<HintPath>$(FSharpSourcesRoot)\..\packages\Microsoft.Portable.FSharp.Core.4.1.20\lib\profiles\net40\FSharp.Core.dll</HintPath>
32-
<Private>false</Private>
33-
</Reference>
30+
<ItemGroup>
31+
<PackageReference Include="FSharp.Core" Version="4.1.*" />
3432
<ProjectReference Include="..\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj" />
3533
</ItemGroup>
3634
</Project>

fcs/FSharp.Compiler.Service.ProjectCrackerTool/FSharp.Compiler.Service.ProjectCrackerTool.fsproj

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<FSharpSourcesRoot>$(MSBuildProjectDirectory)\..\..\src</FSharpSourcesRoot>
55
</PropertyGroup>
66
<Import Project="..\fcs.props" />
7+
<Import Project="..\netfx.props" />
78
<PropertyGroup>
89
<OutputType>Exe</OutputType>
910
<TargetFrameworks>net45</TargetFrameworks>
@@ -20,11 +21,7 @@
2021
<Compile Include="Program.fs" />
2122
<None Include="App.config" />
2223
<None Include="FSharp.Compiler.Service.ProjectCracker.targets" />
23-
<None Include="paket.references" />
24-
<Reference Include="FSharp.Core">
25-
<HintPath>$(FSharpSourcesRoot)\..\packages\Microsoft.Portable.FSharp.Core.4.1.20\lib\profiles\net40\FSharp.Core.dll</HintPath>
26-
<Private>false</Private>
27-
</Reference>
24+
<PackageReference Include="FSharp.Core" Version="4.1.*" />
2825
<Reference Include="Microsoft.Build.Framework, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
2926
<HintPath>$(FSharpSourcesRoot)\..\fcs\dependencies\MSBuild.v12.0\Microsoft.Build.Framework.dll</HintPath>
3027
<Private>false</Private>

fcs/FSharp.Compiler.Service.ProjectCrackerTool/paket.references

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<Import Project="..\..\netfx.props" />
3+
<PropertyGroup>
4+
<TargetFrameworks>net45;netstandard2.0</TargetFrameworks>
5+
<IsPackable>false</IsPackable>
6+
</PropertyGroup>
7+
<ItemGroup>
8+
<Compile Include="../../../tests/service/data/CSharp_Analysis/CSharpClass.cs" />
9+
</ItemGroup>
10+
</Project>

fcs/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,16 @@
33
<FSharpSourcesRoot>$(MSBuildProjectDirectory)\..\..\src</FSharpSourcesRoot>
44
</PropertyGroup>
55
<Import Project="..\fcs.props" />
6+
<Import Project="..\netfx.props" />
67
<PropertyGroup>
78
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
8-
<!-- <DefineConstants>$(DefineConstants);NETCOREAPP2_0</DefineConstants> -->
99
<NoWarn>$(NoWarn);44;</NoWarn>
1010
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
11-
<DelaySign>true</DelaySign>
1211
<GenerateDocumentationFile>true</GenerateDocumentationFile>
1312
<OutputPath>..\..\$(Configuration.ToLower())\fcs</OutputPath>
1413
<DebugType>portable</DebugType>
14+
<IsPackable>false</IsPackable>
15+
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> <!-- Tests won't run without this, at least on OSX, see https://github.com/NuGet/Home/issues/4837#issuecomment-354536302 -->
1516
</PropertyGroup>
1617
<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp2.0'">
1718
<DefineConstants>$(DefineConstants);FX_NO_RUNTIMEENVIRONMENT</DefineConstants>
@@ -70,14 +71,12 @@
7071
<None Include="App.config" />
7172
</ItemGroup>
7273
<ItemGroup>
73-
<ProjectReference Include="..\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj" />
74-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.5.0" />
74+
<PackageReference Include="FSharp.Core" Version="4.2.*" />
75+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.6.0" />
7576
<PackageReference Include="NUnit" Version="3.9.0" />
7677
<PackageReference Include="NUnit3TestAdapter" Version="3.9.0" />
7778
<PackageReference Include="Dotnet.ProjInfo" Version="0.9.0" />
78-
</ItemGroup>
79-
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.0'">
80-
<PackageReference Include="FSharp.Core" Version="4.2.3" />
79+
<ProjectReference Include="..\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj" />
8180
</ItemGroup>
8281
<ItemGroup Condition="'$(TargetFramework)' == 'net46'">
8382
<Reference Include="mscorlib" />
@@ -96,5 +95,7 @@
9695
<!-- disabled until all project files are converted to .NET SDK -->
9796
<!-- <ProjectReference Include="$(FSharpSourcesRoot)\..\tests\service\data\CSharp_Analysis\CSharp_Analysis.csproj" /> -->
9897
<ProjectReference Include="$(FSharpSourcesRoot)\..\fcs\FSharp.Compiler.Service.ProjectCracker\FSharp.Compiler.Service.ProjectCracker.fsproj" />
98+
<ProjectReference Include="CSharp_Analysis\CSharp_Analysis.csproj" />
99+
<ProjectReference Include="..\FSharp.Compiler.Service.ProjectCracker\FSharp.Compiler.Service.ProjectCracker.fsproj" />
99100
</ItemGroup>
100101
</Project>

fcs/FSharp.Compiler.Service.sln

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "UntypedTree", "samples\Unty
5151
EndProject
5252
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FscExe", "samples\FscExe\FscExe.fsproj", "{C94C257C-3C0A-4858-B5D8-D746498D1F08}"
5353
EndProject
54-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharp_Analysis", "..\tests\service\data\CSharp_Analysis\CSharp_Analysis.csproj", "{887630A3-4B1D-40EA-B8B3-2D842E9C40DB}"
54+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharp_Analysis", "FSharp.Compiler.Service.Tests\CSharp_Analysis\CSharp_Analysis.csproj", "{887630A3-4B1D-40EA-B8B3-2D842E9C40DB}"
5555
EndProject
5656
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FsiExe", "samples\FsiExe\FsiExe.fsproj", "{F9540CA8-1CE0-4546-A23A-A461E416E95B}"
5757
EndProject

fcs/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<FSharpSourcesRoot>$(MSBuildProjectDirectory)\..\..\src</FSharpSourcesRoot>
44
</PropertyGroup>
55
<Import Project="..\fcs.props" />
6+
<Import Project="..\netfx.props" />
67
<PropertyGroup>
78
<TargetFrameworks>net45;netstandard2.0</TargetFrameworks>
89
<DefineConstants>$(DefineConstants);COMPILER_SERVICE_AS_DLL</DefineConstants>
@@ -30,7 +31,6 @@
3031
<PackageTags>F#, fsharp, interactive, compiler, editor</PackageTags>
3132
</PropertyGroup>
3233
<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
33-
<!-- <DefineConstants >$(DefineConstants);NETSTANDARD2_0</DefineConstants> -->
3434
<DefineConstants>$(DefineConstants);FX_NO_PDB_READER</DefineConstants>
3535
<DefineConstants>$(DefineConstants);FX_NO_PDB_WRITER</DefineConstants>
3636
<DefineConstants>$(DefineConstants);FX_NO_SYMBOLSTORE</DefineConstants>
@@ -631,31 +631,25 @@
631631
<Link>Service/fsi.fs</Link>
632632
</Compile>
633633
</ItemGroup>
634-
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
634+
<ItemGroup>
635+
<PackageReference Include="FSharp.Core" Version="4.1.*" />
635636
<PackageReference Include="System.Collections.Immutable" Version="1.3.1" />
637+
<PackageReference Include="System.Reflection.Metadata" Version="1.4.2" />
638+
<PackageReference Include="Microsoft.DiaSymReader.PortablePdb" Version="1.2.0" />
639+
<PackageReference Include="Microsoft.DiaSymReader" Version="1.1.0" />
640+
</ItemGroup>
641+
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
636642
<PackageReference Include="System.Diagnostics.Process" Version="4.1.0" />
637643
<PackageReference Include="System.Diagnostics.TraceSource" Version="4.0.0" />
638644
<PackageReference Include="System.Reflection.Emit" Version="4.3.0" />
639-
<PackageReference Include="System.Reflection.Metadata" Version="1.4.1" />
640645
<PackageReference Include="System.Reflection.TypeExtensions" Version="4.3.0" />
641646
<PackageReference Include="System.Runtime.Loader" Version="4.0.0" />
642647
<PackageReference Include="System.Security.Cryptography.Algorithms" Version="4.3.0" />
643-
<PackageReference Include="FSharp.Core" Version="4.1.*" />
644648
</ItemGroup>
645649
<ItemGroup Condition="'$(TargetFramework)' == 'net45'">
650+
<Reference Include="System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
651+
<Reference Include="System.IO, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
646652
<Reference Include="ISymWrapper, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
647-
<Reference Include="Microsoft.DiaSymReader.PortablePdb">
648-
<HintPath>$(FSharpSourcesRoot)\..\packages\Microsoft.DiaSymReader.PortablePdb.1.2.0\lib\portable-net45+win8\Microsoft.DiaSymReader.PortablePdb.dll</HintPath>
649-
</Reference>
650-
<Reference Include="Microsoft.DiaSymReader">
651-
<HintPath>$(FSharpSourcesRoot)\..\packages\Microsoft.DiaSymReader.1.1.0\lib\portable-net45+win8\Microsoft.DiaSymReader.dll</HintPath>
652-
</Reference>
653-
<Reference Include="System.Reflection.Metadata">
654-
<HintPath>$(FSharpSourcesRoot)\..\packages\System.Reflection.Metadata.1.4.2\lib\portable-net45+win8\System.Reflection.Metadata.dll</HintPath>
655-
</Reference>
656-
<Reference Include="System.Collections.Immutable">
657-
<HintPath>$(FSharpSourcesRoot)\..\packages\System.Collections.Immutable.1.3.1\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll</HintPath>
658-
</Reference>
659653
<Reference Include="System.ValueTuple">
660654
<HintPath>$(FSharpSourcesRoot)\..\packages\System.ValueTuple.4.3.1\lib\netstandard1.0\System.ValueTuple.dll</HintPath>
661655
</Reference>

fcs/build.fsx

Lines changed: 16 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -59,78 +59,57 @@ let isJenkinsBuild = buildServer = BuildServer.Jenkins
5959
let isVersionTag tag = Version.TryParse tag |> fst
6060
let hasRepoVersionTag = isAppVeyorBuild && AppVeyorEnvironment.RepoTag && isVersionTag AppVeyorEnvironment.RepoTagName
6161
let assemblyVersion = if hasRepoVersionTag then AppVeyorEnvironment.RepoTagName else release.NugetVersion
62-
let nugetVersion = release.NugetVersion
63-
open SemVerHelper
6462

6563
let buildVersion =
6664
if hasRepoVersionTag then assemblyVersion
6765
else if isAppVeyorBuild then sprintf "%s-b%s" assemblyVersion AppVeyorEnvironment.BuildNumber
6866
else assemblyVersion
6967

70-
// Skipping build of FCS on Jenkins Mono for now until we knoow how to get an updated version of Mono installed
71-
let skipBuild = isJenkinsBuild && isMono
72-
7368
Target "Clean" (fun _ ->
74-
if not skipBuild then
7569
CleanDir releaseDir
7670
)
7771

7872
Target "Restore" (fun _ ->
79-
if not skipBuild then
80-
runDotnet __SOURCE_DIRECTORY__ "restore FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj -v n"
81-
runDotnet __SOURCE_DIRECTORY__ "restore FSharp.Compiler.Service.ProjectCrackerTool/FSharp.Compiler.Service.ProjectCrackerTool.fsproj -v n"
82-
runDotnet __SOURCE_DIRECTORY__ "restore FSharp.Compiler.Service.ProjectCracker/FSharp.Compiler.Service.ProjectCracker.fsproj -v n"
83-
runDotnet __SOURCE_DIRECTORY__ "restore FSharp.Compiler.Service.MSBuild.v12/FSharp.Compiler.Service.MSBuild.v12.fsproj -v n"
84-
for p in (!! "./../**/packages.config") do
85-
let result =
86-
ExecProcess (fun info ->
87-
info.FileName <- FullName @"./../.nuget/NuGet.exe"
88-
info.WorkingDirectory <- FullName @"./.."
89-
info.Arguments <- sprintf "restore %s -PackagesDirectory \"%s\" -ConfigFile \"%s\"" (FullName p) (FullName "./../packages") (FullName "./../NuGet.Config")) TimeSpan.MaxValue
90-
if result <> 0 then failwithf "nuget restore %s failed" p
73+
// We assume a paket restore has already been run
74+
runDotnet __SOURCE_DIRECTORY__ "restore FSharp.Compiler.Service.sln -v n"
75+
for p in [ "../packages.config" ] do
76+
ExecProcess (fun info ->
77+
info.FileName <- FullName @"./../.nuget/NuGet.exe"
78+
info.WorkingDirectory <- FullName @"./.."
79+
info.Arguments <- sprintf "restore %s -PackagesDirectory \"%s\" -ConfigFile \"%s\"" (FullName p) (FullName "./../packages") (FullName "./../NuGet.Config")) TimeSpan.MaxValue
80+
|> assertExitCodeZero
9181
)
9282

9383
Target "BuildVersion" (fun _ ->
94-
if not skipBuild then
9584
Shell.Exec("appveyor", sprintf "UpdateBuild -Version \"%s\"" buildVersion) |> ignore
9685
)
9786

9887
Target "Build" (fun _ ->
99-
if skipBuild then
100-
try Directory.CreateDirectory("../Release/") |> ignore with _ -> ()
101-
File.WriteAllText("../Release/nichts.txt", "nothing to see here, build was skipped until we knoow how to get an updated version of Mono installed on Jenkins")
102-
else
103-
runDotnet __SOURCE_DIRECTORY__ "build FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj -v n -c Release /maxcpucount:1"
88+
runDotnet __SOURCE_DIRECTORY__ "build FSharp.Compiler.Service.sln -v n -c Release"
10489
)
10590

10691
Target "Test" (fun _ ->
107-
if not skipBuild then
92+
// This project file is used for the netcoreapp2.0 tests to work out reference sets
10893
runDotnet __SOURCE_DIRECTORY__ "restore ../tests/projects/Sample_NETCoreSDK_FSharp_Library_netstandard2_0/Sample_NETCoreSDK_FSharp_Library_netstandard2_0.fsproj -v n"
10994
runDotnet __SOURCE_DIRECTORY__ "build ../tests/projects/Sample_NETCoreSDK_FSharp_Library_netstandard2_0/Sample_NETCoreSDK_FSharp_Library_netstandard2_0.fsproj -v n"
110-
runDotnet __SOURCE_DIRECTORY__ "test FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj -v n -c Release /maxcpucount:1"
111-
)
11295

96+
// Now run the tests
97+
runDotnet __SOURCE_DIRECTORY__ "test FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj -v n -c Release"
98+
)
11399

114100
Target "NuGet" (fun _ ->
115-
if not skipBuild then
116-
runDotnet __SOURCE_DIRECTORY__ "build FSharp.Compiler.Service.ProjectCrackerTool/FSharp.Compiler.Service.ProjectCrackerTool.fsproj -v n -c Release /maxcpucount:1"
117-
runDotnet __SOURCE_DIRECTORY__ "pack FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj -v n -c Release /maxcpucount:1"
118-
runDotnet __SOURCE_DIRECTORY__ "pack FSharp.Compiler.Service.ProjectCracker/FSharp.Compiler.Service.ProjectCracker.fsproj -v n -c Release /maxcpucount:1"
119-
runDotnet __SOURCE_DIRECTORY__ "pack FSharp.Compiler.Service.MSBuild.v12/FSharp.Compiler.Service.MSBuild.v12.fsproj -v n -c Release /maxcpucount:1"
101+
runDotnet __SOURCE_DIRECTORY__ "pack FSharp.Compiler.Service.sln -v n -c Release"
120102
)
121103

122104
Target "GenerateDocsEn" (fun _ ->
123-
if not skipBuild then
124105
executeFSIWithArgs "docsrc/tools" "generate.fsx" [] [] |> ignore
125106
)
126107

127108
Target "GenerateDocsJa" (fun _ ->
128-
if not skipBuild then
129109
executeFSIWithArgs "docsrc/tools" "generate.ja.fsx" [] [] |> ignore
130110
)
131111

132112
Target "PublishNuGet" (fun _ ->
133-
if not skipBuild then
134113
Paket.Push (fun p ->
135114
let apikey =
136115
match getBuildParam "nuget-apikey" with
@@ -144,11 +123,12 @@ Target "PublishNuGet" (fun _ ->
144123
// --------------------------------------------------------------------------------------
145124
// Run all targets by default. Invoke 'build <Target>' to override
146125

126+
Target "Start" DoNothing
147127
Target "Release" DoNothing
148128
Target "GenerateDocs" DoNothing
149129
Target "TestAndNuGet" DoNothing
150130

151-
"Clean"
131+
"Start"
152132
=?> ("BuildVersion", isAppVeyorBuild)
153133
==> "Restore"
154134
==> "Build"

fcs/cibuild.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
22

33
# note: expects to run from top directory
4-
#./mono/latest-mono-stable.sh
5-
./build.sh NuGet
4+
./mono/latest-mono-stable.sh
5+
./fcs/build.sh NuGet

0 commit comments

Comments
 (0)