Skip to content

Commit e22bcda

Browse files
abonieCopilot
andauthored
[release/dev18.11] Backport package security updates (#20956)
* Update cryptography dependency to 10.0.13 (#20783) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: d8b637c2-ce3f-47e0-bf7f-ea6809e16eb6 Backport-of: 6c79b63 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3ea3661e-bfd2-4eab-ae53-dffca4d40576 * Update MessagePack package version to 2.5.303 (#20854) Backport-of: fe180de Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3ea3661e-bfd2-4eab-ae53-dffca4d40576 * Update .NET SDK to unblock NativeAOT restore (#20929) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 490c9e24-6626-47cf-a24a-266fc29bd1d2 Backport-of: 23950a9 Copilot-Session: 3ea3661e-bfd2-4eab-ae53-dffca4d40576 * Adapt floating-point conversion tests for .NET 11 (#20400) Backport the numeric-conversion test adaptations from #20400, retaining older-runtime expectations. Source-commit: 0b2dec7 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3ea3661e-bfd2-4eab-ae53-dffca4d40576 * Publish ILVerify actual baselines on CI failure (#20585) Backport the pipeline artifact publishing and its regression tests from #20585. Keep verifier failures unchanged and diagnostic collection and publishing non-blocking. Source-commit: c593bdb Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3ea3661e-bfd2-4eab-ae53-dffca4d40576 * Adapt String completion expectations for .NET 11 (#20400) Backport the remaining EditorTests.fs compatibility hunk from #20400. Include ToLowerOrdinal and ToUpperOrdinal only for .NET 11 and newer, preserving older-framework completion expectations. Source-commit: 0b2dec7 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3ea3661e-bfd2-4eab-ae53-dffca4d40576 * Bump servicing package versions after publication Advance the shared build number to 102 for FSharp.Core 11.0.102 and FSharp.Compiler.Service 43.13.102. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3ea3661e-bfd2-4eab-ae53-dffca4d40576 --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: d8b637c2-ce3f-47e0-bf7f-ea6809e16eb6 Copilot-Session: 3ea3661e-bfd2-4eab-ae53-dffca4d40576 Copilot-Session: 490c9e24-6626-47cf-a24a-266fc29bd1d2
1 parent ac4fecf commit e22bcda

11 files changed

Lines changed: 339 additions & 14 deletions

File tree

‎azure-pipelines-PR.yml‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -746,6 +746,38 @@ stages:
746746
displayName: Run ILVerify
747747
workingDirectory: $(Build.SourcesDirectory)
748748

749+
- pwsh: |
750+
$ErrorActionPreference = 'Stop'
751+
Write-Host "##vso[task.setvariable variable=ILVerifyActualBaselinesFound]false"
752+
$source = "$(Build.SourcesDirectory)\tests\ILVerify"
753+
if (-not (Test-Path -LiteralPath $source -PathType Container)) {
754+
Write-Host "No ILVerify actual baselines: source directory is absent."
755+
return
756+
}
757+
$actuals = @(Get-ChildItem -LiteralPath $source -Filter '*.bsl.actual' -File)
758+
if ($actuals.Count -eq 0) {
759+
Write-Host "No ILVerify actual baselines found."
760+
return
761+
}
762+
$destination = "$(Build.ArtifactStagingDirectory)\ILVerifyActualBaselines-$(System.JobAttempt)"
763+
New-Item -ItemType Directory -Path $destination | Out-Null
764+
foreach ($actual in $actuals) {
765+
Copy-Item -LiteralPath $actual.FullName -Destination $destination
766+
}
767+
Write-Host "Staged $($actuals.Count) ILVerify actual baseline(s)."
768+
Write-Host "##vso[task.setvariable variable=ILVerifyActualBaselinesFound]true"
769+
displayName: Stage ILVerify actual baselines
770+
condition: failed()
771+
continueOnError: true
772+
773+
- task: PublishPipelineArtifact@1
774+
displayName: Publish ILVerify actual baselines
775+
inputs:
776+
targetPath: '$(Build.ArtifactStagingDirectory)\ILVerifyActualBaselines-$(System.JobAttempt)'
777+
artifactName: 'ILVerify actual baselines Attempt $(System.JobAttempt)'
778+
condition: and(failed(), eq(variables['ILVerifyActualBaselinesFound'], 'true'))
779+
continueOnError: true
780+
749781
#-------------------------------------------------------------------------------------------------------------------#
750782
# F# Compiler Regression Tests #
751783
#-------------------------------------------------------------------------------------------------------------------#

‎eng/Packages.props‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<!-- Security: pin the transitive MessagePack (pulled via StreamJsonRpc) to a patched version.
1717
Versions < 2.5.301 have known vulnerabilities (NU1902/NU1903). Transitive pinning applies it
1818
wherever StreamJsonRpc is used (FSharp.Compiler.LanguageServer and the CLASP.Framework.Proxy). -->
19-
<PackageVersion Include="MessagePack" Version="2.5.302" />
19+
<PackageVersion Include="MessagePack" Version="2.5.303" />
2020
<PackageVersion Include="Microsoft.Build" Version="$(MicrosoftBuildVersion)" />
2121
<PackageVersion Include="Microsoft.Build.Framework" Version="$(MicrosoftBuildFrameworkVersion)" />
2222
<PackageVersion Include="Microsoft.Build.Tasks.Core" Version="$(MicrosoftBuildTasksCoreVersion)" />

‎eng/Version.Details.props‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ This file should be imported by eng/Versions.props
3333
<SystemCompositionPackageVersion>10.0.8</SystemCompositionPackageVersion>
3434
<SystemDiagnosticsDiagnosticSourcePackageVersion>10.0.8</SystemDiagnosticsDiagnosticSourcePackageVersion>
3535
<SystemReflectionMetadataPackageVersion>10.0.8</SystemReflectionMetadataPackageVersion>
36-
<SystemSecurityCryptographyXmlPackageVersion>10.0.10</SystemSecurityCryptographyXmlPackageVersion>
36+
<SystemSecurityCryptographyXmlPackageVersion>10.0.13</SystemSecurityCryptographyXmlPackageVersion>
3737
</PropertyGroup>
3838
<!--Property group for alternate package version names-->
3939
<PropertyGroup>

‎eng/Version.Details.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
</Sha>
8080
</Dependency>
8181
<!-- Necessary for source-build. This allows the live version of the package to be used by source-build. -->
82-
<Dependency Name="System.Security.Cryptography.Xml" Version="10.0.10">
82+
<Dependency Name="System.Security.Cryptography.Xml" Version="10.0.13">
8383
<Uri>https://github.com/dotnet/runtime</Uri>
8484
<Sha>
8585
</Sha>

‎eng/Versions.props‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<!-- F# Version components -->
2020
<FSMajorVersion>11</FSMajorVersion>
2121
<FSMinorVersion>0</FSMinorVersion>
22-
<FSBuildVersion>101</FSBuildVersion>
22+
<FSBuildVersion>102</FSBuildVersion>
2323
<FSRevisionVersion>0</FSRevisionVersion>
2424
<!-- -->
2525
<!-- F# Language version -->

‎global.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"sdk": {
3-
"version": "11.0.100-preview.6.26359.118",
3+
"version": "11.0.100-rc.3.26522.148",
44
"allowPrerelease": true,
55
"rollForward": "latestMinor",
66
"paths": [
@@ -13,7 +13,7 @@
1313
"runner": "Microsoft.Testing.Platform"
1414
},
1515
"tools": {
16-
"dotnet": "11.0.100-preview.6.26359.118",
16+
"dotnet": "11.0.100-rc.3.26522.148",
1717
"vs": {
1818
"version": "18.0",
1919
"components": [

‎tests/FSharp.Compiler.Service.Tests/EditorTests.fs‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,11 @@ let stringMethods =
3636
"ReplaceLineEndings";
3737
#endif
3838
"Split"; "StartsWith"; "Substring";
39-
"ToCharArray"; "ToLower"; "ToLowerInvariant"; "ToString"; "ToUpper";
39+
"ToCharArray"; "ToLower"; "ToLowerInvariant";
40+
#if NET11_0_OR_GREATER
41+
"ToLowerOrdinal"; "ToUpperOrdinal";
42+
#endif
43+
"ToString"; "ToUpper";
4044
"ToUpperInvariant"; "Trim"; "TrimEnd"; "TrimStart";
4145
#if NETCOREAPP
4246
"TryCopyTo"

‎tests/FSharp.Core.UnitTests/FSharp.Core/OperatorsModule2.fs‎

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,23 +125,33 @@ type OperatorsModule2() =
125125
let result = Operators.int16 Single.MaxValue
126126
if Info.isNetFramework then
127127
Assert.AreEqual(0s, result)
128+
elif Info.isNet11OrGreater then
129+
Assert.AreEqual(Int16.MaxValue, result)
128130
else
129131
Assert.AreEqual(-1s, result)
130132

131133
// Overflow
132134
let result = Operators.int16 Single.MinValue
133-
Assert.AreEqual(0s, result)
135+
if Info.isNet11OrGreater then
136+
Assert.AreEqual(Int16.MinValue, result)
137+
else
138+
Assert.AreEqual(0s, result)
134139

135140
// Overflow
136141
let result = Operators.int16 Double.MaxValue
137142
if Info.isNetFramework then
138143
Assert.AreEqual(0s, result)
144+
elif Info.isNet11OrGreater then
145+
Assert.AreEqual(Int16.MaxValue, result)
139146
else
140147
Assert.AreEqual(-1s, result)
141148

142149
// Overflow
143150
let result = Operators.int16 Double.MinValue
144-
Assert.AreEqual(0s, result)
151+
if Info.isNet11OrGreater then
152+
Assert.AreEqual(Int16.MinValue, result)
153+
else
154+
Assert.AreEqual(0s, result)
145155

146156
let result = Operators.int16 Int64.MaxValue
147157
Assert.AreEqual(-1s, result)
@@ -633,12 +643,17 @@ type OperatorsModule2() =
633643

634644
// Overflow
635645
let result = Operators.sbyte Double.MinValue
636-
Assert.AreEqual(0y, result)
646+
if Info.isNet11OrGreater then
647+
Assert.AreEqual(SByte.MinValue, result)
648+
else
649+
Assert.AreEqual(0y, result)
637650

638651
// Overflow
639652
let result = Operators.sbyte Double.MaxValue
640653
if Info.isNetFramework then
641654
Assert.AreEqual(0y, result)
655+
elif Info.isNet11OrGreater then
656+
Assert.AreEqual(SByte.MaxValue, result)
642657
else
643658
Assert.AreEqual(-1y, result)
644659

‎tests/FSharp.Core.UnitTests/FSharp.Core/OperatorsModuleDynamic.fs‎

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -312,23 +312,33 @@ module OperatorsModuleDynamic =
312312
let result = Operators.int16 Single.MaxValue
313313
if Info.isNetFramework then
314314
Assert.AreEqual(0s, result)
315+
elif Info.isNet11OrGreater then
316+
Assert.AreEqual(Int16.MaxValue, result)
315317
else
316318
Assert.AreEqual(-1s, result)
317319

318320
// Overflow
319321
let result = Operators.int16 Single.MinValue
320-
Assert.AreEqual(0s, result)
322+
if Info.isNet11OrGreater then
323+
Assert.AreEqual(Int16.MinValue, result)
324+
else
325+
Assert.AreEqual(0s, result)
321326

322327
// Overflow
323328
let result = Operators.int16 Double.MaxValue
324329
if Info.isNetFramework then
325330
Assert.AreEqual(0s, result)
331+
elif Info.isNet11OrGreater then
332+
Assert.AreEqual(Int16.MaxValue, result)
326333
else
327334
Assert.AreEqual(-1s, result)
328335

329336
// Overflow
330337
let result = Operators.int16 Double.MinValue
331-
Assert.AreEqual(0s, result)
338+
if Info.isNet11OrGreater then
339+
Assert.AreEqual(Int16.MinValue, result)
340+
else
341+
Assert.AreEqual(0s, result)
332342

333343
let result = Operators.int16 Int64.MaxValue
334344
Assert.AreEqual(-1s, result)
@@ -590,23 +600,33 @@ module OperatorsModuleDynamic =
590600

591601
// Overflow
592602
let result = Operators.sbyte Single.MinValue
593-
Assert.AreEqual(0y, result)
603+
if Info.isNet11OrGreater then
604+
Assert.AreEqual(SByte.MinValue, result)
605+
else
606+
Assert.AreEqual(0y, result)
594607

595608
// Overflow
596609
let result = Operators.sbyte Single.MaxValue
597610
if Info.isNetFramework then
598611
Assert.AreEqual(0y, result)
612+
elif Info.isNet11OrGreater then
613+
Assert.AreEqual(SByte.MaxValue, result)
599614
else
600615
Assert.AreEqual(-1y, result)
601616

602617
// Overflow
603618
let result = Operators.sbyte Double.MinValue
604-
Assert.AreEqual(0y, result)
619+
if Info.isNet11OrGreater then
620+
Assert.AreEqual(SByte.MinValue, result)
621+
else
622+
Assert.AreEqual(0y, result)
605623

606624
// Overflow
607625
let result = Operators.sbyte Double.MaxValue
608626
if Info.isNetFramework then
609627
Assert.AreEqual(0y, result)
628+
elif Info.isNet11OrGreater then
629+
Assert.AreEqual(SByte.MaxValue, result)
610630
else
611631
Assert.AreEqual(-1y, result)
612632

‎tests/FSharp.Core.UnitTests/TestFrameworkHelpers.fs‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ module Info =
3131
/// Whether a test is run after being compiled to .NET Native
3232
let isNetNative = framework.StartsWith(".NET Native")
3333

34+
/// From .NET 11, narrow (sbyte/int16) floating-point-to-integer conversions saturate directly to the
35+
/// target type's range. Earlier runtimes saturated to Int32 first and then truncated the low bits, which
36+
/// yielded different overflow results for the signed narrow types. Use this to select the expected value.
37+
let isNet11OrGreater = not isNetFramework && Environment.Version.Major >= 11
38+
3439

3540
module private Impl =
3641

0 commit comments

Comments
 (0)