Skip to content

Commit df3382c

Browse files
.NET 9preview5 (#17224)
* .NET 9preview4 * New macos + udpated prebuilts * p5 + some tests fixes * Update SourceBuildPrebuiltBaseline.xml * fix * Don't use msbuild output * Update OperatorsModuleDynamic.fs * reverting this, will be fixed separately * up * Update OperatorsModuleDynamic.fs * Revert "Update OperatorsModuleDynamic.fs" This reverts commit fc20f9e. * Update OperatorsModuleDynamic.fs * Update OperatorsModuleDynamic.fs * up * Update OperatorsModule1.fs * Update OperatorsModule2.fs * Update OperatorsModuleDynamic.fs * Update OperatorsModule1.fs * Update OperatorsModule2.fs * Update OperatorsModule2.fs * remove old workarond * Revert "remove old workarond" This reverts commit a27df0f. * Update OperatorsModule2.fs * invert ifs, set up consts * comments --------- Co-authored-by: Petr <[email protected]>
1 parent 4a867ed commit df3382c

File tree

8 files changed

+274
-96
lines changed

8 files changed

+274
-96
lines changed

.devcontainer/devcontainer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// For format details, see https://aka.ms/vscode-remote/devcontainer.json or this file's README at:
22
{
33
"name": "F#",
4-
"image": "mcr.microsoft.com/dotnet/sdk:9.0.100-preview.3",
4+
"image": "mcr.microsoft.com/dotnet/sdk:9.0.100-preview.5",
55
"features": {
6-
"ghcr.io/devcontainers/features/common-utils:2.4.2": {},
6+
"ghcr.io/devcontainers/features/common-utils:2.4.3": {},
77
"ghcr.io/devcontainers/features/git:1.2.0": {},
88
"ghcr.io/devcontainers/features/github-cli:1.0.11": {},
9-
"ghcr.io/devcontainers/features/dotnet:2.0.5": {}
9+
"ghcr.io/devcontainers/features/dotnet:2.1.0": {}
1010
},
1111
"hostRequirements": {
1212
"cpus": 2,

eng/Build.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ function TestUsingMSBuild([string] $testProject, [string] $targetFramework, [str
361361
$testLogPath = "$ArtifactsDir\TestResults\$configuration\${projectName}_$targetFramework.xml"
362362
$testBinLogPath = "$LogDir\${projectName}_$targetFramework.binlog"
363363
$args = "test $testProject -c $configuration -f $targetFramework -v n --test-adapter-path $testadapterpath --logger ""nunit;LogFilePath=$testLogPath"" /bl:$testBinLogPath"
364-
$args += " --blame --results-directory $ArtifactsDir\TestResults\$configuration"
364+
$args += " --blame --results-directory $ArtifactsDir\TestResults\$configuration -p:vstestusemsbuildoutput=false"
365365

366366
if (-not $noVisualStudio -or $norestore) {
367367
$args += " --no-restore"

eng/SourceBuildPrebuiltBaseline.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@
99
These will go away when repo updates targeting to net8.0
1010
Tracked with https://github.com/dotnet/fsharp/issues/14765
1111
-->
12-
<UsagePattern IdentityGlob="Microsoft.AspNetCore.App.Ref/8.0.2" />
13-
<UsagePattern IdentityGlob="Microsoft.NETCore.App.Host.linux-x64/8.0.2" />
14-
<UsagePattern IdentityGlob="Microsoft.NETCore.App.Ref/8.0.2" />
12+
<UsagePattern IdentityGlob="Microsoft.AspNetCore.App.Ref/8.0.*" />
13+
<UsagePattern IdentityGlob="Microsoft.NETCore.App.Host.linux-x64/8.0.*" />
14+
<UsagePattern IdentityGlob="Microsoft.NETCore.App.Ref/8.0.*" />
1515
<UsagePattern IdentityGlob="System.Configuration.ConfigurationManager/7.0.0" />
1616
<UsagePattern IdentityGlob="System.Diagnostics.EventLog/7.0.0" />
1717
<UsagePattern IdentityGlob="System.Security.Cryptography.ProtectedData/7.0.0" />
1818

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

2323

2424
<!-- Tracked in https://github.com/dotnet/source-build/issues/3438 -->

eng/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ function Test() {
214214
projectname=$(basename -- "$testproject")
215215
projectname="${projectname%.*}"
216216
testlogpath="$artifacts_dir/TestResults/$configuration/${projectname}_$targetframework.xml"
217-
args="test \"$testproject\" --no-restore --no-build -c $configuration -f $targetframework --test-adapter-path . --logger \"nunit;LogFilePath=$testlogpath\" --blame --results-directory $artifacts_dir/TestResults/$configuration"
217+
args="test \"$testproject\" --no-restore --no-build -c $configuration -f $targetframework --test-adapter-path . --logger \"nunit;LogFilePath=$testlogpath\" --blame --results-directory $artifacts_dir/TestResults/$configuration -p:vstestusemsbuildoutput=false"
218218
"$DOTNET_INSTALL_DIR/dotnet" $args || exit $?
219219
}
220220

global.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"sdk": {
3-
"version": "9.0.100-preview.3.24204.13",
3+
"version": "9.0.100-preview.5.24307.3",
44
"allowPrerelease": true
55
},
66
"tools": {
7-
"dotnet": "9.0.100-preview.3.24204.13",
7+
"dotnet": "9.0.100-preview.5.24307.3",
88
"vs": {
99
"version": "17.8",
1010
"components": [

tests/FSharp.Core.UnitTests/FSharp.Core/OperatorsModule1.fs

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
// Various tests for the:
44
// Microsoft.FSharp.Core.Operators module
55

6+
// For information on the runtime-dependent behavior differences in this file, see:
7+
// - https://github.com/dotnet/runtime/issues/61885
8+
// - https://github.com/dotnet/runtime/pull/97529
9+
610
namespace FSharp.Core.UnitTests.Operators
711

812
open System
@@ -278,18 +282,24 @@ type OperatorsModule1() =
278282
// Overflow
279283
let result = Operators.byte Single.MinValue
280284
Assert.AreEqual(0uy, result)
281-
285+
282286
// Overflow
283287
let result = Operators.byte Single.MaxValue
284-
Assert.AreEqual(0uy, result)
285-
288+
if Info.isNetFramework then
289+
Assert.AreEqual(0uy, result)
290+
else
291+
Assert.AreEqual(255uy, result)
292+
286293
// Overflow
287294
let result = Operators.byte Double.MinValue
288295
Assert.AreEqual(0uy, result)
289-
296+
290297
// Overflow
291298
let result = Operators.byte Double.MaxValue
292-
Assert.AreEqual(0uy, result)
299+
if Info.isNetFramework then
300+
Assert.AreEqual(0uy, result)
301+
else
302+
Assert.AreEqual(255uy, result)
293303

294304
// Overflow
295305
let result = Operators.byte (Int64.MaxValue * 8L)
@@ -343,9 +353,15 @@ type OperatorsModule1() =
343353

344354
// Overflow
345355
Assert.AreEqual('\000', Operators.char Single.MinValue)
346-
Assert.AreEqual('\000', Operators.char Double.MinValue)
347-
Assert.AreEqual('\000', Operators.char Single.MaxValue)
348-
Assert.AreEqual('\000', Operators.char Double.MaxValue)
356+
if Info.isNetFramework then
357+
Assert.AreEqual('\000', Operators.char Single.MaxValue)
358+
else
359+
Assert.AreEqual('\uffff', Operators.char Single.MaxValue)
360+
361+
if Info.isNetFramework then
362+
Assert.AreEqual('\000', Operators.char Double.MaxValue)
363+
else
364+
Assert.AreEqual('\uffff', Operators.char Double.MaxValue)
349365
CheckThrowsOverflowException(fun () -> Operators.char Decimal.MinValue |> ignore)
350366

351367
// string type

0 commit comments

Comments
 (0)