Skip to content

Commit e7d8762

Browse files
authored
Merge pull request #12764 from dotnet/merges/main-to-release/dev17.2
Merge main to release/dev17.2
2 parents 6f71fa0 + f3dfa9d commit e7d8762

30 files changed

+4387
-162
lines changed

eng/Version.Details.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
</Dependency>
99
</ProductDependencies>
1010
<ToolsetDependencies>
11-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="7.0.0-beta.22114.7">
11+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="7.0.0-beta.22117.2">
1212
<Uri>https://github.com/dotnet/arcade</Uri>
13-
<Sha>6d977266bcc193caedb60a27ae44d14d9a11a040</Sha>
13+
<Sha>49750c02e63d0ad3a77d035bba7498a0b1acd218</Sha>
1414
<SourceBuild RepoName="arcade" ManagedOnly="true" />
1515
</Dependency>
1616
</ToolsetDependencies>

eng/common/retain-build.ps1

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
2+
Param(
3+
[Parameter(Mandatory=$true)][int] $buildId,
4+
[Parameter(Mandatory=$true)][string] $azdoOrgUri,
5+
[Parameter(Mandatory=$true)][string] $azdoProject,
6+
[Parameter(Mandatory=$true)][string] $token
7+
)
8+
9+
$ErrorActionPreference = 'Stop'
10+
Set-StrictMode -Version 2.0
11+
. $PSScriptRoot\tools.ps1
12+
13+
14+
function Get-AzDOHeaders(
15+
[string] $token)
16+
{
17+
$base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(":${token}"))
18+
$headers = @{"Authorization"="Basic $base64AuthInfo"}
19+
return $headers
20+
}
21+
22+
function Update-BuildRetention(
23+
[string] $azdoOrgUri,
24+
[string] $azdoProject,
25+
[int] $buildId,
26+
[string] $token)
27+
{
28+
$headers = Get-AzDOHeaders -token $token
29+
$requestBody = "{
30+
`"keepForever`": `"true`"
31+
}"
32+
33+
$requestUri = "${azdoOrgUri}/${azdoProject}/_apis/build/builds/${buildId}?api-version=6.0"
34+
write-Host "Attempting to retain build using the following URI: ${requestUri} ..."
35+
36+
try {
37+
Invoke-RestMethod -Uri $requestUri -Method Patch -Body $requestBody -Header $headers -contentType "application/json"
38+
Write-Host "Updated retention settings for build ${buildId}."
39+
}
40+
catch {
41+
Write-PipelineTelemetryError -Category "Build" -Message "Failed to update retention settings for build: $_.Exception.Response.StatusDescription"
42+
ExitWithExitCode 1
43+
}
44+
}
45+
46+
Update-BuildRetention -azdoOrgUri $azdoOrgUri -azdoProject $azdoProject -buildId $buildId -token $token
47+
ExitWithExitCode 0

eng/common/templates/jobs/jobs.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@ parameters:
88
# Optional: Enable publishing using release pipelines
99
enablePublishUsingPipelines: false
1010

11-
# Optional: Disable component governance detection. In general, component governance
12-
# should be on for all jobs. Use only in the event of issues.
13-
disableComponentGovernance: false
14-
1511
# Optional: Enable running the source-build jobs to build repo from source
1612
enableSourceBuild: false
1713

@@ -41,11 +37,6 @@ parameters:
4137
# Internal resources (telemetry, microbuild) can only be accessed from non-public projects,
4238
# and some (Microbuild) should only be applied to non-PR cases for internal builds.
4339

44-
# Sbom related params
45-
enableSbom: true
46-
PackageVersion: 7.0.0
47-
BuildDropPath: '$(Build.SourcesDirectory)/artifacts'
48-
4940
jobs:
5041
- ${{ each job in parameters.jobs }}:
5142
- template: ../job/job.yml
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
parameters:
2+
# Optional azure devops PAT with build execute permissions for the build's organization,
3+
# only needed if the build that should be retained ran on a different organization than
4+
# the pipeline where this template is executing from
5+
Token: ''
6+
# Optional BuildId to retain, defaults to the current running build
7+
BuildId: ''
8+
# Azure devops Organization URI for the build in the https://dev.azure.com/<organization> format.
9+
# Defaults to the organization the current pipeline is running on
10+
AzdoOrgUri: '$(System.CollectionUri)'
11+
# Azure devops project for the build. Defaults to the project the current pipeline is running on
12+
AzdoProject: '$(System.TeamProject)'
13+
14+
steps:
15+
- task: powershell@2
16+
inputs:
17+
targetType: 'filePath'
18+
filePath: eng/common/retain-build.ps1
19+
pwsh: true
20+
arguments: >
21+
-AzdoOrgUri: ${{parameters.AzdoOrgUri}}
22+
-AzdoProject ${{parameters.AzdoProject}}
23+
-Token ${{coalesce(parameters.Token, '$env:SYSTEM_ACCESSTOKEN') }}
24+
-BuildId ${{coalesce(parameters.BuildId, '$env:BUILD_ID')}}
25+
displayName: Enable permanent build retention
26+
env:
27+
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
28+
BUILD_ID: $(Build.BuildId)

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"perl": "5.32.1.1"
1818
},
1919
"msbuild-sdks": {
20-
"Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22114.7",
20+
"Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22117.2",
2121
"Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19069.2"
2222
}
2323
}

src/fsharp/FSComp.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1248,6 +1248,7 @@ featureDiscardUseValue,"discard pattern in use binding"
12481248
featureNonVariablePatternsToRightOfAsPatterns,"non-variable patterns to the right of 'as' patterns"
12491249
featureAttributesToRightOfModuleKeyword,"attributes to the right of the 'module' keyword"
12501250
featureMLCompatRevisions,"ML compatibility revisions"
1251+
featureBetterExceptionPrinting,"automatic generation of 'Message' property for 'exception' declarations"
12511252
3090,tcIfThenElseMayNotBeUsedWithinQueries,"An if/then/else expression may not be used within queries. Consider using either an if/then expression, or use a sequence expression instead."
12521253
3091,ilxgenUnexpectedArgumentToMethodHandleOfDuringCodegen,"Invalid argument to 'methodhandleof' during codegen"
12531254
3092,etProvidedTypeReferenceMissingArgument,"A reference to a provided type was missing a value for the static parameter '%s'. You may need to recompile one or more referenced assemblies."

src/fsharp/FSharp.Core/prim-types.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4790,7 +4790,7 @@ namespace Microsoft.FSharp.Core
47904790
System.Threading.Monitor.Exit(lockobj)
47914791
#else
47924792
[<CompiledName("Lock")>]
4793-
let inline lock (lockObject : 'T when 'T : not struct) action =
4793+
let inline lock (lockObject : 'T when 'T : not struct) ([<InlineIfLambda>] action) =
47944794
let mutable lockTaken = false
47954795
try
47964796
System.Threading.Monitor.Enter(lockObject, &lockTaken);

src/fsharp/FSharp.Core/prim-types.fsi

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2760,9 +2760,9 @@ namespace Microsoft.FSharp.Core
27602760
/// <example id="left-shift-example-1">
27612761
/// <code lang="fsharp">
27622762
/// let a = 13 // 00000000000000000000000000001101
2763-
/// let c = a &lt;&lt; 4 // 00000000000000000000000011010000
2763+
/// let c = a &lt;&lt;&lt; 4 // 00000000000000000000000011010000
27642764
/// </code>
2765-
/// Evaluates to 206
2765+
/// Evaluates to 208
27662766
/// </example>
27672767
val inline (<<<): value: ^T -> shift: int32 -> ^T when ^T : (static member (<<<) : ^T * int32 -> ^T) and default ^T : int
27682768

@@ -2776,9 +2776,9 @@ namespace Microsoft.FSharp.Core
27762776
/// <example id="right-shift-example-1">
27772777
/// <code lang="fsharp">
27782778
/// let a = 206 // 00000000000000000000000011010000
2779-
/// let c1 = a &gt;&gt; 2 // 00000000000000000000000000110100
2779+
/// let c1 = a &gt;&gt;&gt; 2 // 00000000000000000000000000110100
27802780
/// // Evaluates to 51
2781-
/// let c2 = a &gt;&gt; 6 // 00000000000000000000000000000011
2781+
/// let c2 = a &gt;&gt;&gt; 6 // 00000000000000000000000000000011
27822782
/// Evaluates to 3
27832783
/// </code>
27842784
/// </example>

src/fsharp/IlxGen.fs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7761,7 +7761,8 @@ and GenAbstractBinding cenv eenv tref (vref: ValRef) =
77617761
else
77627762
[], [], []
77637763

7764-
and GenToStringMethod cenv eenv ilThisTy m = GenPrintingMethod cenv eenv "ToString" ilThisTy m
7764+
and GenToStringMethod cenv eenv ilThisTy m =
7765+
GenPrintingMethod cenv eenv "ToString" ilThisTy m
77657766

77667767
/// Generate a ToString/get_Message method that calls 'sprintf "%A"'
77677768
and GenPrintingMethod cenv eenv methName ilThisTy m =
@@ -8493,10 +8494,13 @@ and GenExnDef cenv mgbuf eenv m (exnc: Tycon) =
84938494
yield! serializationRelatedMembers
84948495
yield! ilMethodDefsForProperties
84958496

8496-
if not (exnc.HasMember g "get_Message" []) && not (exnc.HasMember g "Message" []) then
8497+
if cenv.g.langVersion.SupportsFeature(LanguageFeature.BetterExceptionPrinting) &&
8498+
not (exnc.HasMember g "get_Message" []) &&
8499+
not (exnc.HasMember g "Message" []) then
84978500
yield! GenPrintingMethod cenv eenv "get_Message" ilThisTy m ]
84988501

84998502
let interfaces = exnc.ImmediateInterfaceTypesOfFSharpTycon |> List.map (GenType cenv.amap m eenv.tyenv)
8503+
85008504
let tdef =
85018505
mkILGenericClass
85028506
(ilTypeName, access, [], g.iltyp_Exception,
@@ -8508,6 +8512,7 @@ and GenExnDef cenv mgbuf eenv m (exnc: Tycon) =
85088512
emptyILEvents,
85098513
mkILCustomAttrs [mkCompilationMappingAttr g (int SourceConstructFlags.Exception)],
85108514
ILTypeInit.BeforeField)
8515+
85118516
let tdef = tdef.WithSerializable(true)
85128517
mgbuf.AddTypeDef(tref, tdef, false, false, None)
85138518

src/fsharp/LanguageFeatures.fs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ type LanguageFeature =
4545
| NonVariablePatternsToRightOfAsPatterns
4646
| AttributesToRightOfModuleKeyword
4747
| MLCompatRevisions
48+
| BetterExceptionPrinting
4849

4950
/// LanguageVersion management
5051
type LanguageVersion (versionText) =
@@ -100,6 +101,7 @@ type LanguageVersion (versionText) =
100101
// F# preview
101102
LanguageFeature.FromEndSlicing, previewVersion
102103
LanguageFeature.MLCompatRevisions,previewVersion
104+
LanguageFeature.BetterExceptionPrinting,previewVersion
103105
]
104106

105107
static let defaultLanguageVersion = LanguageVersion("default")
@@ -196,6 +198,7 @@ type LanguageVersion (versionText) =
196198
| LanguageFeature.NonVariablePatternsToRightOfAsPatterns -> FSComp.SR.featureNonVariablePatternsToRightOfAsPatterns()
197199
| LanguageFeature.AttributesToRightOfModuleKeyword -> FSComp.SR.featureAttributesToRightOfModuleKeyword()
198200
| LanguageFeature.MLCompatRevisions -> FSComp.SR.featureMLCompatRevisions()
201+
| LanguageFeature.BetterExceptionPrinting -> FSComp.SR.featureBetterExceptionPrinting()
199202

200203
/// Get a version string associated with the given feature.
201204
member _.GetFeatureVersionString feature =

0 commit comments

Comments
 (0)