未验证 提交 e7ce9cdc 编写于 作者: D Don Syme 提交者: GitHub

Re-enable FCS build on Jenkins Ubuntu (#4391)

* re-enable mono build on CI

* do it right

* simplify fcs samples

* build nugets and test on mono

* fix proto build

* remove mono workarounds using msbuild, use dotnet instead

* add comment

* set IsPackable=false explicitly in samples

* missing file

* add docs

* fix minor things
上级 44ef8142
......@@ -3,6 +3,7 @@
<FSharpSourcesRoot>$(MSBuildProjectDirectory)\..\..\src</FSharpSourcesRoot>
</PropertyGroup>
<Import Project="..\fcs.props" />
<Import Project="..\netfx.props" />
<PropertyGroup>
<TargetFrameworks>net45</TargetFrameworks>
<OutputPath>..\..\$(Configuration.ToLower())\fcs</OutputPath>
......@@ -23,10 +24,10 @@
<Compile Include="..\..\src\fsharp\MSBuildReferenceResolver.fs">
<Link>Service/MSBuildReferenceResolver.fs</Link>
</Compile>
<Reference Include="FSharp.Core">
<HintPath>$(FSharpSourcesRoot)\..\packages\Microsoft.Portable.FSharp.Core.4.1.20\lib\profiles\net40\FSharp.Core.dll</HintPath>
<Private>false</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="FSharp.Core" Version="4.1.*" />
<ProjectReference Include="..\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj" />
<Reference Include="Microsoft.Build.Framework, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<HintPath>$(FSharpSourcesRoot)\..\fcs\dependencies\MSBuild.v12.0\Microsoft.Build.Framework.dll</HintPath>
<Private>false</Private>
......@@ -47,6 +48,5 @@
<HintPath>$(FSharpSourcesRoot)\..\fcs\dependencies\MSBuild.v12.0\Microsoft.Build.Tasks.v12.0.dll</HintPath>
<Private>false</Private>
</Reference>
<ProjectReference Include="..\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj" />
</ItemGroup>
</Project>
\ No newline at end of file
......@@ -3,6 +3,7 @@
<FSharpSourcesRoot>$(MSBuildProjectDirectory)\..\..\src</FSharpSourcesRoot>
</PropertyGroup>
<Import Project="..\fcs.props" />
<Import Project="..\netfx.props" />
<PropertyGroup>
<TargetFrameworks>net45</TargetFrameworks>
<OutputPath>..\..\$(Configuration.ToLower())\fcs</OutputPath>
......@@ -26,11 +27,8 @@
<Content Include="..\..\release\fcs\net45\FSharp.Compiler.Service.ProjectCrackerTool.exe" PackagePath="utilities\net45" />
<Content Include="..\..\release\fcs\net45\FSharp.Compiler.Service.ProjectCrackerTool.exe.config" PackagePath="utilities\net45" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net45'">
<Reference Include="FSharp.Core">
<HintPath>$(FSharpSourcesRoot)\..\packages\Microsoft.Portable.FSharp.Core.4.1.20\lib\profiles\net40\FSharp.Core.dll</HintPath>
<Private>false</Private>
</Reference>
<ItemGroup>
<PackageReference Include="FSharp.Core" Version="4.1.*" />
<ProjectReference Include="..\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj" />
</ItemGroup>
</Project>
\ No newline at end of file
......@@ -3,6 +3,7 @@
<FSharpSourcesRoot>$(MSBuildProjectDirectory)\..\..\src</FSharpSourcesRoot>
</PropertyGroup>
<Import Project="..\fcs.props" />
<Import Project="..\netfx.props" />
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net45</TargetFrameworks>
......@@ -19,11 +20,7 @@
<Compile Include="Program.fs" />
<None Include="App.config" />
<None Include="FSharp.Compiler.Service.ProjectCracker.targets" />
<None Include="paket.references" />
<Reference Include="FSharp.Core">
<HintPath>$(FSharpSourcesRoot)\..\packages\Microsoft.Portable.FSharp.Core.4.1.20\lib\profiles\net40\FSharp.Core.dll</HintPath>
<Private>false</Private>
</Reference>
<PackageReference Include="FSharp.Core" Version="4.1.*" />
<Reference Include="Microsoft.Build.Framework, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<HintPath>$(FSharpSourcesRoot)\..\fcs\dependencies\MSBuild.v12.0\Microsoft.Build.Framework.dll</HintPath>
<Private>false</Private>
......
Microsoft.Build.Utilities.Core
Microsoft.Build.Engine
Microsoft.Build
System.Threading.Tasks.Dataflow
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\netfx.props" />
<PropertyGroup>
<TargetFrameworks>net45;netstandard2.0</TargetFrameworks>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<Compile Include="../../../tests/service/data/CSharp_Analysis/CSharpClass.cs" />
</ItemGroup>
</Project>
\ No newline at end of file
......@@ -3,14 +3,14 @@
<FSharpSourcesRoot>$(MSBuildProjectDirectory)\..\..\src</FSharpSourcesRoot>
</PropertyGroup>
<Import Project="..\fcs.props" />
<Import Project="..\netfx.props" />
<PropertyGroup>
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
<!-- <DefineConstants>$(DefineConstants);NETCOREAPP2_0</DefineConstants> -->
<NoWarn>$(NoWarn);44;</NoWarn>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<DelaySign>true</DelaySign>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<OutputPath>..\..\$(Configuration.ToLower())\fcs</OutputPath>
<IsPackable>false</IsPackable>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> <!-- Tests won't run without this, at least on OSX, see https://github.com/NuGet/Home/issues/4837#issuecomment-354536302 -->
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp2.0'">
<DefineConstants>$(DefineConstants);FX_NO_RUNTIMEENVIRONMENT</DefineConstants>
......@@ -68,14 +68,12 @@
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.5.0" />
<PackageReference Include="FSharp.Core" Version="4.2.*" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.6.0" />
<PackageReference Include="NUnit" Version="3.9.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.9.0" />
<PackageReference Include="Dotnet.ProjInfo" Version="0.9.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.0'">
<PackageReference Include="FSharp.Core" Version="4.2.3" />
<ProjectReference Include="..\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net46'">
<Reference Include="mscorlib" />
......@@ -91,7 +89,7 @@
<Reference Include="System.Xaml" />
<Reference Include="WindowsBase" />
<Reference Include="UIAutomationTypes" />
<ProjectReference Include="$(FSharpSourcesRoot)\..\tests\service\data\CSharp_Analysis\CSharp_Analysis.csproj" />
<ProjectReference Include="$(FSharpSourcesRoot)\..\fcs\FSharp.Compiler.Service.ProjectCracker\FSharp.Compiler.Service.ProjectCracker.fsproj" />
<ProjectReference Include="CSharp_Analysis\CSharp_Analysis.csproj" />
<ProjectReference Include="..\FSharp.Compiler.Service.ProjectCracker\FSharp.Compiler.Service.ProjectCracker.fsproj" />
</ItemGroup>
</Project>
\ No newline at end of file
......@@ -51,7 +51,7 @@ Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "UntypedTree", "samples\Unty
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FscExe", "samples\FscExe\FscExe.fsproj", "{C94C257C-3C0A-4858-B5D8-D746498D1F08}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharp_Analysis", "..\tests\service\data\CSharp_Analysis\CSharp_Analysis.csproj", "{887630A3-4B1D-40EA-B8B3-2D842E9C40DB}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharp_Analysis", "FSharp.Compiler.Service.Tests\CSharp_Analysis\CSharp_Analysis.csproj", "{887630A3-4B1D-40EA-B8B3-2D842E9C40DB}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FsiExe", "samples\FsiExe\FsiExe.fsproj", "{F9540CA8-1CE0-4546-A23A-A461E416E95B}"
EndProject
......
......@@ -3,6 +3,7 @@
<FSharpSourcesRoot>$(MSBuildProjectDirectory)\..\..\src</FSharpSourcesRoot>
</PropertyGroup>
<Import Project="..\fcs.props" />
<Import Project="..\netfx.props" />
<PropertyGroup>
<TargetFrameworks>net45;netstandard2.0</TargetFrameworks>
<DefineConstants>$(DefineConstants);COMPILER_SERVICE_AS_DLL</DefineConstants>
......@@ -30,7 +31,6 @@
<PackageTags>F#, fsharp, interactive, compiler, editor</PackageTags>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<!-- <DefineConstants >$(DefineConstants);NETSTANDARD2_0</DefineConstants> -->
<DefineConstants>$(DefineConstants);FX_NO_PDB_READER</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_PDB_WRITER</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_SYMBOLSTORE</DefineConstants>
......@@ -631,31 +631,25 @@
<Link>Service/fsi.fs</Link>
</Compile>
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<ItemGroup>
<PackageReference Include="FSharp.Core" Version="4.1.*" />
<PackageReference Include="System.Collections.Immutable" Version="1.3.1" />
<PackageReference Include="System.Reflection.Metadata" Version="1.4.2" />
<PackageReference Include="Microsoft.DiaSymReader.PortablePdb" Version="1.2.0" />
<PackageReference Include="Microsoft.DiaSymReader" Version="1.1.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="System.Diagnostics.Process" Version="4.1.0" />
<PackageReference Include="System.Diagnostics.TraceSource" Version="4.0.0" />
<PackageReference Include="System.Reflection.Emit" Version="4.3.0" />
<PackageReference Include="System.Reflection.Metadata" Version="1.4.1" />
<PackageReference Include="System.Reflection.TypeExtensions" Version="4.3.0" />
<PackageReference Include="System.Runtime.Loader" Version="4.0.0" />
<PackageReference Include="System.Security.Cryptography.Algorithms" Version="4.3.0" />
<PackageReference Include="FSharp.Core" Version="4.1.*" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net45'">
<Reference Include="System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<Reference Include="System.IO, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<Reference Include="ISymWrapper, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<Reference Include="Microsoft.DiaSymReader.PortablePdb">
<HintPath>$(FSharpSourcesRoot)\..\packages\Microsoft.DiaSymReader.PortablePdb.1.2.0\lib\portable-net45+win8\Microsoft.DiaSymReader.PortablePdb.dll</HintPath>
</Reference>
<Reference Include="Microsoft.DiaSymReader">
<HintPath>$(FSharpSourcesRoot)\..\packages\Microsoft.DiaSymReader.1.1.0\lib\portable-net45+win8\Microsoft.DiaSymReader.dll</HintPath>
</Reference>
<Reference Include="System.Reflection.Metadata">
<HintPath>$(FSharpSourcesRoot)\..\packages\System.Reflection.Metadata.1.4.2\lib\portable-net45+win8\System.Reflection.Metadata.dll</HintPath>
</Reference>
<Reference Include="System.Collections.Immutable">
<HintPath>$(FSharpSourcesRoot)\..\packages\System.Collections.Immutable.1.3.1\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll</HintPath>
</Reference>
<Reference Include="System.ValueTuple">
<HintPath>$(FSharpSourcesRoot)\..\packages\System.ValueTuple.4.3.1\lib\netstandard1.0\System.ValueTuple.dll</HintPath>
</Reference>
......
......@@ -63,78 +63,57 @@ let isJenkinsBuild = buildServer = BuildServer.Jenkins
let isVersionTag tag = Version.TryParse tag |> fst
let hasRepoVersionTag = isAppVeyorBuild && AppVeyorEnvironment.RepoTag && isVersionTag AppVeyorEnvironment.RepoTagName
let assemblyVersion = if hasRepoVersionTag then AppVeyorEnvironment.RepoTagName else release.NugetVersion
let nugetVersion = release.NugetVersion
open SemVerHelper
let buildVersion =
if hasRepoVersionTag then assemblyVersion
else if isAppVeyorBuild then sprintf "%s-b%s" assemblyVersion AppVeyorEnvironment.BuildNumber
else assemblyVersion
// Skipping build of FCS on Jenkins Mono for now until we knoow how to get an updated version of Mono installed
let skipBuild = isJenkinsBuild && isMono
Target "Clean" (fun _ ->
if not skipBuild then
CleanDir releaseDir
)
Target "Restore" (fun _ ->
if not skipBuild then
runDotnet __SOURCE_DIRECTORY__ "restore FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj -v n"
runDotnet __SOURCE_DIRECTORY__ "restore FSharp.Compiler.Service.ProjectCrackerTool/FSharp.Compiler.Service.ProjectCrackerTool.fsproj -v n"
runDotnet __SOURCE_DIRECTORY__ "restore FSharp.Compiler.Service.ProjectCracker/FSharp.Compiler.Service.ProjectCracker.fsproj -v n"
runDotnet __SOURCE_DIRECTORY__ "restore FSharp.Compiler.Service.MSBuild.v12/FSharp.Compiler.Service.MSBuild.v12.fsproj -v n"
for p in (!! "./../**/packages.config") do
let result =
ExecProcess (fun info ->
info.FileName <- FullName @"./../.nuget/NuGet.exe"
info.WorkingDirectory <- FullName @"./.."
info.Arguments <- sprintf "restore %s -PackagesDirectory \"%s\" -ConfigFile \"%s\"" (FullName p) (FullName "./../packages") (FullName "./../NuGet.Config")) TimeSpan.MaxValue
if result <> 0 then failwithf "nuget restore %s failed" p
// We assume a paket restore has already been run
runDotnet __SOURCE_DIRECTORY__ "restore FSharp.Compiler.Service.sln -v n"
for p in [ "../packages.config" ] do
ExecProcess (fun info ->
info.FileName <- FullName @"./../.nuget/NuGet.exe"
info.WorkingDirectory <- FullName @"./.."
info.Arguments <- sprintf "restore %s -PackagesDirectory \"%s\" -ConfigFile \"%s\"" (FullName p) (FullName "./../packages") (FullName "./../NuGet.Config")) TimeSpan.MaxValue
|> assertExitCodeZero
)
Target "BuildVersion" (fun _ ->
if not skipBuild then
Shell.Exec("appveyor", sprintf "UpdateBuild -Version \"%s\"" buildVersion) |> ignore
)
Target "Build" (fun _ ->
if skipBuild then
try Directory.CreateDirectory("../Release/") |> ignore with _ -> ()
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")
else
runDotnet __SOURCE_DIRECTORY__ "build FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj -v n -c Release /maxcpucount:1"
runDotnet __SOURCE_DIRECTORY__ "build FSharp.Compiler.Service.sln -v n -c Release"
)
Target "Test" (fun _ ->
if not skipBuild then
// This project file is used for the netcoreapp2.0 tests to work out reference sets
runDotnet __SOURCE_DIRECTORY__ "restore ../tests/projects/Sample_NETCoreSDK_FSharp_Library_netstandard2_0/Sample_NETCoreSDK_FSharp_Library_netstandard2_0.fsproj -v n"
runDotnet __SOURCE_DIRECTORY__ "build ../tests/projects/Sample_NETCoreSDK_FSharp_Library_netstandard2_0/Sample_NETCoreSDK_FSharp_Library_netstandard2_0.fsproj -v n"
runDotnet __SOURCE_DIRECTORY__ "test FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj -v n -c Release /maxcpucount:1"
)
// Now run the tests
runDotnet __SOURCE_DIRECTORY__ "test FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj -v n -c Release"
)
Target "NuGet" (fun _ ->
if not skipBuild then
runDotnet __SOURCE_DIRECTORY__ "build FSharp.Compiler.Service.ProjectCrackerTool/FSharp.Compiler.Service.ProjectCrackerTool.fsproj -v n -c Release /maxcpucount:1"
runDotnet __SOURCE_DIRECTORY__ "pack FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj -v n -c Release /maxcpucount:1"
runDotnet __SOURCE_DIRECTORY__ "pack FSharp.Compiler.Service.ProjectCracker/FSharp.Compiler.Service.ProjectCracker.fsproj -v n -c Release /maxcpucount:1"
runDotnet __SOURCE_DIRECTORY__ "pack FSharp.Compiler.Service.MSBuild.v12/FSharp.Compiler.Service.MSBuild.v12.fsproj -v n -c Release /maxcpucount:1"
runDotnet __SOURCE_DIRECTORY__ "pack FSharp.Compiler.Service.sln -v n -c Release"
)
Target "GenerateDocsEn" (fun _ ->
if not skipBuild then
executeFSIWithArgs "docsrc/tools" "generate.fsx" [] [] |> ignore
)
Target "GenerateDocsJa" (fun _ ->
if not skipBuild then
executeFSIWithArgs "docsrc/tools" "generate.ja.fsx" [] [] |> ignore
)
Target "PublishNuGet" (fun _ ->
if not skipBuild then
Paket.Push (fun p ->
let apikey =
match getBuildParam "nuget-apikey" with
......@@ -148,11 +127,12 @@ Target "PublishNuGet" (fun _ ->
// --------------------------------------------------------------------------------------
// Run all targets by default. Invoke 'build <Target>' to override
Target "Start" DoNothing
Target "Release" DoNothing
Target "GenerateDocs" DoNothing
Target "TestAndNuGet" DoNothing
"Clean"
"Start"
=?> ("BuildVersion", isAppVeyorBuild)
==> "Restore"
==> "Build"
......
......@@ -2,4 +2,4 @@
# note: expects to run from top directory
./mono/latest-mono-stable.sh
./build.sh NuGet
./fcs/build.sh NuGet
......@@ -8,13 +8,5 @@
<!-- The LKG FSI.EXE requires MSBuild 15 to be installed, which is painful -->
<FsiToolPath>$(FSharpSourcesRoot)\..\packages\FSharp.Compiler.Tools.4.1.27\tools</FsiToolPath>
<FsiToolExe>fsi.exe</FsiToolExe>
<!-- FSharp.Compiler.Service is compiled with FSharp.Compiler.Tools for reproducible builds -->
<FscToolPath>$(FSharpSourcesRoot)\..\packages\FSharp.Compiler.Tools.4.1.27\tools</FscToolPath>
<FscToolExe>fsc.exe</FscToolExe>
<FscToolFullPath>$(FscToolPath)\$(FsiToolExe)</FscToolFullPath>
<AssemblySearchPaths>{HintPathFromItem};{TargetFrameworkDirectory};{RawFileName}</AssemblySearchPaths>
</PropertyGroup>
</Project>
\ No newline at end of file
<?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 ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<!-- When compiling .NET SDK 2.0 projects targeting .NET 4.x on Mono using 'dotnet build' you -->
<!-- have to teach MSBuild where the Mono copy of the reference asssemblies is -->
<TargetIsMono Condition="$(TargetFramework.StartsWith('net4')) and '$(OS)' == 'Unix'">true</TargetIsMono>
<!-- Look in the standard install locations -->
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND '$(TargetIsMono)' == 'true' AND EXISTS('/Library/Frameworks/Mono.framework/Versions/Current/lib/mono')">/Library/Frameworks/Mono.framework/Versions/Current/lib/mono</BaseFrameworkPathOverrideForMono>
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND '$(TargetIsMono)' == 'true' AND EXISTS('/usr/lib/mono')">/usr/lib/mono</BaseFrameworkPathOverrideForMono>
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND '$(TargetIsMono)' == 'true' AND EXISTS('/usr/local/lib/mono')">/usr/local/lib/mono</BaseFrameworkPathOverrideForMono>
<!-- If we found Mono reference assemblies, then use them -->
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net45'">$(BaseFrameworkPathOverrideForMono)/4.5-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net451'">$(BaseFrameworkPathOverrideForMono)/4.5.1-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net452'">$(BaseFrameworkPathOverrideForMono)/4.5.2-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net46'">$(BaseFrameworkPathOverrideForMono)/4.6-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net461'">$(BaseFrameworkPathOverrideForMono)/4.6.1-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net462'">$(BaseFrameworkPathOverrideForMono)/4.6.2-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net47'">$(BaseFrameworkPathOverrideForMono)/4.7-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net471'">$(BaseFrameworkPathOverrideForMono)/4.7.1-api</FrameworkPathOverride>
<EnableFrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != ''">true</EnableFrameworkPathOverride>
<!-- Add the Facades directory. Not sure how else to do this. Necessary at least for .NET 4.5 -->
<AssemblySearchPaths Condition="'$(BaseFrameworkPathOverrideForMono)' != ''">$(FrameworkPathOverride)/Facades;$(AssemblySearchPaths)</AssemblySearchPaths>
</PropertyGroup>
</Project>
\ No newline at end of file
......@@ -4,9 +4,3 @@ source https://www.nuget.org/api/v2/
nuget FAKE
nuget FSharp.Formatting
nuget Microsoft.Build.Utilities.Core 14.3.0
nuget Microsoft.Build.Framework 14.3.0
nuget Microsoft.Build.Engine 14.3.0
nuget Microsoft.Build 14.3.0
nuget System.Threading.Tasks.Dataflow 4.5.24.0
\ No newline at end of file
RESTRICTION: || (== net45) (== net46)
NUGET
remote: https://www.nuget.org/api/v2
FAKE (4.63.2)
FAKE (4.64.6)
FSharp.Compiler.Service (2.0.0.6)
FSharp.Formatting (2.14.4)
FSharp.Compiler.Service (2.0.0.6)
FSharpVSPowerTools.Core (>= 2.3 < 2.4)
FSharpVSPowerTools.Core (2.3)
FSharp.Compiler.Service (>= 2.0.0.3)
Microsoft.Build (14.3)
Microsoft.Build.Framework (14.3)
Microsoft.Build.Engine (14.3)
Microsoft.Build.Framework (14.3)
Microsoft.Build.Framework (14.3)
System.Collections (>= 4.0.11) - restriction: || (&& (== net45) (>= netstandard1.3)) (== net46)
System.Runtime (>= 4.1) - restriction: || (&& (== net45) (>= netstandard1.3)) (== net46)
System.Runtime.InteropServices (>= 4.1) - restriction: || (&& (== net45) (>= netstandard1.3)) (== net46)
Microsoft.Build.Utilities.Core (14.3)
Microsoft.Build.Framework (14.3)
System.Collections (4.3) - restriction: || (&& (== net45) (>= netstandard1.3)) (== net46)
System.Runtime (4.3) - restriction: || (&& (== net45) (>= netstandard1.3)) (== net46)
System.Runtime.InteropServices (4.3) - restriction: || (&& (== net45) (>= netstandard1.3)) (== net46)
System.Threading.Tasks.Dataflow (4.5.24)
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\fcs.props" />
<Import Project="..\..\netfx.props" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)\..\..\</SolutionDir>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>a40507d6-fa48-43d3-b18a-ae3daace4020</ProjectGuid>
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
<OutputType>Exe</OutputType>
<RootNamespace>EditorService</RootNamespace>
<AssemblyName>EditorService</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<Name>EditorService</Name>
<TargetFrameworkProfile />
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<IsPackable>false</IsPackable>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<Tailcalls>false</Tailcalls>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<WarningLevel>3</WarningLevel>
<PlatformTarget>AnyCPU</PlatformTarget>
<DocumentationFile>bin\Debug\EditorService.xml</DocumentationFile>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<Tailcalls>true</Tailcalls>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<WarningLevel>3</WarningLevel>
<PlatformTarget>AnyCPU</PlatformTarget>
<DocumentationFile>bin\Release\EditorService.xml</DocumentationFile>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<!-- we build the nuget against FSHarp.Core 4.4.0.0 instead of our latest to allow use in wider range of F# tools -->
<Reference Include="FSharp.Core">
<HintPath>$(SolutionDir)\..\packages\Microsoft.Portable.FSharp.Core.4.1.20\lib\profiles\net40\FSharp.Core.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="mscorlib" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Numerics" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.fs" />
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj">
<Name>FSharp.Compiler.Service</Name>
<Project>{2e4d67b4-522d-4cf7-97e4-ba940f0b18f3}</Project>
<Private>True</Private>
</ProjectReference>
<PackageReference Include="FSharp.Core" Version="4.1.*" />
<ProjectReference Include="..\..\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj" />
<PackageReference Include="System.Reflection.Metadata" Version="1.4.2" />
</ItemGroup>
<Import Project="$(SolutionDir)\..\packages\FSharp.Compiler.Tools.4.1.27\tools\Microsoft.FSharp.Targets" Condition="Exists('$(SolutionDir)\..\packages\FSharp.Compiler.Tools.4.1.27\tools\Microsoft.FSharp.Targets')" />
</Project>
\ No newline at end of file
</Project>
<?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 ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\fcs.props" />
<Import Project="..\..\netfx.props" />
<PropertyGroup>
<FSharpSourcesRoot>$(MSBuildProjectDirectory)\..\..\..\src</FSharpSourcesRoot>
</PropertyGroup>
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)\..\..\</SolutionDir>
<PlatformTarget>x86</PlatformTarget>
<ProjectGuid>{C94C257C-3C0A-4858-B5D8-D746498D1F08}</ProjectGuid>
<TargetFrameworks>net46</TargetFrameworks>
<OutputType>Exe</OutputType>
<NoWarn>$(NoWarn);62;44</NoWarn>
<AssemblyName>FscExe</AssemblyName>
<Name>FscExe</Name>
<DefineConstants>FX_RESIDENT_COMPILER;$(DefineConstants)</DefineConstants>
<AllowCrossTargeting>true</AllowCrossTargeting>
<OtherFlags>$(OtherFlags) --warnon:1182</OtherFlags>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<TargetFSharpCoreVersion>4.4.0.0</TargetFSharpCoreVersion>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<Tailcalls>false</Tailcalls>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;$(DefineConstants)</DefineConstants>
<WarningLevel>3</WarningLevel>
<PlatformTarget>AnyCPU</PlatformTarget>
<DocumentationFile>bin\Debug\FsiExe.xml</DocumentationFile>
<Prefer32Bit>true</Prefer32Bit>
<StartArguments>
</StartArguments>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<Tailcalls>true</Tailcalls>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE;$(DefineConstants)</DefineConstants>
<WarningLevel>3</WarningLevel>
<PlatformTarget>AnyCPU</PlatformTarget>
<DocumentationFile>bin\Release\FsiExe.xml</DocumentationFile>
<Prefer32Bit>true</Prefer32Bit>
<IsPackable>false</IsPackable>
<DefineConstants>$(DefineConstants);RESIDENT_COMPILER</DefineConstants>
</PropertyGroup>
<ItemGroup>
<Compile Include="FscMain.fs">
<Link>Driver/FscMain.fs</Link>
</Compile>
<Compile Include="FscMain.fs" />
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<!-- we test against FSharp.Core 4.4.1.0 -->
<Reference Include="FSharp.Core">
<HintPath>$(FSharpSourcesRoot)\..\packages\FSharp.Compiler.Tools.4.1.27\tools\FSharp.Core.dll</HintPath>
<Private>true</Private>
</Reference>
<Reference Include="mscorlib" />
<Reference Include="System" />
<Reference Include="System.Runtime.Remoting" />
<PackageReference Include="FSharp.Core" Version="4.1.*" />
<ProjectReference Include="..\..\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj">
<Name>FSharp.Compiler.Service</Name>
<Project>{2e4d67b4-522d-4cf7-97e4-ba940f0b18f3}</Project>
<Private>True</Private>
</ProjectReference>
</ItemGroup>
<Import Project="$(SolutionDir)\..\packages\FSharp.Compiler.Tools.4.1.27\tools\Microsoft.FSharp.Targets" Condition="Exists('$(SolutionDir)\..\packages\FSharp.Compiler.Tools.4.1.27\tools\Microsoft.FSharp.Targets')" />
</Project>
\ No newline at end of file
</Project>
......@@ -14,11 +14,7 @@ open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library
open Microsoft.FSharp.Compiler.ErrorLogger
open Microsoft.FSharp.Compiler.Range
#if FX_RESHAPED_REFLECTION
open Microsoft.FSharp.Core.ReflectionAdapters
#endif
#if FX_RESIDENT_COMPILER
#if RESIDENT_COMPILER
type TypeInThisAssembly() = member x.Dummy = 1
let progress = ref false
......@@ -58,19 +54,15 @@ module FSharpResidentCompiler =
// Use different base channel names on mono and CLR as a CLR remoting process can't talk
// to a mono server
static let baseChannelName =
#if ENABLE_MONO_SUPPORT
if runningOnMono then
"FSCChannelMono"
else
#endif
"FSCChannel"
static let channelName = baseChannelName + "_" + domainName + "_" + userName
static let serverName =
#if ENABLE_MONO_SUPPORT
if runningOnMono then
"FSCServerMono"
else
#endif
"FSCSever"
static let mutable serverExists = true
......@@ -131,7 +123,6 @@ module FSharpResidentCompiler =
// On Unix, the file permissions of the implicit socket need to be set correctly to make this
// private to the user.
#if ENABLE_MONO_SUPPORT
if runningOnMono then
try
let monoPosix = System.Reflection.Assembly.Load(new System.Reflection.AssemblyName("Mono.Posix, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756"))
......@@ -152,7 +143,6 @@ module FSharpResidentCompiler =
#endif
()
// Fail silently
#endif
server.Run()
static member private ConnectToServer() =
......@@ -177,7 +167,6 @@ module FSharpResidentCompiler =
with _ ->
if !progress then printfn "client: error while creating client, starting client instead"
let procInfo =
#if ENABLE_MONO_SUPPORT
if runningOnMono then
let shellName, useShellExecute =
match System.Environment.GetEnvironmentVariable("FSC_MONO") with
......@@ -194,7 +183,6 @@ module FSharpResidentCompiler =
CreateNoWindow = true,
UseShellExecute = useShellExecute)
else
#endif
ProcessStartInfo(FileName=fscServerExe,
Arguments = "/server",
CreateNoWindow = true,
......@@ -274,6 +262,7 @@ module Driver =
System.Console.WriteLine("Press any key to continue...")
System.Console.ReadKey() |> ignore
#if RESIDENT_COMPILER
if runningOnMono && hasArgument "resident" argv then
let argv = stripArgument "resident" argv
......@@ -293,14 +282,13 @@ module Driver =
elif runningOnMono && hasArgument "server" argv then
FSharpResidentCompiler.FSharpCompilationServer.RunServer()
0
#endif
else
let errors, exitCode = FSharpChecker.Create().Compile (argv) |> Async.RunSynchronously
for error in errors do eprintfn "%s" (error.ToString())
exitCode
#if FX_NO_DEFAULT_DEPENDENCY_TYPE
#else
#if !FX_NO_DEFAULT_DEPENDENCY_TYPE
[<Dependency("FSharp.Compiler",LoadHint.Always)>]
#endif
do ()
......
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\fcs.props" />
<Import Project="..\..\netfx.props" />
<PropertyGroup>
<FSharpSourcesRoot>$(MSBuildProjectDirectory)\..\..\..\src</FSharpSourcesRoot>
</PropertyGroup>
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)\..\..\</SolutionDir>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{f9540ca8-1ce0-4546-a23a-a461e416e95b}</ProjectGuid>
<TargetFrameworks>net46</TargetFrameworks>
<OutputType>Exe</OutputType>
<RootNamespace>FsiExe</RootNamespace>
<AssemblyName>FsiExe</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<Name>FsiExe</Name>
<NoWarn>40</NoWarn>
<TargetFrameworkProfile />
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<Tailcalls>false</Tailcalls>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG</DefineConstants>
<WarningLevel>3</WarningLevel>
<PlatformTarget>AnyCPU</PlatformTarget>
<DocumentationFile>bin\Debug\FsiExe.xml</DocumentationFile>
<Prefer32Bit>true</Prefer32Bit>
<StartArguments>
</StartArguments>
<IsPackable>false</IsPackable>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<Tailcalls>true</Tailcalls>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<WarningLevel>3</WarningLevel>
<PlatformTarget>AnyCPU</PlatformTarget>
<DocumentationFile>bin\Release\FsiExe.xml</DocumentationFile>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<!-- we test against FSharp.Core 4.4.1.0 -->
<Reference Include="FSharp.Core">
<HintPath>$(FSharpSourcesRoot)\..\packages\FSharp.Compiler.Tools.4.1.27\tools\FSharp.Core.dll</HintPath>
<Private>true</Private>
</Reference>
<Reference Include="mscorlib" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Numerics" />
<Reference Include="System.Runtime.Remoting" />
<Reference Include="System.Windows.Forms" />
</ItemGroup>
<ItemGroup>
<Compile Include="console.fs" />
<Compile Include="fsiserver.fs" />
......@@ -65,11 +13,9 @@
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj">
<Name>FSharp.Compiler.Service</Name>
<Project>{2e4d67b4-522d-4cf7-97e4-ba940f0b18f3}</Project>
<Private>True</Private>
</ProjectReference>
<Reference Include="System.Runtime.Remoting" />
<Reference Include="System.Windows.Forms" />
<PackageReference Include="FSharp.Core" Version="4.1.*" />
<ProjectReference Include="..\..\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj" />
</ItemGroup>
<Import Project="$(SolutionDir)\..\packages\FSharp.Compiler.Tools.4.1.27\tools\Microsoft.FSharp.Targets" Condition="Exists('$(SolutionDir)\..\packages\FSharp.Compiler.Tools.4.1.27\tools\Microsoft.FSharp.Targets')" />
</Project>
\ No newline at end of file
</Project>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\fcs.props" />
<Import Project="..\..\netfx.props" />
<PropertyGroup>
<FSharpSourcesRoot>$(MSBuildProjectDirectory)\..\..\..\src</FSharpSourcesRoot>
</PropertyGroup>
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)\..\..\</SolutionDir>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>067e95e5-e3dc-4ca7-813a-4d1e277d2d52</ProjectGuid>
<TargetFrameworks>net46</TargetFrameworks>
<OutputType>Exe</OutputType>
<RootNamespace>InteractiveService</RootNamespace>
<AssemblyName>InteractiveService</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<Name>InteractiveService</Name>
<TargetFSharpCoreVersion>4.4.0.0</TargetFSharpCoreVersion>
<TargetFrameworkProfile />
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<Tailcalls>false</Tailcalls>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<WarningLevel>3</WarningLevel>
<PlatformTarget>AnyCPU</PlatformTarget>
<DocumentationFile>bin\Debug\InteractiveService.xml</DocumentationFile>
<Prefer32Bit>true</Prefer32Bit>
<IsPackable>false</IsPackable>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<Tailcalls>true</Tailcalls>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<WarningLevel>3</WarningLevel>
<PlatformTarget>AnyCPU</PlatformTarget>
<DocumentationFile>bin\Release\InteractiveService.xml</DocumentationFile>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<!-- we test against FSharp.Core 4.4.1.0 -->
<Reference Include="FSharp.Core">
<HintPath>$(FSharpSourcesRoot)\..\packages\FSharp.Compiler.Tools.4.1.27\tools\FSharp.Core.dll</HintPath>
<Private>true</Private>
</Reference>
<Reference Include="mscorlib" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Numerics" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.fs" />
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj">
<Name>FSharp.Compiler.Service</Name>
<Project>{2e4d67b4-522d-4cf7-97e4-ba940f0b18f3}</Project>
<Private>True</Private>
</ProjectReference>
<PackageReference Include="FSharp.Core" Version="4.1.*" />
<ProjectReference Include="..\..\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj" />
</ItemGroup>
<Import Project="$(SolutionDir)\..\packages\FSharp.Compiler.Tools.4.1.27\tools\Microsoft.FSharp.Targets" Condition="Exists('$(SolutionDir)\..\packages\FSharp.Compiler.Tools.4.1.27\tools\Microsoft.FSharp.Targets')" />
</Project>
\ No newline at end of file
</Project>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\fcs.props" />
<Import Project="..\..\netfx.props" />
<PropertyGroup>
<FSharpSourcesRoot>$(MSBuildProjectDirectory)\..\..\..\src</FSharpSourcesRoot>
</PropertyGroup>
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)\..\..\</SolutionDir>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>92793069-816f-4f69-84ac-0966f8275e65</ProjectGuid>
<TargetFrameworks>net46</TargetFrameworks>
<OutputType>Exe</OutputType>
<RootNamespace>Tokenizer</RootNamespace>
<AssemblyName>Tokenizer</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<Name>Tokenizer</Name>
<TargetFSharpCoreVersion>4.4.0.0</TargetFSharpCoreVersion>
<TargetFrameworkProfile />
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<Tailcalls>false</Tailcalls>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<WarningLevel>3</WarningLevel>
<PlatformTarget>AnyCPU</PlatformTarget>
<DocumentationFile>bin\Debug\Tokenizer.xml</DocumentationFile>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<Tailcalls>true</Tailcalls>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<WarningLevel>3</WarningLevel>
<PlatformTarget>AnyCPU</PlatformTarget>
<DocumentationFile>bin\Release\Tokenizer.xml</DocumentationFile>
<Prefer32Bit>true</Prefer32Bit>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<!-- we test against FSharp.Core 4.4.1.0 -->
<Reference Include="FSharp.Core">
<HintPath>$(FSharpSourcesRoot)\..\packages\FSharp.Compiler.Tools.4.1.27\tools\FSharp.Core.dll</HintPath>
<Private>true</Private>
</Reference>
<Reference Include="mscorlib" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Numerics" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.fs" />
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj">
<Name>FSharp.Compiler.Service</Name>
<Project>{2e4d67b4-522d-4cf7-97e4-ba940f0b18f3}</Project>
<Private>True</Private>
</ProjectReference>
<PackageReference Include="FSharp.Core" Version="4.1.*" />
<ProjectReference Include="..\..\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj" />
</ItemGroup>
<PropertyGroup>
<MinimumVisualStudioVersion Condition="'$(MinimumVisualStudioVersion)' == ''">11</MinimumVisualStudioVersion>
</PropertyGroup>
<Import Project="$(SolutionDir)\..\packages\FSharp.Compiler.Tools.4.1.27\tools\Microsoft.FSharp.Targets" Condition="Exists('$(SolutionDir)\..\packages\FSharp.Compiler.Tools.4.1.27\tools\Microsoft.FSharp.Targets')" />
</Project>
\ No newline at end of file
</Project>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\fcs.props" />
<Import Project="..\..\netfx.props" />
<PropertyGroup>
<FSharpSourcesRoot>$(MSBuildProjectDirectory)\..\..\..\src</FSharpSourcesRoot>
</PropertyGroup>
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>c816728d-bbea-472d-9f6c-e8913957a673</ProjectGuid>
<TargetFrameworks>net46</TargetFrameworks>
<OutputType>Exe</OutputType>
<RootNamespace>UntypedTree</RootNamespace>
<AssemblyName>UntypedTree</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<Name>UntypedTree</Name>
<TargetFSharpCoreVersion>4.4.0.0</TargetFSharpCoreVersion>
<TargetFrameworkProfile />
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)\..\..\</SolutionDir>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<Tailcalls>false</Tailcalls>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<WarningLevel>3</WarningLevel>
<PlatformTarget>AnyCPU</PlatformTarget>
<DocumentationFile>bin\Debug\UntypedTree.xml</DocumentationFile>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<Tailcalls>true</Tailcalls>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<WarningLevel>3</WarningLevel>
<PlatformTarget>AnyCPU</PlatformTarget>
<DocumentationFile>bin\Release\UntypedTree.xml</DocumentationFile>
<Prefer32Bit>true</Prefer32Bit>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<!-- we test against FSharp.Core 4.4.1.0 -->
<Reference Include="FSharp.Core">
<HintPath>$(FSharpSourcesRoot)\..\packages\FSharp.Compiler.Tools.4.1.27\tools\FSharp.Core.dll</HintPath>
<Private>true</Private>
</Reference>
<Reference Include="mscorlib" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Numerics" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.fs" />
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj">
<Name>FSharp.Compiler.Service</Name>
<Project>{2e4d67b4-522d-4cf7-97e4-ba940f0b18f3}</Project>
<Private>True</Private>
</ProjectReference>
<PackageReference Include="FSharp.Core" Version="4.1.*" />
<ProjectReference Include="..\..\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj" />
</ItemGroup>
<PropertyGroup>
<MinimumVisualStudioVersion Condition="'$(MinimumVisualStudioVersion)' == ''">11</MinimumVisualStudioVersion>
</PropertyGroup>
<Import Project="$(SolutionDir)\..\packages\FSharp.Compiler.Tools.4.1.27\tools\Microsoft.FSharp.Targets" Condition="Exists('$(SolutionDir)\..\packages\FSharp.Compiler.Tools.4.1.27\tools\Microsoft.FSharp.Targets')" />
</Project>
\ No newline at end of file
</Project>

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "UntypedTree", "UntypedTree.fsproj", "{C816728D-BBEA-472D-9F6C-E8913957A673}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C816728D-BBEA-472D-9F6C-E8913957A673}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C816728D-BBEA-472D-9F6C-E8913957A673}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C816728D-BBEA-472D-9F6C-E8913957A673}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C816728D-BBEA-472D-9F6C-E8913957A673}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
......@@ -13,7 +13,7 @@ Copyright (C) Microsoft Corporation. All Rights Reserved.
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PrepareForBuildDependsOn>ProcessFsSrGen;$(PrepareForBuildDependsOn)</PrepareForBuildDependsOn>
<BuildDependsOn>ProcessFsSrGen;$(BuildDependsOn)</BuildDependsOn>
</PropertyGroup>
<!-- Build FsSrGen files. -->
......
......@@ -543,10 +543,15 @@ ImplFile.x
File.WriteAllText(fileName1, fileSource1)
File.WriteAllText(fileName2, fileSource2)
printfn "------Starting Script load closure project----"
printfn "Getting project options..."
let projectOptions, diagnostics =
checker.GetProjectOptionsFromScript(fileName2, fileSource2) |> Async.RunSynchronously
checker.GetProjectOptionsFromScript(fileName2, fileSource2, useFsiAuxLib=false) |> Async.RunSynchronously
for d in diagnostics do
printfn "ERROR: %A" d
diagnostics.IsEmpty |> shouldEqual true
printfn "Parse and check..."
let _, checkResults =
checker.ParseAndCheckFileInProject(fileName2, 0, fileSource2, projectOptions) |> Async.RunSynchronously
......@@ -555,13 +560,20 @@ ImplFile.x
results.Errors |> shouldEqual [| |]
| _ -> failwith "type check was aborted"
printfn "Getting parsing options..."
let parsingOptions, diagnostics = checker.GetParsingOptionsFromProjectOptions(projectOptions)
for d in diagnostics do
printfn "ERROR: %A" d
diagnostics.IsEmpty |> shouldEqual true
printfn "Parsing file..."
let parseResults = checker.ParseFile(fileName1, fileSource1, parsingOptions) |> Async.RunSynchronously
printfn "Checking parsetree..."
parseResults.ParseTree.IsSome |> shouldEqual true
printfn "Checking decls..."
match parseResults.ParseTree.Value with
| ParsedInput.ImplFile (ParsedImplFileInput (_, _, _, _, _, modules, _)) ->
let (SynModuleOrNamespace (_, _, _, decls, _, _, _, _)) = modules.Head
decls.Length |> shouldEqual 1
| _ -> failwith "got sig file"
printfn "------Finished Script load closure project----"
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册