From 470fa7fd6d6eee88ad8c402ee384398b0c5a8a78 Mon Sep 17 00:00:00 2001 From: Enrico Sada Date: Thu, 16 Mar 2017 19:01:27 +0100 Subject: [PATCH 01/17] use FSharp.Core package instead of Microsoft.FSharp.Core.netcore --- examples/Example/project.json | 2 +- src/Experimental/project.json | 2 +- src/Suave.DotLiquid/project.json | 2 +- src/Suave/project.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/Example/project.json b/examples/Example/project.json index bbdc2276..76e4a4bf 100644 --- a/examples/Example/project.json +++ b/examples/Example/project.json @@ -13,7 +13,7 @@ }, "dependencies": { - "Microsoft.FSharp.Core.netcore": "1.0.0-alpha-160509", + "FSharp.Core": "4.1.*", "Suave": "2.0.0-alpha7", "Microsoft.NETCore.App": { "type": "platform", diff --git a/src/Experimental/project.json b/src/Experimental/project.json index 3c985860..b52f39f4 100644 --- a/src/Experimental/project.json +++ b/src/Experimental/project.json @@ -42,7 +42,7 @@ "System.Security.Cryptography.Primitives": "4.0.0", "System.Net.Security": "4.0.0", "System.Globalization.Extensions": "4.0.1", - "Microsoft.FSharp.Core.netcore": "1.0.0-alpha-*", + "FSharp.Core": "4.1.*", "NETStandard.Library": "1.6.0", "System.Security.Claims": "4.0.1", "System.Runtime.Serialization.Json": "4.0.2", diff --git a/src/Suave.DotLiquid/project.json b/src/Suave.DotLiquid/project.json index d4f22371..e902975b 100644 --- a/src/Suave.DotLiquid/project.json +++ b/src/Suave.DotLiquid/project.json @@ -37,7 +37,7 @@ "System.Security.Cryptography.Primitives": "4.0.0", "System.Net.Security": "4.0.0", "System.Globalization.Extensions": "4.0.1", - "Microsoft.FSharp.Core.netcore": "1.0.0-alpha-*", + "FSharp.Core": "4.1.*", "NETStandard.Library": "1.6.0", "System.Security.Claims": "4.0.1", "DotLiquid": "2.0.55" diff --git a/src/Suave/project.json b/src/Suave/project.json index 76786fa5..8b624271 100644 --- a/src/Suave/project.json +++ b/src/Suave/project.json @@ -90,7 +90,7 @@ "System.Security.Cryptography.Primitives": "4.0.0", "System.Net.Security": "4.0.0", "System.Globalization.Extensions": "4.0.1", - "Microsoft.FSharp.Core.netcore": "1.0.0-alpha-*", + "FSharp.Core": "4.1.*", "NETStandard.Library": "1.6.0", "System.Security.Claims": "4.0.1", "System.Runtime.Serialization.Json": "4.0.2" From 9705082b5454892cdb271cdc947b852a16b97141 Mon Sep 17 00:00:00 2001 From: Enrico Sada Date: Tue, 21 Mar 2017 19:45:53 +0100 Subject: [PATCH 02/17] migrate src/Suave --- src/Suave/Suave.netcore.fsproj | 55 +++++++++++++++++ src/Suave/project.json | 104 --------------------------------- 2 files changed, 55 insertions(+), 104 deletions(-) create mode 100644 src/Suave/Suave.netcore.fsproj delete mode 100644 src/Suave/project.json diff --git a/src/Suave/Suave.netcore.fsproj b/src/Suave/Suave.netcore.fsproj new file mode 100644 index 00000000..9d33c45c --- /dev/null +++ b/src/Suave/Suave.netcore.fsproj @@ -0,0 +1,55 @@ + + + + netstandard1.6 + Suave + Suave + $(DefineConstants);DNXCORE50;NETSTANDARD1_5 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Suave/project.json b/src/Suave/project.json deleted file mode 100644 index 8b624271..00000000 --- a/src/Suave/project.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "version": "2.0.4-dotnetcli", - - "buildOptions": { - "compilerName": "fsc", - "compile": { - "includeFiles": [ - "../../paket-files/haf/YoLo/YoLo.fs", - "Utils/Aether.fs", - "Utils/AsyncExtensions.fs", - "Utils/AsyncResultCell.fs", - "Utils/Collections.fs", - "Utils/ASCII.fs", - "Utils/Choice.fs", - "Utils/ThreadSafeRandom.fs", - "Utils/Bytes.fs", - "Utils/Compression.fs", - "Utils/Crypto.fs", - "Utils/Parsing.fs", - "Utils/OpenMemoryStream.fs", - "Utils/Property.fs", - "Utils/Parse.fs", - "Utils/CultureInfoCache.fs", - "../../paket-files/logary/logary/src/Logary.Facade/Facade.fs", - "Utils/TraceHeader.fs", - "Globals.fs", - "CookieSerialiser.fs", - "Sockets/SocketBinding.fs", - "Sockets/BufferManager.fs", - "Sockets/ConcurrentPool.fs", - "Sockets/AsyncUserToken.fs", - "Sockets/SocketOp.fs", - "Sockets/ITransport.fs", - "Sockets/TcpTransport.fs", - "Sockets/Connection.fs", - "Sockets/SocketMonad.fs", - "Sockets/AsyncSocket.fs", - "Sockets/TransportStream.fs", - "Tcp.fs", - "TcpServerFactory.fs", - "Sscanf.fs", - "WebPart.fsi", - "WebPart.fs", - "Operators.fs", - "Http.fsi", - "Http.fs", - "Headers.fs", - "DefaultTlsProvider.fs", - "Compression.fs", - "Combinators.fsi", - "Combinators.fs", - "Cookie.fsi", - "Cookie.fs", - "Model.fs", - "State.fs", - "Authentication.fsi", - "Authentication.fs", - "SuaveConfig.fs", - "HttpOutput.fs", - "ConnectionFacade.fs", - "ParsingAndControl.fs", - "Web.fs", - "WebSocket.fs", - "Owin.fs", - "Json.fs" - ] - } - }, - - "tools": { - "dotnet-compile-fsc": { - "version": "1.0.0-preview2-*", - "imports": "dnxcore50" - }, - "dotnet-mergenupkg": { "version": "1.0.*" } - }, - - "frameworks": { - "net45": {}, - "netstandard1.6": { - "buildOptions": { - "define": [ - "DNXCORE50", - "NETSTANDARD1_5" - ] - }, - "dependencies": { - "System.Data.Common": "4.1.0", - "System.Diagnostics.Process": "4.1.0", - "System.Security.Cryptography.Primitives": "4.0.0", - "System.Net.Security": "4.0.0", - "System.Globalization.Extensions": "4.0.1", - "FSharp.Core": "4.1.*", - "NETStandard.Library": "1.6.0", - "System.Security.Claims": "4.0.1", - "System.Runtime.Serialization.Json": "4.0.2" - }, - "imports": [ - "portable-net45+win8", - "dnxcore50" - ] - } - } -} From 75174be1cfad16055c8d796960b6a3436603cd34 Mon Sep 17 00:00:00 2001 From: Enrico Sada Date: Tue, 21 Mar 2017 19:53:15 +0100 Subject: [PATCH 03/17] f migrate src/Suave --- src/Suave/Suave.netcore.fsproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Suave/Suave.netcore.fsproj b/src/Suave/Suave.netcore.fsproj index 9d33c45c..8e6a6e99 100644 --- a/src/Suave/Suave.netcore.fsproj +++ b/src/Suave/Suave.netcore.fsproj @@ -41,7 +41,7 @@ - + From 0842f67ca6b4db51a5d2392aa92208856f15ad83 Mon Sep 17 00:00:00 2001 From: Enrico Sada Date: Tue, 21 Mar 2017 19:53:32 +0100 Subject: [PATCH 04/17] migrate src/Suave.DotLiquid --- .../Suave.DotLiquid.netcore.fsproj | 26 ++++++++++ src/Suave.DotLiquid/project.json | 51 ------------------- 2 files changed, 26 insertions(+), 51 deletions(-) create mode 100644 src/Suave.DotLiquid/Suave.DotLiquid.netcore.fsproj delete mode 100644 src/Suave.DotLiquid/project.json diff --git a/src/Suave.DotLiquid/Suave.DotLiquid.netcore.fsproj b/src/Suave.DotLiquid/Suave.DotLiquid.netcore.fsproj new file mode 100644 index 00000000..f649de8f --- /dev/null +++ b/src/Suave.DotLiquid/Suave.DotLiquid.netcore.fsproj @@ -0,0 +1,26 @@ + + + + netstandard1.6 + Suave.DotLiquid + Suave.DotLiquid + $(DefineConstants);DNXCORE50;NETSTANDARD1_5 + + + + + + + + + + + + + + + + + + + diff --git a/src/Suave.DotLiquid/project.json b/src/Suave.DotLiquid/project.json deleted file mode 100644 index e902975b..00000000 --- a/src/Suave.DotLiquid/project.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "version": "2.0.4-dotnetcli", - - "buildOptions": { - "compilerName": "fsc", - "compile": { - "includeFiles": [ - "Library.fs" - ] - } - }, - - "tools": { - "dotnet-compile-fsc": { - "version": "1.0.0-preview2-*", - "imports": "dnxcore50" - }, - "dotnet-mergenupkg": { "version": "1.0.*" } - }, - "dependencies":{ - "Suave":"2.0.1-dotnetcli", - }, - "frameworks": { - "net45": {}, - "netstandard1.6": { - "buildOptions": { - "define": [ - "DNXCORE50", - "NETSTANDARD1_5" - ] - }, - "dependencies": { - "System.Data.Common": "4.1.0", - "System.Reflection": "4.3.0", - "System.Reflection.TypeExtensions": "4.3.0", - "System.Diagnostics.Process": "4.1.0", - "System.Security.Cryptography.Primitives": "4.0.0", - "System.Net.Security": "4.0.0", - "System.Globalization.Extensions": "4.0.1", - "FSharp.Core": "4.1.*", - "NETStandard.Library": "1.6.0", - "System.Security.Claims": "4.0.1", - "DotLiquid": "2.0.55" - }, - "imports": [ - "portable-net45+win8", - "dnxcore50" - ] - } - } -} From 57c527bb9fa8732773f731c3b6d1da622947989d Mon Sep 17 00:00:00 2001 From: Enrico Sada Date: Tue, 21 Mar 2017 20:01:06 +0100 Subject: [PATCH 05/17] migrate src/Suave.Experimental --- .../Suave.Experimental.netcore.fsproj | 32 +++++++++++ src/Experimental/project.json | 57 ------------------- 2 files changed, 32 insertions(+), 57 deletions(-) create mode 100644 src/Experimental/Suave.Experimental.netcore.fsproj delete mode 100644 src/Experimental/project.json diff --git a/src/Experimental/Suave.Experimental.netcore.fsproj b/src/Experimental/Suave.Experimental.netcore.fsproj new file mode 100644 index 00000000..ec4fa5cd --- /dev/null +++ b/src/Experimental/Suave.Experimental.netcore.fsproj @@ -0,0 +1,32 @@ + + + + netstandard1.6 + Suave.Experimental + Suave.Experimental + $(DefineConstants);DNXCORE50;NETSTANDARD1_5 + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Experimental/project.json b/src/Experimental/project.json deleted file mode 100644 index b52f39f4..00000000 --- a/src/Experimental/project.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "version": "2.0.4-dotnetcli", - - "buildOptions": { - "compilerName": "fsc", - "compile": { - "includeFiles": [ - "Html.fs", - "Xml.fs", - "Template.fs", - "Data.fs", - "Form.fs" - ] - } - }, - - "tools": { - "dotnet-compile-fsc": { - "version": "1.0.0-preview2-*", - "imports": "dnxcore50" - }, - "dotnet-mergenupkg": { "version": "1.0.*" } - }, - "dependencies":{ - "Suave":"2.0.1-dotnetcli", - }, - "frameworks": { - "net45": {}, - "netstandard1.6": { - "buildOptions": { - "define": [ - "DNXCORE50", - "NETSTANDARD1_5" - ] - }, - "dependencies": { - "System.Data.Common": "4.1.0", - "System.Reflection": "4.3.0", - "System.Reflection.TypeExtensions": "4.3.0", - "System.Xml.ReaderWriter": "4.3.0", - "System.Diagnostics.Process": "4.1.0", - "System.Security.Cryptography.Primitives": "4.0.0", - "System.Net.Security": "4.0.0", - "System.Globalization.Extensions": "4.0.1", - "FSharp.Core": "4.1.*", - "NETStandard.Library": "1.6.0", - "System.Security.Claims": "4.0.1", - "System.Runtime.Serialization.Json": "4.0.2", - "System.Net.Mail": "1.0.0-rtm-00002" - }, - "imports": [ - "portable-net45+win8", - "dnxcore50" - ] - } - } -} From 87282a487b7b5b781bf30692a62600b8d9c8d5a9 Mon Sep 17 00:00:00 2001 From: Enrico Sada Date: Tue, 21 Mar 2017 20:24:00 +0100 Subject: [PATCH 06/17] useless now, no project.json to mess with old fsproj --- examples/Example/Example.fsproj | 1 - examples/Example/Example.project.json | 4 ---- 2 files changed, 5 deletions(-) delete mode 100644 examples/Example/Example.project.json diff --git a/examples/Example/Example.fsproj b/examples/Example/Example.fsproj index 143d83ca..3be74624 100644 --- a/examples/Example/Example.fsproj +++ b/examples/Example/Example.fsproj @@ -62,7 +62,6 @@ Always - diff --git a/examples/Example/Example.project.json b/examples/Example/Example.project.json deleted file mode 100644 index d06b61bf..00000000 --- a/examples/Example/Example.project.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "runtimes": { "win": { } }, - "frameworks": { "net45": { } } -} From 215ed7f23c38979991285c605bce2be807062f89 Mon Sep 17 00:00:00 2001 From: Enrico Sada Date: Tue, 21 Mar 2017 20:24:40 +0100 Subject: [PATCH 07/17] useless dev feeds, now suave is a project reference, like Example.fsproj --- examples/Example/NuGet.Config | 3 --- 1 file changed, 3 deletions(-) diff --git a/examples/Example/NuGet.Config b/examples/Example/NuGet.Config index bca829d6..2b408d78 100644 --- a/examples/Example/NuGet.Config +++ b/examples/Example/NuGet.Config @@ -1,9 +1,6 @@  - - - From 0d647165d62acd62ce429c35498089c50451e6ee Mon Sep 17 00:00:00 2001 From: Enrico Sada Date: Tue, 21 Mar 2017 20:24:59 +0100 Subject: [PATCH 08/17] migrate examples/Example --- examples/Example/Example.netcore.fsproj | 22 ++++++++++++ examples/Example/Program.fs | 4 +-- examples/Example/project.json | 48 ------------------------- 3 files changed, 24 insertions(+), 50 deletions(-) create mode 100644 examples/Example/Example.netcore.fsproj delete mode 100644 examples/Example/project.json diff --git a/examples/Example/Example.netcore.fsproj b/examples/Example/Example.netcore.fsproj new file mode 100644 index 00000000..793bba1a --- /dev/null +++ b/examples/Example/Example.netcore.fsproj @@ -0,0 +1,22 @@ + + + + netcoreapp1.1 + Exe + Example + $(DefineConstants);DNXCORE50 + + + + + + + + + + + + + + + diff --git a/examples/Example/Program.fs b/examples/Example/Program.fs index 5a81f4ff..5aa9b29a 100644 --- a/examples/Example/Program.fs +++ b/examples/Example/Program.fs @@ -64,7 +64,7 @@ let testApp = RequestErrors.NOT_FOUND "Found no handlers" ] -#if NETSTANDARD1_5 +#if NETCOREAPP1_1 #else System.Net.ServicePointManager.DefaultConnectionLimit <- Int32.MaxValue #endif @@ -228,7 +228,7 @@ let main argv = compressedFilesFolder = None logger = logger tcpServerFactory = new DefaultTcpServerFactory() -#if NETSTANDARD1_5 +#if NETCOREAPP1_1 cookieSerialiser = new JsonFormatterSerialiser() #else cookieSerialiser = new BinaryFormatterSerialiser() diff --git a/examples/Example/project.json b/examples/Example/project.json deleted file mode 100644 index 76e4a4bf..00000000 --- a/examples/Example/project.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "version": "1.0.0-*", - "buildOptions": { - "emitEntryPoint": true, - "compilerName": "fsc", - "compile": { - "includeFiles": [ - "../../paket-files/haf/YoLo/YoLo.fs", - "CounterDemo.fs", - "Program.fs" - ] - } - }, - - "dependencies": { - "FSharp.Core": "4.1.*", - "Suave": "2.0.0-alpha7", - "Microsoft.NETCore.App": { - "type": "platform", - "version": "1.0.0-rc2-3002702" - } - }, - - "tools": { - "dotnet-compile-fsc": { - "version": "1.0.0-preview1-*", - "imports": [ - "dnxcore50", - "portable-net45+win81", - "netstandard1.3" - ] - } - }, - - "frameworks": { - "netstandard1.6": { - "buildOptions": { - "define": [ - "DNXCORE50" - ] - }, - "imports": [ - "portable-net45+win8", - "dnxcore50" - ] - } - } -} From 154a8eb03591f12771a23aacc1031030b1d99fdc Mon Sep 17 00:00:00 2001 From: Enrico Sada Date: Tue, 21 Mar 2017 20:25:16 +0100 Subject: [PATCH 09/17] fix Suave.netcore.fsproj --- src/Suave/Suave.netcore.fsproj | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/src/Suave/Suave.netcore.fsproj b/src/Suave/Suave.netcore.fsproj index 8e6a6e99..48db4cae 100644 --- a/src/Suave/Suave.netcore.fsproj +++ b/src/Suave/Suave.netcore.fsproj @@ -26,6 +26,8 @@ + + @@ -37,7 +39,33 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + From 5ee26f3abeba273506251f7379ebfae7f81196af Mon Sep 17 00:00:00 2001 From: Enrico Sada Date: Tue, 21 Mar 2017 20:25:27 +0100 Subject: [PATCH 10/17] no project.json --- src/Suave/Suave.fsproj | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Suave/Suave.fsproj b/src/Suave/Suave.fsproj index 50aaad52..45a5577b 100644 --- a/src/Suave/Suave.fsproj +++ b/src/Suave/Suave.fsproj @@ -147,7 +147,6 @@ - From 6c5c9a71b2013c88a99697deafc1dacf1a54520d Mon Sep 17 00:00:00 2001 From: Enrico Sada Date: Tue, 21 Mar 2017 20:33:28 +0100 Subject: [PATCH 11/17] .net core sdk 1.0 rtm --- Rakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index 4d1b4dd6..d922bdd6 100644 --- a/Rakefile +++ b/Rakefile @@ -103,7 +103,7 @@ namespace :dotnetcli do end task :coreclr_binaries => 'tools/coreclr' do - dotnet_version = '1.0.0-preview2-003131' + dotnet_version = '1.0.1' dotnet_installed_version = get_installed_dotnet_version # check if required version of .net core sdk is already installed, otherwise download and install it if dotnet_installed_version == dotnet_version then From 75112d714e91859b82d7310568c5748309981b78 Mon Sep 17 00:00:00 2001 From: Enrico Sada Date: Tue, 21 Mar 2017 20:34:03 +0100 Subject: [PATCH 12/17] now version can be passes with `/p:Version=1.2.3-alpha` or as `VERSION` env var --- Rakefile | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Rakefile b/Rakefile index d922bdd6..691f9ad3 100644 --- a/Rakefile +++ b/Rakefile @@ -275,11 +275,6 @@ task :increase_version_number do s.save version = s.format("%M.%m.%p%s") ENV['NUGET_VERSION'] = version - projectjson = 'src/Suave/project.json' - contents = File.read(projectjson).gsub(/"version": ".*-dotnetcli"/, %{"version": "#{version}-dotnetcli"}) - File.open(projectjson, 'w') do |out| - out << contents - end end namespace :docs do From e114d482f1eccbbe33578e814bdba8620af63a4e Mon Sep 17 00:00:00 2001 From: Enrico Sada Date: Tue, 21 Mar 2017 20:34:31 +0100 Subject: [PATCH 13/17] let's use a sln to group fsproj to restore --- Rakefile | 4 +-- src/Suave.netcore.sln | 62 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+), 3 deletions(-) create mode 100644 src/Suave.netcore.sln diff --git a/Rakefile b/Rakefile index 691f9ad3..b40590db 100644 --- a/Rakefile +++ b/Rakefile @@ -150,9 +150,7 @@ namespace :dotnetcli do desc 'Restore the CoreCLR binaries' task :restore => :coreclr_binaries do - Dir.chdir "src" do - system dotnet_exe_path, "restore" - end + system dotnet_exe_path, "restore src/Suave.netcore.sln" end task :build_lib => :coreclr_binaries do diff --git a/src/Suave.netcore.sln b/src/Suave.netcore.sln new file mode 100644 index 00000000..c86d1266 --- /dev/null +++ b/src/Suave.netcore.sln @@ -0,0 +1,62 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.26124.0 +MinimumVisualStudioVersion = 15.0.26124.0 +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Suave.netcore", "Suave\Suave.netcore.fsproj", "{87A7BC50-A26D-4370-B175-BF4BB4E7416B}" +EndProject +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Suave.DotLiquid.netcore", "Suave.DotLiquid\Suave.DotLiquid.netcore.fsproj", "{FF35C4E4-9B3C-42F1-96C3-6972D9A94DAD}" +EndProject +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Suave.Experimental.netcore", "Experimental\Suave.Experimental.netcore.fsproj", "{44C7A32F-EA26-49D4-82C9-8B51E17524D0}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {87A7BC50-A26D-4370-B175-BF4BB4E7416B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {87A7BC50-A26D-4370-B175-BF4BB4E7416B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {87A7BC50-A26D-4370-B175-BF4BB4E7416B}.Debug|x64.ActiveCfg = Debug|x64 + {87A7BC50-A26D-4370-B175-BF4BB4E7416B}.Debug|x64.Build.0 = Debug|x64 + {87A7BC50-A26D-4370-B175-BF4BB4E7416B}.Debug|x86.ActiveCfg = Debug|x86 + {87A7BC50-A26D-4370-B175-BF4BB4E7416B}.Debug|x86.Build.0 = Debug|x86 + {87A7BC50-A26D-4370-B175-BF4BB4E7416B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {87A7BC50-A26D-4370-B175-BF4BB4E7416B}.Release|Any CPU.Build.0 = Release|Any CPU + {87A7BC50-A26D-4370-B175-BF4BB4E7416B}.Release|x64.ActiveCfg = Release|x64 + {87A7BC50-A26D-4370-B175-BF4BB4E7416B}.Release|x64.Build.0 = Release|x64 + {87A7BC50-A26D-4370-B175-BF4BB4E7416B}.Release|x86.ActiveCfg = Release|x86 + {87A7BC50-A26D-4370-B175-BF4BB4E7416B}.Release|x86.Build.0 = Release|x86 + {FF35C4E4-9B3C-42F1-96C3-6972D9A94DAD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FF35C4E4-9B3C-42F1-96C3-6972D9A94DAD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FF35C4E4-9B3C-42F1-96C3-6972D9A94DAD}.Debug|x64.ActiveCfg = Debug|x64 + {FF35C4E4-9B3C-42F1-96C3-6972D9A94DAD}.Debug|x64.Build.0 = Debug|x64 + {FF35C4E4-9B3C-42F1-96C3-6972D9A94DAD}.Debug|x86.ActiveCfg = Debug|x86 + {FF35C4E4-9B3C-42F1-96C3-6972D9A94DAD}.Debug|x86.Build.0 = Debug|x86 + {FF35C4E4-9B3C-42F1-96C3-6972D9A94DAD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FF35C4E4-9B3C-42F1-96C3-6972D9A94DAD}.Release|Any CPU.Build.0 = Release|Any CPU + {FF35C4E4-9B3C-42F1-96C3-6972D9A94DAD}.Release|x64.ActiveCfg = Release|x64 + {FF35C4E4-9B3C-42F1-96C3-6972D9A94DAD}.Release|x64.Build.0 = Release|x64 + {FF35C4E4-9B3C-42F1-96C3-6972D9A94DAD}.Release|x86.ActiveCfg = Release|x86 + {FF35C4E4-9B3C-42F1-96C3-6972D9A94DAD}.Release|x86.Build.0 = Release|x86 + {44C7A32F-EA26-49D4-82C9-8B51E17524D0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {44C7A32F-EA26-49D4-82C9-8B51E17524D0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {44C7A32F-EA26-49D4-82C9-8B51E17524D0}.Debug|x64.ActiveCfg = Debug|x64 + {44C7A32F-EA26-49D4-82C9-8B51E17524D0}.Debug|x64.Build.0 = Debug|x64 + {44C7A32F-EA26-49D4-82C9-8B51E17524D0}.Debug|x86.ActiveCfg = Debug|x86 + {44C7A32F-EA26-49D4-82C9-8B51E17524D0}.Debug|x86.Build.0 = Debug|x86 + {44C7A32F-EA26-49D4-82C9-8B51E17524D0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {44C7A32F-EA26-49D4-82C9-8B51E17524D0}.Release|Any CPU.Build.0 = Release|Any CPU + {44C7A32F-EA26-49D4-82C9-8B51E17524D0}.Release|x64.ActiveCfg = Release|x64 + {44C7A32F-EA26-49D4-82C9-8B51E17524D0}.Release|x64.Build.0 = Release|x64 + {44C7A32F-EA26-49D4-82C9-8B51E17524D0}.Release|x86.ActiveCfg = Release|x86 + {44C7A32F-EA26-49D4-82C9-8B51E17524D0}.Release|x86.Build.0 = Release|x86 + EndGlobalSection +EndGlobal From d12b177ea2ad35a5d54f8acd33ebe680c3c53ed0 Mon Sep 17 00:00:00 2001 From: Enrico Sada Date: Tue, 21 Mar 2017 20:36:32 +0100 Subject: [PATCH 14/17] again, let's build the sln, deps are by project refs --- Rakefile | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Rakefile b/Rakefile index b40590db..b2a2289c 100644 --- a/Rakefile +++ b/Rakefile @@ -154,12 +154,7 @@ namespace :dotnetcli do end task :build_lib => :coreclr_binaries do - [ "src/Suave", "src/Experimental", "src/Suave.DotLiquid" ].each do |item| - Dir.chdir "#{item}" do - system dotnet_exe_path, %W|--verbose build --configuration #{Configuration} -f netstandard1.6| - Dir.chdir "../.." - end - end + system dotnet_exe_path, %W|build src/Suave.netcore.sln -c #{Configuration}| end desc 'Build Suave and test project' From 35383408c7d888e9a2b53a800690ea6f87525553 Mon Sep 17 00:00:00 2001 From: Enrico Sada Date: Tue, 21 Mar 2017 20:39:25 +0100 Subject: [PATCH 15/17] pack --- Rakefile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Rakefile b/Rakefile index b2a2289c..9d6704b6 100644 --- a/Rakefile +++ b/Rakefile @@ -162,11 +162,8 @@ namespace :dotnetcli do desc 'Create Suave nugets packages' task :pack => :coreclr_binaries do - [ "src/Suave", "src/Experimental", "src/Suave.DotLiquid" ].each do |item| - Dir.chdir "#{item}" do - system dotnet_exe_path, %W|--verbose pack --configuration #{Configuration} --no-build| - Dir.chdir "../.." - end + [ "src/Suave/Suave.netcore.fsproj", "src/Experimental/Suave.Experimental.fsproj", "src/Suave.DotLiquid/Suave.DotLiquid.netcore.fsproj" ].each do |item| + system dotnet_exe_path, %W|pack --configuration #{Configuration} --no-build /p:Version=#{ENV['NUGET_VERSION']}| end end From 1ff90654a0e48941456b513ee729271ba95f8e39 Mon Sep 17 00:00:00 2001 From: Enrico Sada Date: Tue, 21 Mar 2017 23:36:02 +0100 Subject: [PATCH 16/17] fix build script --- .gitignore | 2 +- Rakefile | 82 ++++++++++++++++++++++++------------------------ tools/tools.proj | 7 +++++ 3 files changed, 49 insertions(+), 42 deletions(-) create mode 100644 tools/tools.proj diff --git a/.gitignore b/.gitignore index 7c3332e6..276d6587 100644 --- a/.gitignore +++ b/.gitignore @@ -32,6 +32,6 @@ project.lock.json *.project.lock.json dotnet-dev-* tools/coreclr/ -dotnet_cli_install.ps1 +tools/dotnet-install.* .vs/ .vscode/ \ No newline at end of file diff --git a/Rakefile b/Rakefile index 9d6704b6..a868ce5a 100644 --- a/Rakefile +++ b/Rakefile @@ -45,7 +45,7 @@ asmver_files :asmver => :versioning do |a| a.files = FileList[ 'examples/**/*.fsproj', 'src/{Suave,Suave.*,Experimental}/*proj' - ] + ].exclude(/.netcore.fsproj/) a.attributes assembly_description: suave_description, assembly_configuration: Configuration, assembly_company: 'Suave.io', @@ -116,54 +116,58 @@ namespace :dotnetcli do puts "Found .NET Core SDK #{dotnet_installed_version} but require #{dotnet_version}. Downloading and installing in ./tools/coreclr" end + coreclr_bin_dir = File.expand_path "tools/coreclr" + + dotnet_exe_path = "dotnet" + case RUBY_PLATFORM - when /darwin/ - filename = "dotnet-dev-osx-x64.#{dotnet_version}.tar.gz" - system 'curl', - %W|-o tools/#{filename} - -L https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/#{dotnet_version}/#{filename}| \ - unless File.exists? "tools/#{filename}" - - system 'tar', - %W|xf tools/#{filename} - --directory tools/coreclr| - when /linux/ - filename = "dotnet-dev-ubuntu.14.04-x64.#{dotnet_version}.tar.gz" + when /darwin/ , /linux/ system 'curl', - %W|-o tools/#{filename} - -L https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/#{dotnet_version}/#{filename}| \ - unless File.exists? "tools/#{filename}" + %W|-o tools/dotnet-install.sh + -L https://dot.net/v1/dotnet-install.sh| \ + unless File.exists? "tools/dotnet-install.sh" - system 'tar', - %W|xf tools/#{filename} - --directory tools/coreclr| - end - if Albacore.windows? + system 'bash', + %W|--install-dir "#{coreclr_bin_dir}" + --channel "stable" + --version "#{dotnet_version}| + + ENV['PATH'] = "#{coreclr_bin_dir}/dotnet:#{ENV['PATH']}" + else system 'powershell', - %W|Invoke-WebRequest "https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0-preview2/scripts/obtain/dotnet-install.ps1" -OutFile "dotnet_cli_install.ps1"| + %W|Invoke-WebRequest "https://dot.net/v1/dotnet-install.ps1" -OutFile "tools/dotnet-install.ps1"| \ + unless File.exists? "tools/dotnet-install.ps1" + system 'powershell', - %W|-ExecutionPolicy Unrestricted ./dotnet_cli_install.ps1 -InstallDir "tools/coreclr" -Channel "preview" -version "#{dotnet_version}"| + %W|-ExecutionPolicy Unrestricted ./tools/dotnet-install.ps1 + -InstallDir "#{coreclr_bin_dir}" + -Channel "stable" + -Version "#{dotnet_version}"| + + ENV['PATH'] = "#{coreclr_bin_dir};#{ENV['PATH']}" end - dotnet_exe_path = "#{Dir.pwd}/tools/coreclr/dotnet" end desc 'Restore the CoreCLR binaries' task :restore => :coreclr_binaries do - system dotnet_exe_path, "restore src/Suave.netcore.sln" + system dotnet_exe_path, %W|restore src/Suave.netcore.sln -v n| end task :build_lib => :coreclr_binaries do - system dotnet_exe_path, %W|build src/Suave.netcore.sln -c #{Configuration}| + system dotnet_exe_path, %W|build src/Suave.netcore.sln -c #{Configuration} -v n| end desc 'Build Suave and test project' task :build => [:build_lib] + directory 'build/pkg-netcore' + desc 'Create Suave nugets packages' - task :pack => :coreclr_binaries do - [ "src/Suave/Suave.netcore.fsproj", "src/Experimental/Suave.Experimental.fsproj", "src/Suave.DotLiquid/Suave.DotLiquid.netcore.fsproj" ].each do |item| - system dotnet_exe_path, %W|pack --configuration #{Configuration} --no-build /p:Version=#{ENV['NUGET_VERSION']}| + task :pack => [:versioning, 'build/pkg-netcore', :coreclr_binaries] do + out_dir = File.expand_path "build/pkg-netcore" + [ "src/Suave/Suave.netcore.fsproj", "src/Experimental/Suave.Experimental.netcore.fsproj", "src/Suave.DotLiquid/Suave.DotLiquid.netcore.fsproj" ].each do |item| + system dotnet_exe_path, %W|pack #{item} --configuration #{Configuration} --output "#{out_dir}" --no-build -v n /p:Version=#{ENV['NUGET_VERSION']}| end end @@ -171,17 +175,13 @@ namespace :dotnetcli do desc 'Merge standard and dotnetcli nupkgs; note the need to run :nugets before' task :merge => :coreclr_binaries do - [ "Suave", "Experimental", "Suave.DotLiquid" ].each do |item| - Dir.chdir "src/#{item}" do - version = SemVer.find.format("%M.%m.%p%s") - if item == "Experimental" then - sourcenupkg = "../../build/pkg/Suave.Experimental.#{version}.nupkg" - clinupkg = "bin/#{Configuration}/Experimental.#{version}-dotnetcli.nupkg" - else - sourcenupkg = "../../build/pkg/#{item}.#{version}.nupkg" - clinupkg = "bin/#{Configuration}/#{item}.#{version}-dotnetcli.nupkg" - end - system dotnet_exe_path, %W|mergenupkg --source "#{sourcenupkg}" --other "#{clinupkg}" --framework netstandard1.6| + system dotnet_exe_path, %W|restore tools/tools.proj -v n| + Dir.chdir "tools" do + [ "Suave", "Suave.Experimental", "Suave.DotLiquid" ].each do |item| + version = SemVer.find.format("%M.%m.%p%s") + sourcenupkg = "../build/pkg/#{item}.#{version}.nupkg" + netcorenupkg = "../build/pkg-netcore/#{item}.#{version}.nupkg" + system dotnet_exe_path, %W|mergenupkg --source "#{sourcenupkg}" --other "#{netcorenupkg}" --framework netstandard1.6| end end end @@ -209,7 +209,7 @@ task :tests => [:'tests:stress', :'tests:unit'] directory 'build/pkg' task :create_nuget_quick => [:versioning, 'build/pkg'] do - projects = FileList['src/**/*.fsproj'].exclude(/Tests/) + projects = FileList['src/**/*.fsproj'].exclude(/.netcore.fsproj/).exclude(/Tests/) knowns = Set.new(projects.map { |f| Albacore::Project.new f }.map { |p| p.id }) authors = "Ademar Gonzalez, Henrik Feldt" projects.each do |f| diff --git a/tools/tools.proj b/tools/tools.proj new file mode 100644 index 00000000..5aa6dfda --- /dev/null +++ b/tools/tools.proj @@ -0,0 +1,7 @@ + + + + + + + From 467381452c275d99e96d0385f329246cc3fd0c48 Mon Sep 17 00:00:00 2001 From: Enrico Sada Date: Wed, 22 Mar 2017 00:01:21 +0100 Subject: [PATCH 17/17] enable xmldoc generation --- Gemfile.lock | 2 +- src/Experimental/Suave.Experimental.netcore.fsproj | 1 + src/Suave.DotLiquid/Suave.DotLiquid.netcore.fsproj | 1 + src/Suave/Suave.netcore.fsproj | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 994a749c..a01e88c8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -26,4 +26,4 @@ DEPENDENCIES albacore (~> 2.3) BUNDLED WITH - 1.12.5 + 1.14.6 diff --git a/src/Experimental/Suave.Experimental.netcore.fsproj b/src/Experimental/Suave.Experimental.netcore.fsproj index ec4fa5cd..a188720d 100644 --- a/src/Experimental/Suave.Experimental.netcore.fsproj +++ b/src/Experimental/Suave.Experimental.netcore.fsproj @@ -4,6 +4,7 @@ netstandard1.6 Suave.Experimental Suave.Experimental + true $(DefineConstants);DNXCORE50;NETSTANDARD1_5 diff --git a/src/Suave.DotLiquid/Suave.DotLiquid.netcore.fsproj b/src/Suave.DotLiquid/Suave.DotLiquid.netcore.fsproj index f649de8f..cf2ca806 100644 --- a/src/Suave.DotLiquid/Suave.DotLiquid.netcore.fsproj +++ b/src/Suave.DotLiquid/Suave.DotLiquid.netcore.fsproj @@ -4,6 +4,7 @@ netstandard1.6 Suave.DotLiquid Suave.DotLiquid + true $(DefineConstants);DNXCORE50;NETSTANDARD1_5 diff --git a/src/Suave/Suave.netcore.fsproj b/src/Suave/Suave.netcore.fsproj index 48db4cae..b5870c32 100644 --- a/src/Suave/Suave.netcore.fsproj +++ b/src/Suave/Suave.netcore.fsproj @@ -4,6 +4,7 @@ netstandard1.6 Suave Suave + true $(DefineConstants);DNXCORE50;NETSTANDARD1_5