From 931525fe71bba314b01d9980378833e89176df2d Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Sun, 22 Apr 2018 23:15:22 +0300 Subject: [PATCH 01/41] Migration to new project file format --- .gitignore | 3 + build.fsx | 36 ++++- fsc.props | 21 +++ netfx.props | 34 +++++ .../FSharp.Configuration.fsproj | 89 +---------- src/FSharp.Configuration/ResXProvider.fs | 2 +- .../YamlConfigProvider.fs | 1 + .../FSharp.Configuration.Tests.fsproj | 138 ++---------------- .../ResXProvider.Tests.fs | 20 ++- 9 files changed, 120 insertions(+), 224 deletions(-) create mode 100644 fsc.props create mode 100644 netfx.props diff --git a/.gitignore b/.gitignore index c7ad1b0e..8e031a47 100644 --- a/.gitignore +++ b/.gitignore @@ -158,6 +158,9 @@ $RECYCLE.BIN/ # Exclude F# project specific directories and files # =================================================== +.idea/ +.vs/ + # NuGet Packages Directory packages/ diff --git a/build.fsx b/build.fsx index fe00a73c..f0a561e9 100644 --- a/build.fsx +++ b/build.fsx @@ -44,7 +44,7 @@ let tags = "appsettings, YAML, F#, ResX, Ini, config" let solutionFile = "FSharp.Configuration" // Pattern specifying assemblies to be tested using NUnit -let testAssemblies = "tests/**/bin/Release/*Tests*.exe" +let testAssemblies = "tests/**/bin/Release/net461/*Tests*.exe" // Git configuration (used for publishing documentation in gh-pages branch) // The profile where the project is posted @@ -108,14 +108,32 @@ Target "CleanDocs" (fun _ -> // -------------------------------------------------------------------------------------- // Build library & test project +let mutable dotnetExePath = "dotnet" +let dotnetcliVersion = "2.1.101" + +Target "InstallDotNetCore" (fun _ -> + dotnetExePath <- DotNetCli.InstallDotNetSDK dotnetcliVersion + Environment.SetEnvironmentVariable("DOTNET_EXE_PATH", dotnetExePath) +) + Target "Build" (fun _ -> - !! (solutionFile + ".sln") - |> MSBuildRelease "" "Rebuild" - |> ignore + DotNetCli.Build (fun c -> + { c with + Project = "FSharp.Configuration.sln" + Configuration = "Release" + ToolPath = dotnetExePath }) + + CopyDir "bin/lib/net45" + "src/FSharp.Configuration/bin/Release/net45/" + (fun _ -> true) +) - !! (solutionFile + ".Tests.sln") - |> MSBuildRelease "" "Rebuild" - |> ignore +Target "BuildTests" (fun _ -> + DotNetCli.Build (fun c -> + { c with + Project = "FSharp.Configuration.Tests.sln" + Configuration = "Release" + ToolPath = dotnetExePath }) ) // -------------------------------------------------------------------------------------- @@ -139,7 +157,7 @@ Target "NuGet" (fun _ -> CleanDir nugetDocsDir CleanDir nugetlibDir - CopyDir nugetlibDir "bin" (fun file -> file.Contains "FSharp.Core." |> not) + CopyDir nugetlibDir "bin/lib/net45" (fun file -> file.Contains "FSharp.Core." |> not) CopyDir nugetDocsDir "./docs/output" allFiles NuGet (fun p -> @@ -263,7 +281,9 @@ Target "All" DoNothing "Clean" ==> "AssemblyInfo" + ==> "InstallDotNetCore" ==> "Build" + ==> "BuildTests" ==> "RunTests" =?> ("GenerateReferenceDocs",isLocalBuild && not isMono) =?> ("GenerateDocs",isLocalBuild && not isMono) diff --git a/fsc.props b/fsc.props new file mode 100644 index 00000000..9719cb4b --- /dev/null +++ b/fsc.props @@ -0,0 +1,21 @@ + + + + + true + true + true + + + C:\Program Files (x86)\Microsoft SDKs\F#\4.1\Framework\v4.0 + fsc.exe + + + /Library/Frameworks/Mono.framework/Versions/Current/Commands + fsharpc + + + /usr/bin + fsharpc + + \ No newline at end of file diff --git a/netfx.props b/netfx.props new file mode 100644 index 00000000..91361f30 --- /dev/null +++ b/netfx.props @@ -0,0 +1,34 @@ + + + + + + + true + + + /Library/Frameworks/Mono.framework/Versions/Current/lib/mono + /usr/lib/mono + /usr/local/lib/mono + + + $(BaseFrameworkPathOverrideForMono)/4.5-api + $(BaseFrameworkPathOverrideForMono)/4.5.1-api + $(BaseFrameworkPathOverrideForMono)/4.5.2-api + $(BaseFrameworkPathOverrideForMono)/4.6-api + $(BaseFrameworkPathOverrideForMono)/4.6.1-api + $(BaseFrameworkPathOverrideForMono)/4.6.2-api + $(BaseFrameworkPathOverrideForMono)/4.7-api + $(BaseFrameworkPathOverrideForMono)/4.7.1-api + true + + + $(FrameworkPathOverride)/Facades;$(AssemblySearchPaths) + + + + + + + + \ No newline at end of file diff --git a/src/FSharp.Configuration/FSharp.Configuration.fsproj b/src/FSharp.Configuration/FSharp.Configuration.fsproj index 81112094..53c02a70 100644 --- a/src/FSharp.Configuration/FSharp.Configuration.fsproj +++ b/src/FSharp.Configuration/FSharp.Configuration.fsproj @@ -1,60 +1,15 @@  - - + + - Debug - AnyCPU - 2.0 - 7e90d6ce-a10b-4858-a5bc-41df7250cbca - Library - FSharp.Configuration - FSharp.Configuration - v4.5 - FSharp.Configuration - - - - true - full - false - false - ..\..\bin\ - DEBUG;TRACE - 3 - - - Program - C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\devenv.exe - - - - - pdbonly - true - true - ..\..\bin - TRACE - 3 - ..\..\bin\FSharp.Configuration.XML + net45 + true - 11 + FSharp.Configuration + false - - - - $(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets - - - - - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets - - - - - - + True ProvidedTypes.fsi @@ -85,33 +40,5 @@ - - - - - - ..\..\packages\FSharp.Core\lib\net40\FSharp.Core.dll - True - True - - - - - - - - - ..\..\packages\SharpYaml\lib\net45\SharpYaml.dll - True - True - - - - + \ No newline at end of file diff --git a/src/FSharp.Configuration/ResXProvider.fs b/src/FSharp.Configuration/ResXProvider.fs index 31a0f246..6fff7f30 100644 --- a/src/FSharp.Configuration/ResXProvider.fs +++ b/src/FSharp.Configuration/ResXProvider.fs @@ -63,7 +63,7 @@ let internal typedResources (context: Context) = match parameterValues with | [| :? string as resourcePath|] -> let filePath = findConfigFile context.ResolutionFolder resourcePath - if not (File.Exists filePath) then invalidArg "file" "Resouce file not found" + if not (File.Exists filePath) then invalidArg "file" "Resource file not found" let resourceName = Path.ChangeExtension (resourcePath, null) |> replace '\\' '.' diff --git a/src/FSharp.Configuration/YamlConfigProvider.fs b/src/FSharp.Configuration/YamlConfigProvider.fs index d7302a37..32592858 100644 --- a/src/FSharp.Configuration/YamlConfigProvider.fs +++ b/src/FSharp.Configuration/YamlConfigProvider.fs @@ -1,6 +1,7 @@ module FSharp.Configuration.YamlConfigTypeProvider #nowarn "57" +#nowarn "25" open System.Reflection open System diff --git a/tests/FSharp.Configuration.Tests/FSharp.Configuration.Tests.fsproj b/tests/FSharp.Configuration.Tests/FSharp.Configuration.Tests.fsproj index ad1abf55..232b2fc1 100644 --- a/tests/FSharp.Configuration.Tests/FSharp.Configuration.Tests.fsproj +++ b/tests/FSharp.Configuration.Tests/FSharp.Configuration.Tests.fsproj @@ -1,65 +1,17 @@  - - + + + - Debug - AnyCPU - 2.0 - e789c72a-5cfd-436b-8ef1-61aa2852a89f Exe - FSharp.Configuration.Tests - FSharp.Configuration.Tests - v4.6.1 - FSharp.Configuration.Tests - - ..\..\ - true + net461 true - - true - full - false - false - bin\Debug\ - DEBUG;TRACE - 3 - - - Project - - - - - false - - - pdbonly - true - true - bin\Release\ - TRACE - 3 - - - - 11 + FSharp.Configuration.Tests + + - - - - $(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets - - - - - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets - - - - - @@ -70,7 +22,7 @@ Always - + @@ -83,82 +35,16 @@ - ..\..\bin\FSharp.Configuration.dll + ..\..\bin\lib\net45\FSharp.Configuration.dll - + - - - - - - - ..\..\packages\test\Argu\lib\net45\Argu.dll - True - True - - - - - - - - - ..\..\packages\test\Expecto\lib\net461\Expecto.dll - True - True - - - - - - - - - ..\..\packages\test\FSharp.Core\lib\net45\FSharp.Core.dll - True - True - - - - - - - - - ..\..\packages\test\Mono.Cecil\lib\net40\Mono.Cecil.dll - True - True - - - ..\..\packages\test\Mono.Cecil\lib\net40\Mono.Cecil.Mdb.dll - True - True - - - ..\..\packages\test\Mono.Cecil\lib\net40\Mono.Cecil.Pdb.dll - True - True - - - ..\..\packages\test\Mono.Cecil\lib\net40\Mono.Cecil.Rocks.dll - True - True - - - - + \ No newline at end of file diff --git a/tests/FSharp.Configuration.Tests/ResXProvider.Tests.fs b/tests/FSharp.Configuration.Tests/ResXProvider.Tests.fs index e0a08f56..aafb5f7b 100644 --- a/tests/FSharp.Configuration.Tests/ResXProvider.Tests.fs +++ b/tests/FSharp.Configuration.Tests/ResXProvider.Tests.fs @@ -6,13 +6,17 @@ open Expecto type Resource1 = ResXProvider<"Resource1.resx"> let [] tests = - testList "ResX Provider tests" [ - testCase "Can return a string from the resource file" (fun _ -> Expect.equal Resource1.Greetings "Hello World!" "value") - - testCase "Can return an image from the resource file" (fun _ -> + // https://github.com/Microsoft/msbuild/issues/2221 + ptestList "ResX Provider tests" [ + testCase "Can return a string from the resource file" (fun _ -> + Expect.equal Resource1.Greetings "Hello World!" "value") + + testCase "Can return an image from the resource file" (fun _ -> Expect.isNotNull Resource1.Flowers "Flowers" Expect.equal typeof (Resource1.Flowers.GetType()) "value") - - testCase "Can return an int from the resource file" (fun _ -> Expect.equal Resource1.Answer 42 "value") - testCase "Can return a text file from the resource file" (fun _ -> Expect.equal Resource1.TextFile "Text" "value") - ] \ No newline at end of file + + testCase "Can return an int from the resource file" (fun _ -> + Expect.equal Resource1.Answer 42 "value") + testCase "Can return a text file from the resource file" (fun _ -> + Expect.equal Resource1.TextFile "Text" "value") + ] From 0df1086cf1d29249206559923a0a83451dae9bb7 Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Sun, 22 Apr 2018 23:43:01 +0300 Subject: [PATCH 02/41] travis config --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9b785a16..ac6b5deb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: csharp - -sudo: false # use the new container-based Travis infrastructure +dist: trusty +sudo: true script: - ./build.sh \ No newline at end of file From fc72f38186b977e66d7b0c0eebf239dc47818d09 Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Sun, 22 Apr 2018 23:48:07 +0300 Subject: [PATCH 03/41] travis config --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index ac6b5deb..80244f11 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,5 +2,7 @@ language: csharp dist: trusty sudo: true +dotnet: 2.1.101 + script: - ./build.sh \ No newline at end of file From d48ffae2af80df9e034d3ce813264f3dcc240937 Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Sun, 22 Apr 2018 23:54:05 +0300 Subject: [PATCH 04/41] https://github.com/Microsoft/visualfsharp/issues/3303#issuecomment-376117927 --- fsc.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fsc.props b/fsc.props index 9719cb4b..9a15225d 100644 --- a/fsc.props +++ b/fsc.props @@ -6,8 +6,8 @@ true true - - C:\Program Files (x86)\Microsoft SDKs\F#\4.1\Framework\v4.0 + + C:\Program Files (x86)\Microsoft SDKs\F#\10.1\Framework\v4.0 fsc.exe From 6a5e4cf9cf93139710927788a1c1d72d2cec57f1 Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Fri, 27 Apr 2018 07:12:39 +0300 Subject: [PATCH 05/41] NetStandard 2.0 build with Yaml and Ini TP support (ResX and AppSetting TPs excluded for now) --- .paket/Paket.Restore.targets | 4 +- build.fsx | 27 ++- paket.dependencies | 18 +- paket.lock | 228 +++++++++++++++++- .../AppSettingsProvider.fs | 6 +- .../ConfigTypeProvider.fs | 5 +- .../FSharp.Configuration.fsproj | 20 +- src/FSharp.Configuration/ResXProvider.fs | 6 +- src/FSharp.Configuration/paket.references | 9 +- .../AppSettingsProvider.Tests.fs | 5 +- .../FSharp.Configuration.Tests.fsproj | 32 +-- .../ResXProvider.Tests.fs | 4 + tests/FSharp.Configuration.Tests/app.config | 60 +++++ 13 files changed, 379 insertions(+), 45 deletions(-) diff --git a/.paket/Paket.Restore.targets b/.paket/Paket.Restore.targets index 44afec51..1a8920fc 100644 --- a/.paket/Paket.Restore.targets +++ b/.paket/Paket.Restore.targets @@ -48,8 +48,8 @@ - /usr/bin/shasum $(PaketRestoreCacheFile) | /usr/bin/awk '{ print $1 }' - /usr/bin/shasum $(PaketLockFilePath) | /usr/bin/awk '{ print $1 }' + /usr/bin/shasum "$(PaketRestoreCacheFile)" | /usr/bin/awk '{ print $1 }' + /usr/bin/shasum "$(PaketLockFilePath)" | /usr/bin/awk '{ print $1 }' diff --git a/build.fsx b/build.fsx index f0a561e9..3fc72a37 100644 --- a/build.fsx +++ b/build.fsx @@ -43,9 +43,6 @@ let tags = "appsettings, YAML, F#, ResX, Ini, config" // File system information let solutionFile = "FSharp.Configuration" -// Pattern specifying assemblies to be tested using NUnit -let testAssemblies = "tests/**/bin/Release/net461/*Tests*.exe" - // Git configuration (used for publishing documentation in gh-pages branch) // The profile where the project is posted let gitOwner = "fsprojects" @@ -126,6 +123,14 @@ Target "Build" (fun _ -> CopyDir "bin/lib/net45" "src/FSharp.Configuration/bin/Release/net45/" (fun _ -> true) + + let outDir = "../../bin/lib/netstandard2.0/" + CreateDir outDir + DotNetCli.Publish (fun p -> + { p with + Output = outDir + Framework = "netstandard2.0" + WorkingDir = "src/FSharp.Configuration/" }) ) Target "BuildTests" (fun _ -> @@ -142,10 +147,23 @@ Target "BuildTests" (fun _ -> open Fake.Testing Target "RunTests" (fun _ -> - !! testAssemblies + !! "tests/**/bin/Release/net461/*Tests*.exe" |> Expecto.Expecto (fun p -> { p with FailOnFocusedTests = true }) ) +Target "RunTestsNetCore" (fun _ -> + let outDir = "../../temp/" + CreateDir outDir + DotNetCli.Publish (fun p -> + { p with + Output = outDir + Framework = "netcoreapp2.0" + WorkingDir = "tests/FSharp.Configuration.Tests/" }) + + DotNetCli.RunCommand + (fun r -> { r with WorkingDir = "temp"}) + "FSharp.Configuration.Tests.dll" +) // -------------------------------------------------------------------------------------- // Build a NuGet package @@ -285,6 +303,7 @@ Target "All" DoNothing ==> "Build" ==> "BuildTests" ==> "RunTests" + ==> "RunTestsNetCore" =?> ("GenerateReferenceDocs",isLocalBuild && not isMono) =?> ("GenerateDocs",isLocalBuild && not isMono) ==> "All" diff --git a/paket.dependencies b/paket.dependencies index 2a1f7c0e..f9a728be 100644 --- a/paket.dependencies +++ b/paket.dependencies @@ -1,13 +1,24 @@ source http://nuget.org/api/v2 -framework: >= net45 +framework: netstandard2.0 +redirects: force nuget SharpYaml -nuget FSharp.Core ~> 4.0.0 +nuget FSharp.Core >= 4.3.2 lowest_matching:true + +nuget System.Runtime.Caching github fsprojects/FSharp.TypeProviders.SDK src/ProvidedTypes.fs github fsprojects/FSharp.TypeProviders.SDK src/ProvidedTypes.fsi github fsprojects/FSharp.TypeProviders.SDK src/ProvidedTypesTesting.fs +group Legacy + source https://api.nuget.org/v3/index.json + framework: net45 + redirects: force + + nuget SharpYaml + nuget FSharp.Core >= 4.0 lowest_matching:true + group Build framework: net45 source https://nuget.org/api/v2 @@ -21,8 +32,9 @@ group Build github fsharp/FAKE modules/Octokit/Octokit.fsx group Test - framework: net461 + framework: net461, netcoreapp2.0 source https://nuget.org/api/v2 + redirects: force nuget FSharp.Core redirects: force nuget Expecto \ No newline at end of file diff --git a/paket.lock b/paket.lock index 72f37b15..b320e3be 100644 --- a/paket.lock +++ b/paket.lock @@ -1,8 +1,16 @@ -RESTRICTION: >= net45 +REDIRECTS: FORCE +RESTRICTION: == netstandard2.0 NUGET remote: http://www.nuget.org/api/v2 - FSharp.Core (4.0.0.1) - SharpYaml (1.6.2) + FSharp.Core (4.3.2) + Microsoft.NETCore.Platforms (2.0.2) + NETStandard.Library (2.0.2) + Microsoft.NETCore.Platforms (>= 1.1) + SharpYaml (1.6.3) + NETStandard.Library (>= 1.6.1) + System.Reflection.TypeExtensions (>= 4.3) + System.Reflection.TypeExtensions (4.4) + System.Runtime.Caching (4.5.0-preview2-26406-04) GITHUB remote: fsprojects/FSharp.TypeProviders.SDK src/ProvidedTypes.fs (f0c4a6300db313eb2616c4f792cd6ae68c255e56) @@ -26,14 +34,224 @@ GITHUB remote: fsharp/FAKE modules/Octokit/Octokit.fsx (800579e69ce35b77345ee21923ddf117168067cd) Octokit (>= 0.20) +GROUP Legacy +REDIRECTS: FORCE +RESTRICTION: == net45 +NUGET + remote: https://api.nuget.org/v3/index.json + FSharp.Core (4.0.0.1) + SharpYaml (1.6.3) + GROUP Test -RESTRICTION: == net461 +REDIRECTS: FORCE +RESTRICTION: || (== net461) (== netcoreapp2.0) NUGET remote: https://www.nuget.org/api/v2 Argu (5.1) - FSharp.Core (>= 4.0.0.1) + FSharp.Core (>= 4.0.0.1) - restriction: || (== net461) (&& (== netcoreapp2.0) (>= net45)) + FSharp.Core (>= 4.3.2) - restriction: || (&& (== net461) (< net45) (>= netstandard2.0)) (== netcoreapp2.0) + System.Configuration.ConfigurationManager (>= 4.4) - restriction: || (&& (== net461) (< net45) (>= netstandard2.0)) (== netcoreapp2.0) Expecto (7.0.1) Argu (>= 5.1) Mono.Cecil (>= 0.10) + System.Diagnostics.FileVersionInfo (>= 4.3) - restriction: == netcoreapp2.0 FSharp.Core (4.3.4) - redirects: force + Microsoft.NETCore.Platforms (2.0.2) - restriction: == netcoreapp2.0 + Microsoft.NETCore.Targets (2.0) - restriction: == netcoreapp2.0 Mono.Cecil (0.10) + System.Collections (>= 4.0.11) - restriction: || (&& (== net461) (< net35)) (== netcoreapp2.0) + System.IO.FileSystem (>= 4.0.1) - restriction: || (&& (== net461) (< net35)) (== netcoreapp2.0) + System.IO.FileSystem.Primitives (>= 4.0.1) - restriction: || (&& (== net461) (< net35)) (== netcoreapp2.0) + System.Reflection (>= 4.1) - restriction: || (&& (== net461) (< net35)) (== netcoreapp2.0) + System.Runtime.Extensions (>= 4.1) - restriction: || (&& (== net461) (< net35)) (== netcoreapp2.0) + System.Security.Cryptography.Algorithms (>= 4.2) - restriction: || (&& (== net461) (< net35)) (== netcoreapp2.0) + System.Security.Cryptography.Csp (>= 4.0) - restriction: || (&& (== net461) (< net35)) (== netcoreapp2.0) + System.Threading (>= 4.0.11) - restriction: || (&& (== net461) (< net35)) (== netcoreapp2.0) + runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.2) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) + runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.2) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) + runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.2) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) + runtime.native.System.Security.Cryptography.Apple (4.3.1) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) + runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple (>= 4.3.1) + runtime.native.System.Security.Cryptography.OpenSsl (4.3.2) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) + runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.2) + runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.2) + runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.2) + runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.2) + runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.2) + runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.2) + runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.2) + runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.2) + runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.2) + runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.2) + runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.2) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) + runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.2) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) + runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple (4.3.1) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) + runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.2) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) + runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.2) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) + runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.2) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) + runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.2) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) + runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.2) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) + System.Collections (4.3) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) + Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) + Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) + System.Runtime (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) + System.Collections.Concurrent (4.3) - restriction: || (&& (== net461) (< net35) (>= net463)) (&& (== net461) (< net35) (< netstandard1.3)) (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) + System.Collections (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wpa81)) (== netcoreapp2.0) + System.Diagnostics.Debug (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wpa81)) (== netcoreapp2.0) + System.Diagnostics.Tracing (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wpa81)) (== netcoreapp2.0) + System.Globalization (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wpa81)) (== netcoreapp2.0) + System.Reflection (>= 4.3) - restriction: || (&& (== net461) (< net45)) (== netcoreapp2.0) + System.Resources.ResourceManager (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wpa81)) (== netcoreapp2.0) + System.Runtime (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wpa81)) (== netcoreapp2.0) + System.Runtime.Extensions (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wpa81)) (== netcoreapp2.0) + System.Threading (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wpa81)) (== netcoreapp2.0) + System.Threading.Tasks (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wpa81)) (== netcoreapp2.0) + System.Configuration.ConfigurationManager (4.4.1) - restriction: || (&& (== net461) (< net45) (>= netstandard2.0)) (== netcoreapp2.0) + System.Security.Cryptography.ProtectedData (>= 4.4) - restriction: || (&& (== net461) (>= netcoreapp2.0)) (== netcoreapp2.0) + System.Diagnostics.Debug (4.3) - restriction: || (&& (== net461) (< net35)) (== netcoreapp2.0) + Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) + Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) + System.Runtime (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) + System.Diagnostics.FileVersionInfo (4.3) - restriction: == netcoreapp2.0 + Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (== net461) (< net46)) (&& (== net461) (< netstandard1.3)) (== netcoreapp2.0) + System.Globalization (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) + System.IO (>= 4.3) - restriction: || (&& (== net461) (< net46)) (&& (== net461) (< netstandard1.3)) (== netcoreapp2.0) + System.IO.FileSystem (>= 4.3) - restriction: || (&& (== net461) (< net46)) (&& (== net461) (< netstandard1.3)) (== netcoreapp2.0) + System.IO.FileSystem.Primitives (>= 4.3) - restriction: || (&& (== net461) (< net46)) (&& (== net461) (< netstandard1.3)) (== netcoreapp2.0) + System.Reflection.Metadata (>= 1.4.1) - restriction: || (&& (== net461) (< net46)) (&& (== net461) (< netstandard1.3)) (== netcoreapp2.0) + System.Runtime (>= 4.3) - restriction: || (&& (== net461) (< net46)) (&& (== net461) (< netstandard1.3)) (== netcoreapp2.0) + System.Runtime.Extensions (>= 4.3) - restriction: || (&& (== net461) (< net46)) (&& (== net461) (< netstandard1.3)) (== netcoreapp2.0) + System.Runtime.InteropServices (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) + System.Diagnostics.Tracing (4.3) - restriction: || (&& (== net461) (< net35) (>= net463)) (&& (== net461) (< net35) (< netstandard1.3)) (&& (== net461) (< net35) (>= netstandard1.6)) (&& (== net461) (< net35) (< portable-net45+win8+wpa81)) (== netcoreapp2.0) + Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wpa81)) (== netcoreapp2.0) + Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wpa81)) (== netcoreapp2.0) + System.Runtime (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wpa81)) (== netcoreapp2.0) + System.Globalization (4.3) - restriction: == netcoreapp2.0 + Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) + Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) + System.Runtime (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) + System.IO (4.3) - restriction: == netcoreapp2.0 + Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) + Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) + System.Runtime (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) + System.Text.Encoding (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) + System.Threading.Tasks (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) + System.IO.FileSystem (4.3) - restriction: == netcoreapp2.0 + Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) + Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) + System.IO (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) + System.IO.FileSystem.Primitives (>= 4.3) + System.Runtime (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) + System.Runtime.Handles (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) + System.Text.Encoding (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) + System.Threading.Tasks (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) + System.IO.FileSystem.Primitives (4.3) - restriction: == netcoreapp2.0 + System.Runtime (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) + System.Linq (4.3) - restriction: || (&& (== net461) (< net35) (>= net463)) (&& (== net461) (< net35) (< netstandard1.3)) (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) + System.Collections (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) + System.Diagnostics.Debug (>= 4.3) - restriction: || (&& (== net461) (< net45) (>= netstandard1.6)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) + System.Resources.ResourceManager (>= 4.3) - restriction: || (&& (== net461) (< net45) (>= netstandard1.6)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) + System.Runtime (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) + System.Runtime.Extensions (>= 4.3) - restriction: || (&& (== net461) (< net45) (>= netstandard1.6)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) + System.Reflection (4.3) - restriction: == netcoreapp2.0 + Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) + Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) + System.IO (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) + System.Reflection.Primitives (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) + System.Runtime (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) + System.Reflection.Metadata (1.5) - restriction: == netcoreapp2.0 + System.Reflection.Primitives (4.3) - restriction: == netcoreapp2.0 + Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) + Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) + System.Runtime (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) + System.Resources.ResourceManager (4.3) - restriction: || (&& (== net461) (< net35) (< netstandard1.3)) (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) + Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) + Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) + System.Globalization (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) + System.Reflection (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) + System.Runtime (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) + System.Runtime (4.3) - restriction: == netcoreapp2.0 + Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) + Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) + System.Runtime.Extensions (4.3) - restriction: == netcoreapp2.0 + Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) + Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) + System.Runtime (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) + System.Runtime.Handles (4.3) - restriction: == netcoreapp2.0 + Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) + Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) + System.Runtime (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) + System.Runtime.InteropServices (4.3) - restriction: == netcoreapp2.0 + Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (>= netcoreapp1.1)) (&& (== net461) (< portable-net45+win8+wpa81)) (== netcoreapp2.0) + Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (>= netcoreapp1.1)) (&& (== net461) (< portable-net45+win8+wpa81)) (== netcoreapp2.0) + System.Reflection (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (>= netcoreapp1.1)) (&& (== net461) (< portable-net45+win8+wpa81)) (== netcoreapp2.0) + System.Reflection.Primitives (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (>= netcoreapp1.1)) (&& (== net461) (< portable-net45+win8+wpa81)) (== netcoreapp2.0) + System.Runtime (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (>= net462)) (&& (== net461) (>= netcoreapp1.1)) (&& (== net461) (< portable-net45+win8+wpa81)) (== netcoreapp2.0) + System.Runtime.Handles (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (>= netcoreapp1.1)) (&& (== net461) (< portable-net45+win8+wpa81)) (== netcoreapp2.0) + System.Runtime.Numerics (4.3) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) + System.Globalization (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wpa81)) (== netcoreapp2.0) + System.Resources.ResourceManager (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wpa81)) (== netcoreapp2.0) + System.Runtime (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wpa81)) (== netcoreapp2.0) + System.Runtime.Extensions (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wpa81)) (== netcoreapp2.0) + System.Security.Cryptography.Algorithms (4.3.1) - restriction: || (&& (== net461) (< net35)) (== netcoreapp2.0) + Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (== net461) (< net46) (>= netstandard1.6)) (&& (== net461) (< netstandard1.3)) (== netcoreapp2.0) + runtime.native.System.Security.Cryptography.Apple (>= 4.3.1) - restriction: || (&& (== net461) (< net46) (>= netstandard1.6)) (== netcoreapp2.0) + runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.2) - restriction: || (&& (== net461) (< net46) (>= netstandard1.6)) (== netcoreapp2.0) + System.Collections (>= 4.3) - restriction: || (&& (== net461) (< net46) (>= netstandard1.6)) (== netcoreapp2.0) + System.IO (>= 4.3) - restriction: || (&& (== net461) (< net46)) (&& (== net461) (>= net463)) (&& (== net461) (< netstandard1.3)) (== netcoreapp2.0) + System.Resources.ResourceManager (>= 4.3) - restriction: || (&& (== net461) (< net46) (>= netstandard1.6)) (&& (== net461) (< netstandard1.3)) (== netcoreapp2.0) + System.Runtime (>= 4.3) - restriction: || (&& (== net461) (< net46)) (&& (== net461) (>= net463)) (&& (== net461) (< netstandard1.3)) (== netcoreapp2.0) + System.Runtime.Extensions (>= 4.3) - restriction: || (&& (== net461) (< net46) (>= netstandard1.6)) (&& (== net461) (< netstandard1.3)) (== netcoreapp2.0) + System.Runtime.Handles (>= 4.3) - restriction: || (&& (== net461) (< net46) (>= netstandard1.6)) (&& (== net461) (< netstandard1.3)) (== netcoreapp2.0) + System.Runtime.InteropServices (>= 4.3) - restriction: || (&& (== net461) (< net46) (>= netstandard1.6)) (&& (== net461) (< netstandard1.3)) (== netcoreapp2.0) + System.Runtime.Numerics (>= 4.3) - restriction: || (&& (== net461) (< net46) (>= netstandard1.6)) (== netcoreapp2.0) + System.Security.Cryptography.Encoding (>= 4.3) - restriction: || (&& (== net461) (< net46) (>= netstandard1.6)) (&& (== net461) (>= net463)) (&& (== net461) (< netstandard1.3)) (== netcoreapp2.0) + System.Security.Cryptography.Primitives (>= 4.3) + System.Text.Encoding (>= 4.3) - restriction: || (&& (== net461) (< net46) (>= netstandard1.6)) (&& (== net461) (< netstandard1.3)) (== netcoreapp2.0) + System.Security.Cryptography.Csp (4.3) - restriction: || (&& (== net461) (< net35)) (== netcoreapp2.0) + Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) + System.IO (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) + System.Reflection (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) + System.Resources.ResourceManager (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) + System.Runtime (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) + System.Runtime.Extensions (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) + System.Runtime.Handles (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) + System.Runtime.InteropServices (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) + System.Security.Cryptography.Algorithms (>= 4.3) + System.Security.Cryptography.Encoding (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) + System.Security.Cryptography.Primitives (>= 4.3) + System.Text.Encoding (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) + System.Threading (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) + System.Security.Cryptography.Encoding (4.3) - restriction: || (&& (== net461) (< net35) (>= net463)) (&& (== net461) (< net35) (< netstandard1.3)) (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) + Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) + runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) + System.Collections (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) + System.Collections.Concurrent (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) + System.Linq (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) + System.Resources.ResourceManager (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) + System.Runtime (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) + System.Runtime.Extensions (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) + System.Runtime.Handles (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) + System.Runtime.InteropServices (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) + System.Security.Cryptography.Primitives (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) + System.Text.Encoding (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) + System.Security.Cryptography.Primitives (4.3) - restriction: || (&& (== net461) (< net35)) (== netcoreapp2.0) + System.Diagnostics.Debug (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) + System.Globalization (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) + System.IO (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) + System.Resources.ResourceManager (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) + System.Runtime (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) + System.Threading (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) + System.Threading.Tasks (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) + System.Security.Cryptography.ProtectedData (4.4) - restriction: || (&& (== net461) (< net45) (>= netstandard2.0)) (&& (== net461) (>= netcoreapp2.0)) (== netcoreapp2.0) + System.Text.Encoding (4.3) - restriction: == netcoreapp2.0 + Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) + Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) + System.Runtime (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) + System.Threading (4.3) - restriction: || (&& (== net461) (< net35)) (== netcoreapp2.0) + System.Runtime (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) + System.Threading.Tasks (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) + System.Threading.Tasks (4.3) - restriction: == netcoreapp2.0 + Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) + Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) + System.Runtime (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) diff --git a/src/FSharp.Configuration/AppSettingsProvider.fs b/src/FSharp.Configuration/AppSettingsProvider.fs index e5296743..473f2384 100644 --- a/src/FSharp.Configuration/AppSettingsProvider.fs +++ b/src/FSharp.Configuration/AppSettingsProvider.fs @@ -2,6 +2,8 @@ module FSharp.Configuration.AppSettingsTypeProvider #nowarn "57" +#if NET45 + open FSharp.Configuration.Helper open ProviderImplementation.ProvidedTypes open System @@ -164,4 +166,6 @@ let internal typedAppSettings (context: Context) = with _ -> typeDef | x -> failwithf "unexpected parameter values %A" x) cache.GetOrAdd (typeName, value))) - appSettings \ No newline at end of file + appSettings + +#endif diff --git a/src/FSharp.Configuration/ConfigTypeProvider.fs b/src/FSharp.Configuration/ConfigTypeProvider.fs index da91e8f9..501417c2 100644 --- a/src/FSharp.Configuration/ConfigTypeProvider.fs +++ b/src/FSharp.Configuration/ConfigTypeProvider.fs @@ -11,8 +11,11 @@ type FSharpConfigurationProvider(cfg: TypeProviderConfig) as this = let context = new Context(this, cfg) do this.AddNamespace ( rootNamespace, - [ AppSettingsTypeProvider.typedAppSettings context + [ +#if NET45 + AppSettingsTypeProvider.typedAppSettings context ResXProvider.typedResources context +#endif YamlConfigTypeProvider.typedYamlConfig context IniFileProvider.typedIniFile context ]) do this.Disposing.Add (fun _ -> dispose context) diff --git a/src/FSharp.Configuration/FSharp.Configuration.fsproj b/src/FSharp.Configuration/FSharp.Configuration.fsproj index 53c02a70..54510b8d 100644 --- a/src/FSharp.Configuration/FSharp.Configuration.fsproj +++ b/src/FSharp.Configuration/FSharp.Configuration.fsproj @@ -2,12 +2,13 @@ - net45 - true - - + netstandard2.0; net45 FSharp.Configuration false + true + + + NET45 @@ -32,13 +33,10 @@ - - - - - - - + + + + \ No newline at end of file diff --git a/src/FSharp.Configuration/ResXProvider.fs b/src/FSharp.Configuration/ResXProvider.fs index 6fff7f30..07a5370f 100644 --- a/src/FSharp.Configuration/ResXProvider.fs +++ b/src/FSharp.Configuration/ResXProvider.fs @@ -1,5 +1,7 @@ module FSharp.Configuration.ResXProvider +#if NET45 + open System open System.IO open System.Reflection @@ -73,4 +75,6 @@ let internal typedResources (context: Context) = providedType | _ -> failwith "unexpected parameter values") cache.GetOrAdd (typeName, value))) - resXType \ No newline at end of file + resXType + +#endif diff --git a/src/FSharp.Configuration/paket.references b/src/FSharp.Configuration/paket.references index 9eb4f66e..f8778c9a 100644 --- a/src/FSharp.Configuration/paket.references +++ b/src/FSharp.Configuration/paket.references @@ -1,5 +1,12 @@ SharpYaml FSharp.Core + +System.Runtime.Caching + File: ProvidedTypes.fsi . File: ProvidedTypes.fs . -File: ProvidedTypesTesting.fs . \ No newline at end of file +File: ProvidedTypesTesting.fs . + +group Legacy + FSharp.Core + SharpYaml \ No newline at end of file diff --git a/tests/FSharp.Configuration.Tests/AppSettingsProvider.Tests.fs b/tests/FSharp.Configuration.Tests/AppSettingsProvider.Tests.fs index d633f3ee..24c9d8b5 100644 --- a/tests/FSharp.Configuration.Tests/AppSettingsProvider.Tests.fs +++ b/tests/FSharp.Configuration.Tests/AppSettingsProvider.Tests.fs @@ -4,6 +4,8 @@ open System open FSharp.Configuration open Expecto +#if NET461 + type Settings = AppSettings<"app.config"> let [] tests = @@ -37,4 +39,5 @@ let [] test = FakeSettings.ServerName =! "localhost" #endif ) - \ No newline at end of file + +#endif diff --git a/tests/FSharp.Configuration.Tests/FSharp.Configuration.Tests.fsproj b/tests/FSharp.Configuration.Tests/FSharp.Configuration.Tests.fsproj index 232b2fc1..2529d4b9 100644 --- a/tests/FSharp.Configuration.Tests/FSharp.Configuration.Tests.fsproj +++ b/tests/FSharp.Configuration.Tests/FSharp.Configuration.Tests.fsproj @@ -4,13 +4,12 @@ Exe - net461 + netcoreapp2.0; net461 + FSharp.Configuration.Tests true - - FSharp.Configuration.Tests - - + + NET461 @@ -33,18 +32,21 @@ - - + + ..\..\bin\lib\net45\FSharp.Configuration.dll - - - - - - + + ..\..\bin\lib\net45\SharpYaml.dll + + + + + ..\..\bin\lib\netstandard2.0\FSharp.Configuration.dll + + + ..\..\bin\lib\netstandard2.0\SharpYaml.dll + \ No newline at end of file diff --git a/tests/FSharp.Configuration.Tests/ResXProvider.Tests.fs b/tests/FSharp.Configuration.Tests/ResXProvider.Tests.fs index aafb5f7b..1c6c115f 100644 --- a/tests/FSharp.Configuration.Tests/ResXProvider.Tests.fs +++ b/tests/FSharp.Configuration.Tests/ResXProvider.Tests.fs @@ -3,6 +3,8 @@ module FSharp.Configuration.Tests.ResXTests open FSharp.Configuration open Expecto +#if NET461 + type Resource1 = ResXProvider<"Resource1.resx"> let [] tests = @@ -20,3 +22,5 @@ let [] tests = testCase "Can return a text file from the resource file" (fun _ -> Expect.equal Resource1.TextFile "Text" "value") ] + +#endif diff --git a/tests/FSharp.Configuration.Tests/app.config b/tests/FSharp.Configuration.Tests/app.config index 035347c1..614937c0 100644 --- a/tests/FSharp.Configuration.Tests/app.config +++ b/tests/FSharp.Configuration.Tests/app.config @@ -62,6 +62,66 @@ + + True + + + + + True + + + + + True + + + + + True + + + + + True + + + + + True + + + + + True + + + + + True + + + + + True + + + + + True + + + + + True + + + + + True + + + From 3850c2477aced6ff2dca95eea2340e8095a2f467 Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Fri, 27 Apr 2018 07:22:50 +0300 Subject: [PATCH 06/41] Refs fix --- .../FSharp.Configuration.Tests.fsproj | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/FSharp.Configuration.Tests/FSharp.Configuration.Tests.fsproj b/tests/FSharp.Configuration.Tests/FSharp.Configuration.Tests.fsproj index 2529d4b9..a9a795f9 100644 --- a/tests/FSharp.Configuration.Tests/FSharp.Configuration.Tests.fsproj +++ b/tests/FSharp.Configuration.Tests/FSharp.Configuration.Tests.fsproj @@ -47,6 +47,9 @@ ..\..\bin\lib\netstandard2.0\SharpYaml.dll + + ..\..\bin\lib\netstandard2.0\System.Reflection.TypeExtensions.dll + \ No newline at end of file From cfa509e243a4a2b2f5a03666a53e82eefba9300f Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Fri, 27 Apr 2018 07:28:43 +0300 Subject: [PATCH 07/41] Refs fix --- .../FSharp.Configuration.Tests.fsproj | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/FSharp.Configuration.Tests/FSharp.Configuration.Tests.fsproj b/tests/FSharp.Configuration.Tests/FSharp.Configuration.Tests.fsproj index a9a795f9..212ae52a 100644 --- a/tests/FSharp.Configuration.Tests/FSharp.Configuration.Tests.fsproj +++ b/tests/FSharp.Configuration.Tests/FSharp.Configuration.Tests.fsproj @@ -50,6 +50,9 @@ ..\..\bin\lib\netstandard2.0\System.Reflection.TypeExtensions.dll + + ..\..\bin\lib\netstandard2.0\System.Runtime.Caching.dll + \ No newline at end of file From aa298cf59a88cb81fccf434208176919604ccf02 Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Fri, 27 Apr 2018 08:21:05 +0300 Subject: [PATCH 08/41] simpler build script --- build.fsx | 30 +++++++------------ .../FSharp.Configuration.Tests.fsproj | 11 ++++--- 2 files changed, 15 insertions(+), 26 deletions(-) diff --git a/build.fsx b/build.fsx index 3fc72a37..02e79deb 100644 --- a/build.fsx +++ b/build.fsx @@ -114,17 +114,15 @@ Target "InstallDotNetCore" (fun _ -> ) Target "Build" (fun _ -> - DotNetCli.Build (fun c -> - { c with - Project = "FSharp.Configuration.sln" - Configuration = "Release" - ToolPath = dotnetExePath }) - - CopyDir "bin/lib/net45" - "src/FSharp.Configuration/bin/Release/net45/" - (fun _ -> true) + let outDir = __SOURCE_DIRECTORY__ + "/bin/lib/net45/" + CreateDir outDir + DotNetCli.Publish (fun p -> + { p with + Output = outDir + Framework = "net45" + WorkingDir = "src/FSharp.Configuration/" }) - let outDir = "../../bin/lib/netstandard2.0/" + let outDir = __SOURCE_DIRECTORY__ + "/bin/lib/netstandard2.0/" CreateDir outDir DotNetCli.Publish (fun p -> { p with @@ -152,17 +150,9 @@ Target "RunTests" (fun _ -> ) Target "RunTestsNetCore" (fun _ -> - let outDir = "../../temp/" - CreateDir outDir - DotNetCli.Publish (fun p -> - { p with - Output = outDir - Framework = "netcoreapp2.0" - WorkingDir = "tests/FSharp.Configuration.Tests/" }) - DotNetCli.RunCommand - (fun r -> { r with WorkingDir = "temp"}) - "FSharp.Configuration.Tests.dll" + (fun r -> { r with WorkingDir = "tests/FSharp.Configuration.Tests/" }) + "run --framework netcoreapp2.0" ) // -------------------------------------------------------------------------------------- diff --git a/tests/FSharp.Configuration.Tests/FSharp.Configuration.Tests.fsproj b/tests/FSharp.Configuration.Tests/FSharp.Configuration.Tests.fsproj index 212ae52a..2028c87f 100644 --- a/tests/FSharp.Configuration.Tests/FSharp.Configuration.Tests.fsproj +++ b/tests/FSharp.Configuration.Tests/FSharp.Configuration.Tests.fsproj @@ -21,7 +21,6 @@ Always - @@ -36,21 +35,21 @@ ..\..\bin\lib\net45\FSharp.Configuration.dll - + ..\..\bin\lib\net45\SharpYaml.dll - + ..\..\bin\lib\netstandard2.0\FSharp.Configuration.dll - + ..\..\bin\lib\netstandard2.0\SharpYaml.dll - + ..\..\bin\lib\netstandard2.0\System.Reflection.TypeExtensions.dll - + ..\..\bin\lib\netstandard2.0\System.Runtime.Caching.dll From 51ed8315541d9ca412b961f2d4ce1d2b0e3b88be Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Fri, 27 Apr 2018 17:36:29 +0300 Subject: [PATCH 09/41] Migration to YamlDotNet (instead of SharpYaml) --- paket.dependencies | 6 ++-- paket.lock | 10 ++---- .../TypeProviders.Helper.fs | 1 + .../YamlConfigProvider.fs | 34 +++++++++++++++---- src/FSharp.Configuration/paket.references | 4 +-- .../FSharp.Configuration.Tests.fsproj | 16 +++------ .../FSharp.Configuration.Tests/Settings2.yaml | 4 +-- 7 files changed, 42 insertions(+), 33 deletions(-) diff --git a/paket.dependencies b/paket.dependencies index f9a728be..cce02c9f 100644 --- a/paket.dependencies +++ b/paket.dependencies @@ -2,8 +2,8 @@ source http://nuget.org/api/v2 framework: netstandard2.0 redirects: force -nuget SharpYaml -nuget FSharp.Core >= 4.3.2 lowest_matching:true +nuget YamlDotNet +nuget FSharp.Core >= 4.3.2 nuget System.Runtime.Caching @@ -16,7 +16,7 @@ group Legacy framework: net45 redirects: force - nuget SharpYaml + nuget YamlDotNet nuget FSharp.Core >= 4.0 lowest_matching:true group Build diff --git a/paket.lock b/paket.lock index b320e3be..c7762fdf 100644 --- a/paket.lock +++ b/paket.lock @@ -3,14 +3,8 @@ RESTRICTION: == netstandard2.0 NUGET remote: http://www.nuget.org/api/v2 FSharp.Core (4.3.2) - Microsoft.NETCore.Platforms (2.0.2) - NETStandard.Library (2.0.2) - Microsoft.NETCore.Platforms (>= 1.1) - SharpYaml (1.6.3) - NETStandard.Library (>= 1.6.1) - System.Reflection.TypeExtensions (>= 4.3) - System.Reflection.TypeExtensions (4.4) System.Runtime.Caching (4.5.0-preview2-26406-04) + YamlDotNet (4.3.1) GITHUB remote: fsprojects/FSharp.TypeProviders.SDK src/ProvidedTypes.fs (f0c4a6300db313eb2616c4f792cd6ae68c255e56) @@ -40,7 +34,7 @@ RESTRICTION: == net45 NUGET remote: https://api.nuget.org/v3/index.json FSharp.Core (4.0.0.1) - SharpYaml (1.6.3) + YamlDotNet (4.3.1) GROUP Test REDIRECTS: FORCE diff --git a/src/FSharp.Configuration/TypeProviders.Helper.fs b/src/FSharp.Configuration/TypeProviders.Helper.fs index 48107cb2..b456f928 100644 --- a/src/FSharp.Configuration/TypeProviders.Helper.fs +++ b/src/FSharp.Configuration/TypeProviders.Helper.fs @@ -118,6 +118,7 @@ module ValueParser = let (|Bool|_|) = tryParseWith Boolean.TryParse let (|Int|_|) = tryParseWith Int32.TryParse + let (|Int64|_|) = tryParseWith Int64.TryParse let (|Float|_|) = tryParseWith (fun x -> Double.TryParse(x, NumberStyles.Any, CultureInfo.InvariantCulture)) let (|TimeSpan|_|) = tryParseWith (fun x -> TimeSpan.TryParse(x, CultureInfo.InvariantCulture)) let (|Guid|_|) = tryParseWith Guid.TryParse diff --git a/src/FSharp.Configuration/YamlConfigProvider.fs b/src/FSharp.Configuration/YamlConfigProvider.fs index 32592858..2216a586 100644 --- a/src/FSharp.Configuration/YamlConfigProvider.fs +++ b/src/FSharp.Configuration/YamlConfigProvider.fs @@ -11,8 +11,7 @@ open System.Runtime.Caching open Microsoft.FSharp.Quotations -open SharpYaml.Serialization -open SharpYaml.Serialization.Serializers +open YamlDotNet.Serialization open FSharp.Configuration.Helper open ProviderImplementation.ProvidedTypes @@ -33,6 +32,10 @@ module private Parser = | Guid of Guid static member ParseStr = function + | ValueParser.Bool x -> Bool x + | ValueParser.Int x -> Int x + | ValueParser.Int64 x -> Int64 x + | ValueParser.Float x -> Float x | ValueParser.TimeSpan x -> TimeSpan x | ValueParser.Uri x -> Uri x | ValueParser.Guid x -> Guid x @@ -87,12 +90,13 @@ module private Parser = |> Map | scalar -> Scalar (Scalar.FromObj inferTypesFromStrings scalar) - let settings = SerializerSettings (EmitDefaultValues = true, EmitTags = false, SortKeyForMapping = false) - let serializer = Serializer(settings) + //let settings = SerializerSettings (EmitDefaultValues = true, EmitTags = false, SortKeyForMapping = false) + let deserializer = DeserializerBuilder().Build() fun text -> - try serializer.Deserialize(fromText=text) |> loop + try + deserializer.Deserialize(text) |> loop with - | :? SharpYaml.YamlException as e when e.InnerException <> null -> + | :? YamlDotNet.Core.YamlException as e when e.InnerException <> null -> raise e.InnerException // inner exceptions are much more informative | _ -> reraise() @@ -422,6 +426,7 @@ module private TypesFactory = type Root (inferTypesFromStrings: bool) = let serializer = + (** let settings = SerializerSettings(EmitDefaultValues = true, EmitTags = false, SortKeyForMapping = false, EmitAlias = false, ComparerForKeySorting = null) settings.RegisterSerializer ( @@ -447,7 +452,22 @@ type Root (inferTypesFromStrings: bool) = match ctx.Instance with | :? Guid as guid -> guid.ToString("D") | _ -> "" }) - Serializer settings + Serializer settings *) + SerializerBuilder() + .WithTypeConverter( + { new IYamlTypeConverter with + member __.Accepts ty = + ty = typeof + member __.ReadYaml(parser, ty) = + failwith "Not implemented" + member __.WriteYaml(emitter:YamlDotNet.Core.IEmitter, value, ty) = + match value with + | :? TimeSpan as ts -> + let formattedValue = ts.ToString("G") + emitter.Emit(YamlDotNet.Core.Events.Scalar(null, formattedValue)); + | _ -> failwithf "Expected TimeSpan but received %A" value + }) + .Build() let mutable lastLoadedFrom = None diff --git a/src/FSharp.Configuration/paket.references b/src/FSharp.Configuration/paket.references index f8778c9a..5f575a74 100644 --- a/src/FSharp.Configuration/paket.references +++ b/src/FSharp.Configuration/paket.references @@ -1,4 +1,4 @@ -SharpYaml +YamlDotNet FSharp.Core System.Runtime.Caching @@ -9,4 +9,4 @@ File: ProvidedTypesTesting.fs . group Legacy FSharp.Core - SharpYaml \ No newline at end of file + YamlDotNet \ No newline at end of file diff --git a/tests/FSharp.Configuration.Tests/FSharp.Configuration.Tests.fsproj b/tests/FSharp.Configuration.Tests/FSharp.Configuration.Tests.fsproj index 2028c87f..53f27429 100644 --- a/tests/FSharp.Configuration.Tests/FSharp.Configuration.Tests.fsproj +++ b/tests/FSharp.Configuration.Tests/FSharp.Configuration.Tests.fsproj @@ -32,25 +32,19 @@ - + ..\..\bin\lib\net45\FSharp.Configuration.dll - - ..\..\bin\lib\net45\SharpYaml.dll + + ..\..\bin\lib\net45\YamlDotNet.dll ..\..\bin\lib\netstandard2.0\FSharp.Configuration.dll - - ..\..\bin\lib\netstandard2.0\SharpYaml.dll - - - ..\..\bin\lib\netstandard2.0\System.Reflection.TypeExtensions.dll - - - ..\..\bin\lib\netstandard2.0\System.Runtime.Caching.dll + + ..\..\bin\lib\netstandard2.0\YamlDotNet.dll diff --git a/tests/FSharp.Configuration.Tests/Settings2.yaml b/tests/FSharp.Configuration.Tests/Settings2.yaml index 33b63ba2..1cb022b2 100644 --- a/tests/FSharp.Configuration.Tests/Settings2.yaml +++ b/tests/FSharp.Configuration.Tests/Settings2.yaml @@ -11,8 +11,8 @@ Password: pass2 CheckPeriod: 0:00:01:00.0000000 ErrorNotificationRecipients: - - user1@sample.com - - user2@sample.com + - user1@sample.com + - user2@sample.com DB: ConnectionString: Data Source=server1;Initial Catalog=Database1;Integrated Security=SSPI; NumberOfDeadlockRepeats: 11 From c530faae15f279b73b9410954fb1eb501d3c14ae Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Fri, 27 Apr 2018 21:56:05 +0300 Subject: [PATCH 10/41] paket.template with new NuGet package layout --- FSharp.Configuration.nuspec | 27 --------------- RELEASE_NOTES.md | 6 ++++ build.fsx | 24 ++----------- paket.dependencies | 1 - paket.lock | 3 +- paket.template | 43 ++++++++++++++++++++++++ src/FSharp.Configuration/AssemblyInfo.fs | 8 ++--- 7 files changed, 57 insertions(+), 55 deletions(-) delete mode 100644 FSharp.Configuration.nuspec create mode 100644 paket.template diff --git a/FSharp.Configuration.nuspec b/FSharp.Configuration.nuspec deleted file mode 100644 index eed6ed15..00000000 --- a/FSharp.Configuration.nuspec +++ /dev/null @@ -1,27 +0,0 @@ - - - - @project@ - @build.number@ - @authors@ - @authors@ - http://github.com/fsprojects/FSharp.Configuration/blob/master/LICENSE.txt - http://fsprojects.github.com/FSharp.Configuration - https://raw.githubusercontent.com/fsprojects/FSharp.Configuration/master/docs/files/img/logo.png - false - @summary@ - @description@ - @releaseNotes@ - Copyright 2014-2018 - @tags@ - - - - - - - - - - - diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 21e208fe..ad9a3b11 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,3 +1,9 @@ +#### 2.0.0-alpha1 - 27.04.2018 +* Migrtion to project system +* YamlConfigTypeProvider targets net45 and netstandard2.0 +* Migration from SharpYaml to YamlDotNet +* IniFileProvider targets net45 and netstandard2.0 + #### 1.4.0 - 23.02.2018 * Migration to latest TPSDK diff --git a/build.fsx b/build.fsx index 02e79deb..e23735e4 100644 --- a/build.fsx +++ b/build.fsx @@ -159,29 +159,11 @@ Target "RunTestsNetCore" (fun _ -> // Build a NuGet package Target "NuGet" (fun _ -> - let nugetDocsDir = nugetDir @@ "docs" - let nugetlibDir = nugetDir @@ "lib/net45" - - CleanDir nugetDocsDir - CleanDir nugetlibDir - - CopyDir nugetlibDir "bin/lib/net45" (fun file -> file.Contains "FSharp.Core." |> not) - CopyDir nugetDocsDir "./docs/output" allFiles - - NuGet (fun p -> + Paket.Pack(fun p -> { p with - Authors = authors - Project = project - Summary = summary - Description = description + OutputPath = "bin" Version = release.NugetVersion - ReleaseNotes = release.Notes |> toLines - Tags = tags - OutputPath = nugetDir - //AccessKey = getBuildParamOrDefault "nugetkey" "" - //Publish = hasBuildParam "nugetkey" - Dependencies = [] }) - (project + ".nuspec") + ReleaseNotes = toLines release.Notes}) ) // -------------------------------------------------------------------------------------- diff --git a/paket.dependencies b/paket.dependencies index cce02c9f..7b00cca7 100644 --- a/paket.dependencies +++ b/paket.dependencies @@ -26,7 +26,6 @@ group Build nuget FAKE nuget FSharp.Formatting nuget Octokit - nuget NuGet.CommandLine nuget SourceLink.Fake github fsharp/FAKE modules/Octokit/Octokit.fsx diff --git a/paket.lock b/paket.lock index c7762fdf..961313dc 100644 --- a/paket.lock +++ b/paket.lock @@ -21,12 +21,11 @@ NUGET FSharpVSPowerTools.Core (>= 2.3 < 2.4) FSharpVSPowerTools.Core (2.3) FSharp.Compiler.Service (>= 2.0.0.3) - NuGet.CommandLine (4.6.2) Octokit (0.29) SourceLink.Fake (1.1) GITHUB remote: fsharp/FAKE - modules/Octokit/Octokit.fsx (800579e69ce35b77345ee21923ddf117168067cd) + modules/Octokit/Octokit.fsx (7f99a9c4350b6b15a044254977c882574cd72b61) Octokit (>= 0.20) GROUP Legacy REDIRECTS: FORCE diff --git a/paket.template b/paket.template new file mode 100644 index 00000000..24e262f5 --- /dev/null +++ b/paket.template @@ -0,0 +1,43 @@ +type file +id FSharp.Configuration +title + FSharp.Configuration +owners + Steffen Forkmann; Sergey Tihon; Daniel Mohl; Tomas Petricek; Ryan Riley; Mauricio Scheffer; Phil Trelford; Vasily Kirichenko; Reed Copsey, Jr. +authors + Steffen Forkmann; Sergey Tihon; Daniel Mohl; Tomas Petricek; Ryan Riley; Mauricio Scheffer; Phil Trelford; Vasily Kirichenko; Reed Copsey, Jr. +projectUrl + http://fsprojects.github.com/FSharp.Configuration +iconUrl + https://raw.githubusercontent.com/fsprojects/FSharp.Configuration/master/docs/files/img/logo.png +licenseUrl + http://github.com/fsprojects/FSharp.Configuration/blob/master/LICENSE.txt +requireLicenseAcceptance + false +copyright + Copyright 2014-2018 +tags + appsettings YAML F# ResX Ini config +summary + The FSharp.Configuration project contains type providers for the configuration of .NET projects. +description + The FSharp.Configuration project contains type providers for the configuration of .NET projects. +files + bin/lib/net45/FSharp.Configuration.dll ==> lib/net45 + bin/lib/net45/YamlDotNet.dll ==> lib/net45 + bin/lib/netstandard2.0/FSharp.Configuration.dll ==> lib/netstandard2.0 + bin/lib/netstandard2.0/YamlDotNet.dll ==> lib/netstandard2.0 + bin/lib/netstandard2.0/System.Runtime.Caching.dll ==> lib/netstandard2.0 + docs/output/*.* => docs + docs/output/content/*.* => docs/content + docs/output/content/img/*.* => docs/content/img + docs/output/img/*.* => docs/img + docs/output/reference/*.* => docs/reference +dependencies + framework: netstandard20 + FSharp.Core >= LOCKEDVERSION + framework: net45 + FSharp.Core >= LOCKEDVERSION-Legacy +references + FSharp.Configuration.dll + YamlDotNet.dll \ No newline at end of file diff --git a/src/FSharp.Configuration/AssemblyInfo.fs b/src/FSharp.Configuration/AssemblyInfo.fs index 80afaab6..3ba8b533 100644 --- a/src/FSharp.Configuration/AssemblyInfo.fs +++ b/src/FSharp.Configuration/AssemblyInfo.fs @@ -5,13 +5,13 @@ open System.Reflection [] [] [] -[] -[] +[] +[] do () module internal AssemblyVersionInformation = let [] AssemblyTitle = "FSharp.Configuration" let [] AssemblyProduct = "FSharp.Configuration" let [] AssemblyDescription = "The FSharp.Configuration project contains type providers for the configuration of .NET projects." - let [] AssemblyVersion = "1.4.0" - let [] AssemblyFileVersion = "1.4.0" + let [] AssemblyVersion = "2.0.0" + let [] AssemblyFileVersion = "2.0.0" From 6816d49c87f83efcb60cc6b66d0231e024261178 Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Wed, 2 May 2018 22:25:43 +0300 Subject: [PATCH 11/41] netstandard20 version of AppSettingsProvider --- RELEASE_NOTES.md | 3 +++ paket.dependencies | 1 + paket.lock | 3 +++ paket.template | 2 ++ src/FSharp.Configuration/AppSettingsProvider.fs | 9 ++++++--- src/FSharp.Configuration/ConfigTypeProvider.fs | 2 +- src/FSharp.Configuration/paket.references | 1 + .../AppSettingsProvider.Tests.fs | 4 ---- 8 files changed, 17 insertions(+), 8 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index ad9a3b11..dc3efb10 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,3 +1,6 @@ +#### 2.0.0-alpha2 - 02.05.2018 +* AppSettingsProvider targets net45 and netstandard2.0 + #### 2.0.0-alpha1 - 27.04.2018 * Migrtion to project system * YamlConfigTypeProvider targets net45 and netstandard2.0 diff --git a/paket.dependencies b/paket.dependencies index 7b00cca7..9ef8372a 100644 --- a/paket.dependencies +++ b/paket.dependencies @@ -6,6 +6,7 @@ nuget YamlDotNet nuget FSharp.Core >= 4.3.2 nuget System.Runtime.Caching +nuget System.Configuration.ConfigurationManager github fsprojects/FSharp.TypeProviders.SDK src/ProvidedTypes.fs github fsprojects/FSharp.TypeProviders.SDK src/ProvidedTypes.fsi diff --git a/paket.lock b/paket.lock index 961313dc..3582e21f 100644 --- a/paket.lock +++ b/paket.lock @@ -3,7 +3,10 @@ RESTRICTION: == netstandard2.0 NUGET remote: http://www.nuget.org/api/v2 FSharp.Core (4.3.2) + System.Configuration.ConfigurationManager (4.4.1) + System.Security.Cryptography.ProtectedData (>= 4.4) System.Runtime.Caching (4.5.0-preview2-26406-04) + System.Security.Cryptography.ProtectedData (4.4) YamlDotNet (4.3.1) GITHUB remote: fsprojects/FSharp.TypeProviders.SDK diff --git a/paket.template b/paket.template index 24e262f5..c4e40d16 100644 --- a/paket.template +++ b/paket.template @@ -28,6 +28,8 @@ files bin/lib/netstandard2.0/FSharp.Configuration.dll ==> lib/netstandard2.0 bin/lib/netstandard2.0/YamlDotNet.dll ==> lib/netstandard2.0 bin/lib/netstandard2.0/System.Runtime.Caching.dll ==> lib/netstandard2.0 + bin/lib/netstandard2.0/System.Configuration.ConfigurationManager.dll ==> lib/netstandard2.0 + bin/lib/netstandard2.0/System.Security.Cryptography.ProtectedData.dll ==> lib/netstandard2.0 docs/output/*.* => docs docs/output/content/*.* => docs/content docs/output/content/img/*.* => docs/content/img diff --git a/src/FSharp.Configuration/AppSettingsProvider.fs b/src/FSharp.Configuration/AppSettingsProvider.fs index 473f2384..34ec0c48 100644 --- a/src/FSharp.Configuration/AppSettingsProvider.fs +++ b/src/FSharp.Configuration/AppSettingsProvider.fs @@ -2,15 +2,15 @@ module FSharp.Configuration.AppSettingsTypeProvider #nowarn "57" -#if NET45 - open FSharp.Configuration.Helper open ProviderImplementation.ProvidedTypes open System open System.Configuration open System.Collections.Generic open System.Globalization +#if NET45 open System.Web.Hosting +#endif open System.Runtime.Caching let mutable private exePath = Map.empty @@ -21,9 +21,13 @@ let getConfig file = if path.ContainsKey(file) && System.IO.File.Exists(path.[file]) then ConfigurationManager.OpenExeConfiguration path.[file] else +#if NET45 if HostingEnvironment.IsHosted then Web.Configuration.WebConfigurationManager.OpenWebConfiguration "~" else ConfigurationManager.OpenExeConfiguration ConfigurationUserLevel.None +#else + ConfigurationManager.OpenExeConfiguration ConfigurationUserLevel.None +#endif let getConfigValue(file,key) = let conf = getConfig file @@ -168,4 +172,3 @@ let internal typedAppSettings (context: Context) = cache.GetOrAdd (typeName, value))) appSettings -#endif diff --git a/src/FSharp.Configuration/ConfigTypeProvider.fs b/src/FSharp.Configuration/ConfigTypeProvider.fs index 501417c2..838c1703 100644 --- a/src/FSharp.Configuration/ConfigTypeProvider.fs +++ b/src/FSharp.Configuration/ConfigTypeProvider.fs @@ -13,9 +13,9 @@ type FSharpConfigurationProvider(cfg: TypeProviderConfig) as this = rootNamespace, [ #if NET45 - AppSettingsTypeProvider.typedAppSettings context ResXProvider.typedResources context #endif + AppSettingsTypeProvider.typedAppSettings context YamlConfigTypeProvider.typedYamlConfig context IniFileProvider.typedIniFile context ]) do this.Disposing.Add (fun _ -> dispose context) diff --git a/src/FSharp.Configuration/paket.references b/src/FSharp.Configuration/paket.references index 5f575a74..9abf3324 100644 --- a/src/FSharp.Configuration/paket.references +++ b/src/FSharp.Configuration/paket.references @@ -2,6 +2,7 @@ YamlDotNet FSharp.Core System.Runtime.Caching +System.Configuration.ConfigurationManager File: ProvidedTypes.fsi . File: ProvidedTypes.fs . diff --git a/tests/FSharp.Configuration.Tests/AppSettingsProvider.Tests.fs b/tests/FSharp.Configuration.Tests/AppSettingsProvider.Tests.fs index 24c9d8b5..edd0fa98 100644 --- a/tests/FSharp.Configuration.Tests/AppSettingsProvider.Tests.fs +++ b/tests/FSharp.Configuration.Tests/AppSettingsProvider.Tests.fs @@ -4,8 +4,6 @@ open System open FSharp.Configuration open Expecto -#if NET461 - type Settings = AppSettings<"app.config"> let [] tests = @@ -39,5 +37,3 @@ let [] test = FakeSettings.ServerName =! "localhost" #endif ) - -#endif From 0b6cbf5379006dd6c56349cf24ec50e3e8a684b0 Mon Sep 17 00:00:00 2001 From: Chet Husk Date: Sun, 20 May 2018 12:22:28 -0500 Subject: [PATCH 12/41] Update RELEASE_NOTES.md --- RELEASE_NOTES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index dc3efb10..44ae5a1a 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -2,7 +2,7 @@ * AppSettingsProvider targets net45 and netstandard2.0 #### 2.0.0-alpha1 - 27.04.2018 -* Migrtion to project system +* Migration to project system * YamlConfigTypeProvider targets net45 and netstandard2.0 * Migration from SharpYaml to YamlDotNet * IniFileProvider targets net45 and netstandard2.0 From eb33b81fcadf98fdf620169a0148fa7e93164a10 Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Sun, 27 May 2018 10:57:10 +0300 Subject: [PATCH 13/41] TP SDK and deps update --- .paket/Paket.Restore.targets | 37 +++++++++++++++++++++++++++--------- build.fsx | 2 +- paket.lock | 14 +++++++------- 3 files changed, 36 insertions(+), 17 deletions(-) diff --git a/.paket/Paket.Restore.targets b/.paket/Paket.Restore.targets index 1a8920fc..55292f31 100644 --- a/.paket/Paket.Restore.targets +++ b/.paket/Paket.Restore.targets @@ -43,7 +43,7 @@ true - $(NoWarn);NU1603 + $(NoWarn);NU1603;NU1604;NU1605;NU1608 @@ -60,6 +60,9 @@ + + + $([System.IO.File]::ReadAllText('$(PaketRestoreCacheFile)')) @@ -69,11 +72,19 @@ true + + + + + + + + $(MSBuildProjectDirectory)\obj\$(MSBuildProjectFile).paket.references.cached @@ -82,7 +93,9 @@ $(MSBuildProjectDirectory)\$(MSBuildProjectName).paket.references $(MSBuildProjectDirectory)\paket.references - $(MSBuildProjectDirectory)\obj\$(MSBuildProjectFile).$(TargetFramework).paket.resolved + + false + true true references-file-or-cache-not-found @@ -101,24 +114,29 @@ - + true - target-framework '$(TargetFramework)' + target-framework '$(TargetFramework)' or '$(TargetFrameworks)' files @(PaketResolvedFilePaths) - + + - + + false + true + + - + - + $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[0]) $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[1]) @@ -126,8 +144,9 @@ %(PaketReferencesFileLinesInfo.PackageVersion) - All + All runtime + true diff --git a/build.fsx b/build.fsx index e23735e4..433cb402 100644 --- a/build.fsx +++ b/build.fsx @@ -106,7 +106,7 @@ Target "CleanDocs" (fun _ -> // Build library & test project let mutable dotnetExePath = "dotnet" -let dotnetcliVersion = "2.1.101" +let dotnetcliVersion = "2.1.105" Target "InstallDotNetCore" (fun _ -> dotnetExePath <- DotNetCli.InstallDotNetSDK dotnetcliVersion diff --git a/paket.lock b/paket.lock index 3582e21f..043e55fa 100644 --- a/paket.lock +++ b/paket.lock @@ -5,19 +5,19 @@ NUGET FSharp.Core (4.3.2) System.Configuration.ConfigurationManager (4.4.1) System.Security.Cryptography.ProtectedData (>= 4.4) - System.Runtime.Caching (4.5.0-preview2-26406-04) + System.Runtime.Caching (4.5.0-rc1) System.Security.Cryptography.ProtectedData (4.4) YamlDotNet (4.3.1) GITHUB remote: fsprojects/FSharp.TypeProviders.SDK - src/ProvidedTypes.fs (f0c4a6300db313eb2616c4f792cd6ae68c255e56) - src/ProvidedTypes.fsi (f0c4a6300db313eb2616c4f792cd6ae68c255e56) - src/ProvidedTypesTesting.fs (f0c4a6300db313eb2616c4f792cd6ae68c255e56) + src/ProvidedTypes.fs (4b9ce4b75b6fd727a96378eb4c0f303638db2e71) + src/ProvidedTypes.fsi (4b9ce4b75b6fd727a96378eb4c0f303638db2e71) + src/ProvidedTypesTesting.fs (4b9ce4b75b6fd727a96378eb4c0f303638db2e71) GROUP Build RESTRICTION: == net45 NUGET remote: https://www.nuget.org/api/v2 - FAKE (4.64.12) + FAKE (4.64.13) FSharp.Compiler.Service (2.0.0.6) FSharp.Formatting (2.14.4) FSharp.Compiler.Service (2.0.0.6) @@ -28,7 +28,7 @@ NUGET SourceLink.Fake (1.1) GITHUB remote: fsharp/FAKE - modules/Octokit/Octokit.fsx (7f99a9c4350b6b15a044254977c882574cd72b61) + modules/Octokit/Octokit.fsx (896e227b6da98b21001a1e5940df01d442bc7a25) Octokit (>= 0.20) GROUP Legacy REDIRECTS: FORCE @@ -47,7 +47,7 @@ NUGET FSharp.Core (>= 4.0.0.1) - restriction: || (== net461) (&& (== netcoreapp2.0) (>= net45)) FSharp.Core (>= 4.3.2) - restriction: || (&& (== net461) (< net45) (>= netstandard2.0)) (== netcoreapp2.0) System.Configuration.ConfigurationManager (>= 4.4) - restriction: || (&& (== net461) (< net45) (>= netstandard2.0)) (== netcoreapp2.0) - Expecto (7.0.1) + Expecto (8.0) Argu (>= 5.1) Mono.Cecil (>= 0.10) System.Diagnostics.FileVersionInfo (>= 4.3) - restriction: == netcoreapp2.0 From 41653070e14a62f82bb7d0a426a1ba7b787deeeb Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Sat, 16 Jun 2018 22:05:28 +0300 Subject: [PATCH 14/41] dependencies update --- build.fsx | 6 +- paket.dependencies | 6 +- paket.lock | 58 ++++++++++++++----- .../FSharp.Configuration.fsproj | 1 - .../FSharp.Configuration.Tests.fsproj | 1 - tests/FSharp.Configuration.Tests/app.config | 39 ++++++++++++- 6 files changed, 87 insertions(+), 24 deletions(-) diff --git a/build.fsx b/build.fsx index 433cb402..d8695d04 100644 --- a/build.fsx +++ b/build.fsx @@ -106,7 +106,7 @@ Target "CleanDocs" (fun _ -> // Build library & test project let mutable dotnetExePath = "dotnet" -let dotnetcliVersion = "2.1.105" +let dotnetcliVersion = "2.1.300" Target "InstallDotNetCore" (fun _ -> dotnetExePath <- DotNetCli.InstallDotNetSDK dotnetcliVersion @@ -136,7 +136,9 @@ Target "BuildTests" (fun _ -> { c with Project = "FSharp.Configuration.Tests.sln" Configuration = "Release" - ToolPath = dotnetExePath }) + ToolPath = dotnetExePath + AdditionalArgs= ["-v n"] + }) ) // -------------------------------------------------------------------------------------- diff --git a/paket.dependencies b/paket.dependencies index 9ef8372a..1d9cfe42 100644 --- a/paket.dependencies +++ b/paket.dependencies @@ -3,7 +3,7 @@ framework: netstandard2.0 redirects: force nuget YamlDotNet -nuget FSharp.Core >= 4.3.2 +nuget FSharp.Core 4.3.4 nuget System.Runtime.Caching nuget System.Configuration.ConfigurationManager @@ -24,7 +24,7 @@ group Build framework: net45 source https://nuget.org/api/v2 - nuget FAKE + nuget FAKE ~> 4.0 nuget FSharp.Formatting nuget Octokit nuget SourceLink.Fake @@ -36,5 +36,5 @@ group Test source https://nuget.org/api/v2 redirects: force - nuget FSharp.Core redirects: force + nuget FSharp.Core 4.3.4 redirects: force nuget Expecto \ No newline at end of file diff --git a/paket.lock b/paket.lock index 043e55fa..fd161eb1 100644 --- a/paket.lock +++ b/paket.lock @@ -2,12 +2,26 @@ REDIRECTS: FORCE RESTRICTION: == netstandard2.0 NUGET remote: http://www.nuget.org/api/v2 - FSharp.Core (4.3.2) - System.Configuration.ConfigurationManager (4.4.1) - System.Security.Cryptography.ProtectedData (>= 4.4) - System.Runtime.Caching (4.5.0-rc1) - System.Security.Cryptography.ProtectedData (4.4) - YamlDotNet (4.3.1) + FSharp.Core (4.3.4) + System.Buffers (4.5) + System.Configuration.ConfigurationManager (4.5) + System.Security.Cryptography.ProtectedData (>= 4.5) + System.Security.Permissions (>= 4.5) + System.Memory (4.5) + System.Buffers (>= 4.4) + System.Numerics.Vectors (>= 4.4) + System.Runtime.CompilerServices.Unsafe (>= 4.5) + System.Numerics.Vectors (4.5) + System.Runtime.Caching (4.5) + System.Runtime.CompilerServices.Unsafe (4.5) + System.Security.AccessControl (4.5) + System.Security.Principal.Windows (>= 4.5) + System.Security.Cryptography.ProtectedData (4.5) + System.Memory (>= 4.5) + System.Security.Permissions (4.5) + System.Security.AccessControl (>= 4.5) + System.Security.Principal.Windows (4.5) + YamlDotNet (4.3.2) GITHUB remote: fsprojects/FSharp.TypeProviders.SDK src/ProvidedTypes.fs (4b9ce4b75b6fd727a96378eb4c0f303638db2e71) @@ -28,7 +42,7 @@ NUGET SourceLink.Fake (1.1) GITHUB remote: fsharp/FAKE - modules/Octokit/Octokit.fsx (896e227b6da98b21001a1e5940df01d442bc7a25) + modules/Octokit/Octokit.fsx (6ba51f5612a914e161be2a9b642907f75e28780f) Octokit (>= 0.20) GROUP Legacy REDIRECTS: FORCE @@ -36,7 +50,7 @@ RESTRICTION: == net45 NUGET remote: https://api.nuget.org/v3/index.json FSharp.Core (4.0.0.1) - YamlDotNet (4.3.1) + YamlDotNet (4.3.2) GROUP Test REDIRECTS: FORCE @@ -47,13 +61,13 @@ NUGET FSharp.Core (>= 4.0.0.1) - restriction: || (== net461) (&& (== netcoreapp2.0) (>= net45)) FSharp.Core (>= 4.3.2) - restriction: || (&& (== net461) (< net45) (>= netstandard2.0)) (== netcoreapp2.0) System.Configuration.ConfigurationManager (>= 4.4) - restriction: || (&& (== net461) (< net45) (>= netstandard2.0)) (== netcoreapp2.0) - Expecto (8.0) + Expecto (8.1.1) Argu (>= 5.1) Mono.Cecil (>= 0.10) System.Diagnostics.FileVersionInfo (>= 4.3) - restriction: == netcoreapp2.0 FSharp.Core (4.3.4) - redirects: force - Microsoft.NETCore.Platforms (2.0.2) - restriction: == netcoreapp2.0 - Microsoft.NETCore.Targets (2.0) - restriction: == netcoreapp2.0 + Microsoft.NETCore.Platforms (2.1) - restriction: || (&& (== net461) (>= netcoreapp2.0)) (== netcoreapp2.0) + Microsoft.NETCore.Targets (2.1) - restriction: == netcoreapp2.0 Mono.Cecil (0.10) System.Collections (>= 4.0.11) - restriction: || (&& (== net461) (< net35)) (== netcoreapp2.0) System.IO.FileSystem (>= 4.0.1) - restriction: || (&& (== net461) (< net35)) (== netcoreapp2.0) @@ -102,8 +116,10 @@ NUGET System.Runtime.Extensions (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wpa81)) (== netcoreapp2.0) System.Threading (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wpa81)) (== netcoreapp2.0) System.Threading.Tasks (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wpa81)) (== netcoreapp2.0) - System.Configuration.ConfigurationManager (4.4.1) - restriction: || (&& (== net461) (< net45) (>= netstandard2.0)) (== netcoreapp2.0) - System.Security.Cryptography.ProtectedData (>= 4.4) - restriction: || (&& (== net461) (>= netcoreapp2.0)) (== netcoreapp2.0) + System.Collections.Immutable (1.5) - restriction: == netcoreapp2.0 + System.Configuration.ConfigurationManager (4.5) - restriction: || (&& (== net461) (< net45) (>= netstandard2.0)) (== netcoreapp2.0) + System.Security.Cryptography.ProtectedData (>= 4.5) - restriction: == netcoreapp2.0 + System.Security.Permissions (>= 4.5) System.Diagnostics.Debug (4.3) - restriction: || (&& (== net461) (< net35)) (== netcoreapp2.0) Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) @@ -149,13 +165,16 @@ NUGET System.Resources.ResourceManager (>= 4.3) - restriction: || (&& (== net461) (< net45) (>= netstandard1.6)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) System.Runtime (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) System.Runtime.Extensions (>= 4.3) - restriction: || (&& (== net461) (< net45) (>= netstandard1.6)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) + System.Memory (4.5) - restriction: || (&& (== net461) (< net45) (>= netstandard2.0)) (== netcoreapp2.0) + System.Runtime.CompilerServices.Unsafe (>= 4.5) System.Reflection (4.3) - restriction: == netcoreapp2.0 Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) System.IO (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) System.Reflection.Primitives (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) System.Runtime (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) - System.Reflection.Metadata (1.5) - restriction: == netcoreapp2.0 + System.Reflection.Metadata (1.6) - restriction: == netcoreapp2.0 + System.Collections.Immutable (>= 1.5) System.Reflection.Primitives (4.3) - restriction: == netcoreapp2.0 Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) @@ -169,6 +188,7 @@ NUGET System.Runtime (4.3) - restriction: == netcoreapp2.0 Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) + System.Runtime.CompilerServices.Unsafe (4.5) - restriction: || (&& (== net461) (< net45) (>= netstandard2.0)) (&& (== net461) (>= netcoreapp2.0)) (&& (== net461) (< netstandard1.1) (>= netstandard2.0)) (&& (== net461) (>= netstandard2.0) (>= uap10.1)) (&& (== net461) (>= netstandard2.0) (>= wpa81)) (== netcoreapp2.0) System.Runtime.Extensions (4.3) - restriction: == netcoreapp2.0 Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) @@ -189,6 +209,9 @@ NUGET System.Resources.ResourceManager (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wpa81)) (== netcoreapp2.0) System.Runtime (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wpa81)) (== netcoreapp2.0) System.Runtime.Extensions (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wpa81)) (== netcoreapp2.0) + System.Security.AccessControl (4.5) - restriction: || (&& (== net461) (>= monoandroid) (>= netstandard2.0)) (&& (== net461) (>= monotouch) (>= netstandard2.0)) (&& (== net461) (< net45) (>= netstandard2.0)) (&& (== net461) (>= netstandard2.0) (>= xamarinios)) (&& (== net461) (>= netstandard2.0) (>= xamarinmac)) (&& (== net461) (>= netstandard2.0) (>= xamarintvos)) (&& (== net461) (>= netstandard2.0) (>= xamarinwatchos)) (== netcoreapp2.0) + Microsoft.NETCore.Platforms (>= 2.0) - restriction: || (&& (== net461) (>= netcoreapp2.0)) (== netcoreapp2.0) + System.Security.Principal.Windows (>= 4.5) System.Security.Cryptography.Algorithms (4.3.1) - restriction: || (&& (== net461) (< net35)) (== netcoreapp2.0) Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (== net461) (< net46) (>= netstandard1.6)) (&& (== net461) (< netstandard1.3)) (== netcoreapp2.0) runtime.native.System.Security.Cryptography.Apple (>= 4.3.1) - restriction: || (&& (== net461) (< net46) (>= netstandard1.6)) (== netcoreapp2.0) @@ -239,7 +262,12 @@ NUGET System.Runtime (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) System.Threading (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) System.Threading.Tasks (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) - System.Security.Cryptography.ProtectedData (4.4) - restriction: || (&& (== net461) (< net45) (>= netstandard2.0)) (&& (== net461) (>= netcoreapp2.0)) (== netcoreapp2.0) + System.Security.Cryptography.ProtectedData (4.5) - restriction: || (&& (== net461) (< net45) (>= netstandard2.0)) (== netcoreapp2.0) + System.Memory (>= 4.5) - restriction: || (&& (== net461) (< net46) (>= netstandard2.0)) (== netcoreapp2.0) + System.Security.Permissions (4.5) - restriction: || (&& (== net461) (>= monoandroid) (>= netstandard2.0)) (&& (== net461) (>= monotouch) (>= netstandard2.0)) (&& (== net461) (< net45) (>= netstandard2.0)) (&& (== net461) (>= netstandard2.0) (>= xamarinios)) (&& (== net461) (>= netstandard2.0) (>= xamarinmac)) (&& (== net461) (>= netstandard2.0) (>= xamarintvos)) (&& (== net461) (>= netstandard2.0) (>= xamarinwatchos)) (== netcoreapp2.0) + System.Security.AccessControl (>= 4.5) + System.Security.Principal.Windows (4.5) - restriction: || (&& (== net461) (>= monoandroid) (>= netstandard2.0)) (&& (== net461) (>= monotouch) (>= netstandard2.0)) (&& (== net461) (< net45) (>= netstandard2.0)) (&& (== net461) (>= netcoreapp2.0)) (&& (== net461) (>= netstandard2.0) (>= xamarinios)) (&& (== net461) (>= netstandard2.0) (>= xamarinmac)) (&& (== net461) (>= netstandard2.0) (>= xamarintvos)) (&& (== net461) (>= netstandard2.0) (>= xamarinwatchos)) (== netcoreapp2.0) + Microsoft.NETCore.Platforms (>= 2.0) - restriction: || (&& (== net461) (>= netcoreapp2.0)) (== netcoreapp2.0) System.Text.Encoding (4.3) - restriction: == netcoreapp2.0 Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) diff --git a/src/FSharp.Configuration/FSharp.Configuration.fsproj b/src/FSharp.Configuration/FSharp.Configuration.fsproj index 54510b8d..96e2c3a6 100644 --- a/src/FSharp.Configuration/FSharp.Configuration.fsproj +++ b/src/FSharp.Configuration/FSharp.Configuration.fsproj @@ -5,7 +5,6 @@ netstandard2.0; net45 FSharp.Configuration false - true NET45 diff --git a/tests/FSharp.Configuration.Tests/FSharp.Configuration.Tests.fsproj b/tests/FSharp.Configuration.Tests/FSharp.Configuration.Tests.fsproj index 53f27429..9d252411 100644 --- a/tests/FSharp.Configuration.Tests/FSharp.Configuration.Tests.fsproj +++ b/tests/FSharp.Configuration.Tests/FSharp.Configuration.Tests.fsproj @@ -6,7 +6,6 @@ Exe netcoreapp2.0; net461 FSharp.Configuration.Tests - true NET461 diff --git a/tests/FSharp.Configuration.Tests/app.config b/tests/FSharp.Configuration.Tests/app.config index 614937c0..9de448de 100644 --- a/tests/FSharp.Configuration.Tests/app.config +++ b/tests/FSharp.Configuration.Tests/app.config @@ -87,10 +87,15 @@ + + True + + + True - + True @@ -102,11 +107,31 @@ + + True + + + + + True + + + + + True + + + True + + True + + + True @@ -115,7 +140,17 @@ True - + + + + True + + + + + True + + True From 7018e3afead113fd7d0607c126148e736161eec8 Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Sat, 16 Jun 2018 22:19:49 +0300 Subject: [PATCH 15/41] Travis with dotnet: 2.1.300 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 80244f11..d9c6c04a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ language: csharp dist: trusty sudo: true -dotnet: 2.1.101 +dotnet: 2.1.300 script: - ./build.sh \ No newline at end of file From bf726434937ff4c23b454710ac95e97b2a135ce4 Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Sat, 16 Jun 2018 22:37:44 +0300 Subject: [PATCH 16/41] more system.* dll for netstandard version --- paket.template | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/paket.template b/paket.template index c4e40d16..8bf560dd 100644 --- a/paket.template +++ b/paket.template @@ -27,9 +27,7 @@ files bin/lib/net45/YamlDotNet.dll ==> lib/net45 bin/lib/netstandard2.0/FSharp.Configuration.dll ==> lib/netstandard2.0 bin/lib/netstandard2.0/YamlDotNet.dll ==> lib/netstandard2.0 - bin/lib/netstandard2.0/System.Runtime.Caching.dll ==> lib/netstandard2.0 - bin/lib/netstandard2.0/System.Configuration.ConfigurationManager.dll ==> lib/netstandard2.0 - bin/lib/netstandard2.0/System.Security.Cryptography.ProtectedData.dll ==> lib/netstandard2.0 + bin/lib/netstandard2.0/System.*.dll ==> lib/netstandard2.0 docs/output/*.* => docs docs/output/content/*.* => docs/content docs/output/content/img/*.* => docs/content/img From 3e724ea5fcf702a823de56c9dab49c2254c748a1 Mon Sep 17 00:00:00 2001 From: Chet Husk Date: Tue, 16 Oct 2018 15:26:01 -0500 Subject: [PATCH 17/41] purge memorycache because it doesn't work cross-platform --- .paket/Paket.Restore.targets | 12 +- paket.dependencies | 2 +- paket.lock | 90 +++---- paket.template | 4 +- .../AppSettingsProvider.fs | 222 +++++++++--------- .../FSharp.Configuration.fsproj | 54 ++--- src/FSharp.Configuration/IniFileProvider.fs | 126 +++++----- src/FSharp.Configuration/ResXProvider.fs | 34 ++- .../TypeProviders.Helper.fs | 24 +- .../YamlConfigProvider.fs | 57 ++--- src/FSharp.Configuration/paket.references | 5 +- .../FSharp.Configuration.Tests.fsproj | 18 +- tests/FSharp.Configuration.Tests/app.config | 12 +- 13 files changed, 303 insertions(+), 357 deletions(-) diff --git a/.paket/Paket.Restore.targets b/.paket/Paket.Restore.targets index 55292f31..305e736c 100644 --- a/.paket/Paket.Restore.targets +++ b/.paket/Paket.Restore.targets @@ -72,6 +72,9 @@ true + + true + @@ -93,7 +96,7 @@ $(MSBuildProjectDirectory)\$(MSBuildProjectName).paket.references $(MSBuildProjectDirectory)\paket.references - + false true true @@ -132,20 +135,21 @@ - + - + $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[0]) $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[1]) $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[4]) + $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[5]) %(PaketReferencesFileLinesInfo.PackageVersion) All - runtime + runtime true diff --git a/paket.dependencies b/paket.dependencies index 1d9cfe42..967e135f 100644 --- a/paket.dependencies +++ b/paket.dependencies @@ -5,8 +5,8 @@ redirects: force nuget YamlDotNet nuget FSharp.Core 4.3.4 -nuget System.Runtime.Caching nuget System.Configuration.ConfigurationManager +nuget NETStandard.Library.NETFramework prerelease github fsprojects/FSharp.TypeProviders.SDK src/ProvidedTypes.fs github fsprojects/FSharp.TypeProviders.SDK src/ProvidedTypes.fsi diff --git a/paket.lock b/paket.lock index fd161eb1..bbb3ac42 100644 --- a/paket.lock +++ b/paket.lock @@ -3,30 +3,30 @@ RESTRICTION: == netstandard2.0 NUGET remote: http://www.nuget.org/api/v2 FSharp.Core (4.3.4) + NETStandard.Library.NETFramework (2.0.0-preview2-25405-01) System.Buffers (4.5) System.Configuration.ConfigurationManager (4.5) System.Security.Cryptography.ProtectedData (>= 4.5) System.Security.Permissions (>= 4.5) - System.Memory (4.5) + System.Memory (4.5.1) System.Buffers (>= 4.4) System.Numerics.Vectors (>= 4.4) System.Runtime.CompilerServices.Unsafe (>= 4.5) System.Numerics.Vectors (4.5) - System.Runtime.Caching (4.5) - System.Runtime.CompilerServices.Unsafe (4.5) + System.Runtime.CompilerServices.Unsafe (4.5.2) System.Security.AccessControl (4.5) System.Security.Principal.Windows (>= 4.5) System.Security.Cryptography.ProtectedData (4.5) System.Memory (>= 4.5) System.Security.Permissions (4.5) System.Security.AccessControl (>= 4.5) - System.Security.Principal.Windows (4.5) - YamlDotNet (4.3.2) + System.Security.Principal.Windows (4.5.1) + YamlDotNet (5.2.1) GITHUB remote: fsprojects/FSharp.TypeProviders.SDK - src/ProvidedTypes.fs (4b9ce4b75b6fd727a96378eb4c0f303638db2e71) - src/ProvidedTypes.fsi (4b9ce4b75b6fd727a96378eb4c0f303638db2e71) - src/ProvidedTypesTesting.fs (4b9ce4b75b6fd727a96378eb4c0f303638db2e71) + src/ProvidedTypes.fs (7d57cd409d7299592822713195924e42b2b7acde) + src/ProvidedTypes.fsi (7d57cd409d7299592822713195924e42b2b7acde) + src/ProvidedTypesTesting.fs (7d57cd409d7299592822713195924e42b2b7acde) GROUP Build RESTRICTION: == net45 NUGET @@ -38,11 +38,11 @@ NUGET FSharpVSPowerTools.Core (>= 2.3 < 2.4) FSharpVSPowerTools.Core (2.3) FSharp.Compiler.Service (>= 2.0.0.3) - Octokit (0.29) + Octokit (0.32) SourceLink.Fake (1.1) GITHUB remote: fsharp/FAKE - modules/Octokit/Octokit.fsx (6ba51f5612a914e161be2a9b642907f75e28780f) + modules/Octokit/Octokit.fsx (3827f95ad533978ec14c29db92658f48b0609e05) Octokit (>= 0.20) GROUP Legacy REDIRECTS: FORCE @@ -50,7 +50,7 @@ RESTRICTION: == net45 NUGET remote: https://api.nuget.org/v3/index.json FSharp.Core (4.0.0.1) - YamlDotNet (4.3.2) + YamlDotNet (5.2.1) GROUP Test REDIRECTS: FORCE @@ -61,14 +61,14 @@ NUGET FSharp.Core (>= 4.0.0.1) - restriction: || (== net461) (&& (== netcoreapp2.0) (>= net45)) FSharp.Core (>= 4.3.2) - restriction: || (&& (== net461) (< net45) (>= netstandard2.0)) (== netcoreapp2.0) System.Configuration.ConfigurationManager (>= 4.4) - restriction: || (&& (== net461) (< net45) (>= netstandard2.0)) (== netcoreapp2.0) - Expecto (8.1.1) + Expecto (8.4.2) Argu (>= 5.1) Mono.Cecil (>= 0.10) System.Diagnostics.FileVersionInfo (>= 4.3) - restriction: == netcoreapp2.0 FSharp.Core (4.3.4) - redirects: force - Microsoft.NETCore.Platforms (2.1) - restriction: || (&& (== net461) (>= netcoreapp2.0)) (== netcoreapp2.0) + Microsoft.NETCore.Platforms (2.1.1) - restriction: || (&& (== net461) (>= netcoreapp2.0)) (== netcoreapp2.0) Microsoft.NETCore.Targets (2.1) - restriction: == netcoreapp2.0 - Mono.Cecil (0.10) + Mono.Cecil (0.10.1) System.Collections (>= 4.0.11) - restriction: || (&& (== net461) (< net35)) (== netcoreapp2.0) System.IO.FileSystem (>= 4.0.1) - restriction: || (&& (== net461) (< net35)) (== netcoreapp2.0) System.IO.FileSystem.Primitives (>= 4.0.1) - restriction: || (&& (== net461) (< net35)) (== netcoreapp2.0) @@ -77,30 +77,40 @@ NUGET System.Security.Cryptography.Algorithms (>= 4.2) - restriction: || (&& (== net461) (< net35)) (== netcoreapp2.0) System.Security.Cryptography.Csp (>= 4.0) - restriction: || (&& (== net461) (< net35)) (== netcoreapp2.0) System.Threading (>= 4.0.11) - restriction: || (&& (== net461) (< net35)) (== netcoreapp2.0) - runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.2) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) - runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.2) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) - runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.2) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) + runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) + runtime.debian.9-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) + runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) + runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) + runtime.fedora.27-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) + runtime.fedora.28-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) runtime.native.System.Security.Cryptography.Apple (4.3.1) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple (>= 4.3.1) - runtime.native.System.Security.Cryptography.OpenSsl (4.3.2) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) - runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.2) - runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.2) - runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.2) - runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.2) - runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.2) - runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.2) - runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.2) - runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.2) - runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.2) - runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.2) - runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.2) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) - runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.2) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) + runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) + runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) + runtime.debian.9-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) + runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) + runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) + runtime.fedora.27-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) + runtime.fedora.28-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) + runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) + runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) + runtime.opensuse.42.3-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) + runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) + runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) + runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) + runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) + runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) + runtime.ubuntu.18.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) + runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) + runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) + runtime.opensuse.42.3-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple (4.3.1) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) - runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.2) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) - runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.2) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) - runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.2) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) - runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.2) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) - runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.2) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) + runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) + runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) + runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) + runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) + runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) + runtime.ubuntu.18.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) System.Collections (4.3) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) @@ -165,7 +175,7 @@ NUGET System.Resources.ResourceManager (>= 4.3) - restriction: || (&& (== net461) (< net45) (>= netstandard1.6)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) System.Runtime (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) System.Runtime.Extensions (>= 4.3) - restriction: || (&& (== net461) (< net45) (>= netstandard1.6)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) - System.Memory (4.5) - restriction: || (&& (== net461) (< net45) (>= netstandard2.0)) (== netcoreapp2.0) + System.Memory (4.5.1) - restriction: || (&& (== net461) (< net45) (>= netstandard2.0)) (== netcoreapp2.0) System.Runtime.CompilerServices.Unsafe (>= 4.5) System.Reflection (4.3) - restriction: == netcoreapp2.0 Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) @@ -188,7 +198,7 @@ NUGET System.Runtime (4.3) - restriction: == netcoreapp2.0 Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) - System.Runtime.CompilerServices.Unsafe (4.5) - restriction: || (&& (== net461) (< net45) (>= netstandard2.0)) (&& (== net461) (>= netcoreapp2.0)) (&& (== net461) (< netstandard1.1) (>= netstandard2.0)) (&& (== net461) (>= netstandard2.0) (>= uap10.1)) (&& (== net461) (>= netstandard2.0) (>= wpa81)) (== netcoreapp2.0) + System.Runtime.CompilerServices.Unsafe (4.5.2) - restriction: || (&& (== net461) (>= monoandroid) (>= netstandard2.0)) (&& (== net461) (>= monotouch) (>= netstandard2.0)) (&& (== net461) (< net45) (>= netstandard2.0)) (&& (== net461) (>= netcoreapp2.0)) (&& (== net461) (< netstandard1.1) (>= netstandard2.0)) (&& (== net461) (>= netstandard2.0) (>= uap10.1)) (&& (== net461) (>= netstandard2.0) (>= wpa81)) (&& (== net461) (>= netstandard2.0) (>= xamarinmac)) (&& (== net461) (>= netstandard2.0) (>= xamarintvos)) (&& (== net461) (>= netstandard2.0) (>= xamarinwatchos)) (&& (== net461) (>= xamarinios)) (== netcoreapp2.0) System.Runtime.Extensions (4.3) - restriction: == netcoreapp2.0 Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) @@ -209,7 +219,7 @@ NUGET System.Resources.ResourceManager (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wpa81)) (== netcoreapp2.0) System.Runtime (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wpa81)) (== netcoreapp2.0) System.Runtime.Extensions (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wpa81)) (== netcoreapp2.0) - System.Security.AccessControl (4.5) - restriction: || (&& (== net461) (>= monoandroid) (>= netstandard2.0)) (&& (== net461) (>= monotouch) (>= netstandard2.0)) (&& (== net461) (< net45) (>= netstandard2.0)) (&& (== net461) (>= netstandard2.0) (>= xamarinios)) (&& (== net461) (>= netstandard2.0) (>= xamarinmac)) (&& (== net461) (>= netstandard2.0) (>= xamarintvos)) (&& (== net461) (>= netstandard2.0) (>= xamarinwatchos)) (== netcoreapp2.0) + System.Security.AccessControl (4.5) - restriction: || (&& (== net461) (>= monoandroid) (>= netstandard2.0)) (&& (== net461) (>= monotouch) (>= netstandard2.0)) (&& (== net461) (< net45) (>= netstandard2.0)) (&& (== net461) (>= netstandard2.0) (>= xamarinmac)) (&& (== net461) (>= netstandard2.0) (>= xamarintvos)) (&& (== net461) (>= netstandard2.0) (>= xamarinwatchos)) (== netcoreapp2.0) Microsoft.NETCore.Platforms (>= 2.0) - restriction: || (&& (== net461) (>= netcoreapp2.0)) (== netcoreapp2.0) System.Security.Principal.Windows (>= 4.5) System.Security.Cryptography.Algorithms (4.3.1) - restriction: || (&& (== net461) (< net35)) (== netcoreapp2.0) @@ -264,9 +274,9 @@ NUGET System.Threading.Tasks (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) System.Security.Cryptography.ProtectedData (4.5) - restriction: || (&& (== net461) (< net45) (>= netstandard2.0)) (== netcoreapp2.0) System.Memory (>= 4.5) - restriction: || (&& (== net461) (< net46) (>= netstandard2.0)) (== netcoreapp2.0) - System.Security.Permissions (4.5) - restriction: || (&& (== net461) (>= monoandroid) (>= netstandard2.0)) (&& (== net461) (>= monotouch) (>= netstandard2.0)) (&& (== net461) (< net45) (>= netstandard2.0)) (&& (== net461) (>= netstandard2.0) (>= xamarinios)) (&& (== net461) (>= netstandard2.0) (>= xamarinmac)) (&& (== net461) (>= netstandard2.0) (>= xamarintvos)) (&& (== net461) (>= netstandard2.0) (>= xamarinwatchos)) (== netcoreapp2.0) + System.Security.Permissions (4.5) - restriction: || (&& (== net461) (>= monoandroid) (>= netstandard2.0)) (&& (== net461) (>= monotouch) (>= netstandard2.0)) (&& (== net461) (< net45) (>= netstandard2.0)) (&& (== net461) (>= netstandard2.0) (>= xamarinmac)) (&& (== net461) (>= netstandard2.0) (>= xamarintvos)) (&& (== net461) (>= netstandard2.0) (>= xamarinwatchos)) (== netcoreapp2.0) System.Security.AccessControl (>= 4.5) - System.Security.Principal.Windows (4.5) - restriction: || (&& (== net461) (>= monoandroid) (>= netstandard2.0)) (&& (== net461) (>= monotouch) (>= netstandard2.0)) (&& (== net461) (< net45) (>= netstandard2.0)) (&& (== net461) (>= netcoreapp2.0)) (&& (== net461) (>= netstandard2.0) (>= xamarinios)) (&& (== net461) (>= netstandard2.0) (>= xamarinmac)) (&& (== net461) (>= netstandard2.0) (>= xamarintvos)) (&& (== net461) (>= netstandard2.0) (>= xamarinwatchos)) (== netcoreapp2.0) + System.Security.Principal.Windows (4.5.1) - restriction: || (&& (== net461) (>= monoandroid) (>= netstandard2.0)) (&& (== net461) (>= monotouch) (>= netstandard2.0)) (&& (== net461) (< net45) (>= netstandard2.0)) (&& (== net461) (>= netcoreapp2.0)) (&& (== net461) (>= netstandard2.0) (>= xamarinmac)) (&& (== net461) (>= netstandard2.0) (>= xamarintvos)) (&& (== net461) (>= netstandard2.0) (>= xamarinwatchos)) (== netcoreapp2.0) Microsoft.NETCore.Platforms (>= 2.0) - restriction: || (&& (== net461) (>= netcoreapp2.0)) (== netcoreapp2.0) System.Text.Encoding (4.3) - restriction: == netcoreapp2.0 Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) diff --git a/paket.template b/paket.template index 8bf560dd..7df54d29 100644 --- a/paket.template +++ b/paket.template @@ -23,9 +23,9 @@ summary description The FSharp.Configuration project contains type providers for the configuration of .NET projects. files - bin/lib/net45/FSharp.Configuration.dll ==> lib/net45 + bin/lib/net45/FSharp.Configuration.* ==> lib/net45 bin/lib/net45/YamlDotNet.dll ==> lib/net45 - bin/lib/netstandard2.0/FSharp.Configuration.dll ==> lib/netstandard2.0 + bin/lib/netstandard2.0/FSharp.Configuration.* ==> lib/netstandard2.0 bin/lib/netstandard2.0/YamlDotNet.dll ==> lib/netstandard2.0 bin/lib/netstandard2.0/System.*.dll ==> lib/netstandard2.0 docs/output/*.* => docs diff --git a/src/FSharp.Configuration/AppSettingsProvider.fs b/src/FSharp.Configuration/AppSettingsProvider.fs index 34ec0c48..53fce478 100644 --- a/src/FSharp.Configuration/AppSettingsProvider.fs +++ b/src/FSharp.Configuration/AppSettingsProvider.fs @@ -11,7 +11,6 @@ open System.Globalization #if NET45 open System.Web.Hosting #endif -open System.Runtime.Caching let mutable private exePath = Map.empty let setExeFilePath key filePath = exePath <- exePath.Add(key, filePath) @@ -52,123 +51,120 @@ let setConnectionString(file, key: string, value) = let internal typedAppSettings (context: Context) = let appSettings = erasedType thisAssembly rootNamespace "AppSettings" None - let cache = new MemoryCache("AppSettingProvider") - context.AddDisposable cache - + appSettings.DefineStaticParameters( parameters = [ProvidedStaticParameter("configFileName", typeof)], - instantiationFunction = (fun typeName parameterValues -> - let value = lazy ( - let typedConnectionStrings (config: Configuration, filePath, configFileName) = - let typeDef = ProvidedTypeDefinition ("ConnectionStrings", Some typeof, hideObjectMethods = true) - typeDef.AddXmlDoc (sprintf "Represents the available connection strings from %s" configFileName) - let niceName = createNiceNameProvider() - let connectionStrings = config.ConnectionStrings.ConnectionStrings - for connectionString in connectionStrings do - let key = connectionString.Name + instantiationFunction = fun typeName parameterValues -> + let typedConnectionStrings (config: Configuration, filePath, configFileName) = + let typeDef = ProvidedTypeDefinition ("ConnectionStrings", Some typeof, hideObjectMethods = true) + typeDef.AddXmlDoc (sprintf "Represents the available connection strings from %s" configFileName) + let niceName = createNiceNameProvider() + let connectionStrings = config.ConnectionStrings.ConnectionStrings + for connectionString in connectionStrings do + let key = connectionString.Name + let name = niceName key + let prop = + ProvidedProperty( + name, + typeof, + getterCode = (fun _ -> <@@ getConnectionString(filePath, key) @@>), + setterCode = (fun args -> <@@ setConnectionString(filePath, key, %%args.[0]) @@>), + isStatic = true) + + prop.AddXmlDoc (sprintf "Returns the connection string from %s with name %s" configFileName name) + prop.AddDefinitionLocation(1,1,filePath) + typeDef.AddMember prop + typeDef + + match parameterValues with + | [| :? string as configFileName |] -> + let typeDef = erasedType thisAssembly rootNamespace typeName None + let niceName = createNiceNameProvider() + try + let filePath = findConfigFile context.ResolutionFolder configFileName + let fileMap = ExeConfigurationFileMap(ExeConfigFilename=filePath) + let config = ConfigurationManager.OpenMappedExeConfiguration(fileMap, ConfigurationUserLevel.None) + let appSettings = config.AppSettings.Settings + + for key in appSettings.AllKeys do let name = niceName key let prop = - ProvidedProperty( - name, - typeof, - getterCode = (fun _ -> <@@ getConnectionString(filePath, key) @@>), - setterCode = (fun args -> <@@ setConnectionString(filePath, key, %%args.[0]) @@>), - isStatic = true) - - prop.AddXmlDoc (sprintf "Returns the connection string from %s with name %s" configFileName name) - prop.AddDefinitionLocation(1,1,filePath) + match (appSettings.Item key).Value with + | ValueParser.Uri _ -> + ProvidedProperty(name, typeof, + isStatic = true, + getterCode = (fun _ -> <@@ Uri (getConfigValue(filePath, key)) @@>), + setterCode = fun args -> <@@ setConfigValue(filePath, key, string (%%args.[0]: Uri)) @@>) + | ValueParser.Int _ -> + ProvidedProperty(name, typeof, + isStatic = true, + getterCode = (fun _ -> <@@ Int32.Parse (getConfigValue(filePath, key)) @@>), + setterCode = fun args -> <@@ setConfigValue(filePath, key, string (%%args.[0]: Int32)) @@>) + | ValueParser.Bool _ -> + ProvidedProperty(name, typeof, + isStatic = true, + getterCode = (fun _ -> <@@ Boolean.Parse (getConfigValue(filePath, key)) @@>), + setterCode = fun args -> <@@ setConfigValue(filePath, key, string (%%args.[0]: Boolean)) @@>) + | ValueParser.Float _ -> + ProvidedProperty(name, typeof, + isStatic = true, + getterCode = (fun _ -> <@@ Double.Parse (getConfigValue(filePath, key), NumberStyles.Any, CultureInfo.InvariantCulture) @@>), + setterCode = fun args -> <@@ setConfigValue(filePath, key, string (%%args.[0]: float)) @@>) + | ValueParser.TimeSpan _ -> + ProvidedProperty(name, typeof, + isStatic = true, + getterCode = (fun _ -> <@@ TimeSpan.Parse(getConfigValue(filePath, key), CultureInfo.InvariantCulture) @@>), + setterCode = fun args -> <@@ setConfigValue(filePath, key, string (%%args.[0]: TimeSpan)) @@>) + | ValueParser.DateTime _ -> + ProvidedProperty(name, typeof, + isStatic = true, + getterCode = (fun _ -> <@@ DateTime.Parse(getConfigValue(filePath, key), CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal) @@>), + setterCode = fun args -> <@@ setConfigValue(filePath, key, (%%args.[0]: DateTime).ToString("o")) @@>) + | ValueParser.Guid _ -> + ProvidedProperty(name, typeof, + isStatic = true, + getterCode = (fun _ -> <@@ Guid.Parse(getConfigValue(filePath, key)) @@>), + setterCode = fun args -> <@@ setConfigValue(filePath, key, (%%args.[0]: Guid).ToString("B")) @@>) + | _ -> + ProvidedProperty(name, typeof, + isStatic = true, + getterCode = (fun _ -> <@@ getConfigValue(filePath, key) @@>), + setterCode = fun args -> <@@ setConfigValue(filePath, key, %%args.[0]) @@>) + + prop.AddXmlDoc (sprintf "Returns the value from %s with key %s" configFileName key) + prop.AddDefinitionLocation(1, 1, filePath) + typeDef.AddMember prop - typeDef - match parameterValues with - | [| :? string as configFileName |] -> - let typeDef = erasedType thisAssembly rootNamespace typeName None - let niceName = createNiceNameProvider() - try - let filePath = findConfigFile context.ResolutionFolder configFileName - let fileMap = ExeConfigurationFileMap(ExeConfigFilename=filePath) - let config = ConfigurationManager.OpenMappedExeConfiguration(fileMap, ConfigurationUserLevel.None) - let appSettings = config.AppSettings.Settings - - for key in appSettings.AllKeys do - let name = niceName key - let prop = - match (appSettings.Item key).Value with - | ValueParser.Uri _ -> - ProvidedProperty(name, typeof, - isStatic = true, - getterCode = (fun _ -> <@@ Uri (getConfigValue(filePath, key)) @@>), - setterCode = fun args -> <@@ setConfigValue(filePath, key, string (%%args.[0]: Uri)) @@>) - | ValueParser.Int _ -> - ProvidedProperty(name, typeof, - isStatic = true, - getterCode = (fun _ -> <@@ Int32.Parse (getConfigValue(filePath, key)) @@>), - setterCode = fun args -> <@@ setConfigValue(filePath, key, string (%%args.[0]: Int32)) @@>) - | ValueParser.Bool _ -> - ProvidedProperty(name, typeof, - isStatic = true, - getterCode = (fun _ -> <@@ Boolean.Parse (getConfigValue(filePath, key)) @@>), - setterCode = fun args -> <@@ setConfigValue(filePath, key, string (%%args.[0]: Boolean)) @@>) - | ValueParser.Float _ -> - ProvidedProperty(name, typeof, - isStatic = true, - getterCode = (fun _ -> <@@ Double.Parse (getConfigValue(filePath, key), NumberStyles.Any, CultureInfo.InvariantCulture) @@>), - setterCode = fun args -> <@@ setConfigValue(filePath, key, string (%%args.[0]: float)) @@>) - | ValueParser.TimeSpan _ -> - ProvidedProperty(name, typeof, - isStatic = true, - getterCode = (fun _ -> <@@ TimeSpan.Parse(getConfigValue(filePath, key), CultureInfo.InvariantCulture) @@>), - setterCode = fun args -> <@@ setConfigValue(filePath, key, string (%%args.[0]: TimeSpan)) @@>) - | ValueParser.DateTime _ -> - ProvidedProperty(name, typeof, - isStatic = true, - getterCode = (fun _ -> <@@ DateTime.Parse(getConfigValue(filePath, key), CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal) @@>), - setterCode = fun args -> <@@ setConfigValue(filePath, key, (%%args.[0]: DateTime).ToString("o")) @@>) - | ValueParser.Guid _ -> - ProvidedProperty(name, typeof, - isStatic = true, - getterCode = (fun _ -> <@@ Guid.Parse(getConfigValue(filePath, key)) @@>), - setterCode = fun args -> <@@ setConfigValue(filePath, key, (%%args.[0]: Guid).ToString("B")) @@>) - | _ -> - ProvidedProperty(name, typeof, - isStatic = true, - getterCode = (fun _ -> <@@ getConfigValue(filePath, key) @@>), - setterCode = fun args -> <@@ setConfigValue(filePath, key, %%args.[0]) @@>) - - prop.AddXmlDoc (sprintf "Returns the value from %s with key %s" configFileName key) - prop.AddDefinitionLocation(1, 1, filePath) - - typeDef.AddMember prop - - let executeSelector = - ProvidedMethod( - niceName "SelectExecutableFile", - [ ProvidedParameter ("pathOfExe", typeof) ], - typeof, - isStatic = true, - invokeCode = fun args -> <@@ setExeFilePath filePath %%args.[0] @@>) - - executeSelector.AddXmlDoc "Property to change the executable file that is read for configurations. This idea is that you can manage other executables also (e.g. from script)." - typeDef.AddMember executeSelector - - - let configFileNameProp = - ProvidedProperty( - niceName "ConfigFileName", - typeof, - isStatic = true, - getterCode = fun _ -> <@@ filePath @@>) - - configFileNameProp.AddXmlDoc "Returns the Filename" - typeDef.AddMember configFileNameProp - - let connectionStringTypeDefinition = typedConnectionStrings (config, filePath, configFileName) - typeDef.AddMember connectionStringTypeDefinition - - context.WatchFile filePath - typeDef - with _ -> typeDef - | x -> failwithf "unexpected parameter values %A" x) - cache.GetOrAdd (typeName, value))) + let executeSelector = + ProvidedMethod( + niceName "SelectExecutableFile", + [ ProvidedParameter ("pathOfExe", typeof) ], + typeof, + isStatic = true, + invokeCode = fun args -> <@@ setExeFilePath filePath %%args.[0] @@>) + + executeSelector.AddXmlDoc "Property to change the executable file that is read for configurations. This idea is that you can manage other executables also (e.g. from script)." + typeDef.AddMember executeSelector + + + let configFileNameProp = + ProvidedProperty( + niceName "ConfigFileName", + typeof, + isStatic = true, + getterCode = fun _ -> <@@ filePath @@>) + + configFileNameProp.AddXmlDoc "Returns the Filename" + typeDef.AddMember configFileNameProp + + let connectionStringTypeDefinition = typedConnectionStrings (config, filePath, configFileName) + typeDef.AddMember connectionStringTypeDefinition + + context.WatchFile filePath + typeDef + with _ -> typeDef + | x -> failwithf "unexpected parameter values %A" x + ) appSettings diff --git a/src/FSharp.Configuration/FSharp.Configuration.fsproj b/src/FSharp.Configuration/FSharp.Configuration.fsproj index d235a26f..71de90f9 100644 --- a/src/FSharp.Configuration/FSharp.Configuration.fsproj +++ b/src/FSharp.Configuration/FSharp.Configuration.fsproj @@ -2,13 +2,18 @@ - netstandard2.0; net45 + netstandard2.0;net45 FSharp.Configuration - false - - - NET45 + true + PackageReference + true + + + + + + True @@ -30,41 +35,10 @@ + + PreserveNewest + - - - - - - + - - - - - - ..\..\packages\FSharp.Core\lib\net40\FSharp.Core.dll - True - True - - - - - - - - - ..\..\packages\SharpYaml\lib\net45\SharpYaml.dll - True - True - - - - \ No newline at end of file diff --git a/src/FSharp.Configuration/IniFileProvider.fs b/src/FSharp.Configuration/IniFileProvider.fs index ae7e1a63..b228345e 100644 --- a/src/FSharp.Configuration/IniFileProvider.fs +++ b/src/FSharp.Configuration/IniFileProvider.fs @@ -67,7 +67,6 @@ module Parser = open ProviderImplementation.ProvidedTypes open System.Globalization -open System.Runtime.Caching let getValue (iniFileName: string) (section: string) (key: string) = match Parser.parse (Path.GetFileName iniFileName) with @@ -81,70 +80,67 @@ let getValue (iniFileName: string) (section: string) (key: string) = let internal typedIniFile (context: Context) = let iniFile = erasedType thisAssembly rootNamespace "IniFile" None - let cache = new MemoryCache(name = "IniFileProvider") - context.AddDisposable cache - + iniFile.DefineStaticParameters( parameters = [ ProvidedStaticParameter ("configFileName", typeof) ], - instantiationFunction = (fun typeName parameterValues -> - let value = lazy ( - match parameterValues with - | [| :? string as iniFileName |] -> - let typeDef = erasedType thisAssembly rootNamespace typeName (Some true) - let niceName = createNiceNameProvider() - try - let filePath = findConfigFile context.ResolutionFolder iniFileName - match Parser.parse filePath with - | Choice1Of2 sections -> - for section in sections do - let sectionTy = ProvidedTypeDefinition(section.Name, Some typeof, hideObjectMethods = true) - for setting in section.Settings do - let sectionName = section.Name - let key = setting.Key - let prop = - match setting.Value with - | ValueParser.Int value -> ProvidedProperty(key, typeof, isStatic = true, getterCode = fun _ -> - <@@ - match getValue filePath sectionName key with - | Some v -> Int32.Parse v - | None -> value - @@>) - | ValueParser.Bool value -> ProvidedProperty(key, typeof, isStatic = true, getterCode = fun _ -> - <@@ - match getValue filePath sectionName key with - | Some v -> Boolean.Parse v - | None -> value - @@>) - | ValueParser.Float value -> ProvidedProperty(key, typeof, isStatic = true, getterCode = fun _ -> - <@@ - match getValue filePath sectionName key with - | Some v -> Double.Parse (v, NumberStyles.Any, CultureInfo.InvariantCulture) - | None -> value - @@>) - | value -> ProvidedProperty(key, typeof, isStatic = true, getterCode = fun _ -> - <@@ - match getValue filePath sectionName key with - | Some v -> v - | None -> value - @@>) - - prop.AddXmlDoc (sprintf "Returns the value from %s from section %s with key %s" iniFileName section.Name setting.Key) - prop.AddDefinitionLocation(1, 1, filePath) - sectionTy.AddMember prop - - typeDef.AddMember sectionTy - | Choice2Of2 e -> failwithf "%A" e - - let name = niceName "ConfigFileName" - let getValue = <@@ filePath @@> - let prop = ProvidedProperty(name, typeof, isStatic = true, getterCode = fun _ -> getValue) - - prop.AddXmlDoc "Returns the Filename" - - typeDef.AddMember prop - context.WatchFile filePath - typeDef - with _ -> typeDef - | x -> failwithf "unexpected parameter values %A" x) - cache.GetOrAdd (typeName, value))) + instantiationFunction = fun typeName parameterValues -> + match parameterValues with + | [| :? string as iniFileName |] -> + let typeDef = erasedType thisAssembly rootNamespace typeName (Some true) + let niceName = createNiceNameProvider() + try + let filePath = findConfigFile context.ResolutionFolder iniFileName + match Parser.parse filePath with + | Choice1Of2 sections -> + for section in sections do + let sectionTy = ProvidedTypeDefinition(section.Name, Some typeof, hideObjectMethods = true) + for setting in section.Settings do + let sectionName = section.Name + let key = setting.Key + let prop = + match setting.Value with + | ValueParser.Int value -> ProvidedProperty(key, typeof, isStatic = true, getterCode = fun _ -> + <@@ + match getValue filePath sectionName key with + | Some v -> Int32.Parse v + | None -> value + @@>) + | ValueParser.Bool value -> ProvidedProperty(key, typeof, isStatic = true, getterCode = fun _ -> + <@@ + match getValue filePath sectionName key with + | Some v -> Boolean.Parse v + | None -> value + @@>) + | ValueParser.Float value -> ProvidedProperty(key, typeof, isStatic = true, getterCode = fun _ -> + <@@ + match getValue filePath sectionName key with + | Some v -> Double.Parse (v, NumberStyles.Any, CultureInfo.InvariantCulture) + | None -> value + @@>) + | value -> ProvidedProperty(key, typeof, isStatic = true, getterCode = fun _ -> + <@@ + match getValue filePath sectionName key with + | Some v -> v + | None -> value + @@>) + + prop.AddXmlDoc (sprintf "Returns the value from %s from section %s with key %s" iniFileName section.Name setting.Key) + prop.AddDefinitionLocation(1, 1, filePath) + sectionTy.AddMember prop + + typeDef.AddMember sectionTy + | Choice2Of2 e -> failwithf "%A" e + + let name = niceName "ConfigFileName" + let getValue = <@@ filePath @@> + let prop = ProvidedProperty(name, typeof, isStatic = true, getterCode = fun _ -> getValue) + + prop.AddXmlDoc "Returns the Filename" + + typeDef.AddMember prop + context.WatchFile filePath + typeDef + with _ -> typeDef + | x -> failwithf "unexpected parameter values %A" x + ) iniFile \ No newline at end of file diff --git a/src/FSharp.Configuration/ResXProvider.fs b/src/FSharp.Configuration/ResXProvider.fs index 07a5370f..2d6b43d6 100644 --- a/src/FSharp.Configuration/ResXProvider.fs +++ b/src/FSharp.Configuration/ResXProvider.fs @@ -9,7 +9,6 @@ open System.Resources open System.ComponentModel.Design open System.Collections open System.Collections.Concurrent -open System.Runtime.Caching open ProviderImplementation.ProvidedTypes open FSharp.Configuration.Helper @@ -55,26 +54,23 @@ let inline private replace (oldChar:char) (newChar:char) (s:string) = s.Replace( let internal typedResources (context: Context) = let resXType = erasedType thisAssembly rootNamespace "ResXProvider" None - let cache = new MemoryCache("ResXProvider") - context.AddDisposable cache - + resXType.DefineStaticParameters( parameters = [ ProvidedStaticParameter ("file", typeof) ], - instantiationFunction = (fun typeName parameterValues -> - let value = lazy ( - match parameterValues with - | [| :? string as resourcePath|] -> - let filePath = findConfigFile context.ResolutionFolder resourcePath - if not (File.Exists filePath) then invalidArg "file" "Resource file not found" - let resourceName = - Path.ChangeExtension (resourcePath, null) - |> replace '\\' '.' - |> replace '/' '.' - let providedType = createResXProvider typeName resourceName filePath - context.WatchFile filePath - providedType - | _ -> failwith "unexpected parameter values") - cache.GetOrAdd (typeName, value))) + instantiationFunction = fun typeName parameterValues -> + match parameterValues with + | [| :? string as resourcePath|] -> + let filePath = findConfigFile context.ResolutionFolder resourcePath + if not (File.Exists filePath) then invalidArg "file" "Resource file not found" + let resourceName = + Path.ChangeExtension (resourcePath, null) + |> replace '\\' '.' + |> replace '/' '.' + let providedType = createResXProvider typeName resourceName filePath + context.WatchFile filePath + providedType + | _ -> failwith "unexpected parameter values" + ) resXType #endif diff --git a/src/FSharp.Configuration/TypeProviders.Helper.fs b/src/FSharp.Configuration/TypeProviders.Helper.fs index b456f928..3af32213 100644 --- a/src/FSharp.Configuration/TypeProviders.Helper.fs +++ b/src/FSharp.Configuration/TypeProviders.Helper.fs @@ -21,7 +21,12 @@ let inline satisfies predicate (charOption:option) = | _ -> None let dispose (x: IDisposable) = if x = null then () else x.Dispose() -let inline debug msg = Printf.kprintf Diagnostics.Debug.WriteLine msg +let debug msg = + let dt = DateTime.Now + let writer msg = + Diagnostics.Debug.WriteLine msg +// System.IO.File.AppendAllLines("debug.log", [sprintf "[%O] %s\n" dt msg]) + Printf.kprintf writer msg let (|EOF|_|) = function | Some _ -> None @@ -312,20 +317,3 @@ type Context (provider: TypeProviderForNamespaces, cfg: TypeProviderConfig) = interface IDisposable with member __.Dispose() = agent.Post Cancel - -open System.Runtime.Caching - -type MemoryCache with - member x.GetOrAdd(key: string, value: Lazy, ?expiration: TimeSpan) = - let policy = CacheItemPolicy() - policy.SlidingExpiration <- defaultArg expiration <| TimeSpan.FromHours 24. - - match x.AddOrGetExisting(key, value, policy) with - | :? Lazy as item -> - try item.Value - with _ -> - x.Remove key |> ignore - value.Value - | x -> - assert(x = null) - value.Value \ No newline at end of file diff --git a/src/FSharp.Configuration/YamlConfigProvider.fs b/src/FSharp.Configuration/YamlConfigProvider.fs index 2216a586..992a56df 100644 --- a/src/FSharp.Configuration/YamlConfigProvider.fs +++ b/src/FSharp.Configuration/YamlConfigProvider.fs @@ -7,7 +7,6 @@ open System.Reflection open System open System.IO open System.Collections.Generic -open System.Runtime.Caching open Microsoft.FSharp.Quotations @@ -559,37 +558,33 @@ let internal typedYamlConfig (context: Context) = Whether the resulting properties will be read-only or not. Yaml as text. Mutually exclusive with FilePath parameter.""" - let cache = new MemoryCache("YamlConfigProvider") - context.AddDisposable cache - yamlConfig.DefineStaticParameters( parameters = staticParams, instantiationFunction = fun typeName paramValues -> - let value = lazy ( - let createTy yaml readOnly inferTypesFromStrings = - let myAssem = ProvidedAssembly() - let ty = ProvidedTypeDefinition (myAssem, rootNamespace, typeName, Some baseTy, isErased = false, hideObjectMethods = true) - let types = TypesFactory.transform readOnly None (Parser.parse inferTypesFromStrings yaml) - let ctr = ProvidedConstructor([], invokeCode = fun (me :: _) -> types.Init me) - let baseCtor = baseTy.GetConstructor(BindingFlags.Public ||| BindingFlags.Instance, null, [|typeof|], null) - ctr.BaseConstructorCall <- fun [me] -> baseCtor, [me; Expr.Value inferTypesFromStrings] - ty.AddMembers (ctr :> MemberInfo :: types.Types) - myAssem.AddTypes [ty] - ty - - match paramValues with - | [| :? string as filePath; :? bool as readOnly; :? string as yamlText; :? bool as inferTypesFromStrings |] -> - match filePath, yamlText with - | "", "" -> failwith "You must specify either FilePath or YamlText parameter." - | "", yamlText -> createTy yamlText readOnly inferTypesFromStrings - | filePath, _ -> - let filePath = - if Path.IsPathRooted filePath - then filePath - else context.ResolutionFolder filePath - |> Path.GetFullPath - context.WatchFile filePath - createTy (File.ReadAllText filePath) readOnly inferTypesFromStrings - | _ -> failwith "Wrong parameters") - cache.GetOrAdd (typeName, value)) + let createTy yaml readOnly inferTypesFromStrings = + let myAssem = ProvidedAssembly() + let ty = ProvidedTypeDefinition (myAssem, rootNamespace, typeName, Some baseTy, isErased = false, hideObjectMethods = true) + let types = TypesFactory.transform readOnly None (Parser.parse inferTypesFromStrings yaml) + let ctr = ProvidedConstructor([], invokeCode = fun (me :: _) -> types.Init me) + let baseCtor = baseTy.GetConstructor(BindingFlags.Public ||| BindingFlags.Instance, null, [|typeof|], null) + ctr.BaseConstructorCall <- fun [me] -> baseCtor, [me; Expr.Value inferTypesFromStrings] + ty.AddMembers (ctr :> MemberInfo :: types.Types) + myAssem.AddTypes [ty] + ty + + match paramValues with + | [| :? string as filePath; :? bool as readOnly; :? string as yamlText; :? bool as inferTypesFromStrings |] -> + match filePath, yamlText with + | "", "" -> failwith "You must specify either FilePath or YamlText parameter." + | "", yamlText -> createTy yamlText readOnly inferTypesFromStrings + | filePath, _ -> + let filePath = + if Path.IsPathRooted filePath + then filePath + else context.ResolutionFolder filePath + |> Path.GetFullPath + context.WatchFile filePath + createTy (File.ReadAllText filePath) readOnly inferTypesFromStrings + | _ -> failwith "Wrong parameters" + ) yamlConfig diff --git a/src/FSharp.Configuration/paket.references b/src/FSharp.Configuration/paket.references index 9abf3324..acb5f9c2 100644 --- a/src/FSharp.Configuration/paket.references +++ b/src/FSharp.Configuration/paket.references @@ -1,7 +1,6 @@ YamlDotNet FSharp.Core -System.Runtime.Caching System.Configuration.ConfigurationManager File: ProvidedTypes.fsi . @@ -9,5 +8,5 @@ File: ProvidedTypes.fs . File: ProvidedTypesTesting.fs . group Legacy - FSharp.Core - YamlDotNet \ No newline at end of file + FSharp.Core framework: net45 + YamlDotNet framework: net45 \ No newline at end of file diff --git a/tests/FSharp.Configuration.Tests/FSharp.Configuration.Tests.fsproj b/tests/FSharp.Configuration.Tests/FSharp.Configuration.Tests.fsproj index 9d252411..5b410681 100644 --- a/tests/FSharp.Configuration.Tests/FSharp.Configuration.Tests.fsproj +++ b/tests/FSharp.Configuration.Tests/FSharp.Configuration.Tests.fsproj @@ -6,6 +6,7 @@ Exe netcoreapp2.0; net461 FSharp.Configuration.Tests + true NET461 @@ -30,21 +31,8 @@ - - - ..\..\bin\lib\net45\FSharp.Configuration.dll - - - ..\..\bin\lib\net45\YamlDotNet.dll - - - - - ..\..\bin\lib\netstandard2.0\FSharp.Configuration.dll - - - ..\..\bin\lib\netstandard2.0\YamlDotNet.dll - + + \ No newline at end of file diff --git a/tests/FSharp.Configuration.Tests/app.config b/tests/FSharp.Configuration.Tests/app.config index 9de448de..d17859e3 100644 --- a/tests/FSharp.Configuration.Tests/app.config +++ b/tests/FSharp.Configuration.Tests/app.config @@ -65,22 +65,22 @@ True - + True - + True - + True - + True @@ -120,7 +120,7 @@ True - + True @@ -150,7 +150,7 @@ True - + True From 1ceefa389e8288e792c2e2664cddd82160cf10b1 Mon Sep 17 00:00:00 2001 From: Chet Husk Date: Wed, 17 Oct 2018 11:14:37 -0500 Subject: [PATCH 18/41] wrap TP generation in try/catches with debug loggin so we can debug better. add dependency location flag so that we can load YamlDotNet in the new world --- .../AppSettingsProvider.fs | 230 +++++++++--------- .../ConfigTypeProvider.fs | 14 +- src/FSharp.Configuration/IniFileProvider.fs | 134 +++++----- src/FSharp.Configuration/ResXProvider.fs | 42 ++-- .../YamlConfigProvider.fs | 100 ++++---- 5 files changed, 268 insertions(+), 252 deletions(-) diff --git a/src/FSharp.Configuration/AppSettingsProvider.fs b/src/FSharp.Configuration/AppSettingsProvider.fs index 53fce478..6e702463 100644 --- a/src/FSharp.Configuration/AppSettingsProvider.fs +++ b/src/FSharp.Configuration/AppSettingsProvider.fs @@ -50,121 +50,125 @@ let setConnectionString(file, key: string, value) = config.Save() let internal typedAppSettings (context: Context) = - let appSettings = erasedType thisAssembly rootNamespace "AppSettings" None - - appSettings.DefineStaticParameters( - parameters = [ProvidedStaticParameter("configFileName", typeof)], - instantiationFunction = fun typeName parameterValues -> - let typedConnectionStrings (config: Configuration, filePath, configFileName) = - let typeDef = ProvidedTypeDefinition ("ConnectionStrings", Some typeof, hideObjectMethods = true) - typeDef.AddXmlDoc (sprintf "Represents the available connection strings from %s" configFileName) - let niceName = createNiceNameProvider() - let connectionStrings = config.ConnectionStrings.ConnectionStrings - for connectionString in connectionStrings do - let key = connectionString.Name - let name = niceName key - let prop = - ProvidedProperty( - name, - typeof, - getterCode = (fun _ -> <@@ getConnectionString(filePath, key) @@>), - setterCode = (fun args -> <@@ setConnectionString(filePath, key, %%args.[0]) @@>), - isStatic = true) - - prop.AddXmlDoc (sprintf "Returns the connection string from %s with name %s" configFileName name) - prop.AddDefinitionLocation(1,1,filePath) - typeDef.AddMember prop - typeDef - - match parameterValues with - | [| :? string as configFileName |] -> - let typeDef = erasedType thisAssembly rootNamespace typeName None - let niceName = createNiceNameProvider() - try - let filePath = findConfigFile context.ResolutionFolder configFileName - let fileMap = ExeConfigurationFileMap(ExeConfigFilename=filePath) - let config = ConfigurationManager.OpenMappedExeConfiguration(fileMap, ConfigurationUserLevel.None) - let appSettings = config.AppSettings.Settings - - for key in appSettings.AllKeys do + try + let appSettings = erasedType thisAssembly rootNamespace "AppSettings" None + + appSettings.DefineStaticParameters( + parameters = [ProvidedStaticParameter("configFileName", typeof)], + instantiationFunction = fun typeName parameterValues -> + let typedConnectionStrings (config: Configuration, filePath, configFileName) = + let typeDef = ProvidedTypeDefinition ("ConnectionStrings", Some typeof, hideObjectMethods = true) + typeDef.AddXmlDoc (sprintf "Represents the available connection strings from %s" configFileName) + let niceName = createNiceNameProvider() + let connectionStrings = config.ConnectionStrings.ConnectionStrings + for connectionString in connectionStrings do + let key = connectionString.Name let name = niceName key let prop = - match (appSettings.Item key).Value with - | ValueParser.Uri _ -> - ProvidedProperty(name, typeof, - isStatic = true, - getterCode = (fun _ -> <@@ Uri (getConfigValue(filePath, key)) @@>), - setterCode = fun args -> <@@ setConfigValue(filePath, key, string (%%args.[0]: Uri)) @@>) - | ValueParser.Int _ -> - ProvidedProperty(name, typeof, - isStatic = true, - getterCode = (fun _ -> <@@ Int32.Parse (getConfigValue(filePath, key)) @@>), - setterCode = fun args -> <@@ setConfigValue(filePath, key, string (%%args.[0]: Int32)) @@>) - | ValueParser.Bool _ -> - ProvidedProperty(name, typeof, - isStatic = true, - getterCode = (fun _ -> <@@ Boolean.Parse (getConfigValue(filePath, key)) @@>), - setterCode = fun args -> <@@ setConfigValue(filePath, key, string (%%args.[0]: Boolean)) @@>) - | ValueParser.Float _ -> - ProvidedProperty(name, typeof, - isStatic = true, - getterCode = (fun _ -> <@@ Double.Parse (getConfigValue(filePath, key), NumberStyles.Any, CultureInfo.InvariantCulture) @@>), - setterCode = fun args -> <@@ setConfigValue(filePath, key, string (%%args.[0]: float)) @@>) - | ValueParser.TimeSpan _ -> - ProvidedProperty(name, typeof, - isStatic = true, - getterCode = (fun _ -> <@@ TimeSpan.Parse(getConfigValue(filePath, key), CultureInfo.InvariantCulture) @@>), - setterCode = fun args -> <@@ setConfigValue(filePath, key, string (%%args.[0]: TimeSpan)) @@>) - | ValueParser.DateTime _ -> - ProvidedProperty(name, typeof, - isStatic = true, - getterCode = (fun _ -> <@@ DateTime.Parse(getConfigValue(filePath, key), CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal) @@>), - setterCode = fun args -> <@@ setConfigValue(filePath, key, (%%args.[0]: DateTime).ToString("o")) @@>) - | ValueParser.Guid _ -> - ProvidedProperty(name, typeof, - isStatic = true, - getterCode = (fun _ -> <@@ Guid.Parse(getConfigValue(filePath, key)) @@>), - setterCode = fun args -> <@@ setConfigValue(filePath, key, (%%args.[0]: Guid).ToString("B")) @@>) - | _ -> - ProvidedProperty(name, typeof, - isStatic = true, - getterCode = (fun _ -> <@@ getConfigValue(filePath, key) @@>), - setterCode = fun args -> <@@ setConfigValue(filePath, key, %%args.[0]) @@>) - - prop.AddXmlDoc (sprintf "Returns the value from %s with key %s" configFileName key) - prop.AddDefinitionLocation(1, 1, filePath) - + ProvidedProperty( + name, + typeof, + getterCode = (fun _ -> <@@ getConnectionString(filePath, key) @@>), + setterCode = (fun args -> <@@ setConnectionString(filePath, key, %%args.[0]) @@>), + isStatic = true) + + prop.AddXmlDoc (sprintf "Returns the connection string from %s with name %s" configFileName name) + prop.AddDefinitionLocation(1,1,filePath) typeDef.AddMember prop - - let executeSelector = - ProvidedMethod( - niceName "SelectExecutableFile", - [ ProvidedParameter ("pathOfExe", typeof) ], - typeof, - isStatic = true, - invokeCode = fun args -> <@@ setExeFilePath filePath %%args.[0] @@>) - - executeSelector.AddXmlDoc "Property to change the executable file that is read for configurations. This idea is that you can manage other executables also (e.g. from script)." - typeDef.AddMember executeSelector - - - let configFileNameProp = - ProvidedProperty( - niceName "ConfigFileName", - typeof, - isStatic = true, - getterCode = fun _ -> <@@ filePath @@>) - - configFileNameProp.AddXmlDoc "Returns the Filename" - typeDef.AddMember configFileNameProp - - let connectionStringTypeDefinition = typedConnectionStrings (config, filePath, configFileName) - typeDef.AddMember connectionStringTypeDefinition - - context.WatchFile filePath typeDef - with _ -> typeDef - | x -> failwithf "unexpected parameter values %A" x - ) - appSettings + + match parameterValues with + | [| :? string as configFileName |] -> + let typeDef = erasedType thisAssembly rootNamespace typeName None + let niceName = createNiceNameProvider() + try + let filePath = findConfigFile context.ResolutionFolder configFileName + let fileMap = ExeConfigurationFileMap(ExeConfigFilename=filePath) + let config = ConfigurationManager.OpenMappedExeConfiguration(fileMap, ConfigurationUserLevel.None) + let appSettings = config.AppSettings.Settings + + for key in appSettings.AllKeys do + let name = niceName key + let prop = + match (appSettings.Item key).Value with + | ValueParser.Uri _ -> + ProvidedProperty(name, typeof, + isStatic = true, + getterCode = (fun _ -> <@@ Uri (getConfigValue(filePath, key)) @@>), + setterCode = fun args -> <@@ setConfigValue(filePath, key, string (%%args.[0]: Uri)) @@>) + | ValueParser.Int _ -> + ProvidedProperty(name, typeof, + isStatic = true, + getterCode = (fun _ -> <@@ Int32.Parse (getConfigValue(filePath, key)) @@>), + setterCode = fun args -> <@@ setConfigValue(filePath, key, string (%%args.[0]: Int32)) @@>) + | ValueParser.Bool _ -> + ProvidedProperty(name, typeof, + isStatic = true, + getterCode = (fun _ -> <@@ Boolean.Parse (getConfigValue(filePath, key)) @@>), + setterCode = fun args -> <@@ setConfigValue(filePath, key, string (%%args.[0]: Boolean)) @@>) + | ValueParser.Float _ -> + ProvidedProperty(name, typeof, + isStatic = true, + getterCode = (fun _ -> <@@ Double.Parse (getConfigValue(filePath, key), NumberStyles.Any, CultureInfo.InvariantCulture) @@>), + setterCode = fun args -> <@@ setConfigValue(filePath, key, string (%%args.[0]: float)) @@>) + | ValueParser.TimeSpan _ -> + ProvidedProperty(name, typeof, + isStatic = true, + getterCode = (fun _ -> <@@ TimeSpan.Parse(getConfigValue(filePath, key), CultureInfo.InvariantCulture) @@>), + setterCode = fun args -> <@@ setConfigValue(filePath, key, string (%%args.[0]: TimeSpan)) @@>) + | ValueParser.DateTime _ -> + ProvidedProperty(name, typeof, + isStatic = true, + getterCode = (fun _ -> <@@ DateTime.Parse(getConfigValue(filePath, key), CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal) @@>), + setterCode = fun args -> <@@ setConfigValue(filePath, key, (%%args.[0]: DateTime).ToString("o")) @@>) + | ValueParser.Guid _ -> + ProvidedProperty(name, typeof, + isStatic = true, + getterCode = (fun _ -> <@@ Guid.Parse(getConfigValue(filePath, key)) @@>), + setterCode = fun args -> <@@ setConfigValue(filePath, key, (%%args.[0]: Guid).ToString("B")) @@>) + | _ -> + ProvidedProperty(name, typeof, + isStatic = true, + getterCode = (fun _ -> <@@ getConfigValue(filePath, key) @@>), + setterCode = fun args -> <@@ setConfigValue(filePath, key, %%args.[0]) @@>) + + prop.AddXmlDoc (sprintf "Returns the value from %s with key %s" configFileName key) + prop.AddDefinitionLocation(1, 1, filePath) + + typeDef.AddMember prop + + let executeSelector = + ProvidedMethod( + niceName "SelectExecutableFile", + [ ProvidedParameter ("pathOfExe", typeof) ], + typeof, + isStatic = true, + invokeCode = fun args -> <@@ setExeFilePath filePath %%args.[0] @@>) + + executeSelector.AddXmlDoc "Property to change the executable file that is read for configurations. This idea is that you can manage other executables also (e.g. from script)." + typeDef.AddMember executeSelector + + + let configFileNameProp = + ProvidedProperty( + niceName "ConfigFileName", + typeof, + isStatic = true, + getterCode = fun _ -> <@@ filePath @@>) + + configFileNameProp.AddXmlDoc "Returns the Filename" + typeDef.AddMember configFileNameProp + + let connectionStringTypeDefinition = typedConnectionStrings (config, filePath, configFileName) + typeDef.AddMember connectionStringTypeDefinition + + context.WatchFile filePath + typeDef + with _ -> typeDef + | x -> failwithf "unexpected parameter values %A" x + ) + appSettings + with ex -> + debug "Error in AppSettingsProvider: %s\n\t%s" ex.Message ex.StackTrace + reraise () diff --git a/src/FSharp.Configuration/ConfigTypeProvider.fs b/src/FSharp.Configuration/ConfigTypeProvider.fs index 838c1703..dd65119c 100644 --- a/src/FSharp.Configuration/ConfigTypeProvider.fs +++ b/src/FSharp.Configuration/ConfigTypeProvider.fs @@ -6,20 +6,18 @@ open ProviderImplementation.ProvidedTypes [] type FSharpConfigurationProvider(cfg: TypeProviderConfig) as this = - class - inherit TypeProviderForNamespaces(cfg) - let context = new Context(this, cfg) - do this.AddNamespace ( + inherit TypeProviderForNamespaces(cfg, addDefaultProbingLocation = true) + let context = new Context(this, cfg) + do this.AddNamespace ( rootNamespace, - [ + [ #if NET45 ResXProvider.typedResources context #endif AppSettingsTypeProvider.typedAppSettings context YamlConfigTypeProvider.typedYamlConfig context IniFileProvider.typedIniFile context ]) - do this.Disposing.Add (fun _ -> dispose context) - end + do this.Disposing.Add (fun _ -> dispose context) [] -do () \ No newline at end of file +do () diff --git a/src/FSharp.Configuration/IniFileProvider.fs b/src/FSharp.Configuration/IniFileProvider.fs index b228345e..3ecb2272 100644 --- a/src/FSharp.Configuration/IniFileProvider.fs +++ b/src/FSharp.Configuration/IniFileProvider.fs @@ -79,68 +79,72 @@ let getValue (iniFileName: string) (section: string) (key: string) = | Choice2Of2 _ -> None let internal typedIniFile (context: Context) = - let iniFile = erasedType thisAssembly rootNamespace "IniFile" None - - iniFile.DefineStaticParameters( - parameters = [ ProvidedStaticParameter ("configFileName", typeof) ], - instantiationFunction = fun typeName parameterValues -> - match parameterValues with - | [| :? string as iniFileName |] -> - let typeDef = erasedType thisAssembly rootNamespace typeName (Some true) - let niceName = createNiceNameProvider() - try - let filePath = findConfigFile context.ResolutionFolder iniFileName - match Parser.parse filePath with - | Choice1Of2 sections -> - for section in sections do - let sectionTy = ProvidedTypeDefinition(section.Name, Some typeof, hideObjectMethods = true) - for setting in section.Settings do - let sectionName = section.Name - let key = setting.Key - let prop = - match setting.Value with - | ValueParser.Int value -> ProvidedProperty(key, typeof, isStatic = true, getterCode = fun _ -> - <@@ - match getValue filePath sectionName key with - | Some v -> Int32.Parse v - | None -> value - @@>) - | ValueParser.Bool value -> ProvidedProperty(key, typeof, isStatic = true, getterCode = fun _ -> - <@@ - match getValue filePath sectionName key with - | Some v -> Boolean.Parse v - | None -> value - @@>) - | ValueParser.Float value -> ProvidedProperty(key, typeof, isStatic = true, getterCode = fun _ -> - <@@ - match getValue filePath sectionName key with - | Some v -> Double.Parse (v, NumberStyles.Any, CultureInfo.InvariantCulture) - | None -> value - @@>) - | value -> ProvidedProperty(key, typeof, isStatic = true, getterCode = fun _ -> - <@@ - match getValue filePath sectionName key with - | Some v -> v - | None -> value - @@>) - - prop.AddXmlDoc (sprintf "Returns the value from %s from section %s with key %s" iniFileName section.Name setting.Key) - prop.AddDefinitionLocation(1, 1, filePath) - sectionTy.AddMember prop - - typeDef.AddMember sectionTy - | Choice2Of2 e -> failwithf "%A" e - - let name = niceName "ConfigFileName" - let getValue = <@@ filePath @@> - let prop = ProvidedProperty(name, typeof, isStatic = true, getterCode = fun _ -> getValue) - - prop.AddXmlDoc "Returns the Filename" - - typeDef.AddMember prop - context.WatchFile filePath - typeDef - with _ -> typeDef - | x -> failwithf "unexpected parameter values %A" x - ) - iniFile \ No newline at end of file + try + let iniFile = erasedType thisAssembly rootNamespace "IniFile" None + + iniFile.DefineStaticParameters( + parameters = [ ProvidedStaticParameter ("configFileName", typeof) ], + instantiationFunction = fun typeName parameterValues -> + match parameterValues with + | [| :? string as iniFileName |] -> + let typeDef = erasedType thisAssembly rootNamespace typeName (Some true) + let niceName = createNiceNameProvider() + try + let filePath = findConfigFile context.ResolutionFolder iniFileName + match Parser.parse filePath with + | Choice1Of2 sections -> + for section in sections do + let sectionTy = ProvidedTypeDefinition(section.Name, Some typeof, hideObjectMethods = true) + for setting in section.Settings do + let sectionName = section.Name + let key = setting.Key + let prop = + match setting.Value with + | ValueParser.Int value -> ProvidedProperty(key, typeof, isStatic = true, getterCode = fun _ -> + <@@ + match getValue filePath sectionName key with + | Some v -> Int32.Parse v + | None -> value + @@>) + | ValueParser.Bool value -> ProvidedProperty(key, typeof, isStatic = true, getterCode = fun _ -> + <@@ + match getValue filePath sectionName key with + | Some v -> Boolean.Parse v + | None -> value + @@>) + | ValueParser.Float value -> ProvidedProperty(key, typeof, isStatic = true, getterCode = fun _ -> + <@@ + match getValue filePath sectionName key with + | Some v -> Double.Parse (v, NumberStyles.Any, CultureInfo.InvariantCulture) + | None -> value + @@>) + | value -> ProvidedProperty(key, typeof, isStatic = true, getterCode = fun _ -> + <@@ + match getValue filePath sectionName key with + | Some v -> v + | None -> value + @@>) + + prop.AddXmlDoc (sprintf "Returns the value from %s from section %s with key %s" iniFileName section.Name setting.Key) + prop.AddDefinitionLocation(1, 1, filePath) + sectionTy.AddMember prop + + typeDef.AddMember sectionTy + | Choice2Of2 e -> failwithf "%A" e + + let name = niceName "ConfigFileName" + let getValue = <@@ filePath @@> + let prop = ProvidedProperty(name, typeof, isStatic = true, getterCode = fun _ -> getValue) + + prop.AddXmlDoc "Returns the Filename" + + typeDef.AddMember prop + context.WatchFile filePath + typeDef + with _ -> typeDef + | x -> failwithf "unexpected parameter values %A" x + ) + iniFile + with ex -> + debug "Error in IniProvider: %s\n\t%s" ex.Message ex.StackTrace + reraise () diff --git a/src/FSharp.Configuration/ResXProvider.fs b/src/FSharp.Configuration/ResXProvider.fs index 2d6b43d6..46cd9a08 100644 --- a/src/FSharp.Configuration/ResXProvider.fs +++ b/src/FSharp.Configuration/ResXProvider.fs @@ -53,24 +53,28 @@ let private createResXProvider typeName resourceName filePath = let inline private replace (oldChar:char) (newChar:char) (s:string) = s.Replace(oldChar, newChar) let internal typedResources (context: Context) = - let resXType = erasedType thisAssembly rootNamespace "ResXProvider" None - - resXType.DefineStaticParameters( - parameters = [ ProvidedStaticParameter ("file", typeof) ], - instantiationFunction = fun typeName parameterValues -> - match parameterValues with - | [| :? string as resourcePath|] -> - let filePath = findConfigFile context.ResolutionFolder resourcePath - if not (File.Exists filePath) then invalidArg "file" "Resource file not found" - let resourceName = - Path.ChangeExtension (resourcePath, null) - |> replace '\\' '.' - |> replace '/' '.' - let providedType = createResXProvider typeName resourceName filePath - context.WatchFile filePath - providedType - | _ -> failwith "unexpected parameter values" - ) - resXType + try + let resXType = erasedType thisAssembly rootNamespace "ResXProvider" None + + resXType.DefineStaticParameters( + parameters = [ ProvidedStaticParameter ("file", typeof) ], + instantiationFunction = fun typeName parameterValues -> + match parameterValues with + | [| :? string as resourcePath|] -> + let filePath = findConfigFile context.ResolutionFolder resourcePath + if not (File.Exists filePath) then invalidArg "file" "Resource file not found" + let resourceName = + Path.ChangeExtension (resourcePath, null) + |> replace '\\' '.' + |> replace '/' '.' + let providedType = createResXProvider typeName resourceName filePath + context.WatchFile filePath + providedType + | _ -> failwith "unexpected parameter values" + ) + resXType + with ex -> + debug "Error in ResxProvider: %s\n\t%s" ex.Message ex.StackTrace + reraise () #endif diff --git a/src/FSharp.Configuration/YamlConfigProvider.fs b/src/FSharp.Configuration/YamlConfigProvider.fs index 992a56df..8f7a9bb6 100644 --- a/src/FSharp.Configuration/YamlConfigProvider.fs +++ b/src/FSharp.Configuration/YamlConfigProvider.fs @@ -541,50 +541,56 @@ type Root (inferTypesFromStrings: bool) = member __.Error = errorEvent.Publish let internal typedYamlConfig (context: Context) = - let baseTy = typeof - - let asm = Assembly.GetExecutingAssembly() - let yamlConfig = ProvidedTypeDefinition(asm, rootNamespace, "YamlConfig", Some baseTy, isErased = false) - - let staticParams = - [ ProvidedStaticParameter ("FilePath", typeof, "") - ProvidedStaticParameter ("ReadOnly", typeof, false) - ProvidedStaticParameter ("YamlText", typeof, "") - ProvidedStaticParameter ("InferTypesFromStrings", typeof, true) ] - - yamlConfig.AddXmlDoc - """Statically typed YAML config. - Path to YAML file. - Whether the resulting properties will be read-only or not. - Yaml as text. Mutually exclusive with FilePath parameter.""" - - yamlConfig.DefineStaticParameters( - parameters = staticParams, - instantiationFunction = fun typeName paramValues -> - let createTy yaml readOnly inferTypesFromStrings = - let myAssem = ProvidedAssembly() - let ty = ProvidedTypeDefinition (myAssem, rootNamespace, typeName, Some baseTy, isErased = false, hideObjectMethods = true) - let types = TypesFactory.transform readOnly None (Parser.parse inferTypesFromStrings yaml) - let ctr = ProvidedConstructor([], invokeCode = fun (me :: _) -> types.Init me) - let baseCtor = baseTy.GetConstructor(BindingFlags.Public ||| BindingFlags.Instance, null, [|typeof|], null) - ctr.BaseConstructorCall <- fun [me] -> baseCtor, [me; Expr.Value inferTypesFromStrings] - ty.AddMembers (ctr :> MemberInfo :: types.Types) - myAssem.AddTypes [ty] - ty - - match paramValues with - | [| :? string as filePath; :? bool as readOnly; :? string as yamlText; :? bool as inferTypesFromStrings |] -> - match filePath, yamlText with - | "", "" -> failwith "You must specify either FilePath or YamlText parameter." - | "", yamlText -> createTy yamlText readOnly inferTypesFromStrings - | filePath, _ -> - let filePath = - if Path.IsPathRooted filePath - then filePath - else context.ResolutionFolder filePath - |> Path.GetFullPath - context.WatchFile filePath - createTy (File.ReadAllText filePath) readOnly inferTypesFromStrings - | _ -> failwith "Wrong parameters" - ) - yamlConfig + try + let baseTy = typeof + + let asm = Assembly.GetExecutingAssembly() + let yamlConfig = ProvidedTypeDefinition(asm, rootNamespace, "YamlConfig", Some baseTy, isErased = false) + + let staticParams = + [ ProvidedStaticParameter ("FilePath", typeof, "") + ProvidedStaticParameter ("ReadOnly", typeof, false) + ProvidedStaticParameter ("YamlText", typeof, "") + ProvidedStaticParameter ("InferTypesFromStrings", typeof, true) ] + + yamlConfig.AddXmlDoc + """Statically typed YAML config. + Path to YAML file. + Whether the resulting properties will be read-only or not. + Yaml as text. Mutually exclusive with FilePath parameter.""" + + yamlConfig.DefineStaticParameters( + parameters = staticParams, + instantiationFunction = fun typeName paramValues -> + let createTy yaml readOnly inferTypesFromStrings = + let myAssem = ProvidedAssembly() + let ty = ProvidedTypeDefinition (myAssem, rootNamespace, typeName, Some baseTy, isErased = false, hideObjectMethods = true) + let types = TypesFactory.transform readOnly None (Parser.parse inferTypesFromStrings yaml) + let ctr = ProvidedConstructor([], invokeCode = fun (me :: _) -> types.Init me) + let baseCtor = baseTy.GetConstructor(BindingFlags.Public ||| BindingFlags.Instance, null, [|typeof|], null) + ctr.BaseConstructorCall <- fun [me] -> baseCtor, [me; Expr.Value inferTypesFromStrings] + ty.AddMembers (ctr :> MemberInfo :: types.Types) + myAssem.AddTypes [ty] + ty + + match paramValues with + | [| :? string as filePath; :? bool as readOnly; :? string as yamlText; :? bool as inferTypesFromStrings |] -> + match filePath, yamlText with + | "", "" -> failwith "You must specify either FilePath or YamlText parameter." + | "", yamlText -> createTy yamlText readOnly inferTypesFromStrings + | filePath, _ -> + let filePath = + if Path.IsPathRooted filePath + then filePath + else context.ResolutionFolder filePath + |> Path.GetFullPath + context.WatchFile filePath + createTy (File.ReadAllText filePath) readOnly inferTypesFromStrings + | _ -> failwith "Wrong parameters" + + ) + + yamlConfig + with ex -> + debug "Error in YamlProvider: %s\n\t%s" ex.Message ex.StackTrace + reraise () From 0d799212d4628cedb7f53f7812b37452530f9c30 Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Wed, 17 Jul 2019 21:56:10 +0300 Subject: [PATCH 19/41] target net461 and uses sdk 2.2.301 --- .paket/Paket.Restore.targets | 277 ++++++++++++++---- .travis.yml | 2 +- RELEASE_NOTES.md | 5 +- build.fsx | 6 +- global.json | 5 + paket.dependencies | 14 +- paket.lock | 31 +- paket.template | 10 +- .../AppSettingsProvider.fs | 4 +- .../ConfigTypeProvider.fs | 2 +- .../FSharp.Configuration.fsproj | 13 +- src/FSharp.Configuration/ResXProvider.fs | 2 +- src/FSharp.Configuration/paket.references | 6 +- .../FSharp.Configuration.Tests.fsproj | 26 +- tests/FSharp.Configuration.Tests/app.config | 102 +++---- 15 files changed, 324 insertions(+), 181 deletions(-) create mode 100644 global.json diff --git a/.paket/Paket.Restore.targets b/.paket/Paket.Restore.targets index 305e736c..8b180290 100644 --- a/.paket/Paket.Restore.targets +++ b/.paket/Paket.Restore.targets @@ -5,29 +5,60 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + + $(MSBuildVersion) + 15.0.0 + false + true true $(MSBuildThisFileDirectory) $(MSBuildThisFileDirectory)..\ $(PaketRootPath)paket-files\paket.restore.cached $(PaketRootPath)paket.lock + classic + proj + assembly + native /Library/Frameworks/Mono.framework/Commands/mono mono - - $(PaketRootPath)paket.exe - $(PaketToolsPath)paket.exe - "$(PaketExePath)" - $(MonoPath) --runtime=v4.0.30319 "$(PaketExePath)" - + + $(PaketRootPath)paket.bootstrapper.exe + $(PaketToolsPath)paket.bootstrapper.exe + $([System.IO.Path]::GetDirectoryName("$(PaketBootStrapperExePath)"))\ + + + + + $(PaketRootPath)paket.exe + $(PaketToolsPath)paket.exe + $(PaketToolsPath)paket.exe + $(_PaketBootStrapperExeDir)paket.exe + paket.exe + + + $(PaketRootPath)paket + $(PaketToolsPath)paket + $(PaketToolsPath)paket + + + $(PaketRootPath)paket.exe + $(PaketToolsPath)paket.exe + + + $(PaketBootStrapperExeDir)paket.exe + + + paket + + <_PaketExeExtension>$([System.IO.Path]::GetExtension("$(PaketExePath)")) - dotnet "$(PaketExePath)" + dotnet "$(PaketExePath)" + $(MonoPath) --runtime=v4.0.30319 "$(PaketExePath)" + "$(PaketExePath)" - - "$(PaketExePath)" - $(PaketRootPath)paket.bootstrapper.exe - $(PaketToolsPath)paket.bootstrapper.exe "$(PaketBootStrapperExePath)" $(MonoPath) --runtime=v4.0.30319 "$(PaketBootStrapperExePath)" @@ -36,60 +67,86 @@ true true + + + True + + $(BaseIntermediateOutputPath.TrimEnd('\').TrimEnd('\/')) - + + + + + + + + - + true $(NoWarn);NU1603;NU1604;NU1605;NU1608 + false + true - - - /usr/bin/shasum "$(PaketRestoreCacheFile)" | /usr/bin/awk '{ print $1 }' - /usr/bin/shasum "$(PaketLockFilePath)" | /usr/bin/awk '{ print $1 }' + + + + + + + $([System.IO.File]::ReadAllText('$(PaketRestoreCacheFile)')) + + + + + + + $([System.Text.RegularExpressions.Regex]::Split(`%(Identity)`, `": "`)[0].Replace(`"`, ``).Replace(` `, ``)) + $([System.Text.RegularExpressions.Regex]::Split(`%(Identity)`, `": "`)[1].Replace(`"`, ``).Replace(` `, ``)) + + + + + %(PaketRestoreCachedKeyValue.Value) + %(PaketRestoreCachedKeyValue.Value) - - - - - - - - - - - - - - $([System.IO.File]::ReadAllText('$(PaketRestoreCacheFile)')) - $([System.IO.File]::ReadAllText('$(PaketLockFilePath)')) + + true - false + false true - + + true - - - + + + + + + - + - + - $(MSBuildProjectDirectory)\obj\$(MSBuildProjectFile).paket.references.cached + $(PaketIntermediateOutputPath)\$(MSBuildProjectFile).paket.references.cached $(MSBuildProjectFullPath).paket.references @@ -124,8 +181,9 @@ - - + + + @@ -141,21 +199,24 @@ + $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',').Length) $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[0]) $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[1]) $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[4]) - $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[5]) + $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[5]) %(PaketReferencesFileLinesInfo.PackageVersion) All - runtime + runtime + runtime true + true - $(MSBuildProjectDirectory)/obj/$(MSBuildProjectFile).paket.clitools + $(PaketIntermediateOutputPath)/$(MSBuildProjectFile).paket.clitools @@ -174,44 +235,144 @@ - + false - + - <_NuspecFilesNewLocation Include="$(BaseIntermediateOutputPath)$(Configuration)\*.nuspec"/> + <_NuspecFilesNewLocation Include="$(PaketIntermediateOutputPath)\$(Configuration)\*.nuspec"/> + + $(MSBuildProjectDirectory)/$(MSBuildProjectFile) true - false - true - $(BaseIntermediateOutputPath)$(Configuration) - $(BaseIntermediateOutputPath) + false + true + false + true + false + true + false + true + $(PaketIntermediateOutputPath)\$(Configuration) + $(PaketIntermediateOutputPath) - <_NuspecFiles Include="$(AdjustedNuspecOutputPath)\*.nuspec"/> + <_NuspecFiles Include="$(AdjustedNuspecOutputPath)\*.$(PackageVersion.Split(`+`)[0]).nuspec"/> - + + + - - + + + + - // Build library & test project let mutable dotnetExePath = "dotnet" -let dotnetcliVersion = "2.1.300" +let dotnetcliVersion = "2.2.301" Target "InstallDotNetCore" (fun _ -> dotnetExePath <- DotNetCli.InstallDotNetSDK dotnetcliVersion @@ -114,12 +114,12 @@ Target "InstallDotNetCore" (fun _ -> ) Target "Build" (fun _ -> - let outDir = __SOURCE_DIRECTORY__ + "/bin/lib/net45/" + let outDir = __SOURCE_DIRECTORY__ + "/bin/lib/net461/" CreateDir outDir DotNetCli.Publish (fun p -> { p with Output = outDir - Framework = "net45" + Framework = "net461" WorkingDir = "src/FSharp.Configuration/" }) let outDir = __SOURCE_DIRECTORY__ + "/bin/lib/netstandard2.0/" diff --git a/global.json b/global.json new file mode 100644 index 00000000..8de4ff4f --- /dev/null +++ b/global.json @@ -0,0 +1,5 @@ +{ + "sdk": { + "version": "2.2.301" + } +} \ No newline at end of file diff --git a/paket.dependencies b/paket.dependencies index 967e135f..22a82977 100644 --- a/paket.dependencies +++ b/paket.dependencies @@ -1,27 +1,19 @@ source http://nuget.org/api/v2 -framework: netstandard2.0 +framework: netstandard2.0, net461 redirects: force nuget YamlDotNet nuget FSharp.Core 4.3.4 nuget System.Configuration.ConfigurationManager -nuget NETStandard.Library.NETFramework prerelease +nuget NETStandard.Library.NETFramework github fsprojects/FSharp.TypeProviders.SDK src/ProvidedTypes.fs github fsprojects/FSharp.TypeProviders.SDK src/ProvidedTypes.fsi github fsprojects/FSharp.TypeProviders.SDK src/ProvidedTypesTesting.fs -group Legacy - source https://api.nuget.org/v3/index.json - framework: net45 - redirects: force - - nuget YamlDotNet - nuget FSharp.Core >= 4.0 lowest_matching:true - group Build - framework: net45 + framework: net461 source https://nuget.org/api/v2 nuget FAKE ~> 4.0 diff --git a/paket.lock b/paket.lock index bbb3ac42..1053cf41 100644 --- a/paket.lock +++ b/paket.lock @@ -1,23 +1,28 @@ REDIRECTS: FORCE -RESTRICTION: == netstandard2.0 +RESTRICTION: || (== net461) (== netstandard2.0) NUGET remote: http://www.nuget.org/api/v2 FSharp.Core (4.3.4) + Microsoft.NETCore.Platforms (2.2.0-preview3-27014-02) - restriction: || (== net461) (&& (== netstandard2.0) (>= net461)) + NETStandard.Library (2.0.3) - restriction: || (== net461) (&& (== netstandard2.0) (>= net461)) + Microsoft.NETCore.Platforms (>= 1.1) NETStandard.Library.NETFramework (2.0.0-preview2-25405-01) - System.Buffers (4.5) + Microsoft.NETCore.Platforms (>= 2.0.0-preview2-25405-01) - restriction: || (== net461) (&& (== netstandard2.0) (>= net461)) + NETStandard.Library (>= 2.0.0-preview2-25401-01) - restriction: || (== net461) (&& (== netstandard2.0) (>= net461)) + System.Buffers (4.5) - restriction: == netstandard2.0 System.Configuration.ConfigurationManager (4.5) - System.Security.Cryptography.ProtectedData (>= 4.5) + System.Security.Cryptography.ProtectedData (>= 4.5) - restriction: == netstandard2.0 System.Security.Permissions (>= 4.5) - System.Memory (4.5.1) + System.Memory (4.5.1) - restriction: == netstandard2.0 System.Buffers (>= 4.4) System.Numerics.Vectors (>= 4.4) System.Runtime.CompilerServices.Unsafe (>= 4.5) - System.Numerics.Vectors (4.5) - System.Runtime.CompilerServices.Unsafe (4.5.2) + System.Numerics.Vectors (4.5) - restriction: == netstandard2.0 + System.Runtime.CompilerServices.Unsafe (4.5.2) - restriction: == netstandard2.0 System.Security.AccessControl (4.5) System.Security.Principal.Windows (>= 4.5) - System.Security.Cryptography.ProtectedData (4.5) - System.Memory (>= 4.5) + System.Security.Cryptography.ProtectedData (4.5) - restriction: == netstandard2.0 + System.Memory (>= 4.5) - restriction: || (&& (== net461) (< net46) (>= netstandard2.0)) (== netstandard2.0) System.Security.Permissions (4.5) System.Security.AccessControl (>= 4.5) System.Security.Principal.Windows (4.5.1) @@ -28,7 +33,7 @@ GITHUB src/ProvidedTypes.fsi (7d57cd409d7299592822713195924e42b2b7acde) src/ProvidedTypesTesting.fs (7d57cd409d7299592822713195924e42b2b7acde) GROUP Build -RESTRICTION: == net45 +RESTRICTION: == net461 NUGET remote: https://www.nuget.org/api/v2 FAKE (4.64.13) @@ -44,14 +49,6 @@ GITHUB remote: fsharp/FAKE modules/Octokit/Octokit.fsx (3827f95ad533978ec14c29db92658f48b0609e05) Octokit (>= 0.20) -GROUP Legacy -REDIRECTS: FORCE -RESTRICTION: == net45 -NUGET - remote: https://api.nuget.org/v3/index.json - FSharp.Core (4.0.0.1) - YamlDotNet (5.2.1) - GROUP Test REDIRECTS: FORCE RESTRICTION: || (== net461) (== netcoreapp2.0) diff --git a/paket.template b/paket.template index 7df54d29..08384dac 100644 --- a/paket.template +++ b/paket.template @@ -15,7 +15,7 @@ licenseUrl requireLicenseAcceptance false copyright - Copyright 2014-2018 + Copyright 2014-2019 tags appsettings YAML F# ResX Ini config summary @@ -23,8 +23,8 @@ summary description The FSharp.Configuration project contains type providers for the configuration of .NET projects. files - bin/lib/net45/FSharp.Configuration.* ==> lib/net45 - bin/lib/net45/YamlDotNet.dll ==> lib/net45 + bin/lib/net461/FSharp.Configuration.* ==> lib/net461 + bin/lib/net461/YamlDotNet.dll ==> lib/net461 bin/lib/netstandard2.0/FSharp.Configuration.* ==> lib/netstandard2.0 bin/lib/netstandard2.0/YamlDotNet.dll ==> lib/netstandard2.0 bin/lib/netstandard2.0/System.*.dll ==> lib/netstandard2.0 @@ -36,8 +36,8 @@ files dependencies framework: netstandard20 FSharp.Core >= LOCKEDVERSION - framework: net45 - FSharp.Core >= LOCKEDVERSION-Legacy + framework: net461 + FSharp.Core >= LOCKEDVERSION references FSharp.Configuration.dll YamlDotNet.dll \ No newline at end of file diff --git a/src/FSharp.Configuration/AppSettingsProvider.fs b/src/FSharp.Configuration/AppSettingsProvider.fs index 6e702463..5e5f3472 100644 --- a/src/FSharp.Configuration/AppSettingsProvider.fs +++ b/src/FSharp.Configuration/AppSettingsProvider.fs @@ -8,7 +8,7 @@ open System open System.Configuration open System.Collections.Generic open System.Globalization -#if NET45 +#if NET461 open System.Web.Hosting #endif @@ -20,7 +20,7 @@ let getConfig file = if path.ContainsKey(file) && System.IO.File.Exists(path.[file]) then ConfigurationManager.OpenExeConfiguration path.[file] else -#if NET45 +#if NET461 if HostingEnvironment.IsHosted then Web.Configuration.WebConfigurationManager.OpenWebConfiguration "~" else ConfigurationManager.OpenExeConfiguration ConfigurationUserLevel.None diff --git a/src/FSharp.Configuration/ConfigTypeProvider.fs b/src/FSharp.Configuration/ConfigTypeProvider.fs index dd65119c..bbc22148 100644 --- a/src/FSharp.Configuration/ConfigTypeProvider.fs +++ b/src/FSharp.Configuration/ConfigTypeProvider.fs @@ -11,7 +11,7 @@ type FSharpConfigurationProvider(cfg: TypeProviderConfig) as this = do this.AddNamespace ( rootNamespace, [ -#if NET45 +#if NET461 ResXProvider.typedResources context #endif AppSettingsTypeProvider.typedAppSettings context diff --git a/src/FSharp.Configuration/FSharp.Configuration.fsproj b/src/FSharp.Configuration/FSharp.Configuration.fsproj index 71de90f9..9dceb8bc 100644 --- a/src/FSharp.Configuration/FSharp.Configuration.fsproj +++ b/src/FSharp.Configuration/FSharp.Configuration.fsproj @@ -2,17 +2,18 @@ - netstandard2.0;net45 + netstandard2.0;net461 FSharp.Configuration true PackageReference true + + NET461 + - - - - + + @@ -35,7 +36,7 @@ - + PreserveNewest diff --git a/src/FSharp.Configuration/ResXProvider.fs b/src/FSharp.Configuration/ResXProvider.fs index 46cd9a08..eeb0c9e0 100644 --- a/src/FSharp.Configuration/ResXProvider.fs +++ b/src/FSharp.Configuration/ResXProvider.fs @@ -1,6 +1,6 @@ module FSharp.Configuration.ResXProvider -#if NET45 +#if NET461 open System open System.IO diff --git a/src/FSharp.Configuration/paket.references b/src/FSharp.Configuration/paket.references index acb5f9c2..54b4818c 100644 --- a/src/FSharp.Configuration/paket.references +++ b/src/FSharp.Configuration/paket.references @@ -5,8 +5,4 @@ System.Configuration.ConfigurationManager File: ProvidedTypes.fsi . File: ProvidedTypes.fs . -File: ProvidedTypesTesting.fs . - -group Legacy - FSharp.Core framework: net45 - YamlDotNet framework: net45 \ No newline at end of file +File: ProvidedTypesTesting.fs . \ No newline at end of file diff --git a/tests/FSharp.Configuration.Tests/FSharp.Configuration.Tests.fsproj b/tests/FSharp.Configuration.Tests/FSharp.Configuration.Tests.fsproj index 5b410681..9afb02f1 100644 --- a/tests/FSharp.Configuration.Tests/FSharp.Configuration.Tests.fsproj +++ b/tests/FSharp.Configuration.Tests/FSharp.Configuration.Tests.fsproj @@ -6,7 +6,8 @@ Exe netcoreapp2.0; net461 FSharp.Configuration.Tests - true + true + NET461 @@ -31,8 +32,27 @@ - - + + + ..\..\bin\lib\net461\FSharp.Configuration.dll + + + ..\..\bin\lib\net461\System.Configuration.ConfigurationManager.dll + + + ..\..\bin\lib\net461\YamlDotNet.dll + + + + + ..\..\bin\lib\netstandard2.0\FSharp.Configuration.dll + + + ..\..\bin\lib\netstandard2.0\System.Configuration.ConfigurationManager.dll + + + ..\..\bin\lib\netstandard2.0\YamlDotNet.dll + \ No newline at end of file diff --git a/tests/FSharp.Configuration.Tests/app.config b/tests/FSharp.Configuration.Tests/app.config index d17859e3..a484b428 100644 --- a/tests/FSharp.Configuration.Tests/app.config +++ b/tests/FSharp.Configuration.Tests/app.config @@ -14,53 +14,60 @@ - - - - - - - + + + + + - - + True + + - - + True + + - - + True + + - - + True + + - - + True + + - - + True + + - - + True + + - - + True + + - - + True + + True - - + + True @@ -92,11 +99,6 @@ - - True - - - True @@ -107,58 +109,24 @@ - - True - - - True - - True - - - True - - True - - - True - - True - - - - - True - - - - - True - - - True - - - - - \ No newline at end of file + \ No newline at end of file From 8703d2400e72253d4b0399aecb14a47ce52b566f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 2 Nov 2019 01:53:40 +0000 Subject: [PATCH 20/41] Bump bootstrap in /tests/FSharp.Configuration.Web.Test Bumps bootstrap from 3.0.2 to 3.4.1. Signed-off-by: dependabot[bot] --- tests/FSharp.Configuration.Web.Test/packages.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/FSharp.Configuration.Web.Test/packages.config b/tests/FSharp.Configuration.Web.Test/packages.config index 243cf971..391662b6 100644 --- a/tests/FSharp.Configuration.Web.Test/packages.config +++ b/tests/FSharp.Configuration.Web.Test/packages.config @@ -1,7 +1,7 @@  - + From a1df7773f6ef4b204bd6cfed42930f19fac17fcc Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Sun, 8 Dec 2019 22:34:16 +0300 Subject: [PATCH 21/41] .NET Core 2.1 LTS --- .paket/Paket.Restore.targets | 111 ++++++++++++++++++++++------------- .travis.yml | 2 +- build.fsx | 6 +- global.json | 2 +- 4 files changed, 74 insertions(+), 47 deletions(-) diff --git a/.paket/Paket.Restore.targets b/.paket/Paket.Restore.targets index 8b180290..dfc4aaec 100644 --- a/.paket/Paket.Restore.targets +++ b/.paket/Paket.Restore.targets @@ -7,7 +7,7 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) $(MSBuildVersion) - 15.0.0 + 15.0.0 false true @@ -20,59 +20,86 @@ proj assembly native - /Library/Frameworks/Mono.framework/Commands/mono + /Library/Frameworks/Mono.framework/Commands/mono mono $(PaketRootPath)paket.bootstrapper.exe $(PaketToolsPath)paket.bootstrapper.exe $([System.IO.Path]::GetDirectoryName("$(PaketBootStrapperExePath)"))\ + + "$(PaketBootStrapperExePath)" + $(MonoPath) --runtime=v4.0.30319 "$(PaketBootStrapperExePath)" + + + True - + + False - - $(PaketRootPath)paket.exe - $(PaketToolsPath)paket.exe - $(PaketToolsPath)paket.exe - $(_PaketBootStrapperExeDir)paket.exe - paket.exe + $(BaseIntermediateOutputPath.TrimEnd('\').TrimEnd('\/')) + - - $(PaketRootPath)paket - $(PaketToolsPath)paket - $(PaketToolsPath)paket + + + + + + + $(PaketRootPath)paket + $(PaketToolsPath)paket + - - $(PaketRootPath)paket.exe - $(PaketToolsPath)paket.exe + + + + $(PaketRootPath)paket.exe + $(PaketToolsPath)paket.exe + - - $(PaketBootStrapperExeDir)paket.exe + + + + <_DotnetToolsJson Condition="Exists('$(PaketRootPath)/.config/dotnet-tools.json')">$([System.IO.File]::ReadAllText("$(PaketRootPath)/.config/dotnet-tools.json")) + <_ConfigContainsPaket Condition=" '$(_DotnetToolsJson)' != ''">$(_DotnetToolsJson.Contains('"paket"')) + <_ConfigContainsPaket Condition=" '$(_ConfigContainsPaket)' == ''">false + - - paket + + + + + - - <_PaketExeExtension>$([System.IO.Path]::GetExtension("$(PaketExePath)")) - dotnet "$(PaketExePath)" - $(MonoPath) --runtime=v4.0.30319 "$(PaketExePath)" - "$(PaketExePath)" + + + <_PaketCommand>dotnet paket + + + + + $(PaketToolsPath)paket + $(PaketBootStrapperExeDir)paket - "$(PaketBootStrapperExePath)" - $(MonoPath) --runtime=v4.0.30319 "$(PaketBootStrapperExePath)" + + paket + - - - - true - true + + + <_PaketExeExtension>$([System.IO.Path]::GetExtension("$(PaketExePath)")) + <_PaketCommand Condition=" '$(_PaketCommand)' == '' AND '$(_PaketExeExtension)' == '.dll' ">dotnet "$(PaketExePath)" + <_PaketCommand Condition=" '$(_PaketCommand)' == '' AND '$(OS)' != 'Windows_NT' AND '$(_PaketExeExtension)' == '.exe' ">$(MonoPath) --runtime=v4.0.30319 "$(PaketExePath)" + <_PaketCommand Condition=" '$(_PaketCommand)' == '' ">"$(PaketExePath)" + - - True + + + + - $(BaseIntermediateOutputPath.TrimEnd('\').TrimEnd('\/')) - + @@ -81,7 +108,7 @@ - + @@ -116,7 +143,7 @@ - + true false true @@ -203,7 +230,7 @@ $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[0]) $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[1]) $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[4]) - $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[5]) + $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[5]) %(PaketReferencesFileLinesInfo.PackageVersion) @@ -246,7 +273,7 @@ - + <_NuspecFilesNewLocation Include="$(PaketIntermediateOutputPath)\$(Configuration)\*.nuspec"/> @@ -300,7 +327,7 @@ DevelopmentDependency="$(DevelopmentDependency)" BuildOutputInPackage="@(_BuildOutputInPackage)" TargetPathsToSymbols="@(_TargetPathsToSymbols)" - SymbolPackageFormat="symbols.nupkg" + SymbolPackageFormat="$(SymbolPackageFormat)" TargetFrameworks="@(_TargetFrameworks)" AssemblyName="$(AssemblyName)" PackageOutputPath="$(PackageOutputAbsolutePath)" @@ -347,7 +374,7 @@ DevelopmentDependency="$(DevelopmentDependency)" BuildOutputInPackage="@(_BuildOutputInPackage)" TargetPathsToSymbols="@(_TargetPathsToSymbols)" - SymbolPackageFormat="symbols.nupkg" + SymbolPackageFormat="$(SymbolPackageFormat)" TargetFrameworks="@(_TargetFrameworks)" AssemblyName="$(AssemblyName)" PackageOutputPath="$(PackageOutputAbsolutePath)" diff --git a/.travis.yml b/.travis.yml index 0bd62c20..7f8485f4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ language: csharp dist: trusty sudo: true -dotnet: 2.2.301 +dotnet: 2.1.802 script: - ./build.sh \ No newline at end of file diff --git a/build.fsx b/build.fsx index 388fd14c..ae3cad24 100644 --- a/build.fsx +++ b/build.fsx @@ -61,7 +61,7 @@ let nugetDir = "./nuget/" // Read additional information from the release notes document let release = LoadReleaseNotes "RELEASE_NOTES.md" -let genFSAssemblyInfo (projectPath) = +let genFSAssemblyInfo (projectPath:string) = let projectName = System.IO.Path.GetFileNameWithoutExtension(projectPath) let basePath = "src/" + projectName let fileName = basePath + "/AssemblyInfo.fs" @@ -72,7 +72,7 @@ let genFSAssemblyInfo (projectPath) = Attribute.Version release.AssemblyVersion Attribute.FileVersion release.AssemblyVersion ] -let genCSAssemblyInfo (projectPath) = +let genCSAssemblyInfo (projectPath:string) = let projectName = System.IO.Path.GetFileNameWithoutExtension(projectPath) let basePath = "src/" + projectName + "/Properties" let fileName = basePath + "/AssemblyInfo.cs" @@ -106,7 +106,7 @@ Target "CleanDocs" (fun _ -> // Build library & test project let mutable dotnetExePath = "dotnet" -let dotnetcliVersion = "2.2.301" +let dotnetcliVersion = "2.1.802" Target "InstallDotNetCore" (fun _ -> dotnetExePath <- DotNetCli.InstallDotNetSDK dotnetcliVersion diff --git a/global.json b/global.json index 8de4ff4f..f2fbc464 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "sdk": { - "version": "2.2.301" + "version": "2.1.802" } } \ No newline at end of file From ad78d5da75d8aa12ff43c9b4c68c11e0e1a00996 Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Mon, 9 Dec 2019 07:01:23 +0300 Subject: [PATCH 22/41] GitHub Actions --- .github/workflows/dotnetcore.yml | 32 ++++++++++++++++++++++++++++++++ .travis.yml | 8 -------- appveyor.yml | 10 ---------- 3 files changed, 32 insertions(+), 18 deletions(-) create mode 100644 .github/workflows/dotnetcore.yml delete mode 100644 .travis.yml delete mode 100644 appveyor.yml diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml new file mode 100644 index 00000000..c755e3b0 --- /dev/null +++ b/.github/workflows/dotnetcore.yml @@ -0,0 +1,32 @@ +name: Build and Test + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + build: + + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macOS-latest] + dotnet: [2.1.802] + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v1 + - name: Setup .NET Core + # Fix for https://github.com/actions/setup-dotnet/issues/29#issuecomment-548740241 + uses: actions/setup-dotnet@bb95ce727fd49ec1a65933419cc7c91747785302 + with: + dotnet-version: ${{ matrix.dotnet }} + - name: Build and Test (.sh) + if: matrix.os != 'windows-latest' + run: ./build.sh + - name: Build and Test (.cmd) + if: matrix.os == 'windows-latest' + run: .\build.cmd diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 7f8485f4..00000000 --- a/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: csharp -dist: trusty -sudo: true - -dotnet: 2.1.802 - -script: - - ./build.sh \ No newline at end of file diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index c2470876..00000000 --- a/appveyor.yml +++ /dev/null @@ -1,10 +0,0 @@ -os: Visual Studio 2017 -init: - - git config --global core.autocrlf input -build_script: - - cmd: build.cmd -test: off -version: 0.0.1.{build} -artifacts: - - path: nuget/*.nupkg - name: nuget \ No newline at end of file From 9aa9e7c04e2102a31dec390532988a69d4e7514a Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Mon, 9 Dec 2019 07:05:39 +0300 Subject: [PATCH 23/41] Create dotnetcore.yml --- .github/workflows/dotnetcore.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/dotnetcore.yml diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml new file mode 100644 index 00000000..7df21695 --- /dev/null +++ b/.github/workflows/dotnetcore.yml @@ -0,0 +1,32 @@ +name: Build and Test + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + build: + + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macOS-latest] + dotnet: [2.1.802] + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v1 + - name: Setup .NET Core + # Fix for https://github.com/actions/setup-dotnet/issues/29#issuecomment-548740241 + uses: actions/setup-dotnet@bb95ce727fd49ec1a65933419cc7c91747785302 + with: + dotnet-version: ${{ matrix.dotnet }} + - name: Build and Test (.sh) + if: matrix.os != 'windows-latest' + run: ./build.sh + - name: Build and Test (.cmd) + if: matrix.os == 'windows-latest' + run: .\build.cmd From c9cf4a45212ec3365738ac9c18be92c1f4ef60c3 Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Mon, 9 Dec 2019 07:27:50 +0300 Subject: [PATCH 24/41] no need to install dotnet from fake --- build.fsx | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/build.fsx b/build.fsx index ae3cad24..91711657 100644 --- a/build.fsx +++ b/build.fsx @@ -105,14 +105,6 @@ Target "CleanDocs" (fun _ -> // -------------------------------------------------------------------------------------- // Build library & test project -let mutable dotnetExePath = "dotnet" -let dotnetcliVersion = "2.1.802" - -Target "InstallDotNetCore" (fun _ -> - dotnetExePath <- DotNetCli.InstallDotNetSDK dotnetcliVersion - Environment.SetEnvironmentVariable("DOTNET_EXE_PATH", dotnetExePath) -) - Target "Build" (fun _ -> let outDir = __SOURCE_DIRECTORY__ + "/bin/lib/net461/" CreateDir outDir @@ -136,7 +128,6 @@ Target "BuildTests" (fun _ -> { c with Project = "FSharp.Configuration.Tests.sln" Configuration = "Release" - ToolPath = dotnetExePath AdditionalArgs= ["-v n"] }) ) @@ -273,7 +264,6 @@ Target "All" DoNothing "Clean" ==> "AssemblyInfo" - ==> "InstallDotNetCore" ==> "Build" ==> "BuildTests" ==> "RunTests" From 40ee97d8558ede9c7a582fbb5a924a7bdc2d12dd Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Mon, 9 Dec 2019 07:56:48 +0300 Subject: [PATCH 25/41] build using .net core 3.1 --- .github/workflows/dotnetcore.yml | 2 +- global.json | 2 +- paket.dependencies | 5 +- paket.lock | 242 +----------------- .../FSharp.Configuration.Tests.fsproj | 1 + tests/FSharp.Configuration.Tests/app.config | 84 ++---- .../paket.references | 3 +- 7 files changed, 45 insertions(+), 294 deletions(-) diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml index 7df21695..e59eac88 100644 --- a/.github/workflows/dotnetcore.yml +++ b/.github/workflows/dotnetcore.yml @@ -14,7 +14,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest, macOS-latest] - dotnet: [2.1.802] + dotnet: [3.1.100] runs-on: ${{ matrix.os }} steps: diff --git a/global.json b/global.json index f2fbc464..c6f34e8d 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "sdk": { - "version": "2.1.802" + "version": "3.1.100" } } \ No newline at end of file diff --git a/paket.dependencies b/paket.dependencies index 22a82977..020b054a 100644 --- a/paket.dependencies +++ b/paket.dependencies @@ -28,5 +28,6 @@ group Test source https://nuget.org/api/v2 redirects: force - nuget FSharp.Core 4.3.4 redirects: force - nuget Expecto \ No newline at end of file + nuget FSharp.Core redirects: force + nuget Expecto + nuget System.Resources.Extensions \ No newline at end of file diff --git a/paket.lock b/paket.lock index 1053cf41..fab011f9 100644 --- a/paket.lock +++ b/paket.lock @@ -54,235 +54,13 @@ REDIRECTS: FORCE RESTRICTION: || (== net461) (== netcoreapp2.0) NUGET remote: https://www.nuget.org/api/v2 - Argu (5.1) - FSharp.Core (>= 4.0.0.1) - restriction: || (== net461) (&& (== netcoreapp2.0) (>= net45)) - FSharp.Core (>= 4.3.2) - restriction: || (&& (== net461) (< net45) (>= netstandard2.0)) (== netcoreapp2.0) - System.Configuration.ConfigurationManager (>= 4.4) - restriction: || (&& (== net461) (< net45) (>= netstandard2.0)) (== netcoreapp2.0) - Expecto (8.4.2) - Argu (>= 5.1) - Mono.Cecil (>= 0.10) - System.Diagnostics.FileVersionInfo (>= 4.3) - restriction: == netcoreapp2.0 - FSharp.Core (4.3.4) - redirects: force - Microsoft.NETCore.Platforms (2.1.1) - restriction: || (&& (== net461) (>= netcoreapp2.0)) (== netcoreapp2.0) - Microsoft.NETCore.Targets (2.1) - restriction: == netcoreapp2.0 - Mono.Cecil (0.10.1) - System.Collections (>= 4.0.11) - restriction: || (&& (== net461) (< net35)) (== netcoreapp2.0) - System.IO.FileSystem (>= 4.0.1) - restriction: || (&& (== net461) (< net35)) (== netcoreapp2.0) - System.IO.FileSystem.Primitives (>= 4.0.1) - restriction: || (&& (== net461) (< net35)) (== netcoreapp2.0) - System.Reflection (>= 4.1) - restriction: || (&& (== net461) (< net35)) (== netcoreapp2.0) - System.Runtime.Extensions (>= 4.1) - restriction: || (&& (== net461) (< net35)) (== netcoreapp2.0) - System.Security.Cryptography.Algorithms (>= 4.2) - restriction: || (&& (== net461) (< net35)) (== netcoreapp2.0) - System.Security.Cryptography.Csp (>= 4.0) - restriction: || (&& (== net461) (< net35)) (== netcoreapp2.0) - System.Threading (>= 4.0.11) - restriction: || (&& (== net461) (< net35)) (== netcoreapp2.0) - runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) - runtime.debian.9-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) - runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) - runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) - runtime.fedora.27-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) - runtime.fedora.28-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) - runtime.native.System.Security.Cryptography.Apple (4.3.1) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) - runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple (>= 4.3.1) - runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) - runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) - runtime.debian.9-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) - runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) - runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) - runtime.fedora.27-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) - runtime.fedora.28-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) - runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) - runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) - runtime.opensuse.42.3-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) - runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) - runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) - runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) - runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) - runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) - runtime.ubuntu.18.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) - runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) - runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) - runtime.opensuse.42.3-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) - runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple (4.3.1) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) - runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) - runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) - runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) - runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) - runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) - runtime.ubuntu.18.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) - System.Collections (4.3) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) - Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) - Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) - System.Runtime (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) - System.Collections.Concurrent (4.3) - restriction: || (&& (== net461) (< net35) (>= net463)) (&& (== net461) (< net35) (< netstandard1.3)) (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) - System.Collections (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wpa81)) (== netcoreapp2.0) - System.Diagnostics.Debug (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wpa81)) (== netcoreapp2.0) - System.Diagnostics.Tracing (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wpa81)) (== netcoreapp2.0) - System.Globalization (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wpa81)) (== netcoreapp2.0) - System.Reflection (>= 4.3) - restriction: || (&& (== net461) (< net45)) (== netcoreapp2.0) - System.Resources.ResourceManager (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wpa81)) (== netcoreapp2.0) - System.Runtime (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wpa81)) (== netcoreapp2.0) - System.Runtime.Extensions (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wpa81)) (== netcoreapp2.0) - System.Threading (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wpa81)) (== netcoreapp2.0) - System.Threading.Tasks (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wpa81)) (== netcoreapp2.0) - System.Collections.Immutable (1.5) - restriction: == netcoreapp2.0 - System.Configuration.ConfigurationManager (4.5) - restriction: || (&& (== net461) (< net45) (>= netstandard2.0)) (== netcoreapp2.0) - System.Security.Cryptography.ProtectedData (>= 4.5) - restriction: == netcoreapp2.0 - System.Security.Permissions (>= 4.5) - System.Diagnostics.Debug (4.3) - restriction: || (&& (== net461) (< net35)) (== netcoreapp2.0) - Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) - Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) - System.Runtime (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) - System.Diagnostics.FileVersionInfo (4.3) - restriction: == netcoreapp2.0 - Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (== net461) (< net46)) (&& (== net461) (< netstandard1.3)) (== netcoreapp2.0) - System.Globalization (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) - System.IO (>= 4.3) - restriction: || (&& (== net461) (< net46)) (&& (== net461) (< netstandard1.3)) (== netcoreapp2.0) - System.IO.FileSystem (>= 4.3) - restriction: || (&& (== net461) (< net46)) (&& (== net461) (< netstandard1.3)) (== netcoreapp2.0) - System.IO.FileSystem.Primitives (>= 4.3) - restriction: || (&& (== net461) (< net46)) (&& (== net461) (< netstandard1.3)) (== netcoreapp2.0) - System.Reflection.Metadata (>= 1.4.1) - restriction: || (&& (== net461) (< net46)) (&& (== net461) (< netstandard1.3)) (== netcoreapp2.0) - System.Runtime (>= 4.3) - restriction: || (&& (== net461) (< net46)) (&& (== net461) (< netstandard1.3)) (== netcoreapp2.0) - System.Runtime.Extensions (>= 4.3) - restriction: || (&& (== net461) (< net46)) (&& (== net461) (< netstandard1.3)) (== netcoreapp2.0) - System.Runtime.InteropServices (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) - System.Diagnostics.Tracing (4.3) - restriction: || (&& (== net461) (< net35) (>= net463)) (&& (== net461) (< net35) (< netstandard1.3)) (&& (== net461) (< net35) (>= netstandard1.6)) (&& (== net461) (< net35) (< portable-net45+win8+wpa81)) (== netcoreapp2.0) - Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wpa81)) (== netcoreapp2.0) - Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wpa81)) (== netcoreapp2.0) - System.Runtime (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wpa81)) (== netcoreapp2.0) - System.Globalization (4.3) - restriction: == netcoreapp2.0 - Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) - Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) - System.Runtime (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) - System.IO (4.3) - restriction: == netcoreapp2.0 - Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) - Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) - System.Runtime (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) - System.Text.Encoding (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) - System.Threading.Tasks (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) - System.IO.FileSystem (4.3) - restriction: == netcoreapp2.0 - Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) - Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) - System.IO (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) - System.IO.FileSystem.Primitives (>= 4.3) - System.Runtime (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) - System.Runtime.Handles (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) - System.Text.Encoding (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) - System.Threading.Tasks (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) - System.IO.FileSystem.Primitives (4.3) - restriction: == netcoreapp2.0 - System.Runtime (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) - System.Linq (4.3) - restriction: || (&& (== net461) (< net35) (>= net463)) (&& (== net461) (< net35) (< netstandard1.3)) (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) - System.Collections (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) - System.Diagnostics.Debug (>= 4.3) - restriction: || (&& (== net461) (< net45) (>= netstandard1.6)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) - System.Resources.ResourceManager (>= 4.3) - restriction: || (&& (== net461) (< net45) (>= netstandard1.6)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) - System.Runtime (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) - System.Runtime.Extensions (>= 4.3) - restriction: || (&& (== net461) (< net45) (>= netstandard1.6)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) - System.Memory (4.5.1) - restriction: || (&& (== net461) (< net45) (>= netstandard2.0)) (== netcoreapp2.0) - System.Runtime.CompilerServices.Unsafe (>= 4.5) - System.Reflection (4.3) - restriction: == netcoreapp2.0 - Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) - Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) - System.IO (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) - System.Reflection.Primitives (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) - System.Runtime (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) - System.Reflection.Metadata (1.6) - restriction: == netcoreapp2.0 - System.Collections.Immutable (>= 1.5) - System.Reflection.Primitives (4.3) - restriction: == netcoreapp2.0 - Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) - Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) - System.Runtime (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) - System.Resources.ResourceManager (4.3) - restriction: || (&& (== net461) (< net35) (< netstandard1.3)) (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) - Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) - Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) - System.Globalization (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) - System.Reflection (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) - System.Runtime (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) - System.Runtime (4.3) - restriction: == netcoreapp2.0 - Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) - Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) - System.Runtime.CompilerServices.Unsafe (4.5.2) - restriction: || (&& (== net461) (>= monoandroid) (>= netstandard2.0)) (&& (== net461) (>= monotouch) (>= netstandard2.0)) (&& (== net461) (< net45) (>= netstandard2.0)) (&& (== net461) (>= netcoreapp2.0)) (&& (== net461) (< netstandard1.1) (>= netstandard2.0)) (&& (== net461) (>= netstandard2.0) (>= uap10.1)) (&& (== net461) (>= netstandard2.0) (>= wpa81)) (&& (== net461) (>= netstandard2.0) (>= xamarinmac)) (&& (== net461) (>= netstandard2.0) (>= xamarintvos)) (&& (== net461) (>= netstandard2.0) (>= xamarinwatchos)) (&& (== net461) (>= xamarinios)) (== netcoreapp2.0) - System.Runtime.Extensions (4.3) - restriction: == netcoreapp2.0 - Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) - Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) - System.Runtime (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) - System.Runtime.Handles (4.3) - restriction: == netcoreapp2.0 - Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) - Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) - System.Runtime (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) - System.Runtime.InteropServices (4.3) - restriction: == netcoreapp2.0 - Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (>= netcoreapp1.1)) (&& (== net461) (< portable-net45+win8+wpa81)) (== netcoreapp2.0) - Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (>= netcoreapp1.1)) (&& (== net461) (< portable-net45+win8+wpa81)) (== netcoreapp2.0) - System.Reflection (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (>= netcoreapp1.1)) (&& (== net461) (< portable-net45+win8+wpa81)) (== netcoreapp2.0) - System.Reflection.Primitives (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (>= netcoreapp1.1)) (&& (== net461) (< portable-net45+win8+wpa81)) (== netcoreapp2.0) - System.Runtime (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (>= net462)) (&& (== net461) (>= netcoreapp1.1)) (&& (== net461) (< portable-net45+win8+wpa81)) (== netcoreapp2.0) - System.Runtime.Handles (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (>= netcoreapp1.1)) (&& (== net461) (< portable-net45+win8+wpa81)) (== netcoreapp2.0) - System.Runtime.Numerics (4.3) - restriction: || (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) - System.Globalization (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wpa81)) (== netcoreapp2.0) - System.Resources.ResourceManager (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wpa81)) (== netcoreapp2.0) - System.Runtime (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wpa81)) (== netcoreapp2.0) - System.Runtime.Extensions (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wpa81)) (== netcoreapp2.0) - System.Security.AccessControl (4.5) - restriction: || (&& (== net461) (>= monoandroid) (>= netstandard2.0)) (&& (== net461) (>= monotouch) (>= netstandard2.0)) (&& (== net461) (< net45) (>= netstandard2.0)) (&& (== net461) (>= netstandard2.0) (>= xamarinmac)) (&& (== net461) (>= netstandard2.0) (>= xamarintvos)) (&& (== net461) (>= netstandard2.0) (>= xamarinwatchos)) (== netcoreapp2.0) - Microsoft.NETCore.Platforms (>= 2.0) - restriction: || (&& (== net461) (>= netcoreapp2.0)) (== netcoreapp2.0) - System.Security.Principal.Windows (>= 4.5) - System.Security.Cryptography.Algorithms (4.3.1) - restriction: || (&& (== net461) (< net35)) (== netcoreapp2.0) - Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (== net461) (< net46) (>= netstandard1.6)) (&& (== net461) (< netstandard1.3)) (== netcoreapp2.0) - runtime.native.System.Security.Cryptography.Apple (>= 4.3.1) - restriction: || (&& (== net461) (< net46) (>= netstandard1.6)) (== netcoreapp2.0) - runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.2) - restriction: || (&& (== net461) (< net46) (>= netstandard1.6)) (== netcoreapp2.0) - System.Collections (>= 4.3) - restriction: || (&& (== net461) (< net46) (>= netstandard1.6)) (== netcoreapp2.0) - System.IO (>= 4.3) - restriction: || (&& (== net461) (< net46)) (&& (== net461) (>= net463)) (&& (== net461) (< netstandard1.3)) (== netcoreapp2.0) - System.Resources.ResourceManager (>= 4.3) - restriction: || (&& (== net461) (< net46) (>= netstandard1.6)) (&& (== net461) (< netstandard1.3)) (== netcoreapp2.0) - System.Runtime (>= 4.3) - restriction: || (&& (== net461) (< net46)) (&& (== net461) (>= net463)) (&& (== net461) (< netstandard1.3)) (== netcoreapp2.0) - System.Runtime.Extensions (>= 4.3) - restriction: || (&& (== net461) (< net46) (>= netstandard1.6)) (&& (== net461) (< netstandard1.3)) (== netcoreapp2.0) - System.Runtime.Handles (>= 4.3) - restriction: || (&& (== net461) (< net46) (>= netstandard1.6)) (&& (== net461) (< netstandard1.3)) (== netcoreapp2.0) - System.Runtime.InteropServices (>= 4.3) - restriction: || (&& (== net461) (< net46) (>= netstandard1.6)) (&& (== net461) (< netstandard1.3)) (== netcoreapp2.0) - System.Runtime.Numerics (>= 4.3) - restriction: || (&& (== net461) (< net46) (>= netstandard1.6)) (== netcoreapp2.0) - System.Security.Cryptography.Encoding (>= 4.3) - restriction: || (&& (== net461) (< net46) (>= netstandard1.6)) (&& (== net461) (>= net463)) (&& (== net461) (< netstandard1.3)) (== netcoreapp2.0) - System.Security.Cryptography.Primitives (>= 4.3) - System.Text.Encoding (>= 4.3) - restriction: || (&& (== net461) (< net46) (>= netstandard1.6)) (&& (== net461) (< netstandard1.3)) (== netcoreapp2.0) - System.Security.Cryptography.Csp (4.3) - restriction: || (&& (== net461) (< net35)) (== netcoreapp2.0) - Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) - System.IO (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) - System.Reflection (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) - System.Resources.ResourceManager (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) - System.Runtime (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) - System.Runtime.Extensions (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) - System.Runtime.Handles (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) - System.Runtime.InteropServices (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) - System.Security.Cryptography.Algorithms (>= 4.3) - System.Security.Cryptography.Encoding (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) - System.Security.Cryptography.Primitives (>= 4.3) - System.Text.Encoding (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) - System.Threading (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) - System.Security.Cryptography.Encoding (4.3) - restriction: || (&& (== net461) (< net35) (>= net463)) (&& (== net461) (< net35) (< netstandard1.3)) (&& (== net461) (< net35) (>= netstandard1.6)) (== netcoreapp2.0) - Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) - runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) - System.Collections (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) - System.Collections.Concurrent (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) - System.Linq (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) - System.Resources.ResourceManager (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) - System.Runtime (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) - System.Runtime.Extensions (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) - System.Runtime.Handles (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) - System.Runtime.InteropServices (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) - System.Security.Cryptography.Primitives (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) - System.Text.Encoding (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) - System.Security.Cryptography.Primitives (4.3) - restriction: || (&& (== net461) (< net35)) (== netcoreapp2.0) - System.Diagnostics.Debug (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) - System.Globalization (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) - System.IO (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) - System.Resources.ResourceManager (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) - System.Runtime (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) - System.Threading (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) - System.Threading.Tasks (>= 4.3) - restriction: || (&& (== net461) (< net46)) (== netcoreapp2.0) - System.Security.Cryptography.ProtectedData (4.5) - restriction: || (&& (== net461) (< net45) (>= netstandard2.0)) (== netcoreapp2.0) - System.Memory (>= 4.5) - restriction: || (&& (== net461) (< net46) (>= netstandard2.0)) (== netcoreapp2.0) - System.Security.Permissions (4.5) - restriction: || (&& (== net461) (>= monoandroid) (>= netstandard2.0)) (&& (== net461) (>= monotouch) (>= netstandard2.0)) (&& (== net461) (< net45) (>= netstandard2.0)) (&& (== net461) (>= netstandard2.0) (>= xamarinmac)) (&& (== net461) (>= netstandard2.0) (>= xamarintvos)) (&& (== net461) (>= netstandard2.0) (>= xamarinwatchos)) (== netcoreapp2.0) - System.Security.AccessControl (>= 4.5) - System.Security.Principal.Windows (4.5.1) - restriction: || (&& (== net461) (>= monoandroid) (>= netstandard2.0)) (&& (== net461) (>= monotouch) (>= netstandard2.0)) (&& (== net461) (< net45) (>= netstandard2.0)) (&& (== net461) (>= netcoreapp2.0)) (&& (== net461) (>= netstandard2.0) (>= xamarinmac)) (&& (== net461) (>= netstandard2.0) (>= xamarintvos)) (&& (== net461) (>= netstandard2.0) (>= xamarinwatchos)) (== netcoreapp2.0) - Microsoft.NETCore.Platforms (>= 2.0) - restriction: || (&& (== net461) (>= netcoreapp2.0)) (== netcoreapp2.0) - System.Text.Encoding (4.3) - restriction: == netcoreapp2.0 - Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) - Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) - System.Runtime (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) - System.Threading (4.3) - restriction: || (&& (== net461) (< net35)) (== netcoreapp2.0) - System.Runtime (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) - System.Threading.Tasks (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) - System.Threading.Tasks (4.3) - restriction: == netcoreapp2.0 - Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) - Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) - System.Runtime (>= 4.3) - restriction: || (&& (== net461) (< net45)) (&& (== net461) (< portable-net45+win8+wp8+wpa81)) (== netcoreapp2.0) + Expecto (8.13.1) + FSharp.Core (>= 4.3.4) + Mono.Cecil (>= 0.11) + FSharp.Core (4.7) - redirects: force + Mono.Cecil (0.11.1) + System.Memory (4.5.3) - restriction: || (&& (== net461) (>= netstandard2.0)) (== netcoreapp2.0) + System.Runtime.CompilerServices.Unsafe (>= 4.5.2) + System.Resources.Extensions (4.7) + System.Memory (>= 4.5.3) - restriction: || (&& (== net461) (>= netstandard2.0)) (== netcoreapp2.0) + System.Runtime.CompilerServices.Unsafe (4.7) - restriction: || (&& (== net461) (>= netcoreapp2.0)) (&& (== net461) (>= netstandard2.0)) (&& (== net461) (>= xamarinios)) (&& (== net461) (>= xamarinmac)) (== netcoreapp2.0) diff --git a/tests/FSharp.Configuration.Tests/FSharp.Configuration.Tests.fsproj b/tests/FSharp.Configuration.Tests/FSharp.Configuration.Tests.fsproj index 9afb02f1..2830a1f2 100644 --- a/tests/FSharp.Configuration.Tests/FSharp.Configuration.Tests.fsproj +++ b/tests/FSharp.Configuration.Tests/FSharp.Configuration.Tests.fsproj @@ -8,6 +8,7 @@ FSharp.Configuration.Tests true + true NET461 diff --git a/tests/FSharp.Configuration.Tests/app.config b/tests/FSharp.Configuration.Tests/app.config index a484b428..dd503979 100644 --- a/tests/FSharp.Configuration.Tests/app.config +++ b/tests/FSharp.Configuration.Tests/app.config @@ -21,112 +21,82 @@ True - - - - - True - - + + True - - + + True - - + + True - - + + True - - + + True - - + + True - - + + True - - + + True - - + + True - + True - + True - + True - + True - - - - - True - - - - - True - - - - - True - - - - - True - - - - - True - - + + True - + True - - + + \ No newline at end of file diff --git a/tests/FSharp.Configuration.Tests/paket.references b/tests/FSharp.Configuration.Tests/paket.references index 4e7bb524..c681598e 100644 --- a/tests/FSharp.Configuration.Tests/paket.references +++ b/tests/FSharp.Configuration.Tests/paket.references @@ -1,3 +1,4 @@ group Test FSharp.Core - Expecto \ No newline at end of file + Expecto + System.Resources.Extensions \ No newline at end of file From ec1a2201c21a2bffddf302a49eb37a648ab44e12 Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Wed, 11 Dec 2019 01:07:27 +0300 Subject: [PATCH 26/41] netcoreapp3.1 for tests and dependencies update --- build.fsx | 2 +- paket.dependencies | 2 +- paket.lock | 77 +++++++++++-------- .../FSharp.Configuration.Tests.fsproj | 4 +- tests/FSharp.Configuration.Tests/app.config | 20 ----- 5 files changed, 49 insertions(+), 56 deletions(-) diff --git a/build.fsx b/build.fsx index 91711657..9113efb8 100644 --- a/build.fsx +++ b/build.fsx @@ -145,7 +145,7 @@ Target "RunTests" (fun _ -> Target "RunTestsNetCore" (fun _ -> DotNetCli.RunCommand (fun r -> { r with WorkingDir = "tests/FSharp.Configuration.Tests/" }) - "run --framework netcoreapp2.0" + "run --framework netcoreapp3.1" ) // -------------------------------------------------------------------------------------- diff --git a/paket.dependencies b/paket.dependencies index 020b054a..08a7c5ea 100644 --- a/paket.dependencies +++ b/paket.dependencies @@ -24,7 +24,7 @@ group Build github fsharp/FAKE modules/Octokit/Octokit.fsx group Test - framework: net461, netcoreapp2.0 + framework: net461, netcoreapp3.1 source https://nuget.org/api/v2 redirects: force diff --git a/paket.lock b/paket.lock index fab011f9..1838ae0b 100644 --- a/paket.lock +++ b/paket.lock @@ -3,55 +3,72 @@ RESTRICTION: || (== net461) (== netstandard2.0) NUGET remote: http://www.nuget.org/api/v2 FSharp.Core (4.3.4) - Microsoft.NETCore.Platforms (2.2.0-preview3-27014-02) - restriction: || (== net461) (&& (== netstandard2.0) (>= net461)) + Microsoft.NETCore.Platforms (3.1) - restriction: || (== net461) (&& (== netstandard2.0) (>= net461)) NETStandard.Library (2.0.3) - restriction: || (== net461) (&& (== netstandard2.0) (>= net461)) Microsoft.NETCore.Platforms (>= 1.1) NETStandard.Library.NETFramework (2.0.0-preview2-25405-01) Microsoft.NETCore.Platforms (>= 2.0.0-preview2-25405-01) - restriction: || (== net461) (&& (== netstandard2.0) (>= net461)) NETStandard.Library (>= 2.0.0-preview2-25401-01) - restriction: || (== net461) (&& (== netstandard2.0) (>= net461)) System.Buffers (4.5) - restriction: == netstandard2.0 - System.Configuration.ConfigurationManager (4.5) - System.Security.Cryptography.ProtectedData (>= 4.5) - restriction: == netstandard2.0 - System.Security.Permissions (>= 4.5) - System.Memory (4.5.1) - restriction: == netstandard2.0 + System.Configuration.ConfigurationManager (4.7) + System.Security.Cryptography.ProtectedData (>= 4.7) - restriction: == netstandard2.0 + System.Security.Permissions (>= 4.7) + System.Memory (4.5.3) - restriction: == netstandard2.0 System.Buffers (>= 4.4) System.Numerics.Vectors (>= 4.4) - System.Runtime.CompilerServices.Unsafe (>= 4.5) + System.Runtime.CompilerServices.Unsafe (>= 4.5.2) System.Numerics.Vectors (4.5) - restriction: == netstandard2.0 - System.Runtime.CompilerServices.Unsafe (4.5.2) - restriction: == netstandard2.0 - System.Security.AccessControl (4.5) - System.Security.Principal.Windows (>= 4.5) - System.Security.Cryptography.ProtectedData (4.5) - restriction: == netstandard2.0 - System.Memory (>= 4.5) - restriction: || (&& (== net461) (< net46) (>= netstandard2.0)) (== netstandard2.0) - System.Security.Permissions (4.5) - System.Security.AccessControl (>= 4.5) - System.Security.Principal.Windows (4.5.1) - YamlDotNet (5.2.1) + System.Runtime.CompilerServices.Unsafe (4.7) - restriction: == netstandard2.0 + System.Security.AccessControl (4.7) + System.Security.Principal.Windows (>= 4.7) + System.Security.Cryptography.ProtectedData (4.7) - restriction: == netstandard2.0 + System.Memory (>= 4.5.3) - restriction: || (&& (== net461) (< net46) (>= netstandard2.0)) (== netstandard2.0) + System.Security.Permissions (4.7) + System.Security.AccessControl (>= 4.7) + System.Security.Principal.Windows (4.7) + YamlDotNet (8.0) GITHUB remote: fsprojects/FSharp.TypeProviders.SDK - src/ProvidedTypes.fs (7d57cd409d7299592822713195924e42b2b7acde) - src/ProvidedTypes.fsi (7d57cd409d7299592822713195924e42b2b7acde) - src/ProvidedTypesTesting.fs (7d57cd409d7299592822713195924e42b2b7acde) + src/ProvidedTypes.fs (b8727a47dd83d3e88aed8f2100f6712478c64632) + src/ProvidedTypes.fsi (b8727a47dd83d3e88aed8f2100f6712478c64632) + src/ProvidedTypesTesting.fs (b8727a47dd83d3e88aed8f2100f6712478c64632) GROUP Build RESTRICTION: == net461 NUGET remote: https://www.nuget.org/api/v2 - FAKE (4.64.13) - 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) - Octokit (0.32) + FAKE (4.64.17) + FSharp.Compiler.Service (27.0.1) + FSharp.Core (>= 4.5.2) + System.Collections.Immutable (>= 1.5) + System.Reflection.Metadata (>= 1.6) + System.ValueTuple (>= 4.4) + FSharp.Core (4.7) + FSharp.Formatting (3.1) + FSharp.Compiler.Service (>= 27.0.1 < 28.0) + Microsoft.AspNet.Razor (>= 3.2.7 < 4.0) + System.ValueTuple (>= 4.5 < 5.0) + Microsoft.AspNet.Razor (3.2.7) + Octokit (0.36) SourceLink.Fake (1.1) + System.Buffers (4.5) + System.Collections.Immutable (1.7) + System.Memory (>= 4.5.3) + System.Memory (4.5.3) + System.Buffers (>= 4.4) + System.Numerics.Vectors (>= 4.4) + System.Runtime.CompilerServices.Unsafe (>= 4.5.2) + System.Numerics.Vectors (4.5) + System.Reflection.Metadata (1.8) + System.Collections.Immutable (>= 1.7) + System.Runtime.CompilerServices.Unsafe (4.7) + System.ValueTuple (4.5) GITHUB remote: fsharp/FAKE - modules/Octokit/Octokit.fsx (3827f95ad533978ec14c29db92658f48b0609e05) + modules/Octokit/Octokit.fsx (cb792f4e5e7b2a182c6fabc48dd86a457db7937d) Octokit (>= 0.20) GROUP Test REDIRECTS: FORCE -RESTRICTION: || (== net461) (== netcoreapp2.0) +RESTRICTION: || (== net461) (== netcoreapp3.1) NUGET remote: https://www.nuget.org/api/v2 Expecto (8.13.1) @@ -59,8 +76,4 @@ NUGET Mono.Cecil (>= 0.11) FSharp.Core (4.7) - redirects: force Mono.Cecil (0.11.1) - System.Memory (4.5.3) - restriction: || (&& (== net461) (>= netstandard2.0)) (== netcoreapp2.0) - System.Runtime.CompilerServices.Unsafe (>= 4.5.2) System.Resources.Extensions (4.7) - System.Memory (>= 4.5.3) - restriction: || (&& (== net461) (>= netstandard2.0)) (== netcoreapp2.0) - System.Runtime.CompilerServices.Unsafe (4.7) - restriction: || (&& (== net461) (>= netcoreapp2.0)) (&& (== net461) (>= netstandard2.0)) (&& (== net461) (>= xamarinios)) (&& (== net461) (>= xamarinmac)) (== netcoreapp2.0) diff --git a/tests/FSharp.Configuration.Tests/FSharp.Configuration.Tests.fsproj b/tests/FSharp.Configuration.Tests/FSharp.Configuration.Tests.fsproj index 2830a1f2..36222ef0 100644 --- a/tests/FSharp.Configuration.Tests/FSharp.Configuration.Tests.fsproj +++ b/tests/FSharp.Configuration.Tests/FSharp.Configuration.Tests.fsproj @@ -4,7 +4,7 @@ Exe - netcoreapp2.0; net461 + netcoreapp3.1;net461 FSharp.Configuration.Tests true @@ -44,7 +44,7 @@ ..\..\bin\lib\net461\YamlDotNet.dll - + ..\..\bin\lib\netstandard2.0\FSharp.Configuration.dll diff --git a/tests/FSharp.Configuration.Tests/app.config b/tests/FSharp.Configuration.Tests/app.config index dd503979..20aea58b 100644 --- a/tests/FSharp.Configuration.Tests/app.config +++ b/tests/FSharp.Configuration.Tests/app.config @@ -24,11 +24,6 @@ - - True - - - True @@ -39,11 +34,6 @@ - - True - - - True @@ -84,19 +74,9 @@ - - True - - - True - - True - - - \ No newline at end of file From 5c8fa0d8abe13960df5b97702a4397e4347ab3c6 Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Wed, 18 Dec 2019 22:20:06 +0300 Subject: [PATCH 27/41] Split into runtime and design time assemblies --- .config/dotnet-tools.json | 12 + .paket/paket.exe | Bin 64296 -> 0 bytes .paket/paket.targets | 38 --- ...rp.Configuration.Tests.dll.TestResults.xml | 1 - FSharp.Configuration.sln | 16 +- build.cmd | 9 +- build.fsx | 35 ++- build.sh | 14 +- paket.dependencies | 2 +- paket.lock | 39 ++- .../AppSettingsProvider.fs | 80 ++---- .../AssemblyInfo.fs | 17 ++ .../FSharp.Configuration.DesignTime.fs} | 10 +- .../FSharp.Configuration.DesignTime.fsproj | 47 ++++ .../IniFileProvider.fs | 85 +----- .../ResXProvider.fs | 18 +- .../YamlConfigProvider.fs | 258 ++++++++++++++++++ .../paket.references | 6 + .../AppSettingsProvider.Runtime.fs | 48 ++++ .../AssemblyInfo.fs | 17 ++ .../FSharp.Configuration.Runtime.fs | 5 + .../FSharp.Configuration.Runtime.fsproj | 62 +++++ .../IniFileProvider.Runtime.fs | 76 ++++++ .../ResXProvider.Runtime.fs | 29 ++ .../TypeProviders.Helper.fs | 4 +- .../YamlConfigProvider.Runtime.fs} | 257 +---------------- .../paket.references | 6 + .../paket.template | 39 +++ .../AppSettingsProvider.Tests.fs | 4 +- .../FSharp.Configuration.Tests.fsproj | 13 +- tests/FSharp.Configuration.Tests/app.config | 50 ++++ 31 files changed, 796 insertions(+), 501 deletions(-) create mode 100644 .config/dotnet-tools.json delete mode 100644 .paket/paket.exe delete mode 100644 .paket/paket.targets delete mode 100644 FSharp.Configuration.Tests.dll.TestResults.xml rename src/{FSharp.Configuration => FSharp.Configuration.DesignTime}/AppSettingsProvider.fs (69%) create mode 100644 src/FSharp.Configuration.DesignTime/AssemblyInfo.fs rename src/{FSharp.Configuration/ConfigTypeProvider.fs => FSharp.Configuration.DesignTime/FSharp.Configuration.DesignTime.fs} (57%) create mode 100644 src/FSharp.Configuration.DesignTime/FSharp.Configuration.DesignTime.fsproj rename src/{FSharp.Configuration => FSharp.Configuration.DesignTime}/IniFileProvider.fs (57%) rename src/{FSharp.Configuration => FSharp.Configuration.DesignTime}/ResXProvider.fs (78%) create mode 100644 src/FSharp.Configuration.DesignTime/YamlConfigProvider.fs create mode 100644 src/FSharp.Configuration.DesignTime/paket.references create mode 100644 src/FSharp.Configuration.Runtime/AppSettingsProvider.Runtime.fs create mode 100644 src/FSharp.Configuration.Runtime/AssemblyInfo.fs create mode 100644 src/FSharp.Configuration.Runtime/FSharp.Configuration.Runtime.fs create mode 100644 src/FSharp.Configuration.Runtime/FSharp.Configuration.Runtime.fsproj create mode 100644 src/FSharp.Configuration.Runtime/IniFileProvider.Runtime.fs create mode 100644 src/FSharp.Configuration.Runtime/ResXProvider.Runtime.fs rename src/{FSharp.Configuration => FSharp.Configuration.Runtime}/TypeProviders.Helper.fs (99%) rename src/{FSharp.Configuration/YamlConfigProvider.fs => FSharp.Configuration.Runtime/YamlConfigProvider.Runtime.fs} (55%) create mode 100644 src/FSharp.Configuration.Runtime/paket.references create mode 100644 src/FSharp.Configuration.Runtime/paket.template diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json new file mode 100644 index 00000000..77f1f5c4 --- /dev/null +++ b/.config/dotnet-tools.json @@ -0,0 +1,12 @@ +{ + "version": 1, + "isRoot": true, + "tools": { + "paket": { + "version": "5.241.2", + "commands": [ + "paket" + ] + } + } +} \ No newline at end of file diff --git a/.paket/paket.exe b/.paket/paket.exe deleted file mode 100644 index b98e000b232408fe0a21730e88f89755f0d7a68c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 64296 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 - - - - true - - true - $(MSBuildThisFileDirectory) - $(MSBuildThisFileDirectory)..\ - - - - $(PaketToolsPath)paket.exe - $(PaketToolsPath)paket.bootstrapper.exe - "$(PaketExePath)" - mono --runtime=v4.0.30319 $(PaketExePath) - "$(PaketBootStrapperExePath)" - mono --runtime=v4.0.30319 $(PaketBootStrapperExePath) - - $(MSBuildProjectDirectory)\paket.references - $(MSBuildProjectFullPath).paket.references - $(PaketCommand) restore --references-files "$(PaketReferences)" - $(PaketBootStrapperCommand) - - RestorePackages; $(BuildDependsOn); - - - - - - - - - - - - - diff --git a/FSharp.Configuration.Tests.dll.TestResults.xml b/FSharp.Configuration.Tests.dll.TestResults.xml deleted file mode 100644 index 4d6eb802..00000000 --- a/FSharp.Configuration.Tests.dll.TestResults.xml +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/FSharp.Configuration.sln b/FSharp.Configuration.sln index df6ccb5d..6e33a59a 100644 --- a/FSharp.Configuration.sln +++ b/FSharp.Configuration.sln @@ -1,4 +1,4 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 +Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 VisualStudioVersion = 12.0.31101.0 MinimumVisualStudioVersion = 10.0.40219.1 @@ -15,8 +15,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{A6A6AF7D-D docs\content\YamlConfigProvider.fsx = docs\content\YamlConfigProvider.fsx EndProjectSection EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Configuration", "src\FSharp.Configuration\FSharp.Configuration.fsproj", "{7E90D6CE-A10B-4858-A5BC-41DF7250CBCA}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "project", "project", "{BF60BC93-E09B-4E5F-9D85-95A519479D54}" ProjectSection(SolutionItems) = preProject build.fsx = build.fsx @@ -33,16 +31,20 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{83F16175 docs\tools\templates\template.cshtml = docs\tools\templates\template.cshtml EndProjectSection EndProject +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Configuration.Runtime", "src\FSharp.Configuration.Runtime\FSharp.Configuration.Runtime.fsproj", "{CB156D37-AA7D-4F43-9BC8-816318107F79}" +EndProject +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Configuration.DesignTime", "src\FSharp.Configuration.DesignTime\FSharp.Configuration.DesignTime.fsproj", "{28A30128-1DDE-4CD8-9A67-A6FC0BBC2D68}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {7E90D6CE-A10B-4858-A5BC-41DF7250CBCA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7E90D6CE-A10B-4858-A5BC-41DF7250CBCA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7E90D6CE-A10B-4858-A5BC-41DF7250CBCA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7E90D6CE-A10B-4858-A5BC-41DF7250CBCA}.Release|Any CPU.Build.0 = Release|Any CPU + {28A30128-1DDE-4CD8-9A67-A6FC0BBC2D68}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {28A30128-1DDE-4CD8-9A67-A6FC0BBC2D68}.Debug|Any CPU.Build.0 = Debug|Any CPU + {28A30128-1DDE-4CD8-9A67-A6FC0BBC2D68}.Release|Any CPU.ActiveCfg = Release|Any CPU + {28A30128-1DDE-4CD8-9A67-A6FC0BBC2D68}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/build.cmd b/build.cmd index e9933d32..9e2e3861 100644 --- a/build.cmd +++ b/build.cmd @@ -1,9 +1,4 @@ @echo off -cls - -.paket\paket.exe restore -if errorlevel 1 ( - exit /b %errorlevel% -) - +dotnet tool restore +dotnet paket restore packages\build\FAKE\tools\FAKE.exe build.fsx %* diff --git a/build.fsx b/build.fsx index 9113efb8..c2f9646d 100644 --- a/build.fsx +++ b/build.fsx @@ -106,21 +106,28 @@ Target "CleanDocs" (fun _ -> // Build library & test project Target "Build" (fun _ -> - let outDir = __SOURCE_DIRECTORY__ + "/bin/lib/net461/" - CreateDir outDir - DotNetCli.Publish (fun p -> - { p with - Output = outDir - Framework = "net461" - WorkingDir = "src/FSharp.Configuration/" }) + DotNetCli.Build (fun c -> + { c with + Project = "FSharp.Configuration.sln" + Configuration = "Release" + //AdditionalArgs= ["-v n"] + }) - let outDir = __SOURCE_DIRECTORY__ + "/bin/lib/netstandard2.0/" - CreateDir outDir - DotNetCli.Publish (fun p -> - { p with - Output = outDir - Framework = "netstandard2.0" - WorkingDir = "src/FSharp.Configuration/" }) + // let outDir = __SOURCE_DIRECTORY__ + "/bin/lib/net461/" + // CreateDir outDir + // DotNetCli.Publish (fun p -> + // { p with + // Output = outDir + // Framework = "net461" + // WorkingDir = "src/FSharp.Configuration/" }) + + // let outDir = __SOURCE_DIRECTORY__ + "/bin/lib/netstandard2.0/" + // CreateDir outDir + // DotNetCli.Publish (fun p -> + // { p with + // Output = outDir + // Framework = "netstandard2.0" + // WorkingDir = "src/FSharp.Configuration/" }) ) Target "BuildTests" (fun _ -> diff --git a/build.sh b/build.sh index b0b2d797..16ab7caf 100755 --- a/build.sh +++ b/build.sh @@ -1,9 +1,9 @@ #!/bin/bash - -mono .paket/paket.exe restore -exit_code=$? -if [ $exit_code -ne 0 ]; then - exit $exit_code +if test "$OS" = "Windows_NT" +then + cmd /C build.cmd +else + dotnet tool restore + dotnet paket restore + mono packages/build/FAKE/tools/FAKE.exe build.fsx $@ fi - -mono packages/build/FAKE/tools/FAKE.exe build.fsx $@ diff --git a/paket.dependencies b/paket.dependencies index 08a7c5ea..37226e49 100644 --- a/paket.dependencies +++ b/paket.dependencies @@ -1,5 +1,5 @@ source http://nuget.org/api/v2 -framework: netstandard2.0, net461 +framework: netstandard2.0, net461, netcoreapp3.1 redirects: force nuget YamlDotNet diff --git a/paket.lock b/paket.lock index 1838ae0b..84cd84ce 100644 --- a/paket.lock +++ b/paket.lock @@ -1,31 +1,40 @@ REDIRECTS: FORCE -RESTRICTION: || (== net461) (== netstandard2.0) +RESTRICTION: || (== net461) (== netcoreapp3.1) (== netstandard2.0) NUGET remote: http://www.nuget.org/api/v2 FSharp.Core (4.3.4) - Microsoft.NETCore.Platforms (3.1) - restriction: || (== net461) (&& (== netstandard2.0) (>= net461)) - NETStandard.Library (2.0.3) - restriction: || (== net461) (&& (== netstandard2.0) (>= net461)) + Microsoft.NETCore.Platforms (3.1) - restriction: || (== net461) (== netcoreapp3.1) (&& (== netstandard2.0) (>= net461)) (&& (== netstandard2.0) (>= netcoreapp2.0)) + Microsoft.Win32.SystemEvents (4.7) - restriction: || (&& (== net461) (>= netcoreapp3.0)) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp3.0)) + Microsoft.NETCore.Platforms (>= 3.1) - restriction: || (&& (== net461) (>= netcoreapp2.0)) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.0)) + NETStandard.Library (2.0.3) - restriction: || (== net461) (&& (== netcoreapp3.1) (>= net461)) (&& (== netstandard2.0) (>= net461)) Microsoft.NETCore.Platforms (>= 1.1) NETStandard.Library.NETFramework (2.0.0-preview2-25405-01) - Microsoft.NETCore.Platforms (>= 2.0.0-preview2-25405-01) - restriction: || (== net461) (&& (== netstandard2.0) (>= net461)) - NETStandard.Library (>= 2.0.0-preview2-25401-01) - restriction: || (== net461) (&& (== netstandard2.0) (>= net461)) - System.Buffers (4.5) - restriction: == netstandard2.0 + Microsoft.NETCore.Platforms (>= 2.0.0-preview2-25405-01) - restriction: || (== net461) (&& (== netcoreapp3.1) (>= net461)) (&& (== netstandard2.0) (>= net461)) + NETStandard.Library (>= 2.0.0-preview2-25401-01) - restriction: || (== net461) (&& (== netcoreapp3.1) (>= net461)) (&& (== netstandard2.0) (>= net461)) + System.Buffers (4.5) - restriction: || (&& (== net461) (== netcoreapp3.1)) (&& (== netcoreapp3.1) (>= monotouch)) (&& (== netcoreapp3.1) (>= net461)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (&& (== netcoreapp3.1) (< netstandard1.1)) (&& (== netcoreapp3.1) (< netstandard2.0)) (&& (== netcoreapp3.1) (>= xamarinios)) (&& (== netcoreapp3.1) (>= xamarinmac)) (&& (== netcoreapp3.1) (>= xamarintvos)) (&& (== netcoreapp3.1) (>= xamarinwatchos)) (== netstandard2.0) System.Configuration.ConfigurationManager (4.7) - System.Security.Cryptography.ProtectedData (>= 4.7) - restriction: == netstandard2.0 + System.Security.Cryptography.ProtectedData (>= 4.7) - restriction: || (== netcoreapp3.1) (== netstandard2.0) System.Security.Permissions (>= 4.7) - System.Memory (4.5.3) - restriction: == netstandard2.0 - System.Buffers (>= 4.4) - System.Numerics.Vectors (>= 4.4) - System.Runtime.CompilerServices.Unsafe (>= 4.5.2) - System.Numerics.Vectors (4.5) - restriction: == netstandard2.0 - System.Runtime.CompilerServices.Unsafe (4.7) - restriction: == netstandard2.0 + System.Drawing.Common (4.7) - restriction: || (&& (== net461) (>= netcoreapp3.0)) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp3.0)) + Microsoft.NETCore.Platforms (>= 3.1) - restriction: || (&& (== net461) (>= netcoreapp2.0)) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.0)) + Microsoft.Win32.SystemEvents (>= 4.7) - restriction: || (&& (== net461) (>= netcoreapp2.0)) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.0)) + System.Memory (4.5.3) - restriction: || (&& (== net461) (== netcoreapp3.1)) (&& (== netcoreapp3.1) (< netcoreapp2.1)) (== netstandard2.0) + System.Buffers (>= 4.4) - restriction: || (== net461) (&& (== netcoreapp3.1) (>= monotouch)) (&& (== netcoreapp3.1) (>= net461)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (&& (== netcoreapp3.1) (< netstandard1.1)) (&& (== netcoreapp3.1) (< netstandard2.0)) (&& (== netcoreapp3.1) (>= xamarinios)) (&& (== netcoreapp3.1) (>= xamarinmac)) (&& (== netcoreapp3.1) (>= xamarintvos)) (&& (== netcoreapp3.1) (>= xamarinwatchos)) (== netstandard2.0) + System.Numerics.Vectors (>= 4.4) - restriction: || (== net461) (&& (== netcoreapp3.1) (>= net461)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (== netstandard2.0) + System.Runtime.CompilerServices.Unsafe (>= 4.5.2) - restriction: || (== net461) (&& (== netcoreapp3.1) (>= monotouch)) (&& (== netcoreapp3.1) (>= net461)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (&& (== netcoreapp3.1) (< netcoreapp2.1)) (&& (== netcoreapp3.1) (< netstandard1.1)) (&& (== netcoreapp3.1) (< netstandard2.0)) (&& (== netcoreapp3.1) (>= uap10.1)) (&& (== netcoreapp3.1) (>= xamarinios)) (&& (== netcoreapp3.1) (>= xamarinmac)) (&& (== netcoreapp3.1) (>= xamarintvos)) (&& (== netcoreapp3.1) (>= xamarinwatchos)) (== netstandard2.0) + System.Numerics.Vectors (4.5) - restriction: || (&& (== net461) (== netcoreapp3.1)) (&& (== netcoreapp3.1) (>= net461)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (== netstandard2.0) + System.Runtime.CompilerServices.Unsafe (4.7) - restriction: || (&& (== net461) (== netcoreapp3.1)) (&& (== netcoreapp3.1) (>= monotouch)) (&& (== netcoreapp3.1) (>= net461)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (&& (== netcoreapp3.1) (< netcoreapp2.1)) (&& (== netcoreapp3.1) (< netstandard1.1)) (&& (== netcoreapp3.1) (< netstandard2.0)) (&& (== netcoreapp3.1) (>= uap10.1)) (&& (== netcoreapp3.1) (>= xamarinios)) (&& (== netcoreapp3.1) (>= xamarinmac)) (&& (== netcoreapp3.1) (>= xamarintvos)) (&& (== netcoreapp3.1) (>= xamarinwatchos)) (== netstandard2.0) System.Security.AccessControl (4.7) + Microsoft.NETCore.Platforms (>= 3.1) - restriction: || (&& (== net461) (>= netcoreapp2.0)) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.0)) System.Security.Principal.Windows (>= 4.7) - System.Security.Cryptography.ProtectedData (4.7) - restriction: == netstandard2.0 - System.Memory (>= 4.5.3) - restriction: || (&& (== net461) (< net46) (>= netstandard2.0)) (== netstandard2.0) + System.Security.Cryptography.ProtectedData (4.7) - restriction: || (== netcoreapp3.1) (== netstandard2.0) + System.Memory (>= 4.5.3) - restriction: || (&& (== net461) (< net46) (>= netstandard2.0)) (&& (== netcoreapp3.1) (< netcoreapp2.1)) (== netstandard2.0) System.Security.Permissions (4.7) System.Security.AccessControl (>= 4.7) + System.Windows.Extensions (>= 4.7) - restriction: || (&& (== net461) (>= netcoreapp3.0)) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp3.0)) System.Security.Principal.Windows (4.7) + System.Windows.Extensions (4.7) - restriction: || (&& (== net461) (>= netcoreapp3.0)) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp3.0)) + System.Drawing.Common (>= 4.7) - restriction: || (&& (== net461) (>= netcoreapp3.0)) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp3.0)) YamlDotNet (8.0) GITHUB remote: fsprojects/FSharp.TypeProviders.SDK diff --git a/src/FSharp.Configuration/AppSettingsProvider.fs b/src/FSharp.Configuration.DesignTime/AppSettingsProvider.fs similarity index 69% rename from src/FSharp.Configuration/AppSettingsProvider.fs rename to src/FSharp.Configuration.DesignTime/AppSettingsProvider.fs index 5e5f3472..3c4e6ef4 100644 --- a/src/FSharp.Configuration/AppSettingsProvider.fs +++ b/src/FSharp.Configuration.DesignTime/AppSettingsProvider.fs @@ -6,48 +6,8 @@ open FSharp.Configuration.Helper open ProviderImplementation.ProvidedTypes open System open System.Configuration -open System.Collections.Generic open System.Globalization -#if NET461 -open System.Web.Hosting -#endif - -let mutable private exePath = Map.empty -let setExeFilePath key filePath = exePath <- exePath.Add(key, filePath) - -let getConfig file = - let path = exePath - if path.ContainsKey(file) && System.IO.File.Exists(path.[file]) then - ConfigurationManager.OpenExeConfiguration path.[file] - else -#if NET461 - if HostingEnvironment.IsHosted then - Web.Configuration.WebConfigurationManager.OpenWebConfiguration "~" - else ConfigurationManager.OpenExeConfiguration ConfigurationUserLevel.None -#else - ConfigurationManager.OpenExeConfiguration ConfigurationUserLevel.None -#endif - -let getConfigValue(file,key) = - let conf = getConfig file - match conf.AppSettings.Settings.[key] with - | null -> raise <| KeyNotFoundException (sprintf "Cannot find name %s in section of config file. (%s)" key conf.FilePath) - | settings -> settings.Value - -let setConfigValue(file, key, value) = - let config = getConfig file - config.AppSettings.Settings.[key].Value <- value - config.Save() - -let getConnectionString(file, key: string) = - match getConfig(file).ConnectionStrings.ConnectionStrings.[key] with - | null -> raise <| KeyNotFoundException (sprintf "Cannot find name %s in section of config file." key) - | section -> section.ConnectionString - -let setConnectionString(file, key: string, value) = - let config = getConfig file - config.ConnectionStrings.ConnectionStrings.[key].ConnectionString <- value - config.Save() +open FSharp.Configuration let internal typedAppSettings (context: Context) = try @@ -68,8 +28,8 @@ let internal typedAppSettings (context: Context) = ProvidedProperty( name, typeof, - getterCode = (fun _ -> <@@ getConnectionString(filePath, key) @@>), - setterCode = (fun args -> <@@ setConnectionString(filePath, key, %%args.[0]) @@>), + getterCode = (fun _ -> <@@ AppSettings.getConnectionString(filePath, key) @@>), + setterCode = (fun args -> <@@ AppSettings.setConnectionString(filePath, key, %%args.[0]) @@>), isStatic = true) prop.AddXmlDoc (sprintf "Returns the connection string from %s with name %s" configFileName name) @@ -94,43 +54,43 @@ let internal typedAppSettings (context: Context) = | ValueParser.Uri _ -> ProvidedProperty(name, typeof, isStatic = true, - getterCode = (fun _ -> <@@ Uri (getConfigValue(filePath, key)) @@>), - setterCode = fun args -> <@@ setConfigValue(filePath, key, string (%%args.[0]: Uri)) @@>) + getterCode = (fun _ -> <@@ Uri (AppSettings.getConfigValue(filePath, key)) @@>), + setterCode = fun args -> <@@ AppSettings.setConfigValue(filePath, key, string (%%args.[0]: Uri)) @@>) | ValueParser.Int _ -> ProvidedProperty(name, typeof, isStatic = true, - getterCode = (fun _ -> <@@ Int32.Parse (getConfigValue(filePath, key)) @@>), - setterCode = fun args -> <@@ setConfigValue(filePath, key, string (%%args.[0]: Int32)) @@>) + getterCode = (fun _ -> <@@ Int32.Parse (AppSettings.getConfigValue(filePath, key)) @@>), + setterCode = fun args -> <@@ AppSettings.setConfigValue(filePath, key, string (%%args.[0]: Int32)) @@>) | ValueParser.Bool _ -> ProvidedProperty(name, typeof, isStatic = true, - getterCode = (fun _ -> <@@ Boolean.Parse (getConfigValue(filePath, key)) @@>), - setterCode = fun args -> <@@ setConfigValue(filePath, key, string (%%args.[0]: Boolean)) @@>) + getterCode = (fun _ -> <@@ Boolean.Parse (AppSettings.getConfigValue(filePath, key)) @@>), + setterCode = fun args -> <@@ AppSettings.setConfigValue(filePath, key, string (%%args.[0]: Boolean)) @@>) | ValueParser.Float _ -> ProvidedProperty(name, typeof, isStatic = true, - getterCode = (fun _ -> <@@ Double.Parse (getConfigValue(filePath, key), NumberStyles.Any, CultureInfo.InvariantCulture) @@>), - setterCode = fun args -> <@@ setConfigValue(filePath, key, string (%%args.[0]: float)) @@>) + getterCode = (fun _ -> <@@ Double.Parse (AppSettings.getConfigValue(filePath, key), NumberStyles.Any, CultureInfo.InvariantCulture) @@>), + setterCode = fun args -> <@@ AppSettings.setConfigValue(filePath, key, string (%%args.[0]: float)) @@>) | ValueParser.TimeSpan _ -> ProvidedProperty(name, typeof, isStatic = true, - getterCode = (fun _ -> <@@ TimeSpan.Parse(getConfigValue(filePath, key), CultureInfo.InvariantCulture) @@>), - setterCode = fun args -> <@@ setConfigValue(filePath, key, string (%%args.[0]: TimeSpan)) @@>) + getterCode = (fun _ -> <@@ TimeSpan.Parse(AppSettings.getConfigValue(filePath, key), CultureInfo.InvariantCulture) @@>), + setterCode = fun args -> <@@ AppSettings.setConfigValue(filePath, key, string (%%args.[0]: TimeSpan)) @@>) | ValueParser.DateTime _ -> ProvidedProperty(name, typeof, isStatic = true, - getterCode = (fun _ -> <@@ DateTime.Parse(getConfigValue(filePath, key), CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal) @@>), - setterCode = fun args -> <@@ setConfigValue(filePath, key, (%%args.[0]: DateTime).ToString("o")) @@>) + getterCode = (fun _ -> <@@ DateTime.Parse(AppSettings.getConfigValue(filePath, key), CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal) @@>), + setterCode = fun args -> <@@ AppSettings.setConfigValue(filePath, key, (%%args.[0]: DateTime).ToString("o")) @@>) | ValueParser.Guid _ -> ProvidedProperty(name, typeof, isStatic = true, - getterCode = (fun _ -> <@@ Guid.Parse(getConfigValue(filePath, key)) @@>), - setterCode = fun args -> <@@ setConfigValue(filePath, key, (%%args.[0]: Guid).ToString("B")) @@>) + getterCode = (fun _ -> <@@ Guid.Parse(AppSettings.getConfigValue(filePath, key)) @@>), + setterCode = fun args -> <@@ AppSettings.setConfigValue(filePath, key, (%%args.[0]: Guid).ToString("B")) @@>) | _ -> ProvidedProperty(name, typeof, isStatic = true, - getterCode = (fun _ -> <@@ getConfigValue(filePath, key) @@>), - setterCode = fun args -> <@@ setConfigValue(filePath, key, %%args.[0]) @@>) + getterCode = (fun _ -> <@@ AppSettings.getConfigValue(filePath, key) @@>), + setterCode = fun args -> <@@ AppSettings.setConfigValue(filePath, key, %%args.[0]) @@>) prop.AddXmlDoc (sprintf "Returns the value from %s with key %s" configFileName key) prop.AddDefinitionLocation(1, 1, filePath) @@ -143,7 +103,7 @@ let internal typedAppSettings (context: Context) = [ ProvidedParameter ("pathOfExe", typeof) ], typeof, isStatic = true, - invokeCode = fun args -> <@@ setExeFilePath filePath %%args.[0] @@>) + invokeCode = fun args -> <@@ AppSettings.setExeFilePath filePath %%args.[0] @@>) executeSelector.AddXmlDoc "Property to change the executable file that is read for configurations. This idea is that you can manage other executables also (e.g. from script)." typeDef.AddMember executeSelector diff --git a/src/FSharp.Configuration.DesignTime/AssemblyInfo.fs b/src/FSharp.Configuration.DesignTime/AssemblyInfo.fs new file mode 100644 index 00000000..190f5223 --- /dev/null +++ b/src/FSharp.Configuration.DesignTime/AssemblyInfo.fs @@ -0,0 +1,17 @@ +// Auto-Generated by FAKE; do not edit +namespace System +open System.Reflection + +[] +[] +[] +[] +[] +do () + +module internal AssemblyVersionInformation = + let [] AssemblyTitle = "FSharp.Configuration.DesignTime" + let [] AssemblyProduct = "FSharp.Configuration" + let [] AssemblyDescription = "The FSharp.Configuration project contains type providers for the configuration of .NET projects." + let [] AssemblyVersion = "2.0.0" + let [] AssemblyFileVersion = "2.0.0" diff --git a/src/FSharp.Configuration/ConfigTypeProvider.fs b/src/FSharp.Configuration.DesignTime/FSharp.Configuration.DesignTime.fs similarity index 57% rename from src/FSharp.Configuration/ConfigTypeProvider.fs rename to src/FSharp.Configuration.DesignTime/FSharp.Configuration.DesignTime.fs index bbc22148..a5bf948b 100644 --- a/src/FSharp.Configuration/ConfigTypeProvider.fs +++ b/src/FSharp.Configuration.DesignTime/FSharp.Configuration.DesignTime.fs @@ -1,12 +1,18 @@ -module FSharp.Configuration.ConfigTypeProvider +module FSharp.Configuration.ConfigTypeProvider open FSharp.Configuration.Helper open Microsoft.FSharp.Core.CompilerServices open ProviderImplementation.ProvidedTypes +open System.Reflection [] type FSharpConfigurationProvider(cfg: TypeProviderConfig) as this = - inherit TypeProviderForNamespaces(cfg, addDefaultProbingLocation = true) + inherit TypeProviderForNamespaces(cfg, assemblyReplacementMap=[("FSharp.Configuration.DesignTime", "FSharp.Configuration.Runtime")], addDefaultProbingLocation = true) + + let asm = Assembly.GetExecutingAssembly() + // check we contain a copy of runtime files, and are not referencing the runtime DLL + do assert (typeof.Assembly.GetName().Name = asm.GetName().Name) + let context = new Context(this, cfg) do this.AddNamespace ( rootNamespace, diff --git a/src/FSharp.Configuration.DesignTime/FSharp.Configuration.DesignTime.fsproj b/src/FSharp.Configuration.DesignTime/FSharp.Configuration.DesignTime.fsproj new file mode 100644 index 00000000..3a2a470a --- /dev/null +++ b/src/FSharp.Configuration.DesignTime/FSharp.Configuration.DesignTime.fsproj @@ -0,0 +1,47 @@ + + + + + Library + netstandard2.0;netcoreapp3.1;net461 + true + true + true + PackageReference + true + + + NET461 + + + + + + + + + True + paket-files/ProvidedTypes.fsi + + + True + paket-files/ProvidedTypes.fs + + + + + + + + + + + + + + + PreserveNewest + + + + \ No newline at end of file diff --git a/src/FSharp.Configuration/IniFileProvider.fs b/src/FSharp.Configuration.DesignTime/IniFileProvider.fs similarity index 57% rename from src/FSharp.Configuration/IniFileProvider.fs rename to src/FSharp.Configuration.DesignTime/IniFileProvider.fs index 3ecb2272..2ba5c360 100644 --- a/src/FSharp.Configuration/IniFileProvider.fs +++ b/src/FSharp.Configuration.DesignTime/IniFileProvider.fs @@ -1,83 +1,10 @@ module FSharp.Configuration.IniFileProvider open System -open System.IO - -module Parser = - open System.Text.RegularExpressions - - type Key = string - type Value = string - type Setting = { Key: Key; Value: Value } - type SectionName = string - type Section = { Name: SectionName; Settings: Setting list } - - type Stream = Stream of int * string list - - let (|Regex|_|) pattern = function - | Stream (n, line :: rest) -> - let m = Regex.Match (line, pattern) - if m.Success then - let values = [ for gr in m.Groups -> gr.Value ] - Some (values, Stream (n, rest)) - else None - | _ -> None - - let (|Comment|_|) = function - | Regex @"^\s*;.*" (_, s) -> Some s - | _ -> None - - let (|Header|_|) = function - | Regex @"\[\s*(\S+)\s*\]" ([_; name], s) -> Some (name, s) - | _ -> None - - let (|Setting|_|) = function - | Regex @"\s*(\S+)\s*=\s*(.*)" ([_; key; value], s) -> - Some ({ Key = key; Value = value.Trim() }, s) - | _ -> None - - let (|Settings|_|) s = - let rec loop s settings = - match s with - | Setting (setting, s) -> loop s (setting :: settings) - | Comment s -> loop s settings - | _ -> (List.rev settings, s) - let settings, s = loop s [] - Some (settings, s) - - let rec (|Section|_|) = function - | Header (name, Settings (settings, s)) -> Some ({ Name = name; Settings = settings }, s) - | _ -> None - - let (|Sections|_|) s = - let rec loop s sections = - match s with - | Section (section, s) -> loop s (section :: sections) - | Comment s -> loop s sections - | _ -> (sections |> List.rev, s) - let sections, s = loop s [] - Some (sections, s) - - let streamOfLines lines = Stream (0, lines |> Seq.filter (not << String.IsNullOrWhiteSpace) |> List.ofSeq) - let streamOfFile path = File.ReadLines path |> streamOfLines - let parse path = - match streamOfFile path with - | Sections (sections, _) -> Choice1Of2 sections - | e -> Choice2Of2 e - +open FSharp.Configuration open ProviderImplementation.ProvidedTypes open System.Globalization -let getValue (iniFileName: string) (section: string) (key: string) = - match Parser.parse (Path.GetFileName iniFileName) with - | Choice1Of2 sections -> - maybe { - let! section = sections |> List.tryFind (fun s -> s.Name = section) - let! setting = section.Settings |> List.tryFind (fun s -> s.Key = key) - return setting.Value - } - | Choice2Of2 _ -> None - let internal typedIniFile (context: Context) = try let iniFile = erasedType thisAssembly rootNamespace "IniFile" None @@ -91,7 +18,7 @@ let internal typedIniFile (context: Context) = let niceName = createNiceNameProvider() try let filePath = findConfigFile context.ResolutionFolder iniFileName - match Parser.parse filePath with + match Ini.Parser.parse filePath with | Choice1Of2 sections -> for section in sections do let sectionTy = ProvidedTypeDefinition(section.Name, Some typeof, hideObjectMethods = true) @@ -102,25 +29,25 @@ let internal typedIniFile (context: Context) = match setting.Value with | ValueParser.Int value -> ProvidedProperty(key, typeof, isStatic = true, getterCode = fun _ -> <@@ - match getValue filePath sectionName key with + match Ini.getValue filePath sectionName key with | Some v -> Int32.Parse v | None -> value @@>) | ValueParser.Bool value -> ProvidedProperty(key, typeof, isStatic = true, getterCode = fun _ -> <@@ - match getValue filePath sectionName key with + match Ini.getValue filePath sectionName key with | Some v -> Boolean.Parse v | None -> value @@>) | ValueParser.Float value -> ProvidedProperty(key, typeof, isStatic = true, getterCode = fun _ -> <@@ - match getValue filePath sectionName key with + match Ini.getValue filePath sectionName key with | Some v -> Double.Parse (v, NumberStyles.Any, CultureInfo.InvariantCulture) | None -> value @@>) | value -> ProvidedProperty(key, typeof, isStatic = true, getterCode = fun _ -> <@@ - match getValue filePath sectionName key with + match Ini.getValue filePath sectionName key with | Some v -> v | None -> value @@>) diff --git a/src/FSharp.Configuration/ResXProvider.fs b/src/FSharp.Configuration.DesignTime/ResXProvider.fs similarity index 78% rename from src/FSharp.Configuration/ResXProvider.fs rename to src/FSharp.Configuration.DesignTime/ResXProvider.fs index eeb0c9e0..bd0fd274 100644 --- a/src/FSharp.Configuration/ResXProvider.fs +++ b/src/FSharp.Configuration.DesignTime/ResXProvider.fs @@ -12,23 +12,9 @@ open System.Collections.Concurrent open ProviderImplementation.ProvidedTypes open FSharp.Configuration.Helper -let readFile (filePath: FilePath) : ResXDataNode list = - use reader = new ResXResourceReader(filePath, UseResXDataNodes = true) - reader - |> Seq.cast - |> Seq.map (fun (x: DictionaryEntry) -> x.Value :?> ResXDataNode) - |> Seq.toList - -let resourceManCache = ConcurrentDictionary () - -let readValue resourceName assembly key = - let resourceMan = resourceManCache.GetOrAdd ((resourceName, assembly), - fun _ -> ResourceManager (resourceName, assembly)) - downcast (resourceMan.GetObject key) - /// Converts ResX entries to provided properties let private toProperties (filePath: FilePath) resourceName : MemberInfo list = - readFile filePath + ResX.readFile filePath |> List.map (fun node -> let key = node.Name let ty = node.GetValueTypeName Unchecked.defaultof |> Type.GetType @@ -37,7 +23,7 @@ let private toProperties (filePath: FilePath) resourceName : MemberInfo list = key, ty, isStatic = true, - getterCode = fun _ -> <@@ readValue resourceName (Assembly.GetExecutingAssembly ()) key @@>) + getterCode = fun _ -> <@@ ResX.readValue resourceName (Assembly.GetExecutingAssembly ()) key @@>) if not (String.IsNullOrEmpty node.Comment) then resource.AddXmlDoc node.Comment resource :> MemberInfo) diff --git a/src/FSharp.Configuration.DesignTime/YamlConfigProvider.fs b/src/FSharp.Configuration.DesignTime/YamlConfigProvider.fs new file mode 100644 index 00000000..b939f91d --- /dev/null +++ b/src/FSharp.Configuration.DesignTime/YamlConfigProvider.fs @@ -0,0 +1,258 @@ +module FSharp.Configuration.YamlConfigTypeProvider + +#nowarn "57" +#nowarn "25" + +open System.Reflection +open System +open System.IO +open System.Collections.Generic + +open Microsoft.FSharp.Quotations + +open YamlDotNet.Serialization + +open ProviderImplementation.ProvidedTypes +open ProviderImplementation.ProvidedTypes.UncheckedQuotations +open FSharp.Configuration.Helper +open FSharp.Configuration.Yaml + +module private TypesFactory = + open Parser + + type Scalar with + member x.ToExpr() = + match x with + | Int x -> Expr.Value x + | Int64 x -> Expr.Value x + | String x -> Expr.Value x + | Bool x -> Expr.Value x + | Float x -> Expr.Value x + | TimeSpan x -> + let parse = typeof.GetMethod("Parse", [|typeof|]) + Expr.Call(parse, [Expr.Value (x.ToString())]) + | Uri x -> + let ctr = typeof.GetConstructor [|typeof|] + Expr.NewObject(ctr, [Expr.Value x.OriginalString]) + | Guid x -> + let parse = typeof.GetMethod("Parse", [|typeof|]) + Expr.Call(parse, [Expr.Value (x.ToString())]) + + type T = + { MainType: Type option + Types: MemberInfo list + Init: Expr -> Expr } + + let private generateChangedEvent = + let eventType = typeof + let delegateType = typeof + let combineMethod = delegateType.GetMethod("Combine", [|delegateType; delegateType|]) + let removeMethod = delegateType.GetMethod("Remove", [|delegateType; delegateType|]) + + fun() -> + let eventField = ProvidedField("_changed", eventType) + + let changeEvent m me v = + let current = Expr.Coerce (Expr.FieldGetUnchecked(me, eventField), delegateType) + let other = Expr.Coerce (v, delegateType) + Expr.Coerce (Expr.Call (m, [current; other]), eventType) + + let adder = changeEvent combineMethod + let remover = changeEvent removeMethod + + let event = + ProvidedEvent( + "Changed", + eventType, + adderCode = (fun [me; v] -> Expr.FieldSetUnchecked(me, eventField, adder me v)), + removerCode = (fun [me; v] -> Expr.FieldSetUnchecked(me, eventField, remover me v)) + ) + eventField, event + + let rec transform readOnly name (node: Node) = + match name, node with + | Some name, Scalar x -> transformScalar readOnly name x + | _, Map m -> transformMap readOnly name m + | Some name, List l -> transformList readOnly name true l + | None, _ -> failwithf "Only Maps are allowed at the root level." + + and transformScalar readOnly name (node: Scalar) = + let rawType = node.UnderlyingType + let field = ProvidedField("_" + name, rawType) + let prop = + if readOnly + then ProvidedProperty (name, rawType, isStatic = false, getterCode = (fun [me] -> Expr.FieldGetUnchecked(me, field))) + else ProvidedProperty (name, rawType, isStatic = false, getterCode = (fun [me] -> Expr.FieldGetUnchecked(me, field)), setterCode = (fun [me;v] -> Expr.FieldSetUnchecked(me, field, v))) + let initValue = node.ToExpr() + + { MainType = Some rawType + Types = [field :> MemberInfo; prop :> MemberInfo] + Init = fun me -> Expr.FieldSetUnchecked(me, field, initValue) } + + and transformList readOnly name generateField (children: Node list) = + let elements = + children + |> List.map (function + | Scalar x -> + { MainType = Some x.UnderlyingType + Types = [] + Init = fun _ -> x.ToExpr() } + | Map m -> transformMap readOnly None m + | List l -> transformList readOnly (name + "_Items") false l) + + let elements, elementType = + match elements |> Seq.groupBy (fun n -> n.MainType) |> Seq.map fst |> Seq.toList with + | [Some ty] -> elements, ty + | [None] -> + // Sequence of maps: https://github.com/fsprojects/FSharp.Configuration/issues/51 + // TODOL Construct the type from all the elements (instead of only the first entry) + let headChildren = match children |> Seq.head with Map m -> m | _ -> failwith "expected a sequence of maps." + + let childTypes, childInits = foldChildren readOnly headChildren + let eventField, event = generateChangedEvent() + + let mapTy = + ProvidedTypeDefinition( + name + "_Item_Type", + Some typeof, + hideObjectMethods = true, + isErased = false, + SuppressRelocation = false + ) + + let ctr = ProvidedConstructor([], invokeCode = (fun [me] -> childInits me)) + mapTy.AddMembers (ctr :> MemberInfo :: childTypes) + mapTy.AddMember eventField + mapTy.AddMember event + [{ MainType = Some (mapTy :> _) + Types = [mapTy :> MemberInfo] + Init = fun _ -> Expr.NewObject(ctr, []) }], + mapTy :> _ + | types -> failwithf "List cannot contain elements of heterogeneous types (attempt to mix types: %A)." + (types |> List.map (Option.map (fun x -> x.Name))) + + let propType = ProvidedTypeBuilder.MakeGenericType(typedefof>, [elementType]) + let ctrType = ProvidedTypeBuilder.MakeGenericType(typedefof>, [elementType]) + + let listCtr = + let meth = typeof.GetMethod("CreateResizeArray") + ProvidedTypeBuilder.MakeGenericMethod(meth, [elementType]) + + let childTypes = elements |> List.collect (fun x -> x.Types) + + let initValue ty me = + Expr.Coerce( + Expr.CallUnchecked(listCtr, [Expr.Coerce(Expr.NewArray(elementType, elements |> List.map (fun x -> x.Init me)), ctrType)]), + ty) + + if generateField then + let fieldType = ProvidedTypeBuilder.MakeGenericType(typedefof>, [elementType]) + let field = ProvidedField("_" + name, fieldType) + + let prop = + if readOnly + then ProvidedProperty (name, propType, isStatic=false, + getterCode = (fun [me] -> Expr.Coerce(Expr.FieldGetUnchecked(me, field), propType))) + else ProvidedProperty (name, propType, isStatic=false, + getterCode = (fun [me] -> Expr.Coerce(Expr.FieldGetUnchecked(me, field), propType)), + setterCode = (fun [me; v] -> Expr.FieldSetUnchecked(me, field, Expr.Coerce(Expr.CallUnchecked(listCtr, [Expr.Coerce(v, ctrType)]), fieldType)))) + + { MainType = Some fieldType + Types = childTypes @ [field :> MemberInfo; prop :> MemberInfo] + Init = fun me -> Expr.FieldSetUnchecked(me, field, initValue fieldType me) } + else + { MainType = Some propType + Types = childTypes + Init = initValue propType } + + and foldChildren readOnly (children: (string * Node) list) = + let childTypes, childInits = + children + |> List.map (fun (name, node) -> transform readOnly (Some name) node) + |> List.fold (fun (types, inits) t -> types @ t.Types, inits @ [t.Init]) ([], []) + + let affinedChildInits me = + childInits + |> List.fold (fun acc expr -> expr me :: acc) [] + |> List.reduce (fun res expr -> Expr.Sequential(res, expr)) + + childTypes, affinedChildInits + + and transformMap readOnly name (children: (string * Node) list) = + let childTypes, childInits = foldChildren readOnly children + let eventField, event = generateChangedEvent() + match name with + | Some name -> + let mapTy = ProvidedTypeDefinition(name + "_Type", Some typeof, hideObjectMethods=true, + isErased=false, SuppressRelocation=false) + let ctr = ProvidedConstructor([], invokeCode = (fun [me] -> childInits me)) + mapTy.AddMembers childTypes + mapTy.AddMember ctr + mapTy.AddMember eventField + mapTy.AddMember event + + let field = ProvidedField("_" + name, mapTy) + let prop = ProvidedProperty (name, mapTy, isStatic = false, getterCode = (fun [me] -> Expr.FieldGetUnchecked(me, field))) + { MainType = Some (mapTy :> _) + Types = [mapTy :> MemberInfo; field :> MemberInfo; prop :> MemberInfo] + Init = fun me -> Expr.FieldSetUnchecked(me, field, Expr.NewObject(ctr, [])) } + | None -> + { MainType = None + Types = [eventField :> MemberInfo; event :> MemberInfo] @ childTypes + Init = childInits } + + +let internal typedYamlConfig (context: Context) = + try + let baseTy = typeof + + let asm = Assembly.GetExecutingAssembly() + let yamlConfig = ProvidedTypeDefinition(asm, rootNamespace, "YamlConfig", Some baseTy, isErased = false) + + let staticParams = + [ ProvidedStaticParameter ("FilePath", typeof, "") + ProvidedStaticParameter ("ReadOnly", typeof, false) + ProvidedStaticParameter ("YamlText", typeof, "") + ProvidedStaticParameter ("InferTypesFromStrings", typeof, true) ] + + yamlConfig.AddXmlDoc + """Statically typed YAML config. + Path to YAML file. + Whether the resulting properties will be read-only or not. + Yaml as text. Mutually exclusive with FilePath parameter.""" + + yamlConfig.DefineStaticParameters( + parameters = staticParams, + instantiationFunction = fun typeName paramValues -> + let createTy yaml readOnly inferTypesFromStrings = + let myAssem = ProvidedAssembly() + let ty = ProvidedTypeDefinition (myAssem, rootNamespace, typeName, Some baseTy, isErased = false, hideObjectMethods = true) + let types = TypesFactory.transform readOnly None (Parser.parse inferTypesFromStrings yaml) + let ctr = ProvidedConstructor([], invokeCode = fun (me :: _) -> types.Init me) + let baseCtor = baseTy.GetConstructor(BindingFlags.Public ||| BindingFlags.Instance, null, [|typeof|], null) + ctr.BaseConstructorCall <- fun [me] -> baseCtor, [me; Expr.Value inferTypesFromStrings] + ty.AddMembers (ctr :> MemberInfo :: types.Types) + myAssem.AddTypes [ty] + ty + + match paramValues with + | [| :? string as filePath; :? bool as readOnly; :? string as yamlText; :? bool as inferTypesFromStrings |] -> + match filePath, yamlText with + | "", "" -> failwith "You must specify either FilePath or YamlText parameter." + | "", yamlText -> createTy yamlText readOnly inferTypesFromStrings + | filePath, _ -> + let filePath = + if Path.IsPathRooted filePath + then filePath + else context.ResolutionFolder filePath + |> Path.GetFullPath + context.WatchFile filePath + createTy (File.ReadAllText filePath) readOnly inferTypesFromStrings + | _ -> failwith "Wrong parameters" + + ) + + yamlConfig + with ex -> + debug "Error in YamlProvider: %s\n\t%s" ex.Message ex.StackTrace + reraise () \ No newline at end of file diff --git a/src/FSharp.Configuration.DesignTime/paket.references b/src/FSharp.Configuration.DesignTime/paket.references new file mode 100644 index 00000000..a39c40c2 --- /dev/null +++ b/src/FSharp.Configuration.DesignTime/paket.references @@ -0,0 +1,6 @@ +File:ProvidedTypes.fsi +File:ProvidedTypes.fs + +FSharp.Core +YamlDotNet +System.Configuration.ConfigurationManager diff --git a/src/FSharp.Configuration.Runtime/AppSettingsProvider.Runtime.fs b/src/FSharp.Configuration.Runtime/AppSettingsProvider.Runtime.fs new file mode 100644 index 00000000..3872a4c4 --- /dev/null +++ b/src/FSharp.Configuration.Runtime/AppSettingsProvider.Runtime.fs @@ -0,0 +1,48 @@ +module FSharp.Configuration.AppSettings + +open FSharp.Configuration.Helper +open ProviderImplementation.ProvidedTypes +open System +open System.Configuration +open System.Collections.Generic +open System.Globalization +#if NET461 +open System.Web.Hosting +#endif + +let mutable private exePath = Map.empty +let setExeFilePath key filePath = exePath <- exePath.Add(key, filePath) + +let getConfig file = + let path = exePath + if path.ContainsKey(file) && System.IO.File.Exists(path.[file]) then + ConfigurationManager.OpenExeConfiguration path.[file] + else +#if NET461 + if HostingEnvironment.IsHosted then + Web.Configuration.WebConfigurationManager.OpenWebConfiguration "~" + else ConfigurationManager.OpenExeConfiguration ConfigurationUserLevel.None +#else + ConfigurationManager.OpenExeConfiguration ConfigurationUserLevel.None +#endif + +let getConfigValue(file,key) = + let conf = getConfig file + match conf.AppSettings.Settings.[key] with + | null -> raise <| KeyNotFoundException (sprintf "Cannot find name %s in section of config file. (%s)" key conf.FilePath) + | settings -> settings.Value + +let setConfigValue(file, key, value) = + let config = getConfig file + config.AppSettings.Settings.[key].Value <- value + config.Save() + +let getConnectionString(file, key: string) = + match getConfig(file).ConnectionStrings.ConnectionStrings.[key] with + | null -> raise <| KeyNotFoundException (sprintf "Cannot find name %s in section of config file." key) + | section -> section.ConnectionString + +let setConnectionString(file, key: string, value) = + let config = getConfig file + config.ConnectionStrings.ConnectionStrings.[key].ConnectionString <- value + config.Save() \ No newline at end of file diff --git a/src/FSharp.Configuration.Runtime/AssemblyInfo.fs b/src/FSharp.Configuration.Runtime/AssemblyInfo.fs new file mode 100644 index 00000000..9a0e3310 --- /dev/null +++ b/src/FSharp.Configuration.Runtime/AssemblyInfo.fs @@ -0,0 +1,17 @@ +// Auto-Generated by FAKE; do not edit +namespace System +open System.Reflection + +[] +[] +[] +[] +[] +do () + +module internal AssemblyVersionInformation = + let [] AssemblyTitle = "FSharp.Configuration.Runtime" + let [] AssemblyProduct = "FSharp.Configuration" + let [] AssemblyDescription = "The FSharp.Configuration project contains type providers for the configuration of .NET projects." + let [] AssemblyVersion = "2.0.0" + let [] AssemblyFileVersion = "2.0.0" diff --git a/src/FSharp.Configuration.Runtime/FSharp.Configuration.Runtime.fs b/src/FSharp.Configuration.Runtime/FSharp.Configuration.Runtime.fs new file mode 100644 index 00000000..af4e54e8 --- /dev/null +++ b/src/FSharp.Configuration.Runtime/FSharp.Configuration.Runtime.fs @@ -0,0 +1,5 @@ +namespace FSharp.Configuration.Yaml + +// Put the TypeProviderAssemblyAttribute in the runtime DLL, pointing to the design-time DLL +[] +do () diff --git a/src/FSharp.Configuration.Runtime/FSharp.Configuration.Runtime.fsproj b/src/FSharp.Configuration.Runtime/FSharp.Configuration.Runtime.fsproj new file mode 100644 index 00000000..bfe09394 --- /dev/null +++ b/src/FSharp.Configuration.Runtime/FSharp.Configuration.Runtime.fsproj @@ -0,0 +1,62 @@ + + + + + + + Library + netstandard2.0; net461 + true + + + NET461 + + + + + + + + + True + paket-files/ProvidedTypes.fsi + + + True + paket-files/ProvidedTypes.fs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/FSharp.Configuration.Runtime/IniFileProvider.Runtime.fs b/src/FSharp.Configuration.Runtime/IniFileProvider.Runtime.fs new file mode 100644 index 00000000..cae51242 --- /dev/null +++ b/src/FSharp.Configuration.Runtime/IniFileProvider.Runtime.fs @@ -0,0 +1,76 @@ +module FSharp.Configuration.Ini + +open System +open System.IO + +module Parser = + open System.Text.RegularExpressions + + type Key = string + type Value = string + type Setting = { Key: Key; Value: Value } + type SectionName = string + type Section = { Name: SectionName; Settings: Setting list } + + type Stream = Stream of int * string list + + let (|Regex|_|) pattern = function + | Stream (n, line :: rest) -> + let m = Regex.Match (line, pattern) + if m.Success then + let values = [ for gr in m.Groups -> gr.Value ] + Some (values, Stream (n, rest)) + else None + | _ -> None + + let (|Comment|_|) = function + | Regex @"^\s*;.*" (_, s) -> Some s + | _ -> None + + let (|Header|_|) = function + | Regex @"\[\s*(\S+)\s*\]" ([_; name], s) -> Some (name, s) + | _ -> None + + let (|Setting|_|) = function + | Regex @"\s*(\S+)\s*=\s*(.*)" ([_; key; value], s) -> + Some ({ Key = key; Value = value.Trim() }, s) + | _ -> None + + let (|Settings|_|) s = + let rec loop s settings = + match s with + | Setting (setting, s) -> loop s (setting :: settings) + | Comment s -> loop s settings + | _ -> (List.rev settings, s) + let settings, s = loop s [] + Some (settings, s) + + let rec (|Section|_|) = function + | Header (name, Settings (settings, s)) -> Some ({ Name = name; Settings = settings }, s) + | _ -> None + + let (|Sections|_|) s = + let rec loop s sections = + match s with + | Section (section, s) -> loop s (section :: sections) + | Comment s -> loop s sections + | _ -> (sections |> List.rev, s) + let sections, s = loop s [] + Some (sections, s) + + let streamOfLines lines = Stream (0, lines |> Seq.filter (not << String.IsNullOrWhiteSpace) |> List.ofSeq) + let streamOfFile path = File.ReadLines path |> streamOfLines + let parse path = + match streamOfFile path with + | Sections (sections, _) -> Choice1Of2 sections + | e -> Choice2Of2 e + +let getValue (iniFileName: string) (section: string) (key: string) = + match Parser.parse (Path.GetFileName iniFileName) with + | Choice1Of2 sections -> + maybe { + let! section = sections |> List.tryFind (fun s -> s.Name = section) + let! setting = section.Settings |> List.tryFind (fun s -> s.Key = key) + return setting.Value + } + | Choice2Of2 _ -> None diff --git a/src/FSharp.Configuration.Runtime/ResXProvider.Runtime.fs b/src/FSharp.Configuration.Runtime/ResXProvider.Runtime.fs new file mode 100644 index 00000000..845781a5 --- /dev/null +++ b/src/FSharp.Configuration.Runtime/ResXProvider.Runtime.fs @@ -0,0 +1,29 @@ +module FSharp.Configuration.ResX + +#if NET461 + +open System +open System.IO +open System.Reflection +open System.Resources +open System.ComponentModel.Design +open System.Collections +open System.Collections.Concurrent +open ProviderImplementation.ProvidedTypes +open FSharp.Configuration.Helper + +let readFile (filePath: FilePath) : ResXDataNode list = + use reader = new ResXResourceReader(filePath, UseResXDataNodes = true) + reader + |> Seq.cast + |> Seq.map (fun (x: DictionaryEntry) -> x.Value :?> ResXDataNode) + |> Seq.toList + +let resourceManCache = ConcurrentDictionary () + +let readValue resourceName assembly key = + let resourceMan = resourceManCache.GetOrAdd ((resourceName, assembly), + fun _ -> ResourceManager (resourceName, assembly)) + downcast (resourceMan.GetObject key) + +#endif diff --git a/src/FSharp.Configuration/TypeProviders.Helper.fs b/src/FSharp.Configuration.Runtime/TypeProviders.Helper.fs similarity index 99% rename from src/FSharp.Configuration/TypeProviders.Helper.fs rename to src/FSharp.Configuration.Runtime/TypeProviders.Helper.fs index df98239e..3d4c5004 100644 --- a/src/FSharp.Configuration/TypeProviders.Helper.fs +++ b/src/FSharp.Configuration.Runtime/TypeProviders.Helper.fs @@ -197,7 +197,7 @@ let createNiceNameProvider() = set.Add name |> ignore name -let findConfigFile resolutionFolder configFileName = +let findConfigFile resolutionFolder (configFileName:string) = if Path.IsPathRooted configFileName then configFileName else @@ -268,7 +268,7 @@ module File = watcher.EnableRaisingEvents <- true watcher :> IDisposable - let getFullPath resolutionFolder fileName = + let getFullPath resolutionFolder (fileName:string) = if Path.IsPathRooted fileName then fileName else resolutionFolder fileName diff --git a/src/FSharp.Configuration/YamlConfigProvider.fs b/src/FSharp.Configuration.Runtime/YamlConfigProvider.Runtime.fs similarity index 55% rename from src/FSharp.Configuration/YamlConfigProvider.fs rename to src/FSharp.Configuration.Runtime/YamlConfigProvider.Runtime.fs index 8f7a9bb6..51570244 100644 --- a/src/FSharp.Configuration/YamlConfigProvider.fs +++ b/src/FSharp.Configuration.Runtime/YamlConfigProvider.Runtime.fs @@ -1,25 +1,17 @@ -module FSharp.Configuration.YamlConfigTypeProvider - -#nowarn "57" -#nowarn "25" +namespace FSharp.Configuration.Yaml open System.Reflection open System open System.IO open System.Collections.Generic -open Microsoft.FSharp.Quotations - open YamlDotNet.Serialization - -open FSharp.Configuration.Helper -open ProviderImplementation.ProvidedTypes -open ProviderImplementation.ProvidedTypes.UncheckedQuotations +open FSharp.Configuration type Helper () = static member CreateResizeArray<'a>(data : 'a seq) :ResizeArray<'a> = ResizeArray<'a>(data) -module private Parser = +module Parser = type Scalar = | Int of int | Int64 of int64 @@ -240,192 +232,10 @@ module private Parser = //|> fun x -> printfn "Updated. %d events to raise: %A" (Seq.length x) x; Seq.toList x |> Seq.iter (fun h -> h.Method.Invoke(h.Target, [|box target; EventArgs.Empty|]) |> ignore) -module private TypesFactory = - open Parser - - type Scalar with - member x.ToExpr() = - match x with - | Int x -> Expr.Value x - | Int64 x -> Expr.Value x - | String x -> Expr.Value x - | Bool x -> Expr.Value x - | Float x -> Expr.Value x - | TimeSpan x -> - let parse = typeof.GetMethod("Parse", [|typeof|]) - Expr.Call(parse, [Expr.Value (x.ToString())]) - | Uri x -> - let ctr = typeof.GetConstructor [|typeof|] - Expr.NewObject(ctr, [Expr.Value x.OriginalString]) - | Guid x -> - let parse = typeof.GetMethod("Parse", [|typeof|]) - Expr.Call(parse, [Expr.Value (x.ToString())]) - - type T = - { MainType: Type option - Types: MemberInfo list - Init: Expr -> Expr } - - let private generateChangedEvent = - let eventType = typeof - let delegateType = typeof - let combineMethod = delegateType.GetMethod("Combine", [|delegateType; delegateType|]) - let removeMethod = delegateType.GetMethod("Remove", [|delegateType; delegateType|]) - - fun() -> - let eventField = ProvidedField("_changed", eventType) - - let changeEvent m me v = - let current = Expr.Coerce (Expr.FieldGet(me, eventField), delegateType) - let other = Expr.Coerce (v, delegateType) - Expr.Coerce (Expr.Call (m, [current; other]), eventType) - - let adder = changeEvent combineMethod - let remover = changeEvent removeMethod - - let event = - ProvidedEvent( - "Changed", - eventType, - adderCode = (fun [me; v] -> Expr.FieldSet(me, eventField, adder me v)), - removerCode = (fun [me; v] -> Expr.FieldSet(me, eventField, remover me v)) - ) - eventField, event - - let rec transform readOnly name (node: Node) = - match name, node with - | Some name, Scalar x -> transformScalar readOnly name x - | _, Map m -> transformMap readOnly name m - | Some name, List l -> transformList readOnly name true l - | None, _ -> failwithf "Only Maps are allowed at the root level." - - and transformScalar readOnly name (node: Scalar) = - let rawType = node.UnderlyingType - let field = ProvidedField("_" + name, rawType) - let prop = - if readOnly - then ProvidedProperty (name, rawType, isStatic = false, getterCode = (fun [me] -> Expr.FieldGet(me, field))) - else ProvidedProperty (name, rawType, isStatic = false, getterCode = (fun [me] -> Expr.FieldGet(me, field)), setterCode = (fun [me;v] -> Expr.FieldSet(me, field, v))) - let initValue = node.ToExpr() - - { MainType = Some rawType - Types = [field :> MemberInfo; prop :> MemberInfo] - Init = fun me -> Expr.FieldSet(me, field, initValue) } - - and transformList readOnly name generateField (children: Node list) = - let elements = - children - |> List.map (function - | Scalar x -> - { MainType = Some x.UnderlyingType - Types = [] - Init = fun _ -> x.ToExpr() } - | Map m -> transformMap readOnly None m - | List l -> transformList readOnly (name + "_Items") false l) - - let elements, elementType = - match elements |> Seq.groupBy (fun n -> n.MainType) |> Seq.map fst |> Seq.toList with - | [Some ty] -> elements, ty - | [None] -> - // Sequence of maps: https://github.com/fsprojects/FSharp.Configuration/issues/51 - // TODOL Construct the type from all the elements (instead of only the first entry) - let headChildren = match children |> Seq.head with Map m -> m | _ -> failwith "expected a sequence of maps." - - let childTypes, childInits = foldChildren readOnly headChildren - let eventField, event = generateChangedEvent() - - let mapTy = - ProvidedTypeDefinition( - name + "_Item_Type", - Some typeof, - hideObjectMethods = true, - isErased = false, - SuppressRelocation = false - ) - - let ctr = ProvidedConstructor([], invokeCode = (fun [me] -> childInits me)) - mapTy.AddMembers (ctr :> MemberInfo :: childTypes) - mapTy.AddMember eventField - mapTy.AddMember event - [{ MainType = Some (mapTy :> _) - Types = [mapTy :> MemberInfo] - Init = fun _ -> Expr.NewObject(ctr, []) }], - mapTy :> _ - | types -> failwithf "List cannot contain elements of heterogeneous types (attempt to mix types: %A)." - (types |> List.map (Option.map (fun x -> x.Name))) - - let propType = ProvidedTypeBuilder.MakeGenericType(typedefof>, [elementType]) - let ctrType = ProvidedTypeBuilder.MakeGenericType(typedefof>, [elementType]) - - let listCtr = - let meth = typeof.GetMethod("CreateResizeArray") - ProvidedTypeBuilder.MakeGenericMethod(meth, [elementType]) - - let childTypes = elements |> List.collect (fun x -> x.Types) - - let initValue ty me = - Expr.Coerce( - Expr.CallUnchecked(listCtr, [Expr.Coerce(Expr.NewArray(elementType, elements |> List.map (fun x -> x.Init me)), ctrType)]), - ty) - - if generateField then - let fieldType = ProvidedTypeBuilder.MakeGenericType(typedefof>, [elementType]) - let field = ProvidedField("_" + name, fieldType) - - let prop = - if readOnly - then ProvidedProperty (name, propType, isStatic=false, - getterCode = (fun [me] -> Expr.Coerce(Expr.FieldGet(me, field), propType))) - else ProvidedProperty (name, propType, isStatic=false, - getterCode = (fun [me] -> Expr.Coerce(Expr.FieldGet(me, field), propType)), - setterCode = (fun [me; v] -> Expr.FieldSet(me, field, Expr.Coerce(Expr.CallUnchecked(listCtr, [Expr.Coerce(v, ctrType)]), fieldType)))) - - { MainType = Some fieldType - Types = childTypes @ [field :> MemberInfo; prop :> MemberInfo] - Init = fun me -> Expr.FieldSet(me, field, initValue fieldType me) } - else - { MainType = Some propType - Types = childTypes - Init = initValue propType } - - and foldChildren readOnly (children: (string * Node) list) = - let childTypes, childInits = - children - |> List.map (fun (name, node) -> transform readOnly (Some name) node) - |> List.fold (fun (types, inits) t -> types @ t.Types, inits @ [t.Init]) ([], []) - - let affinedChildInits me = - childInits - |> List.fold (fun acc expr -> expr me :: acc) [] - |> List.reduce (fun res expr -> Expr.Sequential(res, expr)) - - childTypes, affinedChildInits - - and transformMap readOnly name (children: (string * Node) list) = - let childTypes, childInits = foldChildren readOnly children - let eventField, event = generateChangedEvent() - match name with - | Some name -> - let mapTy = ProvidedTypeDefinition(name + "_Type", Some typeof, hideObjectMethods=true, - isErased=false, SuppressRelocation=false) - let ctr = ProvidedConstructor([], invokeCode = (fun [me] -> childInits me)) - mapTy.AddMembers (ctr :> MemberInfo :: childTypes) - let field = ProvidedField("_" + name, mapTy) - let prop = ProvidedProperty (name, mapTy, isStatic = false, getterCode = (fun [me] -> Expr.FieldGet(me, field))) - mapTy.AddMember eventField - mapTy.AddMember event - - { MainType = Some (mapTy :> _) - Types = [mapTy :> MemberInfo; field :> MemberInfo; prop :> MemberInfo] - Init = fun me -> Expr.FieldSet(me, field, Expr.NewObject(ctr, [])) } - | None -> - { MainType = None - Types = [eventField :> MemberInfo; event :> MemberInfo] @ childTypes - Init = childInits } type Root (inferTypesFromStrings: bool) = let serializer = - (** + (* let settings = SerializerSettings(EmitDefaultValues = true, EmitTags = false, SortKeyForMapping = false, EmitAlias = false, ComparerForKeySorting = null) settings.RegisterSerializer ( @@ -540,57 +350,8 @@ type Root (inferTypesFromStrings: bool) = [] member __.Error = errorEvent.Publish -let internal typedYamlConfig (context: Context) = - try - let baseTy = typeof - - let asm = Assembly.GetExecutingAssembly() - let yamlConfig = ProvidedTypeDefinition(asm, rootNamespace, "YamlConfig", Some baseTy, isErased = false) - - let staticParams = - [ ProvidedStaticParameter ("FilePath", typeof, "") - ProvidedStaticParameter ("ReadOnly", typeof, false) - ProvidedStaticParameter ("YamlText", typeof, "") - ProvidedStaticParameter ("InferTypesFromStrings", typeof, true) ] - - yamlConfig.AddXmlDoc - """Statically typed YAML config. - Path to YAML file. - Whether the resulting properties will be read-only or not. - Yaml as text. Mutually exclusive with FilePath parameter.""" - - yamlConfig.DefineStaticParameters( - parameters = staticParams, - instantiationFunction = fun typeName paramValues -> - let createTy yaml readOnly inferTypesFromStrings = - let myAssem = ProvidedAssembly() - let ty = ProvidedTypeDefinition (myAssem, rootNamespace, typeName, Some baseTy, isErased = false, hideObjectMethods = true) - let types = TypesFactory.transform readOnly None (Parser.parse inferTypesFromStrings yaml) - let ctr = ProvidedConstructor([], invokeCode = fun (me :: _) -> types.Init me) - let baseCtor = baseTy.GetConstructor(BindingFlags.Public ||| BindingFlags.Instance, null, [|typeof|], null) - ctr.BaseConstructorCall <- fun [me] -> baseCtor, [me; Expr.Value inferTypesFromStrings] - ty.AddMembers (ctr :> MemberInfo :: types.Types) - myAssem.AddTypes [ty] - ty - - match paramValues with - | [| :? string as filePath; :? bool as readOnly; :? string as yamlText; :? bool as inferTypesFromStrings |] -> - match filePath, yamlText with - | "", "" -> failwith "You must specify either FilePath or YamlText parameter." - | "", yamlText -> createTy yamlText readOnly inferTypesFromStrings - | filePath, _ -> - let filePath = - if Path.IsPathRooted filePath - then filePath - else context.ResolutionFolder filePath - |> Path.GetFullPath - context.WatchFile filePath - createTy (File.ReadAllText filePath) readOnly inferTypesFromStrings - | _ -> failwith "Wrong parameters" - - ) - - yamlConfig - with ex -> - debug "Error in YamlProvider: %s\n\t%s" ex.Message ex.StackTrace - reraise () + + +// Put the TypeProviderAssemblyAttribute in the runtime DLL, pointing to the design-time DLL +[] +do () diff --git a/src/FSharp.Configuration.Runtime/paket.references b/src/FSharp.Configuration.Runtime/paket.references new file mode 100644 index 00000000..887ad553 --- /dev/null +++ b/src/FSharp.Configuration.Runtime/paket.references @@ -0,0 +1,6 @@ +File:ProvidedTypes.fsi +File:ProvidedTypes.fs + +FSharp.Core +YamlDotNet +System.Configuration.ConfigurationManager \ No newline at end of file diff --git a/src/FSharp.Configuration.Runtime/paket.template b/src/FSharp.Configuration.Runtime/paket.template new file mode 100644 index 00000000..1cb625c2 --- /dev/null +++ b/src/FSharp.Configuration.Runtime/paket.template @@ -0,0 +1,39 @@ +type file +id FSharp.Configuration +authors + Steffen Forkmann, Gustavo Guerra, JohnDoeKyrgyz, Don Syme +owners + Steffen Forkmann, Gustavo Guerra, JohnDoeKyrgyz, Don Syme +projectUrl + http://github.com/fsprojects/FSharp.Configuration +iconUrl + https://raw.githubusercontent.com/fsprojects/FSharp.Configuration/master/docs/files/img/logo.png +licenseUrl + http://github.com/fsprojects/FSharp.Configuration/blob/master/LICENSE.txt +requireLicenseAcceptance + false +tags + F# fsharp typeproviders FSharp.Configuration +summary + This library is for the .NET platform implementing FSharp.Configuration. +description + This library is for the .NET platform implementing FSharp.Configuration. +tags + F# fsharp typeproviders FSharp.Configuration +files + bin/Release/net461/FSharp.Configuration.Runtime.* ==> lib/net461 + bin/Release/netstandard2.0/FSharp.Configuration.Runtime.* ==> lib/netstandard2.0 + bin/Release/typeproviders/fsharp41/netstandard2.0/*.dll ==> typeproviders/fsharp41/netstandard2.0 + bin/Release/typeproviders/fsharp41/netcoreapp3.1/*.dll ==> typeproviders/fsharp41/netcoreapp3.1 + bin/Release/typeproviders/fsharp41/net461/*.dll ==> typeproviders/fsharp41/net461 +references + FSharp.Configuration.Runtime.dll +dependencies + FSharp.Core >= LOCKEDVERSION + +# put any package references here +# Some.Package +# framework: netcoreapp3.1 +# System.Text.Encoding.CodePages >= LOCKEDVERSION +# framework: netstandard2.0 +# System.Text.Encoding.CodePages >= LOCKEDVERSION diff --git a/tests/FSharp.Configuration.Tests/AppSettingsProvider.Tests.fs b/tests/FSharp.Configuration.Tests/AppSettingsProvider.Tests.fs index edd0fa98..262834c5 100644 --- a/tests/FSharp.Configuration.Tests/AppSettingsProvider.Tests.fs +++ b/tests/FSharp.Configuration.Tests/AppSettingsProvider.Tests.fs @@ -24,12 +24,12 @@ let [] tests = ] [] -let fakeConfig = __SOURCE_DIRECTORY__ + @"/../../packages/FAKE/tools/FAKE.Deploy.exe.config" +let fakeConfig = __SOURCE_DIRECTORY__ + @"/../../packages/build/FAKE/tools/FAKE.Deploy.exe.config" type FakeSettings = AppSettings let [] test = testCase "Can read different configuration file" (fun _ -> - [| __SOURCE_DIRECTORY__; ".."; ".."; "packages"; "FAKE"; "tools"; "FAKE.Deploy.exe" |] + [| __SOURCE_DIRECTORY__; ".."; ".."; "packages"; "build"; "FAKE"; "tools"; "FAKE.Deploy.exe" |] |> System.IO.Path.Combine |> System.IO.Path.GetFullPath |> FakeSettings.SelectExecutableFile diff --git a/tests/FSharp.Configuration.Tests/FSharp.Configuration.Tests.fsproj b/tests/FSharp.Configuration.Tests/FSharp.Configuration.Tests.fsproj index 36222ef0..b8ca48c7 100644 --- a/tests/FSharp.Configuration.Tests/FSharp.Configuration.Tests.fsproj +++ b/tests/FSharp.Configuration.Tests/FSharp.Configuration.Tests.fsproj @@ -6,6 +6,8 @@ Exe netcoreapp3.1;net461 FSharp.Configuration.Tests + true + true true true @@ -33,7 +35,14 @@ - + + + FSharp.Configuration.Runtime + {7e90d6ce-a10b-4858-a5bc-41df7250cbca} + True + + + \ No newline at end of file diff --git a/tests/FSharp.Configuration.Tests/app.config b/tests/FSharp.Configuration.Tests/app.config index 20aea58b..bda2b41e 100644 --- a/tests/FSharp.Configuration.Tests/app.config +++ b/tests/FSharp.Configuration.Tests/app.config @@ -54,6 +54,56 @@ + + True + + + + + True + + + + + True + + + + + True + + + + + True + + + + + True + + + + + True + + + + + True + + + + + True + + + + + True + + + True From 1d0baa3dfb0f89985566a32df4b67d3b86090e97 Mon Sep 17 00:00:00 2001 From: Johann Deneux Date: Sun, 26 Jan 2020 18:31:53 +0100 Subject: [PATCH 28/41] Fix 'xx_ItemType is not comparable, so it cannot be included [...]' bug When the list field is empty when updateList is called, the list is incorrectly inferred as sortable, as Seq.forall is vacuously true. To fix that, we check itemType using reflection instead. - ":? Uri" is done using Type.IsSubclass - ":? IComparable" uses Type.IsAssignable as IComparable is an interface --- src/FSharp.Configuration/YamlConfigProvider.fs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/FSharp.Configuration/YamlConfigProvider.fs b/src/FSharp.Configuration/YamlConfigProvider.fs index d7302a37..20fd20e8 100644 --- a/src/FSharp.Configuration/YamlConfigProvider.fs +++ b/src/FSharp.Configuration/YamlConfigProvider.fs @@ -181,13 +181,13 @@ module private Parser = if field.FieldType <> fieldType then failwithf "Cannot assign %O to %O." fieldType.Name field.FieldType.Name - let isComparable (x: obj) = x :? Uri || x :? IComparable let values = field.GetValue target :?> Collections.IEnumerable |> Seq.cast + let itemType = fieldType.GetGenericArguments().[0] // NOTE: another solution would be to make our provided type implement IComparable // On the other side I'm not completely sure why we sort at all. // What if the ordering of the item matters for the user? - let isSortable = values |> Seq.forall isComparable - + let isSortable = + itemType.IsSubclassOf(typeof) || typeof.IsAssignableFrom(itemType) let sort (xs: obj seq) = xs |> Seq.sortBy (function @@ -196,7 +196,6 @@ module private Parser = | x -> failwithf "%A is not comparable, so it cannot be included into a list." x) |> Seq.toList - let itemType = fieldType.GetGenericArguments().[0] let updaters = makeListItemUpdaters itemType updaters let oldValues, newValues = From 2eedc93ad35fd5a1b742eafb0acbd02a96b0ed59 Mon Sep 17 00:00:00 2001 From: Johann Deneux Date: Sun, 26 Jan 2020 19:11:43 +0100 Subject: [PATCH 29/41] Add entry 1.6.0 to release notes --- RELEASE_NOTES.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index d641f99b..cdb627f2 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,3 +1,6 @@ +#### 1.6.0 - 26.01.2020 +* Fix bug triggering exception 'xx_ItemType is not comparable' when updating an empty list + #### 1.5.0 - 15.06.2018 * Tweak INI File Parser to allow semicolon characters inside string values (thanks [@zakakula](https://github.com/zakaluka)!). * NOTE: This will result in comments no longer being valid beside string values, instead comments should go on a line above the key-value pair From 0e40b8b1794a6d98e0d554a66d01a0e8e445df4a Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Thu, 16 Jul 2020 11:35:18 +0300 Subject: [PATCH 30/41] staged local changes --- .config/dotnet-tools.json | 2 +- .github/workflows/dotnetcore.yml | 20 +- .gitignore | 1 + .paket/Paket.Restore.targets | 488 ------------------ FSharp.Configuration.sln | 13 + global.json | 3 +- paket.lock | 74 ++- .../YamlConfigProvider.fs | 13 +- tests/FSharp.Configuration.Tests/app.config | 8 +- 9 files changed, 70 insertions(+), 552 deletions(-) delete mode 100644 .paket/Paket.Restore.targets diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 77f1f5c4..3f937512 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "paket": { - "version": "5.241.2", + "version": "5.247.4", "commands": [ "paket" ] diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml index e59eac88..ff2a805f 100644 --- a/.github/workflows/dotnetcore.yml +++ b/.github/workflows/dotnetcore.yml @@ -12,21 +12,21 @@ jobs: build: strategy: + fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macOS-latest] - dotnet: [3.1.100] + dotnet: [3.1.301] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v1 - name: Setup .NET Core - # Fix for https://github.com/actions/setup-dotnet/issues/29#issuecomment-548740241 - uses: actions/setup-dotnet@bb95ce727fd49ec1a65933419cc7c91747785302 - with: + uses: actions/setup-dotnet@v1 + with: dotnet-version: ${{ matrix.dotnet }} - - name: Build and Test (.sh) - if: matrix.os != 'windows-latest' - run: ./build.sh - - name: Build and Test (.cmd) - if: matrix.os == 'windows-latest' - run: .\build.cmd + - name: Install local tools + run: dotnet tool restore + - name: Paket Restore + run: dotnet paket restore + - name: Build and Test + run: dotnet fake run build.fsx diff --git a/.gitignore b/.gitignore index 8e031a47..58d8e089 100644 --- a/.gitignore +++ b/.gitignore @@ -174,6 +174,7 @@ temp/ TestResults.xml release.cmd nuget/ +.paket/ # Nuget outputs nuget/*.nupkg diff --git a/.paket/Paket.Restore.targets b/.paket/Paket.Restore.targets deleted file mode 100644 index dfc4aaec..00000000 --- a/.paket/Paket.Restore.targets +++ /dev/null @@ -1,488 +0,0 @@ - - - - - - - $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - - $(MSBuildVersion) - 15.0.0 - false - true - - true - $(MSBuildThisFileDirectory) - $(MSBuildThisFileDirectory)..\ - $(PaketRootPath)paket-files\paket.restore.cached - $(PaketRootPath)paket.lock - classic - proj - assembly - native - /Library/Frameworks/Mono.framework/Commands/mono - mono - - - $(PaketRootPath)paket.bootstrapper.exe - $(PaketToolsPath)paket.bootstrapper.exe - $([System.IO.Path]::GetDirectoryName("$(PaketBootStrapperExePath)"))\ - - "$(PaketBootStrapperExePath)" - $(MonoPath) --runtime=v4.0.30319 "$(PaketBootStrapperExePath)" - - - True - - - False - - $(BaseIntermediateOutputPath.TrimEnd('\').TrimEnd('\/')) - - - - - - - - - $(PaketRootPath)paket - $(PaketToolsPath)paket - - - - - - $(PaketRootPath)paket.exe - $(PaketToolsPath)paket.exe - - - - - - <_DotnetToolsJson Condition="Exists('$(PaketRootPath)/.config/dotnet-tools.json')">$([System.IO.File]::ReadAllText("$(PaketRootPath)/.config/dotnet-tools.json")) - <_ConfigContainsPaket Condition=" '$(_DotnetToolsJson)' != ''">$(_DotnetToolsJson.Contains('"paket"')) - <_ConfigContainsPaket Condition=" '$(_ConfigContainsPaket)' == ''">false - - - - - - - - - - - <_PaketCommand>dotnet paket - - - - - - $(PaketToolsPath)paket - $(PaketBootStrapperExeDir)paket - - - paket - - - - - <_PaketExeExtension>$([System.IO.Path]::GetExtension("$(PaketExePath)")) - <_PaketCommand Condition=" '$(_PaketCommand)' == '' AND '$(_PaketExeExtension)' == '.dll' ">dotnet "$(PaketExePath)" - <_PaketCommand Condition=" '$(_PaketCommand)' == '' AND '$(OS)' != 'Windows_NT' AND '$(_PaketExeExtension)' == '.exe' ">$(MonoPath) --runtime=v4.0.30319 "$(PaketExePath)" - <_PaketCommand Condition=" '$(_PaketCommand)' == '' ">"$(PaketExePath)" - - - - - - - - - - - - - - - - - - - - - true - $(NoWarn);NU1603;NU1604;NU1605;NU1608 - false - true - - - - - - - - - $([System.IO.File]::ReadAllText('$(PaketRestoreCacheFile)')) - - - - - - - $([System.Text.RegularExpressions.Regex]::Split(`%(Identity)`, `": "`)[0].Replace(`"`, ``).Replace(` `, ``)) - $([System.Text.RegularExpressions.Regex]::Split(`%(Identity)`, `": "`)[1].Replace(`"`, ``).Replace(` `, ``)) - - - - - %(PaketRestoreCachedKeyValue.Value) - %(PaketRestoreCachedKeyValue.Value) - - - - - true - false - true - - - - - true - - - - - - - - - - - - - - - - - - - $(PaketIntermediateOutputPath)\$(MSBuildProjectFile).paket.references.cached - - $(MSBuildProjectFullPath).paket.references - - $(MSBuildProjectDirectory)\$(MSBuildProjectName).paket.references - - $(MSBuildProjectDirectory)\paket.references - - false - true - true - references-file-or-cache-not-found - - - - - $([System.IO.File]::ReadAllText('$(PaketReferencesCachedFilePath)')) - $([System.IO.File]::ReadAllText('$(PaketOriginalReferencesFilePath)')) - references-file - false - - - - - false - - - - - true - target-framework '$(TargetFramework)' or '$(TargetFrameworks)' files @(PaketResolvedFilePaths) - - - - - - - - - - - false - true - - - - - - - - - - - $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',').Length) - $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[0]) - $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[1]) - $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[4]) - $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[5]) - - - %(PaketReferencesFileLinesInfo.PackageVersion) - All - runtime - runtime - true - true - - - - - $(PaketIntermediateOutputPath)/$(MSBuildProjectFile).paket.clitools - - - - - - - - - $([System.String]::Copy('%(PaketCliToolFileLines.Identity)').Split(',')[0]) - $([System.String]::Copy('%(PaketCliToolFileLines.Identity)').Split(',')[1]) - - - %(PaketCliToolFileLinesInfo.PackageVersion) - - - - - - - - - - false - - - - - - <_NuspecFilesNewLocation Include="$(PaketIntermediateOutputPath)\$(Configuration)\*.nuspec"/> - - - - - - $(MSBuildProjectDirectory)/$(MSBuildProjectFile) - true - false - true - false - true - false - true - false - true - $(PaketIntermediateOutputPath)\$(Configuration) - $(PaketIntermediateOutputPath) - - - - <_NuspecFiles Include="$(AdjustedNuspecOutputPath)\*.$(PackageVersion.Split(`+`)[0]).nuspec"/> - - - - - - - - - - - - - - - - - - - - - diff --git a/FSharp.Configuration.sln b/FSharp.Configuration.sln index 6e33a59a..0f9e7569 100644 --- a/FSharp.Configuration.sln +++ b/FSharp.Configuration.sln @@ -35,6 +35,12 @@ Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Configuration.Runtim EndProject Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Configuration.DesignTime", "src\FSharp.Configuration.DesignTime\FSharp.Configuration.DesignTime.fsproj", "{28A30128-1DDE-4CD8-9A67-A6FC0BBC2D68}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{F1BDBF61-84AB-476B-9A1D-3FB51E7DB4BC}" +EndProject +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Configuration.Tests", "tests\FSharp.Configuration.Tests\FSharp.Configuration.Tests.fsproj", "{783E4DEA-BB2F-4A71-8D24-781260DB38F1}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{09FBC2D9-4689-4759-919B-B0A2662522BC}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -45,11 +51,18 @@ Global {28A30128-1DDE-4CD8-9A67-A6FC0BBC2D68}.Debug|Any CPU.Build.0 = Debug|Any CPU {28A30128-1DDE-4CD8-9A67-A6FC0BBC2D68}.Release|Any CPU.ActiveCfg = Release|Any CPU {28A30128-1DDE-4CD8-9A67-A6FC0BBC2D68}.Release|Any CPU.Build.0 = Release|Any CPU + {783E4DEA-BB2F-4A71-8D24-781260DB38F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {783E4DEA-BB2F-4A71-8D24-781260DB38F1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {783E4DEA-BB2F-4A71-8D24-781260DB38F1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {783E4DEA-BB2F-4A71-8D24-781260DB38F1}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {83F16175-43B1-4C90-A1EE-8E351C33435D} = {A6A6AF7D-D6E3-442D-9B1E-58CC91879BE1} + {783E4DEA-BB2F-4A71-8D24-781260DB38F1} = {F1BDBF61-84AB-476B-9A1D-3FB51E7DB4BC} + {28A30128-1DDE-4CD8-9A67-A6FC0BBC2D68} = {09FBC2D9-4689-4759-919B-B0A2662522BC} + {CB156D37-AA7D-4F43-9BC8-816318107F79} = {09FBC2D9-4689-4759-919B-B0A2662522BC} EndGlobalSection EndGlobal diff --git a/global.json b/global.json index c6f34e8d..c6720807 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,6 @@ { "sdk": { - "version": "3.1.100" + "version": "3.1.301", + "rollForward": "minor" } } \ No newline at end of file diff --git a/paket.lock b/paket.lock index 84cd84ce..d0f21e05 100644 --- a/paket.lock +++ b/paket.lock @@ -3,7 +3,7 @@ RESTRICTION: || (== net461) (== netcoreapp3.1) (== netstandard2.0) NUGET remote: http://www.nuget.org/api/v2 FSharp.Core (4.3.4) - Microsoft.NETCore.Platforms (3.1) - restriction: || (== net461) (== netcoreapp3.1) (&& (== netstandard2.0) (>= net461)) (&& (== netstandard2.0) (>= netcoreapp2.0)) + Microsoft.NETCore.Platforms (3.1.1) - restriction: || (== net461) (== netcoreapp3.1) (&& (== netstandard2.0) (>= net461)) (&& (== netstandard2.0) (>= netcoreapp2.0)) Microsoft.Win32.SystemEvents (4.7) - restriction: || (&& (== net461) (>= netcoreapp3.0)) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp3.0)) Microsoft.NETCore.Platforms (>= 3.1) - restriction: || (&& (== net461) (>= netcoreapp2.0)) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.0)) NETStandard.Library (2.0.3) - restriction: || (== net461) (&& (== netcoreapp3.1) (>= net461)) (&& (== netstandard2.0) (>= net461)) @@ -11,19 +11,19 @@ NUGET NETStandard.Library.NETFramework (2.0.0-preview2-25405-01) Microsoft.NETCore.Platforms (>= 2.0.0-preview2-25405-01) - restriction: || (== net461) (&& (== netcoreapp3.1) (>= net461)) (&& (== netstandard2.0) (>= net461)) NETStandard.Library (>= 2.0.0-preview2-25401-01) - restriction: || (== net461) (&& (== netcoreapp3.1) (>= net461)) (&& (== netstandard2.0) (>= net461)) - System.Buffers (4.5) - restriction: || (&& (== net461) (== netcoreapp3.1)) (&& (== netcoreapp3.1) (>= monotouch)) (&& (== netcoreapp3.1) (>= net461)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (&& (== netcoreapp3.1) (< netstandard1.1)) (&& (== netcoreapp3.1) (< netstandard2.0)) (&& (== netcoreapp3.1) (>= xamarinios)) (&& (== netcoreapp3.1) (>= xamarinmac)) (&& (== netcoreapp3.1) (>= xamarintvos)) (&& (== netcoreapp3.1) (>= xamarinwatchos)) (== netstandard2.0) + System.Buffers (4.5.1) - restriction: || (&& (== net461) (== netcoreapp3.1)) (&& (== netcoreapp3.1) (>= monoandroid)) (&& (== netcoreapp3.1) (>= monotouch)) (&& (== netcoreapp3.1) (>= net461)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (&& (== netcoreapp3.1) (< netstandard1.1)) (&& (== netcoreapp3.1) (< netstandard2.0)) (&& (== netcoreapp3.1) (>= xamarinios)) (&& (== netcoreapp3.1) (>= xamarinmac)) (&& (== netcoreapp3.1) (>= xamarintvos)) (&& (== netcoreapp3.1) (>= xamarinwatchos)) (== netstandard2.0) System.Configuration.ConfigurationManager (4.7) System.Security.Cryptography.ProtectedData (>= 4.7) - restriction: || (== netcoreapp3.1) (== netstandard2.0) System.Security.Permissions (>= 4.7) System.Drawing.Common (4.7) - restriction: || (&& (== net461) (>= netcoreapp3.0)) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp3.0)) Microsoft.NETCore.Platforms (>= 3.1) - restriction: || (&& (== net461) (>= netcoreapp2.0)) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.0)) Microsoft.Win32.SystemEvents (>= 4.7) - restriction: || (&& (== net461) (>= netcoreapp2.0)) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.0)) - System.Memory (4.5.3) - restriction: || (&& (== net461) (== netcoreapp3.1)) (&& (== netcoreapp3.1) (< netcoreapp2.1)) (== netstandard2.0) - System.Buffers (>= 4.4) - restriction: || (== net461) (&& (== netcoreapp3.1) (>= monotouch)) (&& (== netcoreapp3.1) (>= net461)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (&& (== netcoreapp3.1) (< netstandard1.1)) (&& (== netcoreapp3.1) (< netstandard2.0)) (&& (== netcoreapp3.1) (>= xamarinios)) (&& (== netcoreapp3.1) (>= xamarinmac)) (&& (== netcoreapp3.1) (>= xamarintvos)) (&& (== netcoreapp3.1) (>= xamarinwatchos)) (== netstandard2.0) - System.Numerics.Vectors (>= 4.4) - restriction: || (== net461) (&& (== netcoreapp3.1) (>= net461)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (== netstandard2.0) - System.Runtime.CompilerServices.Unsafe (>= 4.5.2) - restriction: || (== net461) (&& (== netcoreapp3.1) (>= monotouch)) (&& (== netcoreapp3.1) (>= net461)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (&& (== netcoreapp3.1) (< netcoreapp2.1)) (&& (== netcoreapp3.1) (< netstandard1.1)) (&& (== netcoreapp3.1) (< netstandard2.0)) (&& (== netcoreapp3.1) (>= uap10.1)) (&& (== netcoreapp3.1) (>= xamarinios)) (&& (== netcoreapp3.1) (>= xamarinmac)) (&& (== netcoreapp3.1) (>= xamarintvos)) (&& (== netcoreapp3.1) (>= xamarinwatchos)) (== netstandard2.0) - System.Numerics.Vectors (4.5) - restriction: || (&& (== net461) (== netcoreapp3.1)) (&& (== netcoreapp3.1) (>= net461)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (== netstandard2.0) - System.Runtime.CompilerServices.Unsafe (4.7) - restriction: || (&& (== net461) (== netcoreapp3.1)) (&& (== netcoreapp3.1) (>= monotouch)) (&& (== netcoreapp3.1) (>= net461)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (&& (== netcoreapp3.1) (< netcoreapp2.1)) (&& (== netcoreapp3.1) (< netstandard1.1)) (&& (== netcoreapp3.1) (< netstandard2.0)) (&& (== netcoreapp3.1) (>= uap10.1)) (&& (== netcoreapp3.1) (>= xamarinios)) (&& (== netcoreapp3.1) (>= xamarinmac)) (&& (== netcoreapp3.1) (>= xamarintvos)) (&& (== netcoreapp3.1) (>= xamarinwatchos)) (== netstandard2.0) + System.Memory (4.5.4) - restriction: || (&& (== net461) (== netcoreapp3.1)) (&& (== netcoreapp3.1) (< netcoreapp2.1)) (== netstandard2.0) + System.Buffers (>= 4.5.1) - restriction: || (== net461) (&& (== netcoreapp3.1) (>= monoandroid)) (&& (== netcoreapp3.1) (>= monotouch)) (&& (== netcoreapp3.1) (>= net461)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (&& (== netcoreapp3.1) (< netstandard1.1)) (&& (== netcoreapp3.1) (< netstandard2.0)) (&& (== netcoreapp3.1) (>= xamarinios)) (&& (== netcoreapp3.1) (>= xamarinmac)) (&& (== netcoreapp3.1) (>= xamarintvos)) (&& (== netcoreapp3.1) (>= xamarinwatchos)) (== netstandard2.0) + System.Numerics.Vectors (>= 4.4) - restriction: || (&& (== net461) (< net45) (>= netstandard2.0)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (== netstandard2.0) + System.Runtime.CompilerServices.Unsafe (>= 4.5.3) - restriction: || (== net461) (&& (== netcoreapp3.1) (>= monoandroid)) (&& (== netcoreapp3.1) (>= monotouch)) (&& (== netcoreapp3.1) (>= net461)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (&& (== netcoreapp3.1) (< netcoreapp2.1)) (&& (== netcoreapp3.1) (< netstandard1.1)) (&& (== netcoreapp3.1) (< netstandard2.0)) (&& (== netcoreapp3.1) (>= uap10.1)) (&& (== netcoreapp3.1) (>= xamarinios)) (&& (== netcoreapp3.1) (>= xamarinmac)) (&& (== netcoreapp3.1) (>= xamarintvos)) (&& (== netcoreapp3.1) (>= xamarinwatchos)) (== netstandard2.0) + System.Numerics.Vectors (4.5) - restriction: || (&& (== net461) (== netcoreapp3.1)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (== netstandard2.0) + System.Runtime.CompilerServices.Unsafe (4.7.1) - restriction: || (&& (== net461) (== netcoreapp3.1)) (&& (== netcoreapp3.1) (>= monoandroid)) (&& (== netcoreapp3.1) (>= monotouch)) (&& (== netcoreapp3.1) (>= net461)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (&& (== netcoreapp3.1) (< netcoreapp2.1)) (&& (== netcoreapp3.1) (< netstandard1.1)) (&& (== netcoreapp3.1) (< netstandard2.0)) (&& (== netcoreapp3.1) (>= uap10.1)) (&& (== netcoreapp3.1) (>= xamarinios)) (&& (== netcoreapp3.1) (>= xamarinmac)) (&& (== netcoreapp3.1) (>= xamarintvos)) (&& (== netcoreapp3.1) (>= xamarinwatchos)) (== netstandard2.0) System.Security.AccessControl (4.7) Microsoft.NETCore.Platforms (>= 3.1) - restriction: || (&& (== net461) (>= netcoreapp2.0)) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.0)) System.Security.Principal.Windows (>= 4.7) @@ -35,54 +35,40 @@ NUGET System.Security.Principal.Windows (4.7) System.Windows.Extensions (4.7) - restriction: || (&& (== net461) (>= netcoreapp3.0)) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp3.0)) System.Drawing.Common (>= 4.7) - restriction: || (&& (== net461) (>= netcoreapp3.0)) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp3.0)) - YamlDotNet (8.0) + YamlDotNet (8.1.2) GITHUB remote: fsprojects/FSharp.TypeProviders.SDK - src/ProvidedTypes.fs (b8727a47dd83d3e88aed8f2100f6712478c64632) - src/ProvidedTypes.fsi (b8727a47dd83d3e88aed8f2100f6712478c64632) - src/ProvidedTypesTesting.fs (b8727a47dd83d3e88aed8f2100f6712478c64632) + src/ProvidedTypes.fs (b45779c1571b54a2bc6bafa12690a8d9763150d1) + src/ProvidedTypes.fsi (b45779c1571b54a2bc6bafa12690a8d9763150d1) + src/ProvidedTypesTesting.fs (b45779c1571b54a2bc6bafa12690a8d9763150d1) GROUP Build RESTRICTION: == net461 NUGET remote: https://www.nuget.org/api/v2 - FAKE (4.64.17) - FSharp.Compiler.Service (27.0.1) - FSharp.Core (>= 4.5.2) - System.Collections.Immutable (>= 1.5) - System.Reflection.Metadata (>= 1.6) - System.ValueTuple (>= 4.4) - FSharp.Core (4.7) - FSharp.Formatting (3.1) - FSharp.Compiler.Service (>= 27.0.1 < 28.0) - Microsoft.AspNet.Razor (>= 3.2.7 < 4.0) - System.ValueTuple (>= 4.5 < 5.0) - Microsoft.AspNet.Razor (3.2.7) - Octokit (0.36) + FAKE (4.64.18) + FSharp.Formatting (5.0.5) + Octokit (0.48) SourceLink.Fake (1.1) - System.Buffers (4.5) - System.Collections.Immutable (1.7) - System.Memory (>= 4.5.3) - System.Memory (4.5.3) - System.Buffers (>= 4.4) - System.Numerics.Vectors (>= 4.4) - System.Runtime.CompilerServices.Unsafe (>= 4.5.2) - System.Numerics.Vectors (4.5) - System.Reflection.Metadata (1.8) - System.Collections.Immutable (>= 1.7) - System.Runtime.CompilerServices.Unsafe (4.7) - System.ValueTuple (4.5) GITHUB remote: fsharp/FAKE - modules/Octokit/Octokit.fsx (cb792f4e5e7b2a182c6fabc48dd86a457db7937d) + modules/Octokit/Octokit.fsx (74421063dd3915e8e1e407926b38b8b25df50e36) Octokit (>= 0.20) GROUP Test REDIRECTS: FORCE RESTRICTION: || (== net461) (== netcoreapp3.1) NUGET remote: https://www.nuget.org/api/v2 - Expecto (8.13.1) - FSharp.Core (>= 4.3.4) - Mono.Cecil (>= 0.11) - FSharp.Core (4.7) - redirects: force - Mono.Cecil (0.11.1) - System.Resources.Extensions (4.7) + Expecto (9.0.2) + FSharp.Core (>= 4.6) + Mono.Cecil (>= 0.11.2) + FSharp.Core (4.7.2) - redirects: force + Mono.Cecil (0.11.2) + System.Buffers (4.5.1) - restriction: || (== net461) (&& (== netcoreapp3.1) (>= monoandroid)) (&& (== netcoreapp3.1) (>= monotouch)) (&& (== netcoreapp3.1) (>= net461)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (&& (== netcoreapp3.1) (< netstandard1.1)) (&& (== netcoreapp3.1) (< netstandard2.0)) (&& (== netcoreapp3.1) (>= xamarinios)) (&& (== netcoreapp3.1) (>= xamarinmac)) (&& (== netcoreapp3.1) (>= xamarintvos)) (&& (== netcoreapp3.1) (>= xamarinwatchos)) + System.Memory (4.5.4) - restriction: || (== net461) (&& (== netcoreapp3.1) (>= net461)) (&& (== netcoreapp3.1) (< netcoreapp2.1)) + System.Buffers (>= 4.5.1) - restriction: || (== net461) (&& (== netcoreapp3.1) (>= monoandroid)) (&& (== netcoreapp3.1) (>= monotouch)) (&& (== netcoreapp3.1) (>= net461)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (&& (== netcoreapp3.1) (< netstandard1.1)) (&& (== netcoreapp3.1) (< netstandard2.0)) (&& (== netcoreapp3.1) (>= xamarinios)) (&& (== netcoreapp3.1) (>= xamarinmac)) (&& (== netcoreapp3.1) (>= xamarintvos)) (&& (== netcoreapp3.1) (>= xamarinwatchos)) + System.Numerics.Vectors (>= 4.5) - restriction: || (== net461) (&& (== netcoreapp3.1) (>= net461)) + System.Runtime.CompilerServices.Unsafe (>= 4.5.3) - restriction: || (== net461) (&& (== netcoreapp3.1) (>= monoandroid)) (&& (== netcoreapp3.1) (>= monotouch)) (&& (== netcoreapp3.1) (>= net461)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (&& (== netcoreapp3.1) (< netcoreapp2.1)) (&& (== netcoreapp3.1) (< netstandard1.1)) (&& (== netcoreapp3.1) (< netstandard2.0)) (&& (== netcoreapp3.1) (>= uap10.1)) (&& (== netcoreapp3.1) (>= xamarinios)) (&& (== netcoreapp3.1) (>= xamarinmac)) (&& (== netcoreapp3.1) (>= xamarintvos)) (&& (== netcoreapp3.1) (>= xamarinwatchos)) + System.Numerics.Vectors (4.5) - restriction: || (== net461) (&& (== netcoreapp3.1) (>= net461)) + System.Resources.Extensions (4.7.1) + System.Memory (>= 4.5.4) - restriction: || (== net461) (&& (== netcoreapp3.1) (>= net461)) (&& (== netcoreapp3.1) (< netcoreapp2.1)) + System.Runtime.CompilerServices.Unsafe (4.7.1) - restriction: || (== net461) (&& (== netcoreapp3.1) (>= monoandroid)) (&& (== netcoreapp3.1) (>= monotouch)) (&& (== netcoreapp3.1) (>= net461)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (&& (== netcoreapp3.1) (< netcoreapp2.1)) (&& (== netcoreapp3.1) (< netstandard1.1)) (&& (== netcoreapp3.1) (< netstandard2.0)) (&& (== netcoreapp3.1) (>= uap10.1)) (&& (== netcoreapp3.1) (>= xamarinios)) (&& (== netcoreapp3.1) (>= xamarinmac)) (&& (== netcoreapp3.1) (>= xamarintvos)) (&& (== netcoreapp3.1) (>= xamarinwatchos)) diff --git a/src/FSharp.Configuration.DesignTime/YamlConfigProvider.fs b/src/FSharp.Configuration.DesignTime/YamlConfigProvider.fs index b939f91d..7b42a7fe 100644 --- a/src/FSharp.Configuration.DesignTime/YamlConfigProvider.fs +++ b/src/FSharp.Configuration.DesignTime/YamlConfigProvider.fs @@ -81,8 +81,11 @@ module private TypesFactory = let field = ProvidedField("_" + name, rawType) let prop = if readOnly - then ProvidedProperty (name, rawType, isStatic = false, getterCode = (fun [me] -> Expr.FieldGetUnchecked(me, field))) - else ProvidedProperty (name, rawType, isStatic = false, getterCode = (fun [me] -> Expr.FieldGetUnchecked(me, field)), setterCode = (fun [me;v] -> Expr.FieldSetUnchecked(me, field, v))) + then ProvidedProperty (name, rawType, isStatic = false, + getterCode = (fun [me] -> Expr.FieldGetUnchecked(me, field))) + else ProvidedProperty (name, rawType, isStatic = false, + getterCode = (fun [me] -> Expr.FieldGetUnchecked(me, field)), + setterCode = (fun [me;v] -> Expr.FieldSetUnchecked(me, field, v))) let initValue = node.ToExpr() { MainType = Some rawType @@ -121,7 +124,8 @@ module private TypesFactory = ) let ctr = ProvidedConstructor([], invokeCode = (fun [me] -> childInits me)) - mapTy.AddMembers (ctr :> MemberInfo :: childTypes) + mapTy.AddMembers childTypes + mapTy.AddMember ctr mapTy.AddMember eventField mapTy.AddMember event [{ MainType = Some (mapTy :> _) @@ -195,7 +199,8 @@ module private TypesFactory = let prop = ProvidedProperty (name, mapTy, isStatic = false, getterCode = (fun [me] -> Expr.FieldGetUnchecked(me, field))) { MainType = Some (mapTy :> _) Types = [mapTy :> MemberInfo; field :> MemberInfo; prop :> MemberInfo] - Init = fun me -> Expr.FieldSetUnchecked(me, field, Expr.NewObject(ctr, [])) } + Init = fun me -> Expr.FieldSetUnchecked(me, field, Expr.NewObject(ctr, [])) + } | None -> { MainType = None Types = [eventField :> MemberInfo; event :> MemberInfo] @ childTypes diff --git a/tests/FSharp.Configuration.Tests/app.config b/tests/FSharp.Configuration.Tests/app.config index bda2b41e..b7d5ffe4 100644 --- a/tests/FSharp.Configuration.Tests/app.config +++ b/tests/FSharp.Configuration.Tests/app.config @@ -107,22 +107,22 @@ True - + True - + True - + True - + True From db2e006b3f2ae09c5b798a438731c295ed2512cc Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Thu, 16 Jul 2020 11:39:00 +0300 Subject: [PATCH 31/41] fix workflow --- .github/workflows/dotnetcore.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml index ff2a805f..47523f8d 100644 --- a/.github/workflows/dotnetcore.yml +++ b/.github/workflows/dotnetcore.yml @@ -19,7 +19,6 @@ jobs: runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v1 - name: Setup .NET Core uses: actions/setup-dotnet@v1 with: From f38d8849d7b2ce3c7a15b6acb490fc0475c5f687 Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Thu, 16 Jul 2020 11:40:45 +0300 Subject: [PATCH 32/41] fix workflow --- .github/workflows/dotnetcore.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml index 47523f8d..bf6fa169 100644 --- a/.github/workflows/dotnetcore.yml +++ b/.github/workflows/dotnetcore.yml @@ -19,13 +19,14 @@ jobs: runs-on: ${{ matrix.os }} steps: + - uses: actions/checkout@v1 - name: Setup .NET Core - uses: actions/setup-dotnet@v1 - with: - dotnet-version: ${{ matrix.dotnet }} + uses: actions/setup-dotnet@v1 + with: + dotnet-version: ${{ matrix.dotnet }} - name: Install local tools - run: dotnet tool restore + run: dotnet tool restore - name: Paket Restore - run: dotnet paket restore + run: dotnet paket restore - name: Build and Test - run: dotnet fake run build.fsx + run: dotnet fake run build.fsx From 579ae776a85cde4f7a759509225bb6559579044c Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Thu, 16 Jul 2020 11:41:43 +0300 Subject: [PATCH 33/41] fix workflow --- .github/workflows/dotnetcore.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml index bf6fa169..26b73bbf 100644 --- a/.github/workflows/dotnetcore.yml +++ b/.github/workflows/dotnetcore.yml @@ -23,7 +23,7 @@ jobs: - name: Setup .NET Core uses: actions/setup-dotnet@v1 with: - dotnet-version: ${{ matrix.dotnet }} + dotnet-version: ${{ matrix.dotnet }} - name: Install local tools run: dotnet tool restore - name: Paket Restore From c8f16d3b45a571371837e8c5381b2fb0064f9f37 Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Thu, 16 Jul 2020 16:36:32 +0300 Subject: [PATCH 34/41] FAKE 5 --- .config/dotnet-tools.json | 6 + .gitignore | 1 + FSharp.Configuration.sln | 35 ++-- build.cmd | 2 +- build.fsx | 325 ++++++++++++++++-------------- build.fsx.lock | 409 ++++++++++++++++++++++++++++++++++++++ build.sh | 4 +- paket.dependencies | 11 - paket.lock | 12 -- 9 files changed, 617 insertions(+), 188 deletions(-) create mode 100644 build.fsx.lock diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 3f937512..d7d42231 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -7,6 +7,12 @@ "commands": [ "paket" ] + }, + "fake-cli": { + "version": "5.20.2", + "commands": [ + "fake" + ] } } } \ No newline at end of file diff --git a/.gitignore b/.gitignore index 58d8e089..47d164d7 100644 --- a/.gitignore +++ b/.gitignore @@ -175,6 +175,7 @@ TestResults.xml release.cmd nuget/ .paket/ +.fake/ # Nuget outputs nuget/*.nupkg diff --git a/FSharp.Configuration.sln b/FSharp.Configuration.sln index 0f9e7569..166e42b3 100644 --- a/FSharp.Configuration.sln +++ b/FSharp.Configuration.sln @@ -1,6 +1,7 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.31101.0 + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29613.14 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{A6A6AF7D-D6E3-442D-9B1E-58CC91879BE1}" ProjectSection(SolutionItems) = preProject @@ -18,7 +19,6 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "project", "project", "{BF60BC93-E09B-4E5F-9D85-95A519479D54}" ProjectSection(SolutionItems) = preProject build.fsx = build.fsx - FSharp.Configuration.nuspec = FSharp.Configuration.nuspec paket.dependencies = paket.dependencies paket.lock = paket.lock README.md = README.md @@ -31,38 +31,45 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{83F16175 docs\tools\templates\template.cshtml = docs\tools\templates\template.cshtml EndProjectSection EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Configuration.Runtime", "src\FSharp.Configuration.Runtime\FSharp.Configuration.Runtime.fsproj", "{CB156D37-AA7D-4F43-9BC8-816318107F79}" +Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Configuration.Runtime", "src\FSharp.Configuration.Runtime\FSharp.Configuration.Runtime.fsproj", "{CB156D37-AA7D-4F43-9BC8-816318107F79}" EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Configuration.DesignTime", "src\FSharp.Configuration.DesignTime\FSharp.Configuration.DesignTime.fsproj", "{28A30128-1DDE-4CD8-9A67-A6FC0BBC2D68}" +Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Configuration.DesignTime", "src\FSharp.Configuration.DesignTime\FSharp.Configuration.DesignTime.fsproj", "{28A30128-1DDE-4CD8-9A67-A6FC0BBC2D68}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{F1BDBF61-84AB-476B-9A1D-3FB51E7DB4BC}" EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Configuration.Tests", "tests\FSharp.Configuration.Tests\FSharp.Configuration.Tests.fsproj", "{783E4DEA-BB2F-4A71-8D24-781260DB38F1}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{09FBC2D9-4689-4759-919B-B0A2662522BC}" EndProject +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Configuration.Tests", "tests\FSharp.Configuration.Tests\FSharp.Configuration.Tests.fsproj", "{4E6FEA3F-9C19-45E1-AA59-2FA7CEBAF11F}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {CB156D37-AA7D-4F43-9BC8-816318107F79}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CB156D37-AA7D-4F43-9BC8-816318107F79}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CB156D37-AA7D-4F43-9BC8-816318107F79}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CB156D37-AA7D-4F43-9BC8-816318107F79}.Release|Any CPU.Build.0 = Release|Any CPU {28A30128-1DDE-4CD8-9A67-A6FC0BBC2D68}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {28A30128-1DDE-4CD8-9A67-A6FC0BBC2D68}.Debug|Any CPU.Build.0 = Debug|Any CPU {28A30128-1DDE-4CD8-9A67-A6FC0BBC2D68}.Release|Any CPU.ActiveCfg = Release|Any CPU {28A30128-1DDE-4CD8-9A67-A6FC0BBC2D68}.Release|Any CPU.Build.0 = Release|Any CPU - {783E4DEA-BB2F-4A71-8D24-781260DB38F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {783E4DEA-BB2F-4A71-8D24-781260DB38F1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {783E4DEA-BB2F-4A71-8D24-781260DB38F1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {783E4DEA-BB2F-4A71-8D24-781260DB38F1}.Release|Any CPU.Build.0 = Release|Any CPU + {4E6FEA3F-9C19-45E1-AA59-2FA7CEBAF11F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4E6FEA3F-9C19-45E1-AA59-2FA7CEBAF11F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4E6FEA3F-9C19-45E1-AA59-2FA7CEBAF11F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4E6FEA3F-9C19-45E1-AA59-2FA7CEBAF11F}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {83F16175-43B1-4C90-A1EE-8E351C33435D} = {A6A6AF7D-D6E3-442D-9B1E-58CC91879BE1} - {783E4DEA-BB2F-4A71-8D24-781260DB38F1} = {F1BDBF61-84AB-476B-9A1D-3FB51E7DB4BC} - {28A30128-1DDE-4CD8-9A67-A6FC0BBC2D68} = {09FBC2D9-4689-4759-919B-B0A2662522BC} {CB156D37-AA7D-4F43-9BC8-816318107F79} = {09FBC2D9-4689-4759-919B-B0A2662522BC} + {28A30128-1DDE-4CD8-9A67-A6FC0BBC2D68} = {09FBC2D9-4689-4759-919B-B0A2662522BC} + {4E6FEA3F-9C19-45E1-AA59-2FA7CEBAF11F} = {F1BDBF61-84AB-476B-9A1D-3FB51E7DB4BC} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {5F7E4B18-0D4C-454A-A7BD-3F3E5E8CE018} EndGlobalSection EndGlobal diff --git a/build.cmd b/build.cmd index 9e2e3861..d7f75484 100644 --- a/build.cmd +++ b/build.cmd @@ -1,4 +1,4 @@ @echo off dotnet tool restore dotnet paket restore -packages\build\FAKE\tools\FAKE.exe build.fsx %* +dotnet fake run build.fsx %* \ No newline at end of file diff --git a/build.fsx b/build.fsx index c2f9646d..1c731c2e 100644 --- a/build.fsx +++ b/build.fsx @@ -1,26 +1,40 @@ -// -------------------------------------------------------------------------------------- -// FAKE build script -// -------------------------------------------------------------------------------------- - -#r @"packages/build/FAKE/tools/FakeLib.dll" -#load "paket-files/build/fsharp/FAKE/modules/Octokit/Octokit.fsx" - -open Fake -open Fake.Git -open Fake.AssemblyInfoFile -open Fake.ReleaseNotesHelper +#r @"paket: +source https://nuget.org/api/v2 +framework netstandard2.0 +nuget Fake.Core.Target +nuget Fake.Core.Process +nuget Fake.Core.ReleaseNotes +nuget Fake.IO.FileSystem +nuget Fake.DotNet.Cli +nuget Fake.DotNet.MSBuild +nuget Fake.DotNet.AssemblyInfoFile +nuget Fake.DotNet.Paket +nuget Fake.DotNet.Testing.Expecto +nuget Fake.DotNet.FSFormatting +nuget Fake.Tools.Git +nuget Fake.Api.GitHub //" + +#if !FAKE +#load "./.fake/build.fsx/intellisense.fsx" +#r "netstandard" // Temp fix for https://github.com/fsharp/FAKE/issues/1985 +#endif + +open Fake +open Fake.Core.TargetOperators +open Fake.Core +open Fake.IO +open Fake.IO.FileSystemOperators +open Fake.IO.Globbing.Operators +open Fake.DotNet +open Fake.DotNet.Testing +open Fake.Tools +open Fake.Tools.Git open System -open Octokit +open System.IO -// -------------------------------------------------------------------------------------- -// START TODO: Provide project-specific details below -// -------------------------------------------------------------------------------------- +Target.initEnvironment() -// Information about the project are used -// - for version and project name in generated AssemblyInfo file -// - by the generated NuGet package -// - to run tests and to publish documentation on GitHub gh-pages -// - for documentation, you also need to edit info in "docs/tools/generate.fsx" +// -------------------------------------------------------------------------------------- // The name of the project // (used by attributes in AssemblyInfo, name of a NuGet package and directory in 'src') @@ -59,32 +73,32 @@ let nugetDir = "./nuget/" // Read additional information from the release notes document -let release = LoadReleaseNotes "RELEASE_NOTES.md" +let release = ReleaseNotes.load "RELEASE_NOTES.md" let genFSAssemblyInfo (projectPath:string) = let projectName = System.IO.Path.GetFileNameWithoutExtension(projectPath) let basePath = "src/" + projectName let fileName = basePath + "/AssemblyInfo.fs" - CreateFSharpAssemblyInfo fileName - [ Attribute.Title (projectName) - Attribute.Product project - Attribute.Description summary - Attribute.Version release.AssemblyVersion - Attribute.FileVersion release.AssemblyVersion ] + AssemblyInfoFile.createFSharp fileName + [ AssemblyInfo.Title (projectName) + AssemblyInfo.Product project + AssemblyInfo.Description summary + AssemblyInfo.Version release.AssemblyVersion + AssemblyInfo.FileVersion release.AssemblyVersion ] let genCSAssemblyInfo (projectPath:string) = let projectName = System.IO.Path.GetFileNameWithoutExtension(projectPath) let basePath = "src/" + projectName + "/Properties" let fileName = basePath + "/AssemblyInfo.cs" - CreateCSharpAssemblyInfo fileName - [ Attribute.Title (projectName) - Attribute.Product project - Attribute.Description summary - Attribute.Version release.AssemblyVersion - Attribute.FileVersion release.AssemblyVersion ] + AssemblyInfoFile.createCSharp fileName + [ AssemblyInfo.Title (projectName) + AssemblyInfo.Product project + AssemblyInfo.Description summary + AssemblyInfo.Version release.AssemblyVersion + AssemblyInfo.FileVersion release.AssemblyVersion ] // Generate assembly info files with the right version & up-to-date information -Target "AssemblyInfo" (fun _ -> +Target.create "AssemblyInfo" (fun _ -> let fsProjs = !! "src/**/*.fsproj" let csProjs = !! "src/**/*.csproj" fsProjs |> Seq.iter genFSAssemblyInfo @@ -94,24 +108,19 @@ Target "AssemblyInfo" (fun _ -> // -------------------------------------------------------------------------------------- // Clean build results & restore NuGet packages -Target "Clean" (fun _ -> - CleanDirs [buildDir; "temp"; nugetDir] +Target.create "Clean" (fun _ -> + Shell.cleanDirs [buildDir; "temp"; nugetDir] ) -Target "CleanDocs" (fun _ -> - CleanDirs ["docs/output"] +Target.create "CleanDocs" (fun _ -> + Shell.cleanDirs ["docs/output"] ) // -------------------------------------------------------------------------------------- // Build library & test project -Target "Build" (fun _ -> - DotNetCli.Build (fun c -> - { c with - Project = "FSharp.Configuration.sln" - Configuration = "Release" - //AdditionalArgs= ["-v n"] - }) +Target.create "Build" (fun _ -> + DotNet.exec id "build" "FSharp.Configuration.sln -c Release" |> ignore // let outDir = __SOURCE_DIRECTORY__ + "/bin/lib/net461/" // CreateDir outDir @@ -130,13 +139,8 @@ Target "Build" (fun _ -> // WorkingDir = "src/FSharp.Configuration/" }) ) -Target "BuildTests" (fun _ -> - DotNetCli.Build (fun c -> - { c with - Project = "FSharp.Configuration.Tests.sln" - Configuration = "Release" - AdditionalArgs= ["-v n"] - }) +Target.create "BuildTests" (fun _ -> + DotNet.exec id "build" "FSharp.Configuration.Tests.sln -c Release -v n" |> ignore ) // -------------------------------------------------------------------------------------- @@ -144,141 +148,166 @@ Target "BuildTests" (fun _ -> open Fake.Testing -Target "RunTests" (fun _ -> +Target.create "RunTests" (fun _ -> !! "tests/**/bin/Release/net461/*Tests*.exe" - |> Expecto.Expecto (fun p -> { p with FailOnFocusedTests = true }) + |> Seq.iter (fun path -> + Trace.tracefn "Running tests '%s' ..." path + + let args = "--fail-on-focused-tests --summary --sequenced --version" + (if Environment.isWindows + then CreateProcess.fromRawCommandLine path args + else CreateProcess.fromRawCommandLine "mono" (path + " " + args)) + |> CreateProcess.ensureExitCode + |> Proc.run + |> ignore + ) + // |> Testing.Expecto.run (fun p -> + // { p with + // //WorkingDirectory = __SOURCE_DIRECTORY__ + // FailOnFocusedTests = true + // PrintVersion = true + // Parallel = false + // Summary = true + // Debug = false + // }) ) -Target "RunTestsNetCore" (fun _ -> - DotNetCli.RunCommand - (fun r -> { r with WorkingDir = "tests/FSharp.Configuration.Tests/" }) - "run --framework netcoreapp3.1" +Target.create "RunTestsNetCore" (fun _ -> + DotNet.exec + (fun r -> { r with WorkingDirectory = "tests/FSharp.Configuration.Tests/" }) + "run" "--framework netcoreapp3.1" + |> ignore ) // -------------------------------------------------------------------------------------- // Build a NuGet package -Target "NuGet" (fun _ -> - Paket.Pack(fun p -> +Target.create "NuGet" (fun _ -> + Paket.pack(fun p -> { p with + ToolType = ToolType.CreateLocalTool() OutputPath = "bin" Version = release.NugetVersion - ReleaseNotes = toLines release.Notes}) + ReleaseNotes = String.toLines release.Notes}) ) // -------------------------------------------------------------------------------------- // Generate the documentation -let fakePath = "packages" @@ "build" @@ "FAKE" @@ "tools" @@ "FAKE.exe" -let fakeStartInfo script workingDirectory args fsiargs environmentVars = - (fun (info: System.Diagnostics.ProcessStartInfo) -> - info.FileName <- System.IO.Path.GetFullPath fakePath - info.Arguments <- sprintf "%s --fsiargs -d:FAKE %s \"%s\"" args fsiargs script - info.WorkingDirectory <- workingDirectory - let setVar k v = - info.EnvironmentVariables.[k] <- v - for (k, v) in environmentVars do - setVar k v - setVar "MSBuild" msBuildExe - setVar "GIT" Git.CommandHelper.gitPath - setVar "FSI" fsiPath) - -/// Run the given buildscript with FAKE.exe -let executeFAKEWithOutput workingDirectory script fsiargs envArgs = - let exitCode = - ExecProcessWithLambdas - (fakeStartInfo script workingDirectory "" fsiargs envArgs) - TimeSpan.MaxValue false ignore ignore - System.Threading.Thread.Sleep 1000 - exitCode - -// Documentation -let buildDocumentationTarget fsiargs target = - trace (sprintf "Building documentation (%s), this could take some time, please wait..." target) - let exit = executeFAKEWithOutput "docs/tools" "generate.fsx" fsiargs ["target", target] - if exit <> 0 then - failwith "generating reference documentation failed" +//let fakePath = "packages" @@ "build" @@ "FAKE" @@ "tools" @@ "FAKE.exe" +//let fakeStartInfo script workingDirectory args fsiargs environmentVars = +// (fun (info: System.Diagnostics.ProcessStartInfo) -> +// info.FileName <- System.IO.Path.GetFullPath fakePath +// info.Arguments <- sprintf "%s --fsiargs -d:FAKE %s \"%s\"" args fsiargs script +// info.WorkingDirectory <- workingDirectory +// let setVar k v = +// info.EnvironmentVariables.[k] <- v +// for (k, v) in environmentVars do +// setVar k v +// setVar "MSBuild" msBuildExe +// setVar "GIT" Git.CommandHelper.gitPath +// setVar "FSI" fsiPath) + +///// Run the given buildscript with FAKE.exe +//let executeFAKEWithOutput workingDirectory script fsiargs envArgs = +// let exitCode = +// ExecProcessWithLambdas +// (fakeStartInfo script workingDirectory "" fsiargs envArgs) +// TimeSpan.MaxValue false ignore ignore +// System.Threading.Thread.Sleep 1000 +// exitCode + +//// Documentation +//let buildDocumentationTarget fsiargs target = + //Trace.traceImportantfn "Building documentation (%s), this could take some time, please wait..." target + //let exit = executeFAKEWithOutput "docs/tools" "generate.fsx" fsiargs ["target", target] + //if exit <> 0 then + // failwith "generating reference documentation failed" + //() + +Target.create "GenerateReferenceDocs" (fun _ -> () - -Target "GenerateReferenceDocs" (fun _ -> - buildDocumentationTarget "-d:RELEASE -d:REFERENCE" "Default" + //buildDocumentationTarget "-d:RELEASE -d:REFERENCE" "Default" ) -let generateHelp' fail debug = - let args = - if debug then "--define:HELP" - else "--define:RELEASE --define:HELP" - try - buildDocumentationTarget args "Default" - traceImportant "Help generated" - with - | _ when not fail -> - traceImportant "generating help documentation failed" - -let generateHelp fail = - generateHelp' fail false - -Target "GenerateHelp" (fun _ -> - DeleteFile "docs/content/release-notes.md" - CopyFile "docs/content/" "RELEASE_NOTES.md" - Rename "docs/content/release-notes.md" "docs/content/RELEASE_NOTES.md" - - DeleteFile "docs/content/license.md" - CopyFile "docs/content/" "LICENSE.txt" - Rename "docs/content/license.md" "docs/content/LICENSE.txt" - - generateHelp true +//let generateHelp' fail debug = +// let args = +// if debug then "--define:HELP" +// else "--define:RELEASE --define:HELP" +// try +// buildDocumentationTarget args "Default" +// Trace.traceImportant "Help generated" +// with +// | _ when not fail -> +// Trace.traceImportant "generating help documentation failed" + +//let generateHelp fail = + //generateHelp' fail false + +Target.create "GenerateHelp" (fun _ -> + () + //DeleteFile "docs/content/release-notes.md" + //CopyFile "docs/content/" "RELEASE_NOTES.md" + //Rename "docs/content/release-notes.md" "docs/content/RELEASE_NOTES.md" + + //DeleteFile "docs/content/license.md" + //CopyFile "docs/content/" "LICENSE.txt" + //Rename "docs/content/license.md" "docs/content/LICENSE.txt" + + //generateHelp true ) -Target "GenerateDocs" DoNothing +Target.create "GenerateDocs" ignore // -------------------------------------------------------------------------------------- // Release Scripts -Target "ReleaseDocs" (fun _ -> - let tempDocsDir = "temp/gh-pages" - CleanDir tempDocsDir - Repository.cloneSingleBranch "" (gitHome + "/" + gitName + ".git") "gh-pages" tempDocsDir - - fullclean tempDocsDir - CopyRecursive "docs/output" tempDocsDir true |> tracefn "%A" - StageAll tempDocsDir - Git.Commit.Commit tempDocsDir (sprintf "Update generated documentation for version %s" release.NugetVersion) - Branches.push tempDocsDir +Target.create "ReleaseDocs" (fun _ -> + () + //let tempDocsDir = "temp/gh-pages" + //CleanDir tempDocsDir + //Repository.cloneSingleBranch "" (gitHome + "/" + gitName + ".git") "gh-pages" tempDocsDir + + //fullclean tempDocsDir + //CopyRecursive "docs/output" tempDocsDir true |> tracefn "%A" + //StageAll tempDocsDir + //Git.Commit.Commit tempDocsDir (sprintf "Update generated documentation for version %s" release.NugetVersion) + //Branches.push tempDocsDir ) -Target "Release" (fun _ -> - StageAll "" - Git.Commit.Commit "" (sprintf "Bump version to %s" release.NugetVersion) - Branches.push "" - - Branches.tag "" release.NugetVersion - Branches.pushTag "" "origin" release.NugetVersion - - // release on github - createClient (getBuildParamOrDefault "github-user" "") (getBuildParamOrDefault "github-pw" "") - |> createDraft gitOwner gitName release.NugetVersion (release.SemVer.PreRelease <> None) release.Notes - |> releaseDraft - |> Async.RunSynchronously +Target.create "Release" (fun _ -> + () + //StageAll "" + //Git.Commit.Commit "" (sprintf "Bump version to %s" release.NugetVersion) + //Branches.push "" + + //Branches.tag "" release.NugetVersion + //Branches.pushTag "" "origin" release.NugetVersion + + //// release on github + //createClient (getBuildParamOrDefault "github-user" "") (getBuildParamOrDefault "github-pw" "") + //|> createDraft gitOwner gitName release.NugetVersion (release.SemVer.PreRelease <> None) release.Notes + //|> releaseDraft + //|> Async.RunSynchronously ) -Target "BuildPackage" DoNothing +Target.create "BuildPackage" ignore // -------------------------------------------------------------------------------------- // Run all targets by default. Invoke 'build ' to override -Target "All" DoNothing +Target.create "All" ignore "Clean" ==> "AssemblyInfo" ==> "Build" ==> "BuildTests" - ==> "RunTests" ==> "RunTestsNetCore" - =?> ("GenerateReferenceDocs",isLocalBuild && not isMono) - =?> ("GenerateDocs",isLocalBuild && not isMono) + ==> "RunTests" + //=?> ("GenerateReferenceDocs",isLocalBuild && not isMono) + //=?> ("GenerateDocs",isLocalBuild && not isMono) ==> "All" - =?> ("ReleaseDocs",isLocalBuild && not isMono) + //=?> ("ReleaseDocs",isLocalBuild && not isMono) "All" ==> "NuGet" @@ -295,4 +324,4 @@ Target "All" DoNothing "BuildPackage" ==> "Release" -RunTargetOrDefault "All" +Target.runOrDefault "All" diff --git a/build.fsx.lock b/build.fsx.lock new file mode 100644 index 00000000..29258117 --- /dev/null +++ b/build.fsx.lock @@ -0,0 +1,409 @@ +STORAGE: NONE +RESTRICTION: == netstandard2.0 +NUGET + remote: https://www.nuget.org/api/v2 + BlackFox.VsWhere (1.1) + FSharp.Core (>= 4.2.3) + Microsoft.Win32.Registry (>= 4.7) + Fake.Api.GitHub (5.20.2) + FSharp.Core (>= 4.7.2) + Octokit (>= 0.48) + Fake.Core.CommandLineParsing (5.20.2) + FParsec (>= 1.1.1) + FSharp.Core (>= 4.7.2) + Fake.Core.Context (5.20.2) + FSharp.Core (>= 4.7.2) + Fake.Core.Environment (5.20.2) + FSharp.Core (>= 4.7.2) + Fake.Core.FakeVar (5.20.2) + Fake.Core.Context (>= 5.20.2) + FSharp.Core (>= 4.7.2) + Fake.Core.Process (5.20.2) + Fake.Core.Environment (>= 5.20.2) + Fake.Core.FakeVar (>= 5.20.2) + Fake.Core.String (>= 5.20.2) + Fake.Core.Trace (>= 5.20.2) + Fake.IO.FileSystem (>= 5.20.2) + FSharp.Core (>= 4.7.2) + System.Collections.Immutable (>= 1.7.1) + Fake.Core.ReleaseNotes (5.20.2) + Fake.Core.SemVer (>= 5.20.2) + Fake.Core.String (>= 5.20.2) + FSharp.Core (>= 4.7.2) + Fake.Core.SemVer (5.20.2) + FSharp.Core (>= 4.7.2) + Fake.Core.String (5.20.2) + FSharp.Core (>= 4.7.2) + Fake.Core.Target (5.20.2) + Fake.Core.CommandLineParsing (>= 5.20.2) + Fake.Core.Context (>= 5.20.2) + Fake.Core.Environment (>= 5.20.2) + Fake.Core.FakeVar (>= 5.20.2) + Fake.Core.Process (>= 5.20.2) + Fake.Core.String (>= 5.20.2) + Fake.Core.Trace (>= 5.20.2) + FSharp.Control.Reactive (>= 4.4) + FSharp.Core (>= 4.7.2) + Fake.Core.Tasks (5.20.2) + Fake.Core.Trace (>= 5.20.2) + FSharp.Core (>= 4.7.2) + Fake.Core.Trace (5.20.2) + Fake.Core.Environment (>= 5.20.2) + Fake.Core.FakeVar (>= 5.20.2) + FSharp.Core (>= 4.7.2) + Fake.Core.Xml (5.20.2) + Fake.Core.String (>= 5.20.2) + FSharp.Core (>= 4.7.2) + Fake.DotNet.AssemblyInfoFile (5.20.2) + Fake.Core.Environment (>= 5.20.2) + Fake.Core.String (>= 5.20.2) + Fake.Core.Trace (>= 5.20.2) + Fake.IO.FileSystem (>= 5.20.2) + FSharp.Core (>= 4.7.2) + Fake.DotNet.Cli (5.20.2) + Fake.Core.Environment (>= 5.20.2) + Fake.Core.Process (>= 5.20.2) + Fake.Core.String (>= 5.20.2) + Fake.Core.Trace (>= 5.20.2) + Fake.DotNet.MSBuild (>= 5.20.2) + Fake.DotNet.NuGet (>= 5.20.2) + Fake.IO.FileSystem (>= 5.20.2) + FSharp.Core (>= 4.7.2) + Mono.Posix.NETStandard (>= 1.0) + Newtonsoft.Json (>= 12.0.3) + Fake.DotNet.FSFormatting (5.20.2) + Fake.Core.Process (>= 5.20.2) + Fake.DotNet.Cli (>= 5.20.2) + Fake.IO.FileSystem (>= 5.20.2) + FSharp.Core (>= 4.7.2) + Fake.DotNet.MSBuild (5.20.2) + BlackFox.VsWhere (>= 1.1) + Fake.Core.Environment (>= 5.20.2) + Fake.Core.Process (>= 5.20.2) + Fake.Core.String (>= 5.20.2) + Fake.Core.Trace (>= 5.20.2) + Fake.IO.FileSystem (>= 5.20.2) + FSharp.Core (>= 4.7.2) + MSBuild.StructuredLogger (>= 2.1.133) + Fake.DotNet.NuGet (5.20.2) + Fake.Core.Environment (>= 5.20.2) + Fake.Core.Process (>= 5.20.2) + Fake.Core.SemVer (>= 5.20.2) + Fake.Core.String (>= 5.20.2) + Fake.Core.Tasks (>= 5.20.2) + Fake.Core.Trace (>= 5.20.2) + Fake.Core.Xml (>= 5.20.2) + Fake.IO.FileSystem (>= 5.20.2) + Fake.Net.Http (>= 5.20.2) + FSharp.Core (>= 4.7.2) + Newtonsoft.Json (>= 12.0.3) + NuGet.Protocol (>= 5.6) + Fake.DotNet.Paket (5.20.2) + Fake.Core.Process (>= 5.20.2) + Fake.Core.String (>= 5.20.2) + Fake.Core.Trace (>= 5.20.2) + Fake.DotNet.Cli (>= 5.20.2) + Fake.IO.FileSystem (>= 5.20.2) + FSharp.Core (>= 4.7.2) + Fake.DotNet.Testing.Expecto (5.20.2) + Fake.Core.Process (>= 5.20.2) + Fake.Core.String (>= 5.20.2) + Fake.Core.Trace (>= 5.20.2) + Fake.IO.FileSystem (>= 5.20.2) + Fake.Testing.Common (>= 5.20.2) + FSharp.Core (>= 4.7.2) + Fake.IO.FileSystem (5.20.2) + Fake.Core.String (>= 5.20.2) + FSharp.Core (>= 4.7.2) + Fake.Net.Http (5.20.2) + Fake.Core.Trace (>= 5.20.2) + FSharp.Core (>= 4.7.2) + Fake.Testing.Common (5.20.2) + Fake.Core.Trace (>= 5.20.2) + FSharp.Core (>= 4.7.2) + Fake.Tools.Git (5.20.2) + Fake.Core.Environment (>= 5.20.2) + Fake.Core.Process (>= 5.20.2) + Fake.Core.SemVer (>= 5.20.2) + Fake.Core.String (>= 5.20.2) + Fake.Core.Trace (>= 5.20.2) + Fake.IO.FileSystem (>= 5.20.2) + FSharp.Core (>= 4.7.2) + FParsec (1.1.1) + FSharp.Core (>= 4.3.4) + FSharp.Control.Reactive (4.4.2) + FSharp.Core (>= 4.7.2) + System.Reactive (>= 4.4.1) + FSharp.Core (4.7.2) + Microsoft.Build (16.6) + Microsoft.Build.Framework (16.6) + System.Security.Permissions (>= 4.7) + Microsoft.Build.Tasks.Core (16.6) + Microsoft.Build.Framework (>= 16.6) + Microsoft.Build.Utilities.Core (>= 16.6) + Microsoft.Win32.Registry (>= 4.3) + System.CodeDom (>= 4.4) + System.Collections.Immutable (>= 1.5) + System.Reflection.Metadata (>= 1.6) + System.Reflection.TypeExtensions (>= 4.1) + System.Resources.Extensions (>= 4.6) + System.Security.Permissions (>= 4.7) + System.Threading.Tasks.Dataflow (>= 4.9) + Microsoft.Build.Utilities.Core (16.6) + Microsoft.Build.Framework (>= 16.6) + Microsoft.Win32.Registry (>= 4.3) + System.Collections.Immutable (>= 1.5) + System.Security.Permissions (>= 4.7) + System.Text.Encoding.CodePages (>= 4.0.1) + Microsoft.NETCore.Platforms (3.1.1) + Microsoft.NETCore.Targets (3.1) + Microsoft.Win32.Primitives (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) + Microsoft.Win32.Registry (4.7) + System.Buffers (>= 4.5) + System.Memory (>= 4.5.3) + System.Security.AccessControl (>= 4.7) + System.Security.Principal.Windows (>= 4.7) + Mono.Posix.NETStandard (1.0) + MSBuild.StructuredLogger (2.1.133) + Microsoft.Build (>= 16.4) + Microsoft.Build.Framework (>= 16.4) + Microsoft.Build.Tasks.Core (>= 16.4) + Microsoft.Build.Utilities.Core (>= 16.4) + System.IO.Compression (>= 4.3) + Newtonsoft.Json (12.0.3) + NuGet.Common (5.6) + NuGet.Frameworks (>= 5.6) + System.Diagnostics.Process (>= 4.3) + System.Threading.Thread (>= 4.3) + NuGet.Configuration (5.6) + NuGet.Common (>= 5.6) + System.Security.Cryptography.ProtectedData (>= 4.3) + NuGet.Frameworks (5.6) + NuGet.Packaging (5.6) + Newtonsoft.Json (>= 9.0.1) + NuGet.Configuration (>= 5.6) + NuGet.Versioning (>= 5.6) + System.Dynamic.Runtime (>= 4.3) + NuGet.Protocol (5.6) + NuGet.Packaging (>= 5.6) + System.Dynamic.Runtime (>= 4.3) + NuGet.Versioning (5.6) + Octokit (0.48) + runtime.native.System (4.3.1) + Microsoft.NETCore.Platforms (>= 1.1.1) + Microsoft.NETCore.Targets (>= 1.1.3) + runtime.native.System.IO.Compression (4.3.2) + Microsoft.NETCore.Platforms (>= 1.1.1) + Microsoft.NETCore.Targets (>= 1.1.3) + System.Buffers (4.5.1) + System.CodeDom (4.7) + System.Collections (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) + System.Collections.Immutable (1.7.1) + System.Memory (>= 4.5.4) + System.Diagnostics.Debug (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) + System.Diagnostics.Process (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.Win32.Primitives (>= 4.3) + Microsoft.Win32.Registry (>= 4.3) + runtime.native.System (>= 4.3) + System.Collections (>= 4.3) + System.Diagnostics.Debug (>= 4.3) + System.Globalization (>= 4.3) + System.IO (>= 4.3) + System.IO.FileSystem (>= 4.3) + System.IO.FileSystem.Primitives (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Runtime.Handles (>= 4.3) + System.Runtime.InteropServices (>= 4.3) + System.Text.Encoding (>= 4.3) + System.Text.Encoding.Extensions (>= 4.3) + System.Threading (>= 4.3) + System.Threading.Tasks (>= 4.3) + System.Threading.Thread (>= 4.3) + System.Threading.ThreadPool (>= 4.3) + System.Dynamic.Runtime (4.3) + System.Collections (>= 4.3) + System.Diagnostics.Debug (>= 4.3) + System.Linq (>= 4.3) + System.Linq.Expressions (>= 4.3) + System.ObjectModel (>= 4.3) + System.Reflection (>= 4.3) + System.Reflection.Emit (>= 4.3) + System.Reflection.Emit.ILGeneration (>= 4.3) + System.Reflection.Primitives (>= 4.3) + System.Reflection.TypeExtensions (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Threading (>= 4.3) + System.Globalization (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) + System.IO (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) + System.Text.Encoding (>= 4.3) + System.Threading.Tasks (>= 4.3) + System.IO.Compression (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + runtime.native.System (>= 4.3) + runtime.native.System.IO.Compression (>= 4.3) + System.Buffers (>= 4.3) + System.Collections (>= 4.3) + System.Diagnostics.Debug (>= 4.3) + System.IO (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Runtime.Handles (>= 4.3) + System.Runtime.InteropServices (>= 4.3) + System.Text.Encoding (>= 4.3) + System.Threading (>= 4.3) + System.Threading.Tasks (>= 4.3) + System.IO.FileSystem (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.IO (>= 4.3) + System.IO.FileSystem.Primitives (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Handles (>= 4.3) + System.Text.Encoding (>= 4.3) + System.Threading.Tasks (>= 4.3) + System.IO.FileSystem.Primitives (4.3) + System.Runtime (>= 4.3) + System.Linq (4.3) + System.Collections (>= 4.3) + System.Diagnostics.Debug (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Linq.Expressions (4.3) + System.Collections (>= 4.3) + System.Diagnostics.Debug (>= 4.3) + System.Globalization (>= 4.3) + System.IO (>= 4.3) + System.Linq (>= 4.3) + System.ObjectModel (>= 4.3) + System.Reflection (>= 4.3) + System.Reflection.Emit (>= 4.3) + System.Reflection.Emit.ILGeneration (>= 4.3) + System.Reflection.Emit.Lightweight (>= 4.3) + System.Reflection.Extensions (>= 4.3) + System.Reflection.Primitives (>= 4.3) + System.Reflection.TypeExtensions (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Extensions (>= 4.3) + System.Threading (>= 4.3) + System.Memory (4.5.4) + System.Buffers (>= 4.5.1) + System.Numerics.Vectors (>= 4.4) + System.Runtime.CompilerServices.Unsafe (>= 4.5.3) + System.Numerics.Vectors (4.5) + System.ObjectModel (4.3) + System.Collections (>= 4.3) + System.Diagnostics.Debug (>= 4.3) + System.Resources.ResourceManager (>= 4.3) + System.Runtime (>= 4.3) + System.Threading (>= 4.3) + System.Reactive (4.4.1) + System.Runtime.InteropServices.WindowsRuntime (>= 4.3) + System.Threading.Tasks.Extensions (>= 4.5.4) + System.Reflection (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.IO (>= 4.3) + System.Reflection.Primitives (>= 4.3) + System.Runtime (>= 4.3) + System.Reflection.Emit (4.7) + System.Reflection.Emit.ILGeneration (>= 4.7) + System.Reflection.Emit.ILGeneration (4.7) + System.Reflection.Emit.Lightweight (4.7) + System.Reflection.Emit.ILGeneration (>= 4.7) + System.Reflection.Extensions (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Reflection (>= 4.3) + System.Runtime (>= 4.3) + System.Reflection.Metadata (1.8.1) + System.Collections.Immutable (>= 1.7.1) + System.Reflection.Primitives (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) + System.Reflection.TypeExtensions (4.7) + System.Resources.Extensions (4.7.1) + System.Memory (>= 4.5.4) + System.Resources.ResourceManager (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Globalization (>= 4.3) + System.Reflection (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime (4.3.1) + Microsoft.NETCore.Platforms (>= 1.1.1) + Microsoft.NETCore.Targets (>= 1.1.3) + System.Runtime.CompilerServices.Unsafe (4.7.1) + System.Runtime.Extensions (4.3.1) + Microsoft.NETCore.Platforms (>= 1.1.1) + Microsoft.NETCore.Targets (>= 1.1.3) + System.Runtime (>= 4.3.1) + System.Runtime.Handles (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) + System.Runtime.InteropServices (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Reflection (>= 4.3) + System.Reflection.Primitives (>= 4.3) + System.Runtime (>= 4.3) + System.Runtime.Handles (>= 4.3) + System.Runtime.InteropServices.WindowsRuntime (4.3) + System.Runtime (>= 4.3) + System.Security.AccessControl (4.7) + System.Security.Principal.Windows (>= 4.7) + System.Security.Cryptography.ProtectedData (4.7) + System.Memory (>= 4.5.3) + System.Security.Permissions (4.7) + System.Security.AccessControl (>= 4.7) + System.Security.Principal.Windows (4.7) + System.Text.Encoding (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) + System.Text.Encoding.CodePages (4.7.1) + System.Runtime.CompilerServices.Unsafe (>= 4.7.1) + System.Text.Encoding.Extensions (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) + System.Text.Encoding (>= 4.3) + System.Threading (4.3) + System.Runtime (>= 4.3) + System.Threading.Tasks (>= 4.3) + System.Threading.Tasks (4.3) + Microsoft.NETCore.Platforms (>= 1.1) + Microsoft.NETCore.Targets (>= 1.1) + System.Runtime (>= 4.3) + System.Threading.Tasks.Dataflow (4.11.1) + System.Threading.Tasks.Extensions (4.5.4) + System.Runtime.CompilerServices.Unsafe (>= 4.5.3) + System.Threading.Thread (4.3) + System.Runtime (>= 4.3) + System.Threading.ThreadPool (4.3) + System.Runtime (>= 4.3) + System.Runtime.Handles (>= 4.3) diff --git a/build.sh b/build.sh index 16ab7caf..2fc81634 100755 --- a/build.sh +++ b/build.sh @@ -5,5 +5,5 @@ then else dotnet tool restore dotnet paket restore - mono packages/build/FAKE/tools/FAKE.exe build.fsx $@ -fi + dotnet fake run build.fsx $@ +fi \ No newline at end of file diff --git a/paket.dependencies b/paket.dependencies index 37226e49..3a13c0b4 100644 --- a/paket.dependencies +++ b/paket.dependencies @@ -12,17 +12,6 @@ github fsprojects/FSharp.TypeProviders.SDK src/ProvidedTypes.fs github fsprojects/FSharp.TypeProviders.SDK src/ProvidedTypes.fsi github fsprojects/FSharp.TypeProviders.SDK src/ProvidedTypesTesting.fs -group Build - framework: net461 - source https://nuget.org/api/v2 - - nuget FAKE ~> 4.0 - nuget FSharp.Formatting - nuget Octokit - nuget SourceLink.Fake - - github fsharp/FAKE modules/Octokit/Octokit.fsx - group Test framework: net461, netcoreapp3.1 source https://nuget.org/api/v2 diff --git a/paket.lock b/paket.lock index d0f21e05..9127dfc5 100644 --- a/paket.lock +++ b/paket.lock @@ -41,18 +41,6 @@ GITHUB src/ProvidedTypes.fs (b45779c1571b54a2bc6bafa12690a8d9763150d1) src/ProvidedTypes.fsi (b45779c1571b54a2bc6bafa12690a8d9763150d1) src/ProvidedTypesTesting.fs (b45779c1571b54a2bc6bafa12690a8d9763150d1) -GROUP Build -RESTRICTION: == net461 -NUGET - remote: https://www.nuget.org/api/v2 - FAKE (4.64.18) - FSharp.Formatting (5.0.5) - Octokit (0.48) - SourceLink.Fake (1.1) -GITHUB - remote: fsharp/FAKE - modules/Octokit/Octokit.fsx (74421063dd3915e8e1e407926b38b8b25df50e36) - Octokit (>= 0.20) GROUP Test REDIRECTS: FORCE RESTRICTION: || (== net461) (== netcoreapp3.1) From 685f9cb920cfb02a5a7696e6a93af47ca5db3ab4 Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Tue, 15 Dec 2020 23:43:58 +0100 Subject: [PATCH 35/41] feat: dependencies update and fixes --- .config/dotnet-tools.json | 4 +- .github/workflows/dotnetcore.yml | 2 +- .gitignore | 1 + RELEASE_NOTES.md | 3 +- build.fsx | 3 +- build.fsx.lock | 446 ++++++------------ global.json | 2 +- paket.dependencies | 2 +- paket.lock | 18 +- paket.template | 43 -- .../YamlConfigProvider.fs | 6 +- .../FSharp.Configuration.Runtime.fsproj | 1 + .../TypeProviders.Helper.fs | 9 +- .../paket.template | 33 +- .../FSharp.Configuration.fsproj | 19 +- 15 files changed, 207 insertions(+), 385 deletions(-) delete mode 100644 paket.template diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index d7d42231..dc4e8a9a 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,13 +3,13 @@ "isRoot": true, "tools": { "paket": { - "version": "5.247.4", + "version": "5.257.0", "commands": [ "paket" ] }, "fake-cli": { - "version": "5.20.2", + "version": "5.20.3", "commands": [ "fake" ] diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml index 26b73bbf..d664742a 100644 --- a/.github/workflows/dotnetcore.yml +++ b/.github/workflows/dotnetcore.yml @@ -15,7 +15,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macOS-latest] - dotnet: [3.1.301] + dotnet: [3.1.404] runs-on: ${{ matrix.os }} steps: diff --git a/.gitignore b/.gitignore index 47d164d7..80bc9e69 100644 --- a/.gitignore +++ b/.gitignore @@ -176,6 +176,7 @@ release.cmd nuget/ .paket/ .fake/ +.ionide/ # Nuget outputs nuget/*.nupkg diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index d8cf0a24..c0ab845c 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,5 +1,6 @@ -#### 2.0.0-beta1 - 17.07.2019 +#### 2.0.0-alpha3 - 15.12.2020 * Targets net461 instead of net45 +* Dependencies update #### 2.0.0-alpha2 - 16.06.2018 * Migration to project system diff --git a/build.fsx b/build.fsx index 1c731c2e..6593deef 100644 --- a/build.fsx +++ b/build.fsx @@ -1,6 +1,7 @@ #r @"paket: source https://nuget.org/api/v2 framework netstandard2.0 +nuget FSharp.Core 4.7.2 nuget Fake.Core.Target nuget Fake.Core.Process nuget Fake.Core.ReleaseNotes @@ -303,7 +304,7 @@ Target.create "All" ignore ==> "Build" ==> "BuildTests" ==> "RunTestsNetCore" - ==> "RunTests" + //==> "RunTests" //=?> ("GenerateReferenceDocs",isLocalBuild && not isMono) //=?> ("GenerateDocs",isLocalBuild && not isMono) ==> "All" diff --git a/build.fsx.lock b/build.fsx.lock index 29258117..606cd619 100644 --- a/build.fsx.lock +++ b/build.fsx.lock @@ -5,321 +5,208 @@ NUGET BlackFox.VsWhere (1.1) FSharp.Core (>= 4.2.3) Microsoft.Win32.Registry (>= 4.7) - Fake.Api.GitHub (5.20.2) + Fake.Api.GitHub (5.20.3) FSharp.Core (>= 4.7.2) Octokit (>= 0.48) - Fake.Core.CommandLineParsing (5.20.2) + Fake.Core.CommandLineParsing (5.20.3) FParsec (>= 1.1.1) FSharp.Core (>= 4.7.2) - Fake.Core.Context (5.20.2) + Fake.Core.Context (5.20.3) FSharp.Core (>= 4.7.2) - Fake.Core.Environment (5.20.2) + Fake.Core.Environment (5.20.3) FSharp.Core (>= 4.7.2) - Fake.Core.FakeVar (5.20.2) - Fake.Core.Context (>= 5.20.2) + Fake.Core.FakeVar (5.20.3) + Fake.Core.Context (>= 5.20.3) FSharp.Core (>= 4.7.2) - Fake.Core.Process (5.20.2) - Fake.Core.Environment (>= 5.20.2) - Fake.Core.FakeVar (>= 5.20.2) - Fake.Core.String (>= 5.20.2) - Fake.Core.Trace (>= 5.20.2) - Fake.IO.FileSystem (>= 5.20.2) + Fake.Core.Process (5.20.3) + Fake.Core.Environment (>= 5.20.3) + Fake.Core.FakeVar (>= 5.20.3) + Fake.Core.String (>= 5.20.3) + Fake.Core.Trace (>= 5.20.3) + Fake.IO.FileSystem (>= 5.20.3) FSharp.Core (>= 4.7.2) System.Collections.Immutable (>= 1.7.1) - Fake.Core.ReleaseNotes (5.20.2) - Fake.Core.SemVer (>= 5.20.2) - Fake.Core.String (>= 5.20.2) + Fake.Core.ReleaseNotes (5.20.3) + Fake.Core.SemVer (>= 5.20.3) + Fake.Core.String (>= 5.20.3) FSharp.Core (>= 4.7.2) - Fake.Core.SemVer (5.20.2) + Fake.Core.SemVer (5.20.3) FSharp.Core (>= 4.7.2) - Fake.Core.String (5.20.2) + Fake.Core.String (5.20.3) FSharp.Core (>= 4.7.2) - Fake.Core.Target (5.20.2) - Fake.Core.CommandLineParsing (>= 5.20.2) - Fake.Core.Context (>= 5.20.2) - Fake.Core.Environment (>= 5.20.2) - Fake.Core.FakeVar (>= 5.20.2) - Fake.Core.Process (>= 5.20.2) - Fake.Core.String (>= 5.20.2) - Fake.Core.Trace (>= 5.20.2) - FSharp.Control.Reactive (>= 4.4) + Fake.Core.Target (5.20.3) + Fake.Core.CommandLineParsing (>= 5.20.3) + Fake.Core.Context (>= 5.20.3) + Fake.Core.Environment (>= 5.20.3) + Fake.Core.FakeVar (>= 5.20.3) + Fake.Core.Process (>= 5.20.3) + Fake.Core.String (>= 5.20.3) + Fake.Core.Trace (>= 5.20.3) + FSharp.Control.Reactive (>= 4.4.2) FSharp.Core (>= 4.7.2) - Fake.Core.Tasks (5.20.2) - Fake.Core.Trace (>= 5.20.2) + Fake.Core.Tasks (5.20.3) + Fake.Core.Trace (>= 5.20.3) FSharp.Core (>= 4.7.2) - Fake.Core.Trace (5.20.2) - Fake.Core.Environment (>= 5.20.2) - Fake.Core.FakeVar (>= 5.20.2) + Fake.Core.Trace (5.20.3) + Fake.Core.Environment (>= 5.20.3) + Fake.Core.FakeVar (>= 5.20.3) FSharp.Core (>= 4.7.2) - Fake.Core.Xml (5.20.2) - Fake.Core.String (>= 5.20.2) + Fake.Core.Xml (5.20.3) + Fake.Core.String (>= 5.20.3) FSharp.Core (>= 4.7.2) - Fake.DotNet.AssemblyInfoFile (5.20.2) - Fake.Core.Environment (>= 5.20.2) - Fake.Core.String (>= 5.20.2) - Fake.Core.Trace (>= 5.20.2) - Fake.IO.FileSystem (>= 5.20.2) + Fake.DotNet.AssemblyInfoFile (5.20.3) + Fake.Core.Environment (>= 5.20.3) + Fake.Core.String (>= 5.20.3) + Fake.Core.Trace (>= 5.20.3) + Fake.IO.FileSystem (>= 5.20.3) FSharp.Core (>= 4.7.2) - Fake.DotNet.Cli (5.20.2) - Fake.Core.Environment (>= 5.20.2) - Fake.Core.Process (>= 5.20.2) - Fake.Core.String (>= 5.20.2) - Fake.Core.Trace (>= 5.20.2) - Fake.DotNet.MSBuild (>= 5.20.2) - Fake.DotNet.NuGet (>= 5.20.2) - Fake.IO.FileSystem (>= 5.20.2) + Fake.DotNet.Cli (5.20.3) + Fake.Core.Environment (>= 5.20.3) + Fake.Core.Process (>= 5.20.3) + Fake.Core.String (>= 5.20.3) + Fake.Core.Trace (>= 5.20.3) + Fake.DotNet.MSBuild (>= 5.20.3) + Fake.DotNet.NuGet (>= 5.20.3) + Fake.IO.FileSystem (>= 5.20.3) FSharp.Core (>= 4.7.2) Mono.Posix.NETStandard (>= 1.0) Newtonsoft.Json (>= 12.0.3) - Fake.DotNet.FSFormatting (5.20.2) - Fake.Core.Process (>= 5.20.2) - Fake.DotNet.Cli (>= 5.20.2) - Fake.IO.FileSystem (>= 5.20.2) + Fake.DotNet.FSFormatting (5.20.3) + Fake.Core.Process (>= 5.20.3) + Fake.DotNet.Cli (>= 5.20.3) + Fake.IO.FileSystem (>= 5.20.3) FSharp.Core (>= 4.7.2) - Fake.DotNet.MSBuild (5.20.2) + Fake.DotNet.MSBuild (5.20.3) BlackFox.VsWhere (>= 1.1) - Fake.Core.Environment (>= 5.20.2) - Fake.Core.Process (>= 5.20.2) - Fake.Core.String (>= 5.20.2) - Fake.Core.Trace (>= 5.20.2) - Fake.IO.FileSystem (>= 5.20.2) + Fake.Core.Environment (>= 5.20.3) + Fake.Core.Process (>= 5.20.3) + Fake.Core.String (>= 5.20.3) + Fake.Core.Trace (>= 5.20.3) + Fake.IO.FileSystem (>= 5.20.3) FSharp.Core (>= 4.7.2) - MSBuild.StructuredLogger (>= 2.1.133) - Fake.DotNet.NuGet (5.20.2) - Fake.Core.Environment (>= 5.20.2) - Fake.Core.Process (>= 5.20.2) - Fake.Core.SemVer (>= 5.20.2) - Fake.Core.String (>= 5.20.2) - Fake.Core.Tasks (>= 5.20.2) - Fake.Core.Trace (>= 5.20.2) - Fake.Core.Xml (>= 5.20.2) - Fake.IO.FileSystem (>= 5.20.2) - Fake.Net.Http (>= 5.20.2) + MSBuild.StructuredLogger (>= 2.1.176) + Fake.DotNet.NuGet (5.20.3) + Fake.Core.Environment (>= 5.20.3) + Fake.Core.Process (>= 5.20.3) + Fake.Core.SemVer (>= 5.20.3) + Fake.Core.String (>= 5.20.3) + Fake.Core.Tasks (>= 5.20.3) + Fake.Core.Trace (>= 5.20.3) + Fake.Core.Xml (>= 5.20.3) + Fake.IO.FileSystem (>= 5.20.3) + Fake.Net.Http (>= 5.20.3) FSharp.Core (>= 4.7.2) Newtonsoft.Json (>= 12.0.3) NuGet.Protocol (>= 5.6) - Fake.DotNet.Paket (5.20.2) - Fake.Core.Process (>= 5.20.2) - Fake.Core.String (>= 5.20.2) - Fake.Core.Trace (>= 5.20.2) - Fake.DotNet.Cli (>= 5.20.2) - Fake.IO.FileSystem (>= 5.20.2) + Fake.DotNet.Paket (5.20.3) + Fake.Core.Process (>= 5.20.3) + Fake.Core.String (>= 5.20.3) + Fake.Core.Trace (>= 5.20.3) + Fake.DotNet.Cli (>= 5.20.3) + Fake.IO.FileSystem (>= 5.20.3) FSharp.Core (>= 4.7.2) - Fake.DotNet.Testing.Expecto (5.20.2) - Fake.Core.Process (>= 5.20.2) - Fake.Core.String (>= 5.20.2) - Fake.Core.Trace (>= 5.20.2) - Fake.IO.FileSystem (>= 5.20.2) - Fake.Testing.Common (>= 5.20.2) + Fake.DotNet.Testing.Expecto (5.20.3) + Fake.Core.Process (>= 5.20.3) + Fake.Core.String (>= 5.20.3) + Fake.Core.Trace (>= 5.20.3) + Fake.IO.FileSystem (>= 5.20.3) + Fake.Testing.Common (>= 5.20.3) FSharp.Core (>= 4.7.2) - Fake.IO.FileSystem (5.20.2) - Fake.Core.String (>= 5.20.2) + Fake.IO.FileSystem (5.20.3) + Fake.Core.String (>= 5.20.3) FSharp.Core (>= 4.7.2) - Fake.Net.Http (5.20.2) - Fake.Core.Trace (>= 5.20.2) + Fake.Net.Http (5.20.3) + Fake.Core.Trace (>= 5.20.3) FSharp.Core (>= 4.7.2) - Fake.Testing.Common (5.20.2) - Fake.Core.Trace (>= 5.20.2) + Fake.Testing.Common (5.20.3) + Fake.Core.Trace (>= 5.20.3) FSharp.Core (>= 4.7.2) - Fake.Tools.Git (5.20.2) - Fake.Core.Environment (>= 5.20.2) - Fake.Core.Process (>= 5.20.2) - Fake.Core.SemVer (>= 5.20.2) - Fake.Core.String (>= 5.20.2) - Fake.Core.Trace (>= 5.20.2) - Fake.IO.FileSystem (>= 5.20.2) + Fake.Tools.Git (5.20.3) + Fake.Core.Environment (>= 5.20.3) + Fake.Core.Process (>= 5.20.3) + Fake.Core.SemVer (>= 5.20.3) + Fake.Core.String (>= 5.20.3) + Fake.Core.Trace (>= 5.20.3) + Fake.IO.FileSystem (>= 5.20.3) FSharp.Core (>= 4.7.2) FParsec (1.1.1) FSharp.Core (>= 4.3.4) - FSharp.Control.Reactive (4.4.2) + FSharp.Control.Reactive (4.5) FSharp.Core (>= 4.7.2) System.Reactive (>= 4.4.1) FSharp.Core (4.7.2) - Microsoft.Build (16.6) - Microsoft.Build.Framework (16.6) + Microsoft.Build (16.8) + Microsoft.Build.Framework (16.8) System.Security.Permissions (>= 4.7) - Microsoft.Build.Tasks.Core (16.6) - Microsoft.Build.Framework (>= 16.6) - Microsoft.Build.Utilities.Core (>= 16.6) + Microsoft.Build.Tasks.Core (16.8) + Microsoft.Build.Framework (>= 16.8) + Microsoft.Build.Utilities.Core (>= 16.8) Microsoft.Win32.Registry (>= 4.3) System.CodeDom (>= 4.4) System.Collections.Immutable (>= 1.5) System.Reflection.Metadata (>= 1.6) System.Reflection.TypeExtensions (>= 4.1) System.Resources.Extensions (>= 4.6) + System.Runtime.InteropServices (>= 4.3) + System.Security.Cryptography.Pkcs (>= 4.7) + System.Security.Cryptography.Xml (>= 4.7) System.Security.Permissions (>= 4.7) System.Threading.Tasks.Dataflow (>= 4.9) - Microsoft.Build.Utilities.Core (16.6) - Microsoft.Build.Framework (>= 16.6) + Microsoft.Build.Utilities.Core (16.8) + Microsoft.Build.Framework (>= 16.8) Microsoft.Win32.Registry (>= 4.3) System.Collections.Immutable (>= 1.5) System.Security.Permissions (>= 4.7) System.Text.Encoding.CodePages (>= 4.0.1) - Microsoft.NETCore.Platforms (3.1.1) - Microsoft.NETCore.Targets (3.1) - Microsoft.Win32.Primitives (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Runtime (>= 4.3) - Microsoft.Win32.Registry (4.7) - System.Buffers (>= 4.5) - System.Memory (>= 4.5.3) - System.Security.AccessControl (>= 4.7) - System.Security.Principal.Windows (>= 4.7) + Microsoft.NETCore.Platforms (5.0) + Microsoft.NETCore.Targets (5.0) + Microsoft.Win32.Registry (5.0) + System.Buffers (>= 4.5.1) + System.Memory (>= 4.5.4) + System.Security.AccessControl (>= 5.0) + System.Security.Principal.Windows (>= 5.0) Mono.Posix.NETStandard (1.0) - MSBuild.StructuredLogger (2.1.133) + MSBuild.StructuredLogger (2.1.215) Microsoft.Build (>= 16.4) Microsoft.Build.Framework (>= 16.4) Microsoft.Build.Tasks.Core (>= 16.4) Microsoft.Build.Utilities.Core (>= 16.4) - System.IO.Compression (>= 4.3) Newtonsoft.Json (12.0.3) - NuGet.Common (5.6) - NuGet.Frameworks (>= 5.6) - System.Diagnostics.Process (>= 4.3) - System.Threading.Thread (>= 4.3) - NuGet.Configuration (5.6) - NuGet.Common (>= 5.6) - System.Security.Cryptography.ProtectedData (>= 4.3) - NuGet.Frameworks (5.6) - NuGet.Packaging (5.6) + NuGet.Common (5.8) + NuGet.Frameworks (>= 5.8) + NuGet.Configuration (5.8) + NuGet.Common (>= 5.8) + System.Security.Cryptography.ProtectedData (>= 4.4) + NuGet.Frameworks (5.8) + NuGet.Packaging (5.8) Newtonsoft.Json (>= 9.0.1) - NuGet.Configuration (>= 5.6) - NuGet.Versioning (>= 5.6) - System.Dynamic.Runtime (>= 4.3) - NuGet.Protocol (5.6) - NuGet.Packaging (>= 5.6) - System.Dynamic.Runtime (>= 4.3) - NuGet.Versioning (5.6) + NuGet.Configuration (>= 5.8) + NuGet.Versioning (>= 5.8) + System.Security.Cryptography.Cng (>= 5.0.0-preview.3.20214.6) + System.Security.Cryptography.Pkcs (>= 5.0.0-preview.3.20214.6) + NuGet.Protocol (5.8) + NuGet.Packaging (>= 5.8) + NuGet.Versioning (5.8) Octokit (0.48) - runtime.native.System (4.3.1) - Microsoft.NETCore.Platforms (>= 1.1.1) - Microsoft.NETCore.Targets (>= 1.1.3) - runtime.native.System.IO.Compression (4.3.2) - Microsoft.NETCore.Platforms (>= 1.1.1) - Microsoft.NETCore.Targets (>= 1.1.3) System.Buffers (4.5.1) - System.CodeDom (4.7) - System.Collections (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Runtime (>= 4.3) - System.Collections.Immutable (1.7.1) + System.CodeDom (5.0) + System.Collections.Immutable (5.0) + System.Memory (>= 4.5.4) + System.Formats.Asn1 (5.0) + System.Buffers (>= 4.5.1) System.Memory (>= 4.5.4) - System.Diagnostics.Debug (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Runtime (>= 4.3) - System.Diagnostics.Process (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.Win32.Primitives (>= 4.3) - Microsoft.Win32.Registry (>= 4.3) - runtime.native.System (>= 4.3) - System.Collections (>= 4.3) - System.Diagnostics.Debug (>= 4.3) - System.Globalization (>= 4.3) - System.IO (>= 4.3) - System.IO.FileSystem (>= 4.3) - System.IO.FileSystem.Primitives (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Runtime.Handles (>= 4.3) - System.Runtime.InteropServices (>= 4.3) - System.Text.Encoding (>= 4.3) - System.Text.Encoding.Extensions (>= 4.3) - System.Threading (>= 4.3) - System.Threading.Tasks (>= 4.3) - System.Threading.Thread (>= 4.3) - System.Threading.ThreadPool (>= 4.3) - System.Dynamic.Runtime (4.3) - System.Collections (>= 4.3) - System.Diagnostics.Debug (>= 4.3) - System.Linq (>= 4.3) - System.Linq.Expressions (>= 4.3) - System.ObjectModel (>= 4.3) - System.Reflection (>= 4.3) - System.Reflection.Emit (>= 4.3) - System.Reflection.Emit.ILGeneration (>= 4.3) - System.Reflection.Primitives (>= 4.3) - System.Reflection.TypeExtensions (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Threading (>= 4.3) - System.Globalization (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Runtime (>= 4.3) System.IO (4.3) Microsoft.NETCore.Platforms (>= 1.1) Microsoft.NETCore.Targets (>= 1.1) System.Runtime (>= 4.3) System.Text.Encoding (>= 4.3) System.Threading.Tasks (>= 4.3) - System.IO.Compression (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - runtime.native.System (>= 4.3) - runtime.native.System.IO.Compression (>= 4.3) - System.Buffers (>= 4.3) - System.Collections (>= 4.3) - System.Diagnostics.Debug (>= 4.3) - System.IO (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Runtime.Handles (>= 4.3) - System.Runtime.InteropServices (>= 4.3) - System.Text.Encoding (>= 4.3) - System.Threading (>= 4.3) - System.Threading.Tasks (>= 4.3) - System.IO.FileSystem (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.IO (>= 4.3) - System.IO.FileSystem.Primitives (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Handles (>= 4.3) - System.Text.Encoding (>= 4.3) - System.Threading.Tasks (>= 4.3) - System.IO.FileSystem.Primitives (4.3) - System.Runtime (>= 4.3) - System.Linq (4.3) - System.Collections (>= 4.3) - System.Diagnostics.Debug (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Linq.Expressions (4.3) - System.Collections (>= 4.3) - System.Diagnostics.Debug (>= 4.3) - System.Globalization (>= 4.3) - System.IO (>= 4.3) - System.Linq (>= 4.3) - System.ObjectModel (>= 4.3) - System.Reflection (>= 4.3) - System.Reflection.Emit (>= 4.3) - System.Reflection.Emit.ILGeneration (>= 4.3) - System.Reflection.Emit.Lightweight (>= 4.3) - System.Reflection.Extensions (>= 4.3) - System.Reflection.Primitives (>= 4.3) - System.Reflection.TypeExtensions (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Threading (>= 4.3) System.Memory (4.5.4) System.Buffers (>= 4.5.1) System.Numerics.Vectors (>= 4.4) System.Runtime.CompilerServices.Unsafe (>= 4.5.3) System.Numerics.Vectors (4.5) - System.ObjectModel (4.3) - System.Collections (>= 4.3) - System.Diagnostics.Debug (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Threading (>= 4.3) - System.Reactive (4.4.1) + System.Reactive (5.0) System.Runtime.InteropServices.WindowsRuntime (>= 4.3) System.Threading.Tasks.Extensions (>= 4.5.4) System.Reflection (4.3) @@ -328,39 +215,19 @@ NUGET System.IO (>= 4.3) System.Reflection.Primitives (>= 4.3) System.Runtime (>= 4.3) - System.Reflection.Emit (4.7) - System.Reflection.Emit.ILGeneration (>= 4.7) - System.Reflection.Emit.ILGeneration (4.7) - System.Reflection.Emit.Lightweight (4.7) - System.Reflection.Emit.ILGeneration (>= 4.7) - System.Reflection.Extensions (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Reflection (>= 4.3) - System.Runtime (>= 4.3) - System.Reflection.Metadata (1.8.1) - System.Collections.Immutable (>= 1.7.1) + System.Reflection.Metadata (5.0) + System.Collections.Immutable (>= 5.0) System.Reflection.Primitives (4.3) Microsoft.NETCore.Platforms (>= 1.1) Microsoft.NETCore.Targets (>= 1.1) System.Runtime (>= 4.3) System.Reflection.TypeExtensions (4.7) - System.Resources.Extensions (4.7.1) + System.Resources.Extensions (5.0) System.Memory (>= 4.5.4) - System.Resources.ResourceManager (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Globalization (>= 4.3) - System.Reflection (>= 4.3) - System.Runtime (>= 4.3) System.Runtime (4.3.1) Microsoft.NETCore.Platforms (>= 1.1.1) Microsoft.NETCore.Targets (>= 1.1.3) - System.Runtime.CompilerServices.Unsafe (4.7.1) - System.Runtime.Extensions (4.3.1) - Microsoft.NETCore.Platforms (>= 1.1.1) - Microsoft.NETCore.Targets (>= 1.1.3) - System.Runtime (>= 4.3.1) + System.Runtime.CompilerServices.Unsafe (5.0) System.Runtime.Handles (4.3) Microsoft.NETCore.Platforms (>= 1.1) Microsoft.NETCore.Targets (>= 1.1) @@ -374,36 +241,33 @@ NUGET System.Runtime.Handles (>= 4.3) System.Runtime.InteropServices.WindowsRuntime (4.3) System.Runtime (>= 4.3) - System.Security.AccessControl (4.7) - System.Security.Principal.Windows (>= 4.7) - System.Security.Cryptography.ProtectedData (4.7) - System.Memory (>= 4.5.3) - System.Security.Permissions (4.7) - System.Security.AccessControl (>= 4.7) - System.Security.Principal.Windows (4.7) + System.Security.AccessControl (5.0) + System.Security.Principal.Windows (>= 5.0) + System.Security.Cryptography.Cng (5.0) + System.Security.Cryptography.Pkcs (5.0.1) + System.Buffers (>= 4.5.1) + System.Formats.Asn1 (>= 5.0) + System.Memory (>= 4.5.4) + System.Security.Cryptography.Cng (>= 5.0) + System.Security.Cryptography.ProtectedData (5.0) + System.Memory (>= 4.5.4) + System.Security.Cryptography.Xml (5.0) + System.Memory (>= 4.5.4) + System.Security.Cryptography.Pkcs (>= 5.0) + System.Security.Permissions (>= 5.0) + System.Security.Permissions (5.0) + System.Security.AccessControl (>= 5.0) + System.Security.Principal.Windows (5.0) System.Text.Encoding (4.3) Microsoft.NETCore.Platforms (>= 1.1) Microsoft.NETCore.Targets (>= 1.1) System.Runtime (>= 4.3) - System.Text.Encoding.CodePages (4.7.1) - System.Runtime.CompilerServices.Unsafe (>= 4.7.1) - System.Text.Encoding.Extensions (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Runtime (>= 4.3) - System.Text.Encoding (>= 4.3) - System.Threading (4.3) - System.Runtime (>= 4.3) - System.Threading.Tasks (>= 4.3) + System.Text.Encoding.CodePages (5.0) + System.Runtime.CompilerServices.Unsafe (>= 5.0) System.Threading.Tasks (4.3) Microsoft.NETCore.Platforms (>= 1.1) Microsoft.NETCore.Targets (>= 1.1) System.Runtime (>= 4.3) - System.Threading.Tasks.Dataflow (4.11.1) + System.Threading.Tasks.Dataflow (5.0) System.Threading.Tasks.Extensions (4.5.4) System.Runtime.CompilerServices.Unsafe (>= 4.5.3) - System.Threading.Thread (4.3) - System.Runtime (>= 4.3) - System.Threading.ThreadPool (4.3) - System.Runtime (>= 4.3) - System.Runtime.Handles (>= 4.3) diff --git a/global.json b/global.json index c6720807..af612bb6 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "3.1.301", + "version": "3.1.404", "rollForward": "minor" } } \ No newline at end of file diff --git a/paket.dependencies b/paket.dependencies index 3a13c0b4..52d8fd8a 100644 --- a/paket.dependencies +++ b/paket.dependencies @@ -10,7 +10,7 @@ nuget NETStandard.Library.NETFramework github fsprojects/FSharp.TypeProviders.SDK src/ProvidedTypes.fs github fsprojects/FSharp.TypeProviders.SDK src/ProvidedTypes.fsi -github fsprojects/FSharp.TypeProviders.SDK src/ProvidedTypesTesting.fs +github fsprojects/FSharp.TypeProviders.SDK tests/ProvidedTypesTesting.fs group Test framework: net461, netcoreapp3.1 diff --git a/paket.lock b/paket.lock index 9127dfc5..ab419a9a 100644 --- a/paket.lock +++ b/paket.lock @@ -11,19 +11,19 @@ NUGET NETStandard.Library.NETFramework (2.0.0-preview2-25405-01) Microsoft.NETCore.Platforms (>= 2.0.0-preview2-25405-01) - restriction: || (== net461) (&& (== netcoreapp3.1) (>= net461)) (&& (== netstandard2.0) (>= net461)) NETStandard.Library (>= 2.0.0-preview2-25401-01) - restriction: || (== net461) (&& (== netcoreapp3.1) (>= net461)) (&& (== netstandard2.0) (>= net461)) - System.Buffers (4.5.1) - restriction: || (&& (== net461) (== netcoreapp3.1)) (&& (== netcoreapp3.1) (>= monoandroid)) (&& (== netcoreapp3.1) (>= monotouch)) (&& (== netcoreapp3.1) (>= net461)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (&& (== netcoreapp3.1) (< netstandard1.1)) (&& (== netcoreapp3.1) (< netstandard2.0)) (&& (== netcoreapp3.1) (>= xamarinios)) (&& (== netcoreapp3.1) (>= xamarinmac)) (&& (== netcoreapp3.1) (>= xamarintvos)) (&& (== netcoreapp3.1) (>= xamarinwatchos)) (== netstandard2.0) + System.Buffers (4.5.1) - restriction: || (&& (== net461) (== netcoreapp3.1)) (&& (== netcoreapp3.1) (>= monotouch)) (&& (== netcoreapp3.1) (>= net461)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (&& (== netcoreapp3.1) (< netcoreapp2.1) (>= xamarinios)) (&& (== netcoreapp3.1) (< netcoreapp2.1) (>= xamarinmac)) (&& (== netcoreapp3.1) (< netcoreapp2.1) (>= xamarintvos)) (&& (== netcoreapp3.1) (< netcoreapp2.1) (>= xamarinwatchos)) (&& (== netcoreapp3.1) (< netstandard1.1)) (&& (== netcoreapp3.1) (< netstandard2.0)) (== netstandard2.0) System.Configuration.ConfigurationManager (4.7) System.Security.Cryptography.ProtectedData (>= 4.7) - restriction: || (== netcoreapp3.1) (== netstandard2.0) System.Security.Permissions (>= 4.7) System.Drawing.Common (4.7) - restriction: || (&& (== net461) (>= netcoreapp3.0)) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp3.0)) - Microsoft.NETCore.Platforms (>= 3.1) - restriction: || (&& (== net461) (>= netcoreapp2.0)) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.0)) - Microsoft.Win32.SystemEvents (>= 4.7) - restriction: || (&& (== net461) (>= netcoreapp2.0)) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.0)) + Microsoft.NETCore.Platforms (>= 3.1) - restriction: || (&& (== net461) (>= netcoreapp2.0)) (&& (== net461) (>= netcoreapp3.0)) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.0)) (&& (== netstandard2.0) (>= netcoreapp3.0)) + Microsoft.Win32.SystemEvents (>= 4.7) - restriction: || (&& (== net461) (>= netcoreapp2.0)) (&& (== net461) (>= netcoreapp3.0)) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.0)) (&& (== netstandard2.0) (>= netcoreapp3.0)) System.Memory (4.5.4) - restriction: || (&& (== net461) (== netcoreapp3.1)) (&& (== netcoreapp3.1) (< netcoreapp2.1)) (== netstandard2.0) - System.Buffers (>= 4.5.1) - restriction: || (== net461) (&& (== netcoreapp3.1) (>= monoandroid)) (&& (== netcoreapp3.1) (>= monotouch)) (&& (== netcoreapp3.1) (>= net461)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (&& (== netcoreapp3.1) (< netstandard1.1)) (&& (== netcoreapp3.1) (< netstandard2.0)) (&& (== netcoreapp3.1) (>= xamarinios)) (&& (== netcoreapp3.1) (>= xamarinmac)) (&& (== netcoreapp3.1) (>= xamarintvos)) (&& (== netcoreapp3.1) (>= xamarinwatchos)) (== netstandard2.0) + System.Buffers (>= 4.5.1) - restriction: || (== net461) (&& (== netcoreapp3.1) (>= monotouch)) (&& (== netcoreapp3.1) (>= net461)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (&& (== netcoreapp3.1) (< netstandard1.1)) (&& (== netcoreapp3.1) (< netstandard2.0)) (&& (== netcoreapp3.1) (>= xamarinios)) (&& (== netcoreapp3.1) (>= xamarinmac)) (&& (== netcoreapp3.1) (>= xamarintvos)) (&& (== netcoreapp3.1) (>= xamarinwatchos)) (== netstandard2.0) System.Numerics.Vectors (>= 4.4) - restriction: || (&& (== net461) (< net45) (>= netstandard2.0)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (== netstandard2.0) - System.Runtime.CompilerServices.Unsafe (>= 4.5.3) - restriction: || (== net461) (&& (== netcoreapp3.1) (>= monoandroid)) (&& (== netcoreapp3.1) (>= monotouch)) (&& (== netcoreapp3.1) (>= net461)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (&& (== netcoreapp3.1) (< netcoreapp2.1)) (&& (== netcoreapp3.1) (< netstandard1.1)) (&& (== netcoreapp3.1) (< netstandard2.0)) (&& (== netcoreapp3.1) (>= uap10.1)) (&& (== netcoreapp3.1) (>= xamarinios)) (&& (== netcoreapp3.1) (>= xamarinmac)) (&& (== netcoreapp3.1) (>= xamarintvos)) (&& (== netcoreapp3.1) (>= xamarinwatchos)) (== netstandard2.0) + System.Runtime.CompilerServices.Unsafe (>= 4.5.3) - restriction: || (== net461) (&& (== netcoreapp3.1) (>= monotouch)) (&& (== netcoreapp3.1) (>= net461)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (&& (== netcoreapp3.1) (< netcoreapp2.1)) (&& (== netcoreapp3.1) (< netstandard1.1)) (&& (== netcoreapp3.1) (< netstandard2.0)) (&& (== netcoreapp3.1) (>= uap10.1)) (&& (== netcoreapp3.1) (>= xamarinios)) (&& (== netcoreapp3.1) (>= xamarinmac)) (&& (== netcoreapp3.1) (>= xamarintvos)) (&& (== netcoreapp3.1) (>= xamarinwatchos)) (== netstandard2.0) System.Numerics.Vectors (4.5) - restriction: || (&& (== net461) (== netcoreapp3.1)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (== netstandard2.0) - System.Runtime.CompilerServices.Unsafe (4.7.1) - restriction: || (&& (== net461) (== netcoreapp3.1)) (&& (== netcoreapp3.1) (>= monoandroid)) (&& (== netcoreapp3.1) (>= monotouch)) (&& (== netcoreapp3.1) (>= net461)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (&& (== netcoreapp3.1) (< netcoreapp2.1)) (&& (== netcoreapp3.1) (< netstandard1.1)) (&& (== netcoreapp3.1) (< netstandard2.0)) (&& (== netcoreapp3.1) (>= uap10.1)) (&& (== netcoreapp3.1) (>= xamarinios)) (&& (== netcoreapp3.1) (>= xamarinmac)) (&& (== netcoreapp3.1) (>= xamarintvos)) (&& (== netcoreapp3.1) (>= xamarinwatchos)) (== netstandard2.0) + System.Runtime.CompilerServices.Unsafe (4.7.1) - restriction: || (&& (== net461) (== netcoreapp3.1)) (&& (== netcoreapp3.1) (>= monotouch)) (&& (== netcoreapp3.1) (>= net461)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (&& (== netcoreapp3.1) (< netcoreapp2.1)) (&& (== netcoreapp3.1) (< netstandard1.1)) (&& (== netcoreapp3.1) (< netstandard2.0)) (&& (== netcoreapp3.1) (>= uap10.1)) (== netstandard2.0) System.Security.AccessControl (4.7) Microsoft.NETCore.Platforms (>= 3.1) - restriction: || (&& (== net461) (>= netcoreapp2.0)) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.0)) System.Security.Principal.Windows (>= 4.7) @@ -38,9 +38,9 @@ NUGET YamlDotNet (8.1.2) GITHUB remote: fsprojects/FSharp.TypeProviders.SDK - src/ProvidedTypes.fs (b45779c1571b54a2bc6bafa12690a8d9763150d1) - src/ProvidedTypes.fsi (b45779c1571b54a2bc6bafa12690a8d9763150d1) - src/ProvidedTypesTesting.fs (b45779c1571b54a2bc6bafa12690a8d9763150d1) + src/ProvidedTypes.fs (a09c88b03fb79b5dd4cde68e260ffad42f55dbaa) + src/ProvidedTypes.fsi (a09c88b03fb79b5dd4cde68e260ffad42f55dbaa) + tests/ProvidedTypesTesting.fs (a09c88b03fb79b5dd4cde68e260ffad42f55dbaa) GROUP Test REDIRECTS: FORCE RESTRICTION: || (== net461) (== netcoreapp3.1) diff --git a/paket.template b/paket.template deleted file mode 100644 index 08384dac..00000000 --- a/paket.template +++ /dev/null @@ -1,43 +0,0 @@ -type file -id FSharp.Configuration -title - FSharp.Configuration -owners - Steffen Forkmann; Sergey Tihon; Daniel Mohl; Tomas Petricek; Ryan Riley; Mauricio Scheffer; Phil Trelford; Vasily Kirichenko; Reed Copsey, Jr. -authors - Steffen Forkmann; Sergey Tihon; Daniel Mohl; Tomas Petricek; Ryan Riley; Mauricio Scheffer; Phil Trelford; Vasily Kirichenko; Reed Copsey, Jr. -projectUrl - http://fsprojects.github.com/FSharp.Configuration -iconUrl - https://raw.githubusercontent.com/fsprojects/FSharp.Configuration/master/docs/files/img/logo.png -licenseUrl - http://github.com/fsprojects/FSharp.Configuration/blob/master/LICENSE.txt -requireLicenseAcceptance - false -copyright - Copyright 2014-2019 -tags - appsettings YAML F# ResX Ini config -summary - The FSharp.Configuration project contains type providers for the configuration of .NET projects. -description - The FSharp.Configuration project contains type providers for the configuration of .NET projects. -files - bin/lib/net461/FSharp.Configuration.* ==> lib/net461 - bin/lib/net461/YamlDotNet.dll ==> lib/net461 - bin/lib/netstandard2.0/FSharp.Configuration.* ==> lib/netstandard2.0 - bin/lib/netstandard2.0/YamlDotNet.dll ==> lib/netstandard2.0 - bin/lib/netstandard2.0/System.*.dll ==> lib/netstandard2.0 - docs/output/*.* => docs - docs/output/content/*.* => docs/content - docs/output/content/img/*.* => docs/content/img - docs/output/img/*.* => docs/img - docs/output/reference/*.* => docs/reference -dependencies - framework: netstandard20 - FSharp.Core >= LOCKEDVERSION - framework: net461 - FSharp.Core >= LOCKEDVERSION -references - FSharp.Configuration.dll - YamlDotNet.dll \ No newline at end of file diff --git a/src/FSharp.Configuration.DesignTime/YamlConfigProvider.fs b/src/FSharp.Configuration.DesignTime/YamlConfigProvider.fs index 7b42a7fe..91fd6dd4 100644 --- a/src/FSharp.Configuration.DesignTime/YamlConfigProvider.fs +++ b/src/FSharp.Configuration.DesignTime/YamlConfigProvider.fs @@ -246,11 +246,7 @@ let internal typedYamlConfig (context: Context) = | "", "" -> failwith "You must specify either FilePath or YamlText parameter." | "", yamlText -> createTy yamlText readOnly inferTypesFromStrings | filePath, _ -> - let filePath = - if Path.IsPathRooted filePath - then filePath - else context.ResolutionFolder filePath - |> Path.GetFullPath + let filePath = findConfigFile context.ResolutionFolder filePath context.WatchFile filePath createTy (File.ReadAllText filePath) readOnly inferTypesFromStrings | _ -> failwith "Wrong parameters" diff --git a/src/FSharp.Configuration.Runtime/FSharp.Configuration.Runtime.fsproj b/src/FSharp.Configuration.Runtime/FSharp.Configuration.Runtime.fsproj index bfe09394..e1ab0e34 100644 --- a/src/FSharp.Configuration.Runtime/FSharp.Configuration.Runtime.fsproj +++ b/src/FSharp.Configuration.Runtime/FSharp.Configuration.Runtime.fsproj @@ -7,6 +7,7 @@ Library netstandard2.0; net461 true + true NET461 diff --git a/src/FSharp.Configuration.Runtime/TypeProviders.Helper.fs b/src/FSharp.Configuration.Runtime/TypeProviders.Helper.fs index 3d4c5004..94300bef 100644 --- a/src/FSharp.Configuration.Runtime/TypeProviders.Helper.fs +++ b/src/FSharp.Configuration.Runtime/TypeProviders.Helper.fs @@ -198,11 +198,10 @@ let createNiceNameProvider() = name let findConfigFile resolutionFolder (configFileName:string) = - if Path.IsPathRooted configFileName then - configFileName - else - let path = configFileName.Split([|@"\"; "/"|], StringSplitOptions.None) - Array.append [|resolutionFolder|] path |> Path.Combine + if Path.IsPathRooted configFileName + then configFileName + else resolutionFolder configFileName + |> Path.GetFullPath let erasedType<'T> assemblyName rootNamespace typeName (hideObjectMethods: bool option) = match hideObjectMethods with diff --git a/src/FSharp.Configuration.Runtime/paket.template b/src/FSharp.Configuration.Runtime/paket.template index 1cb625c2..b21f993d 100644 --- a/src/FSharp.Configuration.Runtime/paket.template +++ b/src/FSharp.Configuration.Runtime/paket.template @@ -1,39 +1,42 @@ type file id FSharp.Configuration +title + FSharp.Configuration authors - Steffen Forkmann, Gustavo Guerra, JohnDoeKyrgyz, Don Syme + Steffen Forkmann; Sergey Tihon; Daniel Mohl; Tomas Petricek; Ryan Riley; Mauricio Scheffer; Phil Trelford; Vasily Kirichenko; Reed Copsey, Jr. owners - Steffen Forkmann, Gustavo Guerra, JohnDoeKyrgyz, Don Syme + Steffen Forkmann; Sergey Tihon; Daniel Mohl; Tomas Petricek; Ryan Riley; Mauricio Scheffer; Phil Trelford; Vasily Kirichenko; Reed Copsey, Jr. projectUrl - http://github.com/fsprojects/FSharp.Configuration + http://fsprojects.github.com/FSharp.Configuration iconUrl https://raw.githubusercontent.com/fsprojects/FSharp.Configuration/master/docs/files/img/logo.png licenseUrl http://github.com/fsprojects/FSharp.Configuration/blob/master/LICENSE.txt requireLicenseAcceptance false +copyright + Copyright 2014-2020 tags - F# fsharp typeproviders FSharp.Configuration + F# fsharp typeproviders FSharp.Configuration appsettings YAML F# ResX Ini config summary - This library is for the .NET platform implementing FSharp.Configuration. + The FSharp.Configuration project contains type providers for the configuration of .NET projects. description - This library is for the .NET platform implementing FSharp.Configuration. + The FSharp.Configuration project contains type providers for the configuration of .NET projects. tags F# fsharp typeproviders FSharp.Configuration files bin/Release/net461/FSharp.Configuration.Runtime.* ==> lib/net461 + bin/Release/net461/YamlDotNet.dll ==> lib/net461 bin/Release/netstandard2.0/FSharp.Configuration.Runtime.* ==> lib/netstandard2.0 + bin/Release/netstandard2.0/YamlDotNet.dll ==> lib/netstandard2.0 bin/Release/typeproviders/fsharp41/netstandard2.0/*.dll ==> typeproviders/fsharp41/netstandard2.0 bin/Release/typeproviders/fsharp41/netcoreapp3.1/*.dll ==> typeproviders/fsharp41/netcoreapp3.1 bin/Release/typeproviders/fsharp41/net461/*.dll ==> typeproviders/fsharp41/net461 +dependencies + framework: netstandard20 + FSharp.Core >= LOCKEDVERSION + framework: net461 + FSharp.Core >= LOCKEDVERSION references FSharp.Configuration.Runtime.dll -dependencies - FSharp.Core >= LOCKEDVERSION - -# put any package references here -# Some.Package -# framework: netcoreapp3.1 -# System.Text.Encoding.CodePages >= LOCKEDVERSION -# framework: netstandard2.0 -# System.Text.Encoding.CodePages >= LOCKEDVERSION + YamlDotNet.dll diff --git a/src/FSharp.Configuration/FSharp.Configuration.fsproj b/src/FSharp.Configuration/FSharp.Configuration.fsproj index 9dceb8bc..f8c37183 100644 --- a/src/FSharp.Configuration/FSharp.Configuration.fsproj +++ b/src/FSharp.Configuration/FSharp.Configuration.fsproj @@ -4,9 +4,9 @@ netstandard2.0;net461 FSharp.Configuration - true - PackageReference - true + true + PackageReference + true NET461 @@ -15,7 +15,11 @@ - + + + True + ProvidedTypesTesting.fs + True ProvidedTypes.fsi @@ -24,10 +28,6 @@ True ProvidedTypes.fs - - True - ProvidedTypesTesting.fs - @@ -37,9 +37,8 @@ - PreserveNewest + PreserveNewest - \ No newline at end of file From 46eb72d4940125753279a1d876458240d2f0c81f Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Mon, 9 Aug 2021 13:41:36 +0200 Subject: [PATCH 36/41] feat: dependencies update and test fixes --- .config/dotnet-tools.json | 4 +- .github/workflows/dotnetcore.yml | 2 +- build.fsx | 2 +- build.fsx.lock | 531 ++++++------------ global.json | 2 +- paket.dependencies | 8 +- paket.lock | 95 ++-- .../FSharp.Configuration.DesignTime.fsproj | 2 +- .../IniFileProvider.fs | 8 +- .../FSharp.Configuration.Runtime.fsproj | 5 - .../IniFileProvider.Runtime.fs | 4 +- .../YamlConfigProvider.Runtime.fs | 3 +- .../paket.template | 3 +- .../FSharp.Configuration.fsproj | 19 +- .../AppSettingsProvider.Tests.fs | 24 +- .../FSharp.Configuration.Tests.fsproj | 4 +- .../YamlProvider.Tests.fs | 16 +- tests/FSharp.Configuration.Tests/app.config | 56 +- 18 files changed, 295 insertions(+), 493 deletions(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index d7d42231..4a74930b 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,13 +3,13 @@ "isRoot": true, "tools": { "paket": { - "version": "5.247.4", + "version": "5.258.1", "commands": [ "paket" ] }, "fake-cli": { - "version": "5.20.2", + "version": "5.20.4", "commands": [ "fake" ] diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml index 26b73bbf..783ea116 100644 --- a/.github/workflows/dotnetcore.yml +++ b/.github/workflows/dotnetcore.yml @@ -15,7 +15,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macOS-latest] - dotnet: [3.1.301] + dotnet: [5.0.302] runs-on: ${{ matrix.os }} steps: diff --git a/build.fsx b/build.fsx index 1c731c2e..b170510f 100644 --- a/build.fsx +++ b/build.fsx @@ -175,7 +175,7 @@ Target.create "RunTests" (fun _ -> Target.create "RunTestsNetCore" (fun _ -> DotNet.exec (fun r -> { r with WorkingDirectory = "tests/FSharp.Configuration.Tests/" }) - "run" "--framework netcoreapp3.1" + "run" "--framework net5.0" |> ignore ) diff --git a/build.fsx.lock b/build.fsx.lock index 29258117..b13b0930 100644 --- a/build.fsx.lock +++ b/build.fsx.lock @@ -5,405 +5,240 @@ NUGET BlackFox.VsWhere (1.1) FSharp.Core (>= 4.2.3) Microsoft.Win32.Registry (>= 4.7) - Fake.Api.GitHub (5.20.2) + Fake.Api.GitHub (5.20.4) FSharp.Core (>= 4.7.2) Octokit (>= 0.48) - Fake.Core.CommandLineParsing (5.20.2) + Fake.Core.CommandLineParsing (5.20.4) FParsec (>= 1.1.1) FSharp.Core (>= 4.7.2) - Fake.Core.Context (5.20.2) + Fake.Core.Context (5.20.4) FSharp.Core (>= 4.7.2) - Fake.Core.Environment (5.20.2) + Fake.Core.Environment (5.20.4) FSharp.Core (>= 4.7.2) - Fake.Core.FakeVar (5.20.2) - Fake.Core.Context (>= 5.20.2) + Fake.Core.FakeVar (5.20.4) + Fake.Core.Context (>= 5.20.4) FSharp.Core (>= 4.7.2) - Fake.Core.Process (5.20.2) - Fake.Core.Environment (>= 5.20.2) - Fake.Core.FakeVar (>= 5.20.2) - Fake.Core.String (>= 5.20.2) - Fake.Core.Trace (>= 5.20.2) - Fake.IO.FileSystem (>= 5.20.2) + Fake.Core.Process (5.20.4) + Fake.Core.Environment (>= 5.20.4) + Fake.Core.FakeVar (>= 5.20.4) + Fake.Core.String (>= 5.20.4) + Fake.Core.Trace (>= 5.20.4) + Fake.IO.FileSystem (>= 5.20.4) FSharp.Core (>= 4.7.2) System.Collections.Immutable (>= 1.7.1) - Fake.Core.ReleaseNotes (5.20.2) - Fake.Core.SemVer (>= 5.20.2) - Fake.Core.String (>= 5.20.2) - FSharp.Core (>= 4.7.2) - Fake.Core.SemVer (5.20.2) - FSharp.Core (>= 4.7.2) - Fake.Core.String (5.20.2) - FSharp.Core (>= 4.7.2) - Fake.Core.Target (5.20.2) - Fake.Core.CommandLineParsing (>= 5.20.2) - Fake.Core.Context (>= 5.20.2) - Fake.Core.Environment (>= 5.20.2) - Fake.Core.FakeVar (>= 5.20.2) - Fake.Core.Process (>= 5.20.2) - Fake.Core.String (>= 5.20.2) - Fake.Core.Trace (>= 5.20.2) - FSharp.Control.Reactive (>= 4.4) - FSharp.Core (>= 4.7.2) - Fake.Core.Tasks (5.20.2) - Fake.Core.Trace (>= 5.20.2) - FSharp.Core (>= 4.7.2) - Fake.Core.Trace (5.20.2) - Fake.Core.Environment (>= 5.20.2) - Fake.Core.FakeVar (>= 5.20.2) - FSharp.Core (>= 4.7.2) - Fake.Core.Xml (5.20.2) - Fake.Core.String (>= 5.20.2) - FSharp.Core (>= 4.7.2) - Fake.DotNet.AssemblyInfoFile (5.20.2) - Fake.Core.Environment (>= 5.20.2) - Fake.Core.String (>= 5.20.2) - Fake.Core.Trace (>= 5.20.2) - Fake.IO.FileSystem (>= 5.20.2) - FSharp.Core (>= 4.7.2) - Fake.DotNet.Cli (5.20.2) - Fake.Core.Environment (>= 5.20.2) - Fake.Core.Process (>= 5.20.2) - Fake.Core.String (>= 5.20.2) - Fake.Core.Trace (>= 5.20.2) - Fake.DotNet.MSBuild (>= 5.20.2) - Fake.DotNet.NuGet (>= 5.20.2) - Fake.IO.FileSystem (>= 5.20.2) + Fake.Core.ReleaseNotes (5.20.4) + Fake.Core.SemVer (>= 5.20.4) + Fake.Core.String (>= 5.20.4) + FSharp.Core (>= 4.7.2) + Fake.Core.SemVer (5.20.4) + FSharp.Core (>= 4.7.2) + Fake.Core.String (5.20.4) + FSharp.Core (>= 4.7.2) + Fake.Core.Target (5.20.4) + Fake.Core.CommandLineParsing (>= 5.20.4) + Fake.Core.Context (>= 5.20.4) + Fake.Core.Environment (>= 5.20.4) + Fake.Core.FakeVar (>= 5.20.4) + Fake.Core.Process (>= 5.20.4) + Fake.Core.String (>= 5.20.4) + Fake.Core.Trace (>= 5.20.4) + FSharp.Control.Reactive (>= 4.4.2) + FSharp.Core (>= 4.7.2) + Fake.Core.Tasks (5.20.4) + Fake.Core.Trace (>= 5.20.4) + FSharp.Core (>= 4.7.2) + Fake.Core.Trace (5.20.4) + Fake.Core.Environment (>= 5.20.4) + Fake.Core.FakeVar (>= 5.20.4) + FSharp.Core (>= 4.7.2) + Fake.Core.Xml (5.20.4) + Fake.Core.String (>= 5.20.4) + FSharp.Core (>= 4.7.2) + Fake.DotNet.AssemblyInfoFile (5.20.4) + Fake.Core.Environment (>= 5.20.4) + Fake.Core.String (>= 5.20.4) + Fake.Core.Trace (>= 5.20.4) + Fake.IO.FileSystem (>= 5.20.4) + FSharp.Core (>= 4.7.2) + Fake.DotNet.Cli (5.20.4) + Fake.Core.Environment (>= 5.20.4) + Fake.Core.Process (>= 5.20.4) + Fake.Core.String (>= 5.20.4) + Fake.Core.Trace (>= 5.20.4) + Fake.DotNet.MSBuild (>= 5.20.4) + Fake.DotNet.NuGet (>= 5.20.4) + Fake.IO.FileSystem (>= 5.20.4) FSharp.Core (>= 4.7.2) Mono.Posix.NETStandard (>= 1.0) Newtonsoft.Json (>= 12.0.3) - Fake.DotNet.FSFormatting (5.20.2) - Fake.Core.Process (>= 5.20.2) - Fake.DotNet.Cli (>= 5.20.2) - Fake.IO.FileSystem (>= 5.20.2) + Fake.DotNet.FSFormatting (5.20.4) + Fake.Core.Process (>= 5.20.4) + Fake.DotNet.Cli (>= 5.20.4) + Fake.IO.FileSystem (>= 5.20.4) FSharp.Core (>= 4.7.2) - Fake.DotNet.MSBuild (5.20.2) + Fake.DotNet.MSBuild (5.20.4) BlackFox.VsWhere (>= 1.1) - Fake.Core.Environment (>= 5.20.2) - Fake.Core.Process (>= 5.20.2) - Fake.Core.String (>= 5.20.2) - Fake.Core.Trace (>= 5.20.2) - Fake.IO.FileSystem (>= 5.20.2) - FSharp.Core (>= 4.7.2) - MSBuild.StructuredLogger (>= 2.1.133) - Fake.DotNet.NuGet (5.20.2) - Fake.Core.Environment (>= 5.20.2) - Fake.Core.Process (>= 5.20.2) - Fake.Core.SemVer (>= 5.20.2) - Fake.Core.String (>= 5.20.2) - Fake.Core.Tasks (>= 5.20.2) - Fake.Core.Trace (>= 5.20.2) - Fake.Core.Xml (>= 5.20.2) - Fake.IO.FileSystem (>= 5.20.2) - Fake.Net.Http (>= 5.20.2) + Fake.Core.Environment (>= 5.20.4) + Fake.Core.Process (>= 5.20.4) + Fake.Core.String (>= 5.20.4) + Fake.Core.Trace (>= 5.20.4) + Fake.IO.FileSystem (>= 5.20.4) + FSharp.Core (>= 4.7.2) + MSBuild.StructuredLogger (>= 2.1.176) + Fake.DotNet.NuGet (5.20.4) + Fake.Core.Environment (>= 5.20.4) + Fake.Core.Process (>= 5.20.4) + Fake.Core.SemVer (>= 5.20.4) + Fake.Core.String (>= 5.20.4) + Fake.Core.Tasks (>= 5.20.4) + Fake.Core.Trace (>= 5.20.4) + Fake.Core.Xml (>= 5.20.4) + Fake.IO.FileSystem (>= 5.20.4) + Fake.Net.Http (>= 5.20.4) FSharp.Core (>= 4.7.2) Newtonsoft.Json (>= 12.0.3) NuGet.Protocol (>= 5.6) - Fake.DotNet.Paket (5.20.2) - Fake.Core.Process (>= 5.20.2) - Fake.Core.String (>= 5.20.2) - Fake.Core.Trace (>= 5.20.2) - Fake.DotNet.Cli (>= 5.20.2) - Fake.IO.FileSystem (>= 5.20.2) - FSharp.Core (>= 4.7.2) - Fake.DotNet.Testing.Expecto (5.20.2) - Fake.Core.Process (>= 5.20.2) - Fake.Core.String (>= 5.20.2) - Fake.Core.Trace (>= 5.20.2) - Fake.IO.FileSystem (>= 5.20.2) - Fake.Testing.Common (>= 5.20.2) - FSharp.Core (>= 4.7.2) - Fake.IO.FileSystem (5.20.2) - Fake.Core.String (>= 5.20.2) - FSharp.Core (>= 4.7.2) - Fake.Net.Http (5.20.2) - Fake.Core.Trace (>= 5.20.2) - FSharp.Core (>= 4.7.2) - Fake.Testing.Common (5.20.2) - Fake.Core.Trace (>= 5.20.2) - FSharp.Core (>= 4.7.2) - Fake.Tools.Git (5.20.2) - Fake.Core.Environment (>= 5.20.2) - Fake.Core.Process (>= 5.20.2) - Fake.Core.SemVer (>= 5.20.2) - Fake.Core.String (>= 5.20.2) - Fake.Core.Trace (>= 5.20.2) - Fake.IO.FileSystem (>= 5.20.2) + Fake.DotNet.Paket (5.20.4) + Fake.Core.Process (>= 5.20.4) + Fake.Core.String (>= 5.20.4) + Fake.Core.Trace (>= 5.20.4) + Fake.DotNet.Cli (>= 5.20.4) + Fake.IO.FileSystem (>= 5.20.4) + FSharp.Core (>= 4.7.2) + Fake.DotNet.Testing.Expecto (5.20.4) + Fake.Core.Process (>= 5.20.4) + Fake.Core.String (>= 5.20.4) + Fake.Core.Trace (>= 5.20.4) + Fake.IO.FileSystem (>= 5.20.4) + Fake.Testing.Common (>= 5.20.4) + FSharp.Core (>= 4.7.2) + Fake.IO.FileSystem (5.20.4) + Fake.Core.String (>= 5.20.4) + FSharp.Core (>= 4.7.2) + Fake.Net.Http (5.20.4) + Fake.Core.Trace (>= 5.20.4) + FSharp.Core (>= 4.7.2) + Fake.Testing.Common (5.20.4) + Fake.Core.Trace (>= 5.20.4) + FSharp.Core (>= 4.7.2) + Fake.Tools.Git (5.20.4) + Fake.Core.Environment (>= 5.20.4) + Fake.Core.Process (>= 5.20.4) + Fake.Core.SemVer (>= 5.20.4) + Fake.Core.String (>= 5.20.4) + Fake.Core.Trace (>= 5.20.4) + Fake.IO.FileSystem (>= 5.20.4) FSharp.Core (>= 4.7.2) FParsec (1.1.1) FSharp.Core (>= 4.3.4) - FSharp.Control.Reactive (4.4.2) + FSharp.Control.Reactive (5.0.2) FSharp.Core (>= 4.7.2) - System.Reactive (>= 4.4.1) - FSharp.Core (4.7.2) - Microsoft.Build (16.6) - Microsoft.Build.Framework (16.6) + System.Reactive (>= 5.0) + FSharp.Core (5.0.2) + Microsoft.Build (16.10) + Microsoft.Build.Framework (16.10) System.Security.Permissions (>= 4.7) - Microsoft.Build.Tasks.Core (16.6) - Microsoft.Build.Framework (>= 16.6) - Microsoft.Build.Utilities.Core (>= 16.6) + Microsoft.Build.Tasks.Core (16.10) + Microsoft.Build.Framework (>= 16.10) + Microsoft.Build.Utilities.Core (>= 16.10) + Microsoft.NET.StringTools (>= 1.0) Microsoft.Win32.Registry (>= 4.3) System.CodeDom (>= 4.4) - System.Collections.Immutable (>= 1.5) + System.Collections.Immutable (>= 5.0) System.Reflection.Metadata (>= 1.6) - System.Reflection.TypeExtensions (>= 4.1) System.Resources.Extensions (>= 4.6) + System.Security.Cryptography.Pkcs (>= 4.7) + System.Security.Cryptography.Xml (>= 4.7) System.Security.Permissions (>= 4.7) System.Threading.Tasks.Dataflow (>= 4.9) - Microsoft.Build.Utilities.Core (16.6) - Microsoft.Build.Framework (>= 16.6) + Microsoft.Build.Utilities.Core (16.10) + Microsoft.Build.Framework (>= 16.10) + Microsoft.NET.StringTools (>= 1.0) Microsoft.Win32.Registry (>= 4.3) - System.Collections.Immutable (>= 1.5) + System.Collections.Immutable (>= 5.0) + System.Configuration.ConfigurationManager (>= 4.7) System.Security.Permissions (>= 4.7) System.Text.Encoding.CodePages (>= 4.0.1) - Microsoft.NETCore.Platforms (3.1.1) - Microsoft.NETCore.Targets (3.1) - Microsoft.Win32.Primitives (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Runtime (>= 4.3) - Microsoft.Win32.Registry (4.7) - System.Buffers (>= 4.5) - System.Memory (>= 4.5.3) - System.Security.AccessControl (>= 4.7) - System.Security.Principal.Windows (>= 4.7) + Microsoft.NET.StringTools (1.0) + System.Memory (>= 4.5.4) + System.Runtime.CompilerServices.Unsafe (>= 5.0) + Microsoft.NETCore.Platforms (5.0.2) + Microsoft.NETCore.Targets (5.0) + Microsoft.Win32.Registry (5.0) + System.Buffers (>= 4.5.1) + System.Memory (>= 4.5.4) + System.Security.AccessControl (>= 5.0) + System.Security.Principal.Windows (>= 5.0) Mono.Posix.NETStandard (1.0) - MSBuild.StructuredLogger (2.1.133) + MSBuild.StructuredLogger (2.1.507) Microsoft.Build (>= 16.4) Microsoft.Build.Framework (>= 16.4) Microsoft.Build.Tasks.Core (>= 16.4) Microsoft.Build.Utilities.Core (>= 16.4) - System.IO.Compression (>= 4.3) - Newtonsoft.Json (12.0.3) - NuGet.Common (5.6) - NuGet.Frameworks (>= 5.6) - System.Diagnostics.Process (>= 4.3) - System.Threading.Thread (>= 4.3) - NuGet.Configuration (5.6) - NuGet.Common (>= 5.6) - System.Security.Cryptography.ProtectedData (>= 4.3) - NuGet.Frameworks (5.6) - NuGet.Packaging (5.6) + Newtonsoft.Json (13.0.1) + NuGet.Common (5.10) + NuGet.Frameworks (>= 5.10) + NuGet.Configuration (5.10) + NuGet.Common (>= 5.10) + System.Security.Cryptography.ProtectedData (>= 4.4) + NuGet.Frameworks (5.10) + NuGet.Packaging (5.10) Newtonsoft.Json (>= 9.0.1) - NuGet.Configuration (>= 5.6) - NuGet.Versioning (>= 5.6) - System.Dynamic.Runtime (>= 4.3) - NuGet.Protocol (5.6) - NuGet.Packaging (>= 5.6) - System.Dynamic.Runtime (>= 4.3) - NuGet.Versioning (5.6) - Octokit (0.48) - runtime.native.System (4.3.1) - Microsoft.NETCore.Platforms (>= 1.1.1) - Microsoft.NETCore.Targets (>= 1.1.3) - runtime.native.System.IO.Compression (4.3.2) - Microsoft.NETCore.Platforms (>= 1.1.1) - Microsoft.NETCore.Targets (>= 1.1.3) + NuGet.Configuration (>= 5.10) + NuGet.Versioning (>= 5.10) + System.Security.Cryptography.Cng (>= 5.0) + System.Security.Cryptography.Pkcs (>= 5.0) + NuGet.Protocol (5.10) + NuGet.Packaging (>= 5.10) + NuGet.Versioning (5.10) + Octokit (0.50) System.Buffers (4.5.1) - System.CodeDom (4.7) - System.Collections (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Runtime (>= 4.3) - System.Collections.Immutable (1.7.1) + System.CodeDom (5.0) + System.Collections.Immutable (5.0) + System.Memory (>= 4.5.4) + System.Configuration.ConfigurationManager (5.0) + System.Security.Cryptography.ProtectedData (>= 5.0) + System.Security.Permissions (>= 5.0) + System.Formats.Asn1 (5.0) + System.Buffers (>= 4.5.1) System.Memory (>= 4.5.4) - System.Diagnostics.Debug (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Runtime (>= 4.3) - System.Diagnostics.Process (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.Win32.Primitives (>= 4.3) - Microsoft.Win32.Registry (>= 4.3) - runtime.native.System (>= 4.3) - System.Collections (>= 4.3) - System.Diagnostics.Debug (>= 4.3) - System.Globalization (>= 4.3) - System.IO (>= 4.3) - System.IO.FileSystem (>= 4.3) - System.IO.FileSystem.Primitives (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Runtime.Handles (>= 4.3) - System.Runtime.InteropServices (>= 4.3) - System.Text.Encoding (>= 4.3) - System.Text.Encoding.Extensions (>= 4.3) - System.Threading (>= 4.3) - System.Threading.Tasks (>= 4.3) - System.Threading.Thread (>= 4.3) - System.Threading.ThreadPool (>= 4.3) - System.Dynamic.Runtime (4.3) - System.Collections (>= 4.3) - System.Diagnostics.Debug (>= 4.3) - System.Linq (>= 4.3) - System.Linq.Expressions (>= 4.3) - System.ObjectModel (>= 4.3) - System.Reflection (>= 4.3) - System.Reflection.Emit (>= 4.3) - System.Reflection.Emit.ILGeneration (>= 4.3) - System.Reflection.Primitives (>= 4.3) - System.Reflection.TypeExtensions (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Threading (>= 4.3) - System.Globalization (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Runtime (>= 4.3) - System.IO (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Runtime (>= 4.3) - System.Text.Encoding (>= 4.3) - System.Threading.Tasks (>= 4.3) - System.IO.Compression (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - runtime.native.System (>= 4.3) - runtime.native.System.IO.Compression (>= 4.3) - System.Buffers (>= 4.3) - System.Collections (>= 4.3) - System.Diagnostics.Debug (>= 4.3) - System.IO (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Runtime.Handles (>= 4.3) - System.Runtime.InteropServices (>= 4.3) - System.Text.Encoding (>= 4.3) - System.Threading (>= 4.3) - System.Threading.Tasks (>= 4.3) - System.IO.FileSystem (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.IO (>= 4.3) - System.IO.FileSystem.Primitives (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Handles (>= 4.3) - System.Text.Encoding (>= 4.3) - System.Threading.Tasks (>= 4.3) - System.IO.FileSystem.Primitives (4.3) - System.Runtime (>= 4.3) - System.Linq (4.3) - System.Collections (>= 4.3) - System.Diagnostics.Debug (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Linq.Expressions (4.3) - System.Collections (>= 4.3) - System.Diagnostics.Debug (>= 4.3) - System.Globalization (>= 4.3) - System.IO (>= 4.3) - System.Linq (>= 4.3) - System.ObjectModel (>= 4.3) - System.Reflection (>= 4.3) - System.Reflection.Emit (>= 4.3) - System.Reflection.Emit.ILGeneration (>= 4.3) - System.Reflection.Emit.Lightweight (>= 4.3) - System.Reflection.Extensions (>= 4.3) - System.Reflection.Primitives (>= 4.3) - System.Reflection.TypeExtensions (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Threading (>= 4.3) System.Memory (4.5.4) System.Buffers (>= 4.5.1) System.Numerics.Vectors (>= 4.4) System.Runtime.CompilerServices.Unsafe (>= 4.5.3) System.Numerics.Vectors (4.5) - System.ObjectModel (4.3) - System.Collections (>= 4.3) - System.Diagnostics.Debug (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Threading (>= 4.3) - System.Reactive (4.4.1) + System.Reactive (5.0) System.Runtime.InteropServices.WindowsRuntime (>= 4.3) System.Threading.Tasks.Extensions (>= 4.5.4) - System.Reflection (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.IO (>= 4.3) - System.Reflection.Primitives (>= 4.3) - System.Runtime (>= 4.3) - System.Reflection.Emit (4.7) - System.Reflection.Emit.ILGeneration (>= 4.7) - System.Reflection.Emit.ILGeneration (4.7) - System.Reflection.Emit.Lightweight (4.7) - System.Reflection.Emit.ILGeneration (>= 4.7) - System.Reflection.Extensions (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Reflection (>= 4.3) - System.Runtime (>= 4.3) - System.Reflection.Metadata (1.8.1) - System.Collections.Immutable (>= 1.7.1) - System.Reflection.Primitives (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Runtime (>= 4.3) - System.Reflection.TypeExtensions (4.7) - System.Resources.Extensions (4.7.1) + System.Reflection.Metadata (5.0) + System.Collections.Immutable (>= 5.0) + System.Resources.Extensions (5.0) System.Memory (>= 4.5.4) - System.Resources.ResourceManager (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Globalization (>= 4.3) - System.Reflection (>= 4.3) - System.Runtime (>= 4.3) System.Runtime (4.3.1) Microsoft.NETCore.Platforms (>= 1.1.1) Microsoft.NETCore.Targets (>= 1.1.3) - System.Runtime.CompilerServices.Unsafe (4.7.1) - System.Runtime.Extensions (4.3.1) - Microsoft.NETCore.Platforms (>= 1.1.1) - Microsoft.NETCore.Targets (>= 1.1.3) - System.Runtime (>= 4.3.1) - System.Runtime.Handles (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Runtime (>= 4.3) - System.Runtime.InteropServices (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Reflection (>= 4.3) - System.Reflection.Primitives (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Handles (>= 4.3) + System.Runtime.CompilerServices.Unsafe (5.0) System.Runtime.InteropServices.WindowsRuntime (4.3) System.Runtime (>= 4.3) - System.Security.AccessControl (4.7) - System.Security.Principal.Windows (>= 4.7) - System.Security.Cryptography.ProtectedData (4.7) - System.Memory (>= 4.5.3) - System.Security.Permissions (4.7) - System.Security.AccessControl (>= 4.7) - System.Security.Principal.Windows (4.7) - System.Text.Encoding (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Runtime (>= 4.3) - System.Text.Encoding.CodePages (4.7.1) - System.Runtime.CompilerServices.Unsafe (>= 4.7.1) - System.Text.Encoding.Extensions (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Runtime (>= 4.3) - System.Text.Encoding (>= 4.3) - System.Threading (4.3) - System.Runtime (>= 4.3) - System.Threading.Tasks (>= 4.3) - System.Threading.Tasks (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Runtime (>= 4.3) - System.Threading.Tasks.Dataflow (4.11.1) + System.Security.AccessControl (5.0) + System.Security.Principal.Windows (>= 5.0) + System.Security.Cryptography.Cng (5.0) + System.Security.Cryptography.Pkcs (5.0.1) + System.Buffers (>= 4.5.1) + System.Formats.Asn1 (>= 5.0) + System.Memory (>= 4.5.4) + System.Security.Cryptography.Cng (>= 5.0) + System.Security.Cryptography.ProtectedData (5.0) + System.Memory (>= 4.5.4) + System.Security.Cryptography.Xml (5.0) + System.Memory (>= 4.5.4) + System.Security.Cryptography.Pkcs (>= 5.0) + System.Security.Permissions (>= 5.0) + System.Security.Permissions (5.0) + System.Security.AccessControl (>= 5.0) + System.Security.Principal.Windows (5.0) + System.Text.Encoding.CodePages (5.0) + System.Runtime.CompilerServices.Unsafe (>= 5.0) + System.Threading.Tasks.Dataflow (5.0) System.Threading.Tasks.Extensions (4.5.4) System.Runtime.CompilerServices.Unsafe (>= 4.5.3) - System.Threading.Thread (4.3) - System.Runtime (>= 4.3) - System.Threading.ThreadPool (4.3) - System.Runtime (>= 4.3) - System.Runtime.Handles (>= 4.3) diff --git a/global.json b/global.json index c6720807..dab0ae93 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "3.1.301", + "version": "5.0.302", "rollForward": "minor" } } \ No newline at end of file diff --git a/paket.dependencies b/paket.dependencies index 3a13c0b4..752edd0c 100644 --- a/paket.dependencies +++ b/paket.dependencies @@ -1,19 +1,19 @@ source http://nuget.org/api/v2 -framework: netstandard2.0, net461, netcoreapp3.1 +framework: netstandard2.0, net461, net5.0 redirects: force nuget YamlDotNet -nuget FSharp.Core 4.3.4 +nuget FSharp.Core 4.7.0 nuget System.Configuration.ConfigurationManager nuget NETStandard.Library.NETFramework github fsprojects/FSharp.TypeProviders.SDK src/ProvidedTypes.fs github fsprojects/FSharp.TypeProviders.SDK src/ProvidedTypes.fsi -github fsprojects/FSharp.TypeProviders.SDK src/ProvidedTypesTesting.fs +github fsprojects/FSharp.TypeProviders.SDK tests/ProvidedTypesTesting.fs group Test - framework: net461, netcoreapp3.1 + framework: net461, net5.0 source https://nuget.org/api/v2 redirects: force diff --git a/paket.lock b/paket.lock index 9127dfc5..751a5aa3 100644 --- a/paket.lock +++ b/paket.lock @@ -1,62 +1,61 @@ REDIRECTS: FORCE -RESTRICTION: || (== net461) (== netcoreapp3.1) (== netstandard2.0) +RESTRICTION: || (== net461) (== net50) (== netstandard2.0) NUGET remote: http://www.nuget.org/api/v2 - FSharp.Core (4.3.4) - Microsoft.NETCore.Platforms (3.1.1) - restriction: || (== net461) (== netcoreapp3.1) (&& (== netstandard2.0) (>= net461)) (&& (== netstandard2.0) (>= netcoreapp2.0)) - Microsoft.Win32.SystemEvents (4.7) - restriction: || (&& (== net461) (>= netcoreapp3.0)) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp3.0)) - Microsoft.NETCore.Platforms (>= 3.1) - restriction: || (&& (== net461) (>= netcoreapp2.0)) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.0)) - NETStandard.Library (2.0.3) - restriction: || (== net461) (&& (== netcoreapp3.1) (>= net461)) (&& (== netstandard2.0) (>= net461)) + FSharp.Core (4.7) + Microsoft.NETCore.Platforms (5.0.2) - restriction: || (== net461) (== net50) (&& (== netstandard2.0) (>= net461)) (&& (== netstandard2.0) (>= netcoreapp2.0)) + Microsoft.Win32.SystemEvents (5.0) - restriction: || (&& (== net461) (>= netcoreapp3.0)) (== net50) (&& (== netstandard2.0) (>= netcoreapp3.0)) + Microsoft.NETCore.Platforms (>= 5.0) - restriction: || (&& (== net461) (>= netcoreapp2.0)) (== net50) (&& (== netstandard2.0) (>= netcoreapp2.0)) + NETStandard.Library (2.0.3) - restriction: || (== net461) (&& (== net50) (>= net461)) (&& (== netstandard2.0) (>= net461)) Microsoft.NETCore.Platforms (>= 1.1) NETStandard.Library.NETFramework (2.0.0-preview2-25405-01) - Microsoft.NETCore.Platforms (>= 2.0.0-preview2-25405-01) - restriction: || (== net461) (&& (== netcoreapp3.1) (>= net461)) (&& (== netstandard2.0) (>= net461)) - NETStandard.Library (>= 2.0.0-preview2-25401-01) - restriction: || (== net461) (&& (== netcoreapp3.1) (>= net461)) (&& (== netstandard2.0) (>= net461)) - System.Buffers (4.5.1) - restriction: || (&& (== net461) (== netcoreapp3.1)) (&& (== netcoreapp3.1) (>= monoandroid)) (&& (== netcoreapp3.1) (>= monotouch)) (&& (== netcoreapp3.1) (>= net461)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (&& (== netcoreapp3.1) (< netstandard1.1)) (&& (== netcoreapp3.1) (< netstandard2.0)) (&& (== netcoreapp3.1) (>= xamarinios)) (&& (== netcoreapp3.1) (>= xamarinmac)) (&& (== netcoreapp3.1) (>= xamarintvos)) (&& (== netcoreapp3.1) (>= xamarinwatchos)) (== netstandard2.0) - System.Configuration.ConfigurationManager (4.7) - System.Security.Cryptography.ProtectedData (>= 4.7) - restriction: || (== netcoreapp3.1) (== netstandard2.0) - System.Security.Permissions (>= 4.7) - System.Drawing.Common (4.7) - restriction: || (&& (== net461) (>= netcoreapp3.0)) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp3.0)) - Microsoft.NETCore.Platforms (>= 3.1) - restriction: || (&& (== net461) (>= netcoreapp2.0)) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.0)) - Microsoft.Win32.SystemEvents (>= 4.7) - restriction: || (&& (== net461) (>= netcoreapp2.0)) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.0)) - System.Memory (4.5.4) - restriction: || (&& (== net461) (== netcoreapp3.1)) (&& (== netcoreapp3.1) (< netcoreapp2.1)) (== netstandard2.0) - System.Buffers (>= 4.5.1) - restriction: || (== net461) (&& (== netcoreapp3.1) (>= monoandroid)) (&& (== netcoreapp3.1) (>= monotouch)) (&& (== netcoreapp3.1) (>= net461)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (&& (== netcoreapp3.1) (< netstandard1.1)) (&& (== netcoreapp3.1) (< netstandard2.0)) (&& (== netcoreapp3.1) (>= xamarinios)) (&& (== netcoreapp3.1) (>= xamarinmac)) (&& (== netcoreapp3.1) (>= xamarintvos)) (&& (== netcoreapp3.1) (>= xamarinwatchos)) (== netstandard2.0) - System.Numerics.Vectors (>= 4.4) - restriction: || (&& (== net461) (< net45) (>= netstandard2.0)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (== netstandard2.0) - System.Runtime.CompilerServices.Unsafe (>= 4.5.3) - restriction: || (== net461) (&& (== netcoreapp3.1) (>= monoandroid)) (&& (== netcoreapp3.1) (>= monotouch)) (&& (== netcoreapp3.1) (>= net461)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (&& (== netcoreapp3.1) (< netcoreapp2.1)) (&& (== netcoreapp3.1) (< netstandard1.1)) (&& (== netcoreapp3.1) (< netstandard2.0)) (&& (== netcoreapp3.1) (>= uap10.1)) (&& (== netcoreapp3.1) (>= xamarinios)) (&& (== netcoreapp3.1) (>= xamarinmac)) (&& (== netcoreapp3.1) (>= xamarintvos)) (&& (== netcoreapp3.1) (>= xamarinwatchos)) (== netstandard2.0) - System.Numerics.Vectors (4.5) - restriction: || (&& (== net461) (== netcoreapp3.1)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (== netstandard2.0) - System.Runtime.CompilerServices.Unsafe (4.7.1) - restriction: || (&& (== net461) (== netcoreapp3.1)) (&& (== netcoreapp3.1) (>= monoandroid)) (&& (== netcoreapp3.1) (>= monotouch)) (&& (== netcoreapp3.1) (>= net461)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (&& (== netcoreapp3.1) (< netcoreapp2.1)) (&& (== netcoreapp3.1) (< netstandard1.1)) (&& (== netcoreapp3.1) (< netstandard2.0)) (&& (== netcoreapp3.1) (>= uap10.1)) (&& (== netcoreapp3.1) (>= xamarinios)) (&& (== netcoreapp3.1) (>= xamarinmac)) (&& (== netcoreapp3.1) (>= xamarintvos)) (&& (== netcoreapp3.1) (>= xamarinwatchos)) (== netstandard2.0) - System.Security.AccessControl (4.7) - Microsoft.NETCore.Platforms (>= 3.1) - restriction: || (&& (== net461) (>= netcoreapp2.0)) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.0)) - System.Security.Principal.Windows (>= 4.7) - System.Security.Cryptography.ProtectedData (4.7) - restriction: || (== netcoreapp3.1) (== netstandard2.0) - System.Memory (>= 4.5.3) - restriction: || (&& (== net461) (< net46) (>= netstandard2.0)) (&& (== netcoreapp3.1) (< netcoreapp2.1)) (== netstandard2.0) - System.Security.Permissions (4.7) - System.Security.AccessControl (>= 4.7) - System.Windows.Extensions (>= 4.7) - restriction: || (&& (== net461) (>= netcoreapp3.0)) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp3.0)) - System.Security.Principal.Windows (4.7) - System.Windows.Extensions (4.7) - restriction: || (&& (== net461) (>= netcoreapp3.0)) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp3.0)) - System.Drawing.Common (>= 4.7) - restriction: || (&& (== net461) (>= netcoreapp3.0)) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp3.0)) - YamlDotNet (8.1.2) + Microsoft.NETCore.Platforms (>= 2.0.0-preview2-25405-01) - restriction: || (== net461) (&& (== net50) (>= net461)) (&& (== netstandard2.0) (>= net461)) + NETStandard.Library (>= 2.0.0-preview2-25401-01) - restriction: || (== net461) (&& (== net50) (>= net461)) (&& (== netstandard2.0) (>= net461)) + System.Buffers (4.5.1) - restriction: || (&& (== net461) (== net50)) (&& (== net50) (>= monotouch)) (&& (== net50) (>= net461)) (&& (== net50) (< netcoreapp2.0)) (&& (== net50) (< netcoreapp2.1) (>= xamarinios)) (&& (== net50) (< netcoreapp2.1) (>= xamarinmac)) (&& (== net50) (< netcoreapp2.1) (>= xamarintvos)) (&& (== net50) (< netcoreapp2.1) (>= xamarinwatchos)) (&& (== net50) (< netstandard1.1)) (&& (== net50) (< netstandard2.0)) (== netstandard2.0) + System.Configuration.ConfigurationManager (5.0) + System.Security.Cryptography.ProtectedData (>= 5.0) - restriction: || (== net50) (== netstandard2.0) + System.Security.Permissions (>= 5.0) + System.Drawing.Common (5.0.2) - restriction: || (&& (== net461) (>= netcoreapp3.0)) (== net50) (&& (== netstandard2.0) (>= netcoreapp3.0)) + Microsoft.Win32.SystemEvents (>= 5.0) - restriction: || (&& (== net461) (>= netcoreapp2.0)) (&& (== net461) (>= netcoreapp3.0)) (== net50) (&& (== netstandard2.0) (>= netcoreapp2.0)) (&& (== netstandard2.0) (>= netcoreapp3.0)) + System.Memory (4.5.4) - restriction: || (&& (== net461) (== net50)) (&& (== net50) (< netcoreapp2.1)) (== netstandard2.0) + System.Buffers (>= 4.5.1) - restriction: || (== net461) (&& (== net50) (>= monotouch)) (&& (== net50) (>= net461)) (&& (== net50) (< netcoreapp2.0)) (&& (== net50) (< netstandard1.1)) (&& (== net50) (< netstandard2.0)) (&& (== net50) (>= xamarinios)) (&& (== net50) (>= xamarinmac)) (&& (== net50) (>= xamarintvos)) (&& (== net50) (>= xamarinwatchos)) (== netstandard2.0) + System.Numerics.Vectors (>= 4.4) - restriction: || (&& (== net461) (< net45) (>= netstandard2.0)) (&& (== net50) (< netcoreapp2.0)) (== netstandard2.0) + System.Runtime.CompilerServices.Unsafe (>= 4.5.3) - restriction: || (== net461) (&& (== net50) (>= monotouch)) (&& (== net50) (>= net461)) (&& (== net50) (< netcoreapp2.0)) (&& (== net50) (< netcoreapp2.1)) (&& (== net50) (< netstandard1.1)) (&& (== net50) (< netstandard2.0)) (&& (== net50) (>= uap10.1)) (&& (== net50) (>= xamarinios)) (&& (== net50) (>= xamarinmac)) (&& (== net50) (>= xamarintvos)) (&& (== net50) (>= xamarinwatchos)) (== netstandard2.0) + System.Numerics.Vectors (4.5) - restriction: || (&& (== net461) (== net50)) (&& (== net50) (< netcoreapp2.0)) (== netstandard2.0) + System.Runtime.CompilerServices.Unsafe (5.0) - restriction: || (&& (== net461) (== net50)) (&& (== net50) (>= monotouch)) (&& (== net50) (>= net461)) (&& (== net50) (< netcoreapp2.0)) (&& (== net50) (< netcoreapp2.1)) (&& (== net50) (< netstandard1.1)) (&& (== net50) (< netstandard2.0)) (&& (== net50) (>= uap10.1)) (== netstandard2.0) + System.Security.AccessControl (5.0) + Microsoft.NETCore.Platforms (>= 5.0) - restriction: || (&& (== net461) (>= netcoreapp2.0)) (== net50) (&& (== netstandard2.0) (>= netcoreapp2.0)) + System.Security.Principal.Windows (>= 5.0) + System.Security.Cryptography.ProtectedData (5.0) - restriction: || (== net50) (== netstandard2.0) + System.Memory (>= 4.5.4) - restriction: || (&& (== net461) (< net46) (>= netstandard2.0)) (&& (== net50) (< netcoreapp2.1)) (== netstandard2.0) + System.Security.Permissions (5.0) + System.Security.AccessControl (>= 5.0) + System.Windows.Extensions (>= 5.0) - restriction: || (&& (== net461) (>= netcoreapp3.0)) (== net50) (&& (== netstandard2.0) (>= netcoreapp3.0)) + System.Security.Principal.Windows (5.0) + System.Windows.Extensions (5.0) - restriction: || (&& (== net461) (>= netcoreapp3.0)) (== net50) (&& (== netstandard2.0) (>= netcoreapp3.0)) + System.Drawing.Common (>= 5.0) - restriction: || (&& (== net461) (>= netcoreapp3.0)) (== net50) (&& (== netstandard2.0) (>= netcoreapp3.0)) + YamlDotNet (11.2.1) GITHUB remote: fsprojects/FSharp.TypeProviders.SDK - src/ProvidedTypes.fs (b45779c1571b54a2bc6bafa12690a8d9763150d1) - src/ProvidedTypes.fsi (b45779c1571b54a2bc6bafa12690a8d9763150d1) - src/ProvidedTypesTesting.fs (b45779c1571b54a2bc6bafa12690a8d9763150d1) + src/ProvidedTypes.fs (f4aca36af04aa84b16ec04df6f6bf55ac2f17a73) + src/ProvidedTypes.fsi (f4aca36af04aa84b16ec04df6f6bf55ac2f17a73) + tests/ProvidedTypesTesting.fs (f4aca36af04aa84b16ec04df6f6bf55ac2f17a73) GROUP Test REDIRECTS: FORCE -RESTRICTION: || (== net461) (== netcoreapp3.1) +RESTRICTION: || (== net461) (== net50) NUGET remote: https://www.nuget.org/api/v2 Expecto (9.0.2) FSharp.Core (>= 4.6) Mono.Cecil (>= 0.11.2) - FSharp.Core (4.7.2) - redirects: force - Mono.Cecil (0.11.2) - System.Buffers (4.5.1) - restriction: || (== net461) (&& (== netcoreapp3.1) (>= monoandroid)) (&& (== netcoreapp3.1) (>= monotouch)) (&& (== netcoreapp3.1) (>= net461)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (&& (== netcoreapp3.1) (< netstandard1.1)) (&& (== netcoreapp3.1) (< netstandard2.0)) (&& (== netcoreapp3.1) (>= xamarinios)) (&& (== netcoreapp3.1) (>= xamarinmac)) (&& (== netcoreapp3.1) (>= xamarintvos)) (&& (== netcoreapp3.1) (>= xamarinwatchos)) - System.Memory (4.5.4) - restriction: || (== net461) (&& (== netcoreapp3.1) (>= net461)) (&& (== netcoreapp3.1) (< netcoreapp2.1)) - System.Buffers (>= 4.5.1) - restriction: || (== net461) (&& (== netcoreapp3.1) (>= monoandroid)) (&& (== netcoreapp3.1) (>= monotouch)) (&& (== netcoreapp3.1) (>= net461)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (&& (== netcoreapp3.1) (< netstandard1.1)) (&& (== netcoreapp3.1) (< netstandard2.0)) (&& (== netcoreapp3.1) (>= xamarinios)) (&& (== netcoreapp3.1) (>= xamarinmac)) (&& (== netcoreapp3.1) (>= xamarintvos)) (&& (== netcoreapp3.1) (>= xamarinwatchos)) - System.Numerics.Vectors (>= 4.5) - restriction: || (== net461) (&& (== netcoreapp3.1) (>= net461)) - System.Runtime.CompilerServices.Unsafe (>= 4.5.3) - restriction: || (== net461) (&& (== netcoreapp3.1) (>= monoandroid)) (&& (== netcoreapp3.1) (>= monotouch)) (&& (== netcoreapp3.1) (>= net461)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (&& (== netcoreapp3.1) (< netcoreapp2.1)) (&& (== netcoreapp3.1) (< netstandard1.1)) (&& (== netcoreapp3.1) (< netstandard2.0)) (&& (== netcoreapp3.1) (>= uap10.1)) (&& (== netcoreapp3.1) (>= xamarinios)) (&& (== netcoreapp3.1) (>= xamarinmac)) (&& (== netcoreapp3.1) (>= xamarintvos)) (&& (== netcoreapp3.1) (>= xamarinwatchos)) - System.Numerics.Vectors (4.5) - restriction: || (== net461) (&& (== netcoreapp3.1) (>= net461)) - System.Resources.Extensions (4.7.1) - System.Memory (>= 4.5.4) - restriction: || (== net461) (&& (== netcoreapp3.1) (>= net461)) (&& (== netcoreapp3.1) (< netcoreapp2.1)) - System.Runtime.CompilerServices.Unsafe (4.7.1) - restriction: || (== net461) (&& (== netcoreapp3.1) (>= monoandroid)) (&& (== netcoreapp3.1) (>= monotouch)) (&& (== netcoreapp3.1) (>= net461)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (&& (== netcoreapp3.1) (< netcoreapp2.1)) (&& (== netcoreapp3.1) (< netstandard1.1)) (&& (== netcoreapp3.1) (< netstandard2.0)) (&& (== netcoreapp3.1) (>= uap10.1)) (&& (== netcoreapp3.1) (>= xamarinios)) (&& (== netcoreapp3.1) (>= xamarinmac)) (&& (== netcoreapp3.1) (>= xamarintvos)) (&& (== netcoreapp3.1) (>= xamarinwatchos)) + FSharp.Core (5.0.2) - redirects: force + Mono.Cecil (0.11.4) + System.Buffers (4.5.1) - restriction: || (== net461) (&& (== net50) (>= monotouch)) (&& (== net50) (>= net461)) (&& (== net50) (< netcoreapp2.0)) (&& (== net50) (< netcoreapp2.1) (>= xamarinios)) (&& (== net50) (< netcoreapp2.1) (>= xamarinmac)) (&& (== net50) (< netcoreapp2.1) (>= xamarintvos)) (&& (== net50) (< netcoreapp2.1) (>= xamarinwatchos)) (&& (== net50) (< netstandard1.1)) (&& (== net50) (< netstandard2.0)) + System.Memory (4.5.4) - restriction: || (== net461) (&& (== net50) (>= net461)) (&& (== net50) (< netcoreapp2.1)) + System.Buffers (>= 4.5.1) - restriction: || (== net461) (&& (== net50) (>= monotouch)) (&& (== net50) (>= net461)) (&& (== net50) (< netcoreapp2.0)) (&& (== net50) (< netstandard1.1)) (&& (== net50) (< netstandard2.0)) (&& (== net50) (>= xamarinios)) (&& (== net50) (>= xamarinmac)) (&& (== net50) (>= xamarintvos)) (&& (== net50) (>= xamarinwatchos)) + System.Numerics.Vectors (>= 4.5) - restriction: || (== net461) (&& (== net50) (>= net461)) + System.Runtime.CompilerServices.Unsafe (>= 4.5.3) - restriction: || (== net461) (&& (== net50) (>= monotouch)) (&& (== net50) (>= net461)) (&& (== net50) (< netcoreapp2.0)) (&& (== net50) (< netcoreapp2.1)) (&& (== net50) (< netstandard1.1)) (&& (== net50) (< netstandard2.0)) (&& (== net50) (>= uap10.1)) (&& (== net50) (>= xamarinios)) (&& (== net50) (>= xamarinmac)) (&& (== net50) (>= xamarintvos)) (&& (== net50) (>= xamarinwatchos)) + System.Numerics.Vectors (4.5) - restriction: || (== net461) (&& (== net50) (>= net461)) + System.Resources.Extensions (5.0) + System.Memory (>= 4.5.4) - restriction: || (== net461) (&& (== net50) (>= net461)) (&& (== net50) (< netcoreapp2.1)) + System.Runtime.CompilerServices.Unsafe (5.0) - restriction: || (== net461) (&& (== net50) (>= monotouch)) (&& (== net50) (>= net461)) (&& (== net50) (< netcoreapp2.0)) (&& (== net50) (< netcoreapp2.1)) (&& (== net50) (< netstandard1.1)) (&& (== net50) (< netstandard2.0)) (&& (== net50) (>= uap10.1)) diff --git a/src/FSharp.Configuration.DesignTime/FSharp.Configuration.DesignTime.fsproj b/src/FSharp.Configuration.DesignTime/FSharp.Configuration.DesignTime.fsproj index 3a2a470a..eef4c093 100644 --- a/src/FSharp.Configuration.DesignTime/FSharp.Configuration.DesignTime.fsproj +++ b/src/FSharp.Configuration.DesignTime/FSharp.Configuration.DesignTime.fsproj @@ -3,7 +3,7 @@ Library - netstandard2.0;netcoreapp3.1;net461 + netstandard2.0;net461 true true true diff --git a/src/FSharp.Configuration.DesignTime/IniFileProvider.fs b/src/FSharp.Configuration.DesignTime/IniFileProvider.fs index 2ba5c360..0f1b805c 100644 --- a/src/FSharp.Configuration.DesignTime/IniFileProvider.fs +++ b/src/FSharp.Configuration.DesignTime/IniFileProvider.fs @@ -32,25 +32,25 @@ let internal typedIniFile (context: Context) = match Ini.getValue filePath sectionName key with | Some v -> Int32.Parse v | None -> value - @@>) + @@>) | ValueParser.Bool value -> ProvidedProperty(key, typeof, isStatic = true, getterCode = fun _ -> <@@ match Ini.getValue filePath sectionName key with | Some v -> Boolean.Parse v | None -> value - @@>) + @@>) | ValueParser.Float value -> ProvidedProperty(key, typeof, isStatic = true, getterCode = fun _ -> <@@ match Ini.getValue filePath sectionName key with | Some v -> Double.Parse (v, NumberStyles.Any, CultureInfo.InvariantCulture) | None -> value - @@>) + @@>) | value -> ProvidedProperty(key, typeof, isStatic = true, getterCode = fun _ -> <@@ match Ini.getValue filePath sectionName key with | Some v -> v | None -> value - @@>) + @@>) prop.AddXmlDoc (sprintf "Returns the value from %s from section %s with key %s" iniFileName section.Name setting.Key) prop.AddDefinitionLocation(1, 1, filePath) diff --git a/src/FSharp.Configuration.Runtime/FSharp.Configuration.Runtime.fsproj b/src/FSharp.Configuration.Runtime/FSharp.Configuration.Runtime.fsproj index bfe09394..85f4555b 100644 --- a/src/FSharp.Configuration.Runtime/FSharp.Configuration.Runtime.fsproj +++ b/src/FSharp.Configuration.Runtime/FSharp.Configuration.Runtime.fsproj @@ -40,15 +40,10 @@ - - - - - diff --git a/src/FSharp.Configuration.Runtime/IniFileProvider.Runtime.fs b/src/FSharp.Configuration.Runtime/IniFileProvider.Runtime.fs index cae51242..ecb4ab87 100644 --- a/src/FSharp.Configuration.Runtime/IniFileProvider.Runtime.fs +++ b/src/FSharp.Configuration.Runtime/IniFileProvider.Runtime.fs @@ -65,8 +65,8 @@ module Parser = | Sections (sections, _) -> Choice1Of2 sections | e -> Choice2Of2 e -let getValue (iniFileName: string) (section: string) (key: string) = - match Parser.parse (Path.GetFileName iniFileName) with +let getValue (iniFilePath: string) (section: string) (key: string) = + match Parser.parse iniFilePath with | Choice1Of2 sections -> maybe { let! section = sections |> List.tryFind (fun s -> s.Name = section) diff --git a/src/FSharp.Configuration.Runtime/YamlConfigProvider.Runtime.fs b/src/FSharp.Configuration.Runtime/YamlConfigProvider.Runtime.fs index 51570244..a708e6a0 100644 --- a/src/FSharp.Configuration.Runtime/YamlConfigProvider.Runtime.fs +++ b/src/FSharp.Configuration.Runtime/YamlConfigProvider.Runtime.fs @@ -5,6 +5,7 @@ open System open System.IO open System.Collections.Generic +open YamlDotNet.Core open YamlDotNet.Serialization open FSharp.Configuration @@ -273,7 +274,7 @@ type Root (inferTypesFromStrings: bool) = match value with | :? TimeSpan as ts -> let formattedValue = ts.ToString("G") - emitter.Emit(YamlDotNet.Core.Events.Scalar(null, formattedValue)); + emitter.Emit(YamlDotNet.Core.Events.Scalar(TagName(), formattedValue)); | _ -> failwithf "Expected TimeSpan but received %A" value }) .Build() diff --git a/src/FSharp.Configuration.Runtime/paket.template b/src/FSharp.Configuration.Runtime/paket.template index 1cb625c2..d88df85d 100644 --- a/src/FSharp.Configuration.Runtime/paket.template +++ b/src/FSharp.Configuration.Runtime/paket.template @@ -24,7 +24,6 @@ files bin/Release/net461/FSharp.Configuration.Runtime.* ==> lib/net461 bin/Release/netstandard2.0/FSharp.Configuration.Runtime.* ==> lib/netstandard2.0 bin/Release/typeproviders/fsharp41/netstandard2.0/*.dll ==> typeproviders/fsharp41/netstandard2.0 - bin/Release/typeproviders/fsharp41/netcoreapp3.1/*.dll ==> typeproviders/fsharp41/netcoreapp3.1 bin/Release/typeproviders/fsharp41/net461/*.dll ==> typeproviders/fsharp41/net461 references FSharp.Configuration.Runtime.dll @@ -33,7 +32,7 @@ dependencies # put any package references here # Some.Package -# framework: netcoreapp3.1 +# framework: net5.0 # System.Text.Encoding.CodePages >= LOCKEDVERSION # framework: netstandard2.0 # System.Text.Encoding.CodePages >= LOCKEDVERSION diff --git a/src/FSharp.Configuration/FSharp.Configuration.fsproj b/src/FSharp.Configuration/FSharp.Configuration.fsproj index 9dceb8bc..f8c37183 100644 --- a/src/FSharp.Configuration/FSharp.Configuration.fsproj +++ b/src/FSharp.Configuration/FSharp.Configuration.fsproj @@ -4,9 +4,9 @@ netstandard2.0;net461 FSharp.Configuration - true - PackageReference - true + true + PackageReference + true NET461 @@ -15,7 +15,11 @@ - + + + True + ProvidedTypesTesting.fs + True ProvidedTypes.fsi @@ -24,10 +28,6 @@ True ProvidedTypes.fs - - True - ProvidedTypesTesting.fs - @@ -37,9 +37,8 @@ - PreserveNewest + PreserveNewest - \ No newline at end of file diff --git a/tests/FSharp.Configuration.Tests/AppSettingsProvider.Tests.fs b/tests/FSharp.Configuration.Tests/AppSettingsProvider.Tests.fs index 262834c5..00d86f1c 100644 --- a/tests/FSharp.Configuration.Tests/AppSettingsProvider.Tests.fs +++ b/tests/FSharp.Configuration.Tests/AppSettingsProvider.Tests.fs @@ -23,17 +23,17 @@ let [] tests = testCase "Can read multiple connection strings from the config file" (fun _ -> Expect.notEqual Settings.ConnectionStrings.Test1 Settings.ConnectionStrings.Test2 "value") ] -[] -let fakeConfig = __SOURCE_DIRECTORY__ + @"/../../packages/build/FAKE/tools/FAKE.Deploy.exe.config" -type FakeSettings = AppSettings +// [] +// let fakeConfig = __SOURCE_DIRECTORY__ + @"/../../packages/build/FAKE/tools/FAKE.Deploy.exe.config" +// type FakeSettings = AppSettings -let [] test = - testCase "Can read different configuration file" (fun _ -> - [| __SOURCE_DIRECTORY__; ".."; ".."; "packages"; "build"; "FAKE"; "tools"; "FAKE.Deploy.exe" |] - |> System.IO.Path.Combine |> System.IO.Path.GetFullPath - |> FakeSettings.SelectExecutableFile +// let [] test = +// testCase "Can read different configuration file" (fun _ -> +// [| __SOURCE_DIRECTORY__; ".."; ".."; "packages"; "build"; "FAKE"; "tools"; "FAKE.Deploy.exe" |] +// |> System.IO.Path.Combine |> System.IO.Path.GetFullPath +// |> FakeSettings.SelectExecutableFile - #if INTERACTIVE //Travis can't handle fakeConfig-directory - FakeSettings.ServerName =! "localhost" - #endif - ) +// #if INTERACTIVE //Travis can't handle fakeConfig-directory +// FakeSettings.ServerName =! "localhost" +// #endif +// ) diff --git a/tests/FSharp.Configuration.Tests/FSharp.Configuration.Tests.fsproj b/tests/FSharp.Configuration.Tests/FSharp.Configuration.Tests.fsproj index b8ca48c7..882884a4 100644 --- a/tests/FSharp.Configuration.Tests/FSharp.Configuration.Tests.fsproj +++ b/tests/FSharp.Configuration.Tests/FSharp.Configuration.Tests.fsproj @@ -4,7 +4,7 @@ Exe - netcoreapp3.1;net461 + net5.0;net461 FSharp.Configuration.Tests true true @@ -53,7 +53,7 @@ ..\..\bin\lib\net461\YamlDotNet.dll - + ..\..\bin\lib\netstandard2.0\FSharp.Configuration.dll diff --git a/tests/FSharp.Configuration.Tests/YamlProvider.Tests.fs b/tests/FSharp.Configuration.Tests/YamlProvider.Tests.fs index 73334902..64b4570c 100644 --- a/tests/FSharp.Configuration.Tests/YamlProvider.Tests.fs +++ b/tests/FSharp.Configuration.Tests/YamlProvider.Tests.fs @@ -16,6 +16,9 @@ type private Listener(event: IEvent) = do event.Add (fun _ -> incr events) member __.Events = !events +let private getPath fileName = + Path.Combine(__SOURCE_DIRECTORY__, fileName) + let [] tests = testList "Yaml Config Provider tests" [ testCase "Can return a string from the settings file" (fun _ -> @@ -78,19 +81,20 @@ let [] tests = settings.DB.NumberOfDeadlockRepeats <- 11 settings.DB.DefaultTimeout <- System.TimeSpan.FromMinutes 6. settings.JustStuff.SomeDoubleValue <- 0.5 - settings.Save "SettingsModifed.yaml" - assertFilesAreEqual "SettingsModifed.yaml" "Settings2.yaml") + let tempFile = Path.GetTempFileName() + settings.Save tempFile + assertFilesAreEqual tempFile (getPath "Settings2.yaml")) testCase "Can save settings to the file it was loaded from last time" (fun _ -> let settings = Settings() let tempFile = Path.GetTempFileName() try - File.Copy ("Settings.yaml", tempFile, overwrite=true) + File.Copy (getPath "Settings.yaml", tempFile, overwrite=true) settings.Load tempFile settings.DB.NumberOfDeadlockRepeats <- 11 settings.DB.DefaultTimeout <- System.TimeSpan.FromMinutes 6. settings.Save() - assertFilesAreEqual tempFile "Settings2.yaml" + assertFilesAreEqual tempFile (getPath "Settings2.yaml") finally File.Delete tempFile) testCase "Throws exception during saving if it was not loaded from a file and location is not specified" (fun _ -> @@ -184,7 +188,7 @@ let [] tests = let settings = Settings() let tempFile = Path.GetTempFileName() try - File.Copy ("Settings.yaml", tempFile, overwrite = true) + File.Copy (getPath "Settings.yaml", tempFile, overwrite = true) settings.LoadAndWatch tempFile |> ignore finally File.Delete tempFile) @@ -195,7 +199,7 @@ let [] tests = let mutable err = false settings.Error.Add(fun _ -> err <- true) try - File.Copy ("Settings.yaml", tempFile, overwrite=true) + File.Copy (getPath "Settings.yaml", tempFile, overwrite=true) use __ = settings.LoadAndWatch tempFile System.Threading.Thread.Sleep(800) let f = new FileStream(tempFile, FileMode.Append) diff --git a/tests/FSharp.Configuration.Tests/app.config b/tests/FSharp.Configuration.Tests/app.config index b7d5ffe4..10a2eed9 100644 --- a/tests/FSharp.Configuration.Tests/app.config +++ b/tests/FSharp.Configuration.Tests/app.config @@ -19,40 +19,10 @@ - - True - - - - - True - - - - - True - - - - - True - - - - - True - - - - - True - - - True - + True @@ -62,7 +32,7 @@ True - + True @@ -77,56 +47,56 @@ True - + True - + True - + True - + True - + True - + True - + True - + True - + True - + True - + \ No newline at end of file From 1c0cb82e87c1d74a566ea386f4b8eba5727419f7 Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Mon, 9 Aug 2021 16:06:08 +0200 Subject: [PATCH 37/41] feat: paket 6.0 --- .config/dotnet-tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 4a74930b..4f05b376 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "paket": { - "version": "5.258.1", + "version": "6.0.0", "commands": [ "paket" ] From f5201dd84aad99e8a10d1d67121154c21e9fc2fa Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Mon, 9 Aug 2021 16:16:21 +0200 Subject: [PATCH 38/41] feat: release --- RELEASE_NOTES.md | 13 +++++-------- build.fsx | 3 +-- build.fsx.lock | 2 +- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index c0ab845c..a526b790 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,13 +1,10 @@ -#### 2.0.0-alpha3 - 15.12.2020 -* Targets net461 instead of net45 -* Dependencies update - -#### 2.0.0-alpha2 - 16.06.2018 +#### 2.0.0-beta1 - 09.08.2021 * Migration to project system -* YamlConfigTypeProvider targets net45 and netstandard2.0 * Migration from SharpYaml to YamlDotNet -* IniFileProvider targets net45 and netstandard2.0 -* AppSettingsProvider targets net45 and netstandard2.0 +* YamlConfigTypeProvider targets net461 and netstandard2.0 +* IniFileProvider targets net461 and netstandard2.0 +* AppSettingsProvider targets net461 and netstandard2.0 +* Dependencies update #### 1.5.0 - 15.06.2018 * Tweak INI File Parser to allow semicolon characters inside string values (thanks [@zakakula](https://github.com/zakaluka)!). diff --git a/build.fsx b/build.fsx index 34000a7d..002ad309 100644 --- a/build.fsx +++ b/build.fsx @@ -70,7 +70,6 @@ let gitName = "FSharp.Configuration" // -------------------------------------------------------------------------------------- let buildDir = "bin" -let nugetDir = "./nuget/" // Read additional information from the release notes document @@ -110,7 +109,7 @@ Target.create "AssemblyInfo" (fun _ -> // Clean build results & restore NuGet packages Target.create "Clean" (fun _ -> - Shell.cleanDirs [buildDir; "temp"; nugetDir] + Shell.cleanDirs [buildDir] ) Target.create "CleanDocs" (fun _ -> diff --git a/build.fsx.lock b/build.fsx.lock index b13b0930..dd94eac9 100644 --- a/build.fsx.lock +++ b/build.fsx.lock @@ -134,7 +134,7 @@ NUGET FSharp.Control.Reactive (5.0.2) FSharp.Core (>= 4.7.2) System.Reactive (>= 5.0) - FSharp.Core (5.0.2) + FSharp.Core (4.7.2) Microsoft.Build (16.10) Microsoft.Build.Framework (16.10) System.Security.Permissions (>= 4.7) From 0a7cfb7e394dfacc26d765bfb3cc4f2b91e9052d Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Mon, 9 Aug 2021 16:33:52 +0200 Subject: [PATCH 39/41] fix: links --- src/FSharp.Configuration.Runtime/paket.template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/FSharp.Configuration.Runtime/paket.template b/src/FSharp.Configuration.Runtime/paket.template index 39a42c50..c0ad1b6d 100644 --- a/src/FSharp.Configuration.Runtime/paket.template +++ b/src/FSharp.Configuration.Runtime/paket.template @@ -7,11 +7,11 @@ authors owners Steffen Forkmann; Sergey Tihon; Daniel Mohl; Tomas Petricek; Ryan Riley; Mauricio Scheffer; Phil Trelford; Vasily Kirichenko; Reed Copsey, Jr. projectUrl - http://fsprojects.github.com/FSharp.Configuration + https://fsprojects.github.io/FSharp.Configuration/ iconUrl https://raw.githubusercontent.com/fsprojects/FSharp.Configuration/master/docs/files/img/logo.png licenseUrl - http://github.com/fsprojects/FSharp.Configuration/blob/master/LICENSE.txt + https://github.com/fsprojects/FSharp.Configuration/blob/master/LICENSE.txt requireLicenseAcceptance false copyright From 3066923764987bf047157108617b974f4b087539 Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Mon, 9 Aug 2021 20:55:31 +0200 Subject: [PATCH 40/41] fix: readme --- README.md | 28 +++++++++------------------- 1 file changed, 9 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 7647e18c..3b643bd8 100644 --- a/README.md +++ b/README.md @@ -1,31 +1,21 @@ -[![Issue Stats](http://issuestats.com/github/fsprojects/FSharp.Configuration/badge/issue)](http://issuestats.com/github/fsprojects/FSharp.Configuration) -[![Issue Stats](http://issuestats.com/github/fsprojects/FSharp.Configuration/badge/pr)](http://issuestats.com/github/fsprojects/FSharp.Configuration) - FSharp.Configuration -=========================== - -The FSharp.Configuration project contains type providers for the configuration of .NET projects. +==================== -* [AppSettings](http://fsprojects.github.io/FSharp.Configuration/AppSettingsProvider.html) -* [ResX](http://fsprojects.github.io/FSharp.Configuration/ResXProvider.html) -* [Yaml](http://fsprojects.github.io/FSharp.Configuration/YamlConfigProvider.html) -* [Ini](http://fsprojects.github.io/FSharp.Configuration/IniTypeProvider.html) +[![NuGet Badge](https://buildstats.info/nuget/FSharp.Configuration)](https://www.nuget.org/packages/FSharp.Configuration) +[![Build Status](https://github.com/fsprojects/FSharp.Configuration/workflows/Build%20and%20Test/badge.svg?branch=master)](https://github.com/fsprojects/FSharp.Configuration/actions?query=branch%3Amaster) -Documentation available here. - -## Build status +The FSharp.Configuration project contains type providers for the configuration of .NET projects. -| | BuildScript | Status of last build | -| :------ | :------: | :------: | -| **Mono** | [build.sh](https://github.com/fsprojects/FSharp.Configuration/blob/master/build.sh) | [![Travis build status](https://travis-ci.org/fsprojects/FSharp.Configuration.png)](https://travis-ci.org/fsprojects/FSharp.Configuration) | -| **Windows** | [build.cmd](https://github.com/fsprojects/FSharp.Configuration/blob/master/build.cmd) | [![AppVeyor Build status](https://ci.appveyor.com/api/projects/status/eljpus4w1t7b0jic)](https://ci.appveyor.com/project/vasily-kirichenko/fsharp-configuration) | +* [AppSettings](https://fsprojects.github.io/FSharp.Configuration/AppSettingsProvider.html) +* [ResX](https://fsprojects.github.io/FSharp.Configuration/ResXProvider.html) +* [Yaml](https://fsprojects.github.io/FSharp.Configuration/YamlConfigProvider.html) +* [Ini](https://fsprojects.github.io/FSharp.Configuration/IniTypeProvider.html) -[![NuGet Status](http://img.shields.io/nuget/v/FSharp.Configuration.svg?style=flat)](https://www.nuget.org/packages/FSharp.Configuration/) +Documentation available here. ## Testing * Start FSharp.Configuration.sln and configure the project's debug mode to run `[YOURPATH]\FSharp.Configuration\FSharp.Configuration.Tests.sln` with `C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe`. - ## Maintainer(s) From 16faf70c0760bcc97737e5273e1edd4768b4fba5 Mon Sep 17 00:00:00 2001 From: Sergey Tihon Date: Mon, 9 Aug 2021 21:41:34 +0200 Subject: [PATCH 41/41] release --- RELEASE_NOTES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 50bf0973..bc2ab051 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,4 +1,4 @@ -#### 2.0.0-beta2 - 09.08.2021 +#### 2.0.0 - 09.08.2021 * Migration to project system * Migration from SharpYaml to YamlDotNet * YamlConfigTypeProvider targets net461 and netstandard2.0