diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index bbc5b59a6..9e8e10499 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,13 +3,13 @@ "isRoot": true, "tools": { "fake-cli": { - "version": "5.19.1", + "version": "5.20.4-alpha.1642", "commands": [ "fake" ] }, "paket": { - "version": "5.243.0", + "version": "5.252.0", "commands": [ "paket" ] @@ -27,4 +27,4 @@ ] } } -} +} \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 33ff2a036..a6b964c28 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: .NET Core 3.1 +name: .NET 5.0 on: [push, pull_request] @@ -8,12 +8,16 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest, macOS-latest] - dotnet: [3.1.200] + dotnet: [5.0.100] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v1 - - name: Setup .NET Core + - name: Setup .Net Core + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '3.1.x' + - name: Setup .NET 5 uses: actions/setup-dotnet@v1 with: dotnet-version: ${{ matrix.dotnet }} diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index fcf8f19f9..4ee363003 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -11,15 +11,19 @@ jobs: strategy: matrix: os: [windows-latest] - dotnet: [3.1.200] + dotnet: [5.0.100] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 - - name: Setup .NET Core + - name: Setup .Net Core uses: actions/setup-dotnet@v1 with: - dotnet-version: 3.1.200 + dotnet-version: '3.1.x' + - name: Setup .NET 5 + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 5.0.100 - name: Restore tools run: dotnet tool restore - name: Restore dependencies diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index dacf1320c..d402a2a37 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -11,12 +11,16 @@ jobs: strategy: matrix: os: [windows-latest] - dotnet: [3.1.200] + dotnet: [5.0.100] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v1 - - name: Setup .NET Core + - name: Setup .Net Core + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '3.1.x' + - name: Setup .NET 5 uses: actions/setup-dotnet@v1 with: dotnet-version: ${{ matrix.dotnet }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 828f6a9fd..15e5b5187 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +- Update to FCS 38 +- Update to .Net 5 ## [0.16.5] - 2020-06-26 - Update navigation in docs. diff --git a/build.fsx b/build.fsx index d0bb49fa0..08874550f 100644 --- a/build.fsx +++ b/build.fsx @@ -13,6 +13,8 @@ open Fake.IO.Globbing.Operators open Fake.Core.TargetOperators open Fake.Api +Target.initEnvironment() + // -------------------------------------------------------------------------------------- // Information about the project to be used at NuGet and in AssemblyInfo files // -------------------------------------------------------------------------------------- @@ -37,14 +39,20 @@ let nugetDir = "./out/" System.Environment.CurrentDirectory <- __SOURCE_DIRECTORY__ let changelogFilename = "CHANGELOG.md" let changelog = Changelog.load changelogFilename -let latestEntry = changelog.LatestEntry - -let nugetVersion = latestEntry.NuGetVersion -let packageReleaseNotes = sprintf "%s/blob/v%s/CHANGELOG.md" gitUrl latestEntry.NuGetVersion -let releaseNotes = - latestEntry.Changes - |> List.map (fun c -> " * " + c.ToString()) - |> String.concat "\n" +let nugetVersion = + match changelog.Unreleased with + | None -> + changelog.LatestEntry.NuGetVersion + | Some _unreleased -> + let current = changelog.LatestEntry.NuGetVersion |> SemVer.parse + let bumped = { current with + Minor = current.Minor + 1u + Patch = 0u + Original = None + PreRelease = PreRelease.TryParse "alpha01" } + string bumped + +let packageReleaseNotes = sprintf "%s/blob/v%s/CHANGELOG.md" gitUrl nugetVersion // -------------------------------------------------------------------------------------- // Helpers @@ -149,4 +157,4 @@ Target.create "Release" DoNothing ==> "Push" ==> "Release" -Target.runOrDefault "Default" +Target.runOrDefaultWithArguments "Default" diff --git a/global.json b/global.json index cc4d115ea..2cb2ac9bd 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "sdk": { - "version": "3.1.200" + "version": "5.0.100" } } \ No newline at end of file diff --git a/paket.dependencies b/paket.dependencies index 699d7ea4c..4cd4b07ea 100644 --- a/paket.dependencies +++ b/paket.dependencies @@ -1,20 +1,21 @@ source https://api.nuget.org/v3/index.json -framework: netstandard2.0, netcoreapp3.1, netcoreapp2.1 + +framework: netstandard2.0, net5.0 storage: none nuget Argu nuget BenchmarkDotNet nuget BenchmarkDotNet.Diagnostics.Windows nuget FParsec -nuget FSharp.Compiler.Service ~> 36.0 +nuget FSharp.Compiler.Service ~> 38.0 nuget Dotnet.ProjInfo.Workspace ~> 0.41.0 nuget Dotnet.ProjInfo.Workspace.FCS ~> 0.41.0 -nuget FSharp.Core ~> 4.6.2 +nuget FSharp.Core nuget nunit nuget NUnit3TestAdapter nuget Microsoft.NET.Test.Sdk nuget Newtonsoft.Json - +nuget Microsoft.Build.Utilities.Core 16.7 group Docs source https://api.nuget.org/v3/index.json diff --git a/paket.lock b/paket.lock index 83e3bcf6c..9102bce6b 100644 --- a/paket.lock +++ b/paket.lock @@ -1,8 +1,8 @@ STORAGE: NONE -RESTRICTION: || (== netcoreapp2.1) (== netcoreapp3.1) (== netstandard2.0) +RESTRICTION: || (== net5.0) (== netstandard2.0) NUGET remote: https://api.nuget.org/v3/index.json - Argu (6.0) + Argu (6.1.1) FSharp.Core (>= 4.3.2) System.Configuration.ConfigurationManager (>= 4.4) BenchmarkDotNet (0.12.1) @@ -26,33 +26,34 @@ NUGET BenchmarkDotNet (>= 0.12.1) Microsoft.Diagnostics.Tracing.TraceEvent (>= 2.0.49) CommandLineParser (2.8) - Dotnet.ProjInfo (0.41) + Dotnet.ProjInfo (0.44) FSharp.Core (>= 4.6.2) Microsoft.NETFramework.ReferenceAssemblies (>= 1.0) System.ValueTuple (>= 4.4) - Dotnet.ProjInfo.Workspace (0.41) - Dotnet.ProjInfo (>= 0.41) + Dotnet.ProjInfo.Workspace (0.41.1) + Dotnet.ProjInfo (>= 0.41.1) FSharp.Core (>= 4.6.2) Microsoft.NETFramework.ReferenceAssemblies (>= 1.0) Sln (>= 0.3) - Dotnet.ProjInfo.Workspace.FCS (0.41) - Dotnet.ProjInfo.Workspace (>= 0.41) + Dotnet.ProjInfo.Workspace.FCS (0.41.1) + Dotnet.ProjInfo.Workspace (>= 0.41.1) FSharp.Compiler.Service (>= 35.0) FSharp.Core (>= 4.6.2) Microsoft.NETFramework.ReferenceAssemblies (>= 1.0) FParsec (1.1.1) FSharp.Core (>= 4.3.4) - FSharp.Compiler.Service (36.0.1) - FSharp.Core (>= 4.6.2) - System.Buffers (>= 4.5) - System.Collections.Immutable (>= 1.5) - System.Memory (>= 4.5.3) - System.Reflection.Emit (>= 4.3) - System.Reflection.Metadata (>= 1.6) - System.Reflection.TypeExtensions (>= 4.3) - System.Runtime.Loader (>= 4.0) - FSharp.Core (4.6.2) + FSharp.Compiler.Service (38.0) + FSharp.Core (5.0) + FSharp.Core (5.0) Iced (1.6) + Microsoft.Build.Framework (16.7) + System.Security.Permissions (>= 4.7) + Microsoft.Build.Utilities.Core (16.7) + Microsoft.Build.Framework (>= 16.7) + Microsoft.Win32.Registry (>= 4.3) + System.Collections.Immutable (>= 1.5) + System.Security.Permissions (>= 4.7) + System.Text.Encoding.CodePages (>= 4.0.1) Microsoft.CodeAnalysis.Analyzers (3.0) Microsoft.CodeAnalysis.Common (3.5) Microsoft.CodeAnalysis.Analyzers (>= 3.0.0-beta2.20059.3) @@ -64,12 +65,12 @@ NUGET System.Threading.Tasks.Extensions (>= 4.5.3) Microsoft.CodeAnalysis.CSharp (3.5) Microsoft.CodeAnalysis.Common (3.5) - Microsoft.CodeCoverage (16.5) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= net45)) (&& (== netstandard2.0) (>= netcoreapp2.1)) + Microsoft.CodeCoverage (16.8) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= net45)) (&& (== netstandard2.0) (>= netcoreapp2.1)) Microsoft.Diagnostics.NETCore.Client (0.2.61701) Microsoft.Diagnostics.Runtime (1.1.122004) Microsoft.Diagnostics.Tracing.TraceEvent (2.0.55) System.Runtime.CompilerServices.Unsafe (>= 4.5.2) - Microsoft.DotNet.InternalAbstractions (1.0) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.1)) + Microsoft.DotNet.InternalAbstractions (1.0) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1)) System.AppContext (>= 4.1) System.Collections (>= 4.0.11) System.IO (>= 4.1) @@ -79,68 +80,68 @@ NUGET System.Runtime.InteropServices (>= 4.1) System.Runtime.InteropServices.RuntimeInformation (>= 4.0) Microsoft.DotNet.PlatformAbstractions (3.1.3) - Microsoft.NET.Test.Sdk (16.5) - Microsoft.CodeCoverage (>= 16.5) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= net45)) (&& (== netstandard2.0) (>= netcoreapp2.1)) - Microsoft.TestPlatform.TestHost (>= 16.5) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.1)) + Microsoft.NET.Test.Sdk (16.8) + Microsoft.CodeCoverage (>= 16.8) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= net45)) (&& (== netstandard2.0) (>= netcoreapp2.1)) + Microsoft.TestPlatform.TestHost (>= 16.8) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1)) Microsoft.NETCore.Platforms (3.1) - Microsoft.NETCore.Targets (3.1) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.1)) + Microsoft.NETCore.Targets (3.1) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1)) Microsoft.NETFramework.ReferenceAssemblies (1.0) - Microsoft.TestPlatform.ObjectModel (16.6) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.1)) + Microsoft.TestPlatform.ObjectModel (16.8) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1)) NuGet.Frameworks (>= 5.0) - Microsoft.TestPlatform.TestHost (16.5) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.1)) - Microsoft.TestPlatform.ObjectModel (>= 16.5) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.1)) (&& (== netstandard2.0) (>= uap10.0)) - Newtonsoft.Json (>= 9.0.1) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.1)) (&& (== netstandard2.0) (>= uap10.0)) - Microsoft.Win32.Primitives (4.3) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.1)) + Microsoft.TestPlatform.TestHost (16.8) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1)) + Microsoft.TestPlatform.ObjectModel (>= 16.8) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1)) (&& (== netstandard2.0) (>= uap10.0)) + Newtonsoft.Json (>= 9.0.1) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1)) (&& (== netstandard2.0) (>= uap10.0)) + Microsoft.Win32.Primitives (4.3) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1)) Microsoft.NETCore.Platforms (>= 1.1) Microsoft.NETCore.Targets (>= 1.1) System.Runtime (>= 4.3) Microsoft.Win32.Registry (4.7) - System.Buffers (>= 4.5) - restriction: || (&& (== netcoreapp2.1) (>= monoandroid)) (&& (== netcoreapp2.1) (>= monotouch)) (&& (== netcoreapp2.1) (< netcoreapp2.0)) (&& (== netcoreapp2.1) (>= xamarinios)) (&& (== netcoreapp2.1) (>= xamarinmac)) (&& (== netcoreapp2.1) (>= xamarintvos)) (&& (== netcoreapp2.1) (>= xamarinwatchos)) (&& (== netcoreapp3.1) (>= monoandroid)) (&& (== netcoreapp3.1) (>= monotouch)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (&& (== netcoreapp3.1) (>= xamarinios)) (&& (== netcoreapp3.1) (>= xamarinmac)) (&& (== netcoreapp3.1) (>= xamarintvos)) (&& (== netcoreapp3.1) (>= xamarinwatchos)) (== netstandard2.0) - System.Memory (>= 4.5.3) - restriction: || (&& (== netcoreapp2.1) (< netcoreapp2.0)) (&& (== netcoreapp2.1) (>= uap10.1)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (&& (== netcoreapp3.1) (< netcoreapp2.1)) (&& (== netcoreapp3.1) (>= uap10.1)) (== netstandard2.0) + System.Buffers (>= 4.5) - restriction: || (&& (== net5.0) (>= monoandroid)) (&& (== net5.0) (>= monotouch)) (&& (== net5.0) (< netcoreapp2.0)) (&& (== net5.0) (>= xamarinios)) (&& (== net5.0) (>= xamarinmac)) (&& (== net5.0) (>= xamarintvos)) (&& (== net5.0) (>= xamarinwatchos)) (== netstandard2.0) + System.Memory (>= 4.5.3) - restriction: || (&& (== net5.0) (< netcoreapp2.0)) (&& (== net5.0) (< netcoreapp2.1)) (&& (== net5.0) (>= uap10.1)) (== netstandard2.0) System.Security.AccessControl (>= 4.7) System.Security.Principal.Windows (>= 4.7) - Microsoft.Win32.SystemEvents (4.7) - restriction: || (&& (== netcoreapp2.1) (>= netcoreapp3.0)) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp3.0)) - Microsoft.NETCore.Platforms (>= 3.1) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.0)) + Microsoft.Win32.SystemEvents (4.7) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp3.0)) + Microsoft.NETCore.Platforms (>= 3.1) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.0)) NETStandard.Library (2.0.3) Microsoft.NETCore.Platforms (>= 1.1) Newtonsoft.Json (12.0.3) - NuGet.Frameworks (5.5.1) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.1)) + NuGet.Frameworks (5.5.1) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1)) NUnit (3.12) NETStandard.Library (>= 2.0) - NUnit3TestAdapter (3.16.1) - Microsoft.DotNet.InternalAbstractions (>= 1.0) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.1)) - System.ComponentModel.EventBasedAsync (>= 4.3) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.1)) - System.ComponentModel.TypeConverter (>= 4.3) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.1)) - System.Diagnostics.Process (>= 4.3) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.1)) - System.Reflection (>= 4.3) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.1)) - System.Runtime.InteropServices.RuntimeInformation (>= 4.3) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.1)) - System.Threading.Thread (>= 4.3) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.1)) - System.Xml.XmlDocument (>= 4.3) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.1)) - System.Xml.XPath.XmlDocument (>= 4.3) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.1)) + NUnit3TestAdapter (3.17) + Microsoft.DotNet.InternalAbstractions (>= 1.0) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1)) + System.ComponentModel.EventBasedAsync (>= 4.3) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1)) + System.ComponentModel.TypeConverter (>= 4.3) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1)) + System.Diagnostics.Process (>= 4.3) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1)) + System.Reflection (>= 4.3) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1)) + System.Runtime.InteropServices.RuntimeInformation (>= 4.3) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1)) + System.Threading.Thread (>= 4.3) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1)) + System.Xml.XmlDocument (>= 4.3) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1)) + System.Xml.XPath.XmlDocument (>= 4.3) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1)) Perfolizer (0.2.1) System.Memory (>= 4.5.3) - runtime.native.System (4.3.1) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.1)) + runtime.native.System (4.3.1) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1)) Microsoft.NETCore.Platforms (>= 1.1.1) Microsoft.NETCore.Targets (>= 1.1.3) Sln (0.3) - System.AppContext (4.3) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.1)) + System.AppContext (4.3) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1)) System.Runtime (>= 4.3) - System.Buffers (4.5.1) + System.Buffers (4.5.1) - restriction: || (&& (== net5.0) (>= monoandroid)) (&& (== net5.0) (>= monotouch)) (&& (== net5.0) (>= net461)) (&& (== net5.0) (< netcoreapp2.0)) (&& (== net5.0) (< netstandard1.1)) (&& (== net5.0) (< netstandard2.0)) (&& (== net5.0) (>= uap10.1)) (&& (== net5.0) (>= xamarinios)) (&& (== net5.0) (>= xamarinmac)) (&& (== net5.0) (>= xamarintvos)) (&& (== net5.0) (>= xamarinwatchos)) (== netstandard2.0) System.CodeDom (4.7) - System.Collections (4.3) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.1)) + System.Collections (4.3) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1)) Microsoft.NETCore.Platforms (>= 1.1) Microsoft.NETCore.Targets (>= 1.1) System.Runtime (>= 4.3) System.Collections.Immutable (1.7) - System.Memory (>= 4.5.3) - restriction: || (&& (== netcoreapp2.1) (>= net46)) (&& (== netcoreapp2.1) (< netstandard2.0)) (&& (== netcoreapp2.1) (>= uap10.1)) (&& (== netcoreapp3.1) (>= net46)) (&& (== netcoreapp3.1) (< netcoreapp2.1)) (&& (== netcoreapp3.1) (< netstandard2.0)) (&& (== netcoreapp3.1) (>= uap10.1)) (== netstandard2.0) - System.Collections.NonGeneric (4.3) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.1)) + System.Memory (>= 4.5.3) - restriction: || (&& (== net5.0) (>= net46)) (&& (== net5.0) (< netcoreapp2.1)) (&& (== net5.0) (< netstandard2.0)) (&& (== net5.0) (>= uap10.1)) (== netstandard2.0) + System.Collections.NonGeneric (4.3) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1)) System.Diagnostics.Debug (>= 4.3) System.Globalization (>= 4.3) System.Resources.ResourceManager (>= 4.3) System.Runtime (>= 4.3) System.Runtime.Extensions (>= 4.3) System.Threading (>= 4.3) - System.Collections.Specialized (4.3) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.1)) + System.Collections.Specialized (4.3) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1)) System.Collections.NonGeneric (>= 4.3) System.Globalization (>= 4.3) System.Globalization.Extensions (>= 4.3) @@ -148,18 +149,18 @@ NUGET System.Runtime (>= 4.3) System.Runtime.Extensions (>= 4.3) System.Threading (>= 4.3) - System.ComponentModel (4.3) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.1)) + System.ComponentModel (4.3) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1)) System.Runtime (>= 4.3) - System.ComponentModel.EventBasedAsync (4.3) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.1)) + System.ComponentModel.EventBasedAsync (4.3) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1)) System.Resources.ResourceManager (>= 4.3) System.Runtime (>= 4.3) System.Threading (>= 4.3) System.Threading.Tasks (>= 4.3) - System.ComponentModel.Primitives (4.3) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.1)) + System.ComponentModel.Primitives (4.3) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1)) System.ComponentModel (>= 4.3) System.Resources.ResourceManager (>= 4.3) System.Runtime (>= 4.3) - System.ComponentModel.TypeConverter (4.3) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.1)) + System.ComponentModel.TypeConverter (4.3) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1)) System.Collections (>= 4.3) System.Collections.NonGeneric (>= 4.3) System.Collections.Specialized (>= 4.3) @@ -178,11 +179,11 @@ NUGET System.Configuration.ConfigurationManager (4.7) System.Security.Cryptography.ProtectedData (>= 4.7) System.Security.Permissions (>= 4.7) - System.Diagnostics.Debug (4.3) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.1)) + System.Diagnostics.Debug (4.3) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1)) Microsoft.NETCore.Platforms (>= 1.1) Microsoft.NETCore.Targets (>= 1.1) System.Runtime (>= 4.3) - System.Diagnostics.Process (4.3) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.1)) + System.Diagnostics.Process (4.3) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1)) Microsoft.NETCore.Platforms (>= 1.1) Microsoft.Win32.Primitives (>= 4.3) Microsoft.Win32.Registry (>= 4.3) @@ -204,27 +205,27 @@ NUGET System.Threading.Tasks (>= 4.3) System.Threading.Thread (>= 4.3) System.Threading.ThreadPool (>= 4.3) - System.Drawing.Common (4.7) - restriction: || (&& (== netcoreapp2.1) (>= netcoreapp3.0)) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp3.0)) - Microsoft.NETCore.Platforms (>= 3.1) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.0)) - Microsoft.Win32.SystemEvents (>= 4.7) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.0)) - System.Globalization (4.3) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.1)) + System.Drawing.Common (4.7) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp3.0)) + Microsoft.NETCore.Platforms (>= 3.1) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.0)) + Microsoft.Win32.SystemEvents (>= 4.7) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.0)) + System.Globalization (4.3) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1)) Microsoft.NETCore.Platforms (>= 1.1) Microsoft.NETCore.Targets (>= 1.1) System.Runtime (>= 4.3) - System.Globalization.Extensions (4.3) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.1)) + System.Globalization.Extensions (4.3) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1)) Microsoft.NETCore.Platforms (>= 1.1) System.Globalization (>= 4.3) System.Resources.ResourceManager (>= 4.3) System.Runtime (>= 4.3) System.Runtime.Extensions (>= 4.3) System.Runtime.InteropServices (>= 4.3) - System.IO (4.3) + System.IO (4.3) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1)) 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.FileSystem (4.3) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.1)) + System.IO.FileSystem (4.3) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1)) Microsoft.NETCore.Platforms (>= 1.1) Microsoft.NETCore.Targets (>= 1.1) System.IO (>= 4.3) @@ -233,72 +234,72 @@ NUGET System.Runtime.Handles (>= 4.3) System.Text.Encoding (>= 4.3) System.Threading.Tasks (>= 4.3) - System.IO.FileSystem.Primitives (4.3) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.1)) + System.IO.FileSystem.Primitives (4.3) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1)) System.Runtime (>= 4.3) - System.Linq (4.3) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.1)) + System.Linq (4.3) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1)) System.Collections (>= 4.3) System.Diagnostics.Debug (>= 4.3) System.Resources.ResourceManager (>= 4.3) System.Runtime (>= 4.3) System.Runtime.Extensions (>= 4.3) System.Management (4.7) - Microsoft.NETCore.Platforms (>= 3.1) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.0)) - Microsoft.Win32.Registry (>= 4.7) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.0)) + Microsoft.NETCore.Platforms (>= 3.1) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.0)) + Microsoft.Win32.Registry (>= 4.7) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.0)) System.CodeDom (>= 4.7) System.Memory (4.5.4) - System.Buffers (>= 4.5.1) - restriction: || (&& (== netcoreapp2.1) (>= monoandroid)) (&& (== netcoreapp2.1) (>= monotouch)) (&& (== netcoreapp2.1) (>= net461)) (&& (== netcoreapp2.1) (< netcoreapp2.0)) (&& (== netcoreapp2.1) (< netstandard1.1)) (&& (== netcoreapp2.1) (< netstandard2.0)) (&& (== netcoreapp2.1) (>= xamarinios)) (&& (== netcoreapp2.1) (>= xamarinmac)) (&& (== netcoreapp2.1) (>= xamarintvos)) (&& (== netcoreapp2.1) (>= xamarinwatchos)) (&& (== 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: || (&& (== netcoreapp2.1) (< netcoreapp2.0)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (== netstandard2.0) - System.Runtime.CompilerServices.Unsafe (>= 4.5.3) - restriction: || (&& (== netcoreapp2.1) (>= monoandroid)) (&& (== netcoreapp2.1) (>= monotouch)) (&& (== netcoreapp2.1) (>= net461)) (&& (== netcoreapp2.1) (< netcoreapp2.0)) (&& (== netcoreapp2.1) (< netstandard1.1)) (&& (== netcoreapp2.1) (< netstandard2.0)) (&& (== netcoreapp2.1) (>= uap10.1)) (&& (== netcoreapp2.1) (>= xamarinios)) (&& (== netcoreapp2.1) (>= xamarinmac)) (&& (== netcoreapp2.1) (>= xamarintvos)) (&& (== netcoreapp2.1) (>= xamarinwatchos)) (&& (== 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: || (&& (== netcoreapp2.1) (< netcoreapp2.0)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (== netstandard2.0) - System.Reflection (4.3) + System.Buffers (>= 4.5.1) - restriction: || (&& (== net5.0) (>= monoandroid)) (&& (== net5.0) (>= monotouch)) (&& (== net5.0) (>= net461)) (&& (== net5.0) (< netcoreapp2.0)) (&& (== net5.0) (< netstandard1.1)) (&& (== net5.0) (< netstandard2.0)) (&& (== net5.0) (>= xamarinios)) (&& (== net5.0) (>= xamarinmac)) (&& (== net5.0) (>= xamarintvos)) (&& (== net5.0) (>= xamarinwatchos)) (== netstandard2.0) + System.Numerics.Vectors (>= 4.4) - restriction: || (&& (== net5.0) (< netcoreapp2.0)) (== netstandard2.0) + System.Runtime.CompilerServices.Unsafe (>= 4.5.3) - restriction: || (&& (== net5.0) (>= monoandroid)) (&& (== net5.0) (>= monotouch)) (&& (== net5.0) (>= net461)) (&& (== net5.0) (< netcoreapp2.0)) (&& (== net5.0) (< netcoreapp2.1)) (&& (== net5.0) (< netstandard1.1)) (&& (== net5.0) (< netstandard2.0)) (&& (== net5.0) (>= uap10.1)) (&& (== net5.0) (>= xamarinios)) (&& (== net5.0) (>= xamarinmac)) (&& (== net5.0) (>= xamarintvos)) (&& (== net5.0) (>= xamarinwatchos)) (== netstandard2.0) + System.Numerics.Vectors (4.5) - restriction: || (&& (== net5.0) (< netcoreapp2.0)) (&& (== net5.0) (>= uap10.1)) (== netstandard2.0) + System.Reflection (4.3) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1)) 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) - restriction: || (&& (== netcoreapp2.1) (< netcoreapp2.0)) (&& (== netcoreapp2.1) (< netstandard1.1)) (&& (== netcoreapp2.1) (< netstandard2.0)) (&& (== netcoreapp2.1) (>= uap10.1)) (&& (== netcoreapp3.1) (< netcoreapp2.0) (< netstandard2.1)) (&& (== netcoreapp3.1) (< netstandard1.1)) (&& (== netcoreapp3.1) (< netstandard2.0)) (&& (== netcoreapp3.1) (>= uap10.1)) (== netstandard2.0) - System.Reflection.Emit.ILGeneration (4.7) - restriction: || (&& (== netcoreapp2.1) (< netcoreapp2.0)) (&& (== netcoreapp2.1) (< netstandard2.0)) (&& (== netcoreapp2.1) (< portable-net45+wp8)) (&& (== netcoreapp2.1) (>= uap10.1)) (&& (== netcoreapp3.1) (< netcoreapp2.0) (< netstandard2.1)) (&& (== netcoreapp3.1) (< netstandard2.0)) (&& (== netcoreapp3.1) (< portable-net45+wp8)) (&& (== netcoreapp3.1) (>= uap10.1)) (== netstandard2.0) + System.Reflection.Emit.ILGeneration (>= 4.7) - restriction: || (&& (== net5.0) (< netcoreapp2.0) (< netstandard2.1)) (&& (== net5.0) (< netstandard1.1)) (&& (== net5.0) (< netstandard2.0)) (&& (== net5.0) (>= uap10.1)) (== netstandard2.0) + System.Reflection.Emit.ILGeneration (4.7) - restriction: || (&& (== net5.0) (< netcoreapp2.0) (< netstandard2.1)) (&& (== net5.0) (< netstandard1.1)) (&& (== net5.0) (< netstandard2.0)) (&& (== net5.0) (>= uap10.1)) (== netstandard2.0) System.Reflection.Emit.Lightweight (4.7) - System.Reflection.Emit.ILGeneration (>= 4.7) - restriction: || (&& (== netcoreapp2.1) (< netcoreapp2.0)) (&& (== netcoreapp2.1) (< netstandard2.0)) (&& (== netcoreapp2.1) (< portable-net45+wp8)) (&& (== netcoreapp2.1) (>= uap10.1)) (&& (== netcoreapp3.1) (< netcoreapp2.0) (< netstandard2.1)) (&& (== netcoreapp3.1) (< netstandard2.0)) (&& (== netcoreapp3.1) (< portable-net45+wp8)) (&& (== netcoreapp3.1) (>= uap10.1)) (== netstandard2.0) - System.Reflection.Extensions (4.3) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.1)) + System.Reflection.Emit.ILGeneration (>= 4.7) - restriction: || (&& (== net5.0) (< netcoreapp2.0) (< netstandard2.1)) (&& (== net5.0) (< netstandard2.0)) (&& (== net5.0) (< portable-net45+wp8)) (&& (== net5.0) (>= uap10.1)) (== netstandard2.0) + System.Reflection.Extensions (4.3) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1)) Microsoft.NETCore.Platforms (>= 1.1) Microsoft.NETCore.Targets (>= 1.1) System.Reflection (>= 4.3) System.Runtime (>= 4.3) System.Reflection.Metadata (1.8) - System.Collections.Immutable (>= 1.7) - restriction: || (== netcoreapp2.1) (&& (== netcoreapp3.1) (>= net45)) (&& (== netcoreapp3.1) (< netstandard1.1)) (&& (== netcoreapp3.1) (< netstandard2.0)) (== netstandard2.0) - System.Reflection.Primitives (4.3) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.1)) + System.Collections.Immutable (>= 1.7) - restriction: || (&& (== net5.0) (>= net45)) (&& (== net5.0) (< netcoreapp3.1)) (&& (== net5.0) (< netstandard1.1)) (&& (== net5.0) (< netstandard2.0)) (== netstandard2.0) + System.Reflection.Primitives (4.3) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1)) Microsoft.NETCore.Platforms (>= 1.1) Microsoft.NETCore.Targets (>= 1.1) System.Runtime (>= 4.3) - System.Reflection.TypeExtensions (4.7) - System.Resources.ResourceManager (4.3) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.1)) + System.Reflection.TypeExtensions (4.7) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1)) + System.Resources.ResourceManager (4.3) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1)) 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) + System.Runtime (4.3.1) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.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) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.1)) + System.Runtime.Extensions (4.3.1) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1)) Microsoft.NETCore.Platforms (>= 1.1.1) Microsoft.NETCore.Targets (>= 1.1.3) System.Runtime (>= 4.3.1) - System.Runtime.Handles (4.3) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.1)) + System.Runtime.Handles (4.3) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1)) Microsoft.NETCore.Platforms (>= 1.1) Microsoft.NETCore.Targets (>= 1.1) System.Runtime (>= 4.3) - System.Runtime.InteropServices (4.3) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.1)) + System.Runtime.InteropServices (4.3) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1)) 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.RuntimeInformation (4.3) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.1)) + System.Runtime.InteropServices.RuntimeInformation (4.3) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1)) runtime.native.System (>= 4.3) System.Reflection (>= 4.3) System.Reflection.Extensions (>= 4.3) @@ -306,52 +307,47 @@ NUGET System.Runtime (>= 4.3) System.Runtime.InteropServices (>= 4.3) System.Threading (>= 4.3) - System.Runtime.Loader (4.3) - System.IO (>= 4.3) - System.Reflection (>= 4.3) - System.Runtime (>= 4.3) System.Security.AccessControl (4.7) - Microsoft.NETCore.Platforms (>= 3.1) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.0)) + Microsoft.NETCore.Platforms (>= 3.1) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.0)) System.Security.Principal.Windows (>= 4.7) System.Security.Cryptography.ProtectedData (4.7) - System.Memory (>= 4.5.3) - restriction: || (&& (== netcoreapp3.1) (< netcoreapp2.1)) (== netstandard2.0) + System.Memory (>= 4.5.3) - restriction: || (&& (== net5.0) (< netcoreapp2.1)) (== netstandard2.0) System.Security.Permissions (4.7) System.Security.AccessControl (>= 4.7) - System.Windows.Extensions (>= 4.7) - restriction: || (&& (== netcoreapp2.1) (>= netcoreapp3.0)) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp3.0)) + System.Windows.Extensions (>= 4.7) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp3.0)) System.Security.Principal.Windows (4.7) - Microsoft.NETCore.Platforms (>= 3.1) - restriction: || (== netcoreapp2.1) (&& (== netcoreapp3.1) (== netstandard2.0)) (&& (== netcoreapp3.1) (< netcoreapp2.1)) (&& (== netcoreapp3.1) (< netcoreapp3.0)) (&& (== netstandard2.0) (>= netcoreapp2.0)) (&& (== netstandard2.0) (>= netcoreapp2.1)) - System.Text.Encoding (4.3) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.1)) + System.Text.Encoding (4.3) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1)) Microsoft.NETCore.Platforms (>= 1.1) Microsoft.NETCore.Targets (>= 1.1) System.Runtime (>= 4.3) System.Text.Encoding.CodePages (4.7) - Microsoft.NETCore.Platforms (>= 3.1) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.0)) - System.Runtime.CompilerServices.Unsafe (>= 4.7) - restriction: || (== netcoreapp2.1) (&& (== netcoreapp3.1) (>= net461)) (&& (== netcoreapp3.1) (< netcoreapp2.0)) (== netstandard2.0) - System.Text.Encoding.Extensions (4.3) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.1)) + Microsoft.NETCore.Platforms (>= 3.1) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.0)) + System.Runtime.CompilerServices.Unsafe (>= 4.7) - restriction: || (&& (== net5.0) (>= net461)) (&& (== net5.0) (< netcoreapp2.0)) (&& (== net5.0) (< netcoreapp3.1)) (== netstandard2.0) + System.Text.Encoding.Extensions (4.3) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1)) Microsoft.NETCore.Platforms (>= 1.1) Microsoft.NETCore.Targets (>= 1.1) System.Runtime (>= 4.3) System.Text.Encoding (>= 4.3) - System.Text.RegularExpressions (4.3.1) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.1)) + System.Text.RegularExpressions (4.3.1) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1)) System.Runtime (>= 4.3.1) - System.Threading (4.3) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.1)) + System.Threading (4.3) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1)) System.Runtime (>= 4.3) System.Threading.Tasks (>= 4.3) - System.Threading.Tasks (4.3) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.1)) + System.Threading.Tasks (4.3) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1)) Microsoft.NETCore.Platforms (>= 1.1) Microsoft.NETCore.Targets (>= 1.1) System.Runtime (>= 4.3) System.Threading.Tasks.Extensions (4.5.4) - System.Runtime.CompilerServices.Unsafe (>= 4.5.3) - restriction: || (&& (== netcoreapp2.1) (>= net461)) (&& (== netcoreapp2.1) (< netstandard1.0)) (&& (== netcoreapp2.1) (< netstandard2.0)) (&& (== netcoreapp2.1) (>= wp8)) (&& (== netcoreapp3.1) (>= net461)) (&& (== netcoreapp3.1) (< netcoreapp2.1)) (&& (== netcoreapp3.1) (< netstandard1.0)) (&& (== netcoreapp3.1) (< netstandard2.0)) (&& (== netcoreapp3.1) (>= wp8)) (== netstandard2.0) - System.Threading.Thread (4.3) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.1)) + System.Runtime.CompilerServices.Unsafe (>= 4.5.3) - restriction: || (&& (== net5.0) (>= net461)) (&& (== net5.0) (< netcoreapp2.1)) (&& (== net5.0) (< netstandard1.0)) (&& (== net5.0) (< netstandard2.0)) (&& (== net5.0) (>= wp8)) (== netstandard2.0) + System.Threading.Thread (4.3) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1)) System.Runtime (>= 4.3) - System.Threading.ThreadPool (4.3) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.1)) + System.Threading.ThreadPool (4.3) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1)) System.Runtime (>= 4.3) System.Runtime.Handles (>= 4.3) System.ValueTuple (4.5) - System.Windows.Extensions (4.7) - restriction: || (&& (== netcoreapp2.1) (>= netcoreapp3.0)) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp3.0)) - System.Drawing.Common (>= 4.7) - restriction: || (&& (== netcoreapp2.1) (>= netcoreapp3.0)) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp3.0)) - System.Xml.ReaderWriter (4.3.1) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.1)) + System.Windows.Extensions (4.7) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp3.0)) + System.Drawing.Common (>= 4.7) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp3.0)) + System.Xml.ReaderWriter (4.3.1) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1)) System.Collections (>= 4.3) System.Diagnostics.Debug (>= 4.3) System.Globalization (>= 4.3) @@ -367,7 +363,7 @@ NUGET System.Text.RegularExpressions (>= 4.3) System.Threading.Tasks (>= 4.3) System.Threading.Tasks.Extensions (>= 4.3) - System.Xml.XmlDocument (4.3) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.1)) + System.Xml.XmlDocument (4.3) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1)) System.Collections (>= 4.3) System.Diagnostics.Debug (>= 4.3) System.Globalization (>= 4.3) @@ -378,7 +374,7 @@ NUGET System.Text.Encoding (>= 4.3) System.Threading (>= 4.3) System.Xml.ReaderWriter (>= 4.3) - System.Xml.XPath (4.3) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.1)) + System.Xml.XPath (4.3) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1)) System.Collections (>= 4.3) System.Diagnostics.Debug (>= 4.3) System.Globalization (>= 4.3) @@ -388,7 +384,7 @@ NUGET System.Runtime.Extensions (>= 4.3) System.Threading (>= 4.3) System.Xml.ReaderWriter (>= 4.3) - System.Xml.XPath.XmlDocument (4.3) - restriction: || (== netcoreapp2.1) (== netcoreapp3.1) (&& (== netstandard2.0) (>= netcoreapp2.1)) + System.Xml.XPath.XmlDocument (4.3) - restriction: || (== net5.0) (&& (== netstandard2.0) (>= netcoreapp2.1)) System.Collections (>= 4.3) System.Globalization (>= 4.3) System.IO (>= 4.3) diff --git a/src/FSharpLint.Console/FSharpLint.Console.fsproj b/src/FSharpLint.Console/FSharpLint.Console.fsproj index c2ca7defc..988ac89e2 100644 --- a/src/FSharpLint.Console/FSharpLint.Console.fsproj +++ b/src/FSharpLint.Console/FSharpLint.Console.fsproj @@ -2,7 +2,7 @@ Exe - netcoreapp3.1;netcoreapp2.1 + net5.0 FSharpLint.Console Console application to run FSharpLint. diff --git a/src/FSharpLint.Core/Application/Lint.fs b/src/FSharpLint.Core/Application/Lint.fs index aca12b658..6553f6f6c 100644 --- a/src/FSharpLint.Core/Application/Lint.fs +++ b/src/FSharpLint.Core/Application/Lint.fs @@ -291,7 +291,7 @@ module Lint = let locator = MSBuildLocator() let loader = Dotnet.ProjInfo.Workspace.Loader.Create (LoaderConfig.Default locator) let netFwInfo = NetFWInfo.Create (NetFWInfoConfig.Default locator) - let fcsBinder = FCSBinder (netFwInfo, loader, FSharpChecker.Create()) + let fcsBinder = FCSBinder (netFwInfo, loader, FSharpChecker.Create(keepAssemblyContents=true)) loader.LoadProjects [projectFilePath] fcsBinder.GetProjectOptions projectFilePath @@ -394,7 +394,7 @@ module Lint = optionalParams.ReceivedWarning |> Option.iter (fun func -> func warning) - let checker = FSharpChecker.Create() + let checker = FSharpChecker.Create(keepAssemblyContents=true) let parseFilesInProject files projectOptions = let lintInformation = @@ -518,7 +518,7 @@ module Lint = /// Lints F# source code. let lintSource optionalParams source = - let checker = FSharpChecker.Create() + let checker = FSharpChecker.Create(keepAssemblyContents=true) match ParseFile.parseSource source checker with | ParseFile.Success(parseFileInformation) -> @@ -561,7 +561,7 @@ module Lint = /// Lints an F# file from a given path to the `.fs` file. let lintFile optionalParams filePath = if IO.File.Exists filePath then - let checker = FSharpChecker.Create() + let checker = FSharpChecker.Create(keepAssemblyContents=true) match ParseFile.parseFile filePath checker None with | ParseFile.Success astFileParseInfo -> diff --git a/src/FSharpLint.Core/Framework/Ast.fs b/src/FSharpLint.Core/Framework/Ast.fs index 43741febd..07532fd8a 100644 --- a/src/FSharpLint.Core/Framework/Ast.fs +++ b/src/FSharpLint.Core/Framework/Ast.fs @@ -87,7 +87,7 @@ module Ast = | x -> x let (|IsCurriedLambda|_|) = function - | SynExpr.Lambda(_, _, parameter, (SynExpr.Lambda(_) as inner), _) as outer + | SynExpr.Lambda(_, _, parameter, (SynExpr.Lambda(_) as inner), _, _) as outer when outer.Range = inner.Range -> Some(parameter, inner) | _ -> None @@ -95,13 +95,13 @@ module Ast = let rec getLambdaParametersAndExpression parameters = function | IsCurriedLambda(parameter, curriedLambda) -> getLambdaParametersAndExpression (parameter::parameters) curriedLambda - | SynExpr.Lambda(_, _, parameter, body, _) -> + | SynExpr.Lambda(_, _, parameter, body, _, _) -> { Arguments = parameter::parameters |> List.rev Body = removeAutoGeneratedMatchesFromLambda body } |> Some | _ -> None match lambda with - | AstNode.Expression(SynExpr.Lambda(_, _, _, _, range) as lambda) -> + | AstNode.Expression(SynExpr.Lambda(_, _, _, _, _, range) as lambda) -> getLambdaParametersAndExpression [] lambda |> Option.map (fun x -> (x, range)) | _ -> None @@ -181,7 +181,7 @@ module Ast = let inline private memberDefinitionChildren node add = match node with | SynMemberDefn.Member(binding, _) -> add <| Binding binding - | SynMemberDefn.ImplicitCtor(_, _, patterns, _, _) -> + | SynMemberDefn.ImplicitCtor(_, _, patterns, _, _, _) -> let combinedPatterns = extractPatterns patterns combinedPatterns |> List.revIter (SimplePattern >> add) | SynMemberDefn.ImplicitInherit(synType, expression, _, _) -> @@ -336,6 +336,15 @@ module Ast = | SynExpr.IfThenElse(cond, body, None, _, _, _, _) -> add <| Expression body add <| Expression cond + | SynExpr.InterpolatedString(contents, range) -> + contents + |> List.iter ( + function + | SynInterpolatedStringPart.String _ -> + () + | SynInterpolatedStringPart.FillExpr (expr, _ident) -> + add <| Expression expr + ) | SynExpr.Lambda(_) | SynExpr.App(_) | SynExpr.Fixed(_) -> () diff --git a/src/FSharpLint.Core/Framework/AstInfo.fs b/src/FSharpLint.Core/Framework/AstInfo.fs index e943cd01f..53d5a3a92 100644 --- a/src/FSharpLint.Core/Framework/AstInfo.fs +++ b/src/FSharpLint.Core/Framework/AstInfo.fs @@ -24,7 +24,7 @@ module AstInfo = | MemberKind.PropertyGet(_) | MemberKind.PropertySet(_) | MemberKind.PropertyGetSet(_) -> Property - | None when valInfo.ArgInfos.Length = 0 -> Value + | None when valInfo.CurriedArgInfos.Length = 0 -> Value | None -> Function let operatorIdentifiers = diff --git a/src/FSharpLint.Core/Framework/ParseFile.fs b/src/FSharpLint.Core/Framework/ParseFile.fs index b2ee210f6..91be14c01 100644 --- a/src/FSharpLint.Core/Framework/ParseFile.fs +++ b/src/FSharpLint.Core/Framework/ParseFile.fs @@ -38,84 +38,35 @@ module ParseFile = let private parse file source (checker:FSharpChecker, options) = let sourceText = SourceText.ofString source - let parseResults = - checker.ParseFile(file, sourceText, options |> checker.GetParsingOptionsFromProjectOptions |> fst) + let (parseResults, checkFileAnswer) = + checker.ParseAndCheckFileInProject(file, 0, sourceText, options) |> Async.RunSynchronously - let typeCheckFile () = - let results = - checker.CheckFileInProject(parseResults, file, 0, sourceText, options) - |> Async.RunSynchronously - - match results with - | FSharpCheckFileAnswer.Succeeded(x) -> Success(Some(x)) - | FSharpCheckFileAnswer.Aborted -> Failed(AbortedTypeCheck) - match parseResults.ParseTree with | Some(parseTree) -> - match typeCheckFile() with - | Success(typeCheckResults) -> + match checkFileAnswer with + | FSharpCheckFileAnswer.Succeeded(typeCheckResults) -> { Text = source Ast = parseTree - TypeCheckResults = typeCheckResults + TypeCheckResults = Some(typeCheckResults) File = file } |> Success - | Failed(_) -> Failed(AbortedTypeCheck) + | FSharpCheckFileAnswer.Aborted -> Failed(AbortedTypeCheck) | None -> Failed(FailedToParseFile(parseResults.Errors)) - // See: https://github.com/fsharp/FSharp.Compiler.Service/issues/847. - let private dotnetCoreReferences () = - let fsharpCoreDir = Path.GetDirectoryName(typeof>.Assembly.Location) - let runtimeDir = Path.GetDirectoryName(typeof.Assembly.Location) - - [ fsharpCoreDir "FSharp.Core.dll" - runtimeDir "mscorlib.dll" - runtimeDir "System.Console.dll" - runtimeDir "System.Runtime.dll" - runtimeDir "System.Private.CoreLib.dll" - runtimeDir "System.ObjectModel.dll" - runtimeDir "System.IO.dll" - runtimeDir "System.Linq.dll" - runtimeDir "System.Net.Requests.dll" - runtimeDir "System.Runtime.Numerics.dll" - runtimeDir "System.Threading.Tasks.dll" - - typeof.Assembly.Location - typeof.Assembly.Location - typeof.Assembly.Location - typeof.Assembly.Location - typeof.Assembly.Location - typeof.Assembly.Location - typeof.Assembly.Location - typeof.Assembly.Location ] - |> List.distinct - |> List.filter File.Exists - |> List.distinctBy Path.GetFileName - |> List.map (fun location -> "-r:" + location) - let getProjectOptionsFromScript (checker:FSharpChecker) file (source:string) = let sourceText = SourceText.ofString source #if NETSTANDARD2_0 let assumeDotNetFramework = false - let useSdkRefs = true - let targetProfile = "--targetProfile:netstandard" #else let assumeDotNetFramework = true - let useSdkRefs = false - let targetProfile = "--targetProfile:mscorlib" #endif let (options, _diagnostics) = - checker.GetProjectOptionsFromScript(file, sourceText, assumeDotNetFramework = assumeDotNetFramework, useSdkRefs = useSdkRefs, otherFlags = [| targetProfile |]) + checker.GetProjectOptionsFromScript(file, sourceText, assumeDotNetFramework = assumeDotNetFramework, useSdkRefs = assumeDotNetFramework) |> Async.RunSynchronously - let otherOptions = - if assumeDotNetFramework then options.OtherOptions - else - [| yield! options.OtherOptions |> Array.filter (fun x -> not (x.StartsWith("-r:"))) - yield! dotnetCoreReferences() |] - - { options with OtherOptions = otherOptions } + options /// Parses a file using `FSharp.Compiler.Service`. let parseFile file (checker:FSharpChecker) projectOptions = @@ -135,4 +86,5 @@ module ParseFile = parse fileName source (checker, options) let parseSource source (checker:FSharpChecker) = - parseSourceFile "test.fsx" source checker + let fileName = Path.ChangeExtension(Path.GetTempFileName(), "fsx") + parseSourceFile fileName source checker diff --git a/src/FSharpLint.Core/Framework/Utilities.fs b/src/FSharpLint.Core/Framework/Utilities.fs index f2dd46693..49cac0a6d 100644 --- a/src/FSharpLint.Core/Framework/Utilities.fs +++ b/src/FSharpLint.Core/Framework/Utilities.fs @@ -43,8 +43,8 @@ module ExpressionUtilities = range.StartLine, range.EndColumn, "", - identNames) |> Async.RunSynchronously - | _ -> None + identNames) + | _ -> async.Return None /// Converts an operator name e.g. op_Add to the operator symbol e.g. + let identAsDecompiledOpName (ident:Ident) = diff --git a/src/FSharpLint.Core/Rules/Conventions/Binding/UselessBinding.fs b/src/FSharpLint.Core/Rules/Conventions/Binding/UselessBinding.fs index 9ff22dc91..7369f0611 100644 --- a/src/FSharpLint.Core/Rules/Conventions/Binding/UselessBinding.fs +++ b/src/FSharpLint.Core/Rules/Conventions/Binding/UselessBinding.fs @@ -15,22 +15,21 @@ let private checkForUselessBinding (checkInfo:FSharpCheckFileResults option) pat | SynPat.Paren(pattern, _) -> findBindingIdentifier pattern | SynPat.Named(_, ident, _, _, _) -> Some(ident) | _ -> None + + let isNotMutable (symbol:FSharpSymbolUse) = + match symbol.Symbol with + | :? FSharpMemberOrFunctionOrValue as v -> not v.IsMutable + | _ -> true - let checkNotMutable (ident:Ident) = - async { - let! symbol = - checkInfo.GetSymbolUseAtLocation( - ident.idRange.StartLine, ident.idRange.EndColumn, "", [ident.idText]) + let checkNotMutable (ident:Ident) = async { + let! symbol = + checkInfo.GetSymbolUseAtLocation( + ident.idRange.StartLine, ident.idRange.EndColumn, "", [ident.idText]) - let isNotMutable (symbol:FSharpSymbolUse) = - match symbol.Symbol with - | :? FSharpMemberOrFunctionOrValue as v -> not v.IsMutable - | _ -> true - - return - match symbol with - | Some(symbol) -> isNotMutable symbol - | None -> false } + match symbol with + | Some(symbol) -> return isNotMutable symbol + | None -> return false + } let rec matchingIdentifier (bindingIdent:Ident) = function | SynExpr.Paren(expr, _, _, _) -> @@ -44,7 +43,7 @@ let private checkForUselessBinding (checkInfo:FSharpCheckFileResults option) pat { Range = range Message = Resources.GetString("RulesUselessBindingError") SuggestedFix = None - TypeChecks = [checkNotMutable ident] }) + TypeChecks = [ checkNotMutable ident ] }) |> Option.toArray | _ -> Array.empty diff --git a/src/FSharpLint.Core/Rules/Conventions/Naming/NamingHelper.fs b/src/FSharpLint.Core/Rules/Conventions/Naming/NamingHelper.fs index 4f2d9a87b..d6a991a56 100644 --- a/src/FSharpLint.Core/Rules/Conventions/Naming/NamingHelper.fs +++ b/src/FSharpLint.Core/Rules/Conventions/Naming/NamingHelper.fs @@ -248,10 +248,10 @@ let isNotUnionCase (checkFile:FSharpCheckFileResults) (ident:Ident) = async { let! symbol = checkFile.GetSymbolUseAtLocation( ident.idRange.StartLine, ident.idRange.EndColumn, "", [ident.idText]) - return - match symbol with - | Some(symbol) when (symbol.Symbol :? FSharpUnionCase) -> false - | Some(_) | None -> true } + match symbol with + | Some(symbol) when (symbol.Symbol :? FSharpUnionCase) -> return false + | Some(_) | None -> return true +} let isInterface typeDef = let hasConstructor = function diff --git a/src/FSharpLint.Core/Rules/Conventions/Naming/ParameterNames.fs b/src/FSharpLint.Core/Rules/Conventions/Naming/ParameterNames.fs index 0e0329b74..51f47ec73 100644 --- a/src/FSharpLint.Core/Rules/Conventions/Naming/ParameterNames.fs +++ b/src/FSharpLint.Core/Rules/Conventions/Naming/ParameterNames.fs @@ -27,7 +27,7 @@ let private getIdentifiers (args:AstNodeRuleParams) = match args.AstNode with | AstNode.MemberDefinition(memberDef) -> match memberDef with - | SynMemberDefn.ImplicitCtor(_, _, ctorArgs, _, _) -> + | SynMemberDefn.ImplicitCtor(_, _, ctorArgs, _, _, _) -> ctorArgs |> extractPatterns |> List.toArray diff --git a/src/FSharpLint.Core/Rules/Conventions/RedundantNewKeyword.fs b/src/FSharpLint.Core/Rules/Conventions/RedundantNewKeyword.fs index 9e1726914..982b352bc 100644 --- a/src/FSharpLint.Core/Rules/Conventions/RedundantNewKeyword.fs +++ b/src/FSharpLint.Core/Rules/Conventions/RedundantNewKeyword.fs @@ -19,14 +19,15 @@ let private doesNotImplementIDisposable (checkFile:FSharpCheckFileResults) (iden let names = ident.Lid |> List.map (fun x -> x.idText) let! symbol = checkFile.GetSymbolUseAtLocation(ident.Range.StartLine, ident.Range.EndColumn, "", names) - return - match symbol with - | Some(symbol) when (symbol.Symbol :? FSharpMemberOrFunctionOrValue) -> - let ctor = symbol.Symbol :?> FSharpMemberOrFunctionOrValue + match symbol with + | Some(symbol) when (symbol.Symbol :? FSharpMemberOrFunctionOrValue) -> + let ctor = symbol.Symbol :?> FSharpMemberOrFunctionOrValue + return ctor.DeclaringEntity |> Option.exists (fun ctorForType -> Seq.forall (implementsIDisposable >> not) ctorForType.AllInterfaces) - | Some(_) | None -> false } + | Some(_) | None -> return false +} let private generateFix (text:string) range = lazy( ExpressionUtilities.tryFindTextOfRange range text @@ -42,7 +43,7 @@ let runner args = { Range = range Message = Resources.GetString("RulesRedundantNewKeyword") SuggestedFix = Some (generateFix args.FileContent range) - TypeChecks = [doesNotImplementIDisposable checkInfo identifier] } |> Array.singleton + TypeChecks = [ doesNotImplementIDisposable checkInfo identifier ] } |> Array.singleton | _ -> Array.empty let rule = diff --git a/src/FSharpLint.Core/Rules/Conventions/SourceLength/MaxLinesInLambdaFunction.fs b/src/FSharpLint.Core/Rules/Conventions/SourceLength/MaxLinesInLambdaFunction.fs index 0d224a915..e8f5ae85f 100644 --- a/src/FSharpLint.Core/Rules/Conventions/SourceLength/MaxLinesInLambdaFunction.fs +++ b/src/FSharpLint.Core/Rules/Conventions/SourceLength/MaxLinesInLambdaFunction.fs @@ -6,7 +6,7 @@ open FSharpLint.Framework.Rules let runner (config:Helper.SourceLength.Config) (args:AstNodeRuleParams) = match args.AstNode with - | AstNode.Expression(SynExpr.Lambda(_, _, _, _, range)) -> + | AstNode.Expression(SynExpr.Lambda(_, _, _, _, _, range)) -> Helper.SourceLength.checkSourceLengthRule config range "Lambda function" | _ -> Array.empty diff --git a/src/FSharpLint.Core/Rules/Hints/HintMatcher.fs b/src/FSharpLint.Core/Rules/Hints/HintMatcher.fs index 22b711909..f3e5b50cf 100644 --- a/src/FSharpLint.Core/Rules/Hints/HintMatcher.fs +++ b/src/FSharpLint.Core/Rules/Hints/HintMatcher.fs @@ -214,7 +214,7 @@ module private MatchExpression = /// Check that an infix equality operation is not actually the assignment of a value to a property in a constructor /// or a named parameter in a method call. - let private notPropertyInitialisationOrNamedParameter arguments leftExpr opExpr = + let private notPropertyInitialisationOrNamedParameter arguments leftExpr opExpr = match (leftExpr, opExpr) with | SynExpr.Ident(ident), SynExpr.Ident(opIdent) when opIdent.idText = "op_Equality" -> match arguments.FSharpCheckFileResults with @@ -232,7 +232,8 @@ module private MatchExpression = | :? FSharpField -> false | :? FSharpMemberOrFunctionOrValue as x -> not x.IsProperty | _ -> true - | None -> true } + | None -> true + } |> List.singleton |> Match | None -> @@ -596,23 +597,22 @@ let private hintError typeChecks hint (args:AstNodeRuleParams) range matchedVari let error = System.String.Format(errorFormatString, matched, message) { Range = range; Message = error; SuggestedFix = None; TypeChecks = typeChecks } -let private getMethodParameters (checkFile:FSharpCheckFileResults) (methodIdent:LongIdentWithDots) = - async { - let! symbol = - checkFile.GetSymbolUseAtLocation( - methodIdent.Range.StartLine, - methodIdent.Range.EndColumn, - "", - methodIdent.Lid |> List.map (fun x -> x.idText)) +let private getMethodParameters (checkFile:FSharpCheckFileResults) (methodIdent:LongIdentWithDots) = async { + let! symbol = + checkFile.GetSymbolUseAtLocation( + methodIdent.Range.StartLine, + methodIdent.Range.EndColumn, + "", + methodIdent.Lid |> List.map (fun x -> x.idText)) - return - match symbol with - | Some(symbol) when (symbol.Symbol :? FSharpMemberOrFunctionOrValue) -> - let symbol = symbol.Symbol :?> FSharpMemberOrFunctionOrValue + match symbol with + | Some(symbol) when (symbol.Symbol :? FSharpMemberOrFunctionOrValue) -> + let symbol = symbol.Symbol :?> FSharpMemberOrFunctionOrValue - if symbol.IsMember then symbol.CurriedParameterGroups |> Seq.tryHead - else None - | _ -> None } + if symbol.IsMember then return symbol.CurriedParameterGroups |> Seq.tryHead + else return None + | _ -> return None +} /// Check a lambda function can be replaced with a function, /// it will not be if the lambda is automatically getting @@ -620,12 +620,13 @@ let private getMethodParameters (checkFile:FSharpCheckFileResults) (methodIdent: let private canReplaceLambdaWithFunction checkFile methodIdent index = async { let! parameters = getMethodParameters checkFile methodIdent - return - match parameters with - | Some(parameters) when index < Seq.length parameters -> - let parameter = parameters.[index] - not (parameter.Type.HasTypeDefinition && parameter.Type.TypeDefinition.IsDelegate) - | _ -> true } + + match parameters with + | Some(parameters) when index < Seq.length parameters -> + let parameter = parameters.[index] + return not (parameter.Type.HasTypeDefinition && parameter.Type.TypeDefinition.IsDelegate) + | _ -> return true +} /// Check if lambda can be replaced with an identifier (cannot in the case when is a parameter with the type of a delegate). let private (|RequiresCheck|CanBeReplaced|CannotBeReplaced|) (breadcrumbs, range) = @@ -677,7 +678,7 @@ let private confirmFuzzyMatch (args:AstNodeRuleParams) (hint:HintParser.Hint) = match args.CheckInfo with | Some checkFile -> let typeCheck = canReplaceLambdaWithFunction checkFile methodIdent index - suggest (typeCheck::typeChecks) + suggest (typeCheck ::typeChecks) | None -> () | CanBeReplaced -> suggest typeChecks | CannotBeReplaced -> () diff --git a/src/FSharpLint.Core/paket.references b/src/FSharpLint.Core/paket.references index b7eae3fb6..1d9ab19b3 100644 --- a/src/FSharpLint.Core/paket.references +++ b/src/FSharpLint.Core/paket.references @@ -5,3 +5,4 @@ Dotnet.ProjInfo.Workspace Dotnet.ProjInfo.Workspace.FCS FSharp.Core Newtonsoft.Json +Microsoft.Build.Utilities.Core \ No newline at end of file diff --git a/tests/FSharpLint.Benchmarks/Benchmark.fs b/tests/FSharpLint.Benchmarks/Benchmark.fs index bc7d8cf19..86bf2b808 100644 --- a/tests/FSharpLint.Benchmarks/Benchmark.fs +++ b/tests/FSharpLint.Benchmarks/Benchmark.fs @@ -12,7 +12,7 @@ type Benchmark () = let generateAst source sourceFile = let sourceText = SourceText.ofString source - let checker = FSharpChecker.Create() + let checker = FSharpChecker.Create(keepAssemblyContents=true) let (options, _diagnostics) = checker.GetProjectOptionsFromScript(sourceFile, sourceText) diff --git a/tests/FSharpLint.Benchmarks/FSharpLint.Benchmarks.fsproj b/tests/FSharpLint.Benchmarks/FSharpLint.Benchmarks.fsproj index 7c5760977..c98bcdaf1 100644 --- a/tests/FSharpLint.Benchmarks/FSharpLint.Benchmarks.fsproj +++ b/tests/FSharpLint.Benchmarks/FSharpLint.Benchmarks.fsproj @@ -2,7 +2,7 @@ Exe - netcoreapp3.1 + net5.0 diff --git a/tests/FSharpLint.Console.Tests/FSharpLint.Console.Tests.fsproj b/tests/FSharpLint.Console.Tests/FSharpLint.Console.Tests.fsproj index bc7bd5b0a..e26e69a62 100644 --- a/tests/FSharpLint.Console.Tests/FSharpLint.Console.Tests.fsproj +++ b/tests/FSharpLint.Console.Tests/FSharpLint.Console.Tests.fsproj @@ -1,7 +1,7 @@  - netcoreapp3.1 + net5.0 FSharpLint.Console.Tests diff --git a/tests/FSharpLint.Core.Tests/FSharpLint.Core.Tests.fsproj b/tests/FSharpLint.Core.Tests/FSharpLint.Core.Tests.fsproj index b168cca36..05623dee5 100644 --- a/tests/FSharpLint.Core.Tests/FSharpLint.Core.Tests.fsproj +++ b/tests/FSharpLint.Core.Tests/FSharpLint.Core.Tests.fsproj @@ -1,7 +1,7 @@  - netcoreapp3.1 + net5.0 FSharpLint.Core.Tests diff --git a/tests/FSharpLint.Core.Tests/Rules/Hints/HintMatcher.fs b/tests/FSharpLint.Core.Tests/Rules/Hints/HintMatcher.fs index 0e76f1323..92d777617 100644 --- a/tests/FSharpLint.Core.Tests/Rules/Hints/HintMatcher.fs +++ b/tests/FSharpLint.Core.Tests/Rules/Hints/HintMatcher.fs @@ -1,9 +1,15 @@ -module FSharpLint.Core.Tests.Rules.Hints.HintMatcher +module rec FSharpLint.Core.Tests.Rules.Hints.HintMatcher // fsharplint:disable TupleIndentation open NUnit.Framework +type Assert with + static member NoErrors(this:TestHintMatcher) = + if this.NoErrorsExist then () + else + raise (NUnit.Framework.AssertionException($"No errors were expected, but there were some errors. Errors were:\n{this.ErrorMsg}")) + [] type TestHintMatcher() = inherit TestHintMatcherBase.TestHintMatcherBase() @@ -370,11 +376,11 @@ System.String.Compare("dog", "cat")""") module Goat type Bar() = - static member SomeMethod(foo: bool) = () + static member SomeMethod(foo:bool) = () Bar.SomeMethod(foo = true)""") - Assert.IsFalse(this.ErrorsExist) + Assert.NoErrors(this) [] member this.``Named parameter in object method call should not be treated as infix operation``() = @@ -388,7 +394,7 @@ type Bar() = Bar().SomeMethod(foo = true)""") - Assert.IsFalse(this.ErrorsExist) + Assert.NoErrors(this) [] member this.NamedParameterWithMoreThanOneParameterShouldNotBeTreatedAsInfixOperation() = @@ -402,7 +408,7 @@ type Bar() = Bar.SomeMethod(woof = 5, foo = true)""") - Assert.IsFalse(this.ErrorsExist) + Assert.NoErrors(this) /// Regression test for: https://github.com/fsprojects/FSharpLint/issues/128 [] @@ -418,7 +424,7 @@ do (inputs = args, raiseOnUsage = false, ignoreMissing = true, errorHandler = ProcessExiter())""", checkFile=false) // This test only passes with typechecking disabled. - Assert.IsFalse(this.ErrorsExist) + Assert.NoErrors(this) [] member this.``Named parameter in object method call with more than one arg should not be treated as infix operation``() = @@ -432,7 +438,7 @@ type Bar() = Bar().SomeMethod(woof = 5, foo = true)""") - Assert.IsFalse(this.ErrorsExist) + Assert.NoErrors(this) [] member this.PropertyInitShouldNotBeTreatedAsInfixOperation() = @@ -446,7 +452,7 @@ type Bar() = Bar(Foo = true) |> ignore""") - Assert.IsFalse(this.ErrorsExist) + Assert.NoErrors(this) [] member this.PropertyInitWithNewKeywwordShouldNotBeTreatedAsInfixOperation() = @@ -460,7 +466,7 @@ type Bar() = new Bar(Foo = true) |> ignore""") - Assert.IsFalse(this.ErrorsExist) + Assert.NoErrors(this) [] member this.MultiplePropertyInitWithNewKeywwordShouldNotBeTreatedAsInfixOperation() = @@ -475,7 +481,7 @@ type Bar() = new Bar(Foo = true, Bar = true) |> ignore""") - Assert.IsFalse(this.ErrorsExist) + Assert.NoErrors(this) /// Regression test for: https://github.com/fsprojects/FSharpLint/issues/108 /// Type arguments on a constructor were causing hint to be displayed for property initialisation. @@ -491,7 +497,7 @@ type Bar<'a>() = Bar<_>(Foo = true) |> ignore""") - Assert.IsFalse(this.ErrorsExist) + Assert.NoErrors(this) [] member this.PropertyEqualityOperationShouldBeTreatedAsInfixOperation() = @@ -546,7 +552,7 @@ type TakesDelegate() = TakesDelegate().Foo(fun _ -> ())""") - Assert.IsFalse(this.ErrorsExist) + Assert.NoErrors(this) /// Regression test for: https://github.com/fsprojects/FSharpLint/issues/109 [] @@ -561,7 +567,7 @@ type TakesDelegate() = TakesDelegate().Foo("", fun _ -> ())""") - Assert.IsFalse(this.ErrorsExist) + Assert.NoErrors(this) /// Regression test for: https://github.com/fsprojects/FSharpLint/issues/109 [] @@ -592,7 +598,7 @@ type TakesDelegate() = let object = TakesDelegate() object.Foo("", fun _ -> ())""") - Assert.IsFalse(this.ErrorsExist) + Assert.NoErrors(this) /// Regression test for: https://github.com/fsprojects/FSharpLint/issues/109 [] @@ -608,7 +614,7 @@ type TakesDelegate() = let object = TakesDelegate() object.Foo(fun _ -> ())""") - Assert.IsFalse(this.ErrorsExist) + Assert.NoErrors(this) [] member this.``Operator identifier is correctly written out as an operator symbol in the error message.``() = diff --git a/tests/FSharpLint.Core.Tests/Rules/TestAstNodeRule.fs b/tests/FSharpLint.Core.Tests/Rules/TestAstNodeRule.fs index 53dfe02d2..f1065da7c 100644 --- a/tests/FSharpLint.Core.Tests/Rules/TestAstNodeRule.fs +++ b/tests/FSharpLint.Core.Tests/Rules/TestAstNodeRule.fs @@ -11,7 +11,7 @@ type TestAstNodeRuleBase (rule:Rule) = inherit TestRuleBase.TestRuleBase() override this.Parse (input:string, ?fileName:string, ?checkFile:bool, ?globalConfig:GlobalRuleConfig) = - let checker = FSharpChecker.Create() + let checker = FSharpChecker.Create(keepAssemblyContents=true) let parseResults = match fileName with diff --git a/tests/FSharpLint.Core.Tests/Rules/TestHintMatcherBase.fs b/tests/FSharpLint.Core.Tests/Rules/TestHintMatcherBase.fs index d7f9b4079..dfecbad52 100644 --- a/tests/FSharpLint.Core.Tests/Rules/TestHintMatcherBase.fs +++ b/tests/FSharpLint.Core.Tests/Rules/TestHintMatcherBase.fs @@ -34,7 +34,7 @@ type TestHintMatcherBase () = hintTrie <- generateHintConfig hints override this.Parse (input:string, ?fileName:string, ?checkFile:bool, ?globalConfig:GlobalRuleConfig) = - let checker = FSharpChecker.Create() + let checker = FSharpChecker.Create(keepAssemblyContents=true) let parseResults = match fileName with diff --git a/tests/FSharpLint.Core.Tests/Rules/TestIndentationRule.fs b/tests/FSharpLint.Core.Tests/Rules/TestIndentationRule.fs index 995b44791..36e5a911e 100644 --- a/tests/FSharpLint.Core.Tests/Rules/TestIndentationRule.fs +++ b/tests/FSharpLint.Core.Tests/Rules/TestIndentationRule.fs @@ -12,7 +12,7 @@ type TestIndentationRuleBase (rule:Rule) = inherit TestRuleBase.TestRuleBase() override this.Parse (input:string, ?fileName:string, ?checkFile:bool, ?globalConfig:GlobalRuleConfig) = - let checker = FSharpChecker.Create() + let checker = FSharpChecker.Create(keepAssemblyContents=true) let sourceText = SourceText.ofString input let fileName = fileName |> Option.defaultValue "Test.fsx" diff --git a/tests/FSharpLint.Core.Tests/Rules/TestLineRule.fs b/tests/FSharpLint.Core.Tests/Rules/TestLineRule.fs index 5d77644a1..b35c7f333 100644 --- a/tests/FSharpLint.Core.Tests/Rules/TestLineRule.fs +++ b/tests/FSharpLint.Core.Tests/Rules/TestLineRule.fs @@ -12,7 +12,7 @@ type TestLineRuleBase (rule:Rule) = inherit TestRuleBase.TestRuleBase() override this.Parse (input:string, ?fileName:string, ?checkFile:bool, ?globalConfig:GlobalRuleConfig) = - let checker = FSharpChecker.Create() + let checker = FSharpChecker.Create(keepAssemblyContents=true) let sourceText = SourceText.ofString input let fileName = fileName |> Option.defaultValue "Test.fsx" diff --git a/tests/FSharpLint.Core.Tests/Rules/TestNoTabCharactersRule.fs b/tests/FSharpLint.Core.Tests/Rules/TestNoTabCharactersRule.fs index d0f34704b..b918e456b 100644 --- a/tests/FSharpLint.Core.Tests/Rules/TestNoTabCharactersRule.fs +++ b/tests/FSharpLint.Core.Tests/Rules/TestNoTabCharactersRule.fs @@ -12,7 +12,7 @@ type TestNoTabCharactersRuleBase (rule:Rule) = inherit TestRuleBase.TestRuleBase() override this.Parse (input:string, ?fileName:string, ?checkFile:bool, ?globalConfig:GlobalRuleConfig) = - let checker = FSharpChecker.Create() + let checker = FSharpChecker.Create(keepAssemblyContents=true) let sourceText = SourceText.ofString input let fileName = fileName |> Option.defaultValue "Test.fsx" diff --git a/tests/FSharpLint.Core.Tests/TestUtils.fs b/tests/FSharpLint.Core.Tests/TestUtils.fs index f80b547ad..48deab65d 100644 --- a/tests/FSharpLint.Core.Tests/TestUtils.fs +++ b/tests/FSharpLint.Core.Tests/TestUtils.fs @@ -16,7 +16,7 @@ let private performanceTestSourceFile = basePath "TypeChecker.fs" let generateAst source = - let checker = FSharpChecker.Create() + let checker = FSharpChecker.Create(keepAssemblyContents=true) let sourceText = SourceText.ofString source let options = ParseFile.getProjectOptionsFromScript checker performanceTestSourceFile source diff --git a/tests/FSharpLint.FunctionalTest/FSharpLint.FunctionalTest.fsproj b/tests/FSharpLint.FunctionalTest/FSharpLint.FunctionalTest.fsproj index 74408bf7b..ac0da6312 100644 --- a/tests/FSharpLint.FunctionalTest/FSharpLint.FunctionalTest.fsproj +++ b/tests/FSharpLint.FunctionalTest/FSharpLint.FunctionalTest.fsproj @@ -1,7 +1,7 @@  - netcoreapp3.1 + net5.0 FSharpLint.FunctionalTest diff --git a/tests/FSharpLint.FunctionalTest/TestApi.fs b/tests/FSharpLint.FunctionalTest/TestApi.fs index ba46a06ba..7fa242f75 100644 --- a/tests/FSharpLint.FunctionalTest/TestApi.fs +++ b/tests/FSharpLint.FunctionalTest/TestApi.fs @@ -19,7 +19,7 @@ module TestApi = type TestApi() = let generateAst source = let sourceText = SourceText.ofString source - let checker = FSharpChecker.Create() + let checker = FSharpChecker.Create(keepAssemblyContents=true) let (options, _diagnostics) = checker.GetProjectOptionsFromScript(sourceFile, sourceText) diff --git a/tests/FSharpLint.FunctionalTest/TestConsoleApplication.fs b/tests/FSharpLint.FunctionalTest/TestConsoleApplication.fs index 34442aae4..b50a021a2 100644 --- a/tests/FSharpLint.FunctionalTest/TestConsoleApplication.fs +++ b/tests/FSharpLint.FunctionalTest/TestConsoleApplication.fs @@ -30,7 +30,7 @@ module Tests = "Release" #endif - let dll = basePath "src" "FSharpLint.Console" "bin" binDir "netcoreapp3.1" "dotnet-fsharplint.dll" + let dll = basePath "src" "FSharpLint.Console" "bin" binDir "net5.0" "dotnet-fsharplint.dll" let startInfo = ProcessStartInfo (FileName = "dotnet",