Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="7.0.0-beta.22114.7">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="7.0.0-beta.22117.2">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>6d977266bcc193caedb60a27ae44d14d9a11a040</Sha>
<Sha>49750c02e63d0ad3a77d035bba7498a0b1acd218</Sha>
<SourceBuild RepoName="arcade" ManagedOnly="true" />
</Dependency>
</ToolsetDependencies>
Expand Down
47 changes: 47 additions & 0 deletions eng/common/retain-build.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@

Param(
[Parameter(Mandatory=$true)][int] $buildId,
[Parameter(Mandatory=$true)][string] $azdoOrgUri,
[Parameter(Mandatory=$true)][string] $azdoProject,
[Parameter(Mandatory=$true)][string] $token
)

$ErrorActionPreference = 'Stop'
Set-StrictMode -Version 2.0
. $PSScriptRoot\tools.ps1


function Get-AzDOHeaders(
[string] $token)
{
$base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(":${token}"))
$headers = @{"Authorization"="Basic $base64AuthInfo"}
return $headers
}

function Update-BuildRetention(
[string] $azdoOrgUri,
[string] $azdoProject,
[int] $buildId,
[string] $token)
{
$headers = Get-AzDOHeaders -token $token
$requestBody = "{
`"keepForever`": `"true`"
}"

$requestUri = "${azdoOrgUri}/${azdoProject}/_apis/build/builds/${buildId}?api-version=6.0"
write-Host "Attempting to retain build using the following URI: ${requestUri} ..."

try {
Invoke-RestMethod -Uri $requestUri -Method Patch -Body $requestBody -Header $headers -contentType "application/json"
Write-Host "Updated retention settings for build ${buildId}."
}
catch {
Write-PipelineTelemetryError -Category "Build" -Message "Failed to update retention settings for build: $_.Exception.Response.StatusDescription"
ExitWithExitCode 1
}
}

Update-BuildRetention -azdoOrgUri $azdoOrgUri -azdoProject $azdoProject -buildId $buildId -token $token
ExitWithExitCode 0
9 changes: 0 additions & 9 deletions eng/common/templates/jobs/jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ parameters:
# Optional: Enable publishing using release pipelines
enablePublishUsingPipelines: false

# Optional: Disable component governance detection. In general, component governance
# should be on for all jobs. Use only in the event of issues.
disableComponentGovernance: false

# Optional: Enable running the source-build jobs to build repo from source
enableSourceBuild: false

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

# Sbom related params
enableSbom: true
PackageVersion: 7.0.0
BuildDropPath: '$(Build.SourcesDirectory)/artifacts'

jobs:
- ${{ each job in parameters.jobs }}:
- template: ../job/job.yml
Expand Down
28 changes: 28 additions & 0 deletions eng/common/templates/steps/retain-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
parameters:
# Optional azure devops PAT with build execute permissions for the build's organization,
# only needed if the build that should be retained ran on a different organization than
# the pipeline where this template is executing from
Token: ''
# Optional BuildId to retain, defaults to the current running build
BuildId: ''
# Azure devops Organization URI for the build in the https://dev.azure.com/<organization> format.
# Defaults to the organization the current pipeline is running on
AzdoOrgUri: '$(System.CollectionUri)'
# Azure devops project for the build. Defaults to the project the current pipeline is running on
AzdoProject: '$(System.TeamProject)'

steps:
- task: powershell@2
inputs:
targetType: 'filePath'
filePath: eng/common/retain-build.ps1
pwsh: true
arguments: >
-AzdoOrgUri: ${{parameters.AzdoOrgUri}}
-AzdoProject ${{parameters.AzdoProject}}
-Token ${{coalesce(parameters.Token, '$env:SYSTEM_ACCESSTOKEN') }}
-BuildId ${{coalesce(parameters.BuildId, '$env:BUILD_ID')}}
displayName: Enable permanent build retention
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
BUILD_ID: $(Build.BuildId)
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"perl": "5.32.1.1"
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22114.7",
"Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22117.2",
"Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19069.2"
}
}
1 change: 1 addition & 0 deletions src/fsharp/FSComp.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1248,6 +1248,7 @@ featureDiscardUseValue,"discard pattern in use binding"
featureNonVariablePatternsToRightOfAsPatterns,"non-variable patterns to the right of 'as' patterns"
featureAttributesToRightOfModuleKeyword,"attributes to the right of the 'module' keyword"
featureMLCompatRevisions,"ML compatibility revisions"
featureBetterExceptionPrinting,"automatic generation of 'Message' property for 'exception' declarations"
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."
3091,ilxgenUnexpectedArgumentToMethodHandleOfDuringCodegen,"Invalid argument to 'methodhandleof' during codegen"
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."
Expand Down
2 changes: 1 addition & 1 deletion src/fsharp/FSharp.Core/prim-types.fs
Original file line number Diff line number Diff line change
Expand Up @@ -4790,7 +4790,7 @@ namespace Microsoft.FSharp.Core
System.Threading.Monitor.Exit(lockobj)
#else
[<CompiledName("Lock")>]
let inline lock (lockObject : 'T when 'T : not struct) action =
let inline lock (lockObject : 'T when 'T : not struct) ([<InlineIfLambda>] action) =
let mutable lockTaken = false
try
System.Threading.Monitor.Enter(lockObject, &lockTaken);
Expand Down
8 changes: 4 additions & 4 deletions src/fsharp/FSharp.Core/prim-types.fsi
Original file line number Diff line number Diff line change
Expand Up @@ -2766,9 +2766,9 @@ namespace Microsoft.FSharp.Core
/// <example id="left-shift-example-1">
/// <code lang="fsharp">
/// let a = 13 // 00000000000000000000000000001101
/// let c = a &lt;&lt; 4 // 00000000000000000000000011010000
/// let c = a &lt;&lt;&lt; 4 // 00000000000000000000000011010000
/// </code>
/// Evaluates to 206
/// Evaluates to 208
/// </example>
val inline (<<<): value: ^T -> shift: int32 -> ^T when ^T : (static member (<<<) : ^T * int32 -> ^T) and default ^T : int

Expand All @@ -2782,9 +2782,9 @@ namespace Microsoft.FSharp.Core
/// <example id="right-shift-example-1">
/// <code lang="fsharp">
/// let a = 206 // 00000000000000000000000011010000
/// let c1 = a &gt;&gt; 2 // 00000000000000000000000000110100
/// let c1 = a &gt;&gt;&gt; 2 // 00000000000000000000000000110100
/// // Evaluates to 51
/// let c2 = a &gt;&gt; 6 // 00000000000000000000000000000011
/// let c2 = a &gt;&gt;&gt; 6 // 00000000000000000000000000000011
/// Evaluates to 3
/// </code>
/// </example>
Expand Down
9 changes: 7 additions & 2 deletions src/fsharp/IlxGen.fs
Original file line number Diff line number Diff line change
Expand Up @@ -7761,7 +7761,8 @@ and GenAbstractBinding cenv eenv tref (vref: ValRef) =
else
[], [], []

and GenToStringMethod cenv eenv ilThisTy m = GenPrintingMethod cenv eenv "ToString" ilThisTy m
and GenToStringMethod cenv eenv ilThisTy m =
GenPrintingMethod cenv eenv "ToString" ilThisTy m

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

if not (exnc.HasMember g "get_Message" []) && not (exnc.HasMember g "Message" []) then
if cenv.g.langVersion.SupportsFeature(LanguageFeature.BetterExceptionPrinting) &&
not (exnc.HasMember g "get_Message" []) &&
not (exnc.HasMember g "Message" []) then
yield! GenPrintingMethod cenv eenv "get_Message" ilThisTy m ]

let interfaces = exnc.ImmediateInterfaceTypesOfFSharpTycon |> List.map (GenType cenv.amap m eenv.tyenv)

let tdef =
mkILGenericClass
(ilTypeName, access, [], g.iltyp_Exception,
Expand All @@ -8508,6 +8512,7 @@ and GenExnDef cenv mgbuf eenv m (exnc: Tycon) =
emptyILEvents,
mkILCustomAttrs [mkCompilationMappingAttr g (int SourceConstructFlags.Exception)],
ILTypeInit.BeforeField)

let tdef = tdef.WithSerializable(true)
mgbuf.AddTypeDef(tref, tdef, false, false, None)

Expand Down
3 changes: 3 additions & 0 deletions src/fsharp/LanguageFeatures.fs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ type LanguageFeature =
| NonVariablePatternsToRightOfAsPatterns
| AttributesToRightOfModuleKeyword
| MLCompatRevisions
| BetterExceptionPrinting

/// LanguageVersion management
type LanguageVersion (versionText) =
Expand Down Expand Up @@ -100,6 +101,7 @@ type LanguageVersion (versionText) =
// F# preview
LanguageFeature.FromEndSlicing, previewVersion
LanguageFeature.MLCompatRevisions,previewVersion
LanguageFeature.BetterExceptionPrinting,previewVersion
]

static let defaultLanguageVersion = LanguageVersion("default")
Expand Down Expand Up @@ -196,6 +198,7 @@ type LanguageVersion (versionText) =
| LanguageFeature.NonVariablePatternsToRightOfAsPatterns -> FSComp.SR.featureNonVariablePatternsToRightOfAsPatterns()
| LanguageFeature.AttributesToRightOfModuleKeyword -> FSComp.SR.featureAttributesToRightOfModuleKeyword()
| LanguageFeature.MLCompatRevisions -> FSComp.SR.featureMLCompatRevisions()
| LanguageFeature.BetterExceptionPrinting -> FSComp.SR.featureBetterExceptionPrinting()

/// Get a version string associated with the given feature.
member _.GetFeatureVersionString feature =
Expand Down
1 change: 1 addition & 0 deletions src/fsharp/LanguageFeatures.fsi
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ type LanguageFeature =
| NonVariablePatternsToRightOfAsPatterns
| AttributesToRightOfModuleKeyword
| MLCompatRevisions
| BetterExceptionPrinting

/// LanguageVersion management
type LanguageVersion =
Expand Down
5 changes: 5 additions & 0 deletions src/fsharp/xlf/FSComp.txt.cs.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@
<target state="translated">atributy napravo od klíčového slova Module</target>
<note />
</trans-unit>
<trans-unit id="featureBetterExceptionPrinting">
<source>automatic generation of 'Message' property for 'exception' declarations</source>
<target state="new">automatic generation of 'Message' property for 'exception' declarations</target>
<note />
</trans-unit>
<trans-unit id="featureDefaultInterfaceMemberConsumption">
<source>default interface member consumption</source>
<target state="translated">využití člena výchozího rozhraní</target>
Expand Down
5 changes: 5 additions & 0 deletions src/fsharp/xlf/FSComp.txt.de.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@
<target state="translated">Attribute rechts vom "Module"-Schlüsselwort</target>
<note />
</trans-unit>
<trans-unit id="featureBetterExceptionPrinting">
<source>automatic generation of 'Message' property for 'exception' declarations</source>
<target state="new">automatic generation of 'Message' property for 'exception' declarations</target>
<note />
</trans-unit>
<trans-unit id="featureDefaultInterfaceMemberConsumption">
<source>default interface member consumption</source>
<target state="translated">standardmäßige Schnittstellenmembernutzung</target>
Expand Down
7 changes: 6 additions & 1 deletion src/fsharp/xlf/FSComp.txt.es.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@
<target state="translated">atributos a la derecha de la palabra clave “módulo”</target>
<note />
</trans-unit>
<trans-unit id="featureBetterExceptionPrinting">
<source>automatic generation of 'Message' property for 'exception' declarations</source>
<target state="new">automatic generation of 'Message' property for 'exception' declarations</target>
<note />
</trans-unit>
<trans-unit id="featureDefaultInterfaceMemberConsumption">
<source>default interface member consumption</source>
<target state="translated">consumo de miembros de interfaz predeterminados</target>
Expand Down Expand Up @@ -299,7 +304,7 @@
</trans-unit>
<trans-unit id="ilxGenUnknownDebugPoint">
<source>Unknown debug point '{0}'. The available debug points are '{1}'.</source>
<target state="new">Unknown debug point '{0}'. The available debug points are '{1}'.</target>
<target state="translated">Punto de depuración desconocido \"{0}\". Los puntos de depuración disponibles son \"{1}\".</target>
<note />
</trans-unit>
<trans-unit id="ilxgenInvalidConstructInStateMachineDuringCodegen">
Expand Down
5 changes: 5 additions & 0 deletions src/fsharp/xlf/FSComp.txt.fr.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@
<target state="translated">attributs à droite du mot clé 'module'</target>
<note />
</trans-unit>
<trans-unit id="featureBetterExceptionPrinting">
<source>automatic generation of 'Message' property for 'exception' declarations</source>
<target state="new">automatic generation of 'Message' property for 'exception' declarations</target>
<note />
</trans-unit>
<trans-unit id="featureDefaultInterfaceMemberConsumption">
<source>default interface member consumption</source>
<target state="translated">consommation par défaut des membres d'interface</target>
Expand Down
5 changes: 5 additions & 0 deletions src/fsharp/xlf/FSComp.txt.it.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@
<target state="translated">attributi a destra della parola chiave 'module'</target>
<note />
</trans-unit>
<trans-unit id="featureBetterExceptionPrinting">
<source>automatic generation of 'Message' property for 'exception' declarations</source>
<target state="new">automatic generation of 'Message' property for 'exception' declarations</target>
<note />
</trans-unit>
<trans-unit id="featureDefaultInterfaceMemberConsumption">
<source>default interface member consumption</source>
<target state="translated">utilizzo predefinito dei membri di interfaccia</target>
Expand Down
5 changes: 5 additions & 0 deletions src/fsharp/xlf/FSComp.txt.ja.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@
<target state="translated">'module' キーワードの右側の属性</target>
<note />
</trans-unit>
<trans-unit id="featureBetterExceptionPrinting">
<source>automatic generation of 'Message' property for 'exception' declarations</source>
<target state="new">automatic generation of 'Message' property for 'exception' declarations</target>
<note />
</trans-unit>
<trans-unit id="featureDefaultInterfaceMemberConsumption">
<source>default interface member consumption</source>
<target state="translated">既定のインターフェイス メンバーの消費</target>
Expand Down
5 changes: 5 additions & 0 deletions src/fsharp/xlf/FSComp.txt.ko.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@
<target state="translated">'module' 키워드 오른쪽에 있는 특성</target>
<note />
</trans-unit>
<trans-unit id="featureBetterExceptionPrinting">
<source>automatic generation of 'Message' property for 'exception' declarations</source>
<target state="new">automatic generation of 'Message' property for 'exception' declarations</target>
<note />
</trans-unit>
<trans-unit id="featureDefaultInterfaceMemberConsumption">
<source>default interface member consumption</source>
<target state="translated">기본 인터페이스 멤버 사용</target>
Expand Down
5 changes: 5 additions & 0 deletions src/fsharp/xlf/FSComp.txt.pl.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@
<target state="translated">atrybuty po prawej stronie słowa kluczowego "module"</target>
<note />
</trans-unit>
<trans-unit id="featureBetterExceptionPrinting">
<source>automatic generation of 'Message' property for 'exception' declarations</source>
<target state="new">automatic generation of 'Message' property for 'exception' declarations</target>
<note />
</trans-unit>
<trans-unit id="featureDefaultInterfaceMemberConsumption">
<source>default interface member consumption</source>
<target state="translated">domyślne użycie składowej interfejsu</target>
Expand Down
5 changes: 5 additions & 0 deletions src/fsharp/xlf/FSComp.txt.pt-BR.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@
<target state="translated">atributos à direita da palavra-chave 'módulo'</target>
<note />
</trans-unit>
<trans-unit id="featureBetterExceptionPrinting">
<source>automatic generation of 'Message' property for 'exception' declarations</source>
<target state="new">automatic generation of 'Message' property for 'exception' declarations</target>
<note />
</trans-unit>
<trans-unit id="featureDefaultInterfaceMemberConsumption">
<source>default interface member consumption</source>
<target state="translated">consumo de membro da interface padrão</target>
Expand Down
5 changes: 5 additions & 0 deletions src/fsharp/xlf/FSComp.txt.ru.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@
<target state="translated">атрибуты справа от ключевого слова "module"</target>
<note />
</trans-unit>
<trans-unit id="featureBetterExceptionPrinting">
<source>automatic generation of 'Message' property for 'exception' declarations</source>
<target state="new">automatic generation of 'Message' property for 'exception' declarations</target>
<note />
</trans-unit>
<trans-unit id="featureDefaultInterfaceMemberConsumption">
<source>default interface member consumption</source>
<target state="translated">использование элемента интерфейса по умолчанию</target>
Expand Down
5 changes: 5 additions & 0 deletions src/fsharp/xlf/FSComp.txt.tr.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@
<target state="translated">'modül' anahtar sözcüğünün sağındaki öznitelikler</target>
<note />
</trans-unit>
<trans-unit id="featureBetterExceptionPrinting">
<source>automatic generation of 'Message' property for 'exception' declarations</source>
<target state="new">automatic generation of 'Message' property for 'exception' declarations</target>
<note />
</trans-unit>
<trans-unit id="featureDefaultInterfaceMemberConsumption">
<source>default interface member consumption</source>
<target state="translated">varsayılan arabirim üyesi tüketimi</target>
Expand Down
5 changes: 5 additions & 0 deletions src/fsharp/xlf/FSComp.txt.zh-Hans.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@
<target state="translated">"module" 关键字右侧的属性</target>
<note />
</trans-unit>
<trans-unit id="featureBetterExceptionPrinting">
<source>automatic generation of 'Message' property for 'exception' declarations</source>
<target state="new">automatic generation of 'Message' property for 'exception' declarations</target>
<note />
</trans-unit>
<trans-unit id="featureDefaultInterfaceMemberConsumption">
<source>default interface member consumption</source>
<target state="translated">默认接口成员消耗</target>
Expand Down
5 changes: 5 additions & 0 deletions src/fsharp/xlf/FSComp.txt.zh-Hant.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@
<target state="translated">'module' 關鍵字右邊的屬性</target>
<note />
</trans-unit>
<trans-unit id="featureBetterExceptionPrinting">
<source>automatic generation of 'Message' property for 'exception' declarations</source>
<target state="new">automatic generation of 'Message' property for 'exception' declarations</target>
<note />
</trans-unit>
<trans-unit id="featureDefaultInterfaceMemberConsumption">
<source>default interface member consumption</source>
<target state="translated">預設介面成員使用</target>
Expand Down
Loading