Skip to content

Commit af5779c

Browse files
Merge branch 'main' of https://github.com/dotnet/fsharp into csharp-collection-expression-support
2 parents fca5827 + df3382c commit af5779c

File tree

10 files changed

+300
-96
lines changed

10 files changed

+300
-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: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ usage()
2626
echo " --testcoreclr Run unit tests on .NET Core (short: --test, -t)"
2727
echo " --testCompilerComponentTests Run FSharp.Compiler.ComponentTests on .NET Core"
2828
echo " --testBenchmarks Build and Run Benchmark suite"
29+
echo " --testScripting Run FSharp.Private.ScriptingTests on .NET Core"
2930
echo ""
3031
echo "Advanced settings:"
3132
echo " --ci Building in CI"
@@ -60,6 +61,7 @@ publish=false
6061
test_core_clr=false
6162
test_compilercomponent_tests=false
6263
test_benchmarks=false
64+
test_scripting=false
6365
configuration="Debug"
6466
verbosity='minimal'
6567
binary_log=false
@@ -136,6 +138,9 @@ while [[ $# > 0 ]]; do
136138
--testbenchmarks)
137139
test_benchmarks=true
138140
;;
141+
--testscripting)
142+
test_scripting=true
143+
;;
139144
--ci)
140145
ci=true
141146
;;
@@ -209,7 +214,7 @@ function Test() {
209214
projectname=$(basename -- "$testproject")
210215
projectname="${projectname%.*}"
211216
testlogpath="$artifacts_dir/TestResults/$configuration/${projectname}_$targetframework.xml"
212-
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"
213218
"$DOTNET_INSTALL_DIR/dotnet" $args || exit $?
214219
}
215220

@@ -333,4 +338,9 @@ if [[ "$test_benchmarks" == true ]]; then
333338
popd
334339
fi
335340

341+
if [[ "$test_scripting" == true ]]; then
342+
coreclrtestframework=$tfm
343+
Test --testproject "$repo_root/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharp.Compiler.Private.Scripting.UnitTests.fsproj" --targetframework $coreclrtestframework
344+
fi
345+
336346
ExitWithExitCode 0

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.Compiler.Private.Scripting.UnitTests/DependencyManagerInteractiveTests.fs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,10 @@ TorchSharp.Tensor.LongTensor.From([| 0L .. 100L |]).Device
264264

265265
[<Fact>]
266266
member _.``Use Dependency Manager to restore packages with native dependencies, build and run script that depends on the results``() =
267+
// Skip test on arm64, because there is not an arm64 netive library
268+
if RuntimeInformation.ProcessArchitecture = Architecture.Arm64 then
269+
()
270+
else
267271
let packagemanagerlines = [|
268272
"r", "Microsoft.ML,version=1.4.0-preview"
269273
"r", "Microsoft.ML.AutoML,version=0.16.0-preview"
@@ -360,6 +364,10 @@ printfn ""%A"" result
360364

361365
[<Fact>]
362366
member _.``Use NativeResolver to resolve native dlls.``() =
367+
// Skip test on arm64, because there is not an arm64 netive library
368+
if RuntimeInformation.ProcessArchitecture = Architecture.Arm64 then
369+
()
370+
else
363371
let packagemanagerlines = [|
364372
"r", "Microsoft.ML,version=1.4.0-preview"
365373
"r", "Microsoft.ML.AutoML,version=0.16.0-preview"
@@ -442,6 +450,10 @@ printfn ""%A"" result
442450

443451
[<Fact>]
444452
member _.``Use AssemblyResolver to resolve assemblies``() =
453+
// Skip test on arm64, because there is not an arm64 netive library
454+
if RuntimeInformation.ProcessArchitecture = Architecture.Arm64 then
455+
()
456+
else
445457
let packagemanagerlines = [|
446458
"r", "Microsoft.ML,version=1.4.0-preview"
447459
"r", "Microsoft.ML.AutoML,version=0.16.0-preview"

tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharpScriptTests.fs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,10 @@ System.Configuration.ConfigurationManager.AppSettings.Item "Environment" <- "LOC
247247
#if NETSTANDARD
248248
[<Fact>]
249249
member _.``ML - use assembly with native dependencies``() =
250+
// Skip test on arm64, because there is not an arm64 netive library
251+
if RuntimeInformation.ProcessArchitecture = Architecture.Arm64 then
252+
()
253+
else
250254
let code = @"
251255
#r ""nuget:Microsoft.ML,version=1.4.0-preview""
252256
#r ""nuget:Microsoft.ML.AutoML,version=0.16.0-preview""

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)