Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.NET 9preview5 #17224

Merged
merged 30 commits into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
83d1961
.NET 9preview4
vzarytovskii May 22, 2024
bdeb6e2
New macos + udpated prebuilts
vzarytovskii May 22, 2024
8796001
p5 + some tests fixes
vzarytovskii Jun 18, 2024
ef4e4dc
Merge branch 'main' into net9p4
vzarytovskii Jun 18, 2024
6be852b
Update SourceBuildPrebuiltBaseline.xml
vzarytovskii Jun 18, 2024
5b754c8
Merge remote-tracking branch 'upstream/main' into net9p4
vzarytovskii Jun 19, 2024
801a3e6
Merge branch 'net9p4' of https://github.com/vzarytovskii/fsharp into …
vzarytovskii Jun 19, 2024
f51e157
fix
vzarytovskii Jun 19, 2024
8827f19
Don't use msbuild output
vzarytovskii Jun 19, 2024
0b3215c
Merge branch 'main' into net9p4
psfinaki Jun 21, 2024
93afd24
Update OperatorsModuleDynamic.fs
psfinaki Jun 21, 2024
54117e1
reverting this, will be fixed separately
psfinaki Jun 21, 2024
c8056fb
up
psfinaki Jun 21, 2024
fc20f9e
Update OperatorsModuleDynamic.fs
psfinaki Jun 24, 2024
c1455b2
Revert "Update OperatorsModuleDynamic.fs"
psfinaki Jun 24, 2024
5014bbf
Update OperatorsModuleDynamic.fs
psfinaki Jun 24, 2024
7b3cf55
Update OperatorsModuleDynamic.fs
psfinaki Jun 24, 2024
cfa359b
up
psfinaki Jun 24, 2024
8df899f
Update OperatorsModule1.fs
psfinaki Jun 24, 2024
2d75326
Update OperatorsModule2.fs
psfinaki Jun 24, 2024
229ecfb
Update OperatorsModuleDynamic.fs
psfinaki Jun 24, 2024
bdc26e9
Update OperatorsModule1.fs
psfinaki Jun 24, 2024
ec15c9d
Update OperatorsModule2.fs
psfinaki Jun 25, 2024
656ad40
Update OperatorsModule2.fs
psfinaki Jun 25, 2024
a27df0f
remove old workarond
psfinaki Jun 25, 2024
1ba5e29
Revert "remove old workarond"
psfinaki Jun 25, 2024
ce54183
Update OperatorsModule2.fs
psfinaki Jun 25, 2024
569c521
invert ifs, set up consts
psfinaki Jun 25, 2024
d929e26
comments
psfinaki Jun 25, 2024
90b5de8
Merge branch 'main' into net9p4
psfinaki Jun 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// For format details, see https://aka.ms/vscode-remote/devcontainer.json or this file's README at:
{
"name": "F#",
"image": "mcr.microsoft.com/dotnet/sdk:9.0.100-preview.3",
"image": "mcr.microsoft.com/dotnet/sdk:9.0.100-preview.5",
"features": {
"ghcr.io/devcontainers/features/common-utils:2.4.2": {},
"ghcr.io/devcontainers/features/common-utils:2.4.3": {},
"ghcr.io/devcontainers/features/git:1.2.0": {},
"ghcr.io/devcontainers/features/github-cli:1.0.11": {},
"ghcr.io/devcontainers/features/dotnet:2.0.5": {}
"ghcr.io/devcontainers/features/dotnet:2.1.0": {}
},
"hostRequirements": {
"cpus": 2,
Expand Down
3 changes: 2 additions & 1 deletion eng/Build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ function TestUsingMSBuild([string] $testProject, [string] $targetFramework, [str
$testLogPath = "$ArtifactsDir\TestResults\$configuration\${projectName}_$targetFramework.xml"
$testBinLogPath = "$LogDir\${projectName}_$targetFramework.binlog"
$args = "test $testProject -c $configuration -f $targetFramework -v n --test-adapter-path $testadapterpath --logger ""nunit;LogFilePath=$testLogPath"" /bl:$testBinLogPath"
$args += " --blame --results-directory $ArtifactsDir\TestResults\$configuration"
$args += " --blame --results-directory $ArtifactsDir\TestResults\$configuration -p:vstestusemsbuildoutput=false"

if (-not $noVisualStudio -or $norestore) {
$args += " --no-restore"
Expand Down Expand Up @@ -391,6 +391,7 @@ function TestUsingMSBuild([string] $testProject, [string] $targetFramework, [str
}
}

# TODO: These two has 0 differences, shold be merged, as it just causes confusion, we don't care much about the underlying runner
function TestUsingXUnit([string] $testProject, [string] $targetFramework, [string]$testadapterpath, [boolean] $asBackgroundJob = $false) {
TestUsingMsBuild -testProject $testProject -targetFramework $targetFramework -testadapterpath $testadapterpath -noTestFilter $true -asBackgroundJob $asBackgroundJob
}
Expand Down
12 changes: 6 additions & 6 deletions eng/SourceBuildPrebuiltBaseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@
These will go away when repo updates targeting to net8.0
Tracked with https://github.com/dotnet/fsharp/issues/14765
-->
<UsagePattern IdentityGlob="Microsoft.AspNetCore.App.Ref/8.0.2" />
<UsagePattern IdentityGlob="Microsoft.NETCore.App.Host.linux-x64/8.0.2" />
<UsagePattern IdentityGlob="Microsoft.NETCore.App.Ref/8.0.2" />
<UsagePattern IdentityGlob="Microsoft.AspNetCore.App.Ref/8.0.*" />
psfinaki marked this conversation as resolved.
Show resolved Hide resolved
<UsagePattern IdentityGlob="Microsoft.NETCore.App.Host.linux-x64/8.0.*" />
<UsagePattern IdentityGlob="Microsoft.NETCore.App.Ref/8.0.*" />
<UsagePattern IdentityGlob="System.Configuration.ConfigurationManager/7.0.0" />
<UsagePattern IdentityGlob="System.Diagnostics.EventLog/7.0.0" />
<UsagePattern IdentityGlob="System.Security.Cryptography.ProtectedData/7.0.0" />

<UsagePattern IdentityGlob="Microsoft.AspNetCore.App.Runtime.linux-x64/8.0.2" />
<UsagePattern IdentityGlob="Microsoft.NETCore.App.Crossgen2.linux-x64/8.0.2" />
<UsagePattern IdentityGlob="Microsoft.NETCore.App.Runtime.linux-x64/8.0.2" />
<UsagePattern IdentityGlob="Microsoft.AspNetCore.App.Runtime.linux-x64/8.0.*" />
<UsagePattern IdentityGlob="Microsoft.NETCore.App.Crossgen2.linux-x64/8.0.*" />
<UsagePattern IdentityGlob="Microsoft.NETCore.App.Runtime.linux-x64/8.0.*" />


<!-- Tracked in https://github.com/dotnet/source-build/issues/3438 -->
Expand Down
6 changes: 3 additions & 3 deletions eng/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ function TestUsingNUnit() {
projectname=$(basename -- "$testproject")
projectname="${projectname%.*}"
testlogpath="$artifacts_dir/TestResults/$configuration/${projectname}_$targetframework.xml"
args="test \"$testproject\" --no-restore --no-build -c $configuration -f $targetframework --test-adapter-path . --logger \"nunit;LogFilePath=$testlogpath\"$filterArgs --blame --results-directory $artifacts_dir/TestResults/$configuration"
args="test \"$testproject\" --no-restore --no-build -c $configuration -f $targetframework --test-adapter-path . --logger \"nunit;LogFilePath=$testlogpath\"$filterArgs --blame --results-directory $artifacts_dir/TestResults/$configuration -p:vstestusemsbuildoutput=false"
"$DOTNET_INSTALL_DIR/dotnet" $args || exit $?
}

Expand Down Expand Up @@ -325,9 +325,9 @@ BuildSolution
if [[ "$test_core_clr" == true ]]; then
coreclrtestframework=$tfm
TestUsingNUnit --testproject "$repo_root/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj" --targetframework $coreclrtestframework --notestfilter
TestUsingXUnit --testproject "$repo_root/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.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.Private.Scripting.UnitTests/FSharp.Compiler.Private.Scripting.UnitTests.fsproj" --targetframework $coreclrtestframework
TestUsingXUnit --testproject "$repo_root/tests/FSharp.Build.UnitTests/FSharp.Build.UnitTests.fsproj" --targetframework $coreclrtestframework
TestUsingNUnit --testproject "$repo_root/tests/FSharp.Build.UnitTests/FSharp.Build.UnitTests.fsproj" --targetframework $coreclrtestframework
TestUsingNUnit --testproject "$repo_root/tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.fsproj" --targetframework $coreclrtestframework
fi

Expand Down
4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"sdk": {
"version": "9.0.100-preview.3.24204.13",
"version": "9.0.100-preview.5.24307.3",
"allowPrerelease": true
},
"tools": {
"dotnet": "9.0.100-preview.3.24204.13",
"dotnet": "9.0.100-preview.5.24307.3",
"vs": {
"version": "17.8",
"components": [
Expand Down
59 changes: 47 additions & 12 deletions tests/FSharp.Core.UnitTests/FSharp.Core/OperatorsModuleDynamic.fs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,10 @@ module OperatorsModuleDynamic =

// Overflow
let result = Operators.byte Single.MaxValue
Assert.AreEqual(0uy, result)
if not Info.isNetFramework then
Assert.AreEqual(255uy, result)
else
Assert.AreEqual(0uy, result)
psfinaki marked this conversation as resolved.
Show resolved Hide resolved

// Overflow
let result = Operators.byte Double.MinValue
Expand Down Expand Up @@ -135,7 +138,12 @@ module OperatorsModuleDynamic =
// Overflow
Assert.AreEqual('\000', Operators.char Single.MinValue)
Assert.AreEqual('\000', Operators.char Double.MinValue)
Assert.AreEqual('\000', Operators.char Single.MaxValue)

if not Info.isNetFramework then
Assert.AreEqual('\uffff', Operators.char Single.MaxValue)
else
Assert.AreEqual('\000', Operators.char Single.MaxValue)

Assert.AreEqual('\000', Operators.char Double.MaxValue)
CheckThrowsOverflowException(fun () -> Operators.char Decimal.MinValue |> ignore)

Expand Down Expand Up @@ -286,7 +294,10 @@ module OperatorsModuleDynamic =

// Overflow
let result = Operators.int16 Single.MaxValue
Assert.AreEqual(0s, result)
if not Info.isNetFramework then
Assert.AreEqual(-1s, result)
else
Assert.AreEqual(0s, result)

// Overflow
let result = Operators.int16 Single.MinValue
Expand Down Expand Up @@ -338,7 +349,10 @@ module OperatorsModuleDynamic =

// Overflow
let result = Operators.int32 Single.MaxValue
Assert.AreEqual(Int32.MinValue, result)
if not Info.isNetFramework then
Assert.AreEqual(Int32.MaxValue, result)
else
Assert.AreEqual(Int32.MinValue, result)

// Overflow
let result = Operators.int32 Single.MinValue
Expand Down Expand Up @@ -391,7 +405,10 @@ module OperatorsModuleDynamic =

// Overflow.
let result = Operators.int64 Single.MaxValue
Assert.AreEqual(Int64.MinValue, result)
if not Info.isNetFramework then
Assert.AreEqual(Int64.MaxValue, result)
else
Assert.AreEqual(Int64.MinValue, result)

// Overflow
let result = Operators.int64 Single.MinValue
Expand Down Expand Up @@ -444,8 +461,11 @@ module OperatorsModuleDynamic =
if Info.isX86Runtime then
Assert.AreEqual(-2147483648n, result)
else
// Cannot use -9223372036854775808, compiler doesn't allow it, see https://github.com/dotnet/fsharp/issues/9524
Assert.AreEqual(-9223372036854775807n - 1n, result)
if not Info.isNetFramework then
Assert.AreEqual(9223372036854775807n, result)
else
// Cannot use -9223372036854775808, compiler doesn't allow it, see https://github.com/dotnet/fsharp/issues/9524
Assert.AreEqual(-9223372036854775807n - 1n, result)

// Overflow (depends on pointer size)
let result = Operators.nativeint Single.MinValue
Expand Down Expand Up @@ -544,7 +564,10 @@ module OperatorsModuleDynamic =

// Overflow
let result = Operators.sbyte Single.MaxValue
Assert.AreEqual(0y, result)
if not Info.isNetFramework then
Assert.AreEqual(-1y, result)
else
Assert.AreEqual(0y, result)

// Overflow
let result = Operators.sbyte Double.MinValue
Expand Down Expand Up @@ -596,7 +619,10 @@ module OperatorsModuleDynamic =

// Overflow
let result = Operators.uint16 Single.MaxValue
Assert.AreEqual(0us, result)
if not Info.isNetFramework then
Assert.AreEqual(65535us, result)
else
Assert.AreEqual(0us, result)

// Overflow
let result = Operators.uint16 Single.MinValue
Expand Down Expand Up @@ -629,7 +655,10 @@ module OperatorsModuleDynamic =

// Overflow
let result = Operators.uint32 Single.MaxValue
Assert.AreEqual(0u, result)
if not Info.isNetFramework then
Assert.AreEqual(4294967295u, result)
else
Assert.AreEqual(0u, result)

// Overflow
let result = Operators.uint32 Single.MinValue
Expand Down Expand Up @@ -679,7 +708,10 @@ module OperatorsModuleDynamic =

// Overflow
let result = Operators.uint64 Single.MaxValue
Assert.AreEqual(0UL, result)
if not Info.isNetFramework then
Assert.AreEqual(18446744073709551615UL, result)
else
Assert.AreEqual(0UL, result)

// Overflow
let result = Operators.uint64 Single.MinValue
Expand Down Expand Up @@ -721,7 +753,10 @@ module OperatorsModuleDynamic =

// Overflow Single.MaxValue is equal on 32 bits and 64 bits runtimes
let result = Operators.unativeint Single.MaxValue
Assert.AreEqual(0un, result)
if not Info.isNetFramework then
Assert.AreEqual(18446744073709551615un, result)
else
Assert.AreEqual(0un, result)

// Overflow (depends on pointer size)
let result = Operators.unativeint Single.MinValue
Expand Down
Loading