diff --git a/fcs/FSharp.Compiler.Service.Tests.netcore/FSharp.Compiler.Service.Tests.netcore.fsproj b/fcs/FSharp.Compiler.Service.Tests.netcore/FSharp.Compiler.Service.Tests.netcore.fsproj index 88bda344a2c498613773feb3e50a43298ec1b03f..058a83e551e36bf9de90f213722742865e44532b 100644 --- a/fcs/FSharp.Compiler.Service.Tests.netcore/FSharp.Compiler.Service.Tests.netcore.fsproj +++ b/fcs/FSharp.Compiler.Service.Tests.netcore/FSharp.Compiler.Service.Tests.netcore.fsproj @@ -38,7 +38,7 @@ --> - + diff --git a/fcs/FSharp.Compiler.Service.netstandard/FSharp.Compiler.Service.netstandard.fsproj b/fcs/FSharp.Compiler.Service.netstandard/FSharp.Compiler.Service.netstandard.fsproj index 97063d25889d7b8b4584445a270407a6bf952031..eb20755c3187d8371350d0ace92b705b9bf4bee8 100644 --- a/fcs/FSharp.Compiler.Service.netstandard/FSharp.Compiler.Service.netstandard.fsproj +++ b/fcs/FSharp.Compiler.Service.netstandard/FSharp.Compiler.Service.netstandard.fsproj @@ -7,6 +7,7 @@ netstandard1.6 FSharp.Compiler.Service $(DefineConstants);BUILDING_WITH_LKG + $(DefineConstants);COMPILER_PUBLIC_API $(DefineConstants);COMPILER_SERVICE_AS_DLL $(DefineConstants);COMPILER $(DefineConstants);COMPILER_SERVICE diff --git a/fcs/README.md b/fcs/README.md index f0f9dbd08c72f1d479863709b928a7763f2b69ff..cb2d32dbf8951c53209f069cc26ea55a01fe8968 100644 --- a/fcs/README.md +++ b/fcs/README.md @@ -34,35 +34,35 @@ To update the version number a global replace through fcs\... is currently neede To build the package use any of: - cd fcs - build Build.NetFx - build Test.NetFx - build NuGet.NetFx + fcs\build Build.NetFx + fcs\build Test.NetFx + fcs\build NuGet.NetFx - build Build.NetStd - build Test.NetStd - build NuGet.NetStd + fcs\build Build.NetStd + fcs\build Test.NetStd + fcs\build NuGet.NetStd - build Build - build Test - build NuGet - build Release + fcs\build Build + fcs\build Test + fcs\build NuGet + fcs\build Release which does things like: + cd fcs .paket\paket.bootstrapper.exe .paket\paket.exe restore + dotnet restore tools.proj packages\FAKE\tools\FAKE.exe build.fsx WhateverTarget ### Manual push of packages Yu can push the packages if you have permissions, either automatically using ``build Release`` or manually - cd fcs set APIKEY=... - ..\.nuget\nuget.exe push ..\Release\FSharp.Compiler.Service.14.0.1.nupkg %APIKEY% -Source https://nuget.org -Timeout 500 - ..\.nuget\nuget.exe push ..\Release\FSharp.Compiler.Service.MSBuild.v12.14.0.1.nupkg %APIKEY% -Source https://nuget.org -Timeout 500 - ..\.nuget\nuget.exe push ..\Release\FSharp.Compiler.Service.ProjectCracker.14.0.1.nupkg %APIKEY% -Source https://nuget.org -Timeout 500 + .nuget\nuget.exe push Release\FSharp.Compiler.Service.14.0.2.nupkg %APIKEY% -Source https://nuget.org + .nuget\nuget.exe push Release\FSharp.Compiler.Service.MSBuild.v12.14.0.2.nupkg %APIKEY% -Source https://nuget.org + .nuget\nuget.exe push Release\FSharp.Compiler.Service.ProjectCracker.14.0.2.nupkg %APIKEY% -Source https://nuget.org ### Use of Paket and FAKE @@ -78,7 +78,7 @@ Testing reuses the test files from ..\tests\service which were are also FCS test ### Documentation Generation - build GenerateDocs + fcs\build GenerateDocs Output is in ``docs``. In the ``FSharp.Compiler.Service`` repo this is checked in and hosted as http://fsharp.github.io/FSharp.Compiler.Service. diff --git a/fcs/RELEASE_NOTES.md b/fcs/RELEASE_NOTES.md index 13cd3c1084cee65b807133bd1eeffbfcfecbe179..18f26ff87eff1213e5167b174fdff73aacfc5325 100644 --- a/fcs/RELEASE_NOTES.md +++ b/fcs/RELEASE_NOTES.md @@ -1,3 +1,6 @@ +#### 14.0.2 + * Fix non-public API in .NET Standard 1.6 version + #### 14.0.1 * Integrate latest changes from visualfsharp * Trial release for new build in fcs\... diff --git a/fcs/build.cmd b/fcs/build.cmd index 4f9265e2d293b0802f107277461b116f3c592e96..312c7ed738219cd67b5aa5285a2fdd6a42069782 100644 --- a/fcs/build.cmd +++ b/fcs/build.cmd @@ -1,12 +1,24 @@ @echo off +.nuget\NuGet.exe restore -PackagesDirectory packages +setlocal +cd fcs .paket\paket.bootstrapper.exe +dotnet restore tools.fsproj if errorlevel 1 ( + endlocal exit /b %errorlevel% ) .paket\paket.exe restore if errorlevel 1 ( + endlocal exit /b %errorlevel% ) packages\FAKE\tools\FAKE.exe build.fsx %* +if errorlevel 1 ( + endlocal + exit /b %errorlevel% +) +endlocal +exit /b 0 diff --git a/fcs/build.fsx b/fcs/build.fsx index 5abb848721adf5a3958ce16af0aaee4b7b695e21..7e2e12f1bee09100a991edd46387ca930e004521 100644 --- a/fcs/build.fsx +++ b/fcs/build.fsx @@ -5,11 +5,10 @@ #I "packages/FAKE/tools" #r "packages/FAKE/tools/FakeLib.dll" open System -open Fake.AppVeyor +open System.IO open Fake -open Fake.Git +open Fake.AppVeyor open Fake.ReleaseNotesHelper -open Fake.UserInputHelper #if MONO // prevent incorrect output encoding (e.g. https://github.com/fsharp/FAKE/issues/1196) @@ -21,38 +20,24 @@ System.Console.OutputEncoding <- System.Text.Encoding.UTF8 // -------------------------------------------------------------------------------------- let assertExitCodeZero x = if x = 0 then () else failwithf "Command failed with exit code %i" x -let runCmdIn mono workDir exe = Printf.ksprintf (fun args -> - if mono then - printfn "mono %s/%s %s" workDir exe args +let runCmdIn workDir (exe:string) = Printf.ksprintf (fun (args:string) -> +#if MONO + let exe = exe.Replace("\\","/") + let args = args.Replace("\\","/") + printfn "[%s] mono %s %s" workDir exe args Shell.Exec("mono", sprintf "%s %s" exe args, workDir) - |> assertExitCodeZero - else - printfn "%s/%s %s" workDir exe args +#else + printfn "[%s] %s %s" workDir exe args Shell.Exec(exe, args, workDir) +#endif |> assertExitCodeZero ) -let run mono exe = runCmdIn mono "." exe - -// -------------------------------------------------------------------------------------- -// Information about the project to be used at NuGet -// -------------------------------------------------------------------------------------- - -let project = "FSharp.Compiler.Service" -let authors = ["Microsoft Corporation, Dave Thomas, Anh-Dung Phan, Tomas Petricek"] - -let gitOwner = "fsharp" -let gitHome = "https://github.com/" + gitOwner - -let gitName = "FSharp.Compiler.Service" -let gitRaw = environVarOrDefault "gitRaw" "https://raw.githubusercontent.com/fsharp" - -let netFrameworks = [(* "v4.0"; *) "v4.5"] // -------------------------------------------------------------------------------------- // The rest of the code is standard F# build script // -------------------------------------------------------------------------------------- -let releaseDir = "../Release" +let releaseDir = Path.Combine(__SOURCE_DIRECTORY__, "../Release") // Read release notes & version info from RELEASE_NOTES.md @@ -84,8 +69,6 @@ let buildVersion = else if isAppVeyorBuild then sprintf "%s-b%s" assemblyVersion AppVeyorEnvironment.BuildNumber else assemblyVersion -let netstdsln = gitName + ".netstandard.sln"; - Target "BuildVersion" (fun _ -> Shell.Exec("appveyor", sprintf "UpdateBuild -Version \"%s\"" buildVersion) |> ignore ) @@ -95,7 +78,7 @@ Target "BuildVersion" (fun _ -> Target "Build.NetFx" (fun _ -> - !! (project + ".sln") + !! "FSharp.Compiler.Service.sln" |> MSBuild "" "Build" ["Configuration","Release" ] |> Log (".NETFxBuild-Output: ") ) @@ -116,9 +99,9 @@ Target "Test.NetFx" (fun _ -> // -------------------------------------------------------------------------------------- // Build a NuGet package Target "NuGet.NetFx" (fun _ -> - run false @"..\.nuget\nuget.exe" @"pack nuget\FSharp.Compiler.Service.nuspec -OutputDirectory %s" releaseDir - run false @"..\.nuget\nuget.exe" @"pack nuget\FSharp.Compiler.Service.MSBuild.v12.nuspec -OutputDirectory %s" releaseDir - run false @"..\.nuget\nuget.exe" @"pack nuget\FSharp.Compiler.Service.ProjectCracker.nuspec -OutputDirectory %s" releaseDir + runCmdIn __SOURCE_DIRECTORY__ @"..\.nuget\NuGet.exe" @"pack nuget\FSharp.Compiler.Service.nuspec -OutputDirectory %s" releaseDir + runCmdIn __SOURCE_DIRECTORY__ @"..\.nuget\NuGet.exe" @"pack nuget\FSharp.Compiler.Service.MSBuild.v12.nuspec -OutputDirectory %s" releaseDir + runCmdIn __SOURCE_DIRECTORY__ @"..\.nuget\NuGet.exe" @"pack nuget\FSharp.Compiler.Service.ProjectCracker.nuspec -OutputDirectory %s" releaseDir ) @@ -140,28 +123,27 @@ let isDotnetSDKInstalled = Target "Build.NetStd" (fun _ -> - run false "dotnet" "pack %s -v n -c Release" netstdsln + runCmdIn __SOURCE_DIRECTORY__ "dotnet" "pack %s -v n -c Release" "FSharp.Compiler.Service.netstandard.sln" ) Target "Test.NetStd" (fun _ -> - run false "dotnet" "run -p FSharp.Compiler.Service.Tests.netcore/FSharp.Compiler.Service.Tests.netcore.fsproj -c Release -- --result:TestResults.NetStd.xml;format=nunit3" + runCmdIn __SOURCE_DIRECTORY__ "dotnet" "run -p FSharp.Compiler.Service.Tests.netcore/FSharp.Compiler.Service.Tests.netcore.fsproj -c Release -- --result:TestResults.NetStd.xml;format=nunit3" ) //use dotnet-mergenupkg to merge the .NETstandard nuget package into the default one Target "Nuget.AddNetStd" (fun _ -> - do - let nupkg = sprintf "%s/FSharp.Compiler.Service.%s.nupkg" releaseDir release.AssemblyVersion - let netcoreNupkg = sprintf "FSharp.Compiler.Service.netstandard/bin/Release/FSharp.Compiler.Service.%s.nupkg" release.AssemblyVersion - runCmdIn false "." "dotnet" "mergenupkg --source %s --other %s --framework netstandard1.6" nupkg netcoreNupkg + let nupkg = sprintf "%s/FSharp.Compiler.Service.%s.nupkg" releaseDir release.AssemblyVersion + let netcoreNupkg = sprintf "FSharp.Compiler.Service.netstandard/bin/Release/FSharp.Compiler.Service.%s.nupkg" release.AssemblyVersion + runCmdIn __SOURCE_DIRECTORY__ "dotnet" "mergenupkg --source %s --other %s --framework netstandard1.6" nupkg netcoreNupkg ) // -------------------------------------------------------------------------------------- // Generate the documentation -Target "GenerateDocs" (fun _ -> +Target "GenerateDocsEn" (fun _ -> executeFSIWithArgs "docsrc/tools" "generate.fsx" ["--define:RELEASE"] [] |> ignore ) @@ -187,10 +169,11 @@ Target "PublishNuGet" (fun _ -> // Run all targets by default. Invoke 'build ' to override Target "Clean" DoNothing -Target "CleanDocs" DoNothing Target "Release" DoNothing Target "NuGet" DoNothing Target "Build" DoNothing +Target "GenerateDocs" DoNothing +Target "TestAndNuGet" DoNothing "Clean" =?> ("BuildVersion", isAppVeyorBuild) @@ -218,14 +201,29 @@ Target "Build" DoNothing =?> ("Nuget.AddNetStd", isDotnetSDKInstalled) ==> "NuGet" +"Test.NetFx" + ==> "TestAndNuGet" + +"NuGet" + ==> "TestAndNuGet" + +//"Test.NetStd" +// ==> "TestAndNuGet" + "Build" ==> "NuGet" ==> "PublishNuGet" ==> "Release" -"CleanDocs" +"Build" + ==> "GenerateDocsEn" ==> "GenerateDocs" + +"Build" ==> "GenerateDocsJa" + ==> "GenerateDocs" + +"GenerateDocs" ==> "Release" RunTargetOrDefault "Build" diff --git a/fcs/build.sh b/fcs/build.sh index a7ff60d4eeffd476a96dc506ecb3bdc5ce303a81..3e7e80e7d88194c216ae5a28cf444b4c11b1327f 100644 --- a/fcs/build.sh +++ b/fcs/build.sh @@ -2,25 +2,19 @@ if test "$OS" = "Windows_NT" then # use .Net - .paket/paket.bootstrapper.exe - exit_code=$? - if [ $exit_code -ne 0 ]; then - exit $exit_code - fi + cmd fcs/build.cmd $@ +else + mono .nuget/NuGet.exe restore -PackagesDirectory packages - .paket/paket.exe restore - exit_code=$? - if [ $exit_code -ne 0 ]; then - exit $exit_code - fi + cd fcs - packages/FAKE/tools/FAKE.exe build.fsx $@ -else # use mono if [[ ! -e ~/.config/.mono/certs ]]; then mozroots --import --sync --quiet fi + dotnet restore tools.fsproj + mono .paket/paket.bootstrapper.exe exit_code=$? if [ $exit_code -ne 0 ]; then diff --git a/fcs/docsrc/tools/generate.fsx b/fcs/docsrc/tools/generate.fsx index dcf0eb42f6103e0e4e9a61ed011a1cf956719fa5..b00ee4786267b2646328e2f6a288fd57c80c8064 100644 --- a/fcs/docsrc/tools/generate.fsx +++ b/fcs/docsrc/tools/generate.fsx @@ -34,7 +34,7 @@ let root = "." // Paths with template/source/output locations let bin = __SOURCE_DIRECTORY__ @@ "../../../Release/fcs/net45" let content = __SOURCE_DIRECTORY__ @@ "../content" -let output = __SOURCE_DIRECTORY__ @@ "../../docs" +let output = __SOURCE_DIRECTORY__ @@ "../../../docs" let files = __SOURCE_DIRECTORY__ @@ "../files" let templates = __SOURCE_DIRECTORY__ @@ "templates" let formatting = __SOURCE_DIRECTORY__ @@ "../../packages/FSharp.Formatting/" @@ -52,6 +52,9 @@ let copyFiles () = CopyRecursive (formatting @@ "styles") (output @@ "content") true |> Log "Copying styles and scripts: " +let clr = System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory() +let fsfmt = __SOURCE_DIRECTORY__ @@ ".." @@ ".." @@ @"packages" @@ "FSharp.Formatting" @@ "lib" @@ "net40" + // Build API reference from XML comments let buildReference () = CleanDir (output @@ "reference") @@ -60,7 +63,24 @@ let buildReference () = ( bin @@ lib, output @@ "reference", layoutRoots, parameters = ("root", root)::info, sourceRepo = "https://github.com/fsharp/FSharp.Compiler.Service/tree/master/src", - sourceFolder = @"..\..\..\src" ) + sourceFolder = @"..\..\..\src", + assemblyReferences = + [clr @@ "System.Runtime.dll" + clr @@ "System.dll" + clr @@ "System.Core.dll" + clr @@ "Microsoft.CSharp.dll" + clr @@ "System.Linq.dll" + clr @@ "System.dll" + bin @@ "System.Reflection.Metadata.dll" + clr @@ "System.Numerics.dll" + bin @@ "System.Collections.Immutable.dll" + clr @@ "System.IO.dll" + clr @@ "mscorlib.dll" + fsfmt @@ "FSharp.MetadataFormat.dll" + fsfmt @@ "RazorEngine.dll" + bin @@ "FSharp.Core.dll" + bin @@ "FSharp.Compiler.Service.dll" + ] ) // Build documentation from `fsx` and `md` files in `docsrc/content` let buildDocumentation () = @@ -73,6 +93,6 @@ let buildDocumentation () = // Generate copyFiles() -//buildDocumentation() +buildDocumentation() buildReference() diff --git a/fcs/docsrc/tools/generate.ja.fsx b/fcs/docsrc/tools/generate.ja.fsx index 6a3aa4d7a4f79033e5a7a205f22be9a9ce7b3e6d..b7e9b25d009f597ed0fedf537934748e9109538e 100644 --- a/fcs/docsrc/tools/generate.ja.fsx +++ b/fcs/docsrc/tools/generate.ja.fsx @@ -3,8 +3,6 @@ // (the generated documentation is stored in the 'docs' directory) // -------------------------------------------------------------------------------------- -// Binaries that have XML documentation (in a corresponding generated XML file) -let referenceBinaries = [ "FSharp.Compiler.Service.dll" ] // Web site location for the generated documentation let website = "/FSharp.Compiler.Service/ja" @@ -49,20 +47,16 @@ let root = "file://" + (__SOURCE_DIRECTORY__ @@ "../output/ja") // Paths with template/source/output locations let bin = __SOURCE_DIRECTORY__ @@ "../../../Release/fcs/net45" let content = __SOURCE_DIRECTORY__ @@ "../content/ja" -let output = __SOURCE_DIRECTORY__ @@ "../../docs" -let outputJa = __SOURCE_DIRECTORY__ @@ "../../docs/ja" +let outputJa = __SOURCE_DIRECTORY__ @@ "../../../docs/ja" let files = __SOURCE_DIRECTORY__ @@ "../files" let templates = __SOURCE_DIRECTORY__ @@ "templates/ja" -let reference = __SOURCE_DIRECTORY__ @@ "reference" let formatting = __SOURCE_DIRECTORY__ @@ "../../packages/FSharp.Formatting/" let docTemplate = formatting @@ "templates/docpage.cshtml" // Where to look for *.csproj templates (in this order) let layoutRoots = [ templates - reference - formatting @@ "templates" - formatting @@ "templates/reference" ] + formatting @@ "templates"] // Copy static files and CSS + JS from F# Formatting // Build documentation from `fsx` and `md` files in `docsrc/content` diff --git a/fcs/fcs.props b/fcs/fcs.props index 4d6756a59b0af77267286fe9058b88b414f0953c..2753da740738b3262cf7d6c2b2b0613f7df95125 100644 --- a/fcs/fcs.props +++ b/fcs/fcs.props @@ -3,7 +3,7 @@ - 14.0.1 + 14.0.2 $(FSharpSourcesRoot)\..\packages\FSharp.Compiler.Tools.4.1.23\tools diff --git a/fcs/nuget/FSharp.Compiler.Service.MSBuild.v12.nuspec b/fcs/nuget/FSharp.Compiler.Service.MSBuild.v12.nuspec index 2a13c829c5ee462bde949c3d004be99e70c77dd4..e2fc6d2fd71f65d9cb64acae1dddc52ef71059a9 100644 --- a/fcs/nuget/FSharp.Compiler.Service.MSBuild.v12.nuspec +++ b/fcs/nuget/FSharp.Compiler.Service.MSBuild.v12.nuspec @@ -8,7 +8,7 @@ en-US false - 14.0.1 + 14.0.2 Microsoft Corporation and F# community contributors https://github.com/fsharp/FSharp.Compiler.Service/blob/master/LICENSE https://github.com/fsharp/FSharp.Compiler.Service diff --git a/fcs/nuget/FSharp.Compiler.Service.ProjectCracker.nuspec b/fcs/nuget/FSharp.Compiler.Service.ProjectCracker.nuspec index 49ee26348ba407f650c691f35fb90f013ea70deb..f9275ce2328be930adef18ee5991b3de005d4601 100644 --- a/fcs/nuget/FSharp.Compiler.Service.ProjectCracker.nuspec +++ b/fcs/nuget/FSharp.Compiler.Service.ProjectCracker.nuspec @@ -10,7 +10,7 @@ en-US false - 14.0.1 + 14.0.2 Microsoft Corporation and F# community contributors https://github.com/fsharp/FSharp.Compiler.Service/blob/master/LICENSE https://github.com/fsharp/FSharp.Compiler.Service diff --git a/fcs/nuget/FSharp.Compiler.Service.nuspec b/fcs/nuget/FSharp.Compiler.Service.nuspec index c16d4bceb957ea9fbba6901f8ac2d56f96a6aeeb..5b05dba3956dc828d60d2fd3671a2aef54ebd74e 100644 --- a/fcs/nuget/FSharp.Compiler.Service.nuspec +++ b/fcs/nuget/FSharp.Compiler.Service.nuspec @@ -10,7 +10,7 @@ en-US false - 14.0.1 + 14.0.2 Microsoft Corporation and F# community contributors https://github.com/fsharp/FSharp.Compiler.Service/blob/master/LICENSE https://github.com/fsharp/FSharp.Compiler.Service