diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 041b681..1a6b38e 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "paket": { - "version": "6.2.1", + "version": "7.2.1", "commands": [ "paket" ] diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..1b382a5 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,32 @@ +# Auto detect text files and perform LF normalization +* text=auto eol=lf + +# Custom for Visual Studio +*.cs text diff=csharp +*.sln text eol=crlf merge=union +*.csproj text merge=union +*.vbproj text merge=union +*.fsproj text merge=union +*.dbproj text merge=union + +# Standard to msysgit +*.doc diff=astextplain +*.DOC diff=astextplain +*.docx diff=astextplain +*.DOCX diff=astextplain +*.dot diff=astextplain +*.DOT diff=astextplain +*.pdf diff=astextplain +*.PDF diff=astextplain +*.rtf diff=astextplain +*.RTF diff=astextplain + +*.sh text eol=lf +*.cmd text eol=crlf +*.bat text eol=crlf + +*.png binary +*.exe binary + +# correct file type displays in gitlab to not be so overwhelmingly HTML +tests/FSharp.Data.Tests/Data/**.htm* -linguist-detectable diff --git a/paket.dependencies b/paket.dependencies index 94763ac..1ca7b68 100644 --- a/paket.dependencies +++ b/paket.dependencies @@ -1,7 +1,7 @@ source https://api.nuget.org/v3/index.json storage: none -framework: net5.0, net6.0 +framework: net5.0, net6.0, net7.0 nuget Argu nuget coverlet.collector diff --git a/paket.lock b/paket.lock index b968881..e7cc3d4 100644 --- a/paket.lock +++ b/paket.lock @@ -1,388 +1,96 @@ STORAGE: NONE -RESTRICTION: || (== net5.0) (== net6.0) +RESTRICTION: || (== net5.0) (== net6.0) (== net7.0) NUGET remote: https://api.nuget.org/v3/index.json Argu (6.1.1) FSharp.Core (>= 4.3.2) System.Configuration.ConfigurationManager (>= 4.4) - coverlet.collector (3.1) - FSharp.Compiler.Service (41.0.1) - FSharp.Core (6.0.1) - Microsoft.Build.Framework (>= 16.11) - Microsoft.Build.Tasks.Core (>= 16.11) - Microsoft.Build.Utilities.Core (>= 16.11) + coverlet.collector (6.0) + FSharp.Compiler.Service (43.7.300) + FSharp.Core (7.0.300) System.Buffers (>= 4.5.1) - System.Collections.Immutable (>= 5.0) - System.Diagnostics.Process (>= 4.3) - System.Diagnostics.TraceSource (>= 4.3) - System.Linq.Expressions (>= 4.3) - System.Linq.Queryable (>= 4.3) - System.Memory (>= 4.5.4) - System.Net.Requests (>= 4.3) - System.Net.Security (>= 4.3.1) - System.Reflection.Emit (>= 4.3) - System.Reflection.Metadata (>= 5.0) - System.Reflection.TypeExtensions (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.CompilerServices.Unsafe (>= 5.0) - System.Runtime.InteropServices (>= 4.3) - System.Runtime.Loader (>= 4.3) - System.Security.Claims (>= 4.3) - System.Security.Cryptography.Algorithms (>= 4.3) - System.Security.Principal (>= 4.3) - System.Threading.Tasks.Parallel (>= 4.3) - System.Threading.Thread (>= 4.3) - System.Threading.ThreadPool (>= 4.3) - FSharp.Core (6.0.1) - Iced (1.15) - ICSharpCode.Decompiler (7.1.0.6543) - System.Collections.Immutable (>= 5.0) - System.Reflection.Metadata (>= 5.0) - Microsoft.Bcl.AsyncInterfaces (6.0) - Microsoft.Build.Framework (16.11) - System.Security.Permissions (>= 4.7) - Microsoft.Build.Tasks.Core (16.11) - Microsoft.Build.Framework (>= 16.11) - Microsoft.Build.Utilities.Core (>= 16.11) - Microsoft.NET.StringTools (>= 1.0) - Microsoft.Win32.Registry (>= 4.3) - System.CodeDom (>= 4.4) - System.Collections.Immutable (>= 5.0) - System.Reflection.Metadata (>= 1.6) - 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.11) - Microsoft.Build.Framework (>= 16.11) - Microsoft.NET.StringTools (>= 1.0) - Microsoft.Win32.Registry (>= 4.3) - System.Collections.Immutable (>= 5.0) - System.Configuration.ConfigurationManager (>= 4.7) - System.Security.Permissions (>= 4.7) - System.Text.Encoding.CodePages (>= 4.0.1) - Microsoft.CodeCoverage (17.0) - Microsoft.Diagnostics.NETCore.Client (0.2.251802) - Microsoft.Bcl.AsyncInterfaces (>= 1.1) - Microsoft.Extensions.Logging (>= 2.1.1) - Microsoft.Diagnostics.Runtime (2.0.226801) - Microsoft.Diagnostics.NETCore.Client (>= 0.2.221401) - System.Buffers (>= 4.5.1) - System.Collections.Immutable (>= 5.0) - System.Memory (>= 4.5.4) - System.Reflection.Metadata (>= 5.0) - System.Runtime.CompilerServices.Unsafe (>= 4.5.3) - Microsoft.Extensions.DependencyInjection (6.0) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 6.0) - System.Runtime.CompilerServices.Unsafe (>= 6.0) - Microsoft.Extensions.DependencyInjection.Abstractions (6.0) - Microsoft.Extensions.Logging (6.0) - Microsoft.Extensions.DependencyInjection (>= 6.0) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 6.0) - Microsoft.Extensions.Logging.Abstractions (>= 6.0) - Microsoft.Extensions.Options (>= 6.0) + System.Collections.Immutable (>= 6.0) System.Diagnostics.DiagnosticSource (>= 6.0) - Microsoft.Extensions.Logging.Abstractions (6.0) - System.Buffers (>= 4.5.1) - restriction: || (== net5.0) (&& (== net6.0) (>= net461)) - System.Memory (>= 4.5.4) - restriction: || (== net5.0) (&& (== net6.0) (>= net461)) - Microsoft.Extensions.Options (6.0) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 6.0) - Microsoft.Extensions.Primitives (>= 6.0) - Microsoft.Extensions.Primitives (6.0) + System.Memory (>= 4.5.5) + System.Reflection.Emit (>= 4.7) + System.Reflection.Metadata (>= 6.0.1) System.Runtime.CompilerServices.Unsafe (>= 6.0) - Microsoft.NET.StringTools (1.0) - System.Memory (>= 4.5.4) + FSharp.Core (7.0.300) + Iced (1.18) + ICSharpCode.Decompiler (8.0.0.7345) + System.Collections.Immutable (>= 6.0) + System.Reflection.Metadata (>= 6.0) + Microsoft.Bcl.AsyncInterfaces (7.0) - restriction: || (== net5.0) (&& (== net7.0) (< net6.0)) + Microsoft.CodeCoverage (17.6) + Microsoft.Diagnostics.NETCore.Client (0.2.421201) + Microsoft.Bcl.AsyncInterfaces (>= 1.1) - restriction: || (== net5.0) (&& (== net7.0) (< net6.0)) + Microsoft.Extensions.Logging (>= 2.1.1) + Microsoft.Diagnostics.Runtime (2.4.416101) + Microsoft.Diagnostics.NETCore.Client (>= 0.2.251802) + System.Collections.Immutable (>= 5.0) System.Runtime.CompilerServices.Unsafe (>= 5.0) - Microsoft.NET.Test.Sdk (17.0) - Microsoft.CodeCoverage (>= 17.0) - Microsoft.TestPlatform.TestHost (>= 17.0) - Microsoft.NETCore.Platforms (6.0) + Microsoft.Extensions.DependencyInjection (7.0) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 7.0) + Microsoft.Extensions.DependencyInjection.Abstractions (7.0) + Microsoft.Extensions.Logging (7.0) + Microsoft.Extensions.DependencyInjection (>= 7.0) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 7.0) + Microsoft.Extensions.Logging.Abstractions (>= 7.0) + Microsoft.Extensions.Options (>= 7.0) + System.Diagnostics.DiagnosticSource (>= 7.0) - restriction: || (== net5.0) (&& (== net6.0) (>= net462)) (&& (== net6.0) (< netstandard2.1)) (&& (== net7.0) (>= net462)) (&& (== net7.0) (< net6.0)) (&& (== net7.0) (< netstandard2.1)) + Microsoft.Extensions.Logging.Abstractions (7.0) + System.Buffers (>= 4.5.1) - restriction: || (== net5.0) (&& (== net6.0) (>= net462)) (&& (== net7.0) (>= net462)) (&& (== net7.0) (< net6.0)) + System.Memory (>= 4.5.5) - restriction: || (== net5.0) (&& (== net6.0) (>= net462)) (&& (== net7.0) (>= net462)) (&& (== net7.0) (< net6.0)) + Microsoft.Extensions.Options (7.0.1) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 7.0) + Microsoft.Extensions.Primitives (>= 7.0) + Microsoft.Extensions.Primitives (7.0) + System.Memory (>= 4.5.5) - restriction: || (== net5.0) (&& (== net6.0) (>= net462)) (&& (== net7.0) (>= net462)) (&& (== net7.0) (< net6.0)) + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (== net5.0) (== net6.0) (&& (== net7.0) (>= net462)) (&& (== net7.0) (< net6.0)) + Microsoft.NET.Test.Sdk (17.6) + Microsoft.CodeCoverage (>= 17.6) + Microsoft.TestPlatform.TestHost (>= 17.6) + Microsoft.NETCore.Platforms (7.0.2) Microsoft.NETCore.Targets (5.0) - Microsoft.TestPlatform.ObjectModel (17.0) - NuGet.Frameworks (>= 5.0) + Microsoft.TestPlatform.ObjectModel (17.6) + NuGet.Frameworks (>= 5.11) System.Reflection.Metadata (>= 1.6) - Microsoft.TestPlatform.TestHost (17.0) - Microsoft.TestPlatform.ObjectModel (>= 17.0) - Newtonsoft.Json (>= 9.0.1) - Microsoft.Win32.Primitives (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Runtime (>= 4.3) - Microsoft.Win32.Registry (5.0) - System.Security.AccessControl (>= 5.0) - System.Security.Principal.Windows (>= 5.0) - Microsoft.Win32.SystemEvents (6.0) + Microsoft.TestPlatform.TestHost (17.6) + Microsoft.TestPlatform.ObjectModel (>= 17.6) + Newtonsoft.Json (>= 13.0.1) + Microsoft.Win32.SystemEvents (7.0) - restriction: || (&& (== net5.0) (>= net6.0)) (== net6.0) (== net7.0) NETStandard.Library (2.0.3) Microsoft.NETCore.Platforms (>= 1.1) - Newtonsoft.Json (13.0.1) - NuGet.Frameworks (5.11) - 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) + Newtonsoft.Json (13.0.3) + NuGet.Frameworks (6.6) runtime.native.System (4.3.1) Microsoft.NETCore.Platforms (>= 1.1.1) Microsoft.NETCore.Targets (>= 1.1.3) - runtime.native.System.Net.Http (4.3.1) - Microsoft.NETCore.Platforms (>= 1.1.1) - Microsoft.NETCore.Targets (>= 1.1.3) - runtime.native.System.Net.Security (4.3.1) - Microsoft.NETCore.Platforms (>= 1.1.1) - Microsoft.NETCore.Targets (>= 1.1.3) - runtime.native.System.Security.Cryptography.Apple (4.3.1) - runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple (>= 4.3.1) - runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - 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) - 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.Apple (4.3.1) - 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) System.Buffers (4.5.1) - System.CodeDom (6.0) - System.Collections (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Runtime (>= 4.3) - System.Collections.Concurrent (4.3) - System.Collections (>= 4.3) - System.Diagnostics.Debug (>= 4.3) - System.Diagnostics.Tracing (>= 4.3) - System.Globalization (>= 4.3) - System.Reflection (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Threading (>= 4.3) - System.Threading.Tasks (>= 4.3) - System.Collections.Immutable (6.0) - System.Memory (>= 4.5.4) - restriction: || (== net5.0) (&& (== net6.0) (>= net461)) - System.Runtime.CompilerServices.Unsafe (>= 6.0) - System.Configuration.ConfigurationManager (6.0) - System.Security.Cryptography.ProtectedData (>= 6.0) - System.Security.Permissions (>= 6.0) - System.Diagnostics.Debug (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Runtime (>= 4.3) - System.Diagnostics.DiagnosticSource (6.0) - System.Runtime.CompilerServices.Unsafe (>= 6.0) - 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.Diagnostics.TraceSource (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - runtime.native.System (>= 4.3) - System.Collections (>= 4.3) - 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.Diagnostics.Tracing (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Runtime (>= 4.3) - System.Drawing.Common (6.0) - Microsoft.Win32.SystemEvents (>= 6.0) - System.Formats.Asn1 (6.0) - System.Buffers (>= 4.5.1) - restriction: || (== net5.0) (&& (== net6.0) (>= net461)) - System.Memory (>= 4.5.4) - restriction: || (== net5.0) (&& (== net6.0) (>= net461)) + System.Collections.Immutable (7.0) + System.Memory (>= 4.5.5) - restriction: || (== net5.0) (&& (== net6.0) (>= net462)) (&& (== net7.0) (>= net462)) (&& (== net7.0) (< net6.0)) + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (== net5.0) (== net6.0) (&& (== net7.0) (>= net462)) (&& (== net7.0) (< net6.0)) + System.Configuration.ConfigurationManager (7.0) + System.Diagnostics.EventLog (>= 7.0) - restriction: || (&& (== net5.0) (>= net7.0)) (&& (== net6.0) (>= net7.0)) (== net7.0) + System.Security.Cryptography.ProtectedData (>= 7.0) + System.Security.Permissions (>= 7.0) + System.Diagnostics.DiagnosticSource (7.0.2) + System.Memory (>= 4.5.5) - restriction: || (== net5.0) (&& (== net6.0) (>= net462)) (&& (== net7.0) (>= net462)) (&& (== net7.0) (< net6.0)) + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (== net5.0) (== net6.0) (&& (== net7.0) (>= net462)) (&& (== net7.0) (< net6.0)) + System.Diagnostics.EventLog (7.0) - restriction: || (&& (== net5.0) (>= net7.0)) (&& (== net6.0) (>= net7.0)) (== net7.0) + System.Drawing.Common (7.0) - restriction: || (&& (== net5.0) (>= net6.0)) (== net6.0) (== net7.0) + Microsoft.Win32.SystemEvents (>= 7.0) - restriction: || (&& (== net5.0) (>= net6.0)) (== net6.0) (== net7.0) System.Globalization (4.3) Microsoft.NETCore.Platforms (>= 1.1) Microsoft.NETCore.Targets (>= 1.1) System.Runtime (>= 4.3) - System.Globalization.Calendars (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Globalization (>= 4.3) - System.Runtime (>= 4.3) - System.Globalization.Extensions (4.3) - 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) 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) - 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.Linq.Queryable (4.3) - System.Collections (>= 4.3) - System.Diagnostics.Debug (>= 4.3) - System.Linq (>= 4.3) - System.Linq.Expressions (>= 4.3) - System.Reflection (>= 4.3) - System.Reflection.Extensions (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Memory (4.5.4) - System.Net.Http (4.3.4) - Microsoft.NETCore.Platforms (>= 1.1.1) - runtime.native.System (>= 4.3) - runtime.native.System.Net.Http (>= 4.3) - runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.2) - System.Collections (>= 4.3) - System.Diagnostics.Debug (>= 4.3) - System.Diagnostics.DiagnosticSource (>= 4.3) - System.Diagnostics.Tracing (>= 4.3) - System.Globalization (>= 4.3) - System.Globalization.Extensions (>= 4.3) - System.IO (>= 4.3) - System.IO.FileSystem (>= 4.3) - System.Net.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.Security.Cryptography.Algorithms (>= 4.3) - System.Security.Cryptography.Encoding (>= 4.3) - System.Security.Cryptography.OpenSsl (>= 4.3) - System.Security.Cryptography.Primitives (>= 4.3) - System.Security.Cryptography.X509Certificates (>= 4.3) - System.Text.Encoding (>= 4.3) - System.Threading (>= 4.3) - System.Threading.Tasks (>= 4.3) - System.Net.Primitives (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) - System.Net.Requests (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - System.Collections (>= 4.3) - System.Diagnostics.Debug (>= 4.3) - System.Diagnostics.Tracing (>= 4.3) - System.Globalization (>= 4.3) - System.IO (>= 4.3) - System.Net.Http (>= 4.3) - System.Net.Primitives (>= 4.3) - System.Net.WebHeaderCollection (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Threading (>= 4.3) - System.Threading.Tasks (>= 4.3) - System.Net.Security (4.3.2) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.Win32.Primitives (>= 4.3) - runtime.native.System (>= 4.3) - runtime.native.System.Net.Security (>= 4.3) - runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.2) - System.Collections (>= 4.3) - System.Collections.Concurrent (>= 4.3) - System.Diagnostics.Tracing (>= 4.3) - System.Globalization (>= 4.3) - System.Globalization.Extensions (>= 4.3) - System.IO (>= 4.3) - System.Net.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.Security.Claims (>= 4.3) - System.Security.Cryptography.Algorithms (>= 4.3) - System.Security.Cryptography.Encoding (>= 4.3) - System.Security.Cryptography.OpenSsl (>= 4.3) - System.Security.Cryptography.Primitives (>= 4.3) - System.Security.Cryptography.X509Certificates (>= 4.3) - System.Security.Principal (>= 4.3) - System.Text.Encoding (>= 4.3) - System.Threading (>= 4.3) - System.Threading.Tasks (>= 4.3) - System.Threading.ThreadPool (>= 4.3) - System.Net.WebHeaderCollection (4.3) - System.Collections (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - 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.Memory (4.5.5) System.Reflection (4.3) Microsoft.NETCore.Platforms (>= 1.1) Microsoft.NETCore.Targets (>= 1.1) @@ -390,22 +98,18 @@ NUGET System.Reflection.Primitives (>= 4.3) System.Runtime (>= 4.3) System.Reflection.Emit (4.7) - System.Reflection.Emit.ILGeneration (4.7) - System.Reflection.Emit.Lightweight (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 (6.0) - System.Collections.Immutable (>= 6.0) + System.Reflection.Metadata (7.0.1) + System.Collections.Immutable (>= 7.0) + System.Memory (>= 4.5.5) - restriction: || (== net5.0) (&& (== net6.0) (>= net462)) (&& (== net7.0) (>= net462)) (&& (== net7.0) (< net6.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 (6.0) - System.Memory (>= 4.5.4) - restriction: || (== net5.0) (&& (== net6.0) (>= net461)) System.Resources.ResourceManager (4.3) Microsoft.NETCore.Platforms (>= 1.1) Microsoft.NETCore.Targets (>= 1.1) @@ -416,10 +120,6 @@ NUGET Microsoft.NETCore.Platforms (>= 1.1.1) Microsoft.NETCore.Targets (>= 1.1.3) System.Runtime.CompilerServices.Unsafe (6.0) - 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) @@ -439,131 +139,18 @@ 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.Runtime.Numerics (4.3) - System.Globalization (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Security.AccessControl (6.0) - System.Security.Principal.Windows (>= 5.0) - restriction: || (== net5.0) (&& (== net6.0) (>= net461)) - System.Security.Claims (4.3) - System.Collections (>= 4.3) - System.Globalization (>= 4.3) - System.IO (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Security.Principal (>= 4.3) - System.Security.Cryptography.Algorithms (4.3.1) - Microsoft.NETCore.Platforms (>= 1.1) - runtime.native.System.Security.Cryptography.Apple (>= 4.3.1) - runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.2) - System.Collections (>= 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.Runtime.Numerics (>= 4.3) - System.Security.Cryptography.Encoding (>= 4.3) - System.Security.Cryptography.Primitives (>= 4.3) - System.Text.Encoding (>= 4.3) - System.Security.Cryptography.Cng (5.0) - System.Formats.Asn1 (>= 5.0) - System.Security.Cryptography.Csp (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - System.IO (>= 4.3) - System.Reflection (>= 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.Security.Cryptography.Algorithms (>= 4.3) - System.Security.Cryptography.Encoding (>= 4.3) - System.Security.Cryptography.Primitives (>= 4.3) - System.Text.Encoding (>= 4.3) - System.Threading (>= 4.3) - System.Security.Cryptography.Encoding (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3) - System.Collections (>= 4.3) - System.Collections.Concurrent (>= 4.3) - System.Linq (>= 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.Security.Cryptography.Primitives (>= 4.3) - System.Text.Encoding (>= 4.3) - System.Security.Cryptography.OpenSsl (5.0) - System.Formats.Asn1 (>= 5.0) - System.Security.Cryptography.Pkcs (6.0) - System.Formats.Asn1 (>= 6.0) - System.Security.Cryptography.Cng (>= 5.0) - restriction: || (== net5.0) (&& (== net6.0) (< netcoreapp3.1)) (&& (== net6.0) (< netstandard2.1)) - System.Security.Cryptography.Primitives (4.3) - System.Diagnostics.Debug (>= 4.3) - System.Globalization (>= 4.3) - System.IO (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Threading (>= 4.3) - System.Threading.Tasks (>= 4.3) - System.Security.Cryptography.ProtectedData (6.0) - System.Memory (>= 4.5.4) - restriction: == net5.0 - System.Security.Cryptography.X509Certificates (4.3.2) - Microsoft.NETCore.Platforms (>= 1.1) - runtime.native.System (>= 4.3) - runtime.native.System.Net.Http (>= 4.3) - runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.2) - System.Collections (>= 4.3) - System.Diagnostics.Debug (>= 4.3) - System.Globalization (>= 4.3) - System.Globalization.Calendars (>= 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.Runtime.Numerics (>= 4.3) - System.Security.Cryptography.Algorithms (>= 4.3) - System.Security.Cryptography.Cng (>= 4.3) - System.Security.Cryptography.Csp (>= 4.3) - System.Security.Cryptography.Encoding (>= 4.3) - System.Security.Cryptography.OpenSsl (>= 4.3) - System.Security.Cryptography.Primitives (>= 4.3) - System.Text.Encoding (>= 4.3) - System.Threading (>= 4.3) - System.Security.Cryptography.Xml (6.0) - System.Memory (>= 4.5.4) - restriction: == net5.0 - System.Security.AccessControl (>= 6.0) - System.Security.Cryptography.Pkcs (>= 6.0) - System.Security.Permissions (6.0) - System.Security.AccessControl (>= 6.0) - System.Windows.Extensions (>= 6.0) - System.Security.Principal (4.3) - System.Runtime (>= 4.3) - System.Security.Principal.Windows (5.0) + System.Security.AccessControl (6.0) - restriction: || (== net5.0) (&& (== net6.0) (>= net462)) (&& (== net7.0) (>= net462)) (&& (== net7.0) (< net6.0)) + System.Security.Principal.Windows (>= 5.0) - restriction: || (== net5.0) (&& (== net6.0) (>= net461)) (&& (== net7.0) (>= net461)) (&& (== net7.0) (< net6.0)) + System.Security.Cryptography.ProtectedData (7.0.1) + System.Memory (>= 4.5.5) - restriction: || (== net5.0) (&& (== net7.0) (< net6.0)) + System.Security.Permissions (7.0) + System.Security.AccessControl (>= 6.0) - restriction: || (== net5.0) (&& (== net6.0) (>= net462)) (&& (== net7.0) (>= net462)) (&& (== net7.0) (< net6.0)) + System.Windows.Extensions (>= 7.0) - restriction: || (&& (== net5.0) (>= net6.0)) (== net6.0) (== net7.0) + System.Security.Principal.Windows (5.0) - restriction: || (== net5.0) (&& (== net6.0) (>= net462)) (&& (== net7.0) (>= net461)) (&& (== net7.0) (>= net462)) (&& (== net7.0) (< net6.0)) System.Text.Encoding (4.3) Microsoft.NETCore.Platforms (>= 1.1) Microsoft.NETCore.Targets (>= 1.1) System.Runtime (>= 4.3) - System.Text.Encoding.CodePages (6.0) - System.Runtime.CompilerServices.Unsafe (>= 6.0) - 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) @@ -571,38 +158,23 @@ NUGET Microsoft.NETCore.Platforms (>= 1.1) Microsoft.NETCore.Targets (>= 1.1) System.Runtime (>= 4.3) - System.Threading.Tasks.Dataflow (6.0) - System.Threading.Tasks.Parallel (4.3) - System.Collections.Concurrent (>= 4.3) - System.Diagnostics.Debug (>= 4.3) - System.Diagnostics.Tracing (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Threading (>= 4.3) - System.Threading.Tasks (>= 4.3) - System.Threading.Thread (4.3) - System.Runtime (>= 4.3) - System.Threading.ThreadPool (4.3) - System.Runtime (>= 4.3) - System.Runtime.Handles (>= 4.3) - System.Windows.Extensions (6.0) - System.Drawing.Common (>= 6.0) - xunit (2.4.1) - xunit.analyzers (>= 0.10) - xunit.assert (2.4.1) - xunit.core (2.4.1) + System.Windows.Extensions (7.0) - restriction: || (&& (== net5.0) (>= net6.0)) (== net6.0) (== net7.0) + System.Drawing.Common (>= 7.0) - restriction: || (&& (== net5.0) (>= net6.0)) (== net6.0) (== net7.0) + xunit (2.4.2) + xunit.analyzers (>= 1.0) + xunit.assert (>= 2.4.2) + xunit.core (2.4.2) xunit.abstractions (2.0.3) - xunit.analyzers (0.10) - xunit.assert (2.4.1) + xunit.analyzers (1.1) + xunit.assert (2.4.2) NETStandard.Library (>= 1.6.1) - xunit.core (2.4.1) - xunit.extensibility.core (2.4.1) - xunit.extensibility.execution (2.4.1) - xunit.extensibility.core (2.4.1) + xunit.core (2.4.2) + xunit.extensibility.core (2.4.2) + xunit.extensibility.execution (2.4.2) + xunit.extensibility.core (2.4.2) NETStandard.Library (>= 1.6.1) xunit.abstractions (>= 2.0.3) - xunit.extensibility.execution (2.4.1) + xunit.extensibility.execution (2.4.2) NETStandard.Library (>= 1.6.1) - xunit.extensibility.core (2.4.1) - xunit.runner.visualstudio (2.4.3) + xunit.extensibility.core (2.4.2) + xunit.runner.visualstudio (2.4.5) diff --git a/src/fasmi/Compilation.fs b/src/fasmi/Compilation.fs index d045cbf..c22d6fb 100644 --- a/src/fasmi/Compilation.fs +++ b/src/fasmi/Compilation.fs @@ -3,10 +3,17 @@ open System open FileSystem open FSharp.Compiler.CodeAnalysis -// the Assembly attribute to build output as net5.0/net6.0 +// the Assembly attribute to build output as net5.0/net6.0/net7.0 let netAttr = - #if NET6_0 +#if NET7_0 + """ +namespace Microsoft.BuildSettings +[] +do () +""" +#endif +#if NET6_0 """ namespace Microsoft.BuildSettings [] @@ -24,7 +31,7 @@ do () let netAttrName = "NetAssemblyAttr.fs" -// check the net5.0/net6.0 assembly attribute file exists or create it +// check the net5.0/net6.0/net7.0 assembly attribute file exists or create it let ensureNetAttr asmPath = let filePath = dir asmPath netAttrName if not (IO.File.Exists filePath) then @@ -39,8 +46,13 @@ let compile (path: string) (asmPath: string) = // find .net assembly path let netPath = let runtimeDir = System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory() +#if NET7_0 + let packDir = + IO.Directory.GetDirectories(runtimeDir "../../../packs/Microsoft.NETCore.App.Ref/", "7.0.*") + |> Seq.max + IO.Path.GetFullPath(packDir "ref/net7.0") +#endif #if NET6_0 - let packDir = IO.Directory.GetDirectories(runtimeDir "../../../packs/Microsoft.NETCore.App.Ref/", "6.0.*") |> Seq.max @@ -64,6 +76,10 @@ let compile (path: string) (asmPath: string) = "--define:NETCOREAPP" "--define:NET5_0" "--define:NET5_0_OR_GREATER" + #if NET7_0 + "--define:NET7_0" + "--define:NET7_0_OR_GREATER" + #endif #if NET6_0 "--define:NET6_0" "--define:NET6_0_OR_GREATER" diff --git a/src/fasmi/fasmi.fsproj b/src/fasmi/fasmi.fsproj index d9d1042..ddc79e2 100644 --- a/src/fasmi/fasmi.fsproj +++ b/src/fasmi/fasmi.fsproj @@ -2,7 +2,7 @@ Exe - net5.0;net6.0 + net5.0;net6.0;net7.0 true fasmi ./nuget diff --git a/tests/fasmi.tests.source/Source.fs b/tests/fasmi.tests.source/Source.fs index 70a688c..bdd1755 100644 --- a/tests/fasmi.tests.source/Source.fs +++ b/tests/fasmi.tests.source/Source.fs @@ -10,3 +10,9 @@ let abs x = let toString (x: int) = x.ToString() + +type HelloWriter(x) = + member this.Hello() = System.Console.WriteLine $"hello {x}" + +let sayHello (x: int) = + HelloWriter(x).Hello() diff --git a/tests/fasmi.tests.source/fasmi.tests.source.fsproj b/tests/fasmi.tests.source/fasmi.tests.source.fsproj index 411af2e..95999ce 100644 --- a/tests/fasmi.tests.source/fasmi.tests.source.fsproj +++ b/tests/fasmi.tests.source/fasmi.tests.source.fsproj @@ -1,7 +1,7 @@  - net6.0 + net5.0;net6.0;net7.0 true diff --git a/tests/fasmi.tests/Tests.fs b/tests/fasmi.tests/Tests.fs index 18a8a1c..246323e 100644 --- a/tests/fasmi.tests/Tests.fs +++ b/tests/fasmi.tests/Tests.fs @@ -8,17 +8,6 @@ open Xunit // generated asm is platform sensitive due to differences in call conventions let isWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) -// normalize line endings for string comparions -let normalizeLineEnds (s: string) = - if isWindows then - s - else - s.Replace("\r\n", "\n") - -module Assert = - let EqualString(x, y) = Assert.Equal(normalizeLineEnds x, normalizeLineEnds y) - - // disassemble en single method from the fasmi.tests.source project // notice that this project is *ALWAYS* compiled in release to produce // the same optimized IL. @@ -31,7 +20,7 @@ let disassembleFromSourceProject methodName = failwith $"Function '%s{methodName}' not found" Disassembly.withRuntime (fun runtime -> - use writer = new IO.StringWriter() + use writer = new IO.StringWriter(NewLine="\n") Disassembly.disassembleMethod runtime mth Disassembly.Platform.X64 false writer writer.Flush() writer.ToString()) @@ -57,19 +46,19 @@ L0000: lea eax, [rdi+1] L0003: ret """ - Assert.EqualString(expected, output) + Assert.Equal(expected, output) [] let ``jump label should be generated`` () = let output = disassembleFromSourceProject "abs" - let lines = (normalizeLineEnds output).Split(Environment.NewLine) + let lines = output.Split("\n") // we look only at the conditional jump 'jl' line // others are different due call conventions let jumpLine = lines |> Array.find (fun l -> l.Contains "jl") - // the full label can be different because emited ASM has different size + // the full label can be different because emitted ASM has different size // depending on the platform, so we check only the first chars. // we also omit checking the label at the start of the line let expected = "jl short L00" @@ -77,19 +66,19 @@ let ``jump label should be generated`` () = [] -let ``when calling function, call must contain function name`` () = +let ``when calling system method, call must contain method name`` () = let output = disassembleFromSourceProject "toString" - - let lines = (normalizeLineEnds output).Split(Environment.NewLine) - let callLine = - lines - |> Array.find (fun l -> l.Contains "call") - // we omit checking the label at the start of the line // because it can be different on different platforms let expected = "call System.Number.Int32ToDecStr(Int32)" - Assert.Contains(expected, callLine) - + Assert.Contains(expected, output) +[] +let ``when calling local method, call must contain method name`` () = + let output = disassembleFromSourceProject "sayHello" + // we omit checking the label at the start of the line + // because it can be different on different platforms + let expected = "call Source+HelloWriter.Hello()" + Assert.Contains(expected, output) diff --git a/tests/fasmi.tests/fasmi.tests.fsproj b/tests/fasmi.tests/fasmi.tests.fsproj index 18377a5..dca84d5 100644 --- a/tests/fasmi.tests/fasmi.tests.fsproj +++ b/tests/fasmi.tests/fasmi.tests.fsproj @@ -1,7 +1,7 @@ - net6.0 + net5.0;net6.0;net7.0 false true