diff --git a/.vscode/launch.json b/.vscode/launch.json index 9d8255dfbee..35d96c984db 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -17,7 +17,7 @@ // TODO: Shall we assume that it's already been built, or build it every time we debug? // "preLaunchTask": "Build (Debug)", // If you have changed target frameworks, make sure to update the program p - "program": "${workspaceFolder}/artifacts/bin/fsi/Debug/net6.0/fsi.dll", + "program": "${workspaceFolder}/artifacts/bin/fsi/Debug/net7.0/fsi.dll", "cwd": "${workspaceFolder}/src", "console": "integratedTerminal", // This is the default to be able to run in Codespaces. "internalConsoleOptions": "neverOpen", @@ -42,7 +42,7 @@ // TODO: Shall we assume that it's already been built, or build it every time we debug? // "preLaunchTask": "Build (Debug)", // If you have changed target frameworks, make sure to update the program path. - "program": "${workspaceFolder}/artifacts/bin/fsc/Debug/net6.0/fsc.dll", + "program": "${workspaceFolder}/artifacts/bin/fsc/Debug/net7.0/fsc.dll", "args": [ "${input:argsPrompt}" ], diff --git a/FSharpBuild.Directory.Build.targets b/FSharpBuild.Directory.Build.targets index 2cb8142d299..27d4b961e46 100644 --- a/FSharpBuild.Directory.Build.targets +++ b/FSharpBuild.Directory.Build.targets @@ -6,6 +6,11 @@ + + $(DefineConstants);Release + $(DefineConstants);Debug + + Never @@ -137,8 +142,8 @@ diff --git a/FSharpTests.Directory.Build.props b/FSharpTests.Directory.Build.props index d191970e303..2cc7df4372c 100644 --- a/FSharpTests.Directory.Build.props +++ b/FSharpTests.Directory.Build.props @@ -22,18 +22,18 @@ $([System.IO.Path]::GetDirectoryName('$(DOTNET_HOST_PATH)')) dotnet.exe dotnet - $(MSBuildThisFileDirectory)artifacts\bin\fsc\$(Configuration)\net6.0\fsc.dll + $(MSBuildThisFileDirectory)artifacts\bin\fsc\$(Configuration)\net7.0\fsc.dll $([System.IO.Path]::GetDirectoryName('$(DOTNET_HOST_PATH)')) dotnet.exe dotnet - $(MSBuildThisFileDirectory)artifacts\bin\fsi\$(Configuration)\net6.0\fsi.dll + $(MSBuildThisFileDirectory)artifacts\bin\fsi\$(Configuration)\net7.0\fsi.dll <_FSharpBuildTargetFramework Condition="'$(MSBuildRuntimeType)'!='Core'">net472 - <_FSharpBuildTargetFramework Condition="'$(MSBuildRuntimeType)'=='Core'">net6.0 + <_FSharpBuildTargetFramework Condition="'$(MSBuildRuntimeType)'=='Core'">net7.0 <_FSharpBuildBinPath>$(MSBuildThisFileDirectory)artifacts\bin\fsc\$(Configuration)\$(_FSharpBuildTargetFramework) $(_FSharpBuildBinPath)\FSharp.Build.dll @@ -42,6 +42,7 @@ $(_FSharpBuildBinPath)/Microsoft.FSharp.NetSdk.props $(_FSharpBuildBinPath)/Microsoft.FSharp.NetSdk.targets $(_FSharpBuildBinPath)/Microsoft.FSharp.Overrides.NetSdk.targets + diff --git a/buildtools/AssemblyCheck/AssemblyCheck.fsproj b/buildtools/AssemblyCheck/AssemblyCheck.fsproj index d396c055fec..d82763ddc2e 100644 --- a/buildtools/AssemblyCheck/AssemblyCheck.fsproj +++ b/buildtools/AssemblyCheck/AssemblyCheck.fsproj @@ -2,7 +2,7 @@ Exe - net6.0 + net7.0 true false diff --git a/buildtools/fslex/fslex.fsproj b/buildtools/fslex/fslex.fsproj index fe737d00331..8577bf4e3af 100644 --- a/buildtools/fslex/fslex.fsproj +++ b/buildtools/fslex/fslex.fsproj @@ -2,7 +2,7 @@ Exe - net6.0 + net7.0 INTERNALIZED_FSLEXYACC_RUNTIME;$(DefineConstants) true false diff --git a/buildtools/fsyacc/fsyacc.fsproj b/buildtools/fsyacc/fsyacc.fsproj index 839c919617d..e3a4b88a3a0 100644 --- a/buildtools/fsyacc/fsyacc.fsproj +++ b/buildtools/fsyacc/fsyacc.fsproj @@ -2,7 +2,7 @@ Exe - net6.0 + net7.0 INTERNALIZED_FSLEXYACC_RUNTIME;$(DefineConstants) true false diff --git a/eng/Build.ps1 b/eng/Build.ps1 index aaa91bd91f9..010d465d5d4 100644 --- a/eng/Build.ps1 +++ b/eng/Build.ps1 @@ -181,11 +181,11 @@ function Process-Arguments() { function Update-Arguments() { if ($script:noVisualStudio) { - $script:bootstrapTfm = "net6.0" + $script:bootstrapTfm = "net7.0" $script:msbuildEngine = "dotnet" } - if ($bootstrapTfm -eq "net6.0") { + if ($bootstrapTfm -eq "net7.0") { if (-Not (Test-Path "$ArtifactsDir\Bootstrap\fsc\fsc.runtimeconfig.json")) { $script:bootstrap = $True } @@ -206,7 +206,7 @@ function BuildSolution([string] $solutionName) { $officialBuildId = if ($official) { $env:BUILD_BUILDNUMBER } else { "" } $toolsetBuildProj = InitializeToolset $quietRestore = !$ci - $testTargetFrameworks = if ($testCoreClr) { "net6.0" } else { "" } + $testTargetFrameworks = if ($testCoreClr) { "net7.0" } else { "" } # Do not set the property to true explicitly, since that would override value projects might set. $suppressExtensionDeployment = if (!$deployExtensions) { "/p:DeployExtension=false" } else { "" } @@ -493,7 +493,7 @@ try { $script:BuildCategory = "Test" $script:BuildMessage = "Failure running tests" $desktopTargetFramework = "net472" - $coreclrTargetFramework = "net6.0" + $coreclrTargetFramework = "net7.0" if ($testDesktop) { TestUsingXUnit -testProject "$RepoRoot\tests\FSharp.Compiler.ComponentTests\FSharp.Compiler.ComponentTests.fsproj" -targetFramework $desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.ComponentTests\" -noTestFilter $true diff --git a/eng/DumpPackageRoot/DumpPackageRoot.csproj b/eng/DumpPackageRoot/DumpPackageRoot.csproj index fb030a52306..913463393a8 100644 --- a/eng/DumpPackageRoot/DumpPackageRoot.csproj +++ b/eng/DumpPackageRoot/DumpPackageRoot.csproj @@ -3,7 +3,7 @@ - net6.0 + net7.0 diff --git a/eng/Versions.props b/eng/Versions.props index 5662763b742..8ee3c5669cf 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -93,7 +93,7 @@ 4.3.0 4.3.0 4.3.0 - 4.5.4 + 4.5.5 4.3.0 4.3.1 4.3.0 diff --git a/eng/build-utils.ps1 b/eng/build-utils.ps1 index 2aca2e02a35..2162fc880cf 100644 --- a/eng/build-utils.ps1 +++ b/eng/build-utils.ps1 @@ -251,9 +251,9 @@ function Make-BootstrapBuild() { } Exec-Console $dotnetExe $args - Copy-Item "$ArtifactsDir\bin\fslex\$bootstrapConfiguration\net6.0" -Destination "$dir\fslex" -Force -Recurse - Copy-Item "$ArtifactsDir\bin\fsyacc\$bootstrapConfiguration\net6.0" -Destination "$dir\fsyacc" -Force -Recurse - Copy-Item "$ArtifactsDir\bin\AssemblyCheck\$bootstrapConfiguration\net6.0" -Destination "$dir\AssemblyCheck" -Force -Recurse + Copy-Item "$ArtifactsDir\bin\fslex\$bootstrapConfiguration\net7.0" -Destination "$dir\fslex" -Force -Recurse + Copy-Item "$ArtifactsDir\bin\fsyacc\$bootstrapConfiguration\net7.0" -Destination "$dir\fsyacc" -Force -Recurse + Copy-Item "$ArtifactsDir\bin\AssemblyCheck\$bootstrapConfiguration\net7.0" -Destination "$dir\AssemblyCheck" -Force -Recurse # prepare compiler $protoProject = "`"$RepoRoot\proto.sln`"" diff --git a/eng/build.sh b/eng/build.sh index 16ecfaf3067..de535261296 100755 --- a/eng/build.sh +++ b/eng/build.sh @@ -261,8 +261,8 @@ function BuildSolution { /p:Configuration=$bootstrap_config mkdir -p "$bootstrap_dir" - cp -pr $artifacts_dir/bin/fslex/$bootstrap_config/net6.0 $bootstrap_dir/fslex - cp -pr $artifacts_dir/bin/fsyacc/$bootstrap_config/net6.0 $bootstrap_dir/fsyacc + cp -pr $artifacts_dir/bin/fslex/$bootstrap_config/net7.0 $bootstrap_dir/fslex + cp -pr $artifacts_dir/bin/fsyacc/$bootstrap_config/net7.0 $bootstrap_dir/fsyacc fi if [ ! -f "$bootstrap_dir/fsc.exe" ]; then BuildMessage="Error building bootstrap" @@ -270,7 +270,7 @@ function BuildSolution { /restore \ /p:Configuration=$bootstrap_config - cp -pr $artifacts_dir/bin/fsc/$bootstrap_config/net6.0 $bootstrap_dir/fsc + cp -pr $artifacts_dir/bin/fsc/$bootstrap_config/net7.0 $bootstrap_dir/fsc fi fi @@ -312,7 +312,7 @@ InitializeDotNetCli $restore BuildSolution if [[ "$test_core_clr" == true ]]; then - coreclrtestframework=net6.0 + coreclrtestframework=net7.0 TestUsingNUnit --testproject "$repo_root/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj" --targetframework $coreclrtestframework --notestfilter TestUsingNUnit --testproject "$repo_root/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj" --targetframework $coreclrtestframework --notestfilter TestUsingNUnit --testproject "$repo_root/tests/FSharp.Compiler.UnitTests/FSharp.Compiler.UnitTests.fsproj" --targetframework $coreclrtestframework @@ -322,7 +322,7 @@ if [[ "$test_core_clr" == true ]]; then fi if [[ "$test_compilercomponent_tests" == true ]]; then - coreclrtestframework=net6.0 + coreclrtestframework=net7.0 TestUsingNUnit --testproject "$repo_root/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj" --targetframework $coreclrtestframework --notestfilter fi diff --git a/eng/common/tools.sh b/eng/common/tools.sh index c110d0ed410..a5fed41b644 100755 --- a/eng/common/tools.sh +++ b/eng/common/tools.sh @@ -490,7 +490,7 @@ function MSBuild-Core { } } - RunBuildTool "$_InitializeBuildToolCommand" /m /nologo /clp:Summary /v:$verbosity /nr:$node_reuse $warnaserror_switch /p:TreatWarningsAsErrors=$warn_as_error /p:ContinuousIntegrationBuild=$ci "$@" + RunBuildTool "$_InitializeBuildToolCommand" /m /nologo /clp:Summary /v:$verbosity /nr:$node_reuse $warnaserror_switch /p:TreatWarningsAsErrors=$warn_as_error /p:ContinuousIntegrationBuild=$ci /bl "$@" } ResolvePath "${BASH_SOURCE[0]}" diff --git a/eng/test-determinism.ps1 b/eng/test-determinism.ps1 index de136c12564..621fe7c6cd4 100644 --- a/eng/test-determinism.ps1 +++ b/eng/test-determinism.ps1 @@ -379,7 +379,7 @@ try { $script:bootstrapTfm = "net472" if ($script:msbuildEngine -eq "dotnet") { - $script.bootstrapTfm = "net6.0" + $script.bootstrapTfm = "net7.0" } $bootstrapDir = Make-BootstrapBuild diff --git a/fcs-samples/EditorService/EditorService.fsproj b/fcs-samples/EditorService/EditorService.fsproj index 56654b8ee52..6e5b8d99e30 100644 --- a/fcs-samples/EditorService/EditorService.fsproj +++ b/fcs-samples/EditorService/EditorService.fsproj @@ -1,7 +1,7 @@  - $(FcsTargetNetFxFramework);net6.0 + $(FcsTargetNetFxFramework);net7.0 true Exe false diff --git a/global.json b/global.json index 9d3ac79cf22..3790ed6b19c 100644 --- a/global.json +++ b/global.json @@ -1,11 +1,11 @@ { "sdk": { - "version": "7.0.100-preview.7.22377.5", + "version": "7.0.100-preview.6.22352.1", "allowPrerelease": true, "rollForward": "latestMajor" }, "tools": { - "dotnet": "7.0.100-preview.7.22377.5", + "dotnet": "7.0.100-preview.6.22352.1", "vs": { "version": "17.0", "components": [ @@ -18,7 +18,7 @@ "perl": "5.32.1.1" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22419.1", - "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19069.2" + "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22411.2", + "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22411.2" } } diff --git a/src/Microsoft.FSharp.Compiler/Microsoft.FSharp.Compiler.csproj b/src/Microsoft.FSharp.Compiler/Microsoft.FSharp.Compiler.csproj index a16bc1310ee..507a90a4ec8 100644 --- a/src/Microsoft.FSharp.Compiler/Microsoft.FSharp.Compiler.csproj +++ b/src/Microsoft.FSharp.Compiler/Microsoft.FSharp.Compiler.csproj @@ -3,7 +3,7 @@ true Exe - net6.0 + net7.0 Microsoft.FSharp.Compiler.nuspec true .NET Core compatible version of the F# compiler fsc.exe. diff --git a/src/Microsoft.FSharp.Compiler/Microsoft.FSharp.Compiler.nuspec b/src/Microsoft.FSharp.Compiler/Microsoft.FSharp.Compiler.nuspec index ee67b15c5d5..c87a70d9d62 100644 --- a/src/Microsoft.FSharp.Compiler/Microsoft.FSharp.Compiler.nuspec +++ b/src/Microsoft.FSharp.Compiler/Microsoft.FSharp.Compiler.nuspec @@ -4,7 +4,7 @@ $CommonMetadataElements$ en-US - + @@ -26,16 +26,16 @@ this approach gives a very small deployment. Which is kind of necessary. --> - - - - - - + + + + + + + target="lib\net7.0" /> + target="lib\net7.0" /> @@ -46,14 +46,14 @@ - + + target="lib\net7.0" /> - + target="lib\net7.0" /> + + target="lib\net7.0" /> - net472;net6.0 - net6.0 + net472;net7.0 + net7.0 x86 Debug;Release;Proto net472 - net6.0 + net7.0 x86 diff --git a/src/fsi/fsi.targets b/src/fsi/fsi.targets index ce90d34c3cc..6b6e89dc6f4 100644 --- a/src/fsi/fsi.targets +++ b/src/fsi/fsi.targets @@ -50,7 +50,7 @@ - + diff --git a/src/fsi/fsiProject/fsi.fsproj b/src/fsi/fsiProject/fsi.fsproj index 46ca382c3e0..9708c234241 100644 --- a/src/fsi/fsiProject/fsi.fsproj +++ b/src/fsi/fsiProject/fsi.fsproj @@ -3,15 +3,15 @@ - net472;net6.0 - net6.0 + net472;net7.0 + net7.0 x86 Debug;Release;Proto net472 - net6.0 + net7.0 x86 diff --git a/tests/EndToEndBuildTests/BasicProvider/BasicProvider.DesignTime/BasicProvider.DesignTime.fsproj b/tests/EndToEndBuildTests/BasicProvider/BasicProvider.DesignTime/BasicProvider.DesignTime.fsproj index 40a1d338863..ab0d33bd429 100644 --- a/tests/EndToEndBuildTests/BasicProvider/BasicProvider.DesignTime/BasicProvider.DesignTime.fsproj +++ b/tests/EndToEndBuildTests/BasicProvider/BasicProvider.DesignTime/BasicProvider.DesignTime.fsproj @@ -2,7 +2,7 @@ Library - net6.0;net472 + net7.0;net472 typeproviders NO_GENERATIVE IS_DESIGNTIME diff --git a/tests/EndToEndBuildTests/BasicProvider/BasicProvider.Tests/BasicProvider.Tests.fsproj b/tests/EndToEndBuildTests/BasicProvider/BasicProvider.Tests/BasicProvider.Tests.fsproj index 0c0b7bf1599..0217a4c96cc 100644 --- a/tests/EndToEndBuildTests/BasicProvider/BasicProvider.Tests/BasicProvider.Tests.fsproj +++ b/tests/EndToEndBuildTests/BasicProvider/BasicProvider.Tests/BasicProvider.Tests.fsproj @@ -2,7 +2,7 @@ Library - net6.0 + net7.0 $(TestTargetFramework) false NO_GENERATIVE diff --git a/tests/EndToEndBuildTests/BasicProvider/BasicProvider.Tests/xunit.runner.json b/tests/EndToEndBuildTests/BasicProvider/BasicProvider.Tests/xunit.runner.json index c6fd41b7143..af18dd40389 100644 --- a/tests/EndToEndBuildTests/BasicProvider/BasicProvider.Tests/xunit.runner.json +++ b/tests/EndToEndBuildTests/BasicProvider/BasicProvider.Tests/xunit.runner.json @@ -1,3 +1,5 @@ { + "$schema": "https://xunit.net/schema/current/xunit.runner.schema.json", + "appDomain": "ifAvailable", "parallelizeTestCollections": false - } \ No newline at end of file +} \ No newline at end of file diff --git a/tests/EndToEndBuildTests/BasicProvider/BasicProvider/BasicProvider.fsproj b/tests/EndToEndBuildTests/BasicProvider/BasicProvider/BasicProvider.fsproj index 1de65f297f7..6dc26094835 100644 --- a/tests/EndToEndBuildTests/BasicProvider/BasicProvider/BasicProvider.fsproj +++ b/tests/EndToEndBuildTests/BasicProvider/BasicProvider/BasicProvider.fsproj @@ -2,7 +2,7 @@ Library - net6.0;net472 + net7.0;net472 typeproviders $(FSharpCoreShippedPackageVersionValue) typeproviders diff --git a/tests/EndToEndBuildTests/BasicProvider/TestBasicProvider.cmd b/tests/EndToEndBuildTests/BasicProvider/TestBasicProvider.cmd index f7323c64e3c..b9d1058aff0 100644 --- a/tests/EndToEndBuildTests/BasicProvider/TestBasicProvider.cmd +++ b/tests/EndToEndBuildTests/BasicProvider/TestBasicProvider.cmd @@ -42,8 +42,8 @@ echo dotnet test BasicProvider.Tests\BasicProvider.Tests.fsproj -c %configuratio dotnet test BasicProvider.Tests\BasicProvider.Tests.fsproj -c %configuration% -v minimal -p:TestTargetFramework=net472 -p:FSharpTestCompilerVersion=net40 if ERRORLEVEL 1 echo Error: TestBasicProvider failed && goto :failure -echo dotnet test BasicProvider.Tests\BasicProvider.Tests.fsproj -c %configuration% -v minimal -p:TestTargetFramework=net6.0 -p:FSharpTestCompilerVersion=coreclr - dotnet test BasicProvider.Tests\BasicProvider.Tests.fsproj -c %configuration% -v minimal -p:TestTargetFramework=net6.0 -p:FSharpTestCompilerVersion=coreclr +echo dotnet test BasicProvider.Tests\BasicProvider.Tests.fsproj -c %configuration% -v minimal -p:TestTargetFramework=net7.0 -p:FSharpTestCompilerVersion=coreclr + dotnet test BasicProvider.Tests\BasicProvider.Tests.fsproj -c %configuration% -v minimal -p:TestTargetFramework=net7.0 -p:FSharpTestCompilerVersion=coreclr if ERRORLEVEL 1 echo Error: TestBasicProvider failed && goto :failure rem @@ -60,8 +60,8 @@ echo dotnet test BasicProvider.Tests\BasicProvider.Tests.fsproj -c %configuratio dotnet test BasicProvider.Tests\BasicProvider.Tests.fsproj -c %configuration% -v minimal -p:TestTargetFramework=net472 -p:FSharpTestCompilerVersion=net40 if ERRORLEVEL 1 echo Error: TestBasicProvider failed && goto :failure -echo dotnet test BasicProvider.Tests\BasicProvider.Tests.fsproj -c %configuration% -v minimal -p:TestTargetFramework=net6.0 -p:FSharpTestCompilerVersion=coreclr - dotnet test BasicProvider.Tests\BasicProvider.Tests.fsproj -c %configuration% -v minimal -p:TestTargetFramework=net6.0 -p:FSharpTestCompilerVersion=coreclr +echo dotnet test BasicProvider.Tests\BasicProvider.Tests.fsproj -c %configuration% -v minimal -p:TestTargetFramework=net7.0 -p:FSharpTestCompilerVersion=coreclr + dotnet test BasicProvider.Tests\BasicProvider.Tests.fsproj -c %configuration% -v minimal -p:TestTargetFramework=net7.0 -p:FSharpTestCompilerVersion=coreclr if ERRORLEVEL 1 echo Error: TestBasicProvider failed && goto :failure :success diff --git a/tests/EndToEndBuildTests/ComboProvider/ComboProvider.Tests/ComboProvider.Tests.fsproj b/tests/EndToEndBuildTests/ComboProvider/ComboProvider.Tests/ComboProvider.Tests.fsproj index ca6383066e8..080aea65994 100644 --- a/tests/EndToEndBuildTests/ComboProvider/ComboProvider.Tests/ComboProvider.Tests.fsproj +++ b/tests/EndToEndBuildTests/ComboProvider/ComboProvider.Tests/ComboProvider.Tests.fsproj @@ -2,7 +2,7 @@ Library - net6.0 + net7.0 $(TestTargetFramework) false $(FSharpCoreShippedPackageVersionValue) diff --git a/tests/EndToEndBuildTests/ComboProvider/ComboProvider.Tests/xunit.runner.json b/tests/EndToEndBuildTests/ComboProvider/ComboProvider.Tests/xunit.runner.json index c6fd41b7143..af18dd40389 100644 --- a/tests/EndToEndBuildTests/ComboProvider/ComboProvider.Tests/xunit.runner.json +++ b/tests/EndToEndBuildTests/ComboProvider/ComboProvider.Tests/xunit.runner.json @@ -1,3 +1,5 @@ { + "$schema": "https://xunit.net/schema/current/xunit.runner.schema.json", + "appDomain": "ifAvailable", "parallelizeTestCollections": false - } \ No newline at end of file +} \ No newline at end of file diff --git a/tests/EndToEndBuildTests/ComboProvider/ComboProvider/ComboProvider.fsproj b/tests/EndToEndBuildTests/ComboProvider/ComboProvider/ComboProvider.fsproj index 9fd278953c4..7834c472955 100644 --- a/tests/EndToEndBuildTests/ComboProvider/ComboProvider/ComboProvider.fsproj +++ b/tests/EndToEndBuildTests/ComboProvider/ComboProvider/ComboProvider.fsproj @@ -2,9 +2,9 @@ Library - net6.0;net472 + net7.0;net472 $(FSharpCoreShippedPackageVersionValue) - net6.0;net472 + net7.0;net472 diff --git a/tests/EndToEndBuildTests/ComboProvider/TestComboProvider.cmd b/tests/EndToEndBuildTests/ComboProvider/TestComboProvider.cmd index fc72e514487..29ad4ced449 100644 --- a/tests/EndToEndBuildTests/ComboProvider/TestComboProvider.cmd +++ b/tests/EndToEndBuildTests/ComboProvider/TestComboProvider.cmd @@ -42,8 +42,8 @@ echo dotnet test ComboProvider.Tests\ComboProvider.Tests.fsproj -c %configuratio dotnet test ComboProvider.Tests\ComboProvider.Tests.fsproj -c %configuration% -v minimal -p:TestTargetFramework=net472 -p:FSharpTestCompilerVersion=net40 if ERRORLEVEL 1 echo Error: TestComboProvider failed && goto :failure -echo dotnet test ComboProvider.Tests\ComboProvider.Tests.fsproj -c %configuration% -v minimal -p:TestTargetFramework=net6.0 -p:FSharpTestCompilerVersion=coreclr - dotnet test ComboProvider.Tests\ComboProvider.Tests.fsproj -c %configuration% -v minimal -p:TestTargetFramework=net6.0 -p:FSharpTestCompilerVersion=coreclr +echo dotnet test ComboProvider.Tests\ComboProvider.Tests.fsproj -c %configuration% -v minimal -p:TestTargetFramework=net7.0 -p:FSharpTestCompilerVersion=coreclr + dotnet test ComboProvider.Tests\ComboProvider.Tests.fsproj -c %configuration% -v minimal -p:TestTargetFramework=net7.0 -p:FSharpTestCompilerVersion=coreclr if ERRORLEVEL 1 echo Error: TestComboProvider failed && goto :failure rem @@ -60,8 +60,8 @@ echo dotnet test ComboProvider.Tests\ComboProvider.Tests.fsproj -c %configuratio dotnet test ComboProvider.Tests\ComboProvider.Tests.fsproj -c %configuration% -v minimal -p:TestTargetFramework=net472 -p:FSharpTestCompilerVersion=net40 if ERRORLEVEL 1 echo Error: TestComboProvider failed && goto :failure -echo dotnet test ComboProvider.Tests\ComboProvider.Tests.fsproj -v %configuration% -p:TestTargetFramework=net6.0 -p:FSharpTestCompilerVersion=coreclr - dotnet test ComboProvider.Tests\ComboProvider.Tests.fsproj -c %configuration% -v minimal -p:TestTargetFramework=net6.0 -p:FSharpTestCompilerVersion=coreclr +echo dotnet test ComboProvider.Tests\ComboProvider.Tests.fsproj -v %configuration% -p:TestTargetFramework=net7.0 -p:FSharpTestCompilerVersion=coreclr + dotnet test ComboProvider.Tests\ComboProvider.Tests.fsproj -c %configuration% -v minimal -p:TestTargetFramework=net7.0 -p:FSharpTestCompilerVersion=coreclr if ERRORLEVEL 1 echo Error: TestComboProvider failed && goto :failure :success diff --git a/tests/FSharp.Build.UnitTests/FSharp.Build.UnitTests.fsproj b/tests/FSharp.Build.UnitTests/FSharp.Build.UnitTests.fsproj index bbd530593de..4ba4fc315c9 100644 --- a/tests/FSharp.Build.UnitTests/FSharp.Build.UnitTests.fsproj +++ b/tests/FSharp.Build.UnitTests/FSharp.Build.UnitTests.fsproj @@ -3,8 +3,8 @@ - net472;net6.0 - net6.0 + net472;net7.0 + net7.0 Library true nunit diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/PseudoCustomAttributes/AssemblyAlgorithmId_001.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/PseudoCustomAttributes/AssemblyAlgorithmId_001.fs deleted file mode 100644 index e9e438683c4..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/PseudoCustomAttributes/AssemblyAlgorithmId_001.fs +++ /dev/null @@ -1,19 +0,0 @@ -// #Regression #Attributes #Assemblies -// AssemblyAttributes -// See FSHARP1.0:832,1674,1675 and 2290 -// Attribute under test: AssemblyAlgorithmId -// - -#light - -open System -open System.Reflection; -open System.Configuration.Assemblies - -let CheckAssemblyAttribute () = - let alg = Assembly.GetExecutingAssembly().GetName().HashAlgorithm - printfn "%A" alg - if not (AssemblyHashAlgorithm.MD5 = alg) then raise (new Exception("Invalid Assembly Hash Algorithm")) - -[] -CheckAssemblyAttribute () diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/PseudoCustomAttributes/PseudoCustomAttributes.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/PseudoCustomAttributes/PseudoCustomAttributes.fs index fcfaa5eabb9..e8d7dbe864e 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/PseudoCustomAttributes/PseudoCustomAttributes.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/PseudoCustomAttributes/PseudoCustomAttributes.fs @@ -14,9 +14,11 @@ module ``PseudoCustomAttributes Test Cases`` = |> compileAndRun |> shouldSucceed - [] - let ``PseudoCustomAttributes - AssemblyAlgorithmId_001_fs`` compilation = - ``PseudoCustomAttributes - Compile and Run`` compilation + let ``PseudoCustomAttributes - Fail to compile`` compilation = + compilation + |> asExe + |> compile + |> shouldFail [] let ``PseudoCustomAttributes - AssemblyCompany_001_fs`` compilation = diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/NoBoxingOnDispose01.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/NoBoxingOnDispose01.fs.il.netcore.bsl index 5355f7cc6b9..f24777aa47f 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/NoBoxingOnDispose01.fs.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/NoBoxingOnDispose01.fs.il.netcore.bsl @@ -7,7 +7,7 @@ .assembly extern System.Runtime { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 6:0:0:0 + .ver 7:0:0:0 } .assembly extern FSharp.Core { @@ -17,7 +17,7 @@ .assembly extern System.Collections { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 6:0:0:0 + .ver 7:0:0:0 } .assembly NoBoxingOnDispose01 { @@ -26,29 +26,29 @@ int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [System.Runtime]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 ) + // .custom instance void [System.Runtime]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) .hash algorithm 0x00008004 .ver 0:0:0:0 } .mresource public FSharpSignatureData.NoBoxingOnDispose01 { - // Offset: 0x00000000 Length: 0x00000273 + // Offset: 0x00000000 Length: 0x00000265 // WARNING: managed resource file FSharpSignatureData.NoBoxingOnDispose01 created } .mresource public FSharpOptimizationData.NoBoxingOnDispose01 { - // Offset: 0x00000278 Length: 0x0000007F + // Offset: 0x00000270 Length: 0x0000007F // WARNING: managed resource file FSharpOptimizationData.NoBoxingOnDispose01 created } .module NoBoxingOnDispose01.exe -// MVID: {625064D9-1DEF-36DA-A745-0383D9645062} +// MVID: {63000B04-646B-FCF2-A745-0383040B0063} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x000001CC2A200000 +// Image base: 0x000001ABC6B70000 // =============== CLASS MEMBERS DECLARATION =================== @@ -113,4 +113,4 @@ // ============================================================= // *********** DISASSEMBLY COMPLETE *********************** -// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Debug\net6.0\tests\EmittedIL\Misc\NoBoxingOnDispose01_fs\NoBoxingOnDispose01.res +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Debug\net7.0\tests\EmittedIL\Misc\NoBoxingOnDispose01_fs\NoBoxingOnDispose01.res diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/QueryExpressionStepping/Linq101Aggregates01.fs.il.netcore.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/QueryExpressionStepping/Linq101Aggregates01.fs.il.netcore.debug.bsl index 6665553f1bb..a9d9028cbf8 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/QueryExpressionStepping/Linq101Aggregates01.fs.il.netcore.debug.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/QueryExpressionStepping/Linq101Aggregates01.fs.il.netcore.debug.bsl @@ -7,7 +7,7 @@ .assembly extern System.Runtime { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 6:0:0:0 + .ver 7:0:0:0 } .assembly extern FSharp.Core { @@ -21,7 +21,7 @@ .assembly extern System.Linq { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 6:0:0:0 + .ver 7:0:0:0 } .assembly extern netstandard { @@ -35,29 +35,29 @@ int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [System.Runtime]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 ) + // .custom instance void [System.Runtime]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) .hash algorithm 0x00008004 .ver 0:0:0:0 } .mresource public FSharpSignatureData.Linq101Aggregates01 { - // Offset: 0x00000000 Length: 0x00000625 + // Offset: 0x00000000 Length: 0x00000617 // WARNING: managed resource file FSharpSignatureData.Linq101Aggregates01 created } .mresource public FSharpOptimizationData.Linq101Aggregates01 { - // Offset: 0x00000630 Length: 0x00000211 + // Offset: 0x00000620 Length: 0x00000211 // WARNING: managed resource file FSharpOptimizationData.Linq101Aggregates01 created } .module Linq101Aggregates01.exe -// MVID: {625D0767-5C27-3B28-A745-038367075D62} +// MVID: {63000AAB-ADDC-5E50-A745-0383AB0A0063} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x000001EEBEAD0000 +// Image base: 0x00000203E8180000 // =============== CLASS MEMBERS DECLARATION =================== @@ -7383,4 +7383,4 @@ // ============================================================= // *********** DISASSEMBLY COMPLETE *********************** -// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Debug\net6.0\tests\EmittedIL\QueryExpressionStepping\Linq101Aggregates01_fs\Linq101Aggregates01.res +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Debug\net7.0\tests\EmittedIL\QueryExpressionStepping\Linq101Aggregates01_fs\Linq101Aggregates01.res diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/QueryExpressionStepping/Linq101Aggregates01.fs.il.netcore.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/QueryExpressionStepping/Linq101Aggregates01.fs.il.netcore.release.bsl index 871d93a64a6..2b95344d822 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/QueryExpressionStepping/Linq101Aggregates01.fs.il.netcore.release.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/QueryExpressionStepping/Linq101Aggregates01.fs.il.netcore.release.bsl @@ -7,7 +7,7 @@ .assembly extern System.Runtime { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 6:0:0:0 + .ver 7:0:0:0 } .assembly extern FSharp.Core { @@ -21,7 +21,7 @@ .assembly extern System.Linq { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 6:0:0:0 + .ver 7:0:0:0 } .assembly extern netstandard { @@ -35,29 +35,29 @@ int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [System.Runtime]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 ) + // .custom instance void [System.Runtime]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) .hash algorithm 0x00008004 .ver 0:0:0:0 } .mresource public FSharpSignatureData.Linq101Aggregates01 { - // Offset: 0x00000000 Length: 0x00000629 + // Offset: 0x00000000 Length: 0x0000061B // WARNING: managed resource file FSharpSignatureData.Linq101Aggregates01 created } .mresource public FSharpOptimizationData.Linq101Aggregates01 { - // Offset: 0x00000630 Length: 0x00000211 + // Offset: 0x00000620 Length: 0x00000211 // WARNING: managed resource file FSharpOptimizationData.Linq101Aggregates01 created } .module Linq101Aggregates01.exe -// MVID: {625D07A7-A6E4-36D4-A745-0383A7075D62} +// MVID: {630166A9-C2E4-58B4-A745-0383A9660163} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x0000019484F50000 +// Image base: 0x000001EC1FEC0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -7347,4 +7347,4 @@ // ============================================================= // *********** DISASSEMBLY COMPLETE *********************** -// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Release\net6.0\tests\EmittedIL\QueryExpressionStepping\Linq101Aggregates01_fs\Linq101Aggregates01.res +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Release\net7.0\tests\EmittedIL\QueryExpressionStepping\Linq101Aggregates01_fs\Linq101Aggregates01.res diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/QueryExpressionStepping/Linq101Grouping01.fs.il.netcore.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/QueryExpressionStepping/Linq101Grouping01.fs.il.netcore.debug.bsl index 430076423eb..a4afea5397e 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/QueryExpressionStepping/Linq101Grouping01.fs.il.netcore.debug.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/QueryExpressionStepping/Linq101Grouping01.fs.il.netcore.debug.bsl @@ -7,7 +7,7 @@ .assembly extern System.Runtime { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 6:0:0:0 + .ver 7:0:0:0 } .assembly extern FSharp.Core { @@ -17,7 +17,7 @@ .assembly extern System.Linq { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 6:0:0:0 + .ver 7:0:0:0 } .assembly extern Utils { @@ -35,7 +35,7 @@ int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [System.Runtime]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 ) + // .custom instance void [System.Runtime]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) .hash algorithm 0x00008004 .ver 0:0:0:0 @@ -51,13 +51,13 @@ // WARNING: managed resource file FSharpOptimizationData.Linq101Grouping01 created } .module Linq101Grouping01.exe -// MVID: {62466677-0219-3271-A745-038377664662} +// MVID: {63000ADE-5D79-11DF-A745-0383DE0A0063} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x00000216B04E0000 +// Image base: 0x00000214C8650000 // =============== CLASS MEMBERS DECLARATION =================== @@ -1633,4 +1633,4 @@ // ============================================================= // *********** DISASSEMBLY COMPLETE *********************** -// WARNING: Created Win32 resource file c:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Debug\net6.0\tests\EmittedIL\QueryExpressionStepping\Linq101Grouping01_fs\Linq101Grouping01.res +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Debug\net7.0\tests\EmittedIL\QueryExpressionStepping\Linq101Grouping01_fs\Linq101Grouping01.res diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/QueryExpressionStepping/Linq101Grouping01.fs.il.netcore.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/QueryExpressionStepping/Linq101Grouping01.fs.il.netcore.release.bsl index 430076423eb..0f3799a5231 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/QueryExpressionStepping/Linq101Grouping01.fs.il.netcore.release.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/QueryExpressionStepping/Linq101Grouping01.fs.il.netcore.release.bsl @@ -7,7 +7,7 @@ .assembly extern System.Runtime { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 6:0:0:0 + .ver 7:0:0:0 } .assembly extern FSharp.Core { @@ -17,7 +17,7 @@ .assembly extern System.Linq { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 6:0:0:0 + .ver 7:0:0:0 } .assembly extern Utils { @@ -35,29 +35,29 @@ int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [System.Runtime]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 ) + // .custom instance void [System.Runtime]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) .hash algorithm 0x00008004 .ver 0:0:0:0 } .mresource public FSharpSignatureData.Linq101Grouping01 { - // Offset: 0x00000000 Length: 0x00000433 + // Offset: 0x00000000 Length: 0x00000437 // WARNING: managed resource file FSharpSignatureData.Linq101Grouping01 created } .mresource public FSharpOptimizationData.Linq101Grouping01 { - // Offset: 0x00000438 Length: 0x00000129 + // Offset: 0x00000440 Length: 0x00000129 // WARNING: managed resource file FSharpOptimizationData.Linq101Grouping01 created } .module Linq101Grouping01.exe -// MVID: {62466677-0219-3271-A745-038377664662} +// MVID: {630166A9-7770-CD7D-A745-0383A9660163} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x00000216B04E0000 +// Image base: 0x000002B493560000 // =============== CLASS MEMBERS DECLARATION =================== @@ -1633,4 +1633,4 @@ // ============================================================= // *********** DISASSEMBLY COMPLETE *********************** -// WARNING: Created Win32 resource file c:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Debug\net6.0\tests\EmittedIL\QueryExpressionStepping\Linq101Grouping01_fs\Linq101Grouping01.res +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Release\net7.0\tests\EmittedIL\QueryExpressionStepping\Linq101Grouping01_fs\Linq101Grouping01.res diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/QueryExpressionStepping/Linq101Joins01.fs.il.netcore.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/QueryExpressionStepping/Linq101Joins01.fs.il.netcore.debug.bsl index 1a2093eeda1..75514e378e0 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/QueryExpressionStepping/Linq101Joins01.fs.il.netcore.debug.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/QueryExpressionStepping/Linq101Joins01.fs.il.netcore.debug.bsl @@ -7,7 +7,7 @@ .assembly extern System.Runtime { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 6:0:0:0 + .ver 7:0:0:0 } .assembly extern FSharp.Core { @@ -21,7 +21,7 @@ .assembly extern System.Linq { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 6:0:0:0 + .ver 7:0:0:0 } .assembly Linq101Joins01 { @@ -30,7 +30,7 @@ int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [System.Runtime]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 ) + // .custom instance void [System.Runtime]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) .hash algorithm 0x00008004 .ver 0:0:0:0 @@ -46,13 +46,13 @@ // WARNING: managed resource file FSharpOptimizationData.Linq101Joins01 created } .module Linq101Joins01.exe -// MVID: {62466677-6178-290A-A745-038377664662} +// MVID: {63000ADE-0931-10AC-A745-0383DE0A0063} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x000001F462290000 +// Image base: 0x000001FCA7FD0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -1383,4 +1383,4 @@ // ============================================================= // *********** DISASSEMBLY COMPLETE *********************** -// WARNING: Created Win32 resource file c:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Debug\net6.0\tests\EmittedIL\QueryExpressionStepping\Linq101Joins01_fs\Linq101Joins01.res +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Debug\net7.0\tests\EmittedIL\QueryExpressionStepping\Linq101Joins01_fs\Linq101Joins01.res diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/QueryExpressionStepping/Linq101Joins01.fs.il.netcore.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/QueryExpressionStepping/Linq101Joins01.fs.il.netcore.release.bsl index 1a2093eeda1..3961b9e5543 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/QueryExpressionStepping/Linq101Joins01.fs.il.netcore.release.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/QueryExpressionStepping/Linq101Joins01.fs.il.netcore.release.bsl @@ -7,7 +7,7 @@ .assembly extern System.Runtime { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 6:0:0:0 + .ver 7:0:0:0 } .assembly extern FSharp.Core { @@ -21,7 +21,7 @@ .assembly extern System.Linq { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 6:0:0:0 + .ver 7:0:0:0 } .assembly Linq101Joins01 { @@ -30,14 +30,14 @@ int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [System.Runtime]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 ) + // .custom instance void [System.Runtime]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) .hash algorithm 0x00008004 .ver 0:0:0:0 } .mresource public FSharpSignatureData.Linq101Joins01 { - // Offset: 0x00000000 Length: 0x00000337 + // Offset: 0x00000000 Length: 0x0000033B // WARNING: managed resource file FSharpSignatureData.Linq101Joins01 created } .mresource public FSharpOptimizationData.Linq101Joins01 @@ -46,13 +46,13 @@ // WARNING: managed resource file FSharpOptimizationData.Linq101Joins01 created } .module Linq101Joins01.exe -// MVID: {62466677-6178-290A-A745-038377664662} +// MVID: {630166A9-E106-41F6-A745-0383A9660163} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x000001F462290000 +// Image base: 0x000001A95D7B0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -1383,4 +1383,4 @@ // ============================================================= // *********** DISASSEMBLY COMPLETE *********************** -// WARNING: Created Win32 resource file c:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Debug\net6.0\tests\EmittedIL\QueryExpressionStepping\Linq101Joins01_fs\Linq101Joins01.res +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Release\net7.0\tests\EmittedIL\QueryExpressionStepping\Linq101Joins01_fs\Linq101Joins01.res diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/QueryExpressionStepping/Linq101Quantifiers01.fs.il.netcore.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/QueryExpressionStepping/Linq101Quantifiers01.fs.il.netcore.debug.bsl index 4c484a482ce..bc361cd6f16 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/QueryExpressionStepping/Linq101Quantifiers01.fs.il.netcore.debug.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/QueryExpressionStepping/Linq101Quantifiers01.fs.il.netcore.debug.bsl @@ -7,7 +7,7 @@ .assembly extern System.Runtime { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 6:0:0:0 + .ver 7:0:0:0 } .assembly extern FSharp.Core { @@ -21,7 +21,7 @@ .assembly extern System.Linq { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 6:0:0:0 + .ver 7:0:0:0 } .assembly Linq101Quantifiers01 { @@ -30,29 +30,29 @@ int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [System.Runtime]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 ) + // .custom instance void [System.Runtime]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) .hash algorithm 0x00008004 .ver 0:0:0:0 } .mresource public FSharpSignatureData.Linq101Quantifiers01 { - // Offset: 0x00000000 Length: 0x000003D4 + // Offset: 0x00000000 Length: 0x000003C6 // WARNING: managed resource file FSharpSignatureData.Linq101Quantifiers01 created } .mresource public FSharpOptimizationData.Linq101Quantifiers01 { - // Offset: 0x000003D8 Length: 0x000000FF + // Offset: 0x000003D0 Length: 0x000000FF // WARNING: managed resource file FSharpOptimizationData.Linq101Quantifiers01 created } .module Linq101Quantifiers01.exe -// MVID: {62501638-A151-2366-A745-038338165062} +// MVID: {63000ADE-997D-5A3D-A745-0383DE0A0063} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x0000019211ED0000 +// Image base: 0x0000013E12CE0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -1477,4 +1477,4 @@ // ============================================================= // *********** DISASSEMBLY COMPLETE *********************** -// WARNING: Created Win32 resource file c:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Debug\net6.0\tests\EmittedIL\QueryExpressionStepping\Linq101Quantifiers01_fs\Linq101Quantifiers01.res +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Debug\net7.0\tests\EmittedIL\QueryExpressionStepping\Linq101Quantifiers01_fs\Linq101Quantifiers01.res diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/QueryExpressionStepping/Linq101Quantifiers01.fs.il.netcore.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/QueryExpressionStepping/Linq101Quantifiers01.fs.il.netcore.release.bsl index ee20176bdff..a264e5e7b9b 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/QueryExpressionStepping/Linq101Quantifiers01.fs.il.netcore.release.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/QueryExpressionStepping/Linq101Quantifiers01.fs.il.netcore.release.bsl @@ -7,7 +7,7 @@ .assembly extern System.Runtime { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 6:0:0:0 + .ver 7:0:0:0 } .assembly extern FSharp.Core { @@ -21,7 +21,7 @@ .assembly extern System.Linq { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 6:0:0:0 + .ver 7:0:0:0 } .assembly Linq101Quantifiers01 { @@ -30,29 +30,29 @@ int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [System.Runtime]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 ) + // .custom instance void [System.Runtime]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) .hash algorithm 0x00008004 .ver 0:0:0:0 } .mresource public FSharpSignatureData.Linq101Quantifiers01 { - // Offset: 0x00000000 Length: 0x000003D8 + // Offset: 0x00000000 Length: 0x000003CA // WARNING: managed resource file FSharpSignatureData.Linq101Quantifiers01 created } .mresource public FSharpOptimizationData.Linq101Quantifiers01 { - // Offset: 0x000003E0 Length: 0x000000FF + // Offset: 0x000003D0 Length: 0x000000FF // WARNING: managed resource file FSharpOptimizationData.Linq101Quantifiers01 created } .module Linq101Quantifiers01.exe -// MVID: {624FDC53-732E-3CDE-A745-038353DC4F62} +// MVID: {630166A9-948D-9109-A745-0383A9660163} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x000001F8100A0000 +// Image base: 0x000001ABB0BE0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -1477,4 +1477,4 @@ // ============================================================= // *********** DISASSEMBLY COMPLETE *********************** -// WARNING: Created Win32 resource file c:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Debug\net6.0\tests\EmittedIL\QueryExpressionStepping\Linq101Quantifiers01_fs\Linq101Quantifiers01.res +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Release\net7.0\tests\EmittedIL\QueryExpressionStepping\Linq101Quantifiers01_fs\Linq101Quantifiers01.res diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/OptionalArg01.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/OptionalArg01.fs.il.netcore.bsl index 14424e4be85..a5c4849206a 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/OptionalArg01.fs.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/OptionalArg01.fs.il.netcore.bsl @@ -7,7 +7,7 @@ .assembly extern System.Runtime { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 6:0:0:0 + .ver 7:0:0:0 } .assembly extern FSharp.Core { @@ -17,7 +17,7 @@ .assembly extern System.Collections { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 6:0:0:0 + .ver 7:0:0:0 } .assembly OptionalArg01 { @@ -26,14 +26,14 @@ int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [System.Runtime]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 ) + // .custom instance void [System.Runtime]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) .hash algorithm 0x00008004 .ver 0:0:0:0 } .mresource public FSharpSignatureData.OptionalArg01 { - // Offset: 0x00000000 Length: 0x0000049B + // Offset: 0x00000000 Length: 0x00000497 // WARNING: managed resource file FSharpSignatureData.OptionalArg01 created } .mresource public FSharpOptimizationData.OptionalArg01 @@ -42,13 +42,13 @@ // WARNING: managed resource file FSharpOptimizationData.OptionalArg01 created } .module OptionalArg01.exe -// MVID: {624CEE83-1E6F-95CC-A745-038383EE4C62} +// MVID: {63000B04-F3D9-4E0B-A745-0383040B0063} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x000002154A2E0000 +// Image base: 0x000001AEAA550000 // =============== CLASS MEMBERS DECLARATION =================== @@ -633,4 +633,4 @@ // ============================================================= // *********** DISASSEMBLY COMPLETE *********************** -// WARNING: Created Win32 resource file c:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Release\net6.0\tests\EmittedIL\Tuples\OptionalArg01_fs\OptionalArg01.res +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Debug\net7.0\tests\EmittedIL\Tuples\OptionalArg01_fs\OptionalArg01.res diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/TupleElimination.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/TupleElimination.fs.il.netcore.bsl index 91e04cf7eca..d2aa400dc0d 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/TupleElimination.fs.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/TupleElimination.fs.il.netcore.bsl @@ -7,7 +7,7 @@ .assembly extern System.Runtime { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 6:0:0:0 + .ver 7:0:0:0 } .assembly extern FSharp.Core { @@ -17,7 +17,7 @@ .assembly extern System.Collections { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 6:0:0:0 + .ver 7:0:0:0 } .assembly TupleElimination { @@ -26,29 +26,29 @@ int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [System.Runtime]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 03 01 00 00 00 00 ) + // .custom instance void [System.Runtime]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 ) .hash algorithm 0x00008004 .ver 0:0:0:0 } .mresource public FSharpSignatureData.TupleElimination { - // Offset: 0x00000000 Length: 0x0000026E + // Offset: 0x00000000 Length: 0x0000026A // WARNING: managed resource file FSharpSignatureData.TupleElimination created } .mresource public FSharpOptimizationData.TupleElimination { - // Offset: 0x00000278 Length: 0x0000007B + // Offset: 0x00000270 Length: 0x0000007B // WARNING: managed resource file FSharpOptimizationData.TupleElimination created } .module TupleElimination.exe -// MVID: {624CEE83-634F-F584-A745-038383EE4C62} +// MVID: {63000B04-FB1F-9C57-A745-0383040B0063} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x0000024D054E0000 +// Image base: 0x000001A54EA70000 // =============== CLASS MEMBERS DECLARATION =================== @@ -256,4 +256,4 @@ // ============================================================= // *********** DISASSEMBLY COMPLETE *********************** -// WARNING: Created Win32 resource file c:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Release\net6.0\tests\EmittedIL\Tuples\TupleElimination_fs\TupleElimination.res +// WARNING: Created Win32 resource file C:\kevinransom\fsharp\artifacts\bin\FSharp.Compiler.ComponentTests\Debug\net7.0\tests\EmittedIL\Tuples\TupleElimination_fs\TupleElimination.res diff --git a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj index 9cb7f248c25..09bdbe28d7e 100644 --- a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj +++ b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj @@ -3,8 +3,8 @@ - net472;net6.0 - net6.0 + net472;net7.0 + net7.0 Library false true diff --git a/tests/FSharp.Compiler.ComponentTests/Interop/RequiredAndInitOnlyProperties.fs b/tests/FSharp.Compiler.ComponentTests/Interop/RequiredAndInitOnlyProperties.fs index 90ba1699311..4af0d6d280a 100644 --- a/tests/FSharp.Compiler.ComponentTests/Interop/RequiredAndInitOnlyProperties.fs +++ b/tests/FSharp.Compiler.ComponentTests/Interop/RequiredAndInitOnlyProperties.fs @@ -23,25 +23,6 @@ module ``Required and init-only properties`` = let csharpRBaseClass = CSharp """ - // Until we move to .NET7 runtime (or use experimental) - namespace System.Runtime.CompilerServices - { - [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = false, Inherited = false)] - public sealed class RequiredMemberAttribute : Attribute { } - [AttributeUsage(AttributeTargets.All, AllowMultiple = true, Inherited = false)] - public sealed class CompilerFeatureRequiredAttribute : Attribute - { - public CompilerFeatureRequiredAttribute(string featureName) - { - FeatureName = featureName; - } - public string FeatureName { get; } - public bool IsOptional { get; init; } - public const string RefStructs = nameof(RefStructs); - public const string RequiredMembers = nameof(RequiredMembers); - } - } - namespace RequiredAndInitOnlyProperties { public sealed class RAIO @@ -382,32 +363,7 @@ let main _ = let ``F# should only be able to explicitly call constructors which set SetsRequiredMembersAttribute`` () = let csharpLib = - CSharp """ - // Until we move to .NET7 runtime (or use experimental) - namespace System.Runtime.CompilerServices - { - [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = false, Inherited = false)] - public sealed class RequiredMemberAttribute : Attribute { } - [AttributeUsage(AttributeTargets.All, AllowMultiple = true, Inherited = false)] - public sealed class CompilerFeatureRequiredAttribute : Attribute - { - public CompilerFeatureRequiredAttribute(string featureName) - { - FeatureName = featureName; - } - public string FeatureName { get; } - public bool IsOptional { get; init; } - public const string RefStructs = nameof(RefStructs); - public const string RequiredMembers = nameof(RequiredMembers); - } - } - - namespace System.Diagnostics.CodeAnalysis - { - [AttributeUsage(AttributeTargets.Constructor, AllowMultiple=false, Inherited=false)] - public sealed class SetsRequiredMembersAttribute : Attribute {} - } - + CSharp """ namespace RequiredAndInitOnlyProperties { using System.Runtime.CompilerServices; @@ -466,14 +422,11 @@ let main _ = [] #endif let ``F# should produce a warning if RequiredMemberAttribute is specified`` () = - // TODO: This test will start failing with different reason when we will move to .NET7, since RequiredMemberArgument will be in System.Runtime.*.dll. - // It will needs to be fixed then. let fsharpSource = """ namespace FooBarBaz open System open System.Runtime.CompilerServices - type RAIOFS() = [] member val GetSet = 0 with get, set @@ -483,4 +436,4 @@ type RAIOFS() = |> withLangVersionPreview |> compile |> shouldFail - |> withErrorCode 39 \ No newline at end of file + |> withSingleDiagnostic (Warning 202, Line 6, Col 7, Line 6, Col 21, "This attribute is currently unsupported by the F# compiler. Applying it will not achieve its intended effect.") \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/Interop/StaticsInInterfaces.fs b/tests/FSharp.Compiler.ComponentTests/Interop/StaticsInInterfaces.fs index 2b7f9e8c87a..320804e2c7c 100644 --- a/tests/FSharp.Compiler.ComponentTests/Interop/StaticsInInterfaces.fs +++ b/tests/FSharp.Compiler.ComponentTests/Interop/StaticsInInterfaces.fs @@ -380,9 +380,6 @@ let main _ = 0 #nowarn "3535" namespace Tests -[] -do() - module Test = type IAdditionOperator<'T> = @@ -407,32 +404,33 @@ module Test = |> compileAndRun |> shouldSucceed |> verifyIL [ +#if Release """ .class public abstract auto ansi sealed Tests.Test extends [runtime]System.Object { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) .class interface abstract auto ansi serializable nested public IAdditionOperator`1 { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) - .method public hidebysig static abstract virtual + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) + .method public hidebysig static abstract virtual !T op_Addition(!T A_0, !T A_1) cil managed { - } + } - } + } .class auto ansi serializable nested public C extends [runtime]System.Object implements class Tests.Test/IAdditionOperator`1 { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) .field assembly int32 c - .method public specialname rtspecialname + .method public specialname rtspecialname instance void .ctor(int32 c) cil managed { - + .maxstack 8 IL_0000: ldarg.0 IL_0001: callvirt instance void [runtime]System.Object::.ctor() @@ -442,25 +440,25 @@ module Test = IL_0009: ldarg.1 IL_000a: stfld int32 Tests.Test/C::c IL_000f: ret - } + } - .method public hidebysig specialname + .method public hidebysig specialname instance int32 get_Value() cil managed { - + .maxstack 8 IL_0000: ldarg.0 IL_0001: ldfld int32 Tests.Test/C::c IL_0006: ret - } + } - .method public hidebysig static class Tests.Test/C + .method public hidebysig static class Tests.Test/C 'Tests.Test.IAdditionOperator.op_Addition'(class Tests.Test/C x, class Tests.Test/C y) cil managed { .override method !0 class Tests.Test/IAdditionOperator`1::op_Addition(!0, !0) - + .maxstack 8 IL_0000: ldarg.0 IL_0001: ldfld int32 Tests.Test/C::c @@ -469,18 +467,18 @@ module Test = IL_000c: add IL_000d: newobj instance void Tests.Test/C::.ctor(int32) IL_0012: ret - } + } .property instance int32 Value() { .get instance int32 Tests.Test/C::get_Value() - } - } + } + } .method public static !!T f<(class Tests.Test/IAdditionOperator`1) T>(!!T x, !!T y) cil managed { - + .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 @@ -488,13 +486,13 @@ module Test = IL_0008: call !0 class Tests.Test/IAdditionOperator`1::op_Addition(!0, !0) IL_000d: ret - } + } .method public static int32 main(string[] _arg1) cil managed { .entrypoint - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.EntryPointAttribute::.ctor() = ( 01 00 00 00 ) - + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.EntryPointAttribute::.ctor() = ( 01 00 00 00 ) + .maxstack 4 .locals init (class Tests.Test/C V_0, class Tests.Test/C V_1) @@ -519,10 +517,129 @@ module Test = IL_002e: ldc.i4.0 IL_002f: ret - } + } + +} + """ +#else + """ +.class public abstract auto ansi sealed Tests.Test + extends [runtime]System.Object +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .class interface abstract auto ansi serializable nested public IAdditionOperator`1 + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) + .method public hidebysig static abstract virtual + !T op_Addition(!T A_0, + !T A_1) cil managed + { + } + + } + + .class auto ansi serializable nested public C + extends [runtime]System.Object + implements class Tests.Test/IAdditionOperator`1 + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) + .field assembly int32 c + .method public specialname rtspecialname + instance void .ctor(int32 c) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: callvirt instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ldarg.0 + IL_0009: ldarg.1 + IL_000a: stfld int32 Tests.Test/C::c + IL_000f: ret + } + + .method public hidebysig specialname + instance int32 get_Value() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 Tests.Test/C::c + IL_0006: ret + } + + .method public hidebysig static class Tests.Test/C + 'Tests.Test.IAdditionOperator.op_Addition'(class Tests.Test/C x, + class Tests.Test/C y) cil managed + { + .override method !0 class Tests.Test/IAdditionOperator`1::op_Addition(!0, + !0) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 Tests.Test/C::c + IL_0006: ldarg.1 + IL_0007: ldfld int32 Tests.Test/C::c + IL_000c: add + IL_000d: newobj instance void Tests.Test/C::.ctor(int32) + IL_0012: ret + } + + .property instance int32 Value() + { + .get instance int32 Tests.Test/C::get_Value() + } + } + + .method public static !!T f<(class Tests.Test/IAdditionOperator`1) T>(!!T x, + !!T y) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: constrained. !!T + IL_0008: call !0 class Tests.Test/IAdditionOperator`1::op_Addition(!0, + !0) + IL_000d: ret + } + + .method public static int32 main(string[] _arg1) cil managed + { + .entrypoint + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.EntryPointAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class Tests.Test/C V_0, + class Tests.Test/C V_1) + IL_0000: ldc.i4.3 + IL_0001: newobj instance void Tests.Test/C::.ctor(int32) + IL_0006: stloc.0 + IL_0007: ldc.i4.4 + IL_0008: newobj instance void Tests.Test/C::.ctor(int32) + IL_000d: stloc.1 + IL_000e: ldloc.0 + IL_000f: ldloc.1 + IL_0010: constrained. Tests.Test/C + IL_0016: call !0 class Tests.Test/IAdditionOperator`1::op_Addition(!0, + !0) + IL_001b: ldfld int32 Tests.Test/C::c + IL_0020: ldc.i4.7 + IL_0021: beq.s IL_002e + + IL_0023: ldstr "incorrect value" + IL_0028: call class [runtime]System.Exception [FSharp.Core]Microsoft.FSharp.Core.Operators::Failure(string) + IL_002d: throw + + IL_002e: ldc.i4.0 + IL_002f: ret + } -} - """ ] +} + """ +#endif + ] #if !NETCOREAPP [] diff --git a/tests/FSharp.Compiler.ComponentTests/xunit.runner.json b/tests/FSharp.Compiler.ComponentTests/xunit.runner.json index e53c283f137..2d07715ae5f 100644 --- a/tests/FSharp.Compiler.ComponentTests/xunit.runner.json +++ b/tests/FSharp.Compiler.ComponentTests/xunit.runner.json @@ -1,6 +1,6 @@ { "$schema": "https://xunit.net/schema/current/xunit.runner.schema.json", - "appDomain": "denied", + "appDomain": "ifAvailable", "shadowCopy": false, "parallelizeTestCollections": false, "maxParallelThreads": 1 diff --git a/tests/FSharp.Compiler.Private.Scripting.UnitTests/DependencyManagerInteractiveTests.fs b/tests/FSharp.Compiler.Private.Scripting.UnitTests/DependencyManagerInteractiveTests.fs index 2d54bbbea11..034ce9364a2 100644 --- a/tests/FSharp.Compiler.Private.Scripting.UnitTests/DependencyManagerInteractiveTests.fs +++ b/tests/FSharp.Compiler.Private.Scripting.UnitTests/DependencyManagerInteractiveTests.fs @@ -88,7 +88,7 @@ type DependencyManagerInteractiveTests() = Assert.Equal(1, result.SourceFiles |> Seq.length) Assert.Equal(2, result.Roots |> Seq.length) - let result = dp.Resolve(idm, ".fsx", [|"r", "FSharp.Data,3.3.3"|], reportError, "net6.0") + let result = dp.Resolve(idm, ".fsx", [|"r", "FSharp.Data,3.3.3"|], reportError, "net7.0") Assert.Equal(true, result.Success) Assert.Equal(1, result.Resolutions |> Seq.length) Assert.Equal(1, result.SourceFiles |> Seq.length) @@ -110,7 +110,7 @@ type DependencyManagerInteractiveTests() = let idm = dp.TryFindDependencyManagerByKey(Seq.empty, "", reportError, "nuget") - let result = dp.Resolve(idm, ".fsx", [|"r", "Microsoft.Data.Sqlite, 3.1.8"|], reportError, "net6.0") + let result = dp.Resolve(idm, ".fsx", [|"r", "Microsoft.Data.Sqlite, 3.1.8"|], reportError, "net7.0") Assert.Equal(true, result.Success) Assert.True((result.Resolutions |> Seq.length) > 1) Assert.Equal(1, result.SourceFiles |> Seq.length) @@ -140,7 +140,7 @@ type DependencyManagerInteractiveTests() = Assert.Equal(0, result.SourceFiles |> Seq.length) Assert.Equal(0, result.Roots |> Seq.length) - let result = dp.Resolve(idm, ".fsx", [|"r", "System.Collections.Immutable.DoesNotExist"|], reportError, "net6.0") + let result = dp.Resolve(idm, ".fsx", [|"r", "System.Collections.Immutable.DoesNotExist"|], reportError, "net7.0") Assert.Equal(false, result.Success) Assert.Equal(0, result.Resolutions |> Seq.length) Assert.Equal(0, result.SourceFiles |> Seq.length) @@ -173,7 +173,7 @@ type DependencyManagerInteractiveTests() = Assert.True((result1.Roots |> Seq.head).EndsWith("/fsharp.data/3.3.3/")) Assert.True((result1.Roots |> Seq.last).EndsWith("/microsoft.netframework.referenceassemblies/1.0.0/")) - let result2 = dp1.Resolve(idm1, ".fsx", [|"r", "FSharp.Data,3.3.3"|], reportError, "net6.0") + let result2 = dp1.Resolve(idm1, ".fsx", [|"r", "FSharp.Data,3.3.3"|], reportError, "net7.0") Assert.Equal(true, result2.Success) Assert.Equal(1, result2.Resolutions |> Seq.length) let expected2 = "/netstandard2.0/" @@ -194,7 +194,7 @@ type DependencyManagerInteractiveTests() = Assert.Equal(1, result3.SourceFiles |> Seq.length) Assert.True((result3.Roots |> Seq.head).EndsWith("/system.json/4.6.0/")) - let result4 = dp2.Resolve(idm2, ".fsx", [|"r", "System.Json, Version=4.6.0"|], reportError, "net6.0") + let result4 = dp2.Resolve(idm2, ".fsx", [|"r", "System.Json, Version=4.6.0"|], reportError, "net7.0") Assert.Equal(true, result4.Success) Assert.Equal(1, result4.Resolutions |> Seq.length) let expected4 = "/netstandard2.0/" @@ -230,7 +230,7 @@ type DependencyManagerInteractiveTests() = // Netstandard gets fewer dependencies than desktop, because desktop framework doesn't contain assemblies like System.Memory // Those assemblies must be delivered by nuget for desktop apps - let result2 = dp1.Resolve(idm1, ".fsx", [|"r", "Microsoft.Extensions.Configuration.Abstractions, 3.1.1"|], reportError, "net6.0") + let result2 = dp1.Resolve(idm1, ".fsx", [|"r", "Microsoft.Extensions.Configuration.Abstractions, 3.1.1"|], reportError, "net7.0") Assert.Equal(true, result2.Success) Assert.Equal(2, result2.Resolutions |> Seq.length) let expected = "/netcoreapp3.1/" @@ -287,7 +287,7 @@ TorchSharp.Tensor.LongTensor.From([| 0L .. 100L |]).Device let result = use dp = new DependencyProvider(AssemblyResolutionProbe(assemblyProbingPaths), NativeResolutionProbe(nativeProbingRoots), false) let idm = dp.TryFindDependencyManagerByKey(Seq.empty, "", reportError, "nuget") - dp.Resolve(idm, ".fsx", packagemanagerlines, reportError, "net6.0") + dp.Resolve(idm, ".fsx", packagemanagerlines, reportError, "net7.0") Assert.True(result.Success, "resolve failed") @@ -383,7 +383,7 @@ printfn ""%A"" result let result = use dp = new DependencyProvider(NativeResolutionProbe(nativeProbingRoots), false) let idm = dp.TryFindDependencyManagerByKey(Seq.empty, "", reportError, "nuget") - dp.Resolve(idm, ".fsx", packagemanagerlines, reportError, "net6.0") + dp.Resolve(idm, ".fsx", packagemanagerlines, reportError, "net7.0") Assert.True(result.Success, "resolve failed") @@ -464,7 +464,7 @@ printfn ""%A"" result let result = use dp = new DependencyProvider(NativeResolutionProbe(nativeProbingRoots), false) let idm = dp.TryFindDependencyManagerByKey(Seq.empty, "", reportError, "nuget") - dp.Resolve(idm, ".fsx", packagemanagerlines, reportError, "net6.0") + dp.Resolve(idm, ".fsx", packagemanagerlines, reportError, "net7.0") Assert.True(result.Success, "resolve failed") @@ -521,7 +521,7 @@ x |> Seq.iter(fun r -> let result = use dp = new DependencyProvider(NativeResolutionProbe(nativeProbingRoots), false) let idm = dp.TryFindDependencyManagerByKey(Seq.empty, "", reportError, "nuget") - dp.Resolve(idm, ".fsx", packagemanagerlines, reportError, "net6.0") + dp.Resolve(idm, ".fsx", packagemanagerlines, reportError, "net7.0") // Expected: error FS3217: PackageManager can not reference the System Package 'FSharp.Core' Assert.False(result.Success, "resolve succeeded but should have failed") @@ -547,7 +547,7 @@ x |> Seq.iter(fun r -> let result = use dp = new DependencyProvider(NativeResolutionProbe(nativeProbingRoots), false) let idm = dp.TryFindDependencyManagerByKey(Seq.empty, "", reportError, "nuget") - dp.Resolve(idm, ".csx", packagemanagerlines, reportError, "net6.0") + dp.Resolve(idm, ".csx", packagemanagerlines, reportError, "net7.0") Assert.True(result.Success, "resolve failed but should have succeeded") @@ -590,7 +590,7 @@ x |> Seq.iter(fun r -> Assert.Equal(1, result.SourceFiles |> Seq.length) Assert.Equal(2, result.Roots |> Seq.length) - let result = dp.Resolve(idm, ".fsx", [|"r", "FSharp.Data,3.3.3"|], reportError, "net6.0") + let result = dp.Resolve(idm, ".fsx", [|"r", "FSharp.Data,3.3.3"|], reportError, "net7.0") Assert.Equal(true, result.Success) Assert.Equal(1, result.Resolutions |> Seq.length) Assert.Equal(1, result.SourceFiles |> Seq.length) @@ -697,7 +697,7 @@ x |> Seq.iter(fun r -> let mutable currentPath:string = null use dp = new DependencyProvider(NativeResolutionProbe(nativeProbingRoots), false) let idm = dp.TryFindDependencyManagerByKey(Seq.empty, "", reportError, "nuget") - let result = dp.Resolve(idm, ".fsx", [|"r", "Microsoft.Data.Sqlite,3.1.7"|], reportError, "net6.0") + let result = dp.Resolve(idm, ".fsx", [|"r", "Microsoft.Data.Sqlite,3.1.7"|], reportError, "net7.0") Assert.Equal(true, result.Success) currentPath <- appendSemiColon (Environment.GetEnvironmentVariable("PATH")) finalPath <- appendSemiColon (Environment.GetEnvironmentVariable("PATH")) @@ -821,7 +821,7 @@ x |> Seq.iter(fun r -> ResolvingErrorReport (report) let idm = dp.TryFindDependencyManagerByKey(Seq.empty, "", reportError, "nuget") - let result = dp.Resolve(idm, ".fsx", [|"r", "FSharp.Data,3.3.3"|], reportError, "net6.0", timeout=0) // Fail in 0 milliseconds + let result = dp.Resolve(idm, ".fsx", [|"r", "FSharp.Data,3.3.3"|], reportError, "net7.0", timeout=0) // Fail in 0 milliseconds Assert.Equal(false, result.Success) Assert.Equal(foundCorrectError, true) Assert.Equal(foundWrongError, false) @@ -844,7 +844,7 @@ x |> Seq.iter(fun r -> ResolvingErrorReport (report) let idm = dp.TryFindDependencyManagerByKey(Seq.empty, "", reportError, "nuget") - let result = dp.Resolve(idm, ".fsx", [|"r", "FSharp.Data,3.3.3"; "r", "timeout=0"|], reportError, "net6.0", null, "", "", "", -1) // Wait forever + let result = dp.Resolve(idm, ".fsx", [|"r", "FSharp.Data,3.3.3"; "r", "timeout=0"|], reportError, "net7.0", null, "", "", "", -1) // Wait forever Assert.Equal(false, result.Success) Assert.Equal(foundCorrectError, true) Assert.Equal(foundWrongError, false) @@ -867,7 +867,7 @@ x |> Seq.iter(fun r -> ResolvingErrorReport (report) let idm = dp.TryFindDependencyManagerByKey(Seq.empty, "", reportError, "nuget") - let result = dp.Resolve(idm, ".fsx", [|"r", "FSharp.Data,3.3.3"; "r", "timeout=none"|], reportError, "net6.0", null, "", "", "", -1) // Wait forever + let result = dp.Resolve(idm, ".fsx", [|"r", "FSharp.Data,3.3.3"; "r", "timeout=none"|], reportError, "net7.0", null, "", "", "", -1) // Wait forever Assert.Equal(true, result.Success) Assert.Equal(foundCorrectError, false) Assert.Equal(foundWrongError, false) @@ -893,7 +893,7 @@ x |> Seq.iter(fun r -> let idm = dp.TryFindDependencyManagerByKey(Seq.empty, "", reportError, "nuget") // Resolve and cache the results won't time out - let result = dp.Resolve(idm, ".fsx", [|"r", "FSharp.Data,3.3.3"; "r", "timeout=10000"|], reportError, "net6.0", null, "", "", "", -1) // Wait forever + let result = dp.Resolve(idm, ".fsx", [|"r", "FSharp.Data,3.3.3"; "r", "timeout=10000"|], reportError, "net7.0", null, "", "", "", -1) // Wait forever // Clear the results foundCorrectError <- false @@ -902,7 +902,7 @@ x |> Seq.iter(fun r -> // Now clear the cache --- this will ensure that resolving produces a timeout error. If we read from the cache the test will fail dp.ClearResultsCache(Seq.empty, "", reportError) - let result = dp.Resolve(idm, ".fsx", [|"r", "FSharp.Data,3.3.3"; "r", "timeout=0"|], reportError, "net6.0", null, "", "", "", -1) // Wait forever + let result = dp.Resolve(idm, ".fsx", [|"r", "FSharp.Data,3.3.3"; "r", "timeout=0"|], reportError, "net7.0", null, "", "", "", -1) // Wait forever Assert.Equal(false, result.Success) Assert.Equal(foundCorrectError, true) Assert.Equal(foundWrongError, false) diff --git a/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharp.Compiler.Private.Scripting.UnitTests.fsproj b/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharp.Compiler.Private.Scripting.UnitTests.fsproj index c7d26c4bc07..1722be5e285 100644 --- a/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharp.Compiler.Private.Scripting.UnitTests.fsproj +++ b/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharp.Compiler.Private.Scripting.UnitTests.fsproj @@ -2,8 +2,8 @@ - net472;net6.0 - net6.0 + net472;net7.0 + net7.0 Library true xunit diff --git a/tests/FSharp.Compiler.Private.Scripting.UnitTests/xunit.runner.json b/tests/FSharp.Compiler.Private.Scripting.UnitTests/xunit.runner.json index ff6ac3098c1..2d07715ae5f 100644 --- a/tests/FSharp.Compiler.Private.Scripting.UnitTests/xunit.runner.json +++ b/tests/FSharp.Compiler.Private.Scripting.UnitTests/xunit.runner.json @@ -1,6 +1,6 @@ { - "$schema": "https://xunit.net/schema/current/xunit.runner.schema.json", - "appDomain": "denied", + "$schema": "https://xunit.net/schema/current/xunit.runner.schema.json", + "appDomain": "ifAvailable", "shadowCopy": false, "parallelizeTestCollections": false, "maxParallelThreads": 1 diff --git a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj index 743c0da36fa..4ae483fdb2e 100644 --- a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj +++ b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj @@ -3,8 +3,8 @@ Exe - net472;net6.0 - net6.0 + net472;net7.0 + net7.0