From d9a937f62e7d1da045e54f921094ba1c2617921f Mon Sep 17 00:00:00 2001 From: Eugene Auduchinok Date: Wed, 20 May 2026 14:57:01 +0200 Subject: [PATCH 01/72] Tests: extract 'should update baselines' checks (#19734) --- .../SyntaxTreeTests.fs | 19 ++++++++----------- tests/FSharp.Test.Utilities/Compiler.fs | 11 ++++------- tests/FSharp.Test.Utilities/SurfaceArea.fs | 14 +++++++------- 3 files changed, 19 insertions(+), 25 deletions(-) diff --git a/tests/FSharp.Compiler.Service.Tests/SyntaxTreeTests.fs b/tests/FSharp.Compiler.Service.Tests/SyntaxTreeTests.fs index 6e532f2b46b..30885e7661c 100644 --- a/tests/FSharp.Compiler.Service.Tests/SyntaxTreeTests.fs +++ b/tests/FSharp.Compiler.Service.Tests/SyntaxTreeTests.fs @@ -7,6 +7,7 @@ open FSharp.Compiler.Service.Tests.Common open FSharp.Compiler.Syntax open FSharp.Compiler.Text open FSharp.Test +open FSharp.Test.Compiler open Xunit let testCasesDir = __SOURCE_DIRECTORY__ ++ ".." ++ "service" ++ "data" ++ "SyntaxTree" @@ -186,18 +187,14 @@ let ParseFile fileName = else "No baseline was found" - let equals = expected = actual - let testUpdateBSLEnv = System.Environment.GetEnvironmentVariable("TEST_UPDATE_BSL") - - let shouldUpdateBaseline = - (not (isNull testUpdateBSLEnv) && testUpdateBSLEnv.Trim() = "1" && not equals) - - if shouldUpdateBaseline then - File.WriteAllText(bslPath, actual) - elif not equals then - File.WriteAllText(actualPath, actual) - else + if expected = actual then File.Delete(actualPath) + else + if shouldUpdateBaselines then + File.Delete(actualPath) + File.WriteAllText(bslPath, actual) + else + File.WriteAllText(actualPath, actual) Assert.Equal(expected, actual) diff --git a/tests/FSharp.Test.Utilities/Compiler.fs b/tests/FSharp.Test.Utilities/Compiler.fs index d3951712b93..914741559a2 100644 --- a/tests/FSharp.Test.Utilities/Compiler.fs +++ b/tests/FSharp.Test.Utilities/Compiler.fs @@ -5,9 +5,7 @@ namespace FSharp.Test open FSharp.Compiler.Interactive.Shell open FSharp.Compiler.IO open FSharp.Compiler.Diagnostics -open FSharp.Compiler.Symbols open FSharp.Compiler.Text -open FSharp.Test.Assert open FSharp.Test.Utilities open FSharp.Test.ScriptHelpers open Microsoft.CodeAnalysis @@ -27,9 +25,10 @@ open TestFramework open System.Runtime.CompilerServices open System.Runtime.InteropServices -open FSharp.Compiler.CodeAnalysis module rec Compiler = + let shouldUpdateBaselines = + Environment.GetEnvironmentVariable("TEST_UPDATE_BSL") <> null [] type SourceUtilities () = @@ -1230,10 +1229,8 @@ Expected: {expected} Actual: {actual}""" - let updateBaseline () = - snd (Int32.TryParse(Environment.GetEnvironmentVariable("TEST_UPDATE_BSL"))) <> 0 let updateBaseLineIfEnvironmentSaysSo baseline = - if updateBaseline () then + if shouldUpdateBaselines then if FileSystem.FileExistsShim baseline.FilePath then FileSystem.CopyShim(baseline.FilePath, baseline.BslSource, true) @@ -2020,7 +2017,7 @@ Actual: match Assert.shouldBeSameMultilineStringSets expectedContent actualErrors with | None -> () | Some diff -> - if Environment.GetEnvironmentVariable("TEST_UPDATE_BSL") <> null then + if shouldUpdateBaselines then File.WriteAllText(path, actualErrors) printfn $"{Path.GetFullPath path} \n {diff}" diff --git a/tests/FSharp.Test.Utilities/SurfaceArea.fs b/tests/FSharp.Test.Utilities/SurfaceArea.fs index 15979684e0e..99b7838507b 100644 --- a/tests/FSharp.Test.Utilities/SurfaceArea.fs +++ b/tests/FSharp.Test.Utilities/SurfaceArea.fs @@ -4,8 +4,9 @@ module FSharp.Test.SurfaceArea open System open System.IO open System.Reflection - open System.Text.RegularExpressions - + open FSharp.Test.Compiler + open System.Text.RegularExpressions + // Gets string form of public surface area for the currently-loaded assembly let private getSurfaceAreaForAssembly (assembly: Assembly) = @@ -66,8 +67,10 @@ module FSharp.Test.SurfaceArea File.Delete(outFilePath) | Some diff -> - match Environment.GetEnvironmentVariable("TEST_UPDATE_BSL") with - | null -> + if shouldUpdateBaselines then + File.Delete(outFilePath) + File.WriteAllText(baselinePath, actual) + else File.WriteAllText(outFilePath, actual) let msg = $"""Assembly: %A{asm} @@ -78,6 +81,3 @@ module FSharp.Test.SurfaceArea {diff}""" failwith msg - | _ -> - File.Delete(outFilePath) - File.WriteAllText(baselinePath, actual) From 6c03a2d86997d9e9b0c5018259a42aeb22ce40a7 Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Wed, 20 May 2026 17:10:23 +0200 Subject: [PATCH 02/72] Fix #19596: unit-parameter member conformance with signature (#19615) * Fix #19596: overloaded member with unit parameter conformance check SignatureConformance.fs: when matching overloaded members, add relaxed fallback for unmatched pairs using type equivalence. This handles member M(()) (argInfos=[[]]) vs sig member M: unit->unit (argInfos=[[unit_arg]]) where types are equivalent but TotalArgCount differs. --- .../.FSharp.Compiler.Service/11.0.100.md | 1 + src/Compiler/Checking/SignatureConformance.fs | 60 ++++- .../Signatures/TypeTests.fs | 241 +++++++++++++++++- 3 files changed, 291 insertions(+), 11 deletions(-) diff --git a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md index 7e9cd230a4c..5715e6ed587 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md +++ b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md @@ -55,6 +55,7 @@ * Fix parallel compilation of scripts ([PR #19649](https://github.com/dotnet/fsharp/pull/19649)) * Fix parser recovery, name resolution, and code completion for unfinished enum patterns ([PR #19708](https://github.com/dotnet/fsharp/pull/19708)) * Parser: fix unexpected diagnostics in debug builds, improve error messages ([PR #19730](https://github.com/dotnet/fsharp/pull/19730)) +* Fix signature conformance: overloaded member with unit parameter `M(())` now matches sig `member M: unit -> unit`. ([Issue #19596](https://github.com/dotnet/fsharp/issues/19596), [PR #19615](https://github.com/dotnet/fsharp/pull/19615)) ### Added diff --git a/src/Compiler/Checking/SignatureConformance.fs b/src/Compiler/Checking/SignatureConformance.fs index 5c947bda13c..0f3d5ec13fe 100644 --- a/src/Compiler/Checking/SignatureConformance.fs +++ b/src/Compiler/Checking/SignatureConformance.fs @@ -295,11 +295,32 @@ type Checker(g, amap, denv, remapInfo: SignatureRepackageInfo, checkingSig) = err(fun(x, y, z) -> FSComp.SR.ValueNotContainedMutabilityGenericParametersDiffer(x, y, z, string mtps, string ntps)) elif implValInfo.KindsOfTypars <> sigValInfo.KindsOfTypars then err(FSComp.SR.ValueNotContainedMutabilityGenericParametersAreDifferentKinds) - elif not (nSigArgInfos <= implArgInfos.Length && List.forall2 (fun x y -> List.length x <= List.length y) sigArgInfos (fst (List.splitAt nSigArgInfos implArgInfos))) then + else + // Check arg group arities. An empty impl group [] is compatible with + // a singleton sig group [_] when the member takes unit (e.g. member M(()) vs member M: unit -> unit) + let argGroupsCompatible = + nSigArgInfos <= implArgInfos.Length && + List.forall2 + (fun (sigGroup: ArgReprInfo list) (implGroup: ArgReprInfo list) -> + List.length sigGroup <= List.length implGroup + || (implGroup.IsEmpty && sigGroup.Length = 1)) + sigArgInfos + (fst (List.splitAt nSigArgInfos implArgInfos)) + + if not argGroupsCompatible then err(fun(x, y, z) -> FSComp.SR.ValueNotContainedMutabilityAritiesDiffer(x, y, z, id.idText, string nSigArgInfos, id.idText, id.idText)) else let implArgInfos = implArgInfos |> List.truncate nSigArgInfos - let implArgInfos = (implArgInfos, sigArgInfos) ||> List.map2 (fun l1 l2 -> l1 |> List.take l2.Length) + // When impl has empty group [] (unit param like member M(())), synthesize + // ArgReprInfo from the sig so SetValReprInfo reflects the signature contract. + let implArgInfos = + (implArgInfos, sigArgInfos) + ||> List.map2 (fun implGroup sigGroup -> + if implGroup.IsEmpty && sigGroup.Length = 1 then + sigGroup |> List.map (fun sigArg -> + ({ Attribs = sigArg.Attribs; Name = sigArg.Name; OtherRange = None }: ArgReprInfo)) + else + implGroup |> List.take (min implGroup.Length sigGroup.Length)) // Propagate some information signature to implementation. // Check the attributes on each argument, and update the ValReprInfo for @@ -307,7 +328,8 @@ type Checker(g, amap, denv, remapInfo: SignatureRepackageInfo, checkingSig) = // This ensures that the compiled form of the value matches the signature rather than // the implementation. This also propagates argument names from signature to implementation let res = - (implArgInfos, sigArgInfos) ||> List.forall2 (List.forall2 (fun implArgInfo sigArgInfo -> + (implArgInfos, sigArgInfos) ||> List.forall2 (fun (implGroup: ArgReprInfo list) (sigGroup: ArgReprInfo list) -> + (implGroup, sigGroup) ||> List.forall2 (fun implArgInfo sigArgInfo -> checkAttribs aenv (implArgInfo.Attribs.AsList()) (sigArgInfo.Attribs.AsList()) (fun attribs -> match implArgInfo.Name, sigArgInfo.Name with | Some iname, Some sname when sname.idText <> iname.idText -> @@ -661,7 +683,7 @@ type Checker(g, amap, denv, remapInfo: SignatureRepackageInfo, checkingSig) = let fkey = fv.GetLinkagePartialKey() (akey.MemberParentMangledName = fkey.MemberParentMangledName) && (akey.LogicalName = fkey.LogicalName) && - (akey.TotalArgCount = fkey.TotalArgCount) + (akey.TotalArgCount = fkey.TotalArgCount) (implModType.AllValsAndMembersByLogicalNameUncached, signModType.AllValsAndMembersByLogicalNameUncached) ||> NameMap.suball2 @@ -672,6 +694,10 @@ type Checker(g, amap, denv, remapInfo: SignatureRepackageInfo, checkingSig) = | [av], [fv] -> if valuesPartiallyMatch av fv then checkVal implModRef aenv infoReader av fv + elif av.IsMember && fv.IsMember + && av.LogicalName <> ".ctor" + && typeAEquivAux EraseAll g aenv av.Type fv.Type then + checkVal implModRef aenv infoReader av fv else sigValHadNoMatchingImplementation fv None false @@ -683,9 +709,31 @@ type Checker(g, amap, denv, remapInfo: SignatureRepackageInfo, checkingSig) = | None -> None | Some av -> Some(fv, av)) + // For unmatched sig vals, try relaxed matching for unit-parameter equivalence: + // member M(()) has TotalArgCount 1, sig member M: unit -> unit has TotalArgCount 2, + // but their types are both unit -> unit. + let matchedAvs = matchingPairs |> List.map snd + let matchedFvs = matchingPairs |> List.map fst + let unmatchedFvs = fvs |> List.filter (fun fv -> not (List.exists (fun fv2 -> obj.ReferenceEquals(fv, fv2)) matchedFvs)) + let unmatchedAvs = avs |> List.filter (fun av -> not (List.exists (fun av2 -> obj.ReferenceEquals(av, av2)) matchedAvs)) + let relaxedPairs, _ = + (([], unmatchedAvs), unmatchedFvs) + ||> List.fold (fun (pairs, remainingAvs) fv -> + let fkey = fv.GetLinkagePartialKey() + match remainingAvs |> List.tryFind (fun av -> + let akey = av.GetLinkagePartialKey() + akey.MemberParentMangledName = fkey.MemberParentMangledName && + akey.LogicalName = fkey.LogicalName && + av.IsMember && fv.IsMember && + av.LogicalName <> ".ctor" && + typeAEquivAux EraseAll g aenv av.Type fv.Type) with + | None -> (pairs, remainingAvs) + | Some av -> ((fv, av) :: pairs, remainingAvs |> List.filter (fun a -> not (obj.ReferenceEquals(a, av))))) + let allMatchingPairs = matchingPairs @ relaxedPairs + // Check the ones with matching linkage - let allPairsOk = matchingPairs |> List.map (fun (fv, av) -> checkVal implModRef aenv infoReader av fv) |> List.forall id - let someNotOk = matchingPairs.Length < fvs.Length + let allPairsOk = allMatchingPairs |> List.map (fun (fv, av) -> checkVal implModRef aenv infoReader av fv) |> List.forall id + let someNotOk = allMatchingPairs.Length < fvs.Length // Report an error for those that don't. Try pairing up by enclosing-type/name if someNotOk then let noMatches, partialMatchingPairs = diff --git a/tests/FSharp.Compiler.ComponentTests/Signatures/TypeTests.fs b/tests/FSharp.Compiler.ComponentTests/Signatures/TypeTests.fs index d4b4815e086..d8317ff8e92 100644 --- a/tests/FSharp.Compiler.ComponentTests/Signatures/TypeTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/Signatures/TypeTests.fs @@ -762,10 +762,90 @@ let (|A|B|) (x: int) = if x > 0 then A else B """ // Sweep: overloaded member with unit parameter (FS0193) — #19596 -// Roundtrip fails: member M(()) generates sig 'member M: unit -> unit' but -// conformance checker can't match it when M is overloaded. The sig syntax -// is correct but the conformance check for unit-parameter overloads is broken. -[ unit fails when overloaded - FS0193")>] +// Testing both directions and consumer access to understand conformance boundaries. + +// Direction 1: handwritten sig says "member M: unit -> unit", impl has "member M(()) = ()" +[] +let ``Unit param overload - sig with consumer compiles`` () = + let sigSource = """ +module Lib + +type R1 = + { f1: int } + +type D = + new: unit -> D + member M: unit -> unit + member M: y: R1 -> unit + member N: unit +""" + let implSource = """ +module Lib +type R1 = { f1 : int } +type D() = + member x.N = x.M { f1 = 3 } + member x.M((y: R1)) = () + member x.M(()) = () +""" + let consumerSource = """ +module Consumer +open Lib +let test() = + let d = D() + d.M(()) + d.M { f1 = 42 } + d.N +""" + Fsi sigSource + |> withAdditionalSourceFile (FsSourceWithFileName "Lib.fs" implSource) + |> withAdditionalSourceFile (FsSourceWithFileName "Consumer.fs" consumerSource) + |> ignoreWarnings + |> compile + |> shouldSucceed + |> ignore + +// Direction 2: impl without explicit unit parens "member x.M() = ()" +[] +let ``Unit param overload - non-paren impl with sig and consumer`` () = + let sigSource = """ +module Lib + +type R1 = + { f1: int } + +type D = + new: unit -> D + member M: unit -> unit + member M: y: R1 -> unit + member N: unit +""" + let implSource = """ +module Lib +type R1 = { f1 : int } +type D() = + member x.N = x.M { f1 = 3 } + member x.M((y: R1)) = () + member x.M() = () +""" + let consumerSource = """ +module Consumer +open Lib +let test() = + let d = D() + d.M() + d.M { f1 = 42 } + d.N +""" + Fsi sigSource + |> withAdditionalSourceFile (FsSourceWithFileName "Lib.fs" implSource) + |> withAdditionalSourceFile (FsSourceWithFileName "Consumer.fs" consumerSource) + |> ignoreWarnings + |> compile + |> shouldSucceed + |> ignore + +// Roundtrip: generated sig from impl, then compile sig+impl+consumer +[] let ``Sweep - overloaded member with unit param roundtrips`` () = assertSignatureRoundtrip """ module Repro @@ -774,4 +854,155 @@ type D() = member x.N = x.M { f1 = 3 } member x.M((y: R1)) = () member x.M(()) = () -""" \ No newline at end of file +""" + +// Inverse direction 1: impl M(()) but consumer calls d.M() (no parens) — must fail with FS0503 +[] +let ``Unit param overload - consumer cannot call M() when impl is M(()) with overloads`` () = + let sigSource = """ +module Lib + +type R1 = + { f1: int } + +type D = + new: unit -> D + member M: unit -> unit + member M: y: R1 -> unit + member N: unit +""" + let implSource = """ +module Lib +type R1 = { f1 : int } +type D() = + member x.N = x.M { f1 = 3 } + member x.M((y: R1)) = () + member x.M(()) = () +""" + let consumerSource = """ +module Consumer +open Lib +let test() = + let d = D() + d.M() + d.M { f1 = 42 } + d.N +""" + Fsi sigSource + |> withAdditionalSourceFile (FsSourceWithFileName "Lib.fs" implSource) + |> withAdditionalSourceFile (FsSourceWithFileName "Consumer.fs" consumerSource) + |> ignoreWarnings + |> compile + |> shouldFail + |> withErrorCode 503 + |> ignore + +// Inverse direction 2: impl M() (no explicit unit), sig M: unit -> unit, consumer calls d.M() +[] +let ``Unit param overload - consumer calls M() with normal impl and sig`` () = + let sigSource = """ +module Lib + +type R1 = + { f1: int } + +type D = + new: unit -> D + member M: unit -> unit + member M: y: R1 -> unit + member N: unit +""" + let implSource = """ +module Lib +type R1 = { f1 : int } +type D() = + member x.N = x.M { f1 = 3 } + member x.M((y: R1)) = () + member x.M() = () +""" + let consumerSource = """ +module Consumer +open Lib +let test() = + let d = D() + d.M() + d.M { f1 = 42 } + d.N +""" + Fsi sigSource + |> withAdditionalSourceFile (FsSourceWithFileName "Lib.fs" implSource) + |> withAdditionalSourceFile (FsSourceWithFileName "Consumer.fs" consumerSource) + |> ignoreWarnings + |> compile + |> shouldSucceed + |> ignore + +// Non-overloaded: member M(()) with sig member M: unit -> unit (no other overloads) +[] +let ``Unit param - non-overloaded member M(()) conforms to sig member M: unit -> unit`` () = + let sigSource = """ +module Lib + +type D = + new: unit -> D + member M: unit -> unit +""" + let implSource = """ +module Lib +type D() = + member _.M(()) = () +""" + Fsi sigSource + |> withAdditionalSourceFile (FsSourceWithFileName "Lib.fs" implSource) + |> ignoreWarnings + |> compile + |> shouldSucceed + |> ignore + +// Non-overloaded: member M(()) with sig member M: unit -> unit, consumer calls d.M() +// Verifies that synthesized ArgReprInfo from sig allows consumer access +[] +let ``Unit param - non-overloaded member M(()) consumer can call M()`` () = + let sigSource = """ +module Lib + +type D = + new: unit -> D + member M: unit -> unit +""" + let implSource = """ +module Lib +type D() = + member _.M(()) = () +""" + let consumerSource = """ +module Consumer +open Lib +let test() = + let d = D() + d.M() +""" + Fsi sigSource + |> withAdditionalSourceFile (FsSourceWithFileName "Lib.fs" implSource) + |> withAdditionalSourceFile (FsSourceWithFileName "Consumer.fs" consumerSource) + |> ignoreWarnings + |> compile + |> shouldSucceed + |> ignore + +// Verify M(()) and M() produce identical IL method signatures +[] +let ``Unit param - M(()) and M() produce same IL method signature`` () = + FSharp """ +module Test +type D() = + member x.M(()) = 1 + member x.M(y: int) = y +""" + |> compile + |> shouldSucceed + |> verifyILContains [ + ".method public hidebysig instance int32 M() cil managed" + ".method public hidebysig instance int32 M(int32 y) cil managed" + ] + |> ignore From eb7f368cbca9b1c0f41d6ff350788f4e43005a57 Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Wed, 20 May 2026 17:51:27 +0200 Subject: [PATCH 03/72] Harden AI review quality: subagent dispatch, inline-only, no wall-of-text (#19772) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Evidence from 17 AI review audit: - 53% had zero inline comments (wall-of-text body only) - 5 reviews were LGTM verdicts buried in avg 1500 chars of prose - Only 3/17 were inline-focused (ideal) expert-reviewer.md: - Wave 0: MUST dispatch independent subagents per dimension via task tool - Wave 5: empty body for findings (just inline comments), 'LGTM' for approve - New hard rule: body >10 chars (other than LGTM) is a bug - Removed 'See inline comments' boilerplate — people have eyes reviewing-compiler-prs/SKILL.md: - Replaced aspirational 'Multi-Model Dispatch' with concrete 'Subagent Dispatch' - Each dimension gets independent background agent with CHECK rules + filtered diffs - Subagents produce structured {file, line, severity, dimension, issue, suggestion} - Expert-reviewer consolidates, deduplicates, applies assessment gates Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/agents/expert-reviewer.md | 15 ++++++++------- .github/skills/reviewing-compiler-prs/SKILL.md | 11 ++++++++--- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/.github/agents/expert-reviewer.md b/.github/agents/expert-reviewer.md index e25e031c384..c9735c7383d 100644 --- a/.github/agents/expert-reviewer.md +++ b/.github/agents/expert-reviewer.md @@ -433,12 +433,13 @@ New features must be gated behind language version checks. Breaking changes requ Execute review in five waves, each building on the previous. -### Wave 0: Orientation +### Wave 0: Orientation & Dimension Dispatch 1. Read the PR title, description, and linked issues. -2. Identify which dimensions are relevant based on files changed. +2. Identify which dimensions are relevant based on files changed — use the `reviewing-compiler-prs` skill dimension table. 3. Use the hotspot table below to prioritize dimensions. 4. Check if existing instructions files apply (`.github/instructions/`). +5. **Dispatch independent subagents** — for each selected dimension, launch a separate background agent (via the task tool) to assess that dimension in parallel. Each subagent receives: the dimension's CHECK rules, the PR diff, and the file paths it should focus on. Collect results before proceeding to consolidation. ### Wave 1: Structural Scan @@ -488,10 +489,10 @@ Execute review in five waves, each building on the previous. gh api repos/{owner}/{repo}/pulls/{number}/reviews \ --method POST \ --field event=COMMENT \ - --field 'body=*🤖 This review was generated by AI (@expert-reviewer agent). Findings may contain inaccuracies — please verify independently.*' \ + --field body='' \ --field 'comments=[ - {"path":"src/Compiler/Checking/CheckDeclarations.fs","line":2750,"body":"**[Test Coverage]** This code path lacks a test. Add a test exercising this branch."}, - {"path":"src/Compiler/CodeGen/IlxGen.fs","line":1234,"body":"**[IL Emission]** Call `stripTyEqns` before this match to handle type abbreviations."} + {"path":"src/Compiler/Checking/CheckDeclarations.fs","line":2750,"body":"**[Test Coverage]** This code path lacks a test. Add a test exercising this branch."}, + {"path":"src/Compiler/CodeGen/IlxGen.fs","line":1234,"body":"**[IL Emission]** Call `stripTyEqns` before this match to handle type abbreviations."} ]' ``` Each comment needs: @@ -501,8 +502,7 @@ Execute review in five waves, each building on the previous. 3. **If no significant issues found**, post an approving review: ```bash - gh pr review {number} --repo {owner}/{repo} --approve \ - --body "*🤖 AI review (@expert-reviewer): no significant issues found across applicable dimensions. Please verify independently.*" + gh pr review {number} --repo {owner}/{repo} --approve --body "LGTM" ``` 4. **Apply the label and request human review:** @@ -516,6 +516,7 @@ Execute review in five waves, each building on the previous. - Every comment must reference a specific file and line from the diff. - Never post duplicate content if reviews already exist on the PR. - If the PR is too large to review fully, note skipped areas in the review body. +- **NEVER write a wall-of-text review body.** The body is either `LGTM` (approve) or empty (with inline findings). All analysis stays in your context — only actionable findings get posted as inline comments. A review body longer than 10 characters (other than `LGTM`) is a bug. ## Folder Hotspot Mapping diff --git a/.github/skills/reviewing-compiler-prs/SKILL.md b/.github/skills/reviewing-compiler-prs/SKILL.md index 8f2458b96a5..915d257603a 100644 --- a/.github/skills/reviewing-compiler-prs/SKILL.md +++ b/.github/skills/reviewing-compiler-prs/SKILL.md @@ -33,11 +33,16 @@ Full dimension definitions and CHECK rules live in the `expert-reviewer` agent. | `vsintegration/` | IDE Responsiveness, Memory Footprint, Cross-Platform | | `eng/`, `setup/`, build scripts | Build Infrastructure, Cross-Platform | -## Multi-Model Dispatch +## Subagent Dispatch -Dispatch one agent per selected dimension. For high-confidence reviews, assess each dimension with multiple models (`claude-opus-4.6`, `gemini-3-pro-preview`, `gpt-5.2-codex`). Minimum viable council = 2 models. +For each selected dimension from the table above, the `expert-reviewer` agent MUST launch an independent subagent (background task) to assess that dimension. This is not optional — a single agent doing all dimensions sequentially produces shallow analysis and wall-of-text summaries. -**Claims coverage** — before dimension assessment, cross-reference every claim in the PR description and linked issues against actual code changes. Flag orphan claims (stated but not implemented), orphan changes (code changed but not mentioned), and partial implementations. +Each subagent receives: +1. The dimension's CHECK rules (from expert-reviewer.md) +2. The relevant file diffs (filtered by the dimension's hotspot paths) +3. Instructions to produce a structured finding: `{file, line, severity, dimension, issue, suggestion}` or `LGTM` if no findings + +The expert-reviewer consolidates subagent results, deduplicates, applies assessment gates, and posts as inline comments per Wave 5. **Assessment gates** — apply before flagging: - Understand execution context before judging (test harness ≠ compiler runtime) From 3797fc63068749ffe7630a27aba2fb6335a7710b Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Wed, 20 May 2026 18:21:10 +0200 Subject: [PATCH 04/72] Gate exception field serialization behind langversion 11 (#19746) * Gate exception serialization codegen behind LanguageFeature.ExceptionFieldSerializationSupport (F# 11) The GetObjectData override and field-restoring deserialization constructor for exception types are now gated behind langversion 11. With langversion <=10 (the current default), exceptions emit only the base-call ctor (status quo ante PR #19342). - Add LanguageFeature.ExceptionFieldSerializationSupport, mapped to F# 11.0 - Gate shouldRestoreFields and GetObjectData emission on the feature - Update tests to use withLangVersion "11" - Update all IL baselines (SerializableAttribute, Nullness) to reflect the default-langversion output (no field serde IL) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix code formatting (fantomas) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Update xlf files for featureExceptionFieldSerializationSupport Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix net472 IL baseline for ExceptionType nullness test The net472 baseline was incorrectly updated to use [runtime] prefixed NullableContextAttribute and NullableAttribute references. On net472, these attributes are embedded in the assembly (not from runtime BCL), so they must not have the [runtime] prefix. Also restore the embedded attribute class definitions at the end of the file. The serialization changes (removing field-restoring ctor and GetObjectData) are correctly kept, as they match the default langversion behavior. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add release notes for exception field serialization langversion gate Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../.FSharp.Compiler.Service/11.0.100.md | 3 +- src/Compiler/CodeGen/IlxGen.fs | 123 +++++++------- src/Compiler/FSComp.txt | 1 + src/Compiler/Facilities/LanguageFeatures.fs | 3 + src/Compiler/Facilities/LanguageFeatures.fsi | 1 + src/Compiler/xlf/FSComp.txt.cs.xlf | 5 + src/Compiler/xlf/FSComp.txt.de.xlf | 5 + src/Compiler/xlf/FSComp.txt.es.xlf | 5 + src/Compiler/xlf/FSComp.txt.fr.xlf | 5 + src/Compiler/xlf/FSComp.txt.it.xlf | 5 + src/Compiler/xlf/FSComp.txt.ja.xlf | 5 + src/Compiler/xlf/FSComp.txt.ko.xlf | 5 + src/Compiler/xlf/FSComp.txt.pl.xlf | 5 + src/Compiler/xlf/FSComp.txt.pt-BR.xlf | 5 + src/Compiler/xlf/FSComp.txt.ru.xlf | 5 + src/Compiler/xlf/FSComp.txt.tr.xlf | 5 + src/Compiler/xlf/FSComp.txt.zh-Hans.xlf | 5 + src/Compiler/xlf/FSComp.txt.zh-Hant.xlf | 5 + .../CodeGenRegressions_Exceptions.fs | 3 + .../Nullness/ExceptionType.fs.il.net472.bsl | 151 +----------------- .../Nullness/ExceptionType.fs.il.netcore.bsl | 143 +---------------- ....fs.RealInternalSignatureOff.il.net472.bsl | 66 +------- ...fs.RealInternalSignatureOff.il.netcore.bsl | 67 +------- ...e.fs.RealInternalSignatureOn.il.net472.bsl | 66 +------- ....fs.RealInternalSignatureOn.il.netcore.bsl | 67 +------- ....fs.RealInternalSignatureOff.il.net472.bsl | 99 +----------- ...fs.RealInternalSignatureOff.il.netcore.bsl | 100 +----------- ...e.fs.RealInternalSignatureOn.il.net472.bsl | 99 +----------- ....fs.RealInternalSignatureOn.il.netcore.bsl | 100 +----------- 29 files changed, 166 insertions(+), 991 deletions(-) diff --git a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md index 5715e6ed587..a26f7e77ebe 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md +++ b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md @@ -40,7 +40,7 @@ * Fix signature generation: backtick escaping for identifiers containing backticks. ([Issue #15389](https://github.com/dotnet/fsharp/issues/15389), [PR #19586](https://github.com/dotnet/fsharp/pull/19586)) * Fix signature generation: `private` keyword placement for prefix-style type abbreviations. ([Issue #15560](https://github.com/dotnet/fsharp/issues/15560), [PR #19586](https://github.com/dotnet/fsharp/pull/19586)) * Fix signature generation: missing `[]` attribute for types without visible constructors. ([Issue #16531](https://github.com/dotnet/fsharp/issues/16531), [PR #19586](https://github.com/dotnet/fsharp/pull/19586)) -* Fix F# exception serialization now preserves fields. (Issue [#878](https://github.com/dotnet/fsharp/issues/878), [PR #19342](https://github.com/dotnet/fsharp/pull/19342)) +* Fix F# exception serialization now preserves fields (gated behind `--langversion:11`). (Issue [#878](https://github.com/dotnet/fsharp/issues/878), [PR #19342](https://github.com/dotnet/fsharp/pull/19342), [PR #19746](https://github.com/dotnet/fsharp/pull/19746)) * Fix methods being tagged as `Member` instead of `Method` in tooltips. ([Issue #10540](https://github.com/dotnet/fsharp/issues/10540), [PR #19507](https://github.com/dotnet/fsharp/pull/19507)) * Fix Debug-mode compilation when mixing resumable and standard computation expressions. ([Issue #19625](https://github.com/dotnet/fsharp/issues/19625), [PR #19630](https://github.com/dotnet/fsharp/pull/19630)) * IlxGen: fix missing CompilationMapping attribute for generic values ([PR #19643](https://github.com/dotnet/fsharp/pull/19643)) @@ -65,5 +65,6 @@ ### Changed * Improvements in error and warning messages: new error FS3885 when `let!`/`use!` is the final expression in a computation expression; new warning FS3886 when a list literal contains a single tuple element (likely missing `;` separator); improved wording for FS0003, FS0025, FS0039, FS0072, FS0247, FS0597, FS0670, FS3082, and SRTP operator-not-in-scope hints. ([PR #19398](https://github.com/dotnet/fsharp/pull/19398)) +* Exception field serialization (`GetObjectData` and field-restoring constructor) is now gated behind `langversion:11` (`LanguageFeature.ExceptionFieldSerializationSupport`). With langversion ≤10, exception codegen is unchanged from pre-#19342 behavior. ([PR #19746](https://github.com/dotnet/fsharp/pull/19746)) ### Breaking Changes diff --git a/src/Compiler/CodeGen/IlxGen.fs b/src/Compiler/CodeGen/IlxGen.fs index 939e3da324e..49207b9f480 100644 --- a/src/Compiler/CodeGen/IlxGen.fs +++ b/src/Compiler/CodeGen/IlxGen.fs @@ -12271,11 +12271,10 @@ and GenExnDef cenv mgbuf eenv m (exnc: Tycon) : ILTypeRef option = [] let serializationRelatedMembers = - // do not emit serialization related members if target framework lacks SerializationInfo or StreamingContext match g.iltyp_SerializationInfo, g.iltyp_StreamingContext with | Some serializationInfoType, Some streamingContextType -> - let emitSerializationFieldIL emitPerField = + let emitFieldSerializationIL emitPerField = [ for (_, ilFieldName, ilPropType, _) in fieldNamesAndTypes do yield! emitPerField ilFieldName ilPropType @@ -12285,7 +12284,7 @@ and GenExnDef cenv mgbuf eenv m (exnc: Tycon) : ILTypeRef option = ty.IsNominal && ty.Boxity = ILBoxity.AsValue let ilInstrsToRestoreFields = - emitSerializationFieldIL (fun ilFieldName ilPropType -> + emitFieldSerializationIL (fun ilFieldName ilPropType -> [ mkLdarg0 mkLdarg 1us @@ -12318,10 +12317,10 @@ and GenExnDef cenv mgbuf eenv m (exnc: Tycon) : ILTypeRef option = mkNormalStfld (mkILFieldSpecInTy (ilThisTy, ilFieldName, ilPropType)) ]) - // FSharp.Core is SecurityTransparent and cannot override SecurityCritical - // Exception.GetObjectData, so field restoration would be unbalanced — skip it. - let shouldRestoreFields = - not g.compilingFSharpCore && not fieldNamesAndTypes.IsEmpty + let emitFieldSerialization = + cenv.g.langVersion.SupportsFeature(LanguageFeature.ExceptionFieldSerializationSupport) + && not g.compilingFSharpCore + && not fieldNamesAndTypes.IsEmpty let ilInstrsForSerialization = [ @@ -12330,7 +12329,10 @@ and GenExnDef cenv mgbuf eenv m (exnc: Tycon) : ILTypeRef option = mkLdarg 2us mkNormalCall (mkILCtorMethSpecForTy (g.iltyp_Exception, [ serializationInfoType; streamingContextType ])) ] - @ (if shouldRestoreFields then ilInstrsToRestoreFields else []) + @ (if emitFieldSerialization then + ilInstrsToRestoreFields + else + []) |> nonBranchingInstrsToCode let ilCtorDefForSerialization = @@ -12344,73 +12346,66 @@ and GenExnDef cenv mgbuf eenv m (exnc: Tycon) : ILTypeRef option = ) |> AddNonUserCompilerGeneratedAttribs g - let ilInstrsToSaveFields = - emitSerializationFieldIL (fun ilFieldName ilPropType -> + if not emitFieldSerialization then + [ ilCtorDefForSerialization ] + else + let ilInstrsToSaveFields = + emitFieldSerializationIL (fun ilFieldName ilPropType -> + [ + mkLdarg 1us + I_ldstr ilFieldName + mkLdarg0 + mkNormalLdfld (mkILFieldSpecInTy (ilThisTy, ilFieldName, ilPropType)) + + if isILValueType ilPropType then + I_box ilPropType + + mkNormalCallvirt ( + mkILNonGenericInstanceMethSpecInTy ( + serializationInfoType, + "AddValue", + [ g.ilg.typ_String; g.ilg.typ_Object ], + ILType.Void + ) + ) + ]) + + let ilInstrsForGetObjectData = [ - mkLdarg 1us - I_ldstr ilFieldName mkLdarg0 - mkNormalLdfld (mkILFieldSpecInTy (ilThisTy, ilFieldName, ilPropType)) - - if isILValueType ilPropType then - I_box ilPropType - - mkNormalCallvirt ( + mkLdarg 1us + mkLdarg 2us + mkNormalCall ( mkILNonGenericInstanceMethSpecInTy ( - serializationInfoType, - "AddValue", - [ g.ilg.typ_String; g.ilg.typ_Object ], + g.iltyp_Exception, + "GetObjectData", + [ serializationInfoType; streamingContextType ], ILType.Void ) ) - ]) + ] + @ ilInstrsToSaveFields + |> nonBranchingInstrsToCode - let ilInstrsForGetObjectData = - [ - mkLdarg0 - mkLdarg 1us - mkLdarg 2us - mkNormalCall ( - mkILNonGenericInstanceMethSpecInTy ( - g.iltyp_Exception, + let ilGetObjectDataDef = + let securityCriticalAttr = + mkILCustomAttribute (g.attrib_SecurityCriticalAttribute.TypeRef, [], [], []) + + let mdef = + mkILNonGenericVirtualInstanceMethod ( "GetObjectData", - [ serializationInfoType; streamingContextType ], - ILType.Void + ILMemberAccess.Public, + [ + mkILParamNamed ("info", serializationInfoType) + mkILParamNamed ("context", streamingContextType) + ], + mkILReturn ILType.Void, + mkMethodBody (false, [], 8, ilInstrsForGetObjectData, None, eenv.imports) ) - ) - ] - @ ilInstrsToSaveFields - |> nonBranchingInstrsToCode - let ilGetObjectDataDef = - let mdef = - mkILNonGenericVirtualInstanceMethod ( - "GetObjectData", - ILMemberAccess.Public, - [ - mkILParamNamed ("info", serializationInfoType) - mkILParamNamed ("context", streamingContextType) - ], - mkILReturn ILType.Void, - mkMethodBody (false, [], 8, ilInstrsForGetObjectData, None, eenv.imports) - ) - - // SecurityCritical is required for .NET Framework where Exception.GetObjectData is security-critical - let securityCriticalAttr = - mkILCustomAttribute (g.attrib_SecurityCriticalAttribute.TypeRef, [], [], []) + mdef.With(customAttrs = mkILCustomAttrs [ securityCriticalAttr ]) + |> AddNonUserCompilerGeneratedAttribs g - mdef.With(customAttrs = mkILCustomAttrs [ securityCriticalAttr ]) - |> AddNonUserCompilerGeneratedAttribs g - - // FSharp.Core has [assembly: SecurityTransparent], making all code transparent. - // On .NET Framework, transparent code cannot override SecurityCritical virtual - // methods like Exception.GetObjectData. Without GetObjectData to write the fields, - // the field-restoring deserialization constructor would crash (fields not in - // SerializationInfo). So for FSharp.Core: emit only the base-call ctor (status quo). - // For user exceptions: emit both GetObjectData and the field-restoring ctor. - if g.compilingFSharpCore || fieldNamesAndTypes.IsEmpty then - [ ilCtorDefForSerialization ] - else [ ilCtorDefForSerialization; ilGetObjectDataDef ] | _ -> [] diff --git a/src/Compiler/FSComp.txt b/src/Compiler/FSComp.txt index 7ca8f0a7f85..f9765bdbd6e 100644 --- a/src/Compiler/FSComp.txt +++ b/src/Compiler/FSComp.txt @@ -1818,3 +1818,4 @@ featurePreprocessorElif,"#elif preprocessor directive" 3885,parsLetBangCannotBeLastInCE,"'%s' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression." 3886,tcListLiteralWithSingleTupleElement,"This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements?" 3887,ilCustomAttrInvalidArrayElemType,"The type '%s' is not a valid custom attribute argument type. Custom attribute arrays must have elements of primitive types, enums, string, System.Type, or System.Object." +featureExceptionFieldSerializationSupport,"emit GetObjectData and field-restoring deserialization constructor for exception types" diff --git a/src/Compiler/Facilities/LanguageFeatures.fs b/src/Compiler/Facilities/LanguageFeatures.fs index 1bc31837052..c66a039d7df 100644 --- a/src/Compiler/Facilities/LanguageFeatures.fs +++ b/src/Compiler/Facilities/LanguageFeatures.fs @@ -108,6 +108,7 @@ type LanguageFeature = | MethodOverloadsCache | ImplicitDIMCoverage | PreprocessorElif + | ExceptionFieldSerializationSupport /// LanguageVersion management type LanguageVersion(versionText, ?disabledFeaturesArray: LanguageFeature array) = @@ -251,6 +252,7 @@ type LanguageVersion(versionText, ?disabledFeaturesArray: LanguageFeature array) // Put stabilized features here for F# 11.0 previews via .NET SDK preview channels LanguageFeature.WarnWhenFunctionValueUsedAsInterpolatedStringArg, languageVersion110 LanguageFeature.PreprocessorElif, languageVersion110 + LanguageFeature.ExceptionFieldSerializationSupport, languageVersion110 // Difference between languageVersion110 and preview - 11.0 gets turned on automatically by picking a preview .NET 11 SDK // previewVersion is only when "preview" is specified explicitly in project files and users also need a preview SDK @@ -453,6 +455,7 @@ type LanguageVersion(versionText, ?disabledFeaturesArray: LanguageFeature array) | LanguageFeature.MethodOverloadsCache -> FSComp.SR.featureMethodOverloadsCache () | LanguageFeature.ImplicitDIMCoverage -> FSComp.SR.featureImplicitDIMCoverage () | LanguageFeature.PreprocessorElif -> FSComp.SR.featurePreprocessorElif () + | LanguageFeature.ExceptionFieldSerializationSupport -> FSComp.SR.featureExceptionFieldSerializationSupport () /// Get a version string associated with the given feature. static member GetFeatureVersionString feature = diff --git a/src/Compiler/Facilities/LanguageFeatures.fsi b/src/Compiler/Facilities/LanguageFeatures.fsi index fd6182c9d3e..4219ce43e35 100644 --- a/src/Compiler/Facilities/LanguageFeatures.fsi +++ b/src/Compiler/Facilities/LanguageFeatures.fsi @@ -99,6 +99,7 @@ type LanguageFeature = | MethodOverloadsCache | ImplicitDIMCoverage | PreprocessorElif + | ExceptionFieldSerializationSupport /// LanguageVersion management type LanguageVersion = diff --git a/src/Compiler/xlf/FSComp.txt.cs.xlf b/src/Compiler/xlf/FSComp.txt.cs.xlf index 811bc1b86bb..10fe84e6ab1 100644 --- a/src/Compiler/xlf/FSComp.txt.cs.xlf +++ b/src/Compiler/xlf/FSComp.txt.cs.xlf @@ -8982,6 +8982,11 @@ This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + + emit GetObjectData and field-restoring deserialization constructor for exception types + emit GetObjectData and field-restoring deserialization constructor for exception types + + \ No newline at end of file diff --git a/src/Compiler/xlf/FSComp.txt.de.xlf b/src/Compiler/xlf/FSComp.txt.de.xlf index 994f29280bd..17f93260936 100644 --- a/src/Compiler/xlf/FSComp.txt.de.xlf +++ b/src/Compiler/xlf/FSComp.txt.de.xlf @@ -8982,6 +8982,11 @@ This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + + emit GetObjectData and field-restoring deserialization constructor for exception types + emit GetObjectData and field-restoring deserialization constructor for exception types + + \ No newline at end of file diff --git a/src/Compiler/xlf/FSComp.txt.es.xlf b/src/Compiler/xlf/FSComp.txt.es.xlf index 670163d0f88..ecc7e4a3f27 100644 --- a/src/Compiler/xlf/FSComp.txt.es.xlf +++ b/src/Compiler/xlf/FSComp.txt.es.xlf @@ -8982,6 +8982,11 @@ This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + + emit GetObjectData and field-restoring deserialization constructor for exception types + emit GetObjectData and field-restoring deserialization constructor for exception types + + \ No newline at end of file diff --git a/src/Compiler/xlf/FSComp.txt.fr.xlf b/src/Compiler/xlf/FSComp.txt.fr.xlf index de16952ceec..3e0ab156a68 100644 --- a/src/Compiler/xlf/FSComp.txt.fr.xlf +++ b/src/Compiler/xlf/FSComp.txt.fr.xlf @@ -8982,6 +8982,11 @@ This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + + emit GetObjectData and field-restoring deserialization constructor for exception types + emit GetObjectData and field-restoring deserialization constructor for exception types + + \ No newline at end of file diff --git a/src/Compiler/xlf/FSComp.txt.it.xlf b/src/Compiler/xlf/FSComp.txt.it.xlf index 5b52ef2ebb2..424a8e0310b 100644 --- a/src/Compiler/xlf/FSComp.txt.it.xlf +++ b/src/Compiler/xlf/FSComp.txt.it.xlf @@ -8982,6 +8982,11 @@ This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + + emit GetObjectData and field-restoring deserialization constructor for exception types + emit GetObjectData and field-restoring deserialization constructor for exception types + + \ No newline at end of file diff --git a/src/Compiler/xlf/FSComp.txt.ja.xlf b/src/Compiler/xlf/FSComp.txt.ja.xlf index 5eef9cc71a4..d588b1908d7 100644 --- a/src/Compiler/xlf/FSComp.txt.ja.xlf +++ b/src/Compiler/xlf/FSComp.txt.ja.xlf @@ -8982,6 +8982,11 @@ This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + + emit GetObjectData and field-restoring deserialization constructor for exception types + emit GetObjectData and field-restoring deserialization constructor for exception types + + \ No newline at end of file diff --git a/src/Compiler/xlf/FSComp.txt.ko.xlf b/src/Compiler/xlf/FSComp.txt.ko.xlf index ae7ca4394f0..ec0d939e7b2 100644 --- a/src/Compiler/xlf/FSComp.txt.ko.xlf +++ b/src/Compiler/xlf/FSComp.txt.ko.xlf @@ -8982,6 +8982,11 @@ This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + + emit GetObjectData and field-restoring deserialization constructor for exception types + emit GetObjectData and field-restoring deserialization constructor for exception types + + \ No newline at end of file diff --git a/src/Compiler/xlf/FSComp.txt.pl.xlf b/src/Compiler/xlf/FSComp.txt.pl.xlf index 5ed89505503..ae93051caa0 100644 --- a/src/Compiler/xlf/FSComp.txt.pl.xlf +++ b/src/Compiler/xlf/FSComp.txt.pl.xlf @@ -8982,6 +8982,11 @@ This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + + emit GetObjectData and field-restoring deserialization constructor for exception types + emit GetObjectData and field-restoring deserialization constructor for exception types + + \ No newline at end of file diff --git a/src/Compiler/xlf/FSComp.txt.pt-BR.xlf b/src/Compiler/xlf/FSComp.txt.pt-BR.xlf index 30f75e12c8f..0e0c2367513 100644 --- a/src/Compiler/xlf/FSComp.txt.pt-BR.xlf +++ b/src/Compiler/xlf/FSComp.txt.pt-BR.xlf @@ -8982,6 +8982,11 @@ This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + + emit GetObjectData and field-restoring deserialization constructor for exception types + emit GetObjectData and field-restoring deserialization constructor for exception types + + \ No newline at end of file diff --git a/src/Compiler/xlf/FSComp.txt.ru.xlf b/src/Compiler/xlf/FSComp.txt.ru.xlf index 2f606681434..e25503d865e 100644 --- a/src/Compiler/xlf/FSComp.txt.ru.xlf +++ b/src/Compiler/xlf/FSComp.txt.ru.xlf @@ -8982,6 +8982,11 @@ This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + + emit GetObjectData and field-restoring deserialization constructor for exception types + emit GetObjectData and field-restoring deserialization constructor for exception types + + \ No newline at end of file diff --git a/src/Compiler/xlf/FSComp.txt.tr.xlf b/src/Compiler/xlf/FSComp.txt.tr.xlf index 4e89b343fe7..a296c02e44c 100644 --- a/src/Compiler/xlf/FSComp.txt.tr.xlf +++ b/src/Compiler/xlf/FSComp.txt.tr.xlf @@ -8982,6 +8982,11 @@ This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + + emit GetObjectData and field-restoring deserialization constructor for exception types + emit GetObjectData and field-restoring deserialization constructor for exception types + + \ No newline at end of file diff --git a/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf b/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf index 3485c64f09a..aa66fa326f6 100644 --- a/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf +++ b/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf @@ -8982,6 +8982,11 @@ This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + + emit GetObjectData and field-restoring deserialization constructor for exception types + emit GetObjectData and field-restoring deserialization constructor for exception types + + \ No newline at end of file diff --git a/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf b/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf index 2c60a0abcf2..d8517bff3ff 100644 --- a/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf +++ b/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf @@ -8982,6 +8982,11 @@ This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + + emit GetObjectData and field-restoring deserialization constructor for exception types + emit GetObjectData and field-restoring deserialization constructor for exception types + + \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CodeGenRegressions/CodeGenRegressions_Exceptions.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CodeGenRegressions/CodeGenRegressions_Exceptions.fs index 6370526e9b7..fba3cecf2d7 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CodeGenRegressions/CodeGenRegressions_Exceptions.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CodeGenRegressions/CodeGenRegressions_Exceptions.fs @@ -19,6 +19,7 @@ exception Foo of x:string * y:int let result = FSharp source |> asLibrary + |> withLangVersion "11" |> compile |> shouldSucceed @@ -90,6 +91,7 @@ let main _ = """ FSharp source |> asExe + |> withLangVersion "11" |> ignoreWarnings |> compile |> shouldSucceed @@ -146,6 +148,7 @@ let main _ = """ FSharp source |> asExe + |> withLangVersion "11" |> ignoreWarnings |> compile |> shouldSucceed diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/ExceptionType.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/ExceptionType.fs.il.net472.bsl index 37a4301ab0d..a3d9c281ff7 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/ExceptionType.fs.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/ExceptionType.fs.il.net472.bsl @@ -63,38 +63,8 @@ IL_0001: ldarg.1 IL_0002: ldarg.2 IL_0003: call instance void [runtime]System.Exception::.ctor(class [runtime]System.Runtime.Serialization.SerializationInfo, - valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ldarg.0 - IL_0009: ldarg.1 - IL_000a: ldstr "Data0@" - IL_000f: ldtoken [runtime]System.String - IL_0014: call class [runtime]System.Type [runtime]System.Type::GetTypeFromHandle(valuetype [runtime]System.RuntimeTypeHandle) - IL_0019: callvirt instance object [runtime]System.Runtime.Serialization.SerializationInfo::GetValue(string, - class [runtime]System.Type) - IL_001e: castclass [runtime]System.String - IL_0023: stfld string MyLibrary/JustStringE::Data0@ - IL_0028: ret - } - - .method public strict virtual instance void GetObjectData(class [runtime]System.Runtime.Serialization.SerializationInfo info, valuetype [runtime]System.Runtime.Serialization.StreamingContext context) cil managed - { - .custom instance void [runtime]System.Security.SecurityCriticalAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: ldarg.2 - IL_0003: call instance void [runtime]System.Exception::GetObjectData(class [runtime]System.Runtime.Serialization.SerializationInfo, - valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ldarg.1 - IL_0009: ldstr "Data0@" - IL_000e: ldarg.0 - IL_000f: ldfld string MyLibrary/JustStringE::Data0@ - IL_0014: callvirt instance void [runtime]System.Runtime.Serialization.SerializationInfo::AddValue(string, - object) - IL_0019: ret + valuetype [runtime]System.Runtime.Serialization.StreamingContext) + IL_0008: ret } .method public hidebysig specialname instance string get_Data0() cil managed @@ -170,53 +140,8 @@ IL_0001: ldarg.1 IL_0002: ldarg.2 IL_0003: call instance void [runtime]System.Exception::.ctor(class [runtime]System.Runtime.Serialization.SerializationInfo, - valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ldarg.0 - IL_0009: ldarg.1 - IL_000a: ldstr "M1@" - IL_000f: ldtoken [runtime]System.String - IL_0014: call class [runtime]System.Type [runtime]System.Type::GetTypeFromHandle(valuetype [runtime]System.RuntimeTypeHandle) - IL_0019: callvirt instance object [runtime]System.Runtime.Serialization.SerializationInfo::GetValue(string, - class [runtime]System.Type) - IL_001e: castclass [runtime]System.String - IL_0023: stfld string MyLibrary/TwoStrings::M1@ - IL_0028: ldarg.0 - IL_0029: ldarg.1 - IL_002a: ldstr "M2@" - IL_002f: ldtoken [runtime]System.String - IL_0034: call class [runtime]System.Type [runtime]System.Type::GetTypeFromHandle(valuetype [runtime]System.RuntimeTypeHandle) - IL_0039: callvirt instance object [runtime]System.Runtime.Serialization.SerializationInfo::GetValue(string, - class [runtime]System.Type) - IL_003e: castclass [runtime]System.String - IL_0043: stfld string MyLibrary/TwoStrings::M2@ - IL_0048: ret - } - - .method public strict virtual instance void GetObjectData(class [runtime]System.Runtime.Serialization.SerializationInfo info, valuetype [runtime]System.Runtime.Serialization.StreamingContext context) cil managed - { - .custom instance void [runtime]System.Security.SecurityCriticalAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: ldarg.2 - IL_0003: call instance void [runtime]System.Exception::GetObjectData(class [runtime]System.Runtime.Serialization.SerializationInfo, - valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ldarg.1 - IL_0009: ldstr "M1@" - IL_000e: ldarg.0 - IL_000f: ldfld string MyLibrary/TwoStrings::M1@ - IL_0014: callvirt instance void [runtime]System.Runtime.Serialization.SerializationInfo::AddValue(string, - object) - IL_0019: ldarg.1 - IL_001a: ldstr "M2@" - IL_001f: ldarg.0 - IL_0020: ldfld string MyLibrary/TwoStrings::M2@ - IL_0025: callvirt instance void [runtime]System.Runtime.Serialization.SerializationInfo::AddValue(string, - object) - IL_002a: ret + valuetype [runtime]System.Runtime.Serialization.StreamingContext) + IL_0008: ret } .method public hidebysig specialname instance string get_M1() cil managed @@ -306,38 +231,8 @@ IL_0001: ldarg.1 IL_0002: ldarg.2 IL_0003: call instance void [runtime]System.Exception::.ctor(class [runtime]System.Runtime.Serialization.SerializationInfo, - valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ldarg.0 - IL_0009: ldarg.1 - IL_000a: ldstr "Data0@" - IL_000f: ldtoken [runtime]System.String - IL_0014: call class [runtime]System.Type [runtime]System.Type::GetTypeFromHandle(valuetype [runtime]System.RuntimeTypeHandle) - IL_0019: callvirt instance object [runtime]System.Runtime.Serialization.SerializationInfo::GetValue(string, - class [runtime]System.Type) - IL_001e: castclass [runtime]System.String - IL_0023: stfld string MyLibrary/NullableStringE::Data0@ - IL_0028: ret - } - - .method public strict virtual instance void GetObjectData(class [runtime]System.Runtime.Serialization.SerializationInfo info, valuetype [runtime]System.Runtime.Serialization.StreamingContext context) cil managed - { - .custom instance void [runtime]System.Security.SecurityCriticalAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: ldarg.2 - IL_0003: call instance void [runtime]System.Exception::GetObjectData(class [runtime]System.Runtime.Serialization.SerializationInfo, - valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ldarg.1 - IL_0009: ldstr "Data0@" - IL_000e: ldarg.0 - IL_000f: ldfld string MyLibrary/NullableStringE::Data0@ - IL_0014: callvirt instance void [runtime]System.Runtime.Serialization.SerializationInfo::AddValue(string, - object) - IL_0019: ret + valuetype [runtime]System.Runtime.Serialization.StreamingContext) + IL_0008: ret } .method public hidebysig specialname instance string get_Data0() cil managed @@ -412,38 +307,8 @@ IL_0001: ldarg.1 IL_0002: ldarg.2 IL_0003: call instance void [runtime]System.Exception::.ctor(class [runtime]System.Runtime.Serialization.SerializationInfo, - valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ldarg.0 - IL_0009: ldarg.1 - IL_000a: ldstr "Message@" - IL_000f: ldtoken [runtime]System.String - IL_0014: call class [runtime]System.Type [runtime]System.Type::GetTypeFromHandle(valuetype [runtime]System.RuntimeTypeHandle) - IL_0019: callvirt instance object [runtime]System.Runtime.Serialization.SerializationInfo::GetValue(string, - class [runtime]System.Type) - IL_001e: castclass [runtime]System.String - IL_0023: stfld string MyLibrary/NullableMessage::Message@ - IL_0028: ret - } - - .method public strict virtual instance void GetObjectData(class [runtime]System.Runtime.Serialization.SerializationInfo info, valuetype [runtime]System.Runtime.Serialization.StreamingContext context) cil managed - { - .custom instance void [runtime]System.Security.SecurityCriticalAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: ldarg.2 - IL_0003: call instance void [runtime]System.Exception::GetObjectData(class [runtime]System.Runtime.Serialization.SerializationInfo, - valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ldarg.1 - IL_0009: ldstr "Message@" - IL_000e: ldarg.0 - IL_000f: ldfld string MyLibrary/NullableMessage::Message@ - IL_0014: callvirt instance void [runtime]System.Runtime.Serialization.SerializationInfo::AddValue(string, - object) - IL_0019: ret + valuetype [runtime]System.Runtime.Serialization.StreamingContext) + IL_0008: ret } .method public hidebysig specialname virtual instance string get_Message() cil managed diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/ExceptionType.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/ExceptionType.fs.il.netcore.bsl index d2c58c493bd..ae120424bcc 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/ExceptionType.fs.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/ExceptionType.fs.il.netcore.bsl @@ -64,37 +64,7 @@ IL_0002: ldarg.2 IL_0003: call instance void [runtime]System.Exception::.ctor(class [runtime]System.Runtime.Serialization.SerializationInfo, valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ldarg.0 - IL_0009: ldarg.1 - IL_000a: ldstr "Data0@" - IL_000f: ldtoken [runtime]System.String - IL_0014: call class [runtime]System.Type [runtime]System.Type::GetTypeFromHandle(valuetype [runtime]System.RuntimeTypeHandle) - IL_0019: callvirt instance object [runtime]System.Runtime.Serialization.SerializationInfo::GetValue(string, - class [runtime]System.Type) - IL_001e: castclass [runtime]System.String - IL_0023: stfld string MyLibrary/JustStringE::Data0@ - IL_0028: ret - } - - .method public strict virtual instance void GetObjectData(class [runtime]System.Runtime.Serialization.SerializationInfo info, valuetype [runtime]System.Runtime.Serialization.StreamingContext context) cil managed - { - .custom instance void [runtime]System.Security.SecurityCriticalAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: ldarg.2 - IL_0003: call instance void [runtime]System.Exception::GetObjectData(class [runtime]System.Runtime.Serialization.SerializationInfo, - valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ldarg.1 - IL_0009: ldstr "Data0@" - IL_000e: ldarg.0 - IL_000f: ldfld string MyLibrary/JustStringE::Data0@ - IL_0014: callvirt instance void [runtime]System.Runtime.Serialization.SerializationInfo::AddValue(string, - object) - IL_0019: ret + IL_0008: ret } .method public hidebysig specialname instance string get_Data0() cil managed @@ -171,52 +141,7 @@ IL_0002: ldarg.2 IL_0003: call instance void [runtime]System.Exception::.ctor(class [runtime]System.Runtime.Serialization.SerializationInfo, valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ldarg.0 - IL_0009: ldarg.1 - IL_000a: ldstr "M1@" - IL_000f: ldtoken [runtime]System.String - IL_0014: call class [runtime]System.Type [runtime]System.Type::GetTypeFromHandle(valuetype [runtime]System.RuntimeTypeHandle) - IL_0019: callvirt instance object [runtime]System.Runtime.Serialization.SerializationInfo::GetValue(string, - class [runtime]System.Type) - IL_001e: castclass [runtime]System.String - IL_0023: stfld string MyLibrary/TwoStrings::M1@ - IL_0028: ldarg.0 - IL_0029: ldarg.1 - IL_002a: ldstr "M2@" - IL_002f: ldtoken [runtime]System.String - IL_0034: call class [runtime]System.Type [runtime]System.Type::GetTypeFromHandle(valuetype [runtime]System.RuntimeTypeHandle) - IL_0039: callvirt instance object [runtime]System.Runtime.Serialization.SerializationInfo::GetValue(string, - class [runtime]System.Type) - IL_003e: castclass [runtime]System.String - IL_0043: stfld string MyLibrary/TwoStrings::M2@ - IL_0048: ret - } - - .method public strict virtual instance void GetObjectData(class [runtime]System.Runtime.Serialization.SerializationInfo info, valuetype [runtime]System.Runtime.Serialization.StreamingContext context) cil managed - { - .custom instance void [runtime]System.Security.SecurityCriticalAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: ldarg.2 - IL_0003: call instance void [runtime]System.Exception::GetObjectData(class [runtime]System.Runtime.Serialization.SerializationInfo, - valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ldarg.1 - IL_0009: ldstr "M1@" - IL_000e: ldarg.0 - IL_000f: ldfld string MyLibrary/TwoStrings::M1@ - IL_0014: callvirt instance void [runtime]System.Runtime.Serialization.SerializationInfo::AddValue(string, - object) - IL_0019: ldarg.1 - IL_001a: ldstr "M2@" - IL_001f: ldarg.0 - IL_0020: ldfld string MyLibrary/TwoStrings::M2@ - IL_0025: callvirt instance void [runtime]System.Runtime.Serialization.SerializationInfo::AddValue(string, - object) - IL_002a: ret + IL_0008: ret } .method public hidebysig specialname instance string get_M1() cil managed @@ -307,37 +232,7 @@ IL_0002: ldarg.2 IL_0003: call instance void [runtime]System.Exception::.ctor(class [runtime]System.Runtime.Serialization.SerializationInfo, valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ldarg.0 - IL_0009: ldarg.1 - IL_000a: ldstr "Data0@" - IL_000f: ldtoken [runtime]System.String - IL_0014: call class [runtime]System.Type [runtime]System.Type::GetTypeFromHandle(valuetype [runtime]System.RuntimeTypeHandle) - IL_0019: callvirt instance object [runtime]System.Runtime.Serialization.SerializationInfo::GetValue(string, - class [runtime]System.Type) - IL_001e: castclass [runtime]System.String - IL_0023: stfld string MyLibrary/NullableStringE::Data0@ - IL_0028: ret - } - - .method public strict virtual instance void GetObjectData(class [runtime]System.Runtime.Serialization.SerializationInfo info, valuetype [runtime]System.Runtime.Serialization.StreamingContext context) cil managed - { - .custom instance void [runtime]System.Security.SecurityCriticalAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: ldarg.2 - IL_0003: call instance void [runtime]System.Exception::GetObjectData(class [runtime]System.Runtime.Serialization.SerializationInfo, - valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ldarg.1 - IL_0009: ldstr "Data0@" - IL_000e: ldarg.0 - IL_000f: ldfld string MyLibrary/NullableStringE::Data0@ - IL_0014: callvirt instance void [runtime]System.Runtime.Serialization.SerializationInfo::AddValue(string, - object) - IL_0019: ret + IL_0008: ret } .method public hidebysig specialname instance string get_Data0() cil managed @@ -413,37 +308,7 @@ IL_0002: ldarg.2 IL_0003: call instance void [runtime]System.Exception::.ctor(class [runtime]System.Runtime.Serialization.SerializationInfo, valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ldarg.0 - IL_0009: ldarg.1 - IL_000a: ldstr "Message@" - IL_000f: ldtoken [runtime]System.String - IL_0014: call class [runtime]System.Type [runtime]System.Type::GetTypeFromHandle(valuetype [runtime]System.RuntimeTypeHandle) - IL_0019: callvirt instance object [runtime]System.Runtime.Serialization.SerializationInfo::GetValue(string, - class [runtime]System.Type) - IL_001e: castclass [runtime]System.String - IL_0023: stfld string MyLibrary/NullableMessage::Message@ - IL_0028: ret - } - - .method public strict virtual instance void GetObjectData(class [runtime]System.Runtime.Serialization.SerializationInfo info, valuetype [runtime]System.Runtime.Serialization.StreamingContext context) cil managed - { - .custom instance void [runtime]System.Security.SecurityCriticalAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: ldarg.2 - IL_0003: call instance void [runtime]System.Exception::GetObjectData(class [runtime]System.Runtime.Serialization.SerializationInfo, - valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ldarg.1 - IL_0009: ldstr "Message@" - IL_000e: ldarg.0 - IL_000f: ldfld string MyLibrary/NullableMessage::Message@ - IL_0014: callvirt instance void [runtime]System.Runtime.Serialization.SerializationInfo::AddValue(string, - object) - IL_0019: ret + IL_0008: ret } .method public hidebysig specialname virtual instance string get_Message() cil managed diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelModule.fs.RealInternalSignatureOff.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelModule.fs.RealInternalSignatureOff.il.net472.bsl index c2e13b6eac0..7f7632e16e7 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelModule.fs.RealInternalSignatureOff.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelModule.fs.RealInternalSignatureOff.il.net472.bsl @@ -482,38 +482,7 @@ IL_0002: ldarg.2 IL_0003: call instance void [runtime]System.Exception::.ctor(class [runtime]System.Runtime.Serialization.SerializationInfo, valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ldarg.0 - IL_0009: ldarg.1 - IL_000a: ldstr "Data0@" - IL_000f: ldtoken [runtime]System.Int32 - IL_0014: call class [runtime]System.Type [runtime]System.Type::GetTypeFromHandle(valuetype [runtime]System.RuntimeTypeHandle) - IL_0019: callvirt instance object [runtime]System.Runtime.Serialization.SerializationInfo::GetValue(string, - class [runtime]System.Type) - IL_001e: unbox.any [runtime]System.Int32 - IL_0023: stfld int32 ABC/MyExn::Data0@ - IL_0028: ret - } - - .method public strict virtual instance void GetObjectData(class [runtime]System.Runtime.Serialization.SerializationInfo info, valuetype [runtime]System.Runtime.Serialization.StreamingContext context) cil managed - { - .custom instance void [runtime]System.Security.SecurityCriticalAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: ldarg.2 - IL_0003: call instance void [runtime]System.Exception::GetObjectData(class [runtime]System.Runtime.Serialization.SerializationInfo, - valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ldarg.1 - IL_0009: ldstr "Data0@" - IL_000e: ldarg.0 - IL_000f: ldfld int32 ABC/MyExn::Data0@ - IL_0014: box [runtime]System.Int32 - IL_0019: callvirt instance void [runtime]System.Runtime.Serialization.SerializationInfo::AddValue(string, - object) - IL_001e: ret + IL_0008: ret } .method public hidebysig specialname instance int32 get_Data0() cil managed @@ -1215,38 +1184,7 @@ IL_0002: ldarg.2 IL_0003: call instance void [runtime]System.Exception::.ctor(class [runtime]System.Runtime.Serialization.SerializationInfo, valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ldarg.0 - IL_0009: ldarg.1 - IL_000a: ldstr "Data0@" - IL_000f: ldtoken [runtime]System.Int32 - IL_0014: call class [runtime]System.Type [runtime]System.Type::GetTypeFromHandle(valuetype [runtime]System.RuntimeTypeHandle) - IL_0019: callvirt instance object [runtime]System.Runtime.Serialization.SerializationInfo::GetValue(string, - class [runtime]System.Type) - IL_001e: unbox.any [runtime]System.Int32 - IL_0023: stfld int32 ABC/ABC/MyExn::Data0@ - IL_0028: ret - } - - .method public strict virtual instance void GetObjectData(class [runtime]System.Runtime.Serialization.SerializationInfo info, valuetype [runtime]System.Runtime.Serialization.StreamingContext context) cil managed - { - .custom instance void [runtime]System.Security.SecurityCriticalAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: ldarg.2 - IL_0003: call instance void [runtime]System.Exception::GetObjectData(class [runtime]System.Runtime.Serialization.SerializationInfo, - valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ldarg.1 - IL_0009: ldstr "Data0@" - IL_000e: ldarg.0 - IL_000f: ldfld int32 ABC/ABC/MyExn::Data0@ - IL_0014: box [runtime]System.Int32 - IL_0019: callvirt instance void [runtime]System.Runtime.Serialization.SerializationInfo::AddValue(string, - object) - IL_001e: ret + IL_0008: ret } .method public hidebysig specialname instance int32 get_Data0() cil managed diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelModule.fs.RealInternalSignatureOff.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelModule.fs.RealInternalSignatureOff.il.netcore.bsl index 8fd29f928dd..9a5a9063329 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelModule.fs.RealInternalSignatureOff.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelModule.fs.RealInternalSignatureOff.il.netcore.bsl @@ -482,38 +482,7 @@ IL_0002: ldarg.2 IL_0003: call instance void [runtime]System.Exception::.ctor(class [runtime]System.Runtime.Serialization.SerializationInfo, valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ldarg.0 - IL_0009: ldarg.1 - IL_000a: ldstr "Data0@" - IL_000f: ldtoken [runtime]System.Int32 - IL_0014: call class [runtime]System.Type [runtime]System.Type::GetTypeFromHandle(valuetype [runtime]System.RuntimeTypeHandle) - IL_0019: callvirt instance object [runtime]System.Runtime.Serialization.SerializationInfo::GetValue(string, - class [runtime]System.Type) - IL_001e: unbox.any [runtime]System.Int32 - IL_0023: stfld int32 ABC/MyExn::Data0@ - IL_0028: ret - } - - .method public strict virtual instance void GetObjectData(class [runtime]System.Runtime.Serialization.SerializationInfo info, valuetype [runtime]System.Runtime.Serialization.StreamingContext context) cil managed - { - .custom instance void [runtime]System.Security.SecurityCriticalAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: ldarg.2 - IL_0003: call instance void [runtime]System.Exception::GetObjectData(class [runtime]System.Runtime.Serialization.SerializationInfo, - valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ldarg.1 - IL_0009: ldstr "Data0@" - IL_000e: ldarg.0 - IL_000f: ldfld int32 ABC/MyExn::Data0@ - IL_0014: box [runtime]System.Int32 - IL_0019: callvirt instance void [runtime]System.Runtime.Serialization.SerializationInfo::AddValue(string, - object) - IL_001e: ret + IL_0008: ret } .method public hidebysig specialname instance int32 get_Data0() cil managed @@ -1215,38 +1184,7 @@ IL_0002: ldarg.2 IL_0003: call instance void [runtime]System.Exception::.ctor(class [runtime]System.Runtime.Serialization.SerializationInfo, valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ldarg.0 - IL_0009: ldarg.1 - IL_000a: ldstr "Data0@" - IL_000f: ldtoken [runtime]System.Int32 - IL_0014: call class [runtime]System.Type [runtime]System.Type::GetTypeFromHandle(valuetype [runtime]System.RuntimeTypeHandle) - IL_0019: callvirt instance object [runtime]System.Runtime.Serialization.SerializationInfo::GetValue(string, - class [runtime]System.Type) - IL_001e: unbox.any [runtime]System.Int32 - IL_0023: stfld int32 ABC/ABC/MyExn::Data0@ - IL_0028: ret - } - - .method public strict virtual instance void GetObjectData(class [runtime]System.Runtime.Serialization.SerializationInfo info, valuetype [runtime]System.Runtime.Serialization.StreamingContext context) cil managed - { - .custom instance void [runtime]System.Security.SecurityCriticalAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: ldarg.2 - IL_0003: call instance void [runtime]System.Exception::GetObjectData(class [runtime]System.Runtime.Serialization.SerializationInfo, - valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ldarg.1 - IL_0009: ldstr "Data0@" - IL_000e: ldarg.0 - IL_000f: ldfld int32 ABC/ABC/MyExn::Data0@ - IL_0014: box [runtime]System.Int32 - IL_0019: callvirt instance void [runtime]System.Runtime.Serialization.SerializationInfo::AddValue(string, - object) - IL_001e: ret + IL_0008: ret } .method public hidebysig specialname instance int32 get_Data0() cil managed @@ -1578,4 +1516,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelModule.fs.RealInternalSignatureOn.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelModule.fs.RealInternalSignatureOn.il.net472.bsl index 6144e9f3271..0d7172dfc0a 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelModule.fs.RealInternalSignatureOn.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelModule.fs.RealInternalSignatureOn.il.net472.bsl @@ -482,38 +482,7 @@ IL_0002: ldarg.2 IL_0003: call instance void [runtime]System.Exception::.ctor(class [runtime]System.Runtime.Serialization.SerializationInfo, valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ldarg.0 - IL_0009: ldarg.1 - IL_000a: ldstr "Data0@" - IL_000f: ldtoken [runtime]System.Int32 - IL_0014: call class [runtime]System.Type [runtime]System.Type::GetTypeFromHandle(valuetype [runtime]System.RuntimeTypeHandle) - IL_0019: callvirt instance object [runtime]System.Runtime.Serialization.SerializationInfo::GetValue(string, - class [runtime]System.Type) - IL_001e: unbox.any [runtime]System.Int32 - IL_0023: stfld int32 ABC/MyExn::Data0@ - IL_0028: ret - } - - .method public strict virtual instance void GetObjectData(class [runtime]System.Runtime.Serialization.SerializationInfo info, valuetype [runtime]System.Runtime.Serialization.StreamingContext context) cil managed - { - .custom instance void [runtime]System.Security.SecurityCriticalAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: ldarg.2 - IL_0003: call instance void [runtime]System.Exception::GetObjectData(class [runtime]System.Runtime.Serialization.SerializationInfo, - valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ldarg.1 - IL_0009: ldstr "Data0@" - IL_000e: ldarg.0 - IL_000f: ldfld int32 ABC/MyExn::Data0@ - IL_0014: box [runtime]System.Int32 - IL_0019: callvirt instance void [runtime]System.Runtime.Serialization.SerializationInfo::AddValue(string, - object) - IL_001e: ret + IL_0008: ret } .method public hidebysig specialname instance int32 get_Data0() cil managed @@ -1215,38 +1184,7 @@ IL_0002: ldarg.2 IL_0003: call instance void [runtime]System.Exception::.ctor(class [runtime]System.Runtime.Serialization.SerializationInfo, valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ldarg.0 - IL_0009: ldarg.1 - IL_000a: ldstr "Data0@" - IL_000f: ldtoken [runtime]System.Int32 - IL_0014: call class [runtime]System.Type [runtime]System.Type::GetTypeFromHandle(valuetype [runtime]System.RuntimeTypeHandle) - IL_0019: callvirt instance object [runtime]System.Runtime.Serialization.SerializationInfo::GetValue(string, - class [runtime]System.Type) - IL_001e: unbox.any [runtime]System.Int32 - IL_0023: stfld int32 ABC/ABC/MyExn::Data0@ - IL_0028: ret - } - - .method public strict virtual instance void GetObjectData(class [runtime]System.Runtime.Serialization.SerializationInfo info, valuetype [runtime]System.Runtime.Serialization.StreamingContext context) cil managed - { - .custom instance void [runtime]System.Security.SecurityCriticalAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: ldarg.2 - IL_0003: call instance void [runtime]System.Exception::GetObjectData(class [runtime]System.Runtime.Serialization.SerializationInfo, - valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ldarg.1 - IL_0009: ldstr "Data0@" - IL_000e: ldarg.0 - IL_000f: ldfld int32 ABC/ABC/MyExn::Data0@ - IL_0014: box [runtime]System.Int32 - IL_0019: callvirt instance void [runtime]System.Runtime.Serialization.SerializationInfo::AddValue(string, - object) - IL_001e: ret + IL_0008: ret } .method public hidebysig specialname instance int32 get_Data0() cil managed diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelModule.fs.RealInternalSignatureOn.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelModule.fs.RealInternalSignatureOn.il.netcore.bsl index 81bdaf3c1d4..4f12c1595c8 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelModule.fs.RealInternalSignatureOn.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelModule.fs.RealInternalSignatureOn.il.netcore.bsl @@ -482,38 +482,7 @@ IL_0002: ldarg.2 IL_0003: call instance void [runtime]System.Exception::.ctor(class [runtime]System.Runtime.Serialization.SerializationInfo, valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ldarg.0 - IL_0009: ldarg.1 - IL_000a: ldstr "Data0@" - IL_000f: ldtoken [runtime]System.Int32 - IL_0014: call class [runtime]System.Type [runtime]System.Type::GetTypeFromHandle(valuetype [runtime]System.RuntimeTypeHandle) - IL_0019: callvirt instance object [runtime]System.Runtime.Serialization.SerializationInfo::GetValue(string, - class [runtime]System.Type) - IL_001e: unbox.any [runtime]System.Int32 - IL_0023: stfld int32 ABC/MyExn::Data0@ - IL_0028: ret - } - - .method public strict virtual instance void GetObjectData(class [runtime]System.Runtime.Serialization.SerializationInfo info, valuetype [runtime]System.Runtime.Serialization.StreamingContext context) cil managed - { - .custom instance void [runtime]System.Security.SecurityCriticalAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: ldarg.2 - IL_0003: call instance void [runtime]System.Exception::GetObjectData(class [runtime]System.Runtime.Serialization.SerializationInfo, - valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ldarg.1 - IL_0009: ldstr "Data0@" - IL_000e: ldarg.0 - IL_000f: ldfld int32 ABC/MyExn::Data0@ - IL_0014: box [runtime]System.Int32 - IL_0019: callvirt instance void [runtime]System.Runtime.Serialization.SerializationInfo::AddValue(string, - object) - IL_001e: ret + IL_0008: ret } .method public hidebysig specialname instance int32 get_Data0() cil managed @@ -1215,38 +1184,7 @@ IL_0002: ldarg.2 IL_0003: call instance void [runtime]System.Exception::.ctor(class [runtime]System.Runtime.Serialization.SerializationInfo, valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ldarg.0 - IL_0009: ldarg.1 - IL_000a: ldstr "Data0@" - IL_000f: ldtoken [runtime]System.Int32 - IL_0014: call class [runtime]System.Type [runtime]System.Type::GetTypeFromHandle(valuetype [runtime]System.RuntimeTypeHandle) - IL_0019: callvirt instance object [runtime]System.Runtime.Serialization.SerializationInfo::GetValue(string, - class [runtime]System.Type) - IL_001e: unbox.any [runtime]System.Int32 - IL_0023: stfld int32 ABC/ABC/MyExn::Data0@ - IL_0028: ret - } - - .method public strict virtual instance void GetObjectData(class [runtime]System.Runtime.Serialization.SerializationInfo info, valuetype [runtime]System.Runtime.Serialization.StreamingContext context) cil managed - { - .custom instance void [runtime]System.Security.SecurityCriticalAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: ldarg.2 - IL_0003: call instance void [runtime]System.Exception::GetObjectData(class [runtime]System.Runtime.Serialization.SerializationInfo, - valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ldarg.1 - IL_0009: ldstr "Data0@" - IL_000e: ldarg.0 - IL_000f: ldfld int32 ABC/ABC/MyExn::Data0@ - IL_0014: box [runtime]System.Int32 - IL_0019: callvirt instance void [runtime]System.Runtime.Serialization.SerializationInfo::AddValue(string, - object) - IL_001e: ret + IL_0008: ret } .method public hidebysig specialname instance int32 get_Data0() cil managed @@ -1568,4 +1506,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelNamespace.fs.RealInternalSignatureOff.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelNamespace.fs.RealInternalSignatureOff.il.net472.bsl index dc13fbaaa41..c8ee72c0771 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelNamespace.fs.RealInternalSignatureOff.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelNamespace.fs.RealInternalSignatureOff.il.net472.bsl @@ -478,38 +478,7 @@ IL_0002: ldarg.2 IL_0003: call instance void [runtime]System.Exception::.ctor(class [runtime]System.Runtime.Serialization.SerializationInfo, valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ldarg.0 - IL_0009: ldarg.1 - IL_000a: ldstr "Data0@" - IL_000f: ldtoken [runtime]System.Int32 - IL_0014: call class [runtime]System.Type [runtime]System.Type::GetTypeFromHandle(valuetype [runtime]System.RuntimeTypeHandle) - IL_0019: callvirt instance object [runtime]System.Runtime.Serialization.SerializationInfo::GetValue(string, - class [runtime]System.Type) - IL_001e: unbox.any [runtime]System.Int32 - IL_0023: stfld int32 XYZ.MyExn::Data0@ - IL_0028: ret - } - - .method public strict virtual instance void GetObjectData(class [runtime]System.Runtime.Serialization.SerializationInfo info, valuetype [runtime]System.Runtime.Serialization.StreamingContext context) cil managed - { - .custom instance void [runtime]System.Security.SecurityCriticalAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: ldarg.2 - IL_0003: call instance void [runtime]System.Exception::GetObjectData(class [runtime]System.Runtime.Serialization.SerializationInfo, - valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ldarg.1 - IL_0009: ldstr "Data0@" - IL_000e: ldarg.0 - IL_000f: ldfld int32 XYZ.MyExn::Data0@ - IL_0014: box [runtime]System.Int32 - IL_0019: callvirt instance void [runtime]System.Runtime.Serialization.SerializationInfo::AddValue(string, - object) - IL_001e: ret + IL_0008: ret } .method public hidebysig specialname instance int32 get_Data0() cil managed @@ -1211,38 +1180,7 @@ IL_0002: ldarg.2 IL_0003: call instance void [runtime]System.Exception::.ctor(class [runtime]System.Runtime.Serialization.SerializationInfo, valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ldarg.0 - IL_0009: ldarg.1 - IL_000a: ldstr "Data0@" - IL_000f: ldtoken [runtime]System.Int32 - IL_0014: call class [runtime]System.Type [runtime]System.Type::GetTypeFromHandle(valuetype [runtime]System.RuntimeTypeHandle) - IL_0019: callvirt instance object [runtime]System.Runtime.Serialization.SerializationInfo::GetValue(string, - class [runtime]System.Type) - IL_001e: unbox.any [runtime]System.Int32 - IL_0023: stfld int32 XYZ.ABC/MyExn::Data0@ - IL_0028: ret - } - - .method public strict virtual instance void GetObjectData(class [runtime]System.Runtime.Serialization.SerializationInfo info, valuetype [runtime]System.Runtime.Serialization.StreamingContext context) cil managed - { - .custom instance void [runtime]System.Security.SecurityCriticalAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: ldarg.2 - IL_0003: call instance void [runtime]System.Exception::GetObjectData(class [runtime]System.Runtime.Serialization.SerializationInfo, - valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ldarg.1 - IL_0009: ldstr "Data0@" - IL_000e: ldarg.0 - IL_000f: ldfld int32 XYZ.ABC/MyExn::Data0@ - IL_0014: box [runtime]System.Int32 - IL_0019: callvirt instance void [runtime]System.Runtime.Serialization.SerializationInfo::AddValue(string, - object) - IL_001e: ret + IL_0008: ret } .method public hidebysig specialname instance int32 get_Data0() cil managed @@ -1944,38 +1882,7 @@ IL_0002: ldarg.2 IL_0003: call instance void [runtime]System.Exception::.ctor(class [runtime]System.Runtime.Serialization.SerializationInfo, valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ldarg.0 - IL_0009: ldarg.1 - IL_000a: ldstr "Data0@" - IL_000f: ldtoken [runtime]System.Int32 - IL_0014: call class [runtime]System.Type [runtime]System.Type::GetTypeFromHandle(valuetype [runtime]System.RuntimeTypeHandle) - IL_0019: callvirt instance object [runtime]System.Runtime.Serialization.SerializationInfo::GetValue(string, - class [runtime]System.Type) - IL_001e: unbox.any [runtime]System.Int32 - IL_0023: stfld int32 XYZ.ABC/ABC/MyExn::Data0@ - IL_0028: ret - } - - .method public strict virtual instance void GetObjectData(class [runtime]System.Runtime.Serialization.SerializationInfo info, valuetype [runtime]System.Runtime.Serialization.StreamingContext context) cil managed - { - .custom instance void [runtime]System.Security.SecurityCriticalAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: ldarg.2 - IL_0003: call instance void [runtime]System.Exception::GetObjectData(class [runtime]System.Runtime.Serialization.SerializationInfo, - valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ldarg.1 - IL_0009: ldstr "Data0@" - IL_000e: ldarg.0 - IL_000f: ldfld int32 XYZ.ABC/ABC/MyExn::Data0@ - IL_0014: box [runtime]System.Int32 - IL_0019: callvirt instance void [runtime]System.Runtime.Serialization.SerializationInfo::AddValue(string, - object) - IL_001e: ret + IL_0008: ret } .method public hidebysig specialname instance int32 get_Data0() cil managed diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelNamespace.fs.RealInternalSignatureOff.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelNamespace.fs.RealInternalSignatureOff.il.netcore.bsl index c8255f7cb0e..d840f0f7404 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelNamespace.fs.RealInternalSignatureOff.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelNamespace.fs.RealInternalSignatureOff.il.netcore.bsl @@ -478,38 +478,7 @@ IL_0002: ldarg.2 IL_0003: call instance void [runtime]System.Exception::.ctor(class [runtime]System.Runtime.Serialization.SerializationInfo, valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ldarg.0 - IL_0009: ldarg.1 - IL_000a: ldstr "Data0@" - IL_000f: ldtoken [runtime]System.Int32 - IL_0014: call class [runtime]System.Type [runtime]System.Type::GetTypeFromHandle(valuetype [runtime]System.RuntimeTypeHandle) - IL_0019: callvirt instance object [runtime]System.Runtime.Serialization.SerializationInfo::GetValue(string, - class [runtime]System.Type) - IL_001e: unbox.any [runtime]System.Int32 - IL_0023: stfld int32 XYZ.MyExn::Data0@ - IL_0028: ret - } - - .method public strict virtual instance void GetObjectData(class [runtime]System.Runtime.Serialization.SerializationInfo info, valuetype [runtime]System.Runtime.Serialization.StreamingContext context) cil managed - { - .custom instance void [runtime]System.Security.SecurityCriticalAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: ldarg.2 - IL_0003: call instance void [runtime]System.Exception::GetObjectData(class [runtime]System.Runtime.Serialization.SerializationInfo, - valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ldarg.1 - IL_0009: ldstr "Data0@" - IL_000e: ldarg.0 - IL_000f: ldfld int32 XYZ.MyExn::Data0@ - IL_0014: box [runtime]System.Int32 - IL_0019: callvirt instance void [runtime]System.Runtime.Serialization.SerializationInfo::AddValue(string, - object) - IL_001e: ret + IL_0008: ret } .method public hidebysig specialname instance int32 get_Data0() cil managed @@ -1211,38 +1180,7 @@ IL_0002: ldarg.2 IL_0003: call instance void [runtime]System.Exception::.ctor(class [runtime]System.Runtime.Serialization.SerializationInfo, valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ldarg.0 - IL_0009: ldarg.1 - IL_000a: ldstr "Data0@" - IL_000f: ldtoken [runtime]System.Int32 - IL_0014: call class [runtime]System.Type [runtime]System.Type::GetTypeFromHandle(valuetype [runtime]System.RuntimeTypeHandle) - IL_0019: callvirt instance object [runtime]System.Runtime.Serialization.SerializationInfo::GetValue(string, - class [runtime]System.Type) - IL_001e: unbox.any [runtime]System.Int32 - IL_0023: stfld int32 XYZ.ABC/MyExn::Data0@ - IL_0028: ret - } - - .method public strict virtual instance void GetObjectData(class [runtime]System.Runtime.Serialization.SerializationInfo info, valuetype [runtime]System.Runtime.Serialization.StreamingContext context) cil managed - { - .custom instance void [runtime]System.Security.SecurityCriticalAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: ldarg.2 - IL_0003: call instance void [runtime]System.Exception::GetObjectData(class [runtime]System.Runtime.Serialization.SerializationInfo, - valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ldarg.1 - IL_0009: ldstr "Data0@" - IL_000e: ldarg.0 - IL_000f: ldfld int32 XYZ.ABC/MyExn::Data0@ - IL_0014: box [runtime]System.Int32 - IL_0019: callvirt instance void [runtime]System.Runtime.Serialization.SerializationInfo::AddValue(string, - object) - IL_001e: ret + IL_0008: ret } .method public hidebysig specialname instance int32 get_Data0() cil managed @@ -1944,38 +1882,7 @@ IL_0002: ldarg.2 IL_0003: call instance void [runtime]System.Exception::.ctor(class [runtime]System.Runtime.Serialization.SerializationInfo, valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ldarg.0 - IL_0009: ldarg.1 - IL_000a: ldstr "Data0@" - IL_000f: ldtoken [runtime]System.Int32 - IL_0014: call class [runtime]System.Type [runtime]System.Type::GetTypeFromHandle(valuetype [runtime]System.RuntimeTypeHandle) - IL_0019: callvirt instance object [runtime]System.Runtime.Serialization.SerializationInfo::GetValue(string, - class [runtime]System.Type) - IL_001e: unbox.any [runtime]System.Int32 - IL_0023: stfld int32 XYZ.ABC/ABC/MyExn::Data0@ - IL_0028: ret - } - - .method public strict virtual instance void GetObjectData(class [runtime]System.Runtime.Serialization.SerializationInfo info, valuetype [runtime]System.Runtime.Serialization.StreamingContext context) cil managed - { - .custom instance void [runtime]System.Security.SecurityCriticalAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: ldarg.2 - IL_0003: call instance void [runtime]System.Exception::GetObjectData(class [runtime]System.Runtime.Serialization.SerializationInfo, - valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ldarg.1 - IL_0009: ldstr "Data0@" - IL_000e: ldarg.0 - IL_000f: ldfld int32 XYZ.ABC/ABC/MyExn::Data0@ - IL_0014: box [runtime]System.Int32 - IL_0019: callvirt instance void [runtime]System.Runtime.Serialization.SerializationInfo::AddValue(string, - object) - IL_001e: ret + IL_0008: ret } .method public hidebysig specialname instance int32 get_Data0() cil managed @@ -2307,4 +2214,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelNamespace.fs.RealInternalSignatureOn.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelNamespace.fs.RealInternalSignatureOn.il.net472.bsl index 58700ab4d6f..407197b1184 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelNamespace.fs.RealInternalSignatureOn.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelNamespace.fs.RealInternalSignatureOn.il.net472.bsl @@ -478,38 +478,7 @@ IL_0002: ldarg.2 IL_0003: call instance void [runtime]System.Exception::.ctor(class [runtime]System.Runtime.Serialization.SerializationInfo, valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ldarg.0 - IL_0009: ldarg.1 - IL_000a: ldstr "Data0@" - IL_000f: ldtoken [runtime]System.Int32 - IL_0014: call class [runtime]System.Type [runtime]System.Type::GetTypeFromHandle(valuetype [runtime]System.RuntimeTypeHandle) - IL_0019: callvirt instance object [runtime]System.Runtime.Serialization.SerializationInfo::GetValue(string, - class [runtime]System.Type) - IL_001e: unbox.any [runtime]System.Int32 - IL_0023: stfld int32 XYZ.MyExn::Data0@ - IL_0028: ret - } - - .method public strict virtual instance void GetObjectData(class [runtime]System.Runtime.Serialization.SerializationInfo info, valuetype [runtime]System.Runtime.Serialization.StreamingContext context) cil managed - { - .custom instance void [runtime]System.Security.SecurityCriticalAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: ldarg.2 - IL_0003: call instance void [runtime]System.Exception::GetObjectData(class [runtime]System.Runtime.Serialization.SerializationInfo, - valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ldarg.1 - IL_0009: ldstr "Data0@" - IL_000e: ldarg.0 - IL_000f: ldfld int32 XYZ.MyExn::Data0@ - IL_0014: box [runtime]System.Int32 - IL_0019: callvirt instance void [runtime]System.Runtime.Serialization.SerializationInfo::AddValue(string, - object) - IL_001e: ret + IL_0008: ret } .method public hidebysig specialname instance int32 get_Data0() cil managed @@ -1211,38 +1180,7 @@ IL_0002: ldarg.2 IL_0003: call instance void [runtime]System.Exception::.ctor(class [runtime]System.Runtime.Serialization.SerializationInfo, valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ldarg.0 - IL_0009: ldarg.1 - IL_000a: ldstr "Data0@" - IL_000f: ldtoken [runtime]System.Int32 - IL_0014: call class [runtime]System.Type [runtime]System.Type::GetTypeFromHandle(valuetype [runtime]System.RuntimeTypeHandle) - IL_0019: callvirt instance object [runtime]System.Runtime.Serialization.SerializationInfo::GetValue(string, - class [runtime]System.Type) - IL_001e: unbox.any [runtime]System.Int32 - IL_0023: stfld int32 XYZ.ABC/MyExn::Data0@ - IL_0028: ret - } - - .method public strict virtual instance void GetObjectData(class [runtime]System.Runtime.Serialization.SerializationInfo info, valuetype [runtime]System.Runtime.Serialization.StreamingContext context) cil managed - { - .custom instance void [runtime]System.Security.SecurityCriticalAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: ldarg.2 - IL_0003: call instance void [runtime]System.Exception::GetObjectData(class [runtime]System.Runtime.Serialization.SerializationInfo, - valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ldarg.1 - IL_0009: ldstr "Data0@" - IL_000e: ldarg.0 - IL_000f: ldfld int32 XYZ.ABC/MyExn::Data0@ - IL_0014: box [runtime]System.Int32 - IL_0019: callvirt instance void [runtime]System.Runtime.Serialization.SerializationInfo::AddValue(string, - object) - IL_001e: ret + IL_0008: ret } .method public hidebysig specialname instance int32 get_Data0() cil managed @@ -1944,38 +1882,7 @@ IL_0002: ldarg.2 IL_0003: call instance void [runtime]System.Exception::.ctor(class [runtime]System.Runtime.Serialization.SerializationInfo, valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ldarg.0 - IL_0009: ldarg.1 - IL_000a: ldstr "Data0@" - IL_000f: ldtoken [runtime]System.Int32 - IL_0014: call class [runtime]System.Type [runtime]System.Type::GetTypeFromHandle(valuetype [runtime]System.RuntimeTypeHandle) - IL_0019: callvirt instance object [runtime]System.Runtime.Serialization.SerializationInfo::GetValue(string, - class [runtime]System.Type) - IL_001e: unbox.any [runtime]System.Int32 - IL_0023: stfld int32 XYZ.ABC/ABC/MyExn::Data0@ - IL_0028: ret - } - - .method public strict virtual instance void GetObjectData(class [runtime]System.Runtime.Serialization.SerializationInfo info, valuetype [runtime]System.Runtime.Serialization.StreamingContext context) cil managed - { - .custom instance void [runtime]System.Security.SecurityCriticalAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: ldarg.2 - IL_0003: call instance void [runtime]System.Exception::GetObjectData(class [runtime]System.Runtime.Serialization.SerializationInfo, - valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ldarg.1 - IL_0009: ldstr "Data0@" - IL_000e: ldarg.0 - IL_000f: ldfld int32 XYZ.ABC/ABC/MyExn::Data0@ - IL_0014: box [runtime]System.Int32 - IL_0019: callvirt instance void [runtime]System.Runtime.Serialization.SerializationInfo::AddValue(string, - object) - IL_001e: ret + IL_0008: ret } .method public hidebysig specialname instance int32 get_Data0() cil managed diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelNamespace.fs.RealInternalSignatureOn.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelNamespace.fs.RealInternalSignatureOn.il.netcore.bsl index 400e8fa88c9..ef41cabbfcb 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelNamespace.fs.RealInternalSignatureOn.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelNamespace.fs.RealInternalSignatureOn.il.netcore.bsl @@ -478,38 +478,7 @@ IL_0002: ldarg.2 IL_0003: call instance void [runtime]System.Exception::.ctor(class [runtime]System.Runtime.Serialization.SerializationInfo, valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ldarg.0 - IL_0009: ldarg.1 - IL_000a: ldstr "Data0@" - IL_000f: ldtoken [runtime]System.Int32 - IL_0014: call class [runtime]System.Type [runtime]System.Type::GetTypeFromHandle(valuetype [runtime]System.RuntimeTypeHandle) - IL_0019: callvirt instance object [runtime]System.Runtime.Serialization.SerializationInfo::GetValue(string, - class [runtime]System.Type) - IL_001e: unbox.any [runtime]System.Int32 - IL_0023: stfld int32 XYZ.MyExn::Data0@ - IL_0028: ret - } - - .method public strict virtual instance void GetObjectData(class [runtime]System.Runtime.Serialization.SerializationInfo info, valuetype [runtime]System.Runtime.Serialization.StreamingContext context) cil managed - { - .custom instance void [runtime]System.Security.SecurityCriticalAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: ldarg.2 - IL_0003: call instance void [runtime]System.Exception::GetObjectData(class [runtime]System.Runtime.Serialization.SerializationInfo, - valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ldarg.1 - IL_0009: ldstr "Data0@" - IL_000e: ldarg.0 - IL_000f: ldfld int32 XYZ.MyExn::Data0@ - IL_0014: box [runtime]System.Int32 - IL_0019: callvirt instance void [runtime]System.Runtime.Serialization.SerializationInfo::AddValue(string, - object) - IL_001e: ret + IL_0008: ret } .method public hidebysig specialname instance int32 get_Data0() cil managed @@ -1211,38 +1180,7 @@ IL_0002: ldarg.2 IL_0003: call instance void [runtime]System.Exception::.ctor(class [runtime]System.Runtime.Serialization.SerializationInfo, valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ldarg.0 - IL_0009: ldarg.1 - IL_000a: ldstr "Data0@" - IL_000f: ldtoken [runtime]System.Int32 - IL_0014: call class [runtime]System.Type [runtime]System.Type::GetTypeFromHandle(valuetype [runtime]System.RuntimeTypeHandle) - IL_0019: callvirt instance object [runtime]System.Runtime.Serialization.SerializationInfo::GetValue(string, - class [runtime]System.Type) - IL_001e: unbox.any [runtime]System.Int32 - IL_0023: stfld int32 XYZ.ABC/MyExn::Data0@ - IL_0028: ret - } - - .method public strict virtual instance void GetObjectData(class [runtime]System.Runtime.Serialization.SerializationInfo info, valuetype [runtime]System.Runtime.Serialization.StreamingContext context) cil managed - { - .custom instance void [runtime]System.Security.SecurityCriticalAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: ldarg.2 - IL_0003: call instance void [runtime]System.Exception::GetObjectData(class [runtime]System.Runtime.Serialization.SerializationInfo, - valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ldarg.1 - IL_0009: ldstr "Data0@" - IL_000e: ldarg.0 - IL_000f: ldfld int32 XYZ.ABC/MyExn::Data0@ - IL_0014: box [runtime]System.Int32 - IL_0019: callvirt instance void [runtime]System.Runtime.Serialization.SerializationInfo::AddValue(string, - object) - IL_001e: ret + IL_0008: ret } .method public hidebysig specialname instance int32 get_Data0() cil managed @@ -1944,38 +1882,7 @@ IL_0002: ldarg.2 IL_0003: call instance void [runtime]System.Exception::.ctor(class [runtime]System.Runtime.Serialization.SerializationInfo, valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ldarg.0 - IL_0009: ldarg.1 - IL_000a: ldstr "Data0@" - IL_000f: ldtoken [runtime]System.Int32 - IL_0014: call class [runtime]System.Type [runtime]System.Type::GetTypeFromHandle(valuetype [runtime]System.RuntimeTypeHandle) - IL_0019: callvirt instance object [runtime]System.Runtime.Serialization.SerializationInfo::GetValue(string, - class [runtime]System.Type) - IL_001e: unbox.any [runtime]System.Int32 - IL_0023: stfld int32 XYZ.ABC/ABC/MyExn::Data0@ - IL_0028: ret - } - - .method public strict virtual instance void GetObjectData(class [runtime]System.Runtime.Serialization.SerializationInfo info, valuetype [runtime]System.Runtime.Serialization.StreamingContext context) cil managed - { - .custom instance void [runtime]System.Security.SecurityCriticalAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: ldarg.2 - IL_0003: call instance void [runtime]System.Exception::GetObjectData(class [runtime]System.Runtime.Serialization.SerializationInfo, - valuetype [runtime]System.Runtime.Serialization.StreamingContext) - IL_0008: ldarg.1 - IL_0009: ldstr "Data0@" - IL_000e: ldarg.0 - IL_000f: ldfld int32 XYZ.ABC/ABC/MyExn::Data0@ - IL_0014: box [runtime]System.Int32 - IL_0019: callvirt instance void [runtime]System.Runtime.Serialization.SerializationInfo::AddValue(string, - object) - IL_001e: ret + IL_0008: ret } .method public hidebysig specialname instance int32 get_Data0() cil managed @@ -2297,4 +2204,3 @@ - From d58742fbbed89ce0028b272130e69940f48cac19 Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Thu, 21 May 2026 11:32:08 +0200 Subject: [PATCH 05/72] Clean up state-machine workflow: remove stale refs, fix numbering (#19784) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Exclude shared/ from workflow discovery (for repos with shared imports) - Remove tooling-check-repo-rules.md reference (belongs to the security scan workflow, not the diagram generator) - Fix rule numbering gap (was 1,2,3,4,5 → now 1,2,3,4) - Replace fsharp-specific 'repo-assist' example with generic placeholder Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../workflows/agentic-state-machine.lock.yml | 320 +++++------------- .github/workflows/agentic-state-machine.md | 11 +- 2 files changed, 85 insertions(+), 246 deletions(-) diff --git a/.github/workflows/agentic-state-machine.lock.yml b/.github/workflows/agentic-state-machine.lock.yml index d9c59abd378..17cecc16aad 100644 --- a/.github/workflows/agentic-state-machine.lock.yml +++ b/.github/workflows/agentic-state-machine.lock.yml @@ -1,5 +1,5 @@ -# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"21c77c4aa434153a69f6f746dbea5f9abe823e1252873fcfb7bb4506c8812cc7","compiler_version":"v0.72.1","strict":true,"agent_id":"copilot"} -# gh-aw-manifest: {"version":1,"secrets":["COPILOT_GITHUB_TOKEN","GH_AW_CI_TRIGGER_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/checkout","sha":"de0fac2e4500dabe0009e67214ff5f5447ce83dd","version":"v6.0.2"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/setup-node","sha":"48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e","version":"v6.4.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"},{"repo":"github/gh-aw-actions/setup","sha":"bc56a0cad2f450c562810785ef38649c04db812a","version":"v0.72.1"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.25.41"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.41"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.25.41"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.3.6","digest":"sha256:2bb8eef86006a4c5963c55616a9c51c32f27bfdecb023b8aa6f91f6718d9171c","pinned_image":"ghcr.io/github/gh-aw-mcpg:v0.3.6@sha256:2bb8eef86006a4c5963c55616a9c51c32f27bfdecb023b8aa6f91f6718d9171c"},{"image":"ghcr.io/github/github-mcp-server:v1.0.3","digest":"sha256:2ac27ef03461ef2b877031b838a7d1fd7f12b12d4ace7796d8cad91446d55959","pinned_image":"ghcr.io/github/github-mcp-server:v1.0.3@sha256:2ac27ef03461ef2b877031b838a7d1fd7f12b12d4ace7796d8cad91446d55959"},{"image":"node:lts-alpine","digest":"sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f","pinned_image":"node:lts-alpine@sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f"}]} +# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"21c77c4aa434153a69f6f746dbea5f9abe823e1252873fcfb7bb4506c8812cc7","compiler_version":"v0.68.3","strict":true,"agent_id":"copilot"} +# gh-aw-manifest: {"version":1,"secrets":["COPILOT_GITHUB_TOKEN","GH_AW_CI_TRIGGER_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/checkout","sha":"de0fac2e4500dabe0009e67214ff5f5447ce83dd","version":"v6.0.2"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"373c709c69115d41ff229c7e5df9f8788daa9553","version":"v9"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"},{"repo":"github/gh-aw-actions/setup","sha":"ba90f2186d7ad780ec640f364005fa24e797b360","version":"v0.68.3"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.25.20"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.20"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.25.20"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.2.19"},{"image":"ghcr.io/github/github-mcp-server:v0.32.0"},{"image":"node:lts-alpine"}]} # ___ _ _ # / _ \ | | (_) # | |_| | __ _ ___ _ __ | |_ _ ___ @@ -14,7 +14,7 @@ # \ /\ / (_) | | | | ( | | | | (_) \ V V /\__ \ # \/ \/ \___/|_| |_|\_\|_| |_|\___/ \_/\_/ |___/ # -# This file was automatically generated by gh-aw (v0.72.1). DO NOT EDIT. +# This file was automatically generated by gh-aw (v0.68.3). DO NOT EDIT. # # To update this file, edit the corresponding .md file and run: # gh aw compile @@ -36,18 +36,17 @@ # Custom actions used: # - actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 # - actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 -# - actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 -# - actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 +# - actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 # - actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 -# - github/gh-aw-actions/setup@bc56a0cad2f450c562810785ef38649c04db812a # v0.72.1 +# - github/gh-aw-actions/setup@ba90f2186d7ad780ec640f364005fa24e797b360 # v0.68.3 # # Container images used: -# - ghcr.io/github/gh-aw-firewall/agent:0.25.41 -# - ghcr.io/github/gh-aw-firewall/api-proxy:0.25.41 -# - ghcr.io/github/gh-aw-firewall/squid:0.25.41 -# - ghcr.io/github/gh-aw-mcpg:v0.3.6@sha256:2bb8eef86006a4c5963c55616a9c51c32f27bfdecb023b8aa6f91f6718d9171c -# - ghcr.io/github/github-mcp-server:v1.0.3@sha256:2ac27ef03461ef2b877031b838a7d1fd7f12b12d4ace7796d8cad91446d55959 -# - node:lts-alpine@sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f +# - ghcr.io/github/gh-aw-firewall/agent:0.25.20 +# - ghcr.io/github/gh-aw-firewall/api-proxy:0.25.20 +# - ghcr.io/github/gh-aw-firewall/squid:0.25.20 +# - ghcr.io/github/gh-aw-mcpg:v0.2.19 +# - ghcr.io/github/github-mcp-server:v0.32.0 +# - node:lts-alpine name: "Agentic State Machine — Diagram Generator" "on": @@ -78,7 +77,6 @@ jobs: outputs: comment_id: "" comment_repo: "" - engine_id: ${{ steps.generate_aw_info.outputs.engine_id }} lockdown_check_failed: ${{ steps.generate_aw_info.outputs.lockdown_check_failed == 'true' }} model: ${{ steps.generate_aw_info.outputs.model }} secret_verification_result: ${{ steps.validate-secret.outputs.verification_result }} @@ -87,34 +85,30 @@ jobs: steps: - name: Setup Scripts id: setup - uses: github/gh-aw-actions/setup@bc56a0cad2f450c562810785ef38649c04db812a # v0.72.1 + uses: github/gh-aw-actions/setup@ba90f2186d7ad780ec640f364005fa24e797b360 # v0.68.3 with: destination: ${{ runner.temp }}/gh-aw/actions job-name: ${{ github.job }} - env: - GH_AW_SETUP_WORKFLOW_NAME: "Agentic State Machine — Diagram Generator" - GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/agentic-state-machine.lock.yml@${{ github.ref }} - GH_AW_INFO_VERSION: "1.0.40" - name: Generate agentic run info id: generate_aw_info env: GH_AW_INFO_ENGINE_ID: "copilot" GH_AW_INFO_ENGINE_NAME: "GitHub Copilot CLI" - GH_AW_INFO_MODEL: ${{ vars.GH_AW_MODEL_AGENT_COPILOT || 'claude-sonnet-4.6' }} - GH_AW_INFO_VERSION: "1.0.40" - GH_AW_INFO_AGENT_VERSION: "1.0.40" - GH_AW_INFO_CLI_VERSION: "v0.72.1" + GH_AW_INFO_MODEL: ${{ vars.GH_AW_MODEL_AGENT_COPILOT || 'auto' }} + GH_AW_INFO_VERSION: "1.0.21" + GH_AW_INFO_AGENT_VERSION: "1.0.21" + GH_AW_INFO_CLI_VERSION: "v0.68.3" GH_AW_INFO_WORKFLOW_NAME: "Agentic State Machine — Diagram Generator" GH_AW_INFO_EXPERIMENTAL: "false" GH_AW_INFO_SUPPORTS_TOOLS_ALLOWLIST: "true" GH_AW_INFO_STAGED: "false" GH_AW_INFO_ALLOWED_DOMAINS: '["defaults","github"]' GH_AW_INFO_FIREWALL_ENABLED: "true" - GH_AW_INFO_AWF_VERSION: "v0.25.41" + GH_AW_INFO_AWF_VERSION: "v0.25.20" GH_AW_INFO_AWMG_VERSION: "" GH_AW_INFO_FIREWALL_TYPE: "squid" GH_AW_COMPILED_STRICT: "true" - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 + uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 with: script: | const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); @@ -133,23 +127,11 @@ jobs: sparse-checkout: | .github .agents - .claude - .codex - .crush - .gemini - .opencode - .pi sparse-checkout-cone-mode: true fetch-depth: 1 - - name: Save agent config folders for base branch restoration - env: - GH_AW_AGENT_FOLDERS: ".agents .claude .codex .crush .gemini .github .opencode .pi" - GH_AW_AGENT_FILES: ".crush.json AGENTS.md CLAUDE.md GEMINI.md PI.md opencode.jsonc" - # poutine:ignore untrusted_checkout_exec - run: bash "${RUNNER_TEMP}/gh-aw/actions/save_base_github_folders.sh" - name: Check workflow lock file id: check-lock-file - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 + uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 env: GH_AW_WORKFLOW_FILE: "agentic-state-machine.lock.yml" GH_AW_CONTEXT_WORKFLOW_REF: "${{ github.workflow_ref }}" @@ -160,9 +142,9 @@ jobs: const { main } = require('${{ runner.temp }}/gh-aw/actions/check_workflow_timestamp_api.cjs'); await main(); - name: Check compile-agentic version - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 + uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 env: - GH_AW_COMPILED_VERSION: "v0.72.1" + GH_AW_COMPILED_VERSION: "v0.68.3" with: script: | const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); @@ -199,9 +181,6 @@ jobs: cat "${RUNNER_TEMP}/gh-aw/prompts/safe_outputs_create_pull_request.md" cat << 'GH_AW_PROMPT_96518c4ea1ca6788_EOF' - GH_AW_PROMPT_96518c4ea1ca6788_EOF - cat "${RUNNER_TEMP}/gh-aw/prompts/mcp_cli_tools_prompt.md" - cat << 'GH_AW_PROMPT_96518c4ea1ca6788_EOF' The following GitHub context information is available for this workflow: {{#if __GH_AW_GITHUB_ACTOR__ }} @@ -238,10 +217,9 @@ jobs: GH_AW_PROMPT_96518c4ea1ca6788_EOF } > "$GH_AW_PROMPT" - name: Interpolate variables and render templates - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 + uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 env: GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt - GH_AW_ENGINE_ID: "copilot" with: script: | const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); @@ -249,7 +227,7 @@ jobs: const { main } = require('${{ runner.temp }}/gh-aw/actions/interpolate_prompt.cjs'); await main(); - name: Substitute placeholders - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 + uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 env: GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt GH_AW_GITHUB_ACTOR: ${{ github.actor }} @@ -260,7 +238,6 @@ jobs: GH_AW_GITHUB_REPOSITORY: ${{ github.repository }} GH_AW_GITHUB_RUN_ID: ${{ github.run_id }} GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }} - GH_AW_MCP_CLI_SERVERS_LIST: '- `safeoutputs` — run `safeoutputs --help` to see available tools' with: script: | const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); @@ -279,8 +256,7 @@ jobs: GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER: process.env.GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER, GH_AW_GITHUB_REPOSITORY: process.env.GH_AW_GITHUB_REPOSITORY, GH_AW_GITHUB_RUN_ID: process.env.GH_AW_GITHUB_RUN_ID, - GH_AW_GITHUB_WORKSPACE: process.env.GH_AW_GITHUB_WORKSPACE, - GH_AW_MCP_CLI_SERVERS_LIST: process.env.GH_AW_MCP_CLI_SERVERS_LIST + GH_AW_GITHUB_WORKSPACE: process.env.GH_AW_GITHUB_WORKSPACE } }); - name: Validate prompt placeholders @@ -298,15 +274,10 @@ jobs: uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: activation - include-hidden-files: true path: | /tmp/gh-aw/aw_info.json /tmp/gh-aw/aw-prompts/prompt.txt - /tmp/gh-aw/aw-prompts/prompt-template.txt - /tmp/gh-aw/aw-prompts/prompt-import-tree.json /tmp/gh-aw/github_rate_limits.jsonl - /tmp/gh-aw/base - /tmp/gh-aw/.github/agents if-no-files-found: ignore retention-days: 1 @@ -338,15 +309,11 @@ jobs: steps: - name: Setup Scripts id: setup - uses: github/gh-aw-actions/setup@bc56a0cad2f450c562810785ef38649c04db812a # v0.72.1 + uses: github/gh-aw-actions/setup@ba90f2186d7ad780ec640f364005fa24e797b360 # v0.68.3 with: destination: ${{ runner.temp }}/gh-aw/actions job-name: ${{ github.job }} trace-id: ${{ needs.activation.outputs.setup-trace-id }} - env: - GH_AW_SETUP_WORKFLOW_NAME: "Agentic State Machine — Diagram Generator" - GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/agentic-state-machine.lock.yml@${{ github.ref }} - GH_AW_INFO_VERSION: "1.0.40" - name: Set runtime paths id: set-runtime-paths run: | @@ -382,7 +349,7 @@ jobs: id: checkout-pr if: | github.event.pull_request || github.event.issue.pull_request - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 + uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 env: GH_TOKEN: ${{ secrets.GH_AW_GITHUB_MCP_SERVER_TOKEN || secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} with: @@ -393,11 +360,11 @@ jobs: const { main } = require('${{ runner.temp }}/gh-aw/actions/checkout_pr_branch.cjs'); await main(); - name: Install GitHub Copilot CLI - run: bash "${RUNNER_TEMP}/gh-aw/actions/install_copilot_cli.sh" 1.0.40 + run: bash "${RUNNER_TEMP}/gh-aw/actions/install_copilot_cli.sh" 1.0.21 env: GH_HOST: github.com - name: Install AWF binary - run: bash "${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh" v0.25.41 + run: bash "${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh" v0.25.20 - name: Parse integrity filter lists id: parse-guard-vars env: @@ -405,33 +372,17 @@ jobs: GH_AW_TRUSTED_USERS_VAR: ${{ vars.GH_AW_GITHUB_TRUSTED_USERS || '' }} GH_AW_APPROVAL_LABELS_VAR: ${{ vars.GH_AW_GITHUB_APPROVAL_LABELS || '' }} run: bash "${RUNNER_TEMP}/gh-aw/actions/parse_guard_list.sh" - - name: Download activation artifact - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - name: activation - path: /tmp/gh-aw - - name: Restore agent config folders from base branch - if: steps.checkout-pr.outcome == 'success' - env: - GH_AW_AGENT_FOLDERS: ".agents .claude .codex .crush .gemini .github .opencode .pi" - GH_AW_AGENT_FILES: ".crush.json AGENTS.md CLAUDE.md GEMINI.md PI.md opencode.jsonc" - run: bash "${RUNNER_TEMP}/gh-aw/actions/restore_base_github_folders.sh" - - name: Restore inline sub-agents from activation artifact - env: - GH_AW_SUB_AGENT_DIR: ".github/agents" - GH_AW_SUB_AGENT_EXT: ".agent.md" - run: bash "${RUNNER_TEMP}/gh-aw/actions/restore_inline_sub_agents.sh" - name: Download container images - run: bash "${RUNNER_TEMP}/gh-aw/actions/download_docker_images.sh" ghcr.io/github/gh-aw-firewall/agent:0.25.41 ghcr.io/github/gh-aw-firewall/api-proxy:0.25.41 ghcr.io/github/gh-aw-firewall/squid:0.25.41 ghcr.io/github/gh-aw-mcpg:v0.3.6@sha256:2bb8eef86006a4c5963c55616a9c51c32f27bfdecb023b8aa6f91f6718d9171c ghcr.io/github/github-mcp-server:v1.0.3@sha256:2ac27ef03461ef2b877031b838a7d1fd7f12b12d4ace7796d8cad91446d55959 node:lts-alpine@sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f - - name: Generate Safe Outputs Config + run: bash "${RUNNER_TEMP}/gh-aw/actions/download_docker_images.sh" ghcr.io/github/gh-aw-firewall/agent:0.25.20 ghcr.io/github/gh-aw-firewall/api-proxy:0.25.20 ghcr.io/github/gh-aw-firewall/squid:0.25.20 ghcr.io/github/gh-aw-mcpg:v0.2.19 ghcr.io/github/github-mcp-server:v0.32.0 node:lts-alpine + - name: Write Safe Outputs Config run: | mkdir -p "${RUNNER_TEMP}/gh-aw/safeoutputs" mkdir -p /tmp/gh-aw/safeoutputs mkdir -p /tmp/gh-aw/mcp-logs/safeoutputs cat > "${RUNNER_TEMP}/gh-aw/safeoutputs/config.json" << 'GH_AW_SAFE_OUTPUTS_CONFIG_f63147129cd97ff0_EOF' - {"create_pull_request":{"allowed_files":[".github/docs/**"],"draft":false,"labels":["automation","NO_RELEASE_NOTES"],"max":1,"max_patch_files":100,"max_patch_size":1024,"protect_top_level_dot_folders":true,"protected_files":["package.json","bun.lockb","bunfig.toml","deno.json","deno.jsonc","deno.lock","global.json","NuGet.Config","Directory.Packages.props","mix.exs","mix.lock","go.mod","go.sum","stack.yaml","stack.yaml.lock","pom.xml","build.gradle","build.gradle.kts","settings.gradle","settings.gradle.kts","gradle.properties","package-lock.json","yarn.lock","pnpm-lock.yaml","npm-shrinkwrap.json","requirements.txt","Pipfile","Pipfile.lock","pyproject.toml","setup.py","setup.cfg","Gemfile","Gemfile.lock","uv.lock","CODEOWNERS","DESIGN.md","README.md","CONTRIBUTING.md","CHANGELOG.md","SECURITY.md","CODE_OF_CONDUCT.md","AGENTS.md","CLAUDE.md","GEMINI.md"],"title_prefix":"[Agentic State Machine] "},"create_report_incomplete_issue":{},"missing_data":{},"missing_tool":{},"noop":{"max":1,"report-as-issue":"false"},"report_incomplete":{}} + {"create_pull_request":{"allowed_files":[".github/docs/**"],"draft":false,"labels":["automation","NO_RELEASE_NOTES"],"max":1,"max_patch_size":1024,"protected_files":["package.json","bun.lockb","bunfig.toml","deno.json","deno.jsonc","deno.lock","global.json","NuGet.Config","Directory.Packages.props","mix.exs","mix.lock","go.mod","go.sum","stack.yaml","stack.yaml.lock","pom.xml","build.gradle","build.gradle.kts","settings.gradle","settings.gradle.kts","gradle.properties","package-lock.json","yarn.lock","pnpm-lock.yaml","npm-shrinkwrap.json","requirements.txt","Pipfile","Pipfile.lock","pyproject.toml","setup.py","setup.cfg","Gemfile","Gemfile.lock","uv.lock","CODEOWNERS"],"protected_path_prefixes":[".github/",".agents/"],"title_prefix":"[Agentic State Machine] "},"create_report_incomplete_issue":{},"missing_data":{},"missing_tool":{},"noop":{"max":1,"report-as-issue":"false"},"report_incomplete":{}} GH_AW_SAFE_OUTPUTS_CONFIG_f63147129cd97ff0_EOF - - name: Generate Safe Outputs Tools + - name: Write Safe Outputs Tools env: GH_AW_TOOLS_META_JSON: | { @@ -446,11 +397,6 @@ jobs: "create_pull_request": { "defaultMax": 1, "fields": { - "base": { - "type": "string", - "sanitize": true, - "maxLength": 128 - }, "body": { "required": true, "type": "string", @@ -558,7 +504,7 @@ jobs: } } } - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 + uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 with: script: | const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); @@ -614,12 +560,11 @@ jobs: GITHUB_MCP_SERVER_TOKEN: ${{ secrets.GH_AW_GITHUB_MCP_SERVER_TOKEN || secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} run: | set -eo pipefail - mkdir -p "${RUNNER_TEMP}/gh-aw/mcp-config" + mkdir -p /tmp/gh-aw/mcp-config # Export gateway environment variables for MCP config and gateway script - export MCP_GATEWAY_PORT="8080" + export MCP_GATEWAY_PORT="80" export MCP_GATEWAY_DOMAIN="host.docker.internal" - export MCP_GATEWAY_HOST_DOMAIN="localhost" MCP_GATEWAY_API_KEY=$(openssl rand -base64 45 | tr -d '/+=') echo "::add-mask::${MCP_GATEWAY_API_KEY}" export MCP_GATEWAY_API_KEY @@ -629,19 +574,15 @@ jobs: export DEBUG="*" export GH_AW_ENGINE="copilot" - MCP_GATEWAY_UID=$(id -u 2>/dev/null || echo '0') - MCP_GATEWAY_GID=$(id -g 2>/dev/null || echo '0') - DOCKER_SOCK_GID=$(stat -c '%g' /var/run/docker.sock 2>/dev/null || echo '0') - export MCP_GATEWAY_DOCKER_COMMAND='docker run -i --rm --network host --add-host host.docker.internal:127.0.0.1 --user '"${MCP_GATEWAY_UID}"':'"${MCP_GATEWAY_GID}"' --group-add '"${DOCKER_SOCK_GID}"' -v /var/run/docker.sock:/var/run/docker.sock -e MCP_GATEWAY_PORT -e MCP_GATEWAY_DOMAIN -e MCP_GATEWAY_API_KEY -e MCP_GATEWAY_PAYLOAD_DIR -e MCP_GATEWAY_PAYLOAD_SIZE_THRESHOLD -e DEBUG -e MCP_GATEWAY_LOG_DIR -e GH_AW_MCP_LOG_DIR -e GH_AW_SAFE_OUTPUTS -e GH_AW_SAFE_OUTPUTS_CONFIG_PATH -e GH_AW_SAFE_OUTPUTS_TOOLS_PATH -e GH_AW_ASSETS_BRANCH -e GH_AW_ASSETS_MAX_SIZE_KB -e GH_AW_ASSETS_ALLOWED_EXTS -e DEFAULT_BRANCH -e GITHUB_MCP_SERVER_TOKEN -e GITHUB_MCP_GUARD_MIN_INTEGRITY -e GITHUB_MCP_GUARD_REPOS -e GITHUB_REPOSITORY -e GITHUB_SERVER_URL -e GITHUB_SHA -e GITHUB_WORKSPACE -e GITHUB_TOKEN -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RUN_ATTEMPT -e GITHUB_JOB -e GITHUB_ACTION -e GITHUB_EVENT_NAME -e GITHUB_EVENT_PATH -e GITHUB_ACTOR -e GITHUB_ACTOR_ID -e GITHUB_TRIGGERING_ACTOR -e GITHUB_WORKFLOW -e GITHUB_WORKFLOW_REF -e GITHUB_WORKFLOW_SHA -e GITHUB_REF -e GITHUB_REF_NAME -e GITHUB_REF_TYPE -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GH_AW_SAFE_OUTPUTS_PORT -e GH_AW_SAFE_OUTPUTS_API_KEY -v /tmp/gh-aw/mcp-payloads:/tmp/gh-aw/mcp-payloads:rw -v /opt:/opt:ro -v /tmp:/tmp:rw -v '"${GITHUB_WORKSPACE}"':'"${GITHUB_WORKSPACE}"':rw ghcr.io/github/gh-aw-mcpg:v0.3.6' + export MCP_GATEWAY_DOCKER_COMMAND='docker run -i --rm --network host -v /var/run/docker.sock:/var/run/docker.sock -e MCP_GATEWAY_PORT -e MCP_GATEWAY_DOMAIN -e MCP_GATEWAY_API_KEY -e MCP_GATEWAY_PAYLOAD_DIR -e MCP_GATEWAY_PAYLOAD_SIZE_THRESHOLD -e DEBUG -e MCP_GATEWAY_LOG_DIR -e GH_AW_MCP_LOG_DIR -e GH_AW_SAFE_OUTPUTS -e GH_AW_SAFE_OUTPUTS_CONFIG_PATH -e GH_AW_SAFE_OUTPUTS_TOOLS_PATH -e GH_AW_ASSETS_BRANCH -e GH_AW_ASSETS_MAX_SIZE_KB -e GH_AW_ASSETS_ALLOWED_EXTS -e DEFAULT_BRANCH -e GITHUB_MCP_SERVER_TOKEN -e GITHUB_MCP_GUARD_MIN_INTEGRITY -e GITHUB_MCP_GUARD_REPOS -e GITHUB_REPOSITORY -e GITHUB_SERVER_URL -e GITHUB_SHA -e GITHUB_WORKSPACE -e GITHUB_TOKEN -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RUN_ATTEMPT -e GITHUB_JOB -e GITHUB_ACTION -e GITHUB_EVENT_NAME -e GITHUB_EVENT_PATH -e GITHUB_ACTOR -e GITHUB_ACTOR_ID -e GITHUB_TRIGGERING_ACTOR -e GITHUB_WORKFLOW -e GITHUB_WORKFLOW_REF -e GITHUB_WORKFLOW_SHA -e GITHUB_REF -e GITHUB_REF_NAME -e GITHUB_REF_TYPE -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GH_AW_SAFE_OUTPUTS_PORT -e GH_AW_SAFE_OUTPUTS_API_KEY -v /tmp/gh-aw/mcp-payloads:/tmp/gh-aw/mcp-payloads:rw -v /opt:/opt:ro -v /tmp:/tmp:rw -v '"${GITHUB_WORKSPACE}"':'"${GITHUB_WORKSPACE}"':rw ghcr.io/github/gh-aw-mcpg:v0.2.19' mkdir -p /home/runner/.copilot - GH_AW_NODE=$(which node 2>/dev/null || command -v node 2>/dev/null || echo node) - cat << GH_AW_MCP_CONFIG_903e0d922f6fd3f9_EOF | "$GH_AW_NODE" "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.cjs" + cat << GH_AW_MCP_CONFIG_903e0d922f6fd3f9_EOF | bash "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.sh" { "mcpServers": { "github": { "type": "stdio", - "container": "ghcr.io/github/github-mcp-server:v1.0.3", + "container": "ghcr.io/github/github-mcp-server:v0.32.0", "env": { "GITHUB_HOST": "\${GITHUB_SERVER_URL}", "GITHUB_PERSONAL_ACCESS_TOKEN": "\${GITHUB_MCP_SERVER_TOKEN}", @@ -681,27 +622,14 @@ jobs: } } GH_AW_MCP_CONFIG_903e0d922f6fd3f9_EOF - - name: Mount MCP servers as CLIs - id: mount-mcp-clis - continue-on-error: true - env: - MCP_GATEWAY_API_KEY: ${{ steps.start-mcp-gateway.outputs.gateway-api-key }} - MCP_GATEWAY_DOMAIN: ${{ steps.start-mcp-gateway.outputs.gateway-domain }} - MCP_GATEWAY_PORT: ${{ steps.start-mcp-gateway.outputs.gateway-port }} - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 + - name: Download activation artifact + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: - script: | - const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); - setupGlobals(core, github, context, exec, io); - const { main } = require('${{ runner.temp }}/gh-aw/actions/mount_mcp_as_cli.cjs'); - await main(); - - name: Clean credentials + name: activation + path: /tmp/gh-aw + - name: Clean git credentials continue-on-error: true run: bash "${RUNNER_TEMP}/gh-aw/actions/clean_git_credentials.sh" - - name: Audit pre-agent workspace - id: pre_agent_audit - continue-on-error: true - run: bash "${RUNNER_TEMP}/gh-aw/actions/audit_pre_agent_workspace.sh" - name: Execute GitHub Copilot CLI id: agentic_execution # Copilot CLI tool arguments (sorted): @@ -709,27 +637,21 @@ jobs: run: | set -o pipefail touch /tmp/gh-aw/agent-step-summary.md - GH_AW_NODE_BIN=$(command -v node 2>/dev/null || true) - export GH_AW_NODE_BIN (umask 177 && touch /tmp/gh-aw/agent-stdio.log) - printf '%s\n' '{"$schema":"https://github.com/github/gh-aw-firewall/releases/download/v0.25.41/awf-config.schema.json","network":{"allowDomains":["*.githubusercontent.com","api.business.githubcopilot.com","api.enterprise.githubcopilot.com","api.github.com","api.githubcopilot.com","api.individual.githubcopilot.com","api.snapcraft.io","archive.ubuntu.com","azure.archive.ubuntu.com","codeload.github.com","crl.geotrust.com","crl.globalsign.com","crl.identrust.com","crl.sectigo.com","crl.thawte.com","crl.usertrust.com","crl.verisign.com","crl3.digicert.com","crl4.digicert.com","crls.ssl.com","docs.github.com","github-cloud.githubusercontent.com","github-cloud.s3.amazonaws.com","github.blog","github.com","github.githubassets.com","host.docker.internal","json-schema.org","json.schemastore.org","keyserver.ubuntu.com","lfs.github.com","objects.githubusercontent.com","ocsp.digicert.com","ocsp.geotrust.com","ocsp.globalsign.com","ocsp.identrust.com","ocsp.sectigo.com","ocsp.ssl.com","ocsp.thawte.com","ocsp.usertrust.com","ocsp.verisign.com","packagecloud.io","packages.cloud.google.com","packages.microsoft.com","ppa.launchpad.net","raw.githubusercontent.com","registry.npmjs.org","s.symcb.com","s.symcd.com","security.ubuntu.com","telemetry.enterprise.githubcopilot.com","ts-crl.ws.symantec.com","ts-ocsp.ws.symantec.com","www.googleapis.com"]},"apiProxy":{"enabled":true,"models":{"auto":["large"],"deep-research":["copilot/deep-research*","copilot/o3-deep-research*","copilot/o4-mini-deep-research*","google/deep-research*","openai/o3-deep-research*","openai/o4-mini-deep-research*"],"gemini-flash":["copilot/gemini-*flash*","google/gemini-*flash*"],"gemini-pro":["copilot/gemini-*pro*","google/gemini-*pro*"],"gpt-4.1":["copilot/gpt-4.1*","openai/gpt-4.1*"],"gpt-5":["copilot/gpt-5*","openai/gpt-5*"],"gpt-5-codex":["copilot/gpt-5*codex*","openai/gpt-5*codex*"],"gpt-5-mini":["copilot/gpt-5*mini*","openai/gpt-5*mini*"],"gpt-5-nano":["copilot/gpt-5*nano*","openai/gpt-5*nano*"],"gpt-5-pro":["copilot/gpt-5*pro*","openai/gpt-5*pro*"],"haiku":["copilot/*haiku*","anthropic/*haiku*"],"large":["sonnet","gpt-5-pro","gpt-5","gemini-pro"],"mini":["haiku","gpt-5-mini","gpt-5-nano","gemini-flash"],"opus":["copilot/*opus*","anthropic/*opus*"],"reasoning":["copilot/o1*","copilot/o3*","copilot/o4*","openai/o1*","openai/o3*","openai/o4*"],"small":["mini"],"sonnet":["copilot/*sonnet*","anthropic/*sonnet*"]}},"container":{"imageTag":"0.25.41"}}' > "${RUNNER_TEMP}/gh-aw/awf-config.json" && cp "${RUNNER_TEMP}/gh-aw/awf-config.json" /tmp/gh-aw/awf-config.json # shellcheck disable=SC1003 - sudo -E awf --config "${RUNNER_TEMP}/gh-aw/awf-config.json" --container-workdir "${GITHUB_WORKSPACE}" --mount "${RUNNER_TEMP}/gh-aw:${RUNNER_TEMP}/gh-aw:ro" --mount "${RUNNER_TEMP}/gh-aw:/host${RUNNER_TEMP}/gh-aw:ro" --env-all --exclude-env COPILOT_GITHUB_TOKEN --exclude-env GITHUB_MCP_SERVER_TOKEN --exclude-env MCP_GATEWAY_API_KEY --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --audit-dir /tmp/gh-aw/sandbox/firewall/audit --enable-host-access --allow-host-ports 80,443,8080 --skip-pull \ - -- /bin/bash -c 'export PATH="${RUNNER_TEMP}/gh-aw/mcp-cli/bin:$PATH" && export PATH="$(find /opt/hostedtoolcache /home/runner/work/_tool -maxdepth 4 -type d -name bin 2>/dev/null | tr '\''\n'\'' '\'':'\'')$PATH"; [ -n "$GOROOT" ] && export PATH="$GOROOT/bin:$PATH" || true && GH_AW_NODE_EXEC="${GH_AW_NODE_BIN:-}"; if [ -z "$GH_AW_NODE_EXEC" ] || [ ! -x "$GH_AW_NODE_EXEC" ]; then GH_AW_NODE_EXEC="$(command -v node 2>/dev/null || echo node)"; fi; "$GH_AW_NODE_EXEC" ${RUNNER_TEMP}/gh-aw/actions/copilot_harness.cjs /usr/local/bin/copilot --add-dir /tmp/gh-aw/ --log-level all --log-dir /tmp/gh-aw/sandbox/agent/logs/ --disable-builtin-mcps --no-ask-user --allow-all-tools --allow-all-paths --add-dir "${GITHUB_WORKSPACE}" --prompt-file /tmp/gh-aw/aw-prompts/prompt.txt' 2>&1 | tee -a /tmp/gh-aw/agent-stdio.log + sudo -E awf --container-workdir "${GITHUB_WORKSPACE}" --mount "${RUNNER_TEMP}/gh-aw:${RUNNER_TEMP}/gh-aw:ro" --mount "${RUNNER_TEMP}/gh-aw:/host${RUNNER_TEMP}/gh-aw:ro" --env-all --exclude-env COPILOT_GITHUB_TOKEN --exclude-env GITHUB_MCP_SERVER_TOKEN --exclude-env MCP_GATEWAY_API_KEY --allow-domains '*.githubusercontent.com,api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,docs.github.com,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.blog,github.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,ppa.launchpad.net,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com,www.googleapis.com' --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --audit-dir /tmp/gh-aw/sandbox/firewall/audit --enable-host-access --image-tag 0.25.20 --skip-pull --enable-api-proxy \ + -- /bin/bash -c 'node ${RUNNER_TEMP}/gh-aw/actions/copilot_driver.cjs /usr/local/bin/copilot --add-dir /tmp/gh-aw/ --log-level all --log-dir /tmp/gh-aw/sandbox/agent/logs/ --disable-builtin-mcps --no-ask-user --allow-all-tools --allow-all-paths --add-dir "${GITHUB_WORKSPACE}" --prompt "$(cat /tmp/gh-aw/aw-prompts/prompt.txt)"' 2>&1 | tee -a /tmp/gh-aw/agent-stdio.log env: - AWF_REFLECT_ENABLED: 1 COPILOT_AGENT_RUNNER_TYPE: STANDALONE - COPILOT_API_KEY: dummy-byok-key-for-offline-mode COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }} - COPILOT_MODEL: ${{ vars.GH_AW_MODEL_AGENT_COPILOT || 'claude-sonnet-4.6' }} + COPILOT_MODEL: ${{ vars.GH_AW_MODEL_AGENT_COPILOT || '' }} GH_AW_MCP_CONFIG: /home/runner/.copilot/mcp-config.json GH_AW_PHASE: agent GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt GH_AW_SAFE_OUTPUTS: ${{ steps.set-runtime-paths.outputs.GH_AW_SAFE_OUTPUTS }} - GH_AW_VERSION: v0.72.1 + GH_AW_VERSION: v0.68.3 GITHUB_API_URL: ${{ github.api_url }} GITHUB_AW: true - GITHUB_COPILOT_INTEGRATION_ID: agentic-workflows GITHUB_HEAD_REF: ${{ github.head_ref }} GITHUB_MCP_SERVER_TOKEN: ${{ secrets.GH_AW_GITHUB_MCP_SERVER_TOKEN || secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} GITHUB_REF_NAME: ${{ github.ref_name }} @@ -774,7 +696,7 @@ jobs: bash "${RUNNER_TEMP}/gh-aw/actions/stop_mcp_gateway.sh" "$GATEWAY_PID" - name: Redact secrets in logs if: always() - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 + uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 with: script: | const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); @@ -800,7 +722,7 @@ jobs: - name: Ingest agent output id: collect_output if: always() - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 + uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 env: GH_AW_SAFE_OUTPUTS: ${{ steps.set-runtime-paths.outputs.GH_AW_SAFE_OUTPUTS }} GH_AW_ALLOWED_DOMAINS: "*.githubusercontent.com,api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,docs.github.com,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.blog,github.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,ppa.launchpad.net,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com,www.googleapis.com" @@ -814,7 +736,7 @@ jobs: await main(); - name: Parse agent logs for step summary if: always() - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 + uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 env: GH_AW_AGENT_OUTPUT: /tmp/gh-aw/sandbox/agent/logs/ with: @@ -826,7 +748,7 @@ jobs: - name: Parse MCP Gateway logs for step summary if: always() id: parse-mcp-gateway - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 + uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 with: script: | const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); @@ -839,9 +761,9 @@ jobs: env: AWF_LOGS_DIR: /tmp/gh-aw/sandbox/firewall/logs run: | - # Fix permissions on firewall logs/audit dirs so they can be uploaded as artifacts + # Fix permissions on firewall logs so they can be uploaded as artifacts # AWF runs with sudo, creating files owned by root - sudo chmod -R a+rX /tmp/gh-aw/sandbox/firewall 2>/dev/null || true + sudo chmod -R a+r /tmp/gh-aw/sandbox/firewall/logs 2>/dev/null || true # Only run awf logs summary if awf command exists (it may not be installed if workflow failed before install step) if command -v awf &> /dev/null; then awf logs summary | tee -a "$GITHUB_STEP_SUMMARY" @@ -851,23 +773,13 @@ jobs: - name: Parse token usage for step summary if: always() continue-on-error: true - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 + uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 with: script: | const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); setupGlobals(core, github, context, exec, io, getOctokit); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); - - name: Print AWF reflect summary - if: always() - continue-on-error: true - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 - with: - script: | - const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); - setupGlobals(core, github, context, exec, io, getOctokit); - const { main } = require('${{ runner.temp }}/gh-aw/actions/awf_reflect_summary.cjs'); - await main(); - name: Write agent output placeholder if missing if: always() run: | @@ -889,17 +801,14 @@ jobs: !/tmp/gh-aw/proxy-logs/proxy-tls/ /tmp/gh-aw/agent_usage.json /tmp/gh-aw/agent-stdio.log - /tmp/gh-aw/pre-agent-audit.txt /tmp/gh-aw/agent/ /tmp/gh-aw/github_rate_limits.jsonl /tmp/gh-aw/safeoutputs.jsonl /tmp/gh-aw/agent_output.json /tmp/gh-aw/aw-*.patch /tmp/gh-aw/aw-*.bundle - /tmp/gh-aw/awf-config.json /tmp/gh-aw/sandbox/firewall/logs/ /tmp/gh-aw/sandbox/firewall/audit/ - /tmp/gh-aw/sandbox/firewall/awf-reflect.json if-no-files-found: ignore conclusion: @@ -927,15 +836,11 @@ jobs: steps: - name: Setup Scripts id: setup - uses: github/gh-aw-actions/setup@bc56a0cad2f450c562810785ef38649c04db812a # v0.72.1 + uses: github/gh-aw-actions/setup@ba90f2186d7ad780ec640f364005fa24e797b360 # v0.68.3 with: destination: ${{ runner.temp }}/gh-aw/actions job-name: ${{ github.job }} trace-id: ${{ needs.activation.outputs.setup-trace-id }} - env: - GH_AW_SETUP_WORKFLOW_NAME: "Agentic State Machine — Diagram Generator" - GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/agentic-state-machine.lock.yml@${{ github.ref }} - GH_AW_INFO_VERSION: "1.0.40" - name: Download agent output artifact id: download-agent-output continue-on-error: true @@ -952,7 +857,7 @@ jobs: echo "GH_AW_AGENT_OUTPUT=/tmp/gh-aw/agent_output.json" >> "$GITHUB_OUTPUT" - name: Process no-op messages id: noop - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 + uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 env: GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }} GH_AW_NOOP_MAX: "1" @@ -969,7 +874,7 @@ jobs: await main(); - name: Log detection run id: detection_runs - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 + uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 env: GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }} GH_AW_WORKFLOW_NAME: "Agentic State Machine — Diagram Generator" @@ -985,7 +890,7 @@ jobs: await main(); - name: Record missing tool id: missing_tool - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 + uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 env: GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }} GH_AW_MISSING_TOOL_CREATE_ISSUE: "true" @@ -999,7 +904,7 @@ jobs: await main(); - name: Record incomplete id: report_incomplete - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 + uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 env: GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }} GH_AW_REPORT_INCOMPLETE_CREATE_ISSUE: "true" @@ -1014,14 +919,13 @@ jobs: - name: Handle agent failure id: handle_agent_failure if: always() - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 + uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 env: GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }} GH_AW_WORKFLOW_NAME: "Agentic State Machine — Diagram Generator" GH_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} GH_AW_AGENT_CONCLUSION: ${{ needs.agent.result }} GH_AW_WORKFLOW_ID: "agentic-state-machine" - GH_AW_ACTION_FAILURE_ISSUE_EXPIRES_HOURS: "168" GH_AW_ENGINE_ID: "copilot" GH_AW_SECRET_VERIFICATION_RESULT: ${{ needs.activation.outputs.secret_verification_result }} GH_AW_CHECKOUT_PR_SUCCESS: ${{ needs.agent.outputs.checkout_pr_success }} @@ -1029,15 +933,12 @@ jobs: GH_AW_MCP_POLICY_ERROR: ${{ needs.agent.outputs.mcp_policy_error }} GH_AW_AGENTIC_ENGINE_TIMEOUT: ${{ needs.agent.outputs.agentic_engine_timeout }} GH_AW_MODEL_NOT_SUPPORTED_ERROR: ${{ needs.agent.outputs.model_not_supported_error }} - GH_AW_ENGINE_API_HOSTS: "api.enterprise.githubcopilot.com,api.githubcopilot.com,api.business.githubcopilot.com,api.individual.githubcopilot.com" GH_AW_CODE_PUSH_FAILURE_ERRORS: ${{ needs.safe_outputs.outputs.code_push_failure_errors }} GH_AW_CODE_PUSH_FAILURE_COUNT: ${{ needs.safe_outputs.outputs.code_push_failure_count }} GH_AW_LOCKDOWN_CHECK_FAILED: ${{ needs.activation.outputs.lockdown_check_failed }} GH_AW_STALE_LOCK_FILE_FAILED: ${{ needs.activation.outputs.stale_lock_file_failed }} GH_AW_GROUP_REPORTS: "false" GH_AW_FAILURE_REPORT_AS_ISSUE: "true" - GH_AW_MISSING_TOOL_REPORT_AS_FAILURE: "true" - GH_AW_MISSING_DATA_REPORT_AS_FAILURE: "true" GH_AW_TIMEOUT_MINUTES: "15" with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} @@ -1063,15 +964,11 @@ jobs: steps: - name: Setup Scripts id: setup - uses: github/gh-aw-actions/setup@bc56a0cad2f450c562810785ef38649c04db812a # v0.72.1 + uses: github/gh-aw-actions/setup@ba90f2186d7ad780ec640f364005fa24e797b360 # v0.68.3 with: destination: ${{ runner.temp }}/gh-aw/actions job-name: ${{ github.job }} trace-id: ${{ needs.activation.outputs.setup-trace-id }} - env: - GH_AW_SETUP_WORKFLOW_NAME: "Agentic State Machine — Diagram Generator" - GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/agentic-state-machine.lock.yml@${{ github.ref }} - GH_AW_INFO_VERSION: "1.0.40" - name: Download agent output artifact id: download-agent-output continue-on-error: true @@ -1097,7 +994,7 @@ jobs: rm -rf /tmp/gh-aw/sandbox/firewall/logs rm -rf /tmp/gh-aw/sandbox/firewall/audit - name: Download container images - run: bash "${RUNNER_TEMP}/gh-aw/actions/download_docker_images.sh" ghcr.io/github/gh-aw-firewall/agent:0.25.41 ghcr.io/github/gh-aw-firewall/api-proxy:0.25.41 ghcr.io/github/gh-aw-firewall/squid:0.25.41 + run: bash "${RUNNER_TEMP}/gh-aw/actions/download_docker_images.sh" ghcr.io/github/gh-aw-firewall/agent:0.25.20 ghcr.io/github/gh-aw-firewall/api-proxy:0.25.20 ghcr.io/github/gh-aw-firewall/squid:0.25.20 - name: Check if detection needed id: detection_guard if: always() @@ -1112,10 +1009,10 @@ jobs: echo "run_detection=false" >> "$GITHUB_OUTPUT" echo "Detection skipped: no agent outputs or patches to analyze" fi - - name: Clear MCP Config for detection + - name: Clear MCP configuration for detection if: always() && steps.detection_guard.outputs.run_detection == 'true' run: | - rm -f "${RUNNER_TEMP}/gh-aw/mcp-config/mcp-servers.json" + rm -f /tmp/gh-aw/mcp-config/mcp-servers.json rm -f /home/runner/.copilot/mcp-config.json rm -f "$GITHUB_WORKSPACE/.gemini/settings.json" - name: Prepare threat detection files @@ -1134,7 +1031,7 @@ jobs: ls -la /tmp/gh-aw/threat-detection/ 2>/dev/null || true - name: Setup threat detection if: always() && steps.detection_guard.outputs.run_detection == 'true' - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 + uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 env: WORKFLOW_NAME: "Agentic State Machine — Diagram Generator" WORKFLOW_DESCRIPTION: "Reads all agentic workflow .md files in this repo, extracts the\nstate machine they define, renders Mermaid diagrams + tables in\n.github/docs/state-machine.md. Weekly. Opens PR if changed." @@ -1150,45 +1047,33 @@ jobs: run: | mkdir -p /tmp/gh-aw/threat-detection touch /tmp/gh-aw/threat-detection/detection.log - - name: Setup Node.js - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 - with: - node-version: '24' - package-manager-cache: false - name: Install GitHub Copilot CLI - run: bash "${RUNNER_TEMP}/gh-aw/actions/install_copilot_cli.sh" 1.0.40 + run: bash "${RUNNER_TEMP}/gh-aw/actions/install_copilot_cli.sh" 1.0.21 env: GH_HOST: github.com - name: Install AWF binary - run: bash "${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh" v0.25.41 + run: bash "${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh" v0.25.20 - name: Execute GitHub Copilot CLI if: always() && steps.detection_guard.outputs.run_detection == 'true' - continue-on-error: true id: detection_agentic_execution # Copilot CLI tool arguments (sorted): timeout-minutes: 20 run: | set -o pipefail touch /tmp/gh-aw/agent-step-summary.md - GH_AW_NODE_BIN=$(command -v node 2>/dev/null || true) - export GH_AW_NODE_BIN (umask 177 && touch /tmp/gh-aw/threat-detection/detection.log) - printf '%s\n' '{"$schema":"https://github.com/github/gh-aw-firewall/releases/download/v0.25.41/awf-config.schema.json","network":{"allowDomains":["api.business.githubcopilot.com","api.enterprise.githubcopilot.com","api.github.com","api.githubcopilot.com","api.individual.githubcopilot.com","github.com","host.docker.internal","telemetry.enterprise.githubcopilot.com"]},"apiProxy":{"enabled":true},"container":{"imageTag":"0.25.41"}}' > "${RUNNER_TEMP}/gh-aw/awf-config.json" && cp "${RUNNER_TEMP}/gh-aw/awf-config.json" /tmp/gh-aw/awf-config.json # shellcheck disable=SC1003 - sudo -E awf --config "${RUNNER_TEMP}/gh-aw/awf-config.json" --container-workdir "${GITHUB_WORKSPACE}" --mount "${RUNNER_TEMP}/gh-aw:${RUNNER_TEMP}/gh-aw:ro" --mount "${RUNNER_TEMP}/gh-aw:/host${RUNNER_TEMP}/gh-aw:ro" --env-all --exclude-env COPILOT_GITHUB_TOKEN --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --audit-dir /tmp/gh-aw/sandbox/firewall/audit --enable-host-access --allow-host-ports 80,443,8080 --skip-pull \ - -- /bin/bash -c 'export PATH="$(find /opt/hostedtoolcache /home/runner/work/_tool -maxdepth 4 -type d -name bin 2>/dev/null | tr '\''\n'\'' '\'':'\'')$PATH"; [ -n "$GOROOT" ] && export PATH="$GOROOT/bin:$PATH" || true && GH_AW_NODE_EXEC="${GH_AW_NODE_BIN:-}"; if [ -z "$GH_AW_NODE_EXEC" ] || [ ! -x "$GH_AW_NODE_EXEC" ]; then GH_AW_NODE_EXEC="$(command -v node 2>/dev/null || echo node)"; fi; "$GH_AW_NODE_EXEC" ${RUNNER_TEMP}/gh-aw/actions/copilot_harness.cjs /usr/local/bin/copilot --add-dir /tmp/gh-aw/ --log-level all --log-dir /tmp/gh-aw/sandbox/agent/logs/ --disable-builtin-mcps --no-ask-user --allow-all-tools --add-dir "${GITHUB_WORKSPACE}" --prompt-file /tmp/gh-aw/aw-prompts/prompt.txt' 2>&1 | tee -a /tmp/gh-aw/threat-detection/detection.log + sudo -E awf --container-workdir "${GITHUB_WORKSPACE}" --mount "${RUNNER_TEMP}/gh-aw:${RUNNER_TEMP}/gh-aw:ro" --mount "${RUNNER_TEMP}/gh-aw:/host${RUNNER_TEMP}/gh-aw:ro" --env-all --exclude-env COPILOT_GITHUB_TOKEN --allow-domains api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,github.com,host.docker.internal,telemetry.enterprise.githubcopilot.com --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --audit-dir /tmp/gh-aw/sandbox/firewall/audit --enable-host-access --image-tag 0.25.20 --skip-pull --enable-api-proxy \ + -- /bin/bash -c 'node ${RUNNER_TEMP}/gh-aw/actions/copilot_driver.cjs /usr/local/bin/copilot --add-dir /tmp/gh-aw/ --log-level all --log-dir /tmp/gh-aw/sandbox/agent/logs/ --disable-builtin-mcps --no-ask-user --allow-all-tools --add-dir "${GITHUB_WORKSPACE}" --prompt "$(cat /tmp/gh-aw/aw-prompts/prompt.txt)"' 2>&1 | tee -a /tmp/gh-aw/threat-detection/detection.log env: - AWF_REFLECT_ENABLED: 1 COPILOT_AGENT_RUNNER_TYPE: STANDALONE - COPILOT_API_KEY: dummy-byok-key-for-offline-mode COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }} - COPILOT_MODEL: ${{ vars.GH_AW_MODEL_DETECTION_COPILOT || 'claude-sonnet-4.6' }} + COPILOT_MODEL: ${{ vars.GH_AW_MODEL_DETECTION_COPILOT || '' }} GH_AW_PHASE: detection GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt - GH_AW_VERSION: v0.72.1 + GH_AW_VERSION: v0.68.3 GITHUB_API_URL: ${{ github.api_url }} GITHUB_AW: true - GITHUB_COPILOT_INTEGRATION_ID: agentic-workflows GITHUB_HEAD_REF: ${{ github.head_ref }} GITHUB_REF_NAME: ${{ github.ref_name }} GITHUB_SERVER_URL: ${{ github.server_url }} @@ -1209,33 +1094,16 @@ jobs: - name: Parse and conclude threat detection id: detection_conclusion if: always() - continue-on-error: true - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 + uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 env: RUN_DETECTION: ${{ steps.detection_guard.outputs.run_detection }} GH_AW_DETECTION_CONTINUE_ON_ERROR: "true" with: script: | - try { - const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); - setupGlobals(core, github, context, exec, io, getOctokit); - const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_threat_detection_results.cjs'); - await main(); - } catch (loadErr) { - const continueOnError = process.env.GH_AW_DETECTION_CONTINUE_ON_ERROR !== 'false'; - const msg = 'ERR_SYSTEM: \u274C Unexpected error loading threat detection module: ' + (loadErr && loadErr.message ? loadErr.message : String(loadErr)); - core.error(msg); - core.setOutput('reason', 'parse_error'); - if (continueOnError) { - core.warning('\u26A0\uFE0F ' + msg); - core.setOutput('conclusion', 'warning'); - core.setOutput('success', 'false'); - } else { - core.setOutput('conclusion', 'failure'); - core.setOutput('success', 'false'); - core.setFailed(msg); - } - } + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io, getOctokit); + const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_threat_detection_results.cjs'); + await main(); safe_outputs: needs: @@ -1256,7 +1124,6 @@ jobs: GH_AW_EFFECTIVE_TOKENS: ${{ needs.agent.outputs.effective_tokens }} GH_AW_ENGINE_ID: "copilot" GH_AW_ENGINE_MODEL: ${{ needs.agent.outputs.model }} - GH_AW_ENGINE_VERSION: "1.0.40" GH_AW_WORKFLOW_ID: "agentic-state-machine" GH_AW_WORKFLOW_NAME: "Agentic State Machine — Diagram Generator" outputs: @@ -1271,15 +1138,11 @@ jobs: steps: - name: Setup Scripts id: setup - uses: github/gh-aw-actions/setup@bc56a0cad2f450c562810785ef38649c04db812a # v0.72.1 + uses: github/gh-aw-actions/setup@ba90f2186d7ad780ec640f364005fa24e797b360 # v0.68.3 with: destination: ${{ runner.temp }}/gh-aw/actions job-name: ${{ github.job }} trace-id: ${{ needs.activation.outputs.setup-trace-id }} - env: - GH_AW_SETUP_WORKFLOW_NAME: "Agentic State Machine — Diagram Generator" - GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/agentic-state-machine.lock.yml@${{ github.ref }} - GH_AW_INFO_VERSION: "1.0.40" - name: Download agent output artifact id: download-agent-output continue-on-error: true @@ -1300,34 +1163,11 @@ jobs: with: name: agent path: /tmp/gh-aw/ - - name: Extract base branch from agent output - id: extract-base-branch - if: steps.download-agent-output.outcome == 'success' - shell: bash - run: | - if [ -f "/tmp/gh-aw/agent_output.json" ]; then - GH_AW_NODE=$(which node 2>/dev/null || command -v node 2>/dev/null || echo node) - BASE_BRANCH=$("$GH_AW_NODE" -e " - try { - const data = JSON.parse(require('fs').readFileSync('/tmp/gh-aw/agent_output.json', 'utf8')); - const item = (data.items || []).find(i => - (i.type === 'create_pull_request' || i.type === 'push_to_pull_request_branch') && - i.base_branch - ); - if (item) process.stdout.write(item.base_branch); - } catch(e) {} - " 2>/dev/null || true) - # Validate: only allow safe git branch name characters - if [[ "$BASE_BRANCH" =~ ^[a-zA-Z0-9/_.-]+$ ]] && [ ${#BASE_BRANCH} -le 255 ]; then - printf 'base-branch=%s\n' "$BASE_BRANCH" >> "$GITHUB_OUTPUT" - echo "Extracted base branch from safe output: $BASE_BRANCH" - fi - fi - name: Checkout repository if: (!cancelled()) && needs.agent.result != 'skipped' && contains(needs.agent.outputs.output_types, 'create_pull_request') uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: - ref: ${{ steps.extract-base-branch.outputs.base-branch || github.base_ref || github.event.pull_request.base.ref || github.ref_name || github.event.repository.default_branch }} + ref: ${{ github.base_ref || github.event.pull_request.base.ref || github.ref_name || github.event.repository.default_branch }} token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} persist-credentials: false fetch-depth: 1 @@ -1356,13 +1196,13 @@ jobs: echo "GH_HOST=${GH_HOST}" >> "$GITHUB_ENV" - name: Process Safe Outputs id: process_safe_outputs - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 + uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 env: GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }} GH_AW_ALLOWED_DOMAINS: "*.githubusercontent.com,api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,docs.github.com,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.blog,github.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,ppa.launchpad.net,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com,www.googleapis.com" GITHUB_SERVER_URL: ${{ github.server_url }} GITHUB_API_URL: ${{ github.api_url }} - GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"create_pull_request\":{\"allowed_files\":[\".github/docs/**\"],\"draft\":false,\"labels\":[\"automation\",\"NO_RELEASE_NOTES\"],\"max\":1,\"max_patch_files\":100,\"max_patch_size\":1024,\"protect_top_level_dot_folders\":true,\"protected_files\":[\"package.json\",\"bun.lockb\",\"bunfig.toml\",\"deno.json\",\"deno.jsonc\",\"deno.lock\",\"global.json\",\"NuGet.Config\",\"Directory.Packages.props\",\"mix.exs\",\"mix.lock\",\"go.mod\",\"go.sum\",\"stack.yaml\",\"stack.yaml.lock\",\"pom.xml\",\"build.gradle\",\"build.gradle.kts\",\"settings.gradle\",\"settings.gradle.kts\",\"gradle.properties\",\"package-lock.json\",\"yarn.lock\",\"pnpm-lock.yaml\",\"npm-shrinkwrap.json\",\"requirements.txt\",\"Pipfile\",\"Pipfile.lock\",\"pyproject.toml\",\"setup.py\",\"setup.cfg\",\"Gemfile\",\"Gemfile.lock\",\"uv.lock\",\"CODEOWNERS\",\"DESIGN.md\",\"README.md\",\"CONTRIBUTING.md\",\"CHANGELOG.md\",\"SECURITY.md\",\"CODE_OF_CONDUCT.md\",\"AGENTS.md\",\"CLAUDE.md\",\"GEMINI.md\"],\"title_prefix\":\"[Agentic State Machine] \"},\"create_report_incomplete_issue\":{},\"missing_data\":{},\"missing_tool\":{},\"noop\":{\"max\":1,\"report-as-issue\":\"false\"},\"report_incomplete\":{}}" + GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"create_pull_request\":{\"allowed_files\":[\".github/docs/**\"],\"draft\":false,\"labels\":[\"automation\",\"NO_RELEASE_NOTES\"],\"max\":1,\"max_patch_size\":1024,\"protected_files\":[\"package.json\",\"bun.lockb\",\"bunfig.toml\",\"deno.json\",\"deno.jsonc\",\"deno.lock\",\"global.json\",\"NuGet.Config\",\"Directory.Packages.props\",\"mix.exs\",\"mix.lock\",\"go.mod\",\"go.sum\",\"stack.yaml\",\"stack.yaml.lock\",\"pom.xml\",\"build.gradle\",\"build.gradle.kts\",\"settings.gradle\",\"settings.gradle.kts\",\"gradle.properties\",\"package-lock.json\",\"yarn.lock\",\"pnpm-lock.yaml\",\"npm-shrinkwrap.json\",\"requirements.txt\",\"Pipfile\",\"Pipfile.lock\",\"pyproject.toml\",\"setup.py\",\"setup.cfg\",\"Gemfile\",\"Gemfile.lock\",\"uv.lock\",\"CODEOWNERS\",\"AGENTS.md\"],\"protected_path_prefixes\":[\".github/\",\".agents/\"],\"title_prefix\":\"[Agentic State Machine] \"},\"create_report_incomplete_issue\":{},\"missing_data\":{},\"missing_tool\":{},\"noop\":{\"max\":1,\"report-as-issue\":\"false\"},\"report_incomplete\":{}}" GH_AW_CI_TRIGGER_TOKEN: ${{ secrets.GH_AW_CI_TRIGGER_TOKEN }} with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/agentic-state-machine.md b/.github/workflows/agentic-state-machine.md index c29144663ce..60433f9d54a 100644 --- a/.github/workflows/agentic-state-machine.md +++ b/.github/workflows/agentic-state-machine.md @@ -38,11 +38,10 @@ You read all agentic workflow `.md` files in `.github/workflows/`, extract what -1. Read ALL `.md` files in `.github/workflows/` except `docs/` and `agentic-state-machine.md` (this file). -2. Also read `.github/tooling-check-repo-rules.md` if it exists. -3. If `.github/docs/state-machine.md` exists, read it. Compare source hashes in the `` footer against current files (use `sha256sum`). If unchanged → `noop`. If changed → update incrementally, minimal diff. -4. Every transition edge must label its actor: 👤 human, 🤖 agent-name, ⚙️ CI, ⏰ scheduler. -5. Do not hardcode sections for "issues" or "PRs". Discover what lifecycle groups exist from the workflows themselves. A workflow that maintains files/branches is its own group. +1. Read ALL `.md` files in `.github/workflows/` except `shared/`, `docs/`, and `agentic-state-machine.md` (this file). +2. If `.github/docs/state-machine.md` exists, read it. Compare source hashes in the `` footer against current files (use `sha256sum`). If unchanged → `noop`. If changed → update incrementally, minimal diff. +3. Every transition edge must label its actor: 👤 human, 🤖 agent-name, ⚙️ CI, ⏰ scheduler. +4. Do not hardcode sections for "issues" or "PRs". Discover what lifecycle groups exist from the workflows themselves. A workflow that maintains files/branches is its own group. @@ -69,6 +68,6 @@ You read all agentic workflow `.md` files in `.github/workflows/`, extract what - Composite states for sub-types: `state "Regression PRs" as RegPR { ... }` - Cross-composite transitions go OUTSIDE the composite blocks (Mermaid limitation). - `<>` for decision points, notes for context. -- Actor prefixes on every edge: `🤖 repo-assist (⏰ 12h)`, `⚙️ CI passes`, `👤 maintainer merges`. +- Actor prefixes on every edge: `🤖 (⏰ 12h)`, `⚙️ CI passes`, `👤 maintainer merges`. - No placeholder/fake names in examples — agent discovers real names from source files. From a6905561ca93026c25d08197ae2ac07c43a07f63 Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Thu, 21 May 2026 16:19:05 +0200 Subject: [PATCH 06/72] Honor --nowarn for command-line option warnings (#19776) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add failing tests for #19576 (TDD red) Tests demonstrate that --nowarn:N does not suppress warnings emitted during command-line option parsing (e.g. FS0075 for internal/test-only options like --extraoptimizationloops, --typedtree). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Honor --nowarn for warnings captured during command-line option parsing (#19576) Wrap the logger used to replay delayed command-line diagnostics with GetDiagnosticsLoggerFilteringByScopedNowarn so that --nowarn / --warnaserror / warn-level switches set on the command line are honored for diagnostics captured during option parsing (e.g. FS0075 from internal/test-only flags such as --extraoptimizationloops or --typedtree). The fix is applied both on the success path (fsc.fs main1, line ~586) and on the error/exit paths via the IDiagnosticsLoggerProvider extension method, making it universal across fsc.exe and FSharpChecker.Compile. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Remove speculative third test for --test unknown-arg The third test added in TDD red phase was speculative (warning numbers didn't match) and outside the scope of sprint 2's DoD. Sprint 2 only required the first two tests (FS0075 for --extraoptimizationloops and --typedtree) to pass. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Centralize warning emission in CompilerOptions.fs (#19576 follow-up) Introduce a local 'warningCmdLine' helper that consults tcConfigB.diagnosticsOptions via PhasedDiagnostic.AdjustSeverity before forwarding to warning/errorR/informationalWarning. This gives option parsing a second, local line of defense so future 'warning' callsites in CompilerOptions.fs cannot silently bypass --nowarn/--warnaserror even if the commit-time delayed-diagnostics wrapper is missing. - Thread TcConfigBuilder through ParseCompilerOptions (all 6 callers). - Thread TcConfigBuilder through CheckAndReportSourceFileDuplicates. - Route the three cowboy 'warning' callsites in CompilerOptions.fs (reportDeprecatedOption, --test unknown-arg, duplicate source file) through warningCmdLine. - Add a regression test for FS1063 (--test unknown sub-flag). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Consolidate command-line nowarn tests into Theory and add FS3551 case Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Remove warningCmdLine; use commit-time filtering only; add missing tests The emit-time warningCmdLine helper was order-dependent (only worked when --nowarn preceded the triggering option) and introduced a regression with --warnaserror+ (premature abort via errorR incrementing ErrorCount before --nowarn could take effect). Replace with commit-time filtering via GetDiagnosticsLoggerFilteringByScopedNowarn at the two sites in fsc.fs where CapturingDiagnosticsLogger replays captured diagnostics. This correctly applies all --nowarn/--warnaserror settings accumulated during the full option parsing pass. Revert ParseCompilerOptions and CheckAndReportSourceFileDuplicates signatures to their original forms (no TcConfigBuilder parameter needed). Add missing tests: - Baseline tests verifying warnings ARE emitted without --nowarn - --warnaserror+ with --nowarn interaction test Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Close test gaps: reverse-order, warnaserror baselines, specific warnaserror semantics Add tests identified by multi-model adversarial review: - Reverse-order test (--option before --nowarn) proves commit-time filtering works regardless of argument ordering - --warnaserror+ baseline proving warning is promoted to error - --warnaserror+ with --nowarn proving nowarn takes precedence (global) - --warnaserror:75 with --nowarn:75 documenting that specific warnaserror wins over --nowarn (AdjustSeverity uses localNowarn for specific, warnOff for global) 13 tests total, 0 duplication of test source code. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add mixed-code selectivity test for --nowarn precision Triggers both FS0075 and FS1063 simultaneously, suppresses only FS0075 via --nowarn:75, and asserts FS1063 still fires. Catches regressions where filtering accidentally drops all command-line warnings. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix case-sensitivity: track test file under fsc/ (lowercase) for Linux CI The file was tracked by git as CompilerOptions/Fsc/warn/ (uppercase) while the fsproj and all sibling files use lowercase fsc/. On case-sensitive Linux this caused FS0225 'source file not found'. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Address review: remove slop comments, add order-independence test - Remove type annotation restating what inference provides - Replace code-restating comments with WHY-comments - Add test: --nowarn before --warnaserror+ still suppresses Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Address review: trim duplicate tests, remove slop comments Remove mechanical test duplicates (15→7): drop Theory×3 testing same warn number with different triggers, drop duplicate withNoWarn vs raw --nowarn:N tests, drop redundant order-independence test. Move release notes to 11.0.100.md (VNEXT). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../.FSharp.Compiler.Service/11.0.100.md | 1 + src/Compiler/Driver/fsc.fs | 7 +- .../fsc/warn/nowarn_for_cmdline_warnings.fs | 78 +++++++++++++++++++ .../FSharp.Compiler.ComponentTests.fsproj | 1 + 4 files changed, 84 insertions(+), 3 deletions(-) create mode 100644 tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warn/nowarn_for_cmdline_warnings.fs diff --git a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md index a26f7e77ebe..7d4162f804e 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md +++ b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md @@ -1,5 +1,6 @@ ### Fixed +* Honor `--nowarn` and `--warnaserror` for warnings emitted during command-line option parsing ([Issue #19576](https://github.com/dotnet/fsharp/issues/19576), [PR #19776](https://github.com/dotnet/fsharp/pull/19776)) * Fix `[]` prefix attributes being silently dropped on class members, and fix false-positive `AllowMultiple=false` errors when `[]` and `[]` are applied to the same binding. ([Issue #17904](https://github.com/dotnet/fsharp/issues/17904), [Issue #19020](https://github.com/dotnet/fsharp/issues/19020), [PR #19738](https://github.com/dotnet/fsharp/pull/19738)) * Fix attributes on return type of unparenthesized tuple methods being silently dropped from IL. ([Issue #462](https://github.com/dotnet/fsharp/issues/462), [PR #19714](https://github.com/dotnet/fsharp/pull/19714)) * Fix internal error FS0073 "Undefined or unsolved type variable" in IlxGen when nested inline SRTP functions with multiple overloads leave unsolved typars in the non-witness codegen path. ([Issue #19709](https://github.com/dotnet/fsharp/issues/19709), [PR #19710](https://github.com/dotnet/fsharp/pull/19710)) diff --git a/src/Compiler/Driver/fsc.fs b/src/Compiler/Driver/fsc.fs index 3b6a3bfef18..1912f13ff71 100644 --- a/src/Compiler/Driver/fsc.fs +++ b/src/Compiler/Driver/fsc.fs @@ -119,10 +119,9 @@ type IDiagnosticsLoggerProvider = type CapturingDiagnosticsLogger with - /// Commit the delayed diagnostics via a fresh temporary logger of the right kind. member x.CommitDelayedDiagnostics(diagnosticsLoggerProvider: IDiagnosticsLoggerProvider, tcConfigB, exiter) = let diagnosticsLogger = diagnosticsLoggerProvider.CreateLogger(tcConfigB, exiter) - x.CommitDelayedDiagnostics diagnosticsLogger + x.CommitDelayedDiagnostics(GetDiagnosticsLoggerFilteringByScopedNowarn(tcConfigB.diagnosticsOptions, diagnosticsLogger)) /// The default DiagnosticsLogger implementation, reporting messages to the Console up to the maxerrors maximum type ConsoleLoggerProvider() = @@ -578,7 +577,9 @@ let main1 SetThreadDiagnosticsLoggerNoUnwind diagnosticsLogger // Forward all errors from flags - delayForFlagsLogger.CommitDelayedDiagnostics diagnosticsLogger + delayForFlagsLogger.CommitDelayedDiagnostics( + GetDiagnosticsLoggerFilteringByScopedNowarn(tcConfigB.diagnosticsOptions, diagnosticsLogger) + ) if not tcConfigB.continueAfterParseFailure then AbortOnError(diagnosticsLogger, exiter) diff --git a/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warn/nowarn_for_cmdline_warnings.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warn/nowarn_for_cmdline_warnings.fs new file mode 100644 index 00000000000..b6855e188db --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warn/nowarn_for_cmdline_warnings.fs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace CompilerOptions.Fsc + +open Xunit +open FSharp.Test +open FSharp.Test.Compiler + +/// Regression tests for https://github.com/dotnet/fsharp/issues/19576 +module ``Nowarn for command-line option warnings`` = + + [] + let ``command-line option warning is emitted`` () = + FSharp "module Module" + |> withOptions [ "--extraoptimizationloops:1" ] + |> ignoreWarnings + |> compile + |> shouldSucceed + |> withWarningCode 75 + |> ignore + + [] + let ``--nowarn suppresses command-line option warning`` () = + FSharp "module Module" + |> withOptions [ "--extraoptimizationloops:1"; "--nowarn:75" ] + |> compile + |> shouldSucceed + + [] + let ``--nowarn suppresses only the targeted warning`` () = + FSharp "module Module" + |> withOptions [ "--extraoptimizationloops:1"; "--test:NoSuchTestFlag"; "--nowarn:75" ] + |> ignoreWarnings + |> compile + |> shouldSucceed + |> withWarningCode 1063 + |> ignore + + [] + let ``--nowarn 3551 suppresses duplicate source file warning`` () = + let file = + SourceCodeFileKind.Fs( + { FileName = "test.fs" + SourceText = Some """printfn "Hello" """ } + ) + + fsFromString file + |> FS + |> asExe + |> withAdditionalSourceFile file + |> withNoWarn 3551 + |> compile + |> shouldSucceed + + [] + let ``--warnaserror+ promotes command-line option warning to error`` () = + FSharp "module Module" + |> withOptions [ "--warnaserror+"; "--extraoptimizationloops:1" ] + |> compile + |> shouldFail + |> withErrorCode 75 + |> ignore + + [] + let ``--warnaserror+ with --nowarn suppresses rather than errors`` () = + FSharp "module Module" + |> withOptions [ "--warnaserror+"; "--extraoptimizationloops:1"; "--nowarn:75" ] + |> compile + |> shouldSucceed + + [] + let ``--warnaserror 75 with --nowarn 75 still errors because specific warnaserror wins`` () = + FSharp "module Module" + |> withOptions [ "--warnaserror:75"; "--extraoptimizationloops:1"; "--nowarn:75" ] + |> compile + |> shouldFail + |> withErrorCode 75 + |> ignore diff --git a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj index 50937f9945b..dfc14e9ef4d 100644 --- a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj +++ b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj @@ -419,6 +419,7 @@ + From f6e1f42e6f183cca7e15e829b0ccd834dad0e437 Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Fri, 22 May 2026 10:26:06 +0200 Subject: [PATCH 07/72] Add CCR-OptOut review instruction (#19787) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/instructions/CcrOptout.instructions.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .github/instructions/CcrOptout.instructions.md diff --git a/.github/instructions/CcrOptout.instructions.md b/.github/instructions/CcrOptout.instructions.md new file mode 100644 index 00000000000..b1c20cf9e3e --- /dev/null +++ b/.github/instructions/CcrOptout.instructions.md @@ -0,0 +1,6 @@ +--- +applyTo: "**" +excludeAgent: "cloud-agent" +--- + +If the pull request you are reviewing has the label `CCR-OptOut`, stop any review, do not post any comment, immediately finish and ignore all other instructions for reviewing. From 957d614d4f375321e8ee442bf443a4afac765ec3 Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Fri, 22 May 2026 10:48:59 +0200 Subject: [PATCH 08/72] Switch CCR opt-out to check PR body for 'SKIP CCR REVIEW' (#19789) --- .github/instructions/CcrOptout.instructions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/instructions/CcrOptout.instructions.md b/.github/instructions/CcrOptout.instructions.md index b1c20cf9e3e..184c7a192b8 100644 --- a/.github/instructions/CcrOptout.instructions.md +++ b/.github/instructions/CcrOptout.instructions.md @@ -3,4 +3,4 @@ applyTo: "**" excludeAgent: "cloud-agent" --- -If the pull request you are reviewing has the label `CCR-OptOut`, stop any review, do not post any comment, immediately finish and ignore all other instructions for reviewing. +If the pull request body/description contains `SKIP CCR REVIEW`, stop any review, do not post any comment, immediately finish and ignore all other instructions for reviewing. From bdb847abccc2c0ac59daf5c8d14025249ac07ef7 Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Fri, 22 May 2026 13:37:28 +0200 Subject: [PATCH 09/72] Bump system versions (#19790) Update .NET SDK from 10.0.202 to 10.0.204. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- global.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/global.json b/global.json index fee65ff38ab..98c0fe4af4d 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "10.0.202", + "version": "10.0.204", "allowPrerelease": true, "paths": [ ".dotnet", @@ -12,7 +12,7 @@ "runner": "Microsoft.Testing.Platform" }, "tools": { - "dotnet": "10.0.202", + "dotnet": "10.0.204", "vs": { "version": "18.0", "components": [ From 1def9783df3d6d76962f8bfe7a2722149ea49c52 Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Tue, 26 May 2026 12:25:28 +0200 Subject: [PATCH 10/72] Fix nullness narrowing in match inside comprehensions (#19743) * Fix nullness narrowing for match inside seq/list/array comprehensions (#19644) Extract null-narrowing helper EliminateNullnessFromInputType from TcMatchClause and reuse it in TcSequenceExpression's SynExpr.Match handler so the input type is narrowed across clauses inside comprehensions, matching the behavior of plain match expressions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add release notes for #19644 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix test failures on net472: remove System.Collections.Immutable dependency The ImmutableHashSet.Builder type is not available in the net472 test compilation environment. Replace with string | null which tests the same nullness narrowing logic without requiring external assembly references. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../.FSharp.Compiler.Service/11.0.100.md | 1 + .../Checking/Expressions/CheckExpressions.fs | 67 ++++++++++--------- .../Checking/Expressions/CheckExpressions.fsi | 5 ++ .../Expressions/CheckSequenceExpressions.fs | 10 +-- .../Nullness/NullableRegressionTests.fs | 62 +++++++++++++++++ 5 files changed, 110 insertions(+), 35 deletions(-) diff --git a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md index 7d4162f804e..30ac0076a7d 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md +++ b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md @@ -3,6 +3,7 @@ * Honor `--nowarn` and `--warnaserror` for warnings emitted during command-line option parsing ([Issue #19576](https://github.com/dotnet/fsharp/issues/19576), [PR #19776](https://github.com/dotnet/fsharp/pull/19776)) * Fix `[]` prefix attributes being silently dropped on class members, and fix false-positive `AllowMultiple=false` errors when `[]` and `[]` are applied to the same binding. ([Issue #17904](https://github.com/dotnet/fsharp/issues/17904), [Issue #19020](https://github.com/dotnet/fsharp/issues/19020), [PR #19738](https://github.com/dotnet/fsharp/pull/19738)) * Fix attributes on return type of unparenthesized tuple methods being silently dropped from IL. ([Issue #462](https://github.com/dotnet/fsharp/issues/462), [PR #19714](https://github.com/dotnet/fsharp/pull/19714)) +* Fix false-positive nullness warning (FS3261) when pattern matching narrows nullness inside seq/list/array comprehensions. ([Issue #19644](https://github.com/dotnet/fsharp/issues/19644), [PR #19743](https://github.com/dotnet/fsharp/pull/19743)) * Fix internal error FS0073 "Undefined or unsolved type variable" in IlxGen when nested inline SRTP functions with multiple overloads leave unsolved typars in the non-witness codegen path. ([Issue #19709](https://github.com/dotnet/fsharp/issues/19709), [PR #19710](https://github.com/dotnet/fsharp/pull/19710)) * Fix NRE when calling virtual Object methods on value types through inline SRTP functions. ([Issue #8098](https://github.com/dotnet/fsharp/issues/8098), [PR #19511](https://github.com/dotnet/fsharp/pull/19511)) * Fix attributes not resolved from opened namespaces in `namespace rec` / `module rec` scopes. ([Issue #7931](https://github.com/dotnet/fsharp/issues/7931), [PR #19502](https://github.com/dotnet/fsharp/pull/19502)) diff --git a/src/Compiler/Checking/Expressions/CheckExpressions.fs b/src/Compiler/Checking/Expressions/CheckExpressions.fs index 6636901e460..1c647418480 100644 --- a/src/Compiler/Checking/Expressions/CheckExpressions.fs +++ b/src/Compiler/Checking/Expressions/CheckExpressions.fs @@ -4125,6 +4125,41 @@ let formatAvailableNames (names: string array) = let result = truncated |> String.concat ", " if names.Length > 5 then result + ", ..." else result +/// Given the current 'inputTy' of a match clause, the elaborated pattern, and the optional 'when' clause, +/// returns the (possibly narrowed) inputTy to use for subsequent clauses. +/// E.g. `match x with | null -> ... | y -> ...` narrows `inputTy` of the y-clause to non-null. +let EliminateNullnessFromInputType (g: TcGlobals) (inputTy: TType) (pat: Pattern) (whenExprOpt: Expr option) : TType = + let removeNull t = + // Strip type equations (including abbreviations) and set nullness to non-null. + // For type abbreviations like `type objnull = obj | null`, we need to expand + // the abbreviation and apply non-null to the underlying type. + let stripped = stripTyEqns g t + replaceNullnessOfTy KnownWithoutNull stripped + let rec isWild (p: Pattern) = + match p with + | TPat_wild _ -> true + | TPat_as (p,_,_) -> isWild p + | TPat_disjs(patterns,_) -> patterns |> List.exists isWild + | TPat_conjs(patterns,_) -> patterns |> List.forall isWild + | TPat_tuple (_,pats,_,_) -> pats |> List.forall isWild + | _ -> false + + let rec eliminateNull (ty: TType) (p: Pattern) = + match p with + | TPat_null _ -> removeNull ty + | TPat_as (p,_,_) -> eliminateNull ty p + | TPat_disjs(patterns,_) -> (ty,patterns) ||> List.fold eliminateNull + | TPat_tuple (_,pats,_,_) -> + match stripTyparEqns ty with + // In a tuple, if 1 elem is matched for null and the rest are wild => subsequent clauses can strip nullness + | TType_tuple(ti,tys) when tys.Length = pats.Length && (pats |> List.count (isWild >> not)) = 1 -> + TType_tuple(ti, List.map2 eliminateNull tys pats) + | _ -> ty + | _ -> ty + match whenExprOpt with + | None -> eliminateNull inputTy pat + | _ -> inputTy + //------------------------------------------------------------------------- // Checking types and type constraints //------------------------------------------------------------------------- @@ -10967,37 +11002,7 @@ and TcMatchClause cenv inputTy (resultTy: OverallTy) env isFirst tpenv synMatchC let target = TTarget(vspecs, resultExpr, None) - let inputTypeForNextPatterns= - let removeNull t = - // Strip type equations (including abbreviations) and set nullness to non-null. - // For type abbreviations like `type objnull = obj | null`, we need to expand - // the abbreviation and apply non-null to the underlying type. - let stripped = stripTyEqns cenv.g t - replaceNullnessOfTy KnownWithoutNull stripped - let rec isWild (p:Pattern) = - match p with - | TPat_wild _ -> true - | TPat_as (p,_,_) -> isWild p - | TPat_disjs(patterns,_) -> patterns |> List.exists isWild - | TPat_conjs(patterns,_) -> patterns |> List.forall isWild - | TPat_tuple (_,pats,_,_) -> pats |> List.forall isWild - | _ -> false - - let rec eliminateNull (ty:TType) (p:Pattern) = - match p with - | TPat_null _ -> removeNull ty - | TPat_as (p,_,_) -> eliminateNull ty p - | TPat_disjs(patterns,_) -> (ty,patterns) ||> List.fold eliminateNull - | TPat_tuple (_,pats,_,_) -> - match stripTyparEqns ty with - // In a tuple, if 1 elem is matched for null and the rest are wild => subsequent clauses can strip nullness - | TType_tuple(ti,tys) when tys.Length = pats.Length && (pats |> List.count (isWild >> not)) = 1 -> - TType_tuple(ti, List.map2 eliminateNull tys pats) - | _ -> ty - | _ -> ty - match whenExprOpt with - | None -> eliminateNull inputTy pat - | _ -> inputTy + let inputTypeForNextPatterns = EliminateNullnessFromInputType cenv.g inputTy pat whenExprOpt MatchClause(pat, whenExprOpt, target, patm), (tpenv,inputTypeForNextPatterns) diff --git a/src/Compiler/Checking/Expressions/CheckExpressions.fsi b/src/Compiler/Checking/Expressions/CheckExpressions.fsi index d8f801c7c5c..d99bfa88e18 100644 --- a/src/Compiler/Checking/Expressions/CheckExpressions.fsi +++ b/src/Compiler/Checking/Expressions/CheckExpressions.fsi @@ -721,6 +721,11 @@ val TcMatchPattern: tcTrueMatchClause: TcTrueMatchClause -> Pattern * Expr option * Val list * TcEnv * UnscopedTyparEnv +/// Given the current 'inputTy' of a match clause, the elaborated pattern, and the optional 'when' clause, +/// returns the (possibly narrowed) inputTy to use for subsequent clauses. +/// E.g. `match x with | null -> ... | y -> ...` narrows `inputTy` of the y-clause to non-null. +val EliminateNullnessFromInputType: g: TcGlobals -> inputTy: TType -> pat: Pattern -> whenExprOpt: Expr option -> TType + [] val (|BinOpExpr|_|): SynExpr -> (Ident * SynExpr * SynExpr) voption diff --git a/src/Compiler/Checking/Expressions/CheckSequenceExpressions.fs b/src/Compiler/Checking/Expressions/CheckSequenceExpressions.fs index f8eeb4da5c1..86bf635d58a 100644 --- a/src/Compiler/Checking/Expressions/CheckSequenceExpressions.fs +++ b/src/Compiler/Checking/Expressions/CheckSequenceExpressions.fs @@ -272,9 +272,9 @@ let TcSequenceExpression (cenv: TcFileState) env tpenv comp (overallTy: OverallT | SynExpr.Match(spMatch, expr, clauses, _m, _trivia) -> let inputExpr, inputTy, tpenv = TcExprOfUnknownType cenv env tpenv expr - let tclauses, tpenv = - (tpenv, clauses) - ||> List.mapFold (fun tpenv (SynMatchClause(pat, cond, innerComp, _, sp, _trivia) as clause) -> + let tclauses, (tpenv, _finalInputTy) = + ((tpenv, inputTy), clauses) + ||> List.mapFold (fun (tpenv, inputTy) (SynMatchClause(pat, cond, innerComp, _, sp, _trivia) as clause) -> let isTrueMatchClause = if clause.IsTrueMatchClause then TcTrueMatchClause.Yes @@ -290,7 +290,9 @@ let TcSequenceExpression (cenv: TcFileState) env tpenv comp (overallTy: OverallT | DebugPointAtTarget.No -> envinner let innerExpr, tpenv = tcSequenceExprBody envinner genOuterTy tpenv innerComp - MatchClause(patR, condR, TTarget(vspecs, innerExpr, None), patR.Range), tpenv) + + let nextInputTy = EliminateNullnessFromInputType cenv.g inputTy patR condR + MatchClause(patR, condR, TTarget(vspecs, innerExpr, None), patR.Range), (tpenv, nextInputTy)) let inputExprTy = tyOfExpr cenv.g inputExpr let inputExprMark = inputExpr.Range diff --git a/tests/FSharp.Compiler.ComponentTests/Language/Nullness/NullableRegressionTests.fs b/tests/FSharp.Compiler.ComponentTests/Language/Nullness/NullableRegressionTests.fs index bd3d90a8074..a7ff6c2e89b 100644 --- a/tests/FSharp.Compiler.ComponentTests/Language/Nullness/NullableRegressionTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/Language/Nullness/NullableRegressionTests.fs @@ -198,3 +198,65 @@ type C7 = |> shouldFail |> withDiagnostics [(Error 444, Line 7, Col 17, Line 7, Col 23, "The type of a field using the 'DefaultValue' attribute must admit default initialization, i.e. have 'null' as a proper value or be a struct type whose fields all admit default initialization. You can use 'DefaultValue(false)' to disable this check")] + +[] +let ``Issue 19644 - match-null narrowing inside list comprehension`` () = + FSharp """ +module M + +let lengths (xs: (string | null)[]) = [ + for x in xs do + match x with + | null -> () + | s -> yield s.Length +] +""" + |> withVersionAndCheckNulls ("preview", true) + |> compile + |> shouldSucceed + +[] +let ``Issue 19644 - match-null narrowing inside seq expression`` () = + FSharp """ +module M +let v (xs: (string | null) seq) = + seq { + for x in xs do + match x with + | null -> () + | y -> yield y.Length + } +""" + |> withVersionAndCheckNulls ("preview", true) + |> compile + |> shouldSucceed + +[] +let ``Issue 19644 - match-null narrowing inside array comprehension`` () = + FSharp """ +module M +let v (xs: (string | null)[]) = [| + for x in xs do + match x with + | null -> () + | y -> yield y.Length +|] +""" + |> withVersionAndCheckNulls ("preview", true) + |> compile + |> shouldSucceed + +[] +let ``Issue 19644 - match-null narrowing inside list comprehension (no for)`` () = + FSharp """ +module M + +let v (s: string | null) = [ + match s with + | null -> () + | x -> yield x.Length +] +""" + |> withVersionAndCheckNulls ("preview", true) + |> compile + |> shouldSucceed From 14ad911b3250e5003982334f15e9ef3d7175231e Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Tue, 26 May 2026 11:41:25 +0000 Subject: [PATCH 11/72] Narrow overload-error and symbol-use ranges to terminal identifier (#19505) * Narrow overload-error and symbol-use ranges to terminal identifier (#14284, #3920) --- .github/aw/actions-lock.json | 10 +- .../.FSharp.Compiler.Service/11.0.100.md | 1 + .../Checking/Expressions/CheckExpressions.fs | 81 +++--- src/Compiler/Checking/NameResolution.fs | 32 +- src/Compiler/Checking/NameResolution.fsi | 6 +- .../AccessibilityAnnotations/Basic/Basic.fs | 2 +- .../AttributeUsage/AttributeUsage.fs | 8 +- .../neg_invalid_constructor.fs.err.bsl | 6 +- .../OverloadResolutionErrorRangeTests.fs | 274 ++++++++++++++++++ .../FSharp.Compiler.ComponentTests.fsproj | 1 + .../ExperimentalAttributeCheckingTests.fs | 4 +- .../ObsoleteAttributeCheckingTests.fs | 37 +-- .../TypeChecker/TypeCheckerRecoveryTests.fs | 2 +- .../Language/DefaultInterfaceMemberTests.fs | 8 +- .../Language/TypeDirectedConversionTests.fs | 8 +- .../E_RigidTypeAnnotation03.bsl | 8 +- .../E_LeftToRightOverloadResolution01.bsl | 4 +- .../inference/E_OneTypeVariable03.bsl | 4 +- .../inference/E_OneTypeVariable03rec.bsl | 4 +- .../E_TwoDifferentTypeVariables01.bsl | 8 +- .../E_TwoDifferentTypeVariables01rec.bsl | 8 +- .../E_TwoDifferentTypeVariablesGen00.bsl | 6 +- .../E_TwoDifferentTypeVariablesGen00rec.bsl | 6 +- .../inference/E_TwoEqualTypeVariables02.bsl | 12 +- .../E_TwoEqualTypeVariables02rec.bsl | 12 +- .../E_LessThanDotOpenParen001.bsl | 4 +- .../E_Clashing_Values_in_AbstractClass01.bsl | 2 +- .../E_Clashing_Values_in_AbstractClass03.bsl | 4 +- .../E_Clashing_Values_in_AbstractClass04.bsl | 4 +- .../compilation.errors.output.bsl | 54 ++-- ...g_System.Convert.ToString.OverloadList.bsl | 4 +- ...ing.Graphics.DrawRectangleOverloadList.bsl | 4 +- ....Threading.Tasks.Task.Run.OverloadList.bsl | 12 +- .../neg_generic_known_argument_types.bsl | 2 +- .../overloads/neg_interface_generics.bsl | 2 +- .../overloads/neg_many_many_overloads.bsl | 8 +- .../overloads/neg_tupled_arguments.bsl | 4 +- tests/fsharp/typecheck/sigs/neg06.bsl | 2 +- tests/fsharp/typecheck/sigs/neg10.bsl | 8 +- tests/fsharp/typecheck/sigs/neg101.bsl | 70 ++--- tests/fsharp/typecheck/sigs/neg106.bsl | 8 +- tests/fsharp/typecheck/sigs/neg106.vsbsl | 8 +- tests/fsharp/typecheck/sigs/neg131.bsl | 2 +- tests/fsharp/typecheck/sigs/neg132.bsl | 2 +- tests/fsharp/typecheck/sigs/neg20.bsl | 10 +- tests/fsharp/typecheck/sigs/neg30.bsl | 4 +- tests/fsharp/typecheck/sigs/neg45.bsl | 14 +- tests/fsharp/typecheck/sigs/neg70.vsbsl | 4 +- 48 files changed, 542 insertions(+), 246 deletions(-) create mode 100644 tests/FSharp.Compiler.ComponentTests/ErrorMessages/OverloadResolutionErrorRangeTests.fs diff --git a/.github/aw/actions-lock.json b/.github/aw/actions-lock.json index 28a4adc4cef..e9fa20a8424 100644 --- a/.github/aw/actions-lock.json +++ b/.github/aw/actions-lock.json @@ -5,15 +5,15 @@ "version": "v8", "sha": "ed597411d8f924073f98dfc5c65a23a2325f34cd" }, - "actions/github-script@v9.0.0": { + "actions/github-script@v9": { "repo": "actions/github-script", - "version": "v9.0.0", + "version": "v9", "sha": "3a2844b7e9c422d3c10d287c895573f7108da1b3" }, - "github/gh-aw-actions/setup@v0.72.1": { + "github/gh-aw-actions/setup@v0.68.3": { "repo": "github/gh-aw-actions/setup", - "version": "v0.72.1", - "sha": "bc56a0cad2f450c562810785ef38649c04db812a" + "version": "v0.68.3", + "sha": "ba90f2186d7ad780ec640f364005fa24e797b360" }, "github/gh-aw/actions/setup@v0.67.2": { "repo": "github/gh-aw/actions/setup", diff --git a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md index 30ac0076a7d..5d0a107d4f1 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md +++ b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md @@ -6,6 +6,7 @@ * Fix false-positive nullness warning (FS3261) when pattern matching narrows nullness inside seq/list/array comprehensions. ([Issue #19644](https://github.com/dotnet/fsharp/issues/19644), [PR #19743](https://github.com/dotnet/fsharp/pull/19743)) * Fix internal error FS0073 "Undefined or unsolved type variable" in IlxGen when nested inline SRTP functions with multiple overloads leave unsolved typars in the non-witness codegen path. ([Issue #19709](https://github.com/dotnet/fsharp/issues/19709), [PR #19710](https://github.com/dotnet/fsharp/pull/19710)) * Fix NRE when calling virtual Object methods on value types through inline SRTP functions. ([Issue #8098](https://github.com/dotnet/fsharp/issues/8098), [PR #19511](https://github.com/dotnet/fsharp/pull/19511)) +* Narrow overload-resolution error ranges to the method name only instead of covering the entire expression. ([Issue #14284](https://github.com/dotnet/fsharp/issues/14284), [PR #19505](https://github.com/dotnet/fsharp/pull/19505)) * Fix attributes not resolved from opened namespaces in `namespace rec` / `module rec` scopes. ([Issue #7931](https://github.com/dotnet/fsharp/issues/7931), [PR #19502](https://github.com/dotnet/fsharp/pull/19502)) * Fix DU case names matching IWSAM member names no longer cause duplicate property entries. (Issue [#14321](https://github.com/dotnet/fsharp/issues/14321), [PR #19341](https://github.com/dotnet/fsharp/pull/19341)) * Fix DefaultAugmentation(false) duplicate entry in method table. (Issue [#16565](https://github.com/dotnet/fsharp/issues/16565), [PR #19341](https://github.com/dotnet/fsharp/pull/19341)) diff --git a/src/Compiler/Checking/Expressions/CheckExpressions.fs b/src/Compiler/Checking/Expressions/CheckExpressions.fs index 1c647418480..d3b1e26497f 100644 --- a/src/Compiler/Checking/Expressions/CheckExpressions.fs +++ b/src/Compiler/Checking/Expressions/CheckExpressions.fs @@ -6678,7 +6678,7 @@ and TcTyparExprThen (cenv: cenv) overallTy env tpenv synTypar m delayed = | [] -> delayed2 | _ -> DelayedDotLookup (rest, m2) :: delayed2 CallNameResolutionSink cenv.tcSink (ident.idRange, env.NameEnv, item, emptyTyparInst, ItemOccurrence.Use, env.AccessRights) - TcItemThen cenv overallTy env tpenv ([], item, mExprAndLongId, [], AfterResolution.DoNothing) (Some ty) delayed3 + TcItemThen cenv overallTy env tpenv ([], item, mExprAndLongId, ident.idRange, [], AfterResolution.DoNothing) (Some ty) delayed3 //TcLookupItemThen cenv overallTy env tpenv mObjExpr objExpr objExprTy delayed item mItem rest afterResolution | _ -> let (SynTypar(_, q, _)) = synTypar @@ -8667,7 +8667,7 @@ and TcNameOfExpr (cenv: cenv) env tpenv (synArg: SynExpr) = let nameResolutionResult = ResolveLongIdentAsExprAndComputeRange cenv.tcSink cenv.nameResolver (rangeOfLid longId) ad env.eNameResEnv typeNameResInfo longId None let resolvesAsExpr = match nameResolutionResult with - | Result (_, item, _, _, _ as res) + | Result (tinstEnclosing, item, mItem, mItemIdent, rest, afterRes) when (match item with | Item.DelegateCtor _ @@ -8678,7 +8678,7 @@ and TcNameOfExpr (cenv: cenv) env tpenv (synArg: SynExpr) = | _ -> true | _ -> true) -> let overallTy = match overallTyOpt with None -> MustEqual (NewInferenceType g) | Some t -> t - let _, _ = TcItemThen cenv overallTy env tpenv res None delayed + let _, _ = TcItemThen cenv overallTy env tpenv (tinstEnclosing, item, mItem, mItemIdent, rest, afterRes) None delayed true | _ -> false @@ -8905,18 +8905,18 @@ and TcLongIdentThen (cenv: cenv) (overallTy: OverallTy) env tpenv (SynLongIdent( let ad = env.eAccessRights let typeNameResInfo = GetLongIdentTypeNameInfo delayed - let nameResolutionResult = + let (tinstEnclosing, item, mItem, mItemIdent, rest, afterResolution) = let maybeAppliedArgExpr = DelayedItem.maybeAppliedArgForPreferExtensionOverProperty delayed ResolveLongIdentAsExprAndComputeRange cenv.tcSink cenv.nameResolver (rangeOfLid longId) ad env.eNameResEnv typeNameResInfo longId maybeAppliedArgExpr |> ForceRaise - TcItemThen cenv overallTy env tpenv nameResolutionResult None delayed + TcItemThen cenv overallTy env tpenv (tinstEnclosing, item, mItem, mItemIdent, rest, afterResolution) None delayed //------------------------------------------------------------------------- // Typecheck "item+projections" //------------------------------------------------------------------------- *) -// mItem is the textual range covered by the long identifiers that make up the item -and TcItemThen (cenv: cenv) (overallTy: OverallTy) env tpenv (tinstEnclosing, item, mItem, rest, afterResolution) staticTyOpt delayed = +// mItem = range of all resolved long-ident segments; mItemIdent = terminal ident only (for diagnostic ranges) +and TcItemThen (cenv: cenv) (overallTy: OverallTy) env tpenv (tinstEnclosing, item, mItem, mItemIdent, rest, afterResolution) staticTyOpt delayed = let delayed = delayRest rest mItem delayed match item with // x where x is a union case or active pattern result tag. @@ -8927,13 +8927,13 @@ and TcItemThen (cenv: cenv) (overallTy: OverallTy) env tpenv (tinstEnclosing, it TcTypeItemThen cenv overallTy env nm ty tpenv mItem tinstEnclosing delayed | Item.MethodGroup (methodName, minfos, _) -> - TcMethodItemThen cenv overallTy env item methodName minfos tpenv mItem afterResolution staticTyOpt delayed + TcMethodItemThen cenv overallTy env item methodName minfos tpenv mItem mItemIdent afterResolution staticTyOpt delayed | Item.Trait traitInfo -> TcTraitItemThen cenv overallTy env None traitInfo tpenv mItem delayed | Item.CtorGroup(nm, minfos) -> - TcCtorItemThen cenv overallTy env item nm minfos tinstEnclosing tpenv mItem afterResolution delayed + TcCtorItemThen cenv overallTy env item nm minfos tinstEnclosing tpenv mItem mItemIdent afterResolution delayed | Item.ImplicitOp(id, sln) -> TcImplicitOpItemThen cenv overallTy env id sln tpenv mItem delayed @@ -8945,7 +8945,7 @@ and TcItemThen (cenv: cenv) (overallTy: OverallTy) env tpenv (tinstEnclosing, it TcValueItemThen cenv overallTy env vref tpenv mItem afterResolution delayed | Item.Property (nm, pinfos, _) -> - TcPropertyItemThen cenv overallTy env nm pinfos tpenv mItem afterResolution staticTyOpt delayed + TcPropertyItemThen cenv overallTy env nm pinfos tpenv mItem mItemIdent afterResolution staticTyOpt delayed | Item.ILField finfo -> TcILFieldItemThen cenv overallTy env finfo tpenv mItem delayed @@ -9156,8 +9156,8 @@ and TcTypeItemThen (cenv: cenv) overallTy env nm ty tpenv mItem tinstEnclosing d let item = Item.Types(nm, [ty]) CallNameResolutionSink cenv.tcSink (mExprAndTypeArgs, env.NameEnv, item, emptyTyparInst, ItemOccurrence.Use, env.eAccessRights) let typeNameResInfo = GetLongIdentTypeNameInfo otherDelayed - let item, mItem, rest, afterResolution = ResolveExprDotLongIdentAndComputeRange cenv.tcSink cenv.nameResolver (unionRanges mExprAndTypeArgs mLongId) ad env.eNameResEnv ty longId typeNameResInfo IgnoreOverrides true None - TcItemThen cenv overallTy env tpenv ((argsOfAppTy g ty), item, mItem, rest, afterResolution) None otherDelayed + let item, mItem, mItemIdent, rest, afterResolution = ResolveExprDotLongIdentAndComputeRange cenv.tcSink cenv.nameResolver (unionRanges mExprAndTypeArgs mLongId) ad env.eNameResEnv ty longId typeNameResInfo IgnoreOverrides true None + TcItemThen cenv overallTy env tpenv ((argsOfAppTy g ty), item, mItem, mItemIdent, rest, afterResolution) None otherDelayed | DelayedTypeApp(tyargs, _mTypeArgs, mExprAndTypeArgs) :: _delayed' -> // A case where we have an incomplete name e.g. 'Foo.' - we still want to report it to VS! @@ -9177,13 +9177,13 @@ and TcTypeItemThen (cenv: cenv) overallTy env nm ty tpenv mItem tinstEnclosing d else error(Error(FSComp.SR.tcInvalidUseOfTypeName(), mItem)) -and TcMethodItemThen (cenv: cenv) overallTy env item methodName minfos tpenv mItem afterResolution staticTyOpt delayed = +and TcMethodItemThen (cenv: cenv) overallTy env item methodName minfos tpenv mItem mItemIdent afterResolution staticTyOpt delayed = let ad = env.eAccessRights // Static method calls Type.Foo(arg1, ..., argn) let meths = List.map (fun minfo -> minfo, None) minfos match delayed with | DelayedApp (atomicFlag, _, _, arg, mExprAndArg) :: otherDelayed -> - TcMethodApplicationThen cenv env overallTy None tpenv None [] mExprAndArg mItem methodName ad NeverMutates false meths afterResolution NormalValUse [arg] atomicFlag staticTyOpt otherDelayed + TcMethodApplicationThen cenv env overallTy None tpenv None [] mExprAndArg mItemIdent methodName ad NeverMutates false meths afterResolution NormalValUse [arg] atomicFlag staticTyOpt otherDelayed | DelayedTypeApp(tys, mTypeArgs, mExprAndTypeArgs) :: otherDelayed -> @@ -9197,9 +9197,9 @@ and TcMethodItemThen (cenv: cenv) overallTy env item methodName minfos tpenv mIt match otherDelayed with | DelayedApp(atomicFlag, _, _, arg, mExprAndArg) :: otherDelayed -> - TcMethodApplicationThen cenv env overallTy None tpenv None [] mExprAndArg mItem methodName ad NeverMutates false [(minfoAfterStaticArguments, None)] afterResolution NormalValUse [arg] atomicFlag staticTyOpt otherDelayed + TcMethodApplicationThen cenv env overallTy None tpenv None [] mExprAndArg mItemIdent methodName ad NeverMutates false [(minfoAfterStaticArguments, None)] afterResolution NormalValUse [arg] atomicFlag staticTyOpt otherDelayed | _ -> - TcMethodApplicationThen cenv env overallTy None tpenv None [] mExprAndTypeArgs mItem methodName ad NeverMutates false [(minfoAfterStaticArguments, None)] afterResolution NormalValUse [] ExprAtomicFlag.Atomic staticTyOpt otherDelayed + TcMethodApplicationThen cenv env overallTy None tpenv None [] mExprAndTypeArgs mItemIdent methodName ad NeverMutates false [(minfoAfterStaticArguments, None)] afterResolution NormalValUse [] ExprAtomicFlag.Atomic staticTyOpt otherDelayed | None -> #endif @@ -9213,18 +9213,18 @@ and TcMethodItemThen (cenv: cenv) overallTy env item methodName minfos tpenv mIt match otherDelayed with | DelayedApp(atomicFlag, _, _, arg, mExprAndArg) :: otherDelayed -> - TcMethodApplicationThen cenv env overallTy None tpenv (Some tyargs) [] mExprAndArg mItem methodName ad NeverMutates false meths afterResolution NormalValUse [arg] atomicFlag staticTyOpt otherDelayed + TcMethodApplicationThen cenv env overallTy None tpenv (Some tyargs) [] mExprAndArg mItemIdent methodName ad NeverMutates false meths afterResolution NormalValUse [arg] atomicFlag staticTyOpt otherDelayed | _ -> - TcMethodApplicationThen cenv env overallTy None tpenv (Some tyargs) [] mExprAndTypeArgs mItem methodName ad NeverMutates false meths afterResolution NormalValUse [] ExprAtomicFlag.Atomic staticTyOpt otherDelayed + TcMethodApplicationThen cenv env overallTy None tpenv (Some tyargs) [] mExprAndTypeArgs mItemIdent methodName ad NeverMutates false meths afterResolution NormalValUse [] ExprAtomicFlag.Atomic staticTyOpt otherDelayed | _ -> #if !NO_TYPEPROVIDERS if not minfos.IsEmpty && minfos[0].ProvidedStaticParameterInfo.IsSome then error(Error(FSComp.SR.etMissingStaticArgumentsToMethod(), mItem)) #endif - TcMethodApplicationThen cenv env overallTy None tpenv None [] mItem mItem methodName ad NeverMutates false meths afterResolution NormalValUse [] ExprAtomicFlag.Atomic staticTyOpt delayed + TcMethodApplicationThen cenv env overallTy None tpenv None [] mItem mItemIdent methodName ad NeverMutates false meths afterResolution NormalValUse [] ExprAtomicFlag.Atomic staticTyOpt delayed -and TcCtorItemThen (cenv: cenv) overallTy env item nm minfos tinstEnclosing tpenv mItem afterResolution delayed = +and TcCtorItemThen (cenv: cenv) overallTy env item nm minfos tinstEnclosing tpenv mItem mItemIdent afterResolution delayed = #if !NO_TYPEPROVIDERS let g = cenv.g let ad = env.eAccessRights @@ -9238,7 +9238,7 @@ and TcCtorItemThen (cenv: cenv) overallTy env item nm minfos tinstEnclosing tpen | DelayedApp(_, _, _, arg, mExprAndArg) :: otherDelayed -> CallExprHasTypeSink cenv.tcSink (mExprAndArg, env.NameEnv, objTy, env.eAccessRights) - TcCtorCall true cenv env tpenv overallTy objTy (Some mItem) item false [arg] mExprAndArg otherDelayed (Some afterResolution) + TcCtorCall true cenv env tpenv overallTy objTy (Some mItemIdent) item false [arg] mExprAndArg otherDelayed (Some afterResolution) | DelayedTypeApp(tyargs, _mTypeArgs, mExprAndTypeArgs) :: DelayedApp(_, _, _, arg, mExprAndArg) :: otherDelayed -> @@ -9259,7 +9259,7 @@ and TcCtorItemThen (cenv: cenv) overallTy env item nm minfos tinstEnclosing tpen item, minfos minfosAfterTyArgs |> List.iter (fun minfo -> UnifyTypes cenv env mExprAndTypeArgs minfo.ApparentEnclosingType objTyAfterTyArgs) - TcCtorCall true cenv env tpenv overallTy objTyAfterTyArgs (Some mExprAndTypeArgs) itemAfterTyArgs false [arg] mExprAndArg otherDelayed (Some afterResolution) + TcCtorCall true cenv env tpenv overallTy objTyAfterTyArgs (Some mItemIdent) itemAfterTyArgs false [arg] mExprAndArg otherDelayed (Some afterResolution) | DelayedTypeApp(tyargs, _mTypeArgs, mExprAndTypeArgs) :: otherDelayed -> @@ -9270,11 +9270,11 @@ and TcCtorItemThen (cenv: cenv) overallTy env item nm minfos tinstEnclosing tpen CallNameResolutionSink cenv.tcSink (mExprAndTypeArgs, env.NameEnv, resolvedItem, emptyTyparInst, ItemOccurrence.Use, env.eAccessRights) minfos |> List.iter (fun minfo -> UnifyTypes cenv env mExprAndTypeArgs minfo.ApparentEnclosingType objTy) - TcCtorCall true cenv env tpenv overallTy objTy (Some mExprAndTypeArgs) item false [] mExprAndTypeArgs otherDelayed (Some afterResolution) + TcCtorCall true cenv env tpenv overallTy objTy (Some mItemIdent) item false [] mExprAndTypeArgs otherDelayed (Some afterResolution) | _ -> - TcCtorCall true cenv env tpenv overallTy objTy (Some mItem) item false [] mItem delayed (Some afterResolution) + TcCtorCall true cenv env tpenv overallTy objTy (Some mItemIdent) item false [] mItem delayed (Some afterResolution) and TcTraitItemThen (cenv: cenv) overallTy env objOpt traitInfo tpenv mItem delayed = let g = cenv.g @@ -9580,7 +9580,7 @@ and TcValueItemThen cenv overallTy env vref tpenv mItem afterResolution delayed PropagateThenTcDelayed cenv overallTy env tpenv mItem vexpFlex vexpFlex.Type ExprAtomicFlag.Atomic delayed -and TcPropertyItemThen cenv overallTy env nm pinfos tpenv mItem afterResolution staticTyOpt delayed = +and TcPropertyItemThen cenv overallTy env nm pinfos tpenv mItem mItemIdent afterResolution staticTyOpt delayed = let g = cenv.g let ad = env.eAccessRights @@ -9618,19 +9618,19 @@ and TcPropertyItemThen cenv overallTy env nm pinfos tpenv mItem afterResolution // x.P <- ... byref setter if isNil meths then error (Error (FSComp.SR.tcPropertyIsNotReadable nm, mItem)) - TcMethodApplicationThen cenv env overallTy None tpenv tyArgsOpt [] mItem mItem nm ad NeverMutates true meths afterResolution NormalValUse args ExprAtomicFlag.Atomic staticTyOpt delayed + TcMethodApplicationThen cenv env overallTy None tpenv tyArgsOpt [] mItem mItemIdent nm ad NeverMutates true meths afterResolution NormalValUse args ExprAtomicFlag.Atomic staticTyOpt delayed else let args = if pinfo.IsIndexer then args else [] if isNil meths then errorR (Error (FSComp.SR.tcPropertyCannotBeSet1 nm, mItem)) // Note: static calls never mutate a struct object argument - TcMethodApplicationThen cenv env overallTy None tpenv tyArgsOpt [] mStmt mItem nm ad NeverMutates true meths afterResolution NormalValUse (args@[expr2]) ExprAtomicFlag.NonAtomic staticTyOpt otherDelayed + TcMethodApplicationThen cenv env overallTy None tpenv tyArgsOpt [] mStmt mItemIdent nm ad NeverMutates true meths afterResolution NormalValUse (args@[expr2]) ExprAtomicFlag.NonAtomic staticTyOpt otherDelayed | _ -> // Static Property Get (possibly indexer) let meths = pinfos |> GettersOfPropInfos if isNil meths then error (Error (FSComp.SR.tcPropertyIsNotReadable nm, mItem)) // Note: static calls never mutate a struct object argument - TcMethodApplicationThen cenv env overallTy None tpenv tyArgsOpt [] mItem mItem nm ad NeverMutates true meths afterResolution NormalValUse args ExprAtomicFlag.Atomic staticTyOpt delayed + TcMethodApplicationThen cenv env overallTy None tpenv tyArgsOpt [] mItem mItemIdent nm ad NeverMutates true meths afterResolution NormalValUse args ExprAtomicFlag.Atomic staticTyOpt delayed and TcILFieldItemThen cenv overallTy env finfo tpenv mItem delayed = let g = cenv.g @@ -9756,10 +9756,10 @@ and TcLookupThen cenv overallTy env tpenv mObjExpr objExpr objExprTy longId dela CanonicalizePartialInferenceProblem cenv.css env.DisplayEnv mExprAndLongId (freeInTypeLeftToRight g false objExprTy) let maybeAppliedArgExpr = DelayedItem.maybeAppliedArgForPreferExtensionOverProperty delayed - let item, mItem, rest, afterResolution = ResolveExprDotLongIdentAndComputeRange cenv.tcSink cenv.nameResolver mExprAndLongId ad env.NameEnv objExprTy longId TypeNameResolutionInfo.Default findFlag false maybeAppliedArgExpr - TcLookupItemThen cenv overallTy env tpenv mObjExpr objExpr objExprTy delayed item mItem rest afterResolution + let item, mItem, mItemIdent, rest, afterResolution = ResolveExprDotLongIdentAndComputeRange cenv.tcSink cenv.nameResolver mExprAndLongId ad env.NameEnv objExprTy longId TypeNameResolutionInfo.Default findFlag false maybeAppliedArgExpr + TcLookupItemThen cenv overallTy env tpenv mObjExpr objExpr objExprTy delayed item mItem mItemIdent rest afterResolution -and TcLookupItemThen cenv overallTy env tpenv mObjExpr objExpr objExprTy delayed item mItem rest afterResolution = +and TcLookupItemThen cenv overallTy env tpenv mObjExpr objExpr objExprTy delayed item mItem mItemIdent rest afterResolution = let g = cenv.g let ad = env.eAccessRights let objArgs = [objExpr] @@ -9785,7 +9785,7 @@ and TcLookupItemThen cenv overallTy env tpenv mObjExpr objExpr objExprTy delayed let item = Item.MethodGroup(methodName, [minfoAfterStaticArguments], Some minfos[0]) CallNameResolutionSinkReplacing cenv.tcSink (mExprAndItem, env.NameEnv, item, [], ItemOccurrence.Use, env.eAccessRights) - TcMethodApplicationThen cenv env overallTy None tpenv None objArgs mExprAndItem mItem methodName ad mutates false [(minfoAfterStaticArguments, None)] afterResolution NormalValUse args atomicFlag None delayed + TcMethodApplicationThen cenv env overallTy None tpenv None objArgs mExprAndItem mItemIdent methodName ad mutates false [(minfoAfterStaticArguments, None)] afterResolution NormalValUse args atomicFlag None delayed | None -> if not minfos.IsEmpty && minfos[0].ProvidedStaticParameterInfo.IsSome then error(Error(FSComp.SR.etMissingStaticArgumentsToMethod(), mItem)) @@ -9794,7 +9794,7 @@ and TcLookupItemThen cenv overallTy env tpenv mObjExpr objExpr objExprTy delayed let tyArgsOpt, tpenv = TcMemberTyArgsOpt cenv env tpenv tyArgsOpt let meths = minfos |> List.map (fun minfo -> minfo, None) - TcMethodApplicationThen cenv env overallTy None tpenv tyArgsOpt objArgs mExprAndItem mItem methodName ad mutates false meths afterResolution NormalValUse args atomicFlag None delayed + TcMethodApplicationThen cenv env overallTy None tpenv tyArgsOpt objArgs mExprAndItem mItemIdent methodName ad mutates false meths afterResolution NormalValUse args atomicFlag None delayed | Item.Property (nm, pinfos, _) -> // Instance property @@ -9822,7 +9822,7 @@ and TcLookupItemThen cenv overallTy env tpenv mObjExpr objExpr objExprTy delayed errorR (Error (FSComp.SR.tcPropertyCannotBeSet1 nm, mItem)) // x.P <- ... byref setter if isNil meths then error (Error (FSComp.SR.tcPropertyIsNotReadable nm, mItem)) - TcMethodApplicationThen cenv env overallTy None tpenv tyArgsOpt objArgs mExprAndItem mItem nm ad PossiblyMutates true meths afterResolution NormalValUse args atomicFlag None delayed + TcMethodApplicationThen cenv env overallTy None tpenv tyArgsOpt objArgs mExprAndItem mItemIdent nm ad PossiblyMutates true meths afterResolution NormalValUse args atomicFlag None delayed else if g.langVersion.SupportsFeature(LanguageFeature.RequiredPropertiesSupport) && pinfo.IsSetterInitOnly then @@ -9830,12 +9830,12 @@ and TcLookupItemThen cenv overallTy env tpenv mObjExpr objExpr objExprTy delayed let args = if pinfo.IsIndexer then args else [] let mut = (if isStructTy g (tyOfExpr g objExpr) then DefinitelyMutates else PossiblyMutates) - TcMethodApplicationThen cenv env overallTy None tpenv tyArgsOpt objArgs mStmt mItem nm ad mut true meths afterResolution NormalValUse (args @ [expr2]) atomicFlag None [] + TcMethodApplicationThen cenv env overallTy None tpenv tyArgsOpt objArgs mStmt mItemIdent nm ad mut true meths afterResolution NormalValUse (args @ [expr2]) atomicFlag None [] | _ -> // Instance property getter let meths = GettersOfPropInfos pinfos if isNil meths then error (Error (FSComp.SR.tcPropertyIsNotReadable nm, mItem)) - TcMethodApplicationThen cenv env overallTy None tpenv tyArgsOpt objArgs mExprAndItem mItem nm ad PossiblyMutates true meths afterResolution NormalValUse args atomicFlag None delayed + TcMethodApplicationThen cenv env overallTy None tpenv tyArgsOpt objArgs mExprAndItem mItemIdent nm ad PossiblyMutates true meths afterResolution NormalValUse args atomicFlag None delayed | Item.RecdField rfinfo -> // Get or set instance F# field or literal @@ -9995,7 +9995,7 @@ and TcMethodApplicationThen callerTyArgs // The return type of the overall expression including "delayed" objArgs // The 'obj' arguments in obj.M(...) and obj.M, if any m // The range of the object argument or whole application. We immediately union this with the range of the arguments - mItem // The range of the item that resolved to the method name + mItem // The range of the terminal identifier that resolved to the method name methodName // string, name of the method ad // accessibility rights of the caller mut // what do we know/assume about whether this method will mutate or not? @@ -10498,6 +10498,13 @@ and TcMethodApplication let result, errors = ResolveOverloadingForCall denv cenv.css mMethExpr methodName callerArgs ad postArgumentTypeCheckingCalledMethGroup true returnTy + // #14284 - mItem already carries the narrow terminal-identifier range, so rewrap to it + let errors = + match errors with + | ErrorResult(warns, UnresolvedOverloading(denvErr, callerArgsErr, failure, _mWide)) -> + ErrorResult(warns, UnresolvedOverloading(denvErr, callerArgsErr, failure, mItem)) + | other -> other + match afterResolution, result with | AfterResolution.DoNothing, _ -> () diff --git a/src/Compiler/Checking/NameResolution.fs b/src/Compiler/Checking/NameResolution.fs index c2ff7d12589..b9b35bad26f 100644 --- a/src/Compiler/Checking/NameResolution.fs +++ b/src/Compiler/Checking/NameResolution.fs @@ -4200,13 +4200,19 @@ let private ResolveExprDotLongIdent (ncenv: NameResolver) m ad nenv ty (id: Iden ForceRaise adhocDotSearchAccessible let ComputeItemRange wholem (lid: Ident list) rest = - match rest with - | [] -> wholem - | _ -> - let ids = List.truncate (max 0 (lid.Length - rest.Length)) lid - match ids with + let itemRange = + match rest with | [] -> wholem - | _ -> rangeOfLid ids + | _ -> + let ids = List.truncate (max 0 (lid.Length - rest.Length)) lid + match ids with + | [] -> wholem + | _ -> rangeOfLid ids + let itemIdentRange = + match rest, lid with + | [], _ :: _ -> (List.last lid).idRange + | _ -> itemRange + itemRange, itemIdentRange /// Filters method groups that will be sent to Visual Studio IntelliSense /// to include only static/instance members @@ -4254,7 +4260,7 @@ let ResolveLongIdentAsExprAndComputeRange (sink: TcResultsSink) (ncenv: NameReso match ResolveExprLongIdent sink ncenv wholem ad nenv typeNameResInfo lid maybeAppliedArgExpr with | Exception e -> Exception e | Result (tinstEnclosing, item1, rest) -> - let itemRange = ComputeItemRange wholem lid rest + let itemRange, itemIdentRange = ComputeItemRange wholem lid rest let item = FilterMethodGroups ncenv itemRange item1 true @@ -4313,7 +4319,7 @@ let ResolveLongIdentAsExprAndComputeRange (sink: TcResultsSink) (ncenv: NameReso callSink (item, emptyTyparInst) AfterResolution.DoNothing - success (tinstEnclosing, item, itemRange, rest, afterResolution) + success (tinstEnclosing, item, itemRange, itemIdentRange, rest, afterResolution) [] let (|NonOverridable|_|) namedItem = @@ -4331,11 +4337,11 @@ let ResolveExprDotLongIdentAndComputeRange (sink: TcResultsSink) (ncenv: NameRes | id :: rest -> ResolveExprDotLongIdent ncenv wholem ad nenv ty id rest typeNameResInfo findFlag maybeAppliedArgExpr | _ -> error(InternalError("ResolveExprDotLongIdentAndComputeRange", wholem)) - let itemRange = ComputeItemRange wholem lid rest - resInfo, item, rest, itemRange + let itemRange, itemIdentRange = ComputeItemRange wholem lid rest + resInfo, item, rest, itemRange, itemIdentRange // "true" resolution - let resInfo, item, rest, itemRange = resolveExpr findFlag + let resInfo, item, rest, itemRange, itemIdentRange = resolveExpr findFlag ResolutionInfo.SendEntityPathToSink(sink, ncenv, nenv, ItemOccurrence.Use, ad, resInfo, ResultTyparChecker(fun () -> CheckAllTyparsInferrable ncenv.amap itemRange item)) // Record the precise resolution of the field for intellisense/goto definition @@ -4350,7 +4356,7 @@ let ResolveExprDotLongIdentAndComputeRange (sink: TcResultsSink) (ncenv: NameRes | _, NonOverridable() -> item, itemRange, false | FindMemberFlag.IgnoreOverrides, _ | FindMemberFlag.DiscardOnFirstNonOverride, _ -> - let _, item, _, itemRange = resolveExpr FindMemberFlag.PreferOverrides + let _, item, _, itemRange, _ = resolveExpr FindMemberFlag.PreferOverrides item, itemRange, true let callSink (refinedItem, tpinst) = @@ -4383,7 +4389,7 @@ let ResolveExprDotLongIdentAndComputeRange (sink: TcResultsSink) (ncenv: NameRes callSink (unrefinedItem, emptyTyparInst) AfterResolution.DoNothing - item, itemRange, rest, afterResolution + item, itemRange, itemIdentRange, rest, afterResolution //------------------------------------------------------------------------- diff --git a/src/Compiler/Checking/NameResolution.fsi b/src/Compiler/Checking/NameResolution.fsi index 041d2d64f3e..1dc02a2245b 100755 --- a/src/Compiler/Checking/NameResolution.fsi +++ b/src/Compiler/Checking/NameResolution.fsi @@ -878,6 +878,7 @@ val internal ResolvePartialLongIdentToClassOrRecdFields: val internal ResolveRecordOrClassFieldsOfType: NameResolver -> range -> AccessorDomain -> TType -> bool -> Item list /// Resolve a long identifier occurring in an expression position. +/// Also returns the terminal identifier range for error diagnostics (#14284). val internal ResolveLongIdentAsExprAndComputeRange: sink: TcResultsSink -> ncenv: NameResolver -> @@ -887,9 +888,10 @@ val internal ResolveLongIdentAsExprAndComputeRange: typeNameResInfo: TypeNameResolutionInfo -> lid: Ident list -> maybeAppliedArgExpr: SynExpr option -> - ResultOrException + ResultOrException /// Resolve a long identifier occurring in an expression position, qualified by a type. +/// Also returns the terminal identifier range for error diagnostics (#14284). val internal ResolveExprDotLongIdentAndComputeRange: sink: TcResultsSink -> ncenv: NameResolver -> @@ -902,7 +904,7 @@ val internal ResolveExprDotLongIdentAndComputeRange: findFlag: FindMemberFlag -> staticOnly: bool -> maybeAppliedArgExpr: SynExpr option -> - Item * range * Ident list * AfterResolution + Item * range * range * Ident list * AfterResolution /// A generator of type instantiations used when no more specific type instantiation is known. val FakeInstantiationGenerator: range -> Typar list -> TType list diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/AccessibilityAnnotations/Basic/Basic.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/AccessibilityAnnotations/Basic/Basic.fs index 869e4ba9930..f76552ba8d9 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/AccessibilityAnnotations/Basic/Basic.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/AccessibilityAnnotations/Basic/Basic.fs @@ -129,7 +129,7 @@ module AccessibilityAnnotations_Basic = |> verifyCompile |> shouldFail |> withDiagnostics [ - (Error 629, Line 11, Col 24, Line 11, Col 41, "Method 'MemberwiseClone' is not accessible from this code location") + (Error 629, Line 11, Col 26, Line 11, Col 41, "Method 'MemberwiseClone' is not accessible from this code location") ] //SOURCE=E_MoreAccessibleBaseClass01.fs # E_MoreAccessibleBaseClass01.fs diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/AttributeUsage/AttributeUsage.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/AttributeUsage/AttributeUsage.fs index df6dca7e61e..e962f16e6de 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/AttributeUsage/AttributeUsage.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/AttributeUsage/AttributeUsage.fs @@ -268,9 +268,9 @@ module CustomAttributes_AttributeUsage = |> verifyCompile |> shouldFail |> withDiagnostics [ - (Error 685, Line 14, Col 1, Line 14, Col 6, "The generic function 'Foo' must be given explicit type argument(s)") - (Error 685, Line 26, Col 1, Line 26, Col 6, "The generic function 'Foo' must be given explicit type argument(s)") - (Error 685, Line 28, Col 1, Line 28, Col 6, "The generic function 'Foo' must be given explicit type argument(s)") + (Error 685, Line 14, Col 3, Line 14, Col 6, "The generic function 'Foo' must be given explicit type argument(s)") + (Error 685, Line 26, Col 3, Line 26, Col 6, "The generic function 'Foo' must be given explicit type argument(s)") + (Error 685, Line 28, Col 3, Line 28, Col 6, "The generic function 'Foo' must be given explicit type argument(s)") ] // SOURCE=E_RequiresExplicitTypeArguments02.fs SCFLAGS="--test:ErrorRanges" # E_RequiresExplicitTypeArguments02.fs @@ -280,7 +280,7 @@ module CustomAttributes_AttributeUsage = |> verifyCompile |> shouldFail |> withDiagnostics [ - (Error 685, Line 20, Col 5, Line 20, Col 10, "The generic function 'Foo' must be given explicit type argument(s)") + (Error 685, Line 20, Col 7, Line 20, Col 10, "The generic function 'Foo' must be given explicit type argument(s)") ] // SOURCE=E_WithBitwiseOr01.fsx SCFLAGS="--test:ErrorRanges -a" # E_WithBitwiseOr01.fsx diff --git a/tests/FSharp.Compiler.ComponentTests/ConstraintSolver/neg_invalid_constructor.fs.err.bsl b/tests/FSharp.Compiler.ComponentTests/ConstraintSolver/neg_invalid_constructor.fs.err.bsl index 960310bbe1c..aaeef693be3 100644 --- a/tests/FSharp.Compiler.ComponentTests/ConstraintSolver/neg_invalid_constructor.fs.err.bsl +++ b/tests/FSharp.Compiler.ComponentTests/ConstraintSolver/neg_invalid_constructor.fs.err.bsl @@ -1,18 +1,18 @@ -neg_invalid_constructor.fs (3,29)-(3,56) typecheck error A unique overload for method 'ImmutableStack`1' could not be determined based on type information prior to this program point. A type annotation may be needed. +neg_invalid_constructor.fs (3,29)-(3,43) typecheck error A unique overload for method 'ImmutableStack`1' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: 'a list Candidates: - new: col: 'b -> ImmutableStack<'a> - private new: items: 'a list -> ImmutableStack<'a> -neg_invalid_constructor.fs (4,93)-(4,111) typecheck error A unique overload for method 'ImmutableStack`1' could not be determined based on type information prior to this program point. A type annotation may be needed. +neg_invalid_constructor.fs (4,93)-(4,107) typecheck error A unique overload for method 'ImmutableStack`1' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: 'a list Candidates: - new: col: 'b -> ImmutableStack<'a> - private new: items: 'a list -> ImmutableStack<'a> -neg_invalid_constructor.fs (7,30)-(7,60) typecheck error A unique overload for method 'ImmutableStack`1' could not be determined based on type information prior to this program point. A type annotation may be needed. +neg_invalid_constructor.fs (7,30)-(7,44) typecheck error A unique overload for method 'ImmutableStack`1' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: 'a list diff --git a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/OverloadResolutionErrorRangeTests.fs b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/OverloadResolutionErrorRangeTests.fs new file mode 100644 index 00000000000..95d45931a16 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/OverloadResolutionErrorRangeTests.fs @@ -0,0 +1,274 @@ +module ErrorMessages.OverloadResolutionErrorRangeTests + +open Xunit +open FSharp.Test.Compiler + +// https://github.com/dotnet/fsharp/issues/14284 +[] +let ``Issue 14284 - overload error should cover only method name, not full expression`` () = + FSharp + """ +type T() = + static member Instance = T() + + member _.Method(_: double) = () + member _.Method(_: int) = () + +T.Instance.Method("") + """ + |> typecheck + |> shouldFail + |> withDiagnostics + [ (Error 41, Line 8, Col 12, Line 8, Col 18, "No overloads match for method 'Method'. + +Known type of argument: string + +Available overloads: + - member T.Method: double -> unit // Argument at index 1 doesn't match + - member T.Method: int -> unit // Argument at index 1 doesn't match") ] + +[] +let ``Issue 14284 - overload error for simple static method`` () = + FSharp + """ +type T() = + static member Method(_: double) = () + static member Method(_: int) = () + +T.Method("") + """ + |> typecheck + |> shouldFail + |> withDiagnostics + [ (Error 41, Line 6, Col 3, Line 6, Col 9, "No overloads match for method 'Method'. + +Known type of argument: string + +Available overloads: + - static member T.Method: double -> unit // Argument at index 1 doesn't match + - static member T.Method: int -> unit // Argument at index 1 doesn't match") ] + +[] +let ``Issue 14284 - overload error on chained expression`` () = + FSharp + """ +type T() = + static member Instance = T() + + member _.Next = T() + member _.Method(_: double) = () + member _.Method(_: int) = () + +T.Instance.Next.Next.Method("") + """ + |> typecheck + |> shouldFail + |> withDiagnostics + [ (Error 41, Line 9, Col 22, Line 9, Col 28, "No overloads match for method 'Method'. + +Known type of argument: string + +Available overloads: + - member T.Method: double -> unit // Argument at index 1 doesn't match + - member T.Method: int -> unit // Argument at index 1 doesn't match") ] + +[] +let ``Issue 14284 - overload error with lambda argument`` () = + FSharp + """ +type T() = + static member Instance = T() + + member _.Method(_: double) = () + member _.Method(_: int) = () + +T.Instance.Method(fun () -> "") + """ + |> typecheck + |> shouldFail + |> withDiagnostics + [ (Error 41, Line 8, Col 12, Line 8, Col 18, "No overloads match for method 'Method'. + +Known type of argument: (unit -> string) + +Available overloads: + - member T.Method: double -> unit // Argument at index 1 doesn't match + - member T.Method: int -> unit // Argument at index 1 doesn't match") ] + +[] +let ``Issue 14284 - backtick-escaped method name`` () = + FSharp + """ +type T() = + static member Instance = T() + + member _.``My Method``(_: double) = () + member _.``My Method``(_: int) = () + +T.Instance.``My Method``("") + """ + |> typecheck + |> shouldFail + |> withDiagnostics + [ (Error 41, Line 8, Col 12, Line 8, Col 25, "No overloads match for method 'My Method'. + +Known type of argument: string + +Available overloads: + - member T.``My Method`` : double -> unit // Argument at index 1 doesn't match + - member T.``My Method`` : int -> unit // Argument at index 1 doesn't match") ] + +[] +let ``Issue 14284 - multiline method access`` () = + FSharp + """ +type T() = + static member Instance = T() + + member _.Method(_: double) = () + member _.Method(_: int) = () + +T + .Instance + .Method("") + """ + |> typecheck + |> shouldFail + |> withDiagnostics + [ (Error 41, Line 10, Col 4, Line 10, Col 10, "No overloads match for method 'Method'. + +Known type of argument: string + +Available overloads: + - member T.Method: double -> unit // Argument at index 1 doesn't match + - member T.Method: int -> unit // Argument at index 1 doesn't match") ] + +[] +let ``Issue 14284 - constructor overload error`` () = + FSharp + """ +module M = + type T = + new(_: int) = {} + new(_: double) = {} + +M.T("") + """ + |> typecheck + |> shouldFail + |> withDiagnostics + [ (Error 41, Line 7, Col 3, Line 7, Col 4, "No overloads match for method 'T'. + +Known type of argument: string + +Available overloads: + - new: double -> M.T // Argument at index 1 doesn't match + - new: int -> M.T // Argument at index 1 doesn't match") ] + +[] +let ``Regression - ParamArray arg mismatch should not add extra FS0001 duplicates`` () = + // Pre-existing: main already emits each FS0001 twice (4 total for 2 args). + // This test ensures the PR does not INCREASE the count. + let result = + FSharp + """ +type C() = + static member M(fmt: string, [] args: int[]) = () + +C.M("{0}", box 1, box 2) + """ + |> typecheck + + let diags = result.Output.Diagnostics + let fs0001 = diags |> List.filter (fun d -> d.Error = (Error 1)) + + Assert.True( + fs0001.Length = 4, + sprintf "Expected 4 FS0001 (pre-existing 2x duplication for 2 args) but got %d. Diagnostics:\n%A" fs0001.Length diags + ) + +[] +let ``Regression - ByRefKinds library-only types should not add extra FS1204 duplicates`` () = + // Pre-existing: main already emits each FS1204 twice (4 total for 2 members). + // This test ensures the PR does not INCREASE the count. + let result = + FSharp + """ +type C() = + static member F(x: ByRefKinds.In) = 1 + static member F(x: ByRefKinds.Out) = 1 + """ + |> typecheck + + let diags = result.Output.Diagnostics + let fs1204 = diags |> List.filter (fun d -> d.Error = (Error 1204)) + + Assert.True( + fs1204.Length = 4, + sprintf "Expected 4 FS1204 (pre-existing 2x duplication for 2 members) but got %d. Diagnostics:\n%A" fs1204.Length diags + ) + +[] +let ``Obsolete diagnostic should point at method name, not full expression`` () = + FSharp + """ +type T() = + static member Instance = T() + + [] + member _.OldMethod() = () + +T.Instance.OldMethod() + """ + |> typecheck + |> shouldFail + |> withDiagnostics + [ + // First: narrowed to "OldMethod" via mItem (Col 12-21), not the full "T.Instance.OldMethod" + (Warning 44, Line 8, Col 12, Line 8, Col 21, "This construct is deprecated. old method") + // Second: pre-existing duplicate from name resolution attribute check (whole application range) + (Warning 44, Line 8, Col 1, Line 8, Col 23, "This construct is deprecated. old method") + ] + +[] +let ``Obsolete diagnostic on static method should point at method name`` () = + FSharp + """ +module M = + type Svc() = + [] + static member OldMethod() = () + +M.Svc.OldMethod() + """ + |> typecheck + |> shouldFail + |> withDiagnostics + [ + // First: narrowed to "OldMethod" via mItem (Col 7-16), not "M.Svc.OldMethod" + (Warning 44, Line 7, Col 7, Line 7, Col 16, "This construct is deprecated. use NewMethod instead") + // Second: pre-existing duplicate from name resolution attribute check (whole expression range) + (Warning 44, Line 7, Col 1, Line 7, Col 18, "This construct is deprecated. use NewMethod instead") + ] + +[] +let ``Static indexed property overload error should point at property name`` () = + FSharp + """ +open System +type Lookup() = + static member Item with get (key: int) = "int" + static member Item with get (key: float) = "float" + +let _ = Lookup.Item("") + """ + |> typecheck + |> shouldFail + |> withDiagnostics + [ (Error 41, Line 7, Col 16, Line 7, Col 20, "No overloads match for method 'Item'. + +Known type of argument: string + +Available overloads: + - static member Lookup.Item: key: float -> string with get // Argument 'key' doesn't match + - static member Lookup.Item: key: int -> string with get // Argument 'key' doesn't match") ] diff --git a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj index dfc14e9ef4d..01492c57fd3 100644 --- a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj +++ b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj @@ -309,6 +309,7 @@ + diff --git a/tests/FSharp.Compiler.ComponentTests/Language/ExperimentalAttributeCheckingTests.fs b/tests/FSharp.Compiler.ComponentTests/Language/ExperimentalAttributeCheckingTests.fs index 653aa488281..a6ad6717df9 100755 --- a/tests/FSharp.Compiler.ComponentTests/Language/ExperimentalAttributeCheckingTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/Language/ExperimentalAttributeCheckingTests.fs @@ -39,7 +39,7 @@ let text = Class1.Test() |> shouldFail |> withDiagnostics [ (Warning 57, Line 4, Col 12, Line 4, Col 18, """This construct is experimental. This warning can be disabled using '--nowarn:57' or '#nowarn "57"'.""") - (Warning 57, Line 4, Col 12, Line 4, Col 23, """This construct is experimental. This warning can be disabled using '--nowarn:57' or '#nowarn "57"'.""") + (Warning 57, Line 4, Col 19, Line 4, Col 23, """This construct is experimental. This warning can be disabled using '--nowarn:57' or '#nowarn "57"'.""") ] [] @@ -74,7 +74,7 @@ let text = Class1.Test() |> shouldFail |> withDiagnostics [ (Warning 57, Line 4, Col 12, Line 4, Col 18, """This construct is experimental. This warning can be disabled using '--nowarn:57' or '#nowarn "57"'.""") - (Warning 57, Line 4, Col 12, Line 4, Col 23, """This construct is experimental. This warning can be disabled using '--nowarn:57' or '#nowarn "57"'.""") + (Warning 57, Line 4, Col 19, Line 4, Col 23, """This construct is experimental. This warning can be disabled using '--nowarn:57' or '#nowarn "57"'.""") ] [] diff --git a/tests/FSharp.Compiler.ComponentTests/Language/ObsoleteAttributeCheckingTests.fs b/tests/FSharp.Compiler.ComponentTests/Language/ObsoleteAttributeCheckingTests.fs index c74309a4138..085cbc3599e 100644 --- a/tests/FSharp.Compiler.ComponentTests/Language/ObsoleteAttributeCheckingTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/Language/ObsoleteAttributeCheckingTests.fs @@ -412,7 +412,7 @@ c.Update() |> compile |> shouldFail |> withDiagnostics [ - (Error 101, Line 9, Col 1, Line 9, Col 9, "This construct is deprecated. Use B instead") + (Error 101, Line 9, Col 3, Line 9, Col 9, "This construct is deprecated. Use B instead") ] [] @@ -432,7 +432,7 @@ c.Update() |> shouldFail |> withDiagnostics [ (Error 101, Line 8, Col 9, Line 8, Col 10, "This construct is deprecated. Use B instead"); - (Error 101, Line 9, Col 1, Line 9, Col 9, "This construct is deprecated. Use B instead") + (Error 101, Line 9, Col 3, Line 9, Col 9, "This construct is deprecated. Use B instead") ] [] @@ -453,7 +453,7 @@ c.Update() |> shouldFail |> withDiagnostics [ (Error 101, Line 9, Col 9, Line 9, Col 10, "This construct is deprecated. Use B instead"); - (Error 101, Line 10, Col 1, Line 10, Col 9, "This construct is deprecated. Use B instead") + (Error 101, Line 10, Col 3, Line 10, Col 9, "This construct is deprecated. Use B instead") ] [] @@ -492,7 +492,7 @@ c.Update() |> compile |> shouldFail |> withDiagnostics [ - (Error 101, Line 10, Col 1, Line 10, Col 9, "This construct is deprecated. Use B instead") + (Error 101, Line 10, Col 3, Line 10, Col 9, "This construct is deprecated. Use B instead") ] [] @@ -548,7 +548,7 @@ C.Update() |> compile |> shouldFail |> withDiagnostics [ - (Error 101, Line 9, Col 1, Line 9, Col 9, "This construct is deprecated. Use B instead") + (Error 101, Line 9, Col 3, Line 9, Col 9, "This construct is deprecated. Use B instead") ] [] @@ -939,7 +939,7 @@ b.text("Hello 2") |> ignore |> compile |> shouldFail |> withDiagnostics [ - (Error 101, Line 16, Col 1, Line 16, Col 7, "This construct is deprecated. Use B instead") + (Error 101, Line 16, Col 3, Line 16, Col 7, "This construct is deprecated. Use B instead") ] [] @@ -985,7 +985,7 @@ let value2 = class1.A <- 12 |> compile |> shouldFail |> withDiagnostics [ - (Warning 44, Line 9, Col 14, Line 9, Col 22, "This construct is deprecated. member A is deprecated"); + (Warning 44, Line 9, Col 21, Line 9, Col 22, "This construct is deprecated. member A is deprecated"); (Warning 44, Line 9, Col 14, Line 9, Col 28, "This construct is deprecated. member A is deprecated") ] @@ -1004,7 +1004,7 @@ let value2 = class1.A <- 12 |> compile |> shouldFail |> withDiagnostics [ - (Error 101, Line 9, Col 14, Line 9, Col 22, "This construct is deprecated. member A is deprecated") + (Error 101, Line 9, Col 21, Line 9, Col 22, "This construct is deprecated. member A is deprecated") ] [] @@ -1022,8 +1022,9 @@ let value2 = class1.A <- 12 |> compile |> shouldFail |> withDiagnostics [ + (Warning 44, Line 8, Col 21, Line 8, Col 22, "This construct is deprecated. member A is deprecated"); (Warning 44, Line 8, Col 14, Line 8, Col 22, "This construct is deprecated. member A is deprecated"); - (Warning 44, Line 9, Col 14, Line 9, Col 22, "This construct is deprecated. member A is deprecated") + (Warning 44, Line 9, Col 21, Line 9, Col 22, "This construct is deprecated. member A is deprecated") ] [] @@ -1041,8 +1042,8 @@ let value2 = class1.A <- 12 |> compile |> shouldFail |> withDiagnostics [ - (Error 101, Line 8, Col 14, Line 8, Col 22, "This construct is deprecated. member A is deprecated") - (Error 101, Line 9, Col 14, Line 9, Col 22, "This construct is deprecated. member A is deprecated") + (Error 101, Line 8, Col 21, Line 8, Col 22, "This construct is deprecated. member A is deprecated") + (Error 101, Line 9, Col 21, Line 9, Col 22, "This construct is deprecated. member A is deprecated") ] [] @@ -1332,8 +1333,8 @@ Class.ObsoleteEvent |> ignore |> shouldFail |> withDiagnostics [ (Warning 44, Line 3, Col 1, Line 3, Col 20, "This construct is deprecated. Field is obsolete"); - (Warning 44, Line 4, Col 1, Line 4, Col 21, "This construct is deprecated. Method is obsolete"); - (Warning 44, Line 5, Col 1, Line 5, Col 23, "This construct is deprecated. Property is obsolete") + (Warning 44, Line 4, Col 7, Line 4, Col 21, "This construct is deprecated. Method is obsolete"); + (Warning 44, Line 5, Col 7, Line 5, Col 23, "This construct is deprecated. Property is obsolete") (Warning 44, Line 6, Col 1, Line 6, Col 20, "This construct is deprecated. Event is obsolete") ] @@ -1371,8 +1372,8 @@ Class.ObsoleteEvent |> ignore |> shouldFail |> withDiagnostics [ (Error 101, Line 3, Col 1, Line 3, Col 20, "This construct is deprecated. Field is obsolete"); - (Error 101, Line 4, Col 1, Line 4, Col 21, "This construct is deprecated. Method is obsolete"); - (Error 101, Line 5, Col 1, Line 5, Col 23, "This construct is deprecated. Property is obsolete") + (Error 101, Line 4, Col 7, Line 4, Col 21, "This construct is deprecated. Method is obsolete"); + (Error 101, Line 5, Col 7, Line 5, Col 23, "This construct is deprecated. Property is obsolete") (Error 101, Line 6, Col 1, Line 6, Col 20, "This construct is deprecated. Event is obsolete") ] @@ -1531,7 +1532,7 @@ let f (x: IFirst) = x.F() |> typecheck |> shouldFail |> withDiagnostics [ - (Warning 44, Line 13, Col 21, Line 13, Col 24, "This construct is deprecated. Use G instead") + (Warning 44, Line 13, Col 23, Line 13, Col 24, "This construct is deprecated. Use G instead") (Warning 44, Line 13, Col 21, Line 13, Col 26, "This construct is deprecated. Use G instead") ] @@ -1555,7 +1556,7 @@ let f (x: IFirst) = x.F() |> typecheck |> shouldFail |> withDiagnostics [ - (Error 101, Line 13, Col 21, Line 13, Col 24, "This construct is deprecated. Use G instead") + (Error 101, Line 13, Col 23, Line 13, Col 24, "This construct is deprecated. Use G instead") ] [] @@ -1579,7 +1580,7 @@ let f (x: IFirst) = x.F() |> withDiagnostics [ (Warning 44, Line 9, Col 11, Line 9, Col 17, "This construct is deprecated. Use G instead") (Warning 44, Line 13, Col 11, Line 13, Col 17, "This construct is deprecated. Use G instead") - (Warning 44, Line 13, Col 21, Line 13, Col 24, "This construct is deprecated. Use G instead") + (Warning 44, Line 13, Col 23, Line 13, Col 24, "This construct is deprecated. Use G instead") ] [] diff --git a/tests/FSharp.Compiler.Service.Tests/TypeChecker/TypeCheckerRecoveryTests.fs b/tests/FSharp.Compiler.Service.Tests/TypeChecker/TypeCheckerRecoveryTests.fs index a5e9aa44709..343009b8db4 100644 --- a/tests/FSharp.Compiler.Service.Tests/TypeChecker/TypeCheckerRecoveryTests.fs +++ b/tests/FSharp.Compiler.Service.Tests/TypeChecker/TypeCheckerRecoveryTests.fs @@ -39,7 +39,7 @@ Math.Max(a,) dumpDiagnosticNumbers checkResults |> shouldEqual [ "(4,10--4,11)", 3100 "(4,9--4,10)", 39 - "(4,0--4,12)", 41 + "(4,5--4,8)", 41 ] assertHasSymbolUsages ["Max"] checkResults diff --git a/tests/fsharp/Compiler/Language/DefaultInterfaceMemberTests.fs b/tests/fsharp/Compiler/Language/DefaultInterfaceMemberTests.fs index d6a667b6156..779df41df30 100644 --- a/tests/fsharp/Compiler/Language/DefaultInterfaceMemberTests.fs +++ b/tests/fsharp/Compiler/Language/DefaultInterfaceMemberTests.fs @@ -444,10 +444,10 @@ type Test2 () = Compilation.Create(fsharpSource, Library, options = [|"--langversion:8.0"|], cmplRefs = [csCmpl]) CompilerAssert.CompileWithErrors(fsCmpl, [| - (FSharpDiagnosticSeverity.Error, 629, (10, 9, 10, 27), "Method 'M1' is not accessible from this code location") - (FSharpDiagnosticSeverity.Error, 629, (15, 13, 15, 31), "Method 'M1' is not accessible from this code location") - (FSharpDiagnosticSeverity.Error, 629, (25, 9, 25, 28), "Method 'M1' is not accessible from this code location") - (FSharpDiagnosticSeverity.Error, 629, (30, 13, 30, 31), "Method 'M1' is not accessible from this code location") + (FSharpDiagnosticSeverity.Error, 629, (10, 25, 10, 27), "Method 'M1' is not accessible from this code location") + (FSharpDiagnosticSeverity.Error, 629, (15, 29, 15, 31), "Method 'M1' is not accessible from this code location") + (FSharpDiagnosticSeverity.Error, 629, (25, 26, 25, 28), "Method 'M1' is not accessible from this code location") + (FSharpDiagnosticSeverity.Error, 629, (30, 29, 30, 31), "Method 'M1' is not accessible from this code location") |]) [] diff --git a/tests/fsharp/Compiler/Language/TypeDirectedConversionTests.fs b/tests/fsharp/Compiler/Language/TypeDirectedConversionTests.fs index 37c8596d3e5..1200b79fcd2 100644 --- a/tests/fsharp/Compiler/Language/TypeDirectedConversionTests.fs +++ b/tests/fsharp/Compiler/Language/TypeDirectedConversionTests.fs @@ -329,7 +329,7 @@ let test2(x: 'T) = [| (FSharpDiagnosticSeverity.Error, 41, - (11, 5, 11, 11), + (11, 7, 11, 8), """A unique overload for method 'A' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: 'T @@ -341,7 +341,7 @@ Candidates: - static member M.A: n: int -> unit""") (FSharpDiagnosticSeverity.Error, 41, - (19, 5, 19, 12), + (19, 8, 19, 9), """A unique overload for method 'A' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: 'T @@ -368,7 +368,7 @@ let test(x: 'T) = """ FSharpDiagnosticSeverity.Error 41 - (10, 5, 10, 11) + (10, 7, 10, 8) """A unique overload for method 'A' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: 'T @@ -495,7 +495,7 @@ let test() = M.A(System.DateTime.UtcNow, 1) """ FSharpDiagnosticSeverity.Error 41 - (6, 14, 6, 44) + (6, 16, 6, 17) """A unique overload for method 'A' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: System.DateTime * int diff --git a/tests/fsharp/conformance/expressions/type-relatedexpressions/E_RigidTypeAnnotation03.bsl b/tests/fsharp/conformance/expressions/type-relatedexpressions/E_RigidTypeAnnotation03.bsl index 974190e66a3..d66e4829247 100644 --- a/tests/fsharp/conformance/expressions/type-relatedexpressions/E_RigidTypeAnnotation03.bsl +++ b/tests/fsharp/conformance/expressions/type-relatedexpressions/E_RigidTypeAnnotation03.bsl @@ -4,7 +4,7 @@ E_RigidTypeAnnotation03.fsx(17,13,17,16): typecheck error FS0001: This expressio but here has type 'byte' -E_RigidTypeAnnotation03.fsx(17,9,17,25): typecheck error FS0041: No overloads match for method 'M'. +E_RigidTypeAnnotation03.fsx(17,11,17,12): typecheck error FS0041: No overloads match for method 'M'. Known type of argument: sbyte @@ -20,7 +20,7 @@ E_RigidTypeAnnotation03.fsx(18,13,18,19): typecheck error FS0001: This expressio but here has type 'float<'u>' -E_RigidTypeAnnotation03.fsx(18,9,18,30): typecheck error FS0041: No overloads match for method 'M'. +E_RigidTypeAnnotation03.fsx(18,11,18,12): typecheck error FS0041: No overloads match for method 'M'. Known type of argument: float32 @@ -42,7 +42,7 @@ but given a 'decimal' The unit of measure 'N s ^ 2' does not match the unit of measure 'Kg' -E_RigidTypeAnnotation03.fsx(20,9,20,39): typecheck error FS0041: No overloads match for method 'M'. +E_RigidTypeAnnotation03.fsx(20,11,20,12): typecheck error FS0041: No overloads match for method 'M'. Known type of argument: decimal @@ -58,7 +58,7 @@ E_RigidTypeAnnotation03.fsx(21,14,21,18): typecheck error FS0001: This expressio but here has type 'string' -E_RigidTypeAnnotation03.fsx(21,9,21,27): typecheck error FS0041: No overloads match for method 'M'. +E_RigidTypeAnnotation03.fsx(21,11,21,12): typecheck error FS0041: No overloads match for method 'M'. Known type of argument: char diff --git a/tests/fsharp/conformance/inference/E_LeftToRightOverloadResolution01.bsl b/tests/fsharp/conformance/inference/E_LeftToRightOverloadResolution01.bsl index 8d60e94af11..bd02bbc2d1f 100644 --- a/tests/fsharp/conformance/inference/E_LeftToRightOverloadResolution01.bsl +++ b/tests/fsharp/conformance/inference/E_LeftToRightOverloadResolution01.bsl @@ -1,5 +1,5 @@ -E_LeftToRightOverloadResolution01.fsx(7,23,7,51): typecheck error FS0041: A unique overload for method 'WriteLine' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_LeftToRightOverloadResolution01.fsx(7,38,7,47): typecheck error FS0041: A unique overload for method 'WriteLine' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: 'a @@ -18,7 +18,7 @@ Candidates: - System.Console.WriteLine(value: uint32) : unit - System.Console.WriteLine(value: uint64) : unit -E_LeftToRightOverloadResolution01.fsx(9,23,9,51): typecheck error FS0041: A unique overload for method 'WriteLine' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_LeftToRightOverloadResolution01.fsx(9,38,9,47): typecheck error FS0041: A unique overload for method 'WriteLine' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: 'a diff --git a/tests/fsharp/conformance/inference/E_OneTypeVariable03.bsl b/tests/fsharp/conformance/inference/E_OneTypeVariable03.bsl index e46f1757896..8b9f6640f19 100644 --- a/tests/fsharp/conformance/inference/E_OneTypeVariable03.bsl +++ b/tests/fsharp/conformance/inference/E_OneTypeVariable03.bsl @@ -1,5 +1,5 @@ -E_OneTypeVariable03.fsx(60,34,60,44): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_OneTypeVariable03.fsx(60,38,60,39): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * int @@ -7,7 +7,7 @@ Candidates: - static member C23.M: x: 'a * y: 'b -> Two - static member C23.M: x: 'a * y: int -> Three -E_OneTypeVariable03.fsx(61,34,61,45): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_OneTypeVariable03.fsx(61,39,61,40): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * int diff --git a/tests/fsharp/conformance/inference/E_OneTypeVariable03rec.bsl b/tests/fsharp/conformance/inference/E_OneTypeVariable03rec.bsl index 3da07112f80..3151e03e1e0 100644 --- a/tests/fsharp/conformance/inference/E_OneTypeVariable03rec.bsl +++ b/tests/fsharp/conformance/inference/E_OneTypeVariable03rec.bsl @@ -1,5 +1,5 @@ -E_OneTypeVariable03rec.fsx(60,38,60,48): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_OneTypeVariable03rec.fsx(60,42,60,43): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * int @@ -7,7 +7,7 @@ Candidates: - static member C23.M: x: 'a * y: 'b -> Two - static member C23.M: x: 'a * y: int -> Three -E_OneTypeVariable03rec.fsx(61,38,61,49): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_OneTypeVariable03rec.fsx(61,43,61,44): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * int diff --git a/tests/fsharp/conformance/inference/E_TwoDifferentTypeVariables01.bsl b/tests/fsharp/conformance/inference/E_TwoDifferentTypeVariables01.bsl index bef5539b00a..10104a9f79f 100644 --- a/tests/fsharp/conformance/inference/E_TwoDifferentTypeVariables01.bsl +++ b/tests/fsharp/conformance/inference/E_TwoDifferentTypeVariables01.bsl @@ -1,5 +1,5 @@ -E_TwoDifferentTypeVariables01.fsx(61,33,61,43): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_TwoDifferentTypeVariables01.fsx(61,37,61,38): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * 'b @@ -7,7 +7,7 @@ Candidates: - static member C13.M: x: 'a * y: 'a -> One - static member C13.M: x: 'a * y: int -> Three -E_TwoDifferentTypeVariables01.fsx(62,33,62,43): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_TwoDifferentTypeVariables01.fsx(62,37,62,38): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * 'b @@ -15,7 +15,7 @@ Candidates: - static member C24.M: x: 'a * y: 'b -> Two - static member C24.M: x: 'a * y: C -> Four -E_TwoDifferentTypeVariables01.fsx(63,33,63,47): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_TwoDifferentTypeVariables01.fsx(63,37,63,38): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * 'b @@ -23,7 +23,7 @@ Candidates: - static member C13.M: x: 'a * y: 'a -> One - static member C13.M: x: 'a * y: int -> Three -E_TwoDifferentTypeVariables01.fsx(64,33,64,46): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_TwoDifferentTypeVariables01.fsx(64,37,64,38): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * 'b diff --git a/tests/fsharp/conformance/inference/E_TwoDifferentTypeVariables01rec.bsl b/tests/fsharp/conformance/inference/E_TwoDifferentTypeVariables01rec.bsl index c00efb90a64..290833eef43 100644 --- a/tests/fsharp/conformance/inference/E_TwoDifferentTypeVariables01rec.bsl +++ b/tests/fsharp/conformance/inference/E_TwoDifferentTypeVariables01rec.bsl @@ -1,5 +1,5 @@ -E_TwoDifferentTypeVariables01rec.fsx(60,37,60,47): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_TwoDifferentTypeVariables01rec.fsx(60,41,60,42): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * 'b @@ -7,7 +7,7 @@ Candidates: - static member C13.M: x: 'a * y: 'a -> One - static member C13.M: x: 'a * y: int -> Three -E_TwoDifferentTypeVariables01rec.fsx(61,37,61,47): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_TwoDifferentTypeVariables01rec.fsx(61,41,61,42): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * 'b @@ -15,7 +15,7 @@ Candidates: - static member C24.M: x: 'a * y: 'b -> Two - static member C24.M: x: 'a * y: C -> Four -E_TwoDifferentTypeVariables01rec.fsx(62,37,62,51): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_TwoDifferentTypeVariables01rec.fsx(62,41,62,42): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * 'b @@ -23,7 +23,7 @@ Candidates: - static member C13.M: x: 'a * y: 'a -> One - static member C13.M: x: 'a * y: int -> Three -E_TwoDifferentTypeVariables01rec.fsx(63,37,63,50): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_TwoDifferentTypeVariables01rec.fsx(63,41,63,42): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * 'b diff --git a/tests/fsharp/conformance/inference/E_TwoDifferentTypeVariablesGen00.bsl b/tests/fsharp/conformance/inference/E_TwoDifferentTypeVariablesGen00.bsl index 9d9d4a60369..9795de8e8a4 100644 --- a/tests/fsharp/conformance/inference/E_TwoDifferentTypeVariablesGen00.bsl +++ b/tests/fsharp/conformance/inference/E_TwoDifferentTypeVariablesGen00.bsl @@ -9,7 +9,7 @@ E_TwoDifferentTypeVariablesGen00.fsx(62,52,62,53): typecheck error FS0064: This E_TwoDifferentTypeVariablesGen00.fsx(62,18,62,21): typecheck error FS0043: The type ''b' does not match the type 'int' -E_TwoDifferentTypeVariablesGen00.fsx(63,45,63,55): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_TwoDifferentTypeVariablesGen00.fsx(63,49,63,50): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * 'b @@ -29,7 +29,7 @@ E_TwoDifferentTypeVariablesGen00.fsx(65,56,65,57): typecheck error FS0064: This E_TwoDifferentTypeVariablesGen00.fsx(65,18,65,21): typecheck error FS0043: The type ''a' does not match the type 'int' -E_TwoDifferentTypeVariablesGen00.fsx(66,45,66,59): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_TwoDifferentTypeVariablesGen00.fsx(66,49,66,50): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * 'b @@ -43,7 +43,7 @@ E_TwoDifferentTypeVariablesGen00.fsx(67,18,67,21): typecheck error FS0064: This E_TwoDifferentTypeVariablesGen00.fsx(67,18,67,21): typecheck error FS0043: The type ''b' does not match the type ''b0' -E_TwoDifferentTypeVariablesGen00.fsx(68,45,68,58): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_TwoDifferentTypeVariablesGen00.fsx(68,49,68,50): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * 'b diff --git a/tests/fsharp/conformance/inference/E_TwoDifferentTypeVariablesGen00rec.bsl b/tests/fsharp/conformance/inference/E_TwoDifferentTypeVariablesGen00rec.bsl index 99d338ef47a..ea33553fa7e 100644 --- a/tests/fsharp/conformance/inference/E_TwoDifferentTypeVariablesGen00rec.bsl +++ b/tests/fsharp/conformance/inference/E_TwoDifferentTypeVariablesGen00rec.bsl @@ -9,7 +9,7 @@ E_TwoDifferentTypeVariablesGen00rec.fsx(62,52,62,53): typecheck error FS0064: Th E_TwoDifferentTypeVariablesGen00rec.fsx(62,18,62,21): typecheck error FS0043: The type ''b' does not match the type 'int' -E_TwoDifferentTypeVariablesGen00rec.fsx(63,45,63,55): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_TwoDifferentTypeVariablesGen00rec.fsx(63,49,63,50): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * 'b @@ -29,7 +29,7 @@ E_TwoDifferentTypeVariablesGen00rec.fsx(65,56,65,57): typecheck error FS0064: Th E_TwoDifferentTypeVariablesGen00rec.fsx(65,18,65,21): typecheck error FS0043: The type ''a' does not match the type 'int' -E_TwoDifferentTypeVariablesGen00rec.fsx(66,45,66,59): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_TwoDifferentTypeVariablesGen00rec.fsx(66,49,66,50): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * 'b @@ -43,7 +43,7 @@ E_TwoDifferentTypeVariablesGen00rec.fsx(67,18,67,21): typecheck error FS0064: Th E_TwoDifferentTypeVariablesGen00rec.fsx(67,18,67,21): typecheck error FS0043: The type ''b' does not match the type ''b0' -E_TwoDifferentTypeVariablesGen00rec.fsx(68,45,68,58): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_TwoDifferentTypeVariablesGen00rec.fsx(68,49,68,50): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * 'b diff --git a/tests/fsharp/conformance/inference/E_TwoEqualTypeVariables02.bsl b/tests/fsharp/conformance/inference/E_TwoEqualTypeVariables02.bsl index d9df255dd5a..be71d64c0e3 100644 --- a/tests/fsharp/conformance/inference/E_TwoEqualTypeVariables02.bsl +++ b/tests/fsharp/conformance/inference/E_TwoEqualTypeVariables02.bsl @@ -1,5 +1,5 @@ -E_TwoEqualTypeVariables02.fsx(61,33,61,43): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_TwoEqualTypeVariables02.fsx(61,37,61,38): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * 'a @@ -7,7 +7,7 @@ Candidates: - static member C12.M: x: 'a * y: 'a -> One - static member C12.M: x: 'a * y: 'b -> Two -E_TwoEqualTypeVariables02.fsx(62,33,62,43): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_TwoEqualTypeVariables02.fsx(62,37,62,38): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * 'a @@ -15,7 +15,7 @@ Candidates: - static member C14.M: x: 'a * y: 'a -> One - static member C14.M: x: 'a * y: C -> Four -E_TwoEqualTypeVariables02.fsx(63,33,63,43): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_TwoEqualTypeVariables02.fsx(63,37,63,38): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * 'a @@ -23,7 +23,7 @@ Candidates: - static member C24.M: x: 'a * y: 'b -> Two - static member C24.M: x: 'a * y: C -> Four -E_TwoEqualTypeVariables02.fsx(64,33,64,44): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_TwoEqualTypeVariables02.fsx(64,38,64,39): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * 'a @@ -32,7 +32,7 @@ Candidates: - static member C123.M: x: 'a * y: 'b -> Two - static member C123.M: x: 'a * y: int -> Three -E_TwoEqualTypeVariables02.fsx(65,33,65,45): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_TwoEqualTypeVariables02.fsx(65,39,65,40): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * 'a @@ -42,7 +42,7 @@ Candidates: - static member C1234.M: x: 'a * y: C -> Four - static member C1234.M: x: 'a * y: int -> Three -E_TwoEqualTypeVariables02.fsx(66,33,66,46): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_TwoEqualTypeVariables02.fsx(66,37,66,38): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * 'a diff --git a/tests/fsharp/conformance/inference/E_TwoEqualTypeVariables02rec.bsl b/tests/fsharp/conformance/inference/E_TwoEqualTypeVariables02rec.bsl index 9380c2906a8..e1caf5a7791 100644 --- a/tests/fsharp/conformance/inference/E_TwoEqualTypeVariables02rec.bsl +++ b/tests/fsharp/conformance/inference/E_TwoEqualTypeVariables02rec.bsl @@ -1,5 +1,5 @@ -E_TwoEqualTypeVariables02rec.fsx(60,37,60,47): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_TwoEqualTypeVariables02rec.fsx(60,41,60,42): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * 'a @@ -7,7 +7,7 @@ Candidates: - static member C12.M: x: 'a * y: 'a -> One - static member C12.M: x: 'a * y: 'b -> Two -E_TwoEqualTypeVariables02rec.fsx(61,37,61,47): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_TwoEqualTypeVariables02rec.fsx(61,41,61,42): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * 'a @@ -15,7 +15,7 @@ Candidates: - static member C14.M: x: 'a * y: 'a -> One - static member C14.M: x: 'a * y: C -> Four -E_TwoEqualTypeVariables02rec.fsx(62,37,62,47): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_TwoEqualTypeVariables02rec.fsx(62,41,62,42): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * 'a @@ -23,7 +23,7 @@ Candidates: - static member C24.M: x: 'a * y: 'b -> Two - static member C24.M: x: 'a * y: C -> Four -E_TwoEqualTypeVariables02rec.fsx(63,37,63,48): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_TwoEqualTypeVariables02rec.fsx(63,42,63,43): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * 'a @@ -32,7 +32,7 @@ Candidates: - static member C123.M: x: 'a * y: 'b -> Two - static member C123.M: x: 'a * y: int -> Three -E_TwoEqualTypeVariables02rec.fsx(64,37,64,49): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_TwoEqualTypeVariables02rec.fsx(64,43,64,44): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * 'a @@ -42,7 +42,7 @@ Candidates: - static member C1234.M: x: 'a * y: C -> Four - static member C1234.M: x: 'a * y: int -> Three -E_TwoEqualTypeVariables02rec.fsx(65,37,65,50): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_TwoEqualTypeVariables02rec.fsx(65,41,65,42): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * 'a diff --git a/tests/fsharp/conformance/lexicalanalysis/E_LessThanDotOpenParen001.bsl b/tests/fsharp/conformance/lexicalanalysis/E_LessThanDotOpenParen001.bsl index 07d69bc5277..a49c97ff4e9 100644 --- a/tests/fsharp/conformance/lexicalanalysis/E_LessThanDotOpenParen001.bsl +++ b/tests/fsharp/conformance/lexicalanalysis/E_LessThanDotOpenParen001.bsl @@ -11,7 +11,7 @@ Available overloads: - static member TestType.(+++) : a: TestType<'T,'S> * b: ('T -> 'S) -> 'T // Argument 'a' doesn't match - static member TestType.(+++) : a: TestType<'T,'S> * b: TestType<'T,'S> -> 'T // Argument 'a' doesn't match -E_LessThanDotOpenParen001.fsx(25,10,25,45): typecheck error FS0041: No overloads match for method 'op_PlusPlusPlus'. +E_LessThanDotOpenParen001.fsx(25,33,25,36): typecheck error FS0041: No overloads match for method 'op_PlusPlusPlus'. Known types of arguments: (string -> int) * TestType @@ -21,7 +21,7 @@ Available overloads: - static member TestType.(+++) : a: TestType<'T,'S> * b: ('T -> 'S) -> 'T // Argument 'a' doesn't match - static member TestType.(+++) : a: TestType<'T,'S> * b: TestType<'T,'S> -> 'T // Argument 'a' doesn't match -E_LessThanDotOpenParen001.fsx(26,10,26,68): typecheck error FS0041: No overloads match for method 'op_PlusPlusPlus'. +E_LessThanDotOpenParen001.fsx(26,33,26,36): typecheck error FS0041: No overloads match for method 'op_PlusPlusPlus'. Known types of arguments: (string -> int) * TestType diff --git a/tests/fsharp/conformance/wellformedness/E_Clashing_Values_in_AbstractClass01.bsl b/tests/fsharp/conformance/wellformedness/E_Clashing_Values_in_AbstractClass01.bsl index d19330fa22b..d91fe957a84 100644 --- a/tests/fsharp/conformance/wellformedness/E_Clashing_Values_in_AbstractClass01.bsl +++ b/tests/fsharp/conformance/wellformedness/E_Clashing_Values_in_AbstractClass01.bsl @@ -1,5 +1,5 @@ -E_Clashing_Values_in_AbstractClass01.fsx(22,11,22,16): typecheck error FS0041: A unique overload for method 'X' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_Clashing_Values_in_AbstractClass01.fsx(22,13,22,14): typecheck error FS0041: A unique overload for method 'X' could not be determined based on type information prior to this program point. A type annotation may be needed. Candidates: - member Q.X: unit -> decimal - member Q.X: unit -> float diff --git a/tests/fsharp/conformance/wellformedness/E_Clashing_Values_in_AbstractClass03.bsl b/tests/fsharp/conformance/wellformedness/E_Clashing_Values_in_AbstractClass03.bsl index 756341cd472..db26a73d948 100644 --- a/tests/fsharp/conformance/wellformedness/E_Clashing_Values_in_AbstractClass03.bsl +++ b/tests/fsharp/conformance/wellformedness/E_Clashing_Values_in_AbstractClass03.bsl @@ -1,5 +1,5 @@ -E_Clashing_Values_in_AbstractClass03.fsx(16,18,16,25): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_Clashing_Values_in_AbstractClass03.fsx(16,21,16,22): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: int @@ -7,7 +7,7 @@ Candidates: - abstract D.M: 'T -> int - abstract D.M: 'U -> string -E_Clashing_Values_in_AbstractClass03.fsx(17,18,17,25): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_Clashing_Values_in_AbstractClass03.fsx(17,21,17,22): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: int diff --git a/tests/fsharp/conformance/wellformedness/E_Clashing_Values_in_AbstractClass04.bsl b/tests/fsharp/conformance/wellformedness/E_Clashing_Values_in_AbstractClass04.bsl index 89195ec2cc3..5c6906bf787 100644 --- a/tests/fsharp/conformance/wellformedness/E_Clashing_Values_in_AbstractClass04.bsl +++ b/tests/fsharp/conformance/wellformedness/E_Clashing_Values_in_AbstractClass04.bsl @@ -1,5 +1,5 @@ -E_Clashing_Values_in_AbstractClass04.fsx(16,18,16,25): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_Clashing_Values_in_AbstractClass04.fsx(16,21,16,22): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: int @@ -7,7 +7,7 @@ Candidates: - abstract D.M: 'T -> int - abstract D.M: 'U -> string -E_Clashing_Values_in_AbstractClass04.fsx(17,18,17,25): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +E_Clashing_Values_in_AbstractClass04.fsx(17,21,17,22): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: int diff --git a/tests/fsharp/core/fsfromfsviacs/compilation.errors.output.bsl b/tests/fsharp/core/fsfromfsviacs/compilation.errors.output.bsl index 4c76cf6f127..14c9a504c56 100644 --- a/tests/fsharp/core/fsfromfsviacs/compilation.errors.output.bsl +++ b/tests/fsharp/core/fsfromfsviacs/compilation.errors.output.bsl @@ -1,10 +1,10 @@ -test.fsx(216,34): error FS0041: A unique overload for method 'OverloadedMethodTakingOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. +test.fsx(216,44): error FS0041: A unique overload for method 'OverloadedMethodTakingOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. Candidates: - SomeClass.OverloadedMethodTakingOptionals(?x: int, ?y: string, ?d: float) : int - SomeClass.OverloadedMethodTakingOptionals(?x: int, ?y: string, ?d: float32) : int -test.fsx(217,34): error FS0041: A unique overload for method 'OverloadedMethodTakingOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. +test.fsx(217,44): error FS0041: A unique overload for method 'OverloadedMethodTakingOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: x: int @@ -12,7 +12,7 @@ Candidates: - SomeClass.OverloadedMethodTakingOptionals(?x: int, ?y: string, ?d: float) : int - SomeClass.OverloadedMethodTakingOptionals(?x: int, ?y: string, ?d: float32) : int -test.fsx(218,34): error FS0041: A unique overload for method 'OverloadedMethodTakingOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. +test.fsx(218,44): error FS0041: A unique overload for method 'OverloadedMethodTakingOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: y: string @@ -20,7 +20,7 @@ Candidates: - SomeClass.OverloadedMethodTakingOptionals(?x: int, ?y: string, ?d: float) : int - SomeClass.OverloadedMethodTakingOptionals(?x: int, ?y: string, ?d: float32) : int -test.fsx(219,34): error FS0041: A unique overload for method 'OverloadedMethodTakingOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. +test.fsx(219,44): error FS0041: A unique overload for method 'OverloadedMethodTakingOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: x: int option @@ -28,7 +28,7 @@ Candidates: - SomeClass.OverloadedMethodTakingOptionals(?x: int, ?y: string, ?d: float) : int - SomeClass.OverloadedMethodTakingOptionals(?x: int, ?y: string, ?d: float32) : int -test.fsx(220,34): error FS0041: A unique overload for method 'OverloadedMethodTakingOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. +test.fsx(220,44): error FS0041: A unique overload for method 'OverloadedMethodTakingOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: y: string option @@ -36,7 +36,7 @@ Candidates: - SomeClass.OverloadedMethodTakingOptionals(?x: int, ?y: string, ?d: float) : int - SomeClass.OverloadedMethodTakingOptionals(?x: int, ?y: string, ?d: float32) : int -test.fsx(221,34): error FS0041: A unique overload for method 'OverloadedMethodTakingOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. +test.fsx(221,44): error FS0041: A unique overload for method 'OverloadedMethodTakingOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: x: 'a option @@ -44,7 +44,7 @@ Candidates: - SomeClass.OverloadedMethodTakingOptionals(?x: int, ?y: string, ?d: float) : int - SomeClass.OverloadedMethodTakingOptionals(?x: int, ?y: string, ?d: float32) : int -test.fsx(222,34): error FS0041: A unique overload for method 'OverloadedMethodTakingOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. +test.fsx(222,44): error FS0041: A unique overload for method 'OverloadedMethodTakingOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: y: 'a option @@ -52,7 +52,7 @@ Candidates: - SomeClass.OverloadedMethodTakingOptionals(?x: int, ?y: string, ?d: float) : int - SomeClass.OverloadedMethodTakingOptionals(?x: int, ?y: string, ?d: float32) : int -test.fsx(223,34): error FS0041: A unique overload for method 'OverloadedMethodTakingOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. +test.fsx(223,44): error FS0041: A unique overload for method 'OverloadedMethodTakingOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: d: 'a option @@ -60,7 +60,7 @@ Candidates: - SomeClass.OverloadedMethodTakingOptionals(?x: int, ?y: string, ?d: float) : int - SomeClass.OverloadedMethodTakingOptionals(?x: int, ?y: string, ?d: float32) : int -test.fsx(226,42): error FS0041: A unique overload for method 'OverloadedMethodTakingOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. +test.fsx(226,52): error FS0041: A unique overload for method 'OverloadedMethodTakingOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: 'a0 @@ -68,12 +68,12 @@ Candidates: - SomeClass.OverloadedMethodTakingOptionals(?x: int, ?y: string, ?d: float) : int - SomeClass.OverloadedMethodTakingOptionals(?x: int, ?y: string, ?d: float32) : int -test.fsx(228,35): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionalsWithDefaults' could not be determined based on type information prior to this program point. A type annotation may be needed. +test.fsx(228,45): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionalsWithDefaults' could not be determined based on type information prior to this program point. A type annotation may be needed. Candidates: - SomeClass.OverloadedMethodTakingNullableOptionalsWithDefaults(?x: Nullable, ?y: string, ?d: Nullable) : int - SomeClass.OverloadedMethodTakingNullableOptionalsWithDefaults(?x: Nullable, ?y: string, ?d: Nullable) : int -test.fsx(229,35): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionalsWithDefaults' could not be determined based on type information prior to this program point. A type annotation may be needed. +test.fsx(229,45): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionalsWithDefaults' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: y: string @@ -81,7 +81,7 @@ Candidates: - SomeClass.OverloadedMethodTakingNullableOptionalsWithDefaults(?x: Nullable, ?y: string, ?d: Nullable) : int - SomeClass.OverloadedMethodTakingNullableOptionalsWithDefaults(?x: Nullable, ?y: string, ?d: Nullable) : int -test.fsx(230,35): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionalsWithDefaults' could not be determined based on type information prior to this program point. A type annotation may be needed. +test.fsx(230,45): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionalsWithDefaults' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: d: Nullable @@ -89,7 +89,7 @@ Candidates: - SomeClass.OverloadedMethodTakingNullableOptionalsWithDefaults(?x: Nullable, ?y: string, ?d: Nullable) : int - SomeClass.OverloadedMethodTakingNullableOptionalsWithDefaults(?x: Nullable, ?y: string, ?d: Nullable) : int -test.fsx(231,36): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionalsWithDefaults' could not be determined based on type information prior to this program point. A type annotation may be needed. +test.fsx(231,46): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionalsWithDefaults' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: d: float @@ -97,7 +97,7 @@ Candidates: - SomeClass.OverloadedMethodTakingNullableOptionalsWithDefaults(?x: Nullable, ?y: string, ?d: Nullable) : int - SomeClass.OverloadedMethodTakingNullableOptionalsWithDefaults(?x: Nullable, ?y: string, ?d: Nullable) : int -test.fsx(232,36): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionalsWithDefaults' could not be determined based on type information prior to this program point. A type annotation may be needed. +test.fsx(232,46): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionalsWithDefaults' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: d: float option @@ -105,7 +105,7 @@ Candidates: - SomeClass.OverloadedMethodTakingNullableOptionalsWithDefaults(?x: Nullable, ?y: string, ?d: Nullable) : int - SomeClass.OverloadedMethodTakingNullableOptionalsWithDefaults(?x: Nullable, ?y: string, ?d: Nullable) : int -test.fsx(233,36): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionalsWithDefaults' could not be determined based on type information prior to this program point. A type annotation may be needed. +test.fsx(233,46): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionalsWithDefaults' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: x: 'a option @@ -113,7 +113,7 @@ Candidates: - SomeClass.OverloadedMethodTakingNullableOptionalsWithDefaults(?x: Nullable, ?y: string, ?d: Nullable) : int - SomeClass.OverloadedMethodTakingNullableOptionalsWithDefaults(?x: Nullable, ?y: string, ?d: Nullable) : int -test.fsx(234,36): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionalsWithDefaults' could not be determined based on type information prior to this program point. A type annotation may be needed. +test.fsx(234,46): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionalsWithDefaults' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: d: 'a option @@ -121,7 +121,7 @@ Candidates: - SomeClass.OverloadedMethodTakingNullableOptionalsWithDefaults(?x: Nullable, ?y: string, ?d: Nullable) : int - SomeClass.OverloadedMethodTakingNullableOptionalsWithDefaults(?x: Nullable, ?y: string, ?d: Nullable) : int -test.fsx(236,43): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionalsWithDefaults' could not be determined based on type information prior to this program point. A type annotation may be needed. +test.fsx(236,53): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionalsWithDefaults' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: 'a0 @@ -129,12 +129,12 @@ Candidates: - SomeClass.OverloadedMethodTakingNullableOptionalsWithDefaults(?x: Nullable, ?y: string, ?d: Nullable) : int - SomeClass.OverloadedMethodTakingNullableOptionalsWithDefaults(?x: Nullable, ?y: string, ?d: Nullable) : int -test.fsx(238,34): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. +test.fsx(238,44): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. Candidates: - SomeClass.OverloadedMethodTakingNullableOptionals(?x: Nullable, ?y: string, ?d: Nullable) : int - SomeClass.OverloadedMethodTakingNullableOptionals(?x: Nullable, ?y: string, ?d: Nullable) : int -test.fsx(239,34): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. +test.fsx(239,44): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: y: string @@ -142,7 +142,7 @@ Candidates: - SomeClass.OverloadedMethodTakingNullableOptionals(?x: Nullable, ?y: string, ?d: Nullable) : int - SomeClass.OverloadedMethodTakingNullableOptionals(?x: Nullable, ?y: string, ?d: Nullable) : int -test.fsx(240,33): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. +test.fsx(240,43): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: d: float @@ -150,7 +150,7 @@ Candidates: - SomeClass.OverloadedMethodTakingNullableOptionals(?x: Nullable, ?y: string, ?d: Nullable) : int - SomeClass.OverloadedMethodTakingNullableOptionals(?x: Nullable, ?y: string, ?d: Nullable) : int -test.fsx(241,34): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. +test.fsx(241,44): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: d: Nullable @@ -158,7 +158,7 @@ Candidates: - SomeClass.OverloadedMethodTakingNullableOptionals(?x: Nullable, ?y: string, ?d: Nullable) : int - SomeClass.OverloadedMethodTakingNullableOptionals(?x: Nullable, ?y: string, ?d: Nullable) : int -test.fsx(242,35): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. +test.fsx(242,45): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: d: float @@ -166,7 +166,7 @@ Candidates: - SomeClass.OverloadedMethodTakingNullableOptionals(?x: Nullable, ?y: string, ?d: Nullable) : int - SomeClass.OverloadedMethodTakingNullableOptionals(?x: Nullable, ?y: string, ?d: Nullable) : int -test.fsx(243,35): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. +test.fsx(243,45): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: d: float option @@ -174,7 +174,7 @@ Candidates: - SomeClass.OverloadedMethodTakingNullableOptionals(?x: Nullable, ?y: string, ?d: Nullable) : int - SomeClass.OverloadedMethodTakingNullableOptionals(?x: Nullable, ?y: string, ?d: Nullable) : int -test.fsx(244,35): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. +test.fsx(244,45): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: x: 'a option @@ -182,7 +182,7 @@ Candidates: - SomeClass.OverloadedMethodTakingNullableOptionals(?x: Nullable, ?y: string, ?d: Nullable) : int - SomeClass.OverloadedMethodTakingNullableOptionals(?x: Nullable, ?y: string, ?d: Nullable) : int -test.fsx(245,35): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. +test.fsx(245,45): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: d: 'a option @@ -190,7 +190,7 @@ Candidates: - SomeClass.OverloadedMethodTakingNullableOptionals(?x: Nullable, ?y: string, ?d: Nullable) : int - SomeClass.OverloadedMethodTakingNullableOptionals(?x: Nullable, ?y: string, ?d: Nullable) : int -test.fsx(246,42): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. +test.fsx(246,52): error FS0041: A unique overload for method 'OverloadedMethodTakingNullableOptionals' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: 'a0 @@ -200,7 +200,7 @@ Candidates: test.fsx(248,93): error FS0691: Named arguments must appear after all other arguments -test.fsx(249,88): error FS0041: A unique overload for method 'OverloadedMethodTakingNullables' could not be determined based on type information prior to this program point. A type annotation may be needed. +test.fsx(249,98): error FS0041: A unique overload for method 'OverloadedMethodTakingNullables' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: Nullable<'a> * string * Nullable<'b> when 'a: (new: unit -> 'a) and 'a: struct and 'a :> ValueType and 'b: (new: unit -> 'b) and 'b: struct and 'b :> ValueType diff --git a/tests/fsharp/typecheck/overloads/neg_System.Convert.ToString.OverloadList.bsl b/tests/fsharp/typecheck/overloads/neg_System.Convert.ToString.OverloadList.bsl index 090ddf39205..abfd96c8d9c 100644 --- a/tests/fsharp/typecheck/overloads/neg_System.Convert.ToString.OverloadList.bsl +++ b/tests/fsharp/typecheck/overloads/neg_System.Convert.ToString.OverloadList.bsl @@ -1,5 +1,5 @@ -neg_System.Convert.ToString.OverloadList.fsx(1,1,1,31): typecheck error FS0041: No overloads match for method 'ToString'. +neg_System.Convert.ToString.OverloadList.fsx(1,16,1,24): typecheck error FS0041: No overloads match for method 'ToString'. Known types of arguments: char * int @@ -25,7 +25,7 @@ Available overloads: - System.Convert.ToString(value: uint32, provider: System.IFormatProvider) : string // Argument 'value' doesn't match - System.Convert.ToString(value: uint64, provider: System.IFormatProvider) : string // Argument 'value' doesn't match -neg_System.Convert.ToString.OverloadList.fsx(2,1,2,47): typecheck error FS0041: No overloads match for method 'ToString'. +neg_System.Convert.ToString.OverloadList.fsx(2,16,2,24): typecheck error FS0041: No overloads match for method 'ToString'. Known types of arguments: provider: char * value: int diff --git a/tests/fsharp/typecheck/overloads/neg_System.Drawing.Graphics.DrawRectangleOverloadList.bsl b/tests/fsharp/typecheck/overloads/neg_System.Drawing.Graphics.DrawRectangleOverloadList.bsl index cfa6d36b91b..e132b8605c2 100644 --- a/tests/fsharp/typecheck/overloads/neg_System.Drawing.Graphics.DrawRectangleOverloadList.bsl +++ b/tests/fsharp/typecheck/overloads/neg_System.Drawing.Graphics.DrawRectangleOverloadList.bsl @@ -1,5 +1,5 @@ -neg_System.Drawing.Graphics.DrawRectangleOverloadList.fsx(9,1,9,31): typecheck error FS0041: No overloads match for method 'DrawRectangle'. +neg_System.Drawing.Graphics.DrawRectangleOverloadList.fsx(9,3,9,16): typecheck error FS0041: No overloads match for method 'DrawRectangle'. Known types of arguments: Pen * float32 * float32 * float32 * int @@ -7,7 +7,7 @@ Available overloads: - Graphics.DrawRectangle(pen: Pen, x: float32, y: float32, width: float32, height: float32) : unit // Argument 'height' doesn't match - Graphics.DrawRectangle(pen: Pen, x: int, y: int, width: int, height: int) : unit // Argument 'x' doesn't match -neg_System.Drawing.Graphics.DrawRectangleOverloadList.fsx(10,1,10,32): typecheck error FS0041: No overloads match for method 'DrawRectangle'. +neg_System.Drawing.Graphics.DrawRectangleOverloadList.fsx(10,3,10,16): typecheck error FS0041: No overloads match for method 'DrawRectangle'. Known types of arguments: Pen * int * float32 * float32 * decimal diff --git a/tests/fsharp/typecheck/overloads/neg_System.Threading.Tasks.Task.Run.OverloadList.bsl b/tests/fsharp/typecheck/overloads/neg_System.Threading.Tasks.Task.Run.OverloadList.bsl index c004363a8f2..8070f43bad8 100644 --- a/tests/fsharp/typecheck/overloads/neg_System.Threading.Tasks.Task.Run.OverloadList.bsl +++ b/tests/fsharp/typecheck/overloads/neg_System.Threading.Tasks.Task.Run.OverloadList.bsl @@ -1,5 +1,5 @@ -neg_System.Threading.Tasks.Task.Run.OverloadList.fsx(5,11,5,35): typecheck error FS0041: A unique overload for method 'Run' could not be determined based on type information prior to this program point. A type annotation may be needed. +neg_System.Threading.Tasks.Task.Run.OverloadList.fsx(5,16,5,19): typecheck error FS0041: A unique overload for method 'Run' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: (unit -> Task) @@ -7,7 +7,7 @@ Candidates: - Task.Run<'TResult>(``function`` : Func<'TResult>) : Task<'TResult> - Task.Run<'TResult>(``function`` : Func>) : Task<'TResult> -neg_System.Threading.Tasks.Task.Run.OverloadList.fsx(6,11,6,44): typecheck error FS0041: A unique overload for method 'Run' could not be determined based on type information prior to this program point. A type annotation may be needed. +neg_System.Threading.Tasks.Task.Run.OverloadList.fsx(6,16,6,19): typecheck error FS0041: A unique overload for method 'Run' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: Func> @@ -15,7 +15,7 @@ Candidates: - Task.Run<'TResult>(``function`` : Func<'TResult>) : Task<'TResult> - Task.Run<'TResult>(``function`` : Func>) : Task<'TResult> -neg_System.Threading.Tasks.Task.Run.OverloadList.fsx(7,11,7,47): typecheck error FS0041: A unique overload for method 'Run' could not be determined based on type information prior to this program point. A type annotation may be needed. +neg_System.Threading.Tasks.Task.Run.OverloadList.fsx(7,16,7,19): typecheck error FS0041: A unique overload for method 'Run' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: Func> @@ -23,7 +23,7 @@ Candidates: - Task.Run<'TResult>(``function`` : Func<'TResult>) : Task<'TResult> - Task.Run<'TResult>(``function`` : Func>) : Task<'TResult> -neg_System.Threading.Tasks.Task.Run.OverloadList.fsx(8,21,8,57): typecheck error FS0041: A unique overload for method 'Run' could not be determined based on type information prior to this program point. A type annotation may be needed. +neg_System.Threading.Tasks.Task.Run.OverloadList.fsx(8,26,8,29): typecheck error FS0041: A unique overload for method 'Run' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: Func> @@ -31,7 +31,7 @@ Candidates: - Task.Run<'TResult>(``function`` : Func<'TResult>) : Task<'TResult> - Task.Run<'TResult>(``function`` : Func>) : Task<'TResult> -neg_System.Threading.Tasks.Task.Run.OverloadList.fsx(9,11,9,50): typecheck error FS0041: A unique overload for method 'Run' could not be determined based on type information prior to this program point. A type annotation may be needed. +neg_System.Threading.Tasks.Task.Run.OverloadList.fsx(9,16,9,19): typecheck error FS0041: A unique overload for method 'Run' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: Func> @@ -39,7 +39,7 @@ Candidates: - Task.Run<'TResult>(``function`` : Func<'TResult>) : Task<'TResult> - Task.Run<'TResult>(``function`` : Func>) : Task<'TResult> -neg_System.Threading.Tasks.Task.Run.OverloadList.fsx(10,11,10,52): typecheck error FS0041: A unique overload for method 'Run' could not be determined based on type information prior to this program point. A type annotation may be needed. +neg_System.Threading.Tasks.Task.Run.OverloadList.fsx(10,16,10,19): typecheck error FS0041: A unique overload for method 'Run' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: Func> diff --git a/tests/fsharp/typecheck/overloads/neg_generic_known_argument_types.bsl b/tests/fsharp/typecheck/overloads/neg_generic_known_argument_types.bsl index 4b256a7c3b8..bd298dbb742 100644 --- a/tests/fsharp/typecheck/overloads/neg_generic_known_argument_types.bsl +++ b/tests/fsharp/typecheck/overloads/neg_generic_known_argument_types.bsl @@ -1,5 +1,5 @@ -neg_generic_known_argument_types.fsx(9,16,9,49): typecheck error FS0041: A unique overload for method 'Foo' could not be determined based on type information prior to this program point. A type annotation may be needed. +neg_generic_known_argument_types.fsx(9,23,9,26): typecheck error FS0041: A unique overload for method 'Foo' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: ^fa * 'fb * 'a * argD: 'c when ^fa: (member X: ^b -> ^b) and ^b: (member BBBB: unit -> unit) diff --git a/tests/fsharp/typecheck/overloads/neg_interface_generics.bsl b/tests/fsharp/typecheck/overloads/neg_interface_generics.bsl index 8cb798d4fa7..c31ed3d0041 100644 --- a/tests/fsharp/typecheck/overloads/neg_interface_generics.bsl +++ b/tests/fsharp/typecheck/overloads/neg_interface_generics.bsl @@ -1,7 +1,7 @@ neg_interface_generics.fsx(14,1,18,2): typecheck error FS0505: The member or object constructor 'Foo' does not take 13073 argument(s). An overload was found taking 1 arguments. -neg_interface_generics.fsx(20,9,20,27): typecheck error FS0041: No overloads match for method 'Foo'. +neg_interface_generics.fsx(20,13,20,16): typecheck error FS0041: No overloads match for method 'Foo'. Known types of arguments: string * XmlReader diff --git a/tests/fsharp/typecheck/overloads/neg_many_many_overloads.bsl b/tests/fsharp/typecheck/overloads/neg_many_many_overloads.bsl index c37fa993868..2563c0c3843 100644 --- a/tests/fsharp/typecheck/overloads/neg_many_many_overloads.bsl +++ b/tests/fsharp/typecheck/overloads/neg_many_many_overloads.bsl @@ -1,5 +1,5 @@ -neg_many_many_overloads.fsx(123,1,123,13): typecheck error FS0041: A unique overload for method 'A' could not be determined based on type information prior to this program point. A type annotation may be needed. +neg_many_many_overloads.fsx(123,7,123,8): typecheck error FS0041: A unique overload for method 'A' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: 'a0 when 'a0: null @@ -77,7 +77,7 @@ Candidates: - static member Class.A: a: Task -> Task - static member Class.A: a: string -> string -neg_many_many_overloads.fsx(124,1,124,34): typecheck error FS0041: No overloads match for method 'A'. +neg_many_many_overloads.fsx(124,7,124,8): typecheck error FS0041: No overloads match for method 'A'. Known type of argument: Type @@ -167,7 +167,7 @@ Available overloads: - static member Class.A: a: uint64 -> uint64 // Argument 'a' doesn't match - static member Class.A: a: uint8 -> uint8 // Argument 'a' doesn't match -neg_many_many_overloads.fsx(125,1,125,25): typecheck error FS0041: No overloads match for method 'A'. +neg_many_many_overloads.fsx(125,7,125,8): typecheck error FS0041: No overloads match for method 'A'. Known type of argument: Guid @@ -257,7 +257,7 @@ Available overloads: - static member Class.A: a: uint64 -> uint64 // Argument 'a' doesn't match - static member Class.A: a: uint8 -> uint8 // Argument 'a' doesn't match -neg_many_many_overloads.fsx(126,1,126,48): typecheck error FS0041: No overloads match for method 'A'. +neg_many_many_overloads.fsx(126,7,126,8): typecheck error FS0041: No overloads match for method 'A'. Known type of argument: DayOfWeek diff --git a/tests/fsharp/typecheck/overloads/neg_tupled_arguments.bsl b/tests/fsharp/typecheck/overloads/neg_tupled_arguments.bsl index 33de258632b..480b1f39deb 100644 --- a/tests/fsharp/typecheck/overloads/neg_tupled_arguments.bsl +++ b/tests/fsharp/typecheck/overloads/neg_tupled_arguments.bsl @@ -1,5 +1,5 @@ -neg_tupled_arguments.fsx(6,9,6,31): typecheck error FS0041: No overloads match for method 'A'. +neg_tupled_arguments.fsx(6,11,6,12): typecheck error FS0041: No overloads match for method 'A'. Known types of arguments: (int * (int * string) * int) * int @@ -9,7 +9,7 @@ Available overloads: neg_tupled_arguments.fsx(7,9,7,28): typecheck error FS0503: A member or object constructor 'A' taking 4 arguments is not accessible from this code location. All accessible versions of method 'A' take 2 arguments. -neg_tupled_arguments.fsx(14,9,14,40): typecheck error FS0041: No overloads match for method 'B'. +neg_tupled_arguments.fsx(14,11,14,12): typecheck error FS0041: No overloads match for method 'B'. Known types of arguments: int * int * (int * (int * int * int * (int * int))) * int * int diff --git a/tests/fsharp/typecheck/sigs/neg06.bsl b/tests/fsharp/typecheck/sigs/neg06.bsl index aac7fe5403b..66b21b0f504 100644 --- a/tests/fsharp/typecheck/sigs/neg06.bsl +++ b/tests/fsharp/typecheck/sigs/neg06.bsl @@ -108,7 +108,7 @@ neg06.fs(350,13,350,21): typecheck error FS0800: Invalid use of a type name neg06.fs(375,9,375,10): typecheck error FS1197: The parameter 'x' was inferred to have byref type. Parameters of byref type must be given an explicit type annotation, e.g. 'x1: byref'. When used, a byref parameter is implicitly dereferenced. -neg06.fs(382,13,382,19): typecheck error FS0041: A unique overload for method 'M1' could not be determined based on type information prior to this program point. A type annotation may be needed. +neg06.fs(382,15,382,17): typecheck error FS0041: A unique overload for method 'M1' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: 'a diff --git a/tests/fsharp/typecheck/sigs/neg10.bsl b/tests/fsharp/typecheck/sigs/neg10.bsl index 02bc0484995..1a0f32e060c 100644 --- a/tests/fsharp/typecheck/sigs/neg10.bsl +++ b/tests/fsharp/typecheck/sigs/neg10.bsl @@ -128,9 +128,9 @@ neg10.fs(252,45,252,57): typecheck error FS0001: The type ''a -> 'a' does not su neg10.fs(253,36,253,48): typecheck error FS0001: The type ''a -> 'a' does not support the 'equality' constraint because it is a function type -neg10.fs(297,17,297,24): typecheck error FS1187: An indexer property must be given at least one argument +neg10.fs(297,22,297,24): typecheck error FS1187: An indexer property must be given at least one argument -neg10.fs(298,17,298,24): typecheck error FS1187: An indexer property must be given at least one argument +neg10.fs(298,22,298,24): typecheck error FS1187: An indexer property must be given at least one argument neg10.fs(299,17,299,24): typecheck error FS0807: Property 'S2' is not readable @@ -146,9 +146,9 @@ neg10.fs(305,17,305,22): typecheck error FS0807: Property 'SS4' is not readable neg10.fs(316,17,316,28): typecheck error FS0807: Property 'X' is not readable -neg10.fs(324,17,324,29): typecheck error FS1187: An indexer property must be given at least one argument +neg10.fs(324,28,324,29): typecheck error FS1187: An indexer property must be given at least one argument -neg10.fs(333,17,333,29): typecheck error FS1187: An indexer property must be given at least one argument +neg10.fs(333,28,333,29): typecheck error FS1187: An indexer property must be given at least one argument neg10.fs(335,17,335,39): typecheck error FS0501: The member or object constructor 'X' takes 2 argument(s) but is here given 3. The required signature is 'member T3.X: a: int -> int * int with set'. diff --git a/tests/fsharp/typecheck/sigs/neg101.bsl b/tests/fsharp/typecheck/sigs/neg101.bsl index 8efa169c8e1..7ba4581765c 100644 --- a/tests/fsharp/typecheck/sigs/neg101.bsl +++ b/tests/fsharp/typecheck/sigs/neg101.bsl @@ -1,74 +1,74 @@ neg101.fs(7,11,7,14): typecheck error FS0039: The type 'Int32' does not define a field, constructor, or member named 'Foo'. -neg101.fs(14,6,14,17): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. +neg101.fs(14,12,14,17): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. -neg101.fs(15,6,15,17): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. +neg101.fs(15,12,15,17): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. -neg101.fs(16,6,16,19): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. +neg101.fs(16,14,16,19): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. -neg101.fs(17,6,17,19): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. +neg101.fs(17,14,17,19): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. -neg101.fs(18,6,18,19): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. +neg101.fs(18,14,18,19): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. -neg101.fs(19,6,19,21): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. +neg101.fs(19,16,19,21): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. -neg101.fs(20,6,20,21): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. +neg101.fs(20,16,20,21): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. -neg101.fs(21,6,21,21): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. +neg101.fs(21,16,21,21): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. -neg101.fs(22,6,22,21): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. +neg101.fs(22,16,22,21): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. -neg101.fs(23,6,23,23): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. +neg101.fs(23,18,23,23): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. -neg101.fs(24,6,24,23): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. +neg101.fs(24,18,24,23): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. -neg101.fs(25,6,25,23): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. +neg101.fs(25,18,25,23): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. -neg101.fs(26,6,26,23): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. +neg101.fs(26,18,26,23): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. -neg101.fs(27,6,27,23): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. +neg101.fs(27,18,27,23): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. -neg101.fs(28,6,28,25): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. +neg101.fs(28,20,28,25): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. -neg101.fs(29,6,29,25): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. +neg101.fs(29,20,29,25): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. -neg101.fs(30,6,30,25): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. +neg101.fs(30,20,30,25): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. -neg101.fs(31,6,31,25): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. +neg101.fs(31,20,31,25): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. -neg101.fs(32,6,32,25): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. +neg101.fs(32,20,32,25): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. -neg101.fs(33,6,33,25): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. +neg101.fs(33,20,33,25): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. -neg101.fs(34,6,34,27): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. +neg101.fs(34,22,34,27): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. -neg101.fs(35,6,35,27): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. +neg101.fs(35,22,35,27): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. -neg101.fs(36,6,36,27): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. +neg101.fs(36,22,36,27): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. -neg101.fs(37,6,37,27): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. +neg101.fs(37,22,37,27): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. -neg101.fs(38,6,38,27): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. +neg101.fs(38,22,38,27): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. -neg101.fs(39,6,39,27): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. +neg101.fs(39,22,39,27): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. -neg101.fs(40,6,40,27): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. +neg101.fs(40,22,40,27): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. -neg101.fs(41,6,41,29): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. +neg101.fs(41,24,41,29): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. -neg101.fs(42,6,42,29): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. +neg101.fs(42,24,42,29): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. -neg101.fs(43,6,43,29): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. +neg101.fs(43,24,43,29): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. -neg101.fs(44,6,44,29): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. +neg101.fs(44,24,44,29): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. -neg101.fs(45,6,45,29): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. +neg101.fs(45,24,45,29): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. -neg101.fs(46,6,46,29): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. +neg101.fs(46,24,46,29): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. -neg101.fs(47,6,47,29): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. +neg101.fs(47,24,47,29): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. -neg101.fs(49,10,49,32): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. +neg101.fs(49,28,49,32): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. neg101.fs(50,16,50,20): typecheck error FS0039: The field, constructor or member 'Rest' is not defined. diff --git a/tests/fsharp/typecheck/sigs/neg106.bsl b/tests/fsharp/typecheck/sigs/neg106.bsl index f25e10e776e..ac5afb1d58c 100644 --- a/tests/fsharp/typecheck/sigs/neg106.bsl +++ b/tests/fsharp/typecheck/sigs/neg106.bsl @@ -1,7 +1,7 @@ neg106.fs(8,59,8,61): typecheck error FS3230: A value defined in a module must be mutable in order to take its address, e.g. 'let mutable x = ...' -neg106.fs(13,18,13,72): typecheck error FS0041: No overloads match for method 'CompareExchange'. +neg106.fs(13,47,13,62): typecheck error FS0041: No overloads match for method 'CompareExchange'. Known types of arguments: inref * int * int @@ -16,7 +16,7 @@ Available overloads: neg106.fs(17,59,17,61): typecheck error FS3236: Cannot take the address of the value returned from the expression. Assign the returned value to a let-bound value before taking the address. -neg106.fs(17,14,17,68): typecheck error FS0041: No overloads match for method 'CompareExchange'. +neg106.fs(17,43,17,58): typecheck error FS0041: No overloads match for method 'CompareExchange'. Known types of arguments: inref * int * int @@ -41,7 +41,7 @@ but given a 'inref' The type 'ByRefKinds.InOut' does not match the type 'ByRefKinds.In' -neg106.fs(40,18,40,32): typecheck error FS0041: No overloads match for method 'M'. +neg106.fs(40,20,40,21): typecheck error FS0041: No overloads match for method 'M'. Known types of arguments: string * inref @@ -49,7 +49,7 @@ Available overloads: - static member C.M: a: int * [] x: byref -> unit // Argument 'a' doesn't match - static member C.M: a: string * [] x: byref -> unit // Argument 'x' doesn't match -neg106.fs(41,19,41,31): typecheck error FS0041: No overloads match for method 'M'. +neg106.fs(41,21,41,22): typecheck error FS0041: No overloads match for method 'M'. Known types of arguments: int * inref diff --git a/tests/fsharp/typecheck/sigs/neg106.vsbsl b/tests/fsharp/typecheck/sigs/neg106.vsbsl index f25e10e776e..ac5afb1d58c 100644 --- a/tests/fsharp/typecheck/sigs/neg106.vsbsl +++ b/tests/fsharp/typecheck/sigs/neg106.vsbsl @@ -1,7 +1,7 @@ neg106.fs(8,59,8,61): typecheck error FS3230: A value defined in a module must be mutable in order to take its address, e.g. 'let mutable x = ...' -neg106.fs(13,18,13,72): typecheck error FS0041: No overloads match for method 'CompareExchange'. +neg106.fs(13,47,13,62): typecheck error FS0041: No overloads match for method 'CompareExchange'. Known types of arguments: inref * int * int @@ -16,7 +16,7 @@ Available overloads: neg106.fs(17,59,17,61): typecheck error FS3236: Cannot take the address of the value returned from the expression. Assign the returned value to a let-bound value before taking the address. -neg106.fs(17,14,17,68): typecheck error FS0041: No overloads match for method 'CompareExchange'. +neg106.fs(17,43,17,58): typecheck error FS0041: No overloads match for method 'CompareExchange'. Known types of arguments: inref * int * int @@ -41,7 +41,7 @@ but given a 'inref' The type 'ByRefKinds.InOut' does not match the type 'ByRefKinds.In' -neg106.fs(40,18,40,32): typecheck error FS0041: No overloads match for method 'M'. +neg106.fs(40,20,40,21): typecheck error FS0041: No overloads match for method 'M'. Known types of arguments: string * inref @@ -49,7 +49,7 @@ Available overloads: - static member C.M: a: int * [] x: byref -> unit // Argument 'a' doesn't match - static member C.M: a: string * [] x: byref -> unit // Argument 'x' doesn't match -neg106.fs(41,19,41,31): typecheck error FS0041: No overloads match for method 'M'. +neg106.fs(41,21,41,22): typecheck error FS0041: No overloads match for method 'M'. Known types of arguments: int * inref diff --git a/tests/fsharp/typecheck/sigs/neg131.bsl b/tests/fsharp/typecheck/sigs/neg131.bsl index 063534f985c..3f3c17376d7 100644 --- a/tests/fsharp/typecheck/sigs/neg131.bsl +++ b/tests/fsharp/typecheck/sigs/neg131.bsl @@ -1,5 +1,5 @@ -neg131.fs(15,9,15,55): typecheck error FS0041: A unique overload for method 'SomeMethod' could not be determined based on type information prior to this program point. A type annotation may be needed. +neg131.fs(15,27,15,37): typecheck error FS0041: A unique overload for method 'SomeMethod' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * ('b -> int) diff --git a/tests/fsharp/typecheck/sigs/neg132.bsl b/tests/fsharp/typecheck/sigs/neg132.bsl index d878fd49f81..c350f2c4be4 100644 --- a/tests/fsharp/typecheck/sigs/neg132.bsl +++ b/tests/fsharp/typecheck/sigs/neg132.bsl @@ -1,5 +1,5 @@ -neg132.fs(15,9,15,55): typecheck error FS0041: A unique overload for method 'SomeMethod' could not be determined based on type information prior to this program point. A type annotation may be needed. +neg132.fs(15,27,15,37): typecheck error FS0041: A unique overload for method 'SomeMethod' could not be determined based on type information prior to this program point. A type annotation may be needed. Known types of arguments: 'a * ('b -> int) diff --git a/tests/fsharp/typecheck/sigs/neg20.bsl b/tests/fsharp/typecheck/sigs/neg20.bsl index 6e5923f6116..80289ffb7c5 100644 --- a/tests/fsharp/typecheck/sigs/neg20.bsl +++ b/tests/fsharp/typecheck/sigs/neg20.bsl @@ -109,7 +109,7 @@ neg20.fs(128,19,128,22): typecheck error FS0001: This expression was expected to but here has type 'obj' -neg20.fs(131,5,131,24): typecheck error FS0041: No overloads match for method 'OM3'. +neg20.fs(131,12,131,15): typecheck error FS0041: No overloads match for method 'OM3'. Known types of arguments: string * obj @@ -145,7 +145,7 @@ neg20.fs(166,13,166,35): typecheck error FS0502: The member or object constructo neg20.fs(167,13,167,31): typecheck error FS0502: The member or object constructor 'M5' takes 2 type argument(s) but is here given 1. The required signature is 'member C.M5<'b,'c> : y: 'a * z: 'b -> int'. -neg20.fs(182,14,182,31): typecheck error FS0041: No overloads match for method 'M'. +neg20.fs(182,17,182,18): typecheck error FS0041: No overloads match for method 'M'. Known types of arguments: string * objnull @@ -179,7 +179,7 @@ neg20.fs(184,34,184,39): typecheck error FS0001: This expression was expected to but here has type 'objnull' -neg20.fs(188,14,188,31): typecheck error FS0041: No overloads match for method 'M'. +neg20.fs(188,17,188,18): typecheck error FS0041: No overloads match for method 'M'. Known types of arguments: string * objnull @@ -327,7 +327,7 @@ neg20.fs(319,8,319,17): typecheck error FS3132: This type definition may not hav neg20.fs(322,8,322,18): typecheck error FS3132: This type definition may not have the 'CLIMutable' attribute. Only record types may have this attribute. -neg20.fs(335,11,335,24): typecheck error FS0041: A unique overload for method 'String' could not be determined based on type information prior to this program point. A type annotation may be needed. +neg20.fs(335,18,335,24): typecheck error FS0041: A unique overload for method 'String' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: 'a0 @@ -336,7 +336,7 @@ Candidates: - System.String(value: nativeptr) : System.String - System.String(value: nativeptr) : System.String -neg20.fs(336,11,336,22): typecheck error FS0041: A unique overload for method 'Guid' could not be determined based on type information prior to this program point. A type annotation may be needed. +neg20.fs(336,18,336,22): typecheck error FS0041: A unique overload for method 'Guid' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: 'a0 diff --git a/tests/fsharp/typecheck/sigs/neg30.bsl b/tests/fsharp/typecheck/sigs/neg30.bsl index 67f4ba2cd53..2b9aa42854f 100644 --- a/tests/fsharp/typecheck/sigs/neg30.bsl +++ b/tests/fsharp/typecheck/sigs/neg30.bsl @@ -23,4 +23,6 @@ neg30.fs(63,13,63,27): typecheck error FS0001: A generic construct requires that neg30.fs(71,12,71,35): typecheck error FS0120: hello! -neg30.fs(78,13,78,37): typecheck error FS10021: hello! +neg30.fs(71,34,71,35): typecheck error FS0120: hello! + +neg30.fs(78,36,78,37): typecheck error FS10021: hello! diff --git a/tests/fsharp/typecheck/sigs/neg45.bsl b/tests/fsharp/typecheck/sigs/neg45.bsl index 18de4770ac8..df14a86a620 100644 --- a/tests/fsharp/typecheck/sigs/neg45.bsl +++ b/tests/fsharp/typecheck/sigs/neg45.bsl @@ -1,11 +1,11 @@ -neg45.fs(12,5,12,11): typecheck error FS0685: The generic function 'Foo' must be given explicit type argument(s) +neg45.fs(12,8,12,11): typecheck error FS0685: The generic function 'Foo' must be given explicit type argument(s) -neg45.fs(14,5,14,11): typecheck error FS0685: The generic function 'Foo' must be given explicit type argument(s) +neg45.fs(14,8,14,11): typecheck error FS0685: The generic function 'Foo' must be given explicit type argument(s) -neg45.fs(23,5,23,11): typecheck error FS0685: The generic function 'Foo' must be given explicit type argument(s) +neg45.fs(23,8,23,11): typecheck error FS0685: The generic function 'Foo' must be given explicit type argument(s) -neg45.fs(25,5,25,11): typecheck error FS0685: The generic function 'Foo' must be given explicit type argument(s) +neg45.fs(25,8,25,11): typecheck error FS0685: The generic function 'Foo' must be given explicit type argument(s) neg45.fs(34,25,34,26): typecheck error FS0465: Type inference problem too complicated (maximum iteration depth reached). Consider adding further type annotations. @@ -61,7 +61,7 @@ neg45.fs(80,20,80,22): typecheck error FS0340: The signature and implementation neg45.fs(81,35,81,40): typecheck error FS0001: A type parameter is missing a constraint 'when 'T :> System.IComparable' -neg45.fs(89,26,89,40): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +neg45.fs(89,28,89,29): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: R1 @@ -69,7 +69,7 @@ Candidates: - member D.M: 'a -> 'b - member D.M: 'a -> 'b -neg45.fs(97,26,97,55): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +neg45.fs(97,28,97,29): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: (R1 * R1) @@ -77,7 +77,7 @@ Candidates: - member D.M: 'a -> 'b - member D.M: 'a -> 'b -neg45.fs(104,26,104,31): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. +neg45.fs(104,28,104,29): typecheck error FS0041: A unique overload for method 'M' could not be determined based on type information prior to this program point. A type annotation may be needed. Known type of argument: int diff --git a/tests/fsharp/typecheck/sigs/neg70.vsbsl b/tests/fsharp/typecheck/sigs/neg70.vsbsl index c392fc98985..ee570a41e50 100644 --- a/tests/fsharp/typecheck/sigs/neg70.vsbsl +++ b/tests/fsharp/typecheck/sigs/neg70.vsbsl @@ -1,11 +1,13 @@ neg70.fsx(109,64,109,65): parse error FS0010: Unexpected symbol ')' in binding. Expected incomplete structured construct at or before this point or other token. +neg70.fsx(109,64,109,65): parse error FS0010: Unexpected symbol ')' in binding. Expected incomplete structured construct at or before this point or other token. + neg70.fsx(107,29,107,69): typecheck error FS0507: No accessible member or object constructor named 'Rectangle' takes 0 arguments. Note the call to this member also provides 1 named arguments. neg70.fsx(108,39,108,40): typecheck error FS0039: The value or constructor 'y' is not defined. -neg70.fsx(110,18,110,43): typecheck error FS0041: No overloads match for method 'FillEllipse'. +neg70.fsx(110,20,110,31): typecheck error FS0041: No overloads match for method 'FillEllipse'. Known types of arguments: Brush * (int * bool * bool * bool) From 563bd0e0cc4d8155819424c831ca4ef02fedff8d Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Tue, 26 May 2026 15:17:10 +0200 Subject: [PATCH 12/72] [main] Update dependencies from dotnet/arcade (#19794) * Update dependencies from https://github.com/dotnet/arcade build 20260519.10 On relative base path root Microsoft.DotNet.Arcade.Sdk From Version 10.0.0-beta.26269.2 -> To Version 10.0.0-beta.26269.10 * Update dependencies from https://github.com/dotnet/arcade build 20260525.1 On relative base path root Microsoft.DotNet.Arcade.Sdk From Version 10.0.0-beta.26269.2 -> To Version 10.0.0-beta.26275.1 --------- Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.props | 2 +- eng/Version.Details.xml | 4 ++-- .../steps/source-index-stage1-publish.yml | 4 ++-- eng/common/templates/steps/vmr-sync.yml | 20 +++++++++---------- global.json | 2 +- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/eng/Version.Details.props b/eng/Version.Details.props index 7f6cdf3d02c..4fbfbef6976 100644 --- a/eng/Version.Details.props +++ b/eng/Version.Details.props @@ -6,7 +6,7 @@ This file should be imported by eng/Versions.props - 10.0.0-beta.26269.2 + 10.0.0-beta.26275.1 18.8.0-preview-26269-11 18.8.0-preview-26269-11 diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index d1e5b5c3bfe..37b08692d3c 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -76,9 +76,9 @@ - + https://github.com/dotnet/arcade - 96a58d029003171c2302b951688fc87464b197f5 + c6213589e6917c4508c966c282eedbe4efda13e5 https://dev.azure.com/dnceng/internal/_git/dotnet-optimization diff --git a/eng/common/core-templates/steps/source-index-stage1-publish.yml b/eng/common/core-templates/steps/source-index-stage1-publish.yml index e9a694afa58..6e7666b4dcf 100644 --- a/eng/common/core-templates/steps/source-index-stage1-publish.yml +++ b/eng/common/core-templates/steps/source-index-stage1-publish.yml @@ -14,8 +14,8 @@ steps: workingDirectory: $(Agent.TempDirectory) - script: | - $(Agent.TempDirectory)/dotnet/dotnet tool install BinLogToSln --version ${{parameters.sourceIndexProcessBinlogPackageVersion}} --add-source ${{parameters.SourceIndexPackageSource}} --tool-path $(Agent.TempDirectory)/.source-index/tools - $(Agent.TempDirectory)/dotnet/dotnet tool install UploadIndexStage1 --version ${{parameters.sourceIndexUploadPackageVersion}} --add-source ${{parameters.SourceIndexPackageSource}} --tool-path $(Agent.TempDirectory)/.source-index/tools + $(Agent.TempDirectory)/dotnet/dotnet tool install BinLogToSln --version ${{parameters.sourceIndexProcessBinlogPackageVersion}} --source ${{parameters.SourceIndexPackageSource}} --tool-path $(Agent.TempDirectory)/.source-index/tools + $(Agent.TempDirectory)/dotnet/dotnet tool install UploadIndexStage1 --version ${{parameters.sourceIndexUploadPackageVersion}} --source ${{parameters.SourceIndexPackageSource}} --tool-path $(Agent.TempDirectory)/.source-index/tools displayName: "Source Index: Download netsourceindex Tools" # Set working directory to temp directory so 'dotnet' doesn't try to use global.json and use the repo's sdk. workingDirectory: $(Agent.TempDirectory) diff --git a/eng/common/templates/steps/vmr-sync.yml b/eng/common/templates/steps/vmr-sync.yml index eb619c50268..cdc6a28ff1f 100644 --- a/eng/common/templates/steps/vmr-sync.yml +++ b/eng/common/templates/steps/vmr-sync.yml @@ -45,11 +45,11 @@ steps: workingDirectory: ${{ parameters.vmrPath }} - script: | - ./eng/common/vmr-sync.sh \ - --vmr ${{ parameters.vmrPath }} \ - --tmp $(Agent.TempDirectory) \ - --azdev-pat '$(dn-bot-all-orgs-code-r)' \ - --ci \ + ./eng/common/vmr-sync.sh \ + --vmr ${{ parameters.vmrPath }} \ + --tmp $(Agent.TempDirectory) \ + --azdev-pat '$(AzdoToken)' \ + --ci \ --debug if [ "$?" -ne 0 ]; then @@ -67,11 +67,11 @@ steps: condition: eq(variables['Agent.OS'], 'Windows_NT') - powershell: | - ./eng/common/vmr-sync.ps1 ` - -vmr ${{ parameters.vmrPath }} ` - -tmp $(Agent.TempDirectory) ` - -azdevPat '$(dn-bot-all-orgs-code-r)' ` - -ci ` + ./eng/common/vmr-sync.ps1 ` + -vmr ${{ parameters.vmrPath }} ` + -tmp $(Agent.TempDirectory) ` + -azdevPat '$(AzdoToken)' ` + -ci ` -debugOutput if ($LASTEXITCODE -ne 0) { diff --git a/global.json b/global.json index 98c0fe4af4d..d1ae62fb540 100644 --- a/global.json +++ b/global.json @@ -22,7 +22,7 @@ "xcopy-msbuild": "18.0.0" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.26269.2", + "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.26275.1", "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.23255.2" } } From c6d4a5c7f3e58e82313636540b9e52565ac0b950 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Tue, 26 May 2026 15:17:14 +0200 Subject: [PATCH 13/72] Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20260522.1 (#19793) On relative base path root optimization.linux-arm64.MIBC.Runtime , optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-arm64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime From Version 1.0.0-prerelease.26180.1 -> To Version 1.0.0-prerelease.26272.1 Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.props | 10 +++++----- eng/Version.Details.xml | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/eng/Version.Details.props b/eng/Version.Details.props index 4fbfbef6976..c8aabbad15d 100644 --- a/eng/Version.Details.props +++ b/eng/Version.Details.props @@ -13,11 +13,11 @@ This file should be imported by eng/Versions.props 18.8.0-preview-26269-11 18.8.0-preview-26269-11 - 1.0.0-prerelease.26180.1 - 1.0.0-prerelease.26180.1 - 1.0.0-prerelease.26180.1 - 1.0.0-prerelease.26180.1 - 1.0.0-prerelease.26180.1 + 1.0.0-prerelease.26272.1 + 1.0.0-prerelease.26272.1 + 1.0.0-prerelease.26272.1 + 1.0.0-prerelease.26272.1 + 1.0.0-prerelease.26272.1 5.8.0-1.26268.6 5.8.0-1.26268.6 diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 37b08692d3c..2652b19fb5d 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -80,25 +80,25 @@ https://github.com/dotnet/arcade c6213589e6917c4508c966c282eedbe4efda13e5 - + https://dev.azure.com/dnceng/internal/_git/dotnet-optimization - 9f55ee44f6d99b78f3e80f77e2ed73fb73b8f63b + dc7a7b2513eb974ac651682ab4aac0a62edace64 - + https://dev.azure.com/dnceng/internal/_git/dotnet-optimization - 9f55ee44f6d99b78f3e80f77e2ed73fb73b8f63b + dc7a7b2513eb974ac651682ab4aac0a62edace64 - + https://dev.azure.com/dnceng/internal/_git/dotnet-optimization - 9f55ee44f6d99b78f3e80f77e2ed73fb73b8f63b + dc7a7b2513eb974ac651682ab4aac0a62edace64 - + https://dev.azure.com/dnceng/internal/_git/dotnet-optimization - 9f55ee44f6d99b78f3e80f77e2ed73fb73b8f63b + dc7a7b2513eb974ac651682ab4aac0a62edace64 - + https://dev.azure.com/dnceng/internal/_git/dotnet-optimization - 9f55ee44f6d99b78f3e80f77e2ed73fb73b8f63b + dc7a7b2513eb974ac651682ab4aac0a62edace64 From 2bd96dae76c5be11cae6905f7dc7431b595bc31f Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Tue, 26 May 2026 15:17:18 +0200 Subject: [PATCH 14/72] [main] Update dependencies from dotnet/roslyn (#19780) * Update dependencies from https://github.com/dotnet/roslyn build 20260520.10 On relative base path root Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.Compilers , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.EditorFeatures , Microsoft.CodeAnalysis.EditorFeatures.Text , Microsoft.CodeAnalysis.ExternalAccess.FSharp , Microsoft.CodeAnalysis.Features , Microsoft.VisualStudio.LanguageServices From Version 5.8.0-1.26268.6 -> To Version 5.8.0-1.26270.10 * Update dependencies from https://github.com/dotnet/roslyn build 20260521.1 On relative base path root Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.Compilers , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.EditorFeatures , Microsoft.CodeAnalysis.EditorFeatures.Text , Microsoft.CodeAnalysis.ExternalAccess.FSharp , Microsoft.CodeAnalysis.Features , Microsoft.VisualStudio.LanguageServices From Version 5.8.0-1.26268.6 -> To Version 5.8.0-1.26271.1 * Update dependencies from https://github.com/dotnet/roslyn build 20260522.14 On relative base path root Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.Compilers , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.EditorFeatures , Microsoft.CodeAnalysis.EditorFeatures.Text , Microsoft.CodeAnalysis.ExternalAccess.FSharp , Microsoft.CodeAnalysis.Features , Microsoft.VisualStudio.LanguageServices From Version 5.8.0-1.26268.6 -> To Version 5.8.0-1.26272.14 * Update dependencies from https://github.com/dotnet/roslyn build 20260523.3 On relative base path root Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.Compilers , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.EditorFeatures , Microsoft.CodeAnalysis.EditorFeatures.Text , Microsoft.CodeAnalysis.ExternalAccess.FSharp , Microsoft.CodeAnalysis.Features , Microsoft.VisualStudio.LanguageServices From Version 5.8.0-1.26268.6 -> To Version 5.8.0-1.26273.3 * Update dependencies from https://github.com/dotnet/roslyn build 20260524.3 On relative base path root Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.Compilers , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.EditorFeatures , Microsoft.CodeAnalysis.EditorFeatures.Text , Microsoft.CodeAnalysis.ExternalAccess.FSharp , Microsoft.CodeAnalysis.Features , Microsoft.VisualStudio.LanguageServices From Version 5.8.0-1.26268.6 -> To Version 5.8.0-1.26274.3 * Update dependencies from https://github.com/dotnet/roslyn build 20260524.20 On relative base path root Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.Compilers , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.EditorFeatures , Microsoft.CodeAnalysis.EditorFeatures.Text , Microsoft.CodeAnalysis.ExternalAccess.FSharp , Microsoft.CodeAnalysis.Features , Microsoft.VisualStudio.LanguageServices From Version 5.8.0-1.26268.6 -> To Version 5.8.0-1.26274.20 --------- Co-authored-by: dotnet-maestro[bot] Co-authored-by: Tomas Grosup --- eng/Version.Details.props | 16 ++++++++-------- eng/Version.Details.xml | 32 ++++++++++++++++---------------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/eng/Version.Details.props b/eng/Version.Details.props index c8aabbad15d..a9c48624f66 100644 --- a/eng/Version.Details.props +++ b/eng/Version.Details.props @@ -19,14 +19,14 @@ This file should be imported by eng/Versions.props 1.0.0-prerelease.26272.1 1.0.0-prerelease.26272.1 - 5.8.0-1.26268.6 - 5.8.0-1.26268.6 - 5.8.0-1.26268.6 - 5.8.0-1.26268.6 - 5.8.0-1.26268.6 - 5.8.0-1.26268.6 - 5.8.0-1.26268.6 - 5.8.0-1.26268.6 + 5.8.0-1.26274.20 + 5.8.0-1.26274.20 + 5.8.0-1.26274.20 + 5.8.0-1.26274.20 + 5.8.0-1.26274.20 + 5.8.0-1.26274.20 + 5.8.0-1.26274.20 + 5.8.0-1.26274.20 10.0.2 10.0.2 diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 2652b19fb5d..65a83c5ae44 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -18,37 +18,37 @@ https://github.com/dotnet/msbuild 911bea0b57d3613eb9c29f49ff9858d03884c397 - + https://github.com/dotnet/roslyn - 256895f3327e7e2f3f7e94248f227a47c698c1e5 + 560c1cca10d974ff096cb051d45c1330420e8e6a - + https://github.com/dotnet/roslyn - 256895f3327e7e2f3f7e94248f227a47c698c1e5 + 560c1cca10d974ff096cb051d45c1330420e8e6a - + https://github.com/dotnet/roslyn - 256895f3327e7e2f3f7e94248f227a47c698c1e5 + 560c1cca10d974ff096cb051d45c1330420e8e6a - + https://github.com/dotnet/roslyn - 256895f3327e7e2f3f7e94248f227a47c698c1e5 + 560c1cca10d974ff096cb051d45c1330420e8e6a - + https://github.com/dotnet/roslyn - 256895f3327e7e2f3f7e94248f227a47c698c1e5 + 560c1cca10d974ff096cb051d45c1330420e8e6a - + https://github.com/dotnet/roslyn - 256895f3327e7e2f3f7e94248f227a47c698c1e5 + 560c1cca10d974ff096cb051d45c1330420e8e6a - + https://github.com/dotnet/roslyn - 256895f3327e7e2f3f7e94248f227a47c698c1e5 + 560c1cca10d974ff096cb051d45c1330420e8e6a - + https://github.com/dotnet/roslyn - 256895f3327e7e2f3f7e94248f227a47c698c1e5 + 560c1cca10d974ff096cb051d45c1330420e8e6a From 7d5c77134fd9077a952f263e22842e037f3cf8cb Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Tue, 26 May 2026 15:17:23 +0200 Subject: [PATCH 15/72] [main] Update dependencies from dotnet/msbuild (#19779) * Update dependencies from https://github.com/dotnet/msbuild build 20260520.4 On relative base path root Microsoft.Build , Microsoft.Build.Framework , Microsoft.Build.Tasks.Core , Microsoft.Build.Utilities.Core From Version 18.8.0-preview-26269-11 -> To Version 18.8.0-preview-26270-04 * Update dependencies from https://github.com/dotnet/msbuild build 20260521.6 On relative base path root Microsoft.Build , Microsoft.Build.Framework , Microsoft.Build.Tasks.Core , Microsoft.Build.Utilities.Core From Version 18.8.0-preview-26269-11 -> To Version 18.8.0-preview-26271-06 * Update dependencies from https://github.com/dotnet/msbuild build 20260522.6 On relative base path root Microsoft.Build , Microsoft.Build.Framework , Microsoft.Build.Tasks.Core , Microsoft.Build.Utilities.Core From Version 18.8.0-preview-26269-11 -> To Version 18.8.0-preview-26272-06 * Update dependencies from https://github.com/dotnet/msbuild build 20260525.9 On relative base path root Microsoft.Build , Microsoft.Build.Framework , Microsoft.Build.Tasks.Core , Microsoft.Build.Utilities.Core From Version 18.8.0-preview-26269-11 -> To Version 18.8.0-preview-26275-09 --------- Co-authored-by: dotnet-maestro[bot] Co-authored-by: Tomas Grosup --- eng/Version.Details.props | 8 ++++---- eng/Version.Details.xml | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/eng/Version.Details.props b/eng/Version.Details.props index a9c48624f66..82ad65afb5a 100644 --- a/eng/Version.Details.props +++ b/eng/Version.Details.props @@ -8,10 +8,10 @@ This file should be imported by eng/Versions.props 10.0.0-beta.26275.1 - 18.8.0-preview-26269-11 - 18.8.0-preview-26269-11 - 18.8.0-preview-26269-11 - 18.8.0-preview-26269-11 + 18.8.0-preview-26275-09 + 18.8.0-preview-26275-09 + 18.8.0-preview-26275-09 + 18.8.0-preview-26275-09 1.0.0-prerelease.26272.1 1.0.0-prerelease.26272.1 diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 65a83c5ae44..07b9c1ce026 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -2,21 +2,21 @@ - + https://github.com/dotnet/msbuild - 911bea0b57d3613eb9c29f49ff9858d03884c397 + 4ea8215937724cd480a29c30187195b5cbda7486 - + https://github.com/dotnet/msbuild - 911bea0b57d3613eb9c29f49ff9858d03884c397 + 4ea8215937724cd480a29c30187195b5cbda7486 - + https://github.com/dotnet/msbuild - 911bea0b57d3613eb9c29f49ff9858d03884c397 + 4ea8215937724cd480a29c30187195b5cbda7486 - + https://github.com/dotnet/msbuild - 911bea0b57d3613eb9c29f49ff9858d03884c397 + 4ea8215937724cd480a29c30187195b5cbda7486 https://github.com/dotnet/roslyn From 5d50ace765c880a9cbb8647c9529a8fc2751b2a5 Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Wed, 27 May 2026 21:34:49 +0200 Subject: [PATCH 16/72] Override System.Security.Cryptography.Xml to 10.0.8 (#19830) * Override System.Security.Cryptography.Xml to 10.0.8 Transitive dependency from Microsoft.Build.Tasks.Core pins System.Security.Cryptography.Xml at 10.0.4. Add direct reference in FSharp.Build to override to 10.0.8. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix MSB3277: mark Cryptography.Xml as PrivateAssets to prevent net472 conflicts The System.Security.Cryptography.Xml 10.0.8 override pulls transitive dependencies (Microsoft.Bcl.Cryptography, System.Formats.Asn1) that conflict with System.ValueTuple on net472 when flowing through ProjectReference from FSharp.Build to fsc.fsproj. PrivateAssets="all" prevents the package from flowing to consuming projects while keeping it available to FSharp.Build at build-task runtime. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- eng/Versions.props | 1 + src/FSharp.Build/FSharp.Build.fsproj | 1 + 2 files changed, 2 insertions(+) diff --git a/eng/Versions.props b/eng/Versions.props index 64e545f6118..9f6b9d7b201 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -89,6 +89,7 @@ 4.6.1 4.6.3 6.1.2 + 10.0.8 diff --git a/src/FSharp.Build/FSharp.Build.fsproj b/src/FSharp.Build/FSharp.Build.fsproj index e249e4e0f1a..d7f814ce261 100644 --- a/src/FSharp.Build/FSharp.Build.fsproj +++ b/src/FSharp.Build/FSharp.Build.fsproj @@ -89,6 +89,7 @@ + From e11c2fbe6b3202da40db3af01dcce9bc78a9ab59 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Thu, 28 May 2026 10:54:00 +0200 Subject: [PATCH 17/72] Change protected-files policy to 'allowed' for labelops-pr-maintenance workflow (#19783) The workflow resolves merge conflicts by merging from main, which naturally includes changes to protected files. The previous 'fallback-to-issue' policy blocked these normal merge operations. The prompt still has "Never modify .github/**" as a hard rule to prevent the agent from inventing changes. --- .github/aw/actions-lock.json | 6 +- .../labelops-pr-maintenance.lock.yml | 230 +++++++++++------- .github/workflows/labelops-pr-maintenance.md | 4 +- 3 files changed, 144 insertions(+), 96 deletions(-) diff --git a/.github/aw/actions-lock.json b/.github/aw/actions-lock.json index e9fa20a8424..fcedc685f32 100644 --- a/.github/aw/actions-lock.json +++ b/.github/aw/actions-lock.json @@ -10,10 +10,10 @@ "version": "v9", "sha": "3a2844b7e9c422d3c10d287c895573f7108da1b3" }, - "github/gh-aw-actions/setup@v0.68.3": { + "github/gh-aw-actions/setup@v0.74.8": { "repo": "github/gh-aw-actions/setup", - "version": "v0.68.3", - "sha": "ba90f2186d7ad780ec640f364005fa24e797b360" + "version": "v0.74.8", + "sha": "efa55847f72aadb03490d955263ff911bf758700" }, "github/gh-aw/actions/setup@v0.67.2": { "repo": "github/gh-aw/actions/setup", diff --git a/.github/workflows/labelops-pr-maintenance.lock.yml b/.github/workflows/labelops-pr-maintenance.lock.yml index 5092d2d4f7e..bc69a47da5b 100644 --- a/.github/workflows/labelops-pr-maintenance.lock.yml +++ b/.github/workflows/labelops-pr-maintenance.lock.yml @@ -1,5 +1,5 @@ -# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"065d23c1ff3b0f1feb4c0613da92648112fdb1e3c5ecb74e30a0cc1ab171cf7d","compiler_version":"v0.72.1","strict":true,"agent_id":"copilot"} -# gh-aw-manifest: {"version":1,"secrets":["COPILOT_GITHUB_TOKEN","GH_AW_CI_TRIGGER_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/checkout","sha":"de0fac2e4500dabe0009e67214ff5f5447ce83dd","version":"v6.0.2"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/setup-node","sha":"48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e","version":"v6.4.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"},{"repo":"github/gh-aw-actions/setup","sha":"bc56a0cad2f450c562810785ef38649c04db812a","version":"v0.72.1"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.25.41"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.41"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.25.41"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.3.6","digest":"sha256:2bb8eef86006a4c5963c55616a9c51c32f27bfdecb023b8aa6f91f6718d9171c","pinned_image":"ghcr.io/github/gh-aw-mcpg:v0.3.6@sha256:2bb8eef86006a4c5963c55616a9c51c32f27bfdecb023b8aa6f91f6718d9171c"},{"image":"ghcr.io/github/github-mcp-server:v1.0.3","digest":"sha256:2ac27ef03461ef2b877031b838a7d1fd7f12b12d4ace7796d8cad91446d55959","pinned_image":"ghcr.io/github/github-mcp-server:v1.0.3@sha256:2ac27ef03461ef2b877031b838a7d1fd7f12b12d4ace7796d8cad91446d55959"},{"image":"node:lts-alpine","digest":"sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f","pinned_image":"node:lts-alpine@sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f"}]} +# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"6ea17bdbe818e2f36b27d8a7d5320b7f9ce64f2f959116b09bb01401bece519a","compiler_version":"v0.74.8","strict":true,"agent_id":"copilot"} +# gh-aw-manifest: {"version":1,"secrets":["COPILOT_GITHUB_TOKEN","GH_AW_CI_TRIGGER_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/checkout","sha":"de0fac2e4500dabe0009e67214ff5f5447ce83dd","version":"v6.0.2"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/setup-node","sha":"48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e","version":"v6.4.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"},{"repo":"github/gh-aw-actions/setup","sha":"efa55847f72aadb03490d955263ff911bf758700","version":"v0.74.8"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.25.49"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.49"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.25.49"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.3.9","digest":"sha256:64828b42a4482f58fab16509d7f8f495a6d97c972a98a68aff20543531ac0388","pinned_image":"ghcr.io/github/gh-aw-mcpg:v0.3.9@sha256:64828b42a4482f58fab16509d7f8f495a6d97c972a98a68aff20543531ac0388"},{"image":"ghcr.io/github/github-mcp-server:v1.0.4"},{"image":"node:lts-alpine","digest":"sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f","pinned_image":"node:lts-alpine@sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f"}]} # ___ _ _ # / _ \ | | (_) # | |_| | __ _ ___ _ __ | |_ _ ___ @@ -14,7 +14,7 @@ # \ /\ / (_) | | | | ( | | | | (_) \ V V /\__ \ # \/ \/ \___/|_| |_|\_\|_| |_|\___/ \_/\_/ |___/ # -# This file was automatically generated by gh-aw (v0.72.1). DO NOT EDIT. +# This file was automatically generated by gh-aw (v0.74.8). DO NOT EDIT. # # To update this file, edit the corresponding .md file and run: # gh aw compile @@ -42,18 +42,18 @@ # - actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 # - actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 # - actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 -# - github/gh-aw-actions/setup@bc56a0cad2f450c562810785ef38649c04db812a # v0.72.1 +# - github/gh-aw-actions/setup@efa55847f72aadb03490d955263ff911bf758700 # v0.74.8 # # Container images used: -# - ghcr.io/github/gh-aw-firewall/agent:0.25.41 -# - ghcr.io/github/gh-aw-firewall/api-proxy:0.25.41 -# - ghcr.io/github/gh-aw-firewall/squid:0.25.41 -# - ghcr.io/github/gh-aw-mcpg:v0.3.6@sha256:2bb8eef86006a4c5963c55616a9c51c32f27bfdecb023b8aa6f91f6718d9171c -# - ghcr.io/github/github-mcp-server:v1.0.3@sha256:2ac27ef03461ef2b877031b838a7d1fd7f12b12d4ace7796d8cad91446d55959 +# - ghcr.io/github/gh-aw-firewall/agent:0.25.49 +# - ghcr.io/github/gh-aw-firewall/api-proxy:0.25.49 +# - ghcr.io/github/gh-aw-firewall/squid:0.25.49 +# - ghcr.io/github/gh-aw-mcpg:v0.3.9@sha256:64828b42a4482f58fab16509d7f8f495a6d97c972a98a68aff20543531ac0388 +# - ghcr.io/github/github-mcp-server:v1.0.4 # - node:lts-alpine@sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f name: "LabelOps — PR Maintenance" -"on": +on: schedule: - cron: "49 */3 * * *" # Friendly format: every 3h (scattered) @@ -61,7 +61,7 @@ name: "LabelOps — PR Maintenance" inputs: aw_context: default: "" - description: Agent caller context (used internally by Agentic Workflows). + description: "Agent caller context (used internally by Agentic Workflows)." required: false type: string @@ -86,35 +86,38 @@ jobs: lockdown_check_failed: ${{ steps.generate_aw_info.outputs.lockdown_check_failed == 'true' }} model: ${{ steps.generate_aw_info.outputs.model }} secret_verification_result: ${{ steps.validate-secret.outputs.verification_result }} + setup-parent-span-id: ${{ steps.setup.outputs.parent-span-id || steps.setup.outputs.span-id }} + setup-span-id: ${{ steps.setup.outputs.span-id }} setup-trace-id: ${{ steps.setup.outputs.trace-id }} stale_lock_file_failed: ${{ steps.check-lock-file.outputs.stale_lock_file_failed == 'true' }} steps: - name: Setup Scripts id: setup - uses: github/gh-aw-actions/setup@bc56a0cad2f450c562810785ef38649c04db812a # v0.72.1 + uses: github/gh-aw-actions/setup@efa55847f72aadb03490d955263ff911bf758700 # v0.74.8 with: destination: ${{ runner.temp }}/gh-aw/actions job-name: ${{ github.job }} env: GH_AW_SETUP_WORKFLOW_NAME: "LabelOps — PR Maintenance" GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/labelops-pr-maintenance.lock.yml@${{ github.ref }} - GH_AW_INFO_VERSION: "1.0.40" + GH_AW_INFO_VERSION: "1.0.48" + GH_AW_INFO_ENGINE_ID: "copilot" - name: Generate agentic run info id: generate_aw_info env: GH_AW_INFO_ENGINE_ID: "copilot" GH_AW_INFO_ENGINE_NAME: "GitHub Copilot CLI" - GH_AW_INFO_MODEL: ${{ vars.GH_AW_MODEL_AGENT_COPILOT || 'claude-sonnet-4.6' }} - GH_AW_INFO_VERSION: "1.0.40" - GH_AW_INFO_AGENT_VERSION: "1.0.40" - GH_AW_INFO_CLI_VERSION: "v0.72.1" + GH_AW_INFO_MODEL: ${{ vars.GH_AW_MODEL_AGENT_COPILOT || 'claude-sonnet-4.5' }} + GH_AW_INFO_VERSION: "1.0.48" + GH_AW_INFO_AGENT_VERSION: "1.0.48" + GH_AW_INFO_CLI_VERSION: "v0.74.8" GH_AW_INFO_WORKFLOW_NAME: "LabelOps — PR Maintenance" GH_AW_INFO_EXPERIMENTAL: "false" GH_AW_INFO_SUPPORTS_TOOLS_ALLOWLIST: "true" GH_AW_INFO_STAGED: "false" GH_AW_INFO_ALLOWED_DOMAINS: '["defaults","dotnet","dev.azure.com"]' GH_AW_INFO_FIREWALL_ENABLED: "true" - GH_AW_INFO_AWF_VERSION: "v0.25.41" + GH_AW_INFO_AWF_VERSION: "v0.25.49" GH_AW_INFO_AWMG_VERSION: "" GH_AW_INFO_FIREWALL_TYPE: "squid" GH_AW_COMPILED_STRICT: "true" @@ -166,7 +169,7 @@ jobs: - name: Check compile-agentic version uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: - GH_AW_COMPILED_VERSION: "v0.72.1" + GH_AW_COMPILED_VERSION: "v0.74.8" with: script: | const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); @@ -177,11 +180,11 @@ jobs: env: GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt GH_AW_SAFE_OUTPUTS: ${{ runner.temp }}/gh-aw/safeoutputs/outputs.jsonl + GH_AW_EXPR_1A3A194A: ${{ github.event.discussion.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'discussion' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }} + GH_AW_EXPR_463A214A: ${{ github.event.pull_request.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'pull_request' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }} + GH_AW_EXPR_802A9F6A: ${{ github.event.issue.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'issue' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }} + GH_AW_EXPR_FF1D34CE: ${{ github.event.comment.id || fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').comment_id }} GH_AW_GITHUB_ACTOR: ${{ github.actor }} - GH_AW_GITHUB_EVENT_COMMENT_ID: ${{ github.event.comment.id }} - GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER: ${{ github.event.discussion.number }} - GH_AW_GITHUB_EVENT_ISSUE_NUMBER: ${{ github.event.issue.number }} - GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }} GH_AW_GITHUB_REPOSITORY: ${{ github.repository }} GH_AW_GITHUB_RUN_ID: ${{ github.run_id }} GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }} @@ -189,47 +192,47 @@ jobs: run: | bash "${RUNNER_TEMP}/gh-aw/actions/create_prompt_first.sh" { - cat << 'GH_AW_PROMPT_b388f74557525c10_EOF' + cat << 'GH_AW_PROMPT_07e3048c790c30e0_EOF' - GH_AW_PROMPT_b388f74557525c10_EOF + GH_AW_PROMPT_07e3048c790c30e0_EOF cat "${RUNNER_TEMP}/gh-aw/prompts/xpia.md" cat "${RUNNER_TEMP}/gh-aw/prompts/temp_folder_prompt.md" cat "${RUNNER_TEMP}/gh-aw/prompts/markdown.md" cat "${RUNNER_TEMP}/gh-aw/prompts/safe_outputs_prompt.md" - cat << 'GH_AW_PROMPT_b388f74557525c10_EOF' + cat << 'GH_AW_PROMPT_07e3048c790c30e0_EOF' Tools: add_comment(max:5), add_labels(max:3), push_to_pull_request_branch(max:5), dispatch_workflow(max:3), missing_tool, missing_data, noop - GH_AW_PROMPT_b388f74557525c10_EOF + GH_AW_PROMPT_07e3048c790c30e0_EOF cat "${RUNNER_TEMP}/gh-aw/prompts/safe_outputs_push_to_pr_branch.md" - cat << 'GH_AW_PROMPT_b388f74557525c10_EOF' + cat << 'GH_AW_PROMPT_07e3048c790c30e0_EOF' - GH_AW_PROMPT_b388f74557525c10_EOF + GH_AW_PROMPT_07e3048c790c30e0_EOF cat "${RUNNER_TEMP}/gh-aw/prompts/mcp_cli_tools_prompt.md" - cat << 'GH_AW_PROMPT_b388f74557525c10_EOF' + cat << 'GH_AW_PROMPT_07e3048c790c30e0_EOF' The following GitHub context information is available for this workflow: - {{#if __GH_AW_GITHUB_ACTOR__ }} + {{#if github.actor}} - **actor**: __GH_AW_GITHUB_ACTOR__ {{/if}} - {{#if __GH_AW_GITHUB_REPOSITORY__ }} + {{#if github.repository}} - **repository**: __GH_AW_GITHUB_REPOSITORY__ {{/if}} - {{#if __GH_AW_GITHUB_WORKSPACE__ }} + {{#if github.workspace}} - **workspace**: __GH_AW_GITHUB_WORKSPACE__ {{/if}} - {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }} - - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ + {{#if github.event.issue.number || (github.aw.context.item_type == 'issue' && github.aw.context.item_number)}} + - **issue-number**: #__GH_AW_EXPR_802A9F6A__ {{/if}} - {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }} - - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ + {{#if github.event.discussion.number || (github.aw.context.item_type == 'discussion' && github.aw.context.item_number)}} + - **discussion-number**: #__GH_AW_EXPR_1A3A194A__ {{/if}} - {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }} - - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ + {{#if github.event.pull_request.number || (github.aw.context.item_type == 'pull_request' && github.aw.context.item_number)}} + - **pull-request-number**: #__GH_AW_EXPR_463A214A__ {{/if}} - {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }} - - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__ + {{#if github.event.comment.id || github.aw.context.comment_id}} + - **comment-id**: __GH_AW_EXPR_FF1D34CE__ {{/if}} - {{#if __GH_AW_GITHUB_RUN_ID__ }} + {{#if github.run_id}} - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__ {{/if}} - **checkouts**: The following repositories have been checked out and are available in the workspace: @@ -237,12 +240,12 @@ jobs: - **Note**: If a branch you need is not in the list above and is not listed as an additional fetched ref, it has NOT been checked out. For private repositories you cannot fetch it without proper authentication. If the branch is required and not available, exit with an error and ask the user to add it to the `fetch:` option of the `checkout:` configuration (e.g., `fetch: ["refs/pulls/open/*"]` for all open PR refs, or `fetch: ["main", "feature/my-branch"]` for specific branches). - GH_AW_PROMPT_b388f74557525c10_EOF + GH_AW_PROMPT_07e3048c790c30e0_EOF cat "${RUNNER_TEMP}/gh-aw/prompts/github_mcp_tools_with_safeoutputs_prompt.md" - cat << 'GH_AW_PROMPT_b388f74557525c10_EOF' + cat << 'GH_AW_PROMPT_07e3048c790c30e0_EOF' {{#runtime-import .github/workflows/labelops-pr-maintenance.md}} - GH_AW_PROMPT_b388f74557525c10_EOF + GH_AW_PROMPT_07e3048c790c30e0_EOF } > "$GH_AW_PROMPT" - name: Interpolate variables and render templates uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 @@ -259,11 +262,11 @@ jobs: uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt + GH_AW_EXPR_1A3A194A: ${{ github.event.discussion.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'discussion' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }} + GH_AW_EXPR_463A214A: ${{ github.event.pull_request.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'pull_request' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }} + GH_AW_EXPR_802A9F6A: ${{ github.event.issue.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'issue' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }} + GH_AW_EXPR_FF1D34CE: ${{ github.event.comment.id || fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').comment_id }} GH_AW_GITHUB_ACTOR: ${{ github.actor }} - GH_AW_GITHUB_EVENT_COMMENT_ID: ${{ github.event.comment.id }} - GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER: ${{ github.event.discussion.number }} - GH_AW_GITHUB_EVENT_ISSUE_NUMBER: ${{ github.event.issue.number }} - GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }} GH_AW_GITHUB_REPOSITORY: ${{ github.repository }} GH_AW_GITHUB_RUN_ID: ${{ github.run_id }} GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }} @@ -279,11 +282,11 @@ jobs: return await substitutePlaceholders({ file: process.env.GH_AW_PROMPT, substitutions: { + GH_AW_EXPR_1A3A194A: process.env.GH_AW_EXPR_1A3A194A, + GH_AW_EXPR_463A214A: process.env.GH_AW_EXPR_463A214A, + GH_AW_EXPR_802A9F6A: process.env.GH_AW_EXPR_802A9F6A, + GH_AW_EXPR_FF1D34CE: process.env.GH_AW_EXPR_FF1D34CE, GH_AW_GITHUB_ACTOR: process.env.GH_AW_GITHUB_ACTOR, - GH_AW_GITHUB_EVENT_COMMENT_ID: process.env.GH_AW_GITHUB_EVENT_COMMENT_ID, - GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER: process.env.GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER, - GH_AW_GITHUB_EVENT_ISSUE_NUMBER: process.env.GH_AW_GITHUB_EVENT_ISSUE_NUMBER, - GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER: process.env.GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER, GH_AW_GITHUB_REPOSITORY: process.env.GH_AW_GITHUB_REPOSITORY, GH_AW_GITHUB_RUN_ID: process.env.GH_AW_GITHUB_RUN_ID, GH_AW_GITHUB_WORKSPACE: process.env.GH_AW_GITHUB_WORKSPACE, @@ -334,6 +337,7 @@ jobs: agentic_engine_timeout: ${{ steps.detect-copilot-errors.outputs.agentic_engine_timeout || 'false' }} checkout_pr_success: ${{ steps.checkout-pr.outputs.checkout_pr_success || 'true' }} effective_tokens: ${{ steps.parse-mcp-gateway.outputs.effective_tokens }} + effective_tokens_rate_limit_error: ${{ steps.parse-mcp-gateway.outputs.effective_tokens_rate_limit_error || 'false' }} has_patch: ${{ steps.collect_output.outputs.has_patch }} inference_access_error: ${{ steps.detect-copilot-errors.outputs.inference_access_error || 'false' }} mcp_policy_error: ${{ steps.detect-copilot-errors.outputs.mcp_policy_error || 'false' }} @@ -341,19 +345,23 @@ jobs: model_not_supported_error: ${{ steps.detect-copilot-errors.outputs.model_not_supported_error || 'false' }} output: ${{ steps.collect_output.outputs.output }} output_types: ${{ steps.collect_output.outputs.output_types }} + setup-parent-span-id: ${{ steps.setup.outputs.parent-span-id || steps.setup.outputs.span-id }} + setup-span-id: ${{ steps.setup.outputs.span-id }} setup-trace-id: ${{ steps.setup.outputs.trace-id }} steps: - name: Setup Scripts id: setup - uses: github/gh-aw-actions/setup@bc56a0cad2f450c562810785ef38649c04db812a # v0.72.1 + uses: github/gh-aw-actions/setup@efa55847f72aadb03490d955263ff911bf758700 # v0.74.8 with: destination: ${{ runner.temp }}/gh-aw/actions job-name: ${{ github.job }} trace-id: ${{ needs.activation.outputs.setup-trace-id }} + parent-span-id: ${{ needs.activation.outputs.setup-parent-span-id || needs.activation.outputs.setup-span-id }} env: GH_AW_SETUP_WORKFLOW_NAME: "LabelOps — PR Maintenance" GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/labelops-pr-maintenance.lock.yml@${{ github.ref }} - GH_AW_INFO_VERSION: "1.0.40" + GH_AW_INFO_VERSION: "1.0.48" + GH_AW_INFO_ENGINE_ID: "copilot" - name: Set runtime paths id: set-runtime-paths run: | @@ -407,11 +415,11 @@ jobs: const { main } = require('${{ runner.temp }}/gh-aw/actions/checkout_pr_branch.cjs'); await main(); - name: Install GitHub Copilot CLI - run: bash "${RUNNER_TEMP}/gh-aw/actions/install_copilot_cli.sh" 1.0.40 + run: bash "${RUNNER_TEMP}/gh-aw/actions/install_copilot_cli.sh" 1.0.48 env: GH_HOST: github.com - name: Install AWF binary - run: bash "${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh" v0.25.41 + run: bash "${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh" v0.25.49 - name: Parse integrity filter lists id: parse-guard-vars env: @@ -436,15 +444,15 @@ jobs: GH_AW_SUB_AGENT_EXT: ".agent.md" run: bash "${RUNNER_TEMP}/gh-aw/actions/restore_inline_sub_agents.sh" - name: Download container images - run: bash "${RUNNER_TEMP}/gh-aw/actions/download_docker_images.sh" ghcr.io/github/gh-aw-firewall/agent:0.25.41 ghcr.io/github/gh-aw-firewall/api-proxy:0.25.41 ghcr.io/github/gh-aw-firewall/squid:0.25.41 ghcr.io/github/gh-aw-mcpg:v0.3.6@sha256:2bb8eef86006a4c5963c55616a9c51c32f27bfdecb023b8aa6f91f6718d9171c ghcr.io/github/github-mcp-server:v1.0.3@sha256:2ac27ef03461ef2b877031b838a7d1fd7f12b12d4ace7796d8cad91446d55959 node:lts-alpine@sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f + run: bash "${RUNNER_TEMP}/gh-aw/actions/download_docker_images.sh" ghcr.io/github/gh-aw-firewall/agent:0.25.49 ghcr.io/github/gh-aw-firewall/api-proxy:0.25.49 ghcr.io/github/gh-aw-firewall/squid:0.25.49 ghcr.io/github/gh-aw-mcpg:v0.3.9@sha256:64828b42a4482f58fab16509d7f8f495a6d97c972a98a68aff20543531ac0388 ghcr.io/github/github-mcp-server:v1.0.4 node:lts-alpine@sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f - name: Generate Safe Outputs Config run: | mkdir -p "${RUNNER_TEMP}/gh-aw/safeoutputs" mkdir -p /tmp/gh-aw/safeoutputs mkdir -p /tmp/gh-aw/mcp-logs/safeoutputs - cat > "${RUNNER_TEMP}/gh-aw/safeoutputs/config.json" << 'GH_AW_SAFE_OUTPUTS_CONFIG_46fd3e2c4e0e64bf_EOF' - {"add_comment":{"hide_older_comments":true,"max":5,"target":"*"},"add_labels":{"allowed":["AI-needs-CI-fix-input"],"max":3,"target":"*"},"create_report_incomplete_issue":{},"dispatch_workflow":{"aw_context_workflows":["labelops-flake-fix"],"max":3,"workflow_files":{"labelops-flake-fix":".lock.yml"},"workflows":["labelops-flake-fix"]},"missing_data":{},"missing_tool":{},"noop":{"max":1,"report-as-issue":"true"},"push_to_pull_request_branch":{"if_no_changes":"warn","max":5,"max_patch_size":10240,"protect_top_level_dot_folders":true,"protected_files":["package.json","bun.lockb","bunfig.toml","deno.json","deno.jsonc","deno.lock","global.json","NuGet.Config","Directory.Packages.props","mix.exs","mix.lock","go.mod","go.sum","stack.yaml","stack.yaml.lock","pom.xml","build.gradle","build.gradle.kts","settings.gradle","settings.gradle.kts","gradle.properties","package-lock.json","yarn.lock","pnpm-lock.yaml","npm-shrinkwrap.json","requirements.txt","Pipfile","Pipfile.lock","pyproject.toml","setup.py","setup.cfg","Gemfile","Gemfile.lock","uv.lock","CODEOWNERS","DESIGN.md","README.md","CONTRIBUTING.md","CHANGELOG.md","SECURITY.md","CODE_OF_CONDUCT.md","AGENTS.md","CLAUDE.md","GEMINI.md"],"protected_files_policy":"fallback-to-issue","target":"*"},"report_incomplete":{}} - GH_AW_SAFE_OUTPUTS_CONFIG_46fd3e2c4e0e64bf_EOF + cat > "${RUNNER_TEMP}/gh-aw/safeoutputs/config.json" << 'GH_AW_SAFE_OUTPUTS_CONFIG_c6b7969aed14cd3a_EOF' + {"add_comment":{"hide_older_comments":true,"max":5,"target":"*"},"add_labels":{"allowed":["AI-needs-CI-fix-input"],"max":3,"target":"*"},"create_report_incomplete_issue":{},"dispatch_workflow":{"aw_context_workflows":["labelops-flake-fix"],"max":3,"workflow_files":{"labelops-flake-fix":".lock.yml"},"workflows":["labelops-flake-fix"]},"missing_data":{},"missing_tool":{},"noop":{"max":1,"report-as-issue":"true"},"push_to_pull_request_branch":{"if_no_changes":"warn","max":5,"max_patch_size":10240,"protect_top_level_dot_folders":true,"protected_files":["package.json","bun.lockb","bunfig.toml","deno.json","deno.jsonc","deno.lock","global.json","NuGet.Config","Directory.Packages.props","mix.exs","mix.lock","go.mod","go.sum","stack.yaml","stack.yaml.lock","pom.xml","build.gradle","build.gradle.kts","settings.gradle","settings.gradle.kts","gradle.properties","package-lock.json","yarn.lock","pnpm-lock.yaml","npm-shrinkwrap.json","requirements.txt","Pipfile","Pipfile.lock","pyproject.toml","setup.py","setup.cfg","Gemfile","Gemfile.lock","uv.lock","CODEOWNERS","DESIGN.md","README.md","CONTRIBUTING.md","CHANGELOG.md","SECURITY.md","CODE_OF_CONDUCT.md","AGENTS.md","CLAUDE.md","GEMINI.md"],"protected_files_policy":"allowed","target":"*"},"report_incomplete":{}} + GH_AW_SAFE_OUTPUTS_CONFIG_c6b7969aed14cd3a_EOF - name: Generate Safe Outputs Tools env: GH_AW_TOOLS_META_JSON: | @@ -701,17 +709,22 @@ jobs: export GH_AW_ENGINE="copilot" MCP_GATEWAY_UID=$(id -u 2>/dev/null || echo '0') MCP_GATEWAY_GID=$(id -g 2>/dev/null || echo '0') - DOCKER_SOCK_GID=$(stat -c '%g' /var/run/docker.sock 2>/dev/null || echo '0') - export MCP_GATEWAY_DOCKER_COMMAND='docker run -i --rm --network host --add-host host.docker.internal:127.0.0.1 --user '"${MCP_GATEWAY_UID}"':'"${MCP_GATEWAY_GID}"' --group-add '"${DOCKER_SOCK_GID}"' -v /var/run/docker.sock:/var/run/docker.sock -e MCP_GATEWAY_PORT -e MCP_GATEWAY_DOMAIN -e MCP_GATEWAY_API_KEY -e MCP_GATEWAY_PAYLOAD_DIR -e MCP_GATEWAY_PAYLOAD_SIZE_THRESHOLD -e DEBUG -e MCP_GATEWAY_LOG_DIR -e GH_AW_MCP_LOG_DIR -e GH_AW_SAFE_OUTPUTS -e GH_AW_SAFE_OUTPUTS_CONFIG_PATH -e GH_AW_SAFE_OUTPUTS_TOOLS_PATH -e GH_AW_ASSETS_BRANCH -e GH_AW_ASSETS_MAX_SIZE_KB -e GH_AW_ASSETS_ALLOWED_EXTS -e DEFAULT_BRANCH -e GITHUB_MCP_SERVER_TOKEN -e GITHUB_MCP_GUARD_MIN_INTEGRITY -e GITHUB_MCP_GUARD_REPOS -e GITHUB_REPOSITORY -e GITHUB_SERVER_URL -e GITHUB_SHA -e GITHUB_WORKSPACE -e GITHUB_TOKEN -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RUN_ATTEMPT -e GITHUB_JOB -e GITHUB_ACTION -e GITHUB_EVENT_NAME -e GITHUB_EVENT_PATH -e GITHUB_ACTOR -e GITHUB_ACTOR_ID -e GITHUB_TRIGGERING_ACTOR -e GITHUB_WORKFLOW -e GITHUB_WORKFLOW_REF -e GITHUB_WORKFLOW_SHA -e GITHUB_REF -e GITHUB_REF_NAME -e GITHUB_REF_TYPE -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GH_AW_SAFE_OUTPUTS_PORT -e GH_AW_SAFE_OUTPUTS_API_KEY -v /tmp/gh-aw/mcp-payloads:/tmp/gh-aw/mcp-payloads:rw -v /opt:/opt:ro -v /tmp:/tmp:rw -v '"${GITHUB_WORKSPACE}"':'"${GITHUB_WORKSPACE}"':rw ghcr.io/github/gh-aw-mcpg:v0.3.6' + case "${DOCKER_HOST:-}" in + unix://* ) DOCKER_SOCK_PATH="${DOCKER_HOST#unix://}" ;; + /* ) DOCKER_SOCK_PATH="$DOCKER_HOST" ;; + * ) DOCKER_SOCK_PATH=/var/run/docker.sock ;; + esac + DOCKER_SOCK_GID=$(stat -c '%g' "$DOCKER_SOCK_PATH" 2>/dev/null || echo '0') + export MCP_GATEWAY_DOCKER_COMMAND='docker run -i --rm --network host --add-host host.docker.internal:127.0.0.1 --user '"${MCP_GATEWAY_UID}"':'"${MCP_GATEWAY_GID}"' --group-add '"${DOCKER_SOCK_GID}"' -v '"${DOCKER_SOCK_PATH}"':/var/run/docker.sock -e MCP_GATEWAY_PORT -e MCP_GATEWAY_DOMAIN -e MCP_GATEWAY_API_KEY -e MCP_GATEWAY_PAYLOAD_DIR -e MCP_GATEWAY_PAYLOAD_SIZE_THRESHOLD -e DOCKER_HOST=unix:///var/run/docker.sock -e DEBUG -e MCP_GATEWAY_LOG_DIR -e GH_AW_MCP_LOG_DIR -e GH_AW_SAFE_OUTPUTS -e GH_AW_SAFE_OUTPUTS_CONFIG_PATH -e GH_AW_SAFE_OUTPUTS_TOOLS_PATH -e GH_AW_ASSETS_BRANCH -e GH_AW_ASSETS_MAX_SIZE_KB -e GH_AW_ASSETS_ALLOWED_EXTS -e DEFAULT_BRANCH -e GITHUB_MCP_SERVER_TOKEN -e GITHUB_MCP_GUARD_MIN_INTEGRITY -e GITHUB_MCP_GUARD_REPOS -e GITHUB_REPOSITORY -e GITHUB_SERVER_URL -e GITHUB_SHA -e GITHUB_WORKSPACE -e GITHUB_TOKEN -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RUN_ATTEMPT -e GITHUB_JOB -e GITHUB_ACTION -e GITHUB_EVENT_NAME -e GITHUB_EVENT_PATH -e GITHUB_ACTOR -e GITHUB_ACTOR_ID -e GITHUB_TRIGGERING_ACTOR -e GITHUB_WORKFLOW -e GITHUB_WORKFLOW_REF -e GITHUB_WORKFLOW_SHA -e GITHUB_REF -e GITHUB_REF_NAME -e GITHUB_REF_TYPE -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GH_AW_SAFE_OUTPUTS_PORT -e GH_AW_SAFE_OUTPUTS_API_KEY -v /tmp/gh-aw/mcp-payloads:/tmp/gh-aw/mcp-payloads:rw -v /opt:/opt:ro -v /tmp:/tmp:rw -v '"${GITHUB_WORKSPACE}"':'"${GITHUB_WORKSPACE}"':rw ghcr.io/github/gh-aw-mcpg:v0.3.9' mkdir -p /home/runner/.copilot GH_AW_NODE=$(which node 2>/dev/null || command -v node 2>/dev/null || echo node) - cat << GH_AW_MCP_CONFIG_277d7cf706ed6ba6_EOF | "$GH_AW_NODE" "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.cjs" + cat << GH_AW_MCP_CONFIG_884f45a80f2a372a_EOF | "$GH_AW_NODE" "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.cjs" { "mcpServers": { "github": { "type": "stdio", - "container": "ghcr.io/github/github-mcp-server:v1.0.3", + "container": "ghcr.io/github/github-mcp-server:v1.0.4", "env": { "GITHUB_HOST": "\${GITHUB_SERVER_URL}", "GITHUB_PERSONAL_ACCESS_TOKEN": "\${GITHUB_MCP_SERVER_TOKEN}", @@ -750,7 +763,7 @@ jobs: "payloadDir": "${MCP_GATEWAY_PAYLOAD_DIR}" } } - GH_AW_MCP_CONFIG_277d7cf706ed6ba6_EOF + GH_AW_MCP_CONFIG_884f45a80f2a372a_EOF - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true @@ -778,25 +791,32 @@ jobs: timeout-minutes: 90 run: | set -o pipefail + printf '%s' "$(date +%s%3N)" > /tmp/gh-aw/agent_cli_start_ms.txt touch /tmp/gh-aw/agent-step-summary.md GH_AW_NODE_BIN=$(command -v node 2>/dev/null || true) export GH_AW_NODE_BIN + export COPILOT_API_KEY="$COPILOT_DUMMY_BYOK" (umask 177 && touch /tmp/gh-aw/agent-stdio.log) - printf '%s\n' '{"$schema":"https://github.com/github/gh-aw-firewall/releases/download/v0.25.41/awf-config.schema.json","network":{"allowDomains":["*.vsblob.vsassets.io","api.business.githubcopilot.com","api.enterprise.githubcopilot.com","api.github.com","api.githubcopilot.com","api.individual.githubcopilot.com","api.nuget.org","api.snapcraft.io","archive.ubuntu.com","azure.archive.ubuntu.com","azuresearch-usnc.nuget.org","azuresearch-ussc.nuget.org","builds.dotnet.microsoft.com","ci.dot.net","crl.geotrust.com","crl.globalsign.com","crl.identrust.com","crl.sectigo.com","crl.thawte.com","crl.usertrust.com","crl.verisign.com","crl3.digicert.com","crl4.digicert.com","crls.ssl.com","dc.services.visualstudio.com","dev.azure.com","dist.nuget.org","dot.net","dotnet.microsoft.com","dotnetcli.blob.core.windows.net","github.com","host.docker.internal","json-schema.org","json.schemastore.org","keyserver.ubuntu.com","nuget.org","nuget.pkg.github.com","nugetregistryv2prod.blob.core.windows.net","ocsp.digicert.com","ocsp.geotrust.com","ocsp.globalsign.com","ocsp.identrust.com","ocsp.sectigo.com","ocsp.ssl.com","ocsp.thawte.com","ocsp.usertrust.com","ocsp.verisign.com","oneocsp.microsoft.com","packagecloud.io","packages.cloud.google.com","packages.microsoft.com","pkgs.dev.azure.com","ppa.launchpad.net","raw.githubusercontent.com","registry.npmjs.org","s.symcb.com","s.symcd.com","security.ubuntu.com","telemetry.enterprise.githubcopilot.com","ts-crl.ws.symantec.com","ts-ocsp.ws.symantec.com","www.googleapis.com","www.microsoft.com"]},"apiProxy":{"enabled":true,"models":{"auto":["large"],"deep-research":["copilot/deep-research*","copilot/o3-deep-research*","copilot/o4-mini-deep-research*","google/deep-research*","openai/o3-deep-research*","openai/o4-mini-deep-research*"],"gemini-flash":["copilot/gemini-*flash*","google/gemini-*flash*"],"gemini-pro":["copilot/gemini-*pro*","google/gemini-*pro*"],"gpt-4.1":["copilot/gpt-4.1*","openai/gpt-4.1*"],"gpt-5":["copilot/gpt-5*","openai/gpt-5*"],"gpt-5-codex":["copilot/gpt-5*codex*","openai/gpt-5*codex*"],"gpt-5-mini":["copilot/gpt-5*mini*","openai/gpt-5*mini*"],"gpt-5-nano":["copilot/gpt-5*nano*","openai/gpt-5*nano*"],"gpt-5-pro":["copilot/gpt-5*pro*","openai/gpt-5*pro*"],"haiku":["copilot/*haiku*","anthropic/*haiku*"],"large":["sonnet","gpt-5-pro","gpt-5","gemini-pro"],"mini":["haiku","gpt-5-mini","gpt-5-nano","gemini-flash"],"opus":["copilot/*opus*","anthropic/*opus*"],"reasoning":["copilot/o1*","copilot/o3*","copilot/o4*","openai/o1*","openai/o3*","openai/o4*"],"small":["mini"],"sonnet":["copilot/*sonnet*","anthropic/*sonnet*"]}},"container":{"imageTag":"0.25.41"}}' > "${RUNNER_TEMP}/gh-aw/awf-config.json" && cp "${RUNNER_TEMP}/gh-aw/awf-config.json" /tmp/gh-aw/awf-config.json + printf '%s\n' '{"$schema":"https://github.com/github/gh-aw-firewall/releases/download/v0.25.49/awf-config.schema.json","network":{"allowDomains":["*.vsblob.vsassets.io","api.business.githubcopilot.com","api.enterprise.githubcopilot.com","api.github.com","api.githubcopilot.com","api.individual.githubcopilot.com","api.nuget.org","api.snapcraft.io","archive.ubuntu.com","azure.archive.ubuntu.com","azuresearch-usnc.nuget.org","azuresearch-ussc.nuget.org","builds.dotnet.microsoft.com","ci.dot.net","crl.geotrust.com","crl.globalsign.com","crl.identrust.com","crl.sectigo.com","crl.thawte.com","crl.usertrust.com","crl.verisign.com","crl3.digicert.com","crl4.digicert.com","crls.ssl.com","dc.services.visualstudio.com","dev.azure.com","dist.nuget.org","dot.net","dotnet.microsoft.com","dotnetcli.blob.core.windows.net","github.com","host.docker.internal","json-schema.org","json.schemastore.org","keyserver.ubuntu.com","nuget.org","nuget.pkg.github.com","nugetregistryv2prod.blob.core.windows.net","ocsp.digicert.com","ocsp.geotrust.com","ocsp.globalsign.com","ocsp.identrust.com","ocsp.sectigo.com","ocsp.ssl.com","ocsp.thawte.com","ocsp.usertrust.com","ocsp.verisign.com","oneocsp.microsoft.com","packagecloud.io","packages.cloud.google.com","packages.microsoft.com","pkgs.dev.azure.com","ppa.launchpad.net","raw.githubusercontent.com","registry.npmjs.org","s.symcb.com","s.symcd.com","security.ubuntu.com","telemetry.enterprise.githubcopilot.com","ts-crl.ws.symantec.com","ts-ocsp.ws.symantec.com","www.googleapis.com","www.microsoft.com"]},"apiProxy":{"enabled":true,"enableTokenSteering":true,"maxRuns":500,"maxEffectiveTokens":25000000,"models":{"agent":["sonnet-6x","gpt-5.4","gpt-5","gemini-pro","haiku","any"],"any":["copilot/*","anthropic/*","openai/*","google/*","gemini/*"],"auto":["large"],"claude":["agent","sonnet-6x","haiku","any"],"codex":["agent","gpt-5-codex","gpt-5","any"],"coding":["copilot/gpt-5*codex*","openai/gpt-5*codex*","gpt-5-codex"],"copilot":["agent","gpt-5.4","sonnet","gpt-5","any"],"deep-research":["copilot/deep-research*","copilot/o3-deep-research*","copilot/o4-mini-deep-research*","google/deep-research*","gemini/deep-research*","openai/o3-deep-research*","openai/o4-mini-deep-research*"],"gemini":["agent","gemini-pro","gemini-flash","any"],"gemini-flash":["copilot/gemini-*flash*","google/gemini-*flash*","gemini/gemini-*flash*"],"gemini-flash-lite":["copilot/gemini-*flash*lite*","google/gemini-*flash*lite*","gemini/gemini-*flash*lite*"],"gemini-pro":["copilot/gemini-*pro*","google/gemini-*pro*","gemini/gemini-*pro*"],"gemma":["copilot/gemma*","google/gemma*","gemini/gemma*"],"gpt-4.1":["copilot/gpt-4.1*","openai/gpt-4.1*"],"gpt-5":["copilot/gpt-5*","openai/gpt-5*"],"gpt-5-codex":["copilot/gpt-5*codex*","openai/gpt-5*codex*"],"gpt-5-mini":["copilot/gpt-5*mini*","openai/gpt-5*mini*"],"gpt-5-nano":["copilot/gpt-5*nano*","openai/gpt-5*nano*"],"gpt-5-pro":["copilot/gpt-5*pro*","openai/gpt-5*pro*"],"haiku":["copilot/*haiku*","anthropic/*haiku*"],"large":["sonnet","gpt-5-pro","gpt-5","gemini-pro"],"mini":["haiku","gpt-5-mini","gpt-5-nano","gemini-flash-lite","copilot/raptor*mini*"],"opus":["copilot/*opus*","anthropic/*opus*"],"reasoning":["copilot/o1*","copilot/o3*","copilot/o4*","openai/o1*","openai/o3*","openai/o4*"],"small":["mini"],"sonnet":["copilot/*sonnet*","anthropic/*sonnet*"],"sonnet-6x":["copilot/*sonnet-4.5*","copilot/*sonnet-4-5*","anthropic/*sonnet-4.5*","anthropic/*sonnet-4-5*","copilot/*sonnet-3.7*","copilot/*sonnet-3-7*","anthropic/*sonnet-3.7*","anthropic/*sonnet-3-7*","copilot/*sonnet-3.5*","copilot/*sonnet-3-5*","anthropic/*sonnet-3.5*","anthropic/*sonnet-3-5*"],"vision":["copilot/gemini-*image*","gemini/gemini-*image*","copilot/gemini-*flash*","gemini/gemini-*flash*"]}},"container":{"imageTag":"0.25.49"}}' > "${RUNNER_TEMP}/gh-aw/awf-config.json" + cp "${RUNNER_TEMP}/gh-aw/awf-config.json" /tmp/gh-aw/awf-config.json + GH_AW_DOCKER_HOST_PATH_PREFIX_ARGS="" + if [[ "${DOCKER_HOST:-}" =~ ^tcp:// ]]; then + GH_AW_DOCKER_HOST_PATH_PREFIX_ARGS="--docker-host-path-prefix /tmp/gh-aw" + fi # shellcheck disable=SC1003 - sudo -E awf --config "${RUNNER_TEMP}/gh-aw/awf-config.json" --container-workdir "${GITHUB_WORKSPACE}" --mount "${RUNNER_TEMP}/gh-aw:${RUNNER_TEMP}/gh-aw:ro" --mount "${RUNNER_TEMP}/gh-aw:/host${RUNNER_TEMP}/gh-aw:ro" --env-all --exclude-env COPILOT_GITHUB_TOKEN --exclude-env GITHUB_MCP_SERVER_TOKEN --exclude-env MCP_GATEWAY_API_KEY --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --audit-dir /tmp/gh-aw/sandbox/firewall/audit --enable-host-access --allow-host-ports 80,443,8080 --skip-pull \ - -- /bin/bash -c 'export PATH="${RUNNER_TEMP}/gh-aw/mcp-cli/bin:$PATH" && export PATH="$(find /opt/hostedtoolcache /home/runner/work/_tool -maxdepth 4 -type d -name bin 2>/dev/null | tr '\''\n'\'' '\'':'\'')$PATH"; [ -n "$GOROOT" ] && export PATH="$GOROOT/bin:$PATH" || true && GH_AW_NODE_EXEC="${GH_AW_NODE_BIN:-}"; if [ -z "$GH_AW_NODE_EXEC" ] || [ ! -x "$GH_AW_NODE_EXEC" ]; then GH_AW_NODE_EXEC="$(command -v node 2>/dev/null || echo node)"; fi; "$GH_AW_NODE_EXEC" ${RUNNER_TEMP}/gh-aw/actions/copilot_harness.cjs /usr/local/bin/copilot --add-dir /tmp/gh-aw/ --log-level all --log-dir /tmp/gh-aw/sandbox/agent/logs/ --disable-builtin-mcps --no-ask-user --allow-all-tools --allow-all-paths --add-dir "${GITHUB_WORKSPACE}" --prompt-file /tmp/gh-aw/aw-prompts/prompt.txt' 2>&1 | tee -a /tmp/gh-aw/agent-stdio.log + sudo -E awf --config "${RUNNER_TEMP}/gh-aw/awf-config.json" --container-workdir "${GITHUB_WORKSPACE}" --mount "${RUNNER_TEMP}/gh-aw:${RUNNER_TEMP}/gh-aw:ro" --mount "${RUNNER_TEMP}/gh-aw:/host${RUNNER_TEMP}/gh-aw:ro" ${GH_AW_DOCKER_HOST_PATH_PREFIX_ARGS} --env-all --exclude-env COPILOT_GITHUB_TOKEN --exclude-env GITHUB_MCP_SERVER_TOKEN --exclude-env MCP_GATEWAY_API_KEY --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --audit-dir /tmp/gh-aw/sandbox/firewall/audit --enable-host-access --allow-host-ports 80,443,8080 --skip-pull \ + -- /bin/bash -c 'export PATH="${RUNNER_TEMP}/gh-aw/mcp-cli/bin:$PATH" && export PATH="$(find /opt/hostedtoolcache /home/runner/work/_tool -maxdepth 5 -type d -name bin 2>/dev/null | tr '\''\n'\'' '\'':'\'')$PATH"; [ -n "$GOROOT" ] && export PATH="$GOROOT/bin:$PATH" || true && GH_AW_NODE_EXEC="${GH_AW_NODE_BIN:-}"; if [ -z "$GH_AW_NODE_EXEC" ] || [ ! -x "$GH_AW_NODE_EXEC" ]; then GH_AW_NODE_EXEC="$(command -v node 2>/dev/null || true)"; fi; if [ -z "$GH_AW_NODE_EXEC" ]; then echo "node runtime missing on this runner — check runtimes.node in workflow YAML" >&2; exit 127; fi; "$GH_AW_NODE_EXEC" ${RUNNER_TEMP}/gh-aw/actions/copilot_harness.cjs /usr/local/bin/copilot --add-dir /tmp/gh-aw/ --log-level all --log-dir /tmp/gh-aw/sandbox/agent/logs/ --disable-builtin-mcps --no-ask-user --allow-all-tools --allow-all-paths --add-dir "${GITHUB_WORKSPACE}" --prompt-file /tmp/gh-aw/aw-prompts/prompt.txt' 2>&1 | tee -a /tmp/gh-aw/agent-stdio.log env: AWF_REFLECT_ENABLED: 1 COPILOT_AGENT_RUNNER_TYPE: STANDALONE - COPILOT_API_KEY: dummy-byok-key-for-offline-mode + COPILOT_DUMMY_BYOK: dummy-byok-key-for-offline-mode COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }} - COPILOT_MODEL: ${{ vars.GH_AW_MODEL_AGENT_COPILOT || 'claude-sonnet-4.6' }} + COPILOT_MODEL: ${{ vars.GH_AW_MODEL_AGENT_COPILOT || 'claude-sonnet-4.5' }} GH_AW_MCP_CONFIG: /home/runner/.copilot/mcp-config.json GH_AW_PHASE: agent GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt GH_AW_SAFE_OUTPUTS: ${{ steps.set-runtime-paths.outputs.GH_AW_SAFE_OUTPUTS }} - GH_AW_VERSION: v0.72.1 + GH_AW_VERSION: v0.74.8 GITHUB_API_URL: ${{ github.api_url }} GITHUB_AW: true GITHUB_COPILOT_INTEGRATION_ID: agentic-workflows @@ -991,6 +1011,7 @@ jobs: concurrency: group: "gh-aw-conclusion-labelops-pr-maintenance" cancel-in-progress: false + queue: max outputs: incomplete_count: ${{ steps.report_incomplete.outputs.incomplete_count }} noop_message: ${{ steps.noop.outputs.noop_message }} @@ -999,15 +1020,17 @@ jobs: steps: - name: Setup Scripts id: setup - uses: github/gh-aw-actions/setup@bc56a0cad2f450c562810785ef38649c04db812a # v0.72.1 + uses: github/gh-aw-actions/setup@efa55847f72aadb03490d955263ff911bf758700 # v0.74.8 with: destination: ${{ runner.temp }}/gh-aw/actions job-name: ${{ github.job }} trace-id: ${{ needs.activation.outputs.setup-trace-id }} + parent-span-id: ${{ needs.activation.outputs.setup-parent-span-id || needs.activation.outputs.setup-span-id }} env: GH_AW_SETUP_WORKFLOW_NAME: "LabelOps — PR Maintenance" GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/labelops-pr-maintenance.lock.yml@${{ github.ref }} - GH_AW_INFO_VERSION: "1.0.40" + GH_AW_INFO_VERSION: "1.0.48" + GH_AW_INFO_ENGINE_ID: "copilot" - name: Download agent output artifact id: download-agent-output continue-on-error: true @@ -1097,6 +1120,8 @@ jobs: GH_AW_ENGINE_ID: "copilot" GH_AW_SECRET_VERIFICATION_RESULT: ${{ needs.activation.outputs.secret_verification_result }} GH_AW_CHECKOUT_PR_SUCCESS: ${{ needs.agent.outputs.checkout_pr_success }} + GH_AW_EFFECTIVE_TOKENS: ${{ needs.agent.outputs.effective_tokens || '' }} + GH_AW_EFFECTIVE_TOKENS_RATE_LIMIT_ERROR: ${{ needs.agent.outputs.effective_tokens_rate_limit_error || 'false' }} GH_AW_INFERENCE_ACCESS_ERROR: ${{ needs.agent.outputs.inference_access_error }} GH_AW_MCP_POLICY_ERROR: ${{ needs.agent.outputs.mcp_policy_error }} GH_AW_AGENTIC_ENGINE_TIMEOUT: ${{ needs.agent.outputs.agentic_engine_timeout }} @@ -1111,6 +1136,7 @@ jobs: GH_AW_MISSING_TOOL_REPORT_AS_FAILURE: "true" GH_AW_MISSING_DATA_REPORT_AS_FAILURE: "true" GH_AW_TIMEOUT_MINUTES: "90" + GH_AW_MAX_EFFECTIVE_TOKENS: "25000000" with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} script: | @@ -1135,15 +1161,17 @@ jobs: steps: - name: Setup Scripts id: setup - uses: github/gh-aw-actions/setup@bc56a0cad2f450c562810785ef38649c04db812a # v0.72.1 + uses: github/gh-aw-actions/setup@efa55847f72aadb03490d955263ff911bf758700 # v0.74.8 with: destination: ${{ runner.temp }}/gh-aw/actions job-name: ${{ github.job }} trace-id: ${{ needs.activation.outputs.setup-trace-id }} + parent-span-id: ${{ needs.activation.outputs.setup-parent-span-id || needs.activation.outputs.setup-span-id }} env: GH_AW_SETUP_WORKFLOW_NAME: "LabelOps — PR Maintenance" GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/labelops-pr-maintenance.lock.yml@${{ github.ref }} - GH_AW_INFO_VERSION: "1.0.40" + GH_AW_INFO_VERSION: "1.0.48" + GH_AW_INFO_ENGINE_ID: "copilot" - name: Download agent output artifact id: download-agent-output continue-on-error: true @@ -1169,7 +1197,7 @@ jobs: rm -rf /tmp/gh-aw/sandbox/firewall/logs rm -rf /tmp/gh-aw/sandbox/firewall/audit - name: Download container images - run: bash "${RUNNER_TEMP}/gh-aw/actions/download_docker_images.sh" ghcr.io/github/gh-aw-firewall/agent:0.25.41 ghcr.io/github/gh-aw-firewall/api-proxy:0.25.41 ghcr.io/github/gh-aw-firewall/squid:0.25.41 + run: bash "${RUNNER_TEMP}/gh-aw/actions/download_docker_images.sh" ghcr.io/github/gh-aw-firewall/agent:0.25.49 ghcr.io/github/gh-aw-firewall/api-proxy:0.25.49 ghcr.io/github/gh-aw-firewall/squid:0.25.49 - name: Check if detection needed id: detection_guard if: always() @@ -1228,11 +1256,11 @@ jobs: node-version: '24' package-manager-cache: false - name: Install GitHub Copilot CLI - run: bash "${RUNNER_TEMP}/gh-aw/actions/install_copilot_cli.sh" 1.0.40 + run: bash "${RUNNER_TEMP}/gh-aw/actions/install_copilot_cli.sh" 1.0.48 env: GH_HOST: github.com - name: Install AWF binary - run: bash "${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh" v0.25.41 + run: bash "${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh" v0.25.49 - name: Execute GitHub Copilot CLI if: always() && steps.detection_guard.outputs.run_detection == 'true' continue-on-error: true @@ -1241,23 +1269,30 @@ jobs: timeout-minutes: 20 run: | set -o pipefail + printf '%s' "$(date +%s%3N)" > /tmp/gh-aw/agent_cli_start_ms.txt touch /tmp/gh-aw/agent-step-summary.md GH_AW_NODE_BIN=$(command -v node 2>/dev/null || true) export GH_AW_NODE_BIN + export COPILOT_API_KEY="$COPILOT_DUMMY_BYOK" (umask 177 && touch /tmp/gh-aw/threat-detection/detection.log) - printf '%s\n' '{"$schema":"https://github.com/github/gh-aw-firewall/releases/download/v0.25.41/awf-config.schema.json","network":{"allowDomains":["api.business.githubcopilot.com","api.enterprise.githubcopilot.com","api.github.com","api.githubcopilot.com","api.individual.githubcopilot.com","github.com","host.docker.internal","telemetry.enterprise.githubcopilot.com"]},"apiProxy":{"enabled":true},"container":{"imageTag":"0.25.41"}}' > "${RUNNER_TEMP}/gh-aw/awf-config.json" && cp "${RUNNER_TEMP}/gh-aw/awf-config.json" /tmp/gh-aw/awf-config.json + printf '%s\n' '{"$schema":"https://github.com/github/gh-aw-firewall/releases/download/v0.25.49/awf-config.schema.json","network":{"allowDomains":["api.business.githubcopilot.com","api.enterprise.githubcopilot.com","api.github.com","api.githubcopilot.com","api.individual.githubcopilot.com","github.com","host.docker.internal","telemetry.enterprise.githubcopilot.com"]},"apiProxy":{"enabled":true,"enableTokenSteering":true,"maxRuns":500,"maxEffectiveTokens":25000000},"container":{"imageTag":"0.25.49"}}' > "${RUNNER_TEMP}/gh-aw/awf-config.json" + cp "${RUNNER_TEMP}/gh-aw/awf-config.json" /tmp/gh-aw/awf-config.json + GH_AW_DOCKER_HOST_PATH_PREFIX_ARGS="" + if [[ "${DOCKER_HOST:-}" =~ ^tcp:// ]]; then + GH_AW_DOCKER_HOST_PATH_PREFIX_ARGS="--docker-host-path-prefix /tmp/gh-aw" + fi # shellcheck disable=SC1003 - sudo -E awf --config "${RUNNER_TEMP}/gh-aw/awf-config.json" --container-workdir "${GITHUB_WORKSPACE}" --mount "${RUNNER_TEMP}/gh-aw:${RUNNER_TEMP}/gh-aw:ro" --mount "${RUNNER_TEMP}/gh-aw:/host${RUNNER_TEMP}/gh-aw:ro" --env-all --exclude-env COPILOT_GITHUB_TOKEN --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --audit-dir /tmp/gh-aw/sandbox/firewall/audit --enable-host-access --allow-host-ports 80,443,8080 --skip-pull \ - -- /bin/bash -c 'export PATH="$(find /opt/hostedtoolcache /home/runner/work/_tool -maxdepth 4 -type d -name bin 2>/dev/null | tr '\''\n'\'' '\'':'\'')$PATH"; [ -n "$GOROOT" ] && export PATH="$GOROOT/bin:$PATH" || true && GH_AW_NODE_EXEC="${GH_AW_NODE_BIN:-}"; if [ -z "$GH_AW_NODE_EXEC" ] || [ ! -x "$GH_AW_NODE_EXEC" ]; then GH_AW_NODE_EXEC="$(command -v node 2>/dev/null || echo node)"; fi; "$GH_AW_NODE_EXEC" ${RUNNER_TEMP}/gh-aw/actions/copilot_harness.cjs /usr/local/bin/copilot --add-dir /tmp/gh-aw/ --log-level all --log-dir /tmp/gh-aw/sandbox/agent/logs/ --disable-builtin-mcps --no-ask-user --allow-all-tools --add-dir "${GITHUB_WORKSPACE}" --prompt-file /tmp/gh-aw/aw-prompts/prompt.txt' 2>&1 | tee -a /tmp/gh-aw/threat-detection/detection.log + sudo -E awf --config "${RUNNER_TEMP}/gh-aw/awf-config.json" --container-workdir "${GITHUB_WORKSPACE}" --mount "${RUNNER_TEMP}/gh-aw:${RUNNER_TEMP}/gh-aw:ro" --mount "${RUNNER_TEMP}/gh-aw:/host${RUNNER_TEMP}/gh-aw:ro" ${GH_AW_DOCKER_HOST_PATH_PREFIX_ARGS} --env-all --exclude-env COPILOT_GITHUB_TOKEN --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --audit-dir /tmp/gh-aw/sandbox/firewall/audit --enable-host-access --allow-host-ports 80,443,8080 --skip-pull \ + -- /bin/bash -c 'export PATH="$(find /opt/hostedtoolcache /home/runner/work/_tool -maxdepth 5 -type d -name bin 2>/dev/null | tr '\''\n'\'' '\'':'\'')$PATH"; [ -n "$GOROOT" ] && export PATH="$GOROOT/bin:$PATH" || true && GH_AW_NODE_EXEC="${GH_AW_NODE_BIN:-}"; if [ -z "$GH_AW_NODE_EXEC" ] || [ ! -x "$GH_AW_NODE_EXEC" ]; then GH_AW_NODE_EXEC="$(command -v node 2>/dev/null || true)"; fi; if [ -z "$GH_AW_NODE_EXEC" ]; then echo "node runtime missing on this runner — check runtimes.node in workflow YAML" >&2; exit 127; fi; "$GH_AW_NODE_EXEC" ${RUNNER_TEMP}/gh-aw/actions/copilot_harness.cjs /usr/local/bin/copilot --add-dir /tmp/gh-aw/ --log-level all --log-dir /tmp/gh-aw/sandbox/agent/logs/ --disable-builtin-mcps --no-ask-user --allow-all-tools --add-dir "${GITHUB_WORKSPACE}" --prompt-file /tmp/gh-aw/aw-prompts/prompt.txt' 2>&1 | tee -a /tmp/gh-aw/threat-detection/detection.log env: AWF_REFLECT_ENABLED: 1 COPILOT_AGENT_RUNNER_TYPE: STANDALONE - COPILOT_API_KEY: dummy-byok-key-for-offline-mode + COPILOT_DUMMY_BYOK: dummy-byok-key-for-offline-mode COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }} - COPILOT_MODEL: ${{ vars.GH_AW_MODEL_DETECTION_COPILOT || 'claude-sonnet-4.6' }} + COPILOT_MODEL: ${{ vars.GH_AW_MODEL_DETECTION_COPILOT || 'claude-sonnet-4.5' }} GH_AW_PHASE: detection GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt - GH_AW_VERSION: v0.72.1 + GH_AW_VERSION: v0.74.8 GITHUB_API_URL: ${{ github.api_url }} GITHUB_AW: true GITHUB_COPILOT_INTEGRATION_ID: agentic-workflows @@ -1285,6 +1320,7 @@ jobs: uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: RUN_DETECTION: ${{ steps.detection_guard.outputs.run_detection }} + DETECTION_AGENTIC_EXECUTION_OUTCOME: ${{ steps.detection_agentic_execution.outcome }} GH_AW_DETECTION_CONTINUE_ON_ERROR: "true" with: script: | @@ -1295,10 +1331,11 @@ jobs: await main(); } catch (loadErr) { const continueOnError = process.env.GH_AW_DETECTION_CONTINUE_ON_ERROR !== 'false'; + const detectionExecutionFailed = process.env.DETECTION_AGENTIC_EXECUTION_OUTCOME === 'failure'; const msg = 'ERR_SYSTEM: \u274C Unexpected error loading threat detection module: ' + (loadErr && loadErr.message ? loadErr.message : String(loadErr)); core.error(msg); core.setOutput('reason', 'parse_error'); - if (continueOnError) { + if (continueOnError && !detectionExecutionFailed) { core.warning('\u26A0\uFE0F ' + msg); core.setOutput('conclusion', 'warning'); core.setOutput('success', 'false'); @@ -1330,7 +1367,7 @@ jobs: GH_AW_EFFECTIVE_TOKENS: ${{ needs.agent.outputs.effective_tokens }} GH_AW_ENGINE_ID: "copilot" GH_AW_ENGINE_MODEL: ${{ needs.agent.outputs.model }} - GH_AW_ENGINE_VERSION: "1.0.40" + GH_AW_ENGINE_VERSION: "1.0.48" GH_AW_WORKFLOW_ID: "labelops-pr-maintenance" GH_AW_WORKFLOW_NAME: "LabelOps — PR Maintenance" outputs: @@ -1347,15 +1384,17 @@ jobs: steps: - name: Setup Scripts id: setup - uses: github/gh-aw-actions/setup@bc56a0cad2f450c562810785ef38649c04db812a # v0.72.1 + uses: github/gh-aw-actions/setup@efa55847f72aadb03490d955263ff911bf758700 # v0.74.8 with: destination: ${{ runner.temp }}/gh-aw/actions job-name: ${{ github.job }} trace-id: ${{ needs.activation.outputs.setup-trace-id }} + parent-span-id: ${{ needs.activation.outputs.setup-parent-span-id || needs.activation.outputs.setup-span-id }} env: GH_AW_SETUP_WORKFLOW_NAME: "LabelOps — PR Maintenance" GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/labelops-pr-maintenance.lock.yml@${{ github.ref }} - GH_AW_INFO_VERSION: "1.0.40" + GH_AW_INFO_VERSION: "1.0.48" + GH_AW_INFO_ENGINE_ID: "copilot" - name: Download agent output artifact id: download-agent-output continue-on-error: true @@ -1399,8 +1438,16 @@ jobs: echo "Extracted base branch from safe output: $BASE_BRANCH" fi fi + - name: Checkout repository (trusted default branch for comment events) + if: (!cancelled()) && needs.agent.result != 'skipped' && contains(needs.agent.outputs.output_types, 'push_to_pull_request_branch') && (github.event_name == 'issue_comment' || github.event_name == 'pull_request_review_comment') + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + ref: ${{ github.event.repository.default_branch }} + token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} + persist-credentials: false + fetch-depth: 1 - name: Checkout repository - if: (!cancelled()) && needs.agent.result != 'skipped' && contains(needs.agent.outputs.output_types, 'push_to_pull_request_branch') + if: (!cancelled()) && needs.agent.result != 'skipped' && contains(needs.agent.outputs.output_types, 'push_to_pull_request_branch') && github.event_name != 'issue_comment' && github.event_name != 'pull_request_review_comment' uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: ref: ${{ steps.extract-base-branch.outputs.base-branch || github.base_ref || github.event.pull_request.base.ref || github.ref_name || github.event.repository.default_branch }} @@ -1435,10 +1482,11 @@ jobs: uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }} + GH_AW_COMMENT_ID: ${{ needs.activation.outputs.comment_id }} GH_AW_ALLOWED_DOMAINS: "*.vsblob.vsassets.io,api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.nuget.org,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,azuresearch-usnc.nuget.org,azuresearch-ussc.nuget.org,builds.dotnet.microsoft.com,ci.dot.net,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,dc.services.visualstudio.com,dev.azure.com,dist.nuget.org,dot.net,dotnet.microsoft.com,dotnetcli.blob.core.windows.net,github.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,nuget.org,nuget.pkg.github.com,nugetregistryv2prod.blob.core.windows.net,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,oneocsp.microsoft.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,pkgs.dev.azure.com,ppa.launchpad.net,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com,www.googleapis.com,www.microsoft.com" GITHUB_SERVER_URL: ${{ github.server_url }} GITHUB_API_URL: ${{ github.api_url }} - GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"add_comment\":{\"hide_older_comments\":true,\"max\":5,\"target\":\"*\"},\"add_labels\":{\"allowed\":[\"AI-needs-CI-fix-input\"],\"max\":3,\"target\":\"*\"},\"create_report_incomplete_issue\":{},\"dispatch_workflow\":{\"aw_context_workflows\":[\"labelops-flake-fix\"],\"max\":3,\"workflow_files\":{\"labelops-flake-fix\":\".lock.yml\"},\"workflows\":[\"labelops-flake-fix\"]},\"missing_data\":{},\"missing_tool\":{},\"noop\":{\"max\":1,\"report-as-issue\":\"true\"},\"push_to_pull_request_branch\":{\"if_no_changes\":\"warn\",\"max\":5,\"max_patch_size\":10240,\"protect_top_level_dot_folders\":true,\"protected_files\":[\"package.json\",\"bun.lockb\",\"bunfig.toml\",\"deno.json\",\"deno.jsonc\",\"deno.lock\",\"global.json\",\"NuGet.Config\",\"Directory.Packages.props\",\"mix.exs\",\"mix.lock\",\"go.mod\",\"go.sum\",\"stack.yaml\",\"stack.yaml.lock\",\"pom.xml\",\"build.gradle\",\"build.gradle.kts\",\"settings.gradle\",\"settings.gradle.kts\",\"gradle.properties\",\"package-lock.json\",\"yarn.lock\",\"pnpm-lock.yaml\",\"npm-shrinkwrap.json\",\"requirements.txt\",\"Pipfile\",\"Pipfile.lock\",\"pyproject.toml\",\"setup.py\",\"setup.cfg\",\"Gemfile\",\"Gemfile.lock\",\"uv.lock\",\"CODEOWNERS\",\"DESIGN.md\",\"README.md\",\"CONTRIBUTING.md\",\"CHANGELOG.md\",\"SECURITY.md\",\"CODE_OF_CONDUCT.md\",\"AGENTS.md\",\"CLAUDE.md\",\"GEMINI.md\"],\"protected_files_policy\":\"fallback-to-issue\",\"target\":\"*\"},\"report_incomplete\":{}}" + GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"add_comment\":{\"hide_older_comments\":true,\"max\":5,\"target\":\"*\"},\"add_labels\":{\"allowed\":[\"AI-needs-CI-fix-input\"],\"max\":3,\"target\":\"*\"},\"create_report_incomplete_issue\":{},\"dispatch_workflow\":{\"aw_context_workflows\":[\"labelops-flake-fix\"],\"max\":3,\"workflow_files\":{\"labelops-flake-fix\":\".lock.yml\"},\"workflows\":[\"labelops-flake-fix\"]},\"missing_data\":{},\"missing_tool\":{},\"noop\":{\"max\":1,\"report-as-issue\":\"true\"},\"push_to_pull_request_branch\":{\"if_no_changes\":\"warn\",\"max\":5,\"max_patch_size\":10240,\"protect_top_level_dot_folders\":true,\"protected_files\":[\"package.json\",\"bun.lockb\",\"bunfig.toml\",\"deno.json\",\"deno.jsonc\",\"deno.lock\",\"global.json\",\"NuGet.Config\",\"Directory.Packages.props\",\"mix.exs\",\"mix.lock\",\"go.mod\",\"go.sum\",\"stack.yaml\",\"stack.yaml.lock\",\"pom.xml\",\"build.gradle\",\"build.gradle.kts\",\"settings.gradle\",\"settings.gradle.kts\",\"gradle.properties\",\"package-lock.json\",\"yarn.lock\",\"pnpm-lock.yaml\",\"npm-shrinkwrap.json\",\"requirements.txt\",\"Pipfile\",\"Pipfile.lock\",\"pyproject.toml\",\"setup.py\",\"setup.cfg\",\"Gemfile\",\"Gemfile.lock\",\"uv.lock\",\"CODEOWNERS\",\"DESIGN.md\",\"README.md\",\"CONTRIBUTING.md\",\"CHANGELOG.md\",\"SECURITY.md\",\"CODE_OF_CONDUCT.md\",\"AGENTS.md\",\"CLAUDE.md\",\"GEMINI.md\"],\"protected_files_policy\":\"allowed\",\"target\":\"*\"},\"report_incomplete\":{}}" GH_AW_CI_TRIGGER_TOKEN: ${{ secrets.GH_AW_CI_TRIGGER_TOKEN }} with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/labelops-pr-maintenance.md b/.github/workflows/labelops-pr-maintenance.md index c4e84d3a0e9..e817cdc1222 100644 --- a/.github/workflows/labelops-pr-maintenance.md +++ b/.github/workflows/labelops-pr-maintenance.md @@ -44,7 +44,7 @@ safe-outputs: push-to-pull-request-branch: target: "*" max: 5 - protected-files: fallback-to-issue + protected-files: allowed add-labels: allowed: ["AI-needs-CI-fix-input"] max: 3 @@ -60,7 +60,7 @@ You maintain open PRs that carry `AI-Auto-Resolve-CI` or `AI-Auto-Resolve-Confli ## Hard rules -1. **Never modify `.github/**`.** Protected by `fallback-to-issue`. +1. **Never modify `.github/**`.** (prompt-enforced; safe-outputs allows it for merge commits from upstream) 2. **Never merge, approve, close, or reopen a PR.** You push commits, comment, add labels, dispatch flake-fix. 3. **Never remove a label.** Only maintainers do that. 4. **Never push without local verification.** Build + targeted tests must pass first. Match the CI job's configuration (Debug vs Release, TFM). From 69b1309278fa2137c92400ed4450783755af8d09 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Thu, 28 May 2026 11:12:10 +0200 Subject: [PATCH 18/72] Fix Repo Assist: recompile lock files to v0.76.1, harden data fetch step (#19727) * Initial plan * Fix Repo Assist workflow: recompile lock files to v0.72.1, reduce API limits to prevent timeouts Root causes: 1. AWF binary v0.25.28 was removed from GitHub releases (404 error) 2. gh issue list --limit 500 through DIFC proxy causes 504 timeouts Fixes: - Recompile all workflow lock files from v0.68.3/v0.71.1 to v0.72.1 (AWF containers updated from 0.25.20/0.25.28 to 0.25.41) - Reduce issue fetch limit from 500 to 200 - Reduce PR fetch limit from 200 to 100 - Add fallback to empty JSON on fetch failures Agent-Logs-Url: https://github.com/dotnet/fsharp/sessions/5524a246-1400-4899-9b62-aaf71ac6996f Co-authored-by: T-Gro <46543583+T-Gro@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: T-Gro <46543583+T-Gro@users.noreply.github.com> Co-authored-by: Tomas Grosup Co-authored-by: Tomas Grosup --- .github/aw/actions-lock.json | 10 +- .../workflows/agentic-state-machine.lock.yml | 457 +++++++++++++----- .github/workflows/aw-auto-update.lock.yml | 241 +++++---- .github/workflows/labelops-flake-fix.lock.yml | 238 +++++---- .../labelops-pr-maintenance.lock.yml | 123 +++-- .../labelops-pr-security-scan.lock.yml | 436 ++++++++++++----- .../workflows/regression-pr-shepherd.lock.yml | 248 ++++++---- .github/workflows/repo-assist.lock.yml | 309 +++++++----- .github/workflows/repo-assist.md | 8 +- 9 files changed, 1397 insertions(+), 673 deletions(-) diff --git a/.github/aw/actions-lock.json b/.github/aw/actions-lock.json index fcedc685f32..3b287cb9d18 100644 --- a/.github/aw/actions-lock.json +++ b/.github/aw/actions-lock.json @@ -5,15 +5,15 @@ "version": "v8", "sha": "ed597411d8f924073f98dfc5c65a23a2325f34cd" }, - "actions/github-script@v9": { + "actions/github-script@v9.0.0": { "repo": "actions/github-script", - "version": "v9", + "version": "v9.0.0", "sha": "3a2844b7e9c422d3c10d287c895573f7108da1b3" }, - "github/gh-aw-actions/setup@v0.74.8": { + "github/gh-aw-actions/setup@v0.76.1": { "repo": "github/gh-aw-actions/setup", - "version": "v0.74.8", - "sha": "efa55847f72aadb03490d955263ff911bf758700" + "version": "v0.76.1", + "sha": "46d564922b082d0db93244972e8005ea6904ee5f" }, "github/gh-aw/actions/setup@v0.67.2": { "repo": "github/gh-aw/actions/setup", diff --git a/.github/workflows/agentic-state-machine.lock.yml b/.github/workflows/agentic-state-machine.lock.yml index 17cecc16aad..623ea7aacac 100644 --- a/.github/workflows/agentic-state-machine.lock.yml +++ b/.github/workflows/agentic-state-machine.lock.yml @@ -1,5 +1,5 @@ -# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"21c77c4aa434153a69f6f746dbea5f9abe823e1252873fcfb7bb4506c8812cc7","compiler_version":"v0.68.3","strict":true,"agent_id":"copilot"} -# gh-aw-manifest: {"version":1,"secrets":["COPILOT_GITHUB_TOKEN","GH_AW_CI_TRIGGER_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/checkout","sha":"de0fac2e4500dabe0009e67214ff5f5447ce83dd","version":"v6.0.2"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"373c709c69115d41ff229c7e5df9f8788daa9553","version":"v9"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"},{"repo":"github/gh-aw-actions/setup","sha":"ba90f2186d7ad780ec640f364005fa24e797b360","version":"v0.68.3"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.25.20"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.20"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.25.20"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.2.19"},{"image":"ghcr.io/github/github-mcp-server:v0.32.0"},{"image":"node:lts-alpine"}]} +# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"21c77c4aa434153a69f6f746dbea5f9abe823e1252873fcfb7bb4506c8812cc7","compiler_version":"v0.76.1","strict":true,"agent_id":"copilot"} +# gh-aw-manifest: {"version":1,"secrets":["COPILOT_GITHUB_TOKEN","GH_AW_CI_TRIGGER_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/checkout","sha":"de0fac2e4500dabe0009e67214ff5f5447ce83dd","version":"v6.0.2"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/setup-node","sha":"48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e","version":"v6.4.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"},{"repo":"github/gh-aw-actions/setup","sha":"46d564922b082d0db93244972e8005ea6904ee5f","version":"v0.76.1"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.25.55"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.55"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.25.55"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.3.19"},{"image":"ghcr.io/github/github-mcp-server:v1.0.4","digest":"sha256:e3816a476a977cfb836e7d221510011436c654d11861db66ecfd826601aba6a4","pinned_image":"ghcr.io/github/github-mcp-server:v1.0.4@sha256:e3816a476a977cfb836e7d221510011436c654d11861db66ecfd826601aba6a4"},{"image":"node:lts-alpine","digest":"sha256:2bdb65ed1dab192432bc31c95f94155ca5ad7fc1392fb7eb7526ab682fa5bf14","pinned_image":"node:lts-alpine@sha256:2bdb65ed1dab192432bc31c95f94155ca5ad7fc1392fb7eb7526ab682fa5bf14"}]} # ___ _ _ # / _ \ | | (_) # | |_| | __ _ ___ _ __ | |_ _ ___ @@ -14,7 +14,7 @@ # \ /\ / (_) | | | | ( | | | | (_) \ V V /\__ \ # \/ \/ \___/|_| |_|\_\|_| |_|\___/ \_/\_/ |___/ # -# This file was automatically generated by gh-aw (v0.68.3). DO NOT EDIT. +# This file was automatically generated by gh-aw (v0.76.1). DO NOT EDIT. # # To update this file, edit the corresponding .md file and run: # gh aw compile @@ -36,20 +36,21 @@ # Custom actions used: # - actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 # - actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 -# - actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 +# - actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 +# - actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 # - actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 -# - github/gh-aw-actions/setup@ba90f2186d7ad780ec640f364005fa24e797b360 # v0.68.3 +# - github/gh-aw-actions/setup@46d564922b082d0db93244972e8005ea6904ee5f # v0.76.1 # # Container images used: -# - ghcr.io/github/gh-aw-firewall/agent:0.25.20 -# - ghcr.io/github/gh-aw-firewall/api-proxy:0.25.20 -# - ghcr.io/github/gh-aw-firewall/squid:0.25.20 -# - ghcr.io/github/gh-aw-mcpg:v0.2.19 -# - ghcr.io/github/github-mcp-server:v0.32.0 -# - node:lts-alpine +# - ghcr.io/github/gh-aw-firewall/agent:0.25.55 +# - ghcr.io/github/gh-aw-firewall/api-proxy:0.25.55 +# - ghcr.io/github/gh-aw-firewall/squid:0.25.55 +# - ghcr.io/github/gh-aw-mcpg:v0.3.19 +# - ghcr.io/github/github-mcp-server:v1.0.4@sha256:e3816a476a977cfb836e7d221510011436c654d11861db66ecfd826601aba6a4 +# - node:lts-alpine@sha256:2bdb65ed1dab192432bc31c95f94155ca5ad7fc1392fb7eb7526ab682fa5bf14 name: "Agentic State Machine — Diagram Generator" -"on": +on: schedule: - cron: "0 0 */7 * *" # Friendly format: every 7d @@ -57,7 +58,7 @@ name: "Agentic State Machine — Diagram Generator" inputs: aw_context: default: "" - description: Agent caller context (used internally by Agentic Workflows). + description: "Agent caller context (used internally by Agentic Workflows)." required: false type: string @@ -77,38 +78,47 @@ jobs: outputs: comment_id: "" comment_repo: "" + engine_id: ${{ steps.generate_aw_info.outputs.engine_id }} lockdown_check_failed: ${{ steps.generate_aw_info.outputs.lockdown_check_failed == 'true' }} model: ${{ steps.generate_aw_info.outputs.model }} secret_verification_result: ${{ steps.validate-secret.outputs.verification_result }} + setup-parent-span-id: ${{ steps.setup.outputs.parent-span-id || steps.setup.outputs.span-id }} + setup-span-id: ${{ steps.setup.outputs.span-id }} setup-trace-id: ${{ steps.setup.outputs.trace-id }} stale_lock_file_failed: ${{ steps.check-lock-file.outputs.stale_lock_file_failed == 'true' }} steps: - name: Setup Scripts id: setup - uses: github/gh-aw-actions/setup@ba90f2186d7ad780ec640f364005fa24e797b360 # v0.68.3 + uses: github/gh-aw-actions/setup@46d564922b082d0db93244972e8005ea6904ee5f # v0.76.1 with: destination: ${{ runner.temp }}/gh-aw/actions job-name: ${{ github.job }} + env: + GH_AW_SETUP_WORKFLOW_NAME: "Agentic State Machine — Diagram Generator" + GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/agentic-state-machine.lock.yml@${{ github.ref }} + GH_AW_INFO_VERSION: "1.0.52" + GH_AW_INFO_AWF_VERSION: "v0.25.55" + GH_AW_INFO_ENGINE_ID: "copilot" - name: Generate agentic run info id: generate_aw_info env: GH_AW_INFO_ENGINE_ID: "copilot" GH_AW_INFO_ENGINE_NAME: "GitHub Copilot CLI" - GH_AW_INFO_MODEL: ${{ vars.GH_AW_MODEL_AGENT_COPILOT || 'auto' }} - GH_AW_INFO_VERSION: "1.0.21" - GH_AW_INFO_AGENT_VERSION: "1.0.21" - GH_AW_INFO_CLI_VERSION: "v0.68.3" + GH_AW_INFO_MODEL: ${{ vars.GH_AW_MODEL_AGENT_COPILOT || 'claude-sonnet-4.6' }} + GH_AW_INFO_VERSION: "1.0.52" + GH_AW_INFO_AGENT_VERSION: "1.0.52" + GH_AW_INFO_CLI_VERSION: "v0.76.1" GH_AW_INFO_WORKFLOW_NAME: "Agentic State Machine — Diagram Generator" GH_AW_INFO_EXPERIMENTAL: "false" GH_AW_INFO_SUPPORTS_TOOLS_ALLOWLIST: "true" GH_AW_INFO_STAGED: "false" GH_AW_INFO_ALLOWED_DOMAINS: '["defaults","github"]' GH_AW_INFO_FIREWALL_ENABLED: "true" - GH_AW_INFO_AWF_VERSION: "v0.25.20" + GH_AW_INFO_AWF_VERSION: "v0.25.55" GH_AW_INFO_AWMG_VERSION: "" GH_AW_INFO_FIREWALL_TYPE: "squid" GH_AW_COMPILED_STRICT: "true" - uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 with: script: | const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); @@ -127,11 +137,24 @@ jobs: sparse-checkout: | .github .agents + .antigravity + .claude + .codex + .crush + .gemini + .opencode + .pi sparse-checkout-cone-mode: true fetch-depth: 1 + - name: Save agent config folders for base branch restoration + env: + GH_AW_AGENT_FOLDERS: ".agents .antigravity .claude .codex .crush .gemini .github .opencode .pi" + GH_AW_AGENT_FILES: ".crush.json AGENTS.md ANTIGRAVITY.md CLAUDE.md GEMINI.md PI.md opencode.jsonc" + # poutine:ignore untrusted_checkout_exec + run: bash "${RUNNER_TEMP}/gh-aw/actions/save_base_github_folders.sh" - name: Check workflow lock file id: check-lock-file - uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: GH_AW_WORKFLOW_FILE: "agentic-state-machine.lock.yml" GH_AW_CONTEXT_WORKFLOW_REF: "${{ github.workflow_ref }}" @@ -142,9 +165,9 @@ jobs: const { main } = require('${{ runner.temp }}/gh-aw/actions/check_workflow_timestamp_api.cjs'); await main(); - name: Check compile-agentic version - uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: - GH_AW_COMPILED_VERSION: "v0.68.3" + GH_AW_COMPILED_VERSION: "v0.76.1" with: script: | const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); @@ -155,11 +178,11 @@ jobs: env: GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt GH_AW_SAFE_OUTPUTS: ${{ runner.temp }}/gh-aw/safeoutputs/outputs.jsonl + GH_AW_EXPR_1A3A194A: ${{ github.event.discussion.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'discussion' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }} + GH_AW_EXPR_463A214A: ${{ github.event.pull_request.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'pull_request' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }} + GH_AW_EXPR_802A9F6A: ${{ github.event.issue.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'issue' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }} + GH_AW_EXPR_FF1D34CE: ${{ github.event.comment.id || fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').comment_id }} GH_AW_GITHUB_ACTOR: ${{ github.actor }} - GH_AW_GITHUB_EVENT_COMMENT_ID: ${{ github.event.comment.id }} - GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER: ${{ github.event.discussion.number }} - GH_AW_GITHUB_EVENT_ISSUE_NUMBER: ${{ github.event.issue.number }} - GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }} GH_AW_GITHUB_REPOSITORY: ${{ github.repository }} GH_AW_GITHUB_RUN_ID: ${{ github.run_id }} GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }} @@ -181,30 +204,33 @@ jobs: cat "${RUNNER_TEMP}/gh-aw/prompts/safe_outputs_create_pull_request.md" cat << 'GH_AW_PROMPT_96518c4ea1ca6788_EOF' + GH_AW_PROMPT_96518c4ea1ca6788_EOF + cat "${RUNNER_TEMP}/gh-aw/prompts/mcp_cli_tools_prompt.md" + cat << 'GH_AW_PROMPT_96518c4ea1ca6788_EOF' The following GitHub context information is available for this workflow: - {{#if __GH_AW_GITHUB_ACTOR__ }} + {{#if github.actor}} - **actor**: __GH_AW_GITHUB_ACTOR__ {{/if}} - {{#if __GH_AW_GITHUB_REPOSITORY__ }} + {{#if github.repository}} - **repository**: __GH_AW_GITHUB_REPOSITORY__ {{/if}} - {{#if __GH_AW_GITHUB_WORKSPACE__ }} + {{#if github.workspace}} - **workspace**: __GH_AW_GITHUB_WORKSPACE__ {{/if}} - {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }} - - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ + {{#if github.event.issue.number || (github.aw.context.item_type == 'issue' && github.aw.context.item_number)}} + - **issue-number**: #__GH_AW_EXPR_802A9F6A__ {{/if}} - {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }} - - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ + {{#if github.event.discussion.number || (github.aw.context.item_type == 'discussion' && github.aw.context.item_number)}} + - **discussion-number**: #__GH_AW_EXPR_1A3A194A__ {{/if}} - {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }} - - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ + {{#if github.event.pull_request.number || (github.aw.context.item_type == 'pull_request' && github.aw.context.item_number)}} + - **pull-request-number**: #__GH_AW_EXPR_463A214A__ {{/if}} - {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }} - - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__ + {{#if github.event.comment.id || github.aw.context.comment_id}} + - **comment-id**: __GH_AW_EXPR_FF1D34CE__ {{/if}} - {{#if __GH_AW_GITHUB_RUN_ID__ }} + {{#if github.run_id}} - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__ {{/if}} @@ -217,9 +243,10 @@ jobs: GH_AW_PROMPT_96518c4ea1ca6788_EOF } > "$GH_AW_PROMPT" - name: Interpolate variables and render templates - uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt + GH_AW_ENGINE_ID: "copilot" with: script: | const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); @@ -227,17 +254,18 @@ jobs: const { main } = require('${{ runner.temp }}/gh-aw/actions/interpolate_prompt.cjs'); await main(); - name: Substitute placeholders - uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt + GH_AW_EXPR_1A3A194A: ${{ github.event.discussion.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'discussion' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }} + GH_AW_EXPR_463A214A: ${{ github.event.pull_request.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'pull_request' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }} + GH_AW_EXPR_802A9F6A: ${{ github.event.issue.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'issue' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }} + GH_AW_EXPR_FF1D34CE: ${{ github.event.comment.id || fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').comment_id }} GH_AW_GITHUB_ACTOR: ${{ github.actor }} - GH_AW_GITHUB_EVENT_COMMENT_ID: ${{ github.event.comment.id }} - GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER: ${{ github.event.discussion.number }} - GH_AW_GITHUB_EVENT_ISSUE_NUMBER: ${{ github.event.issue.number }} - GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }} GH_AW_GITHUB_REPOSITORY: ${{ github.repository }} GH_AW_GITHUB_RUN_ID: ${{ github.run_id }} GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }} + GH_AW_MCP_CLI_SERVERS_LIST: '- `safeoutputs` — run `safeoutputs --help` to see available tools' with: script: | const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); @@ -249,14 +277,15 @@ jobs: return await substitutePlaceholders({ file: process.env.GH_AW_PROMPT, substitutions: { + GH_AW_EXPR_1A3A194A: process.env.GH_AW_EXPR_1A3A194A, + GH_AW_EXPR_463A214A: process.env.GH_AW_EXPR_463A214A, + GH_AW_EXPR_802A9F6A: process.env.GH_AW_EXPR_802A9F6A, + GH_AW_EXPR_FF1D34CE: process.env.GH_AW_EXPR_FF1D34CE, GH_AW_GITHUB_ACTOR: process.env.GH_AW_GITHUB_ACTOR, - GH_AW_GITHUB_EVENT_COMMENT_ID: process.env.GH_AW_GITHUB_EVENT_COMMENT_ID, - GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER: process.env.GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER, - GH_AW_GITHUB_EVENT_ISSUE_NUMBER: process.env.GH_AW_GITHUB_EVENT_ISSUE_NUMBER, - GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER: process.env.GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER, GH_AW_GITHUB_REPOSITORY: process.env.GH_AW_GITHUB_REPOSITORY, GH_AW_GITHUB_RUN_ID: process.env.GH_AW_GITHUB_RUN_ID, - GH_AW_GITHUB_WORKSPACE: process.env.GH_AW_GITHUB_WORKSPACE + GH_AW_GITHUB_WORKSPACE: process.env.GH_AW_GITHUB_WORKSPACE, + GH_AW_MCP_CLI_SERVERS_LIST: process.env.GH_AW_MCP_CLI_SERVERS_LIST } }); - name: Validate prompt placeholders @@ -274,10 +303,16 @@ jobs: uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: activation + include-hidden-files: true path: | /tmp/gh-aw/aw_info.json /tmp/gh-aw/aw-prompts/prompt.txt + /tmp/gh-aw/aw-prompts/prompt-template.txt + /tmp/gh-aw/aw-prompts/prompt-import-tree.json /tmp/gh-aw/github_rate_limits.jsonl + /tmp/gh-aw/base + /tmp/gh-aw/.github/agents + /tmp/gh-aw/.github/skills if-no-files-found: ignore retention-days: 1 @@ -295,25 +330,35 @@ jobs: GH_AW_MCP_LOG_DIR: /tmp/gh-aw/mcp-logs/safeoutputs GH_AW_WORKFLOW_ID_SANITIZED: agenticstatemachine outputs: - agentic_engine_timeout: ${{ steps.detect-copilot-errors.outputs.agentic_engine_timeout || 'false' }} + agentic_engine_timeout: ${{ steps.detect-agent-errors.outputs.agentic_engine_timeout || 'false' }} checkout_pr_success: ${{ steps.checkout-pr.outputs.checkout_pr_success || 'true' }} effective_tokens: ${{ steps.parse-mcp-gateway.outputs.effective_tokens }} + effective_tokens_rate_limit_error: ${{ steps.parse-mcp-gateway.outputs.effective_tokens_rate_limit_error || 'false' }} has_patch: ${{ steps.collect_output.outputs.has_patch }} - inference_access_error: ${{ steps.detect-copilot-errors.outputs.inference_access_error || 'false' }} - mcp_policy_error: ${{ steps.detect-copilot-errors.outputs.mcp_policy_error || 'false' }} + inference_access_error: ${{ steps.detect-agent-errors.outputs.inference_access_error || 'false' }} + mcp_policy_error: ${{ steps.detect-agent-errors.outputs.mcp_policy_error || 'false' }} model: ${{ needs.activation.outputs.model }} - model_not_supported_error: ${{ steps.detect-copilot-errors.outputs.model_not_supported_error || 'false' }} + model_not_supported_error: ${{ steps.detect-agent-errors.outputs.model_not_supported_error || 'false' }} output: ${{ steps.collect_output.outputs.output }} output_types: ${{ steps.collect_output.outputs.output_types }} + setup-parent-span-id: ${{ steps.setup.outputs.parent-span-id || steps.setup.outputs.span-id }} + setup-span-id: ${{ steps.setup.outputs.span-id }} setup-trace-id: ${{ steps.setup.outputs.trace-id }} steps: - name: Setup Scripts id: setup - uses: github/gh-aw-actions/setup@ba90f2186d7ad780ec640f364005fa24e797b360 # v0.68.3 + uses: github/gh-aw-actions/setup@46d564922b082d0db93244972e8005ea6904ee5f # v0.76.1 with: destination: ${{ runner.temp }}/gh-aw/actions job-name: ${{ github.job }} trace-id: ${{ needs.activation.outputs.setup-trace-id }} + parent-span-id: ${{ needs.activation.outputs.setup-parent-span-id || needs.activation.outputs.setup-span-id }} + env: + GH_AW_SETUP_WORKFLOW_NAME: "Agentic State Machine — Diagram Generator" + GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/agentic-state-machine.lock.yml@${{ github.ref }} + GH_AW_INFO_VERSION: "1.0.52" + GH_AW_INFO_AWF_VERSION: "v0.25.55" + GH_AW_INFO_ENGINE_ID: "copilot" - name: Set runtime paths id: set-runtime-paths run: | @@ -349,7 +394,7 @@ jobs: id: checkout-pr if: | github.event.pull_request || github.event.issue.pull_request - uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: GH_TOKEN: ${{ secrets.GH_AW_GITHUB_MCP_SERVER_TOKEN || secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} with: @@ -360,11 +405,11 @@ jobs: const { main } = require('${{ runner.temp }}/gh-aw/actions/checkout_pr_branch.cjs'); await main(); - name: Install GitHub Copilot CLI - run: bash "${RUNNER_TEMP}/gh-aw/actions/install_copilot_cli.sh" 1.0.21 + run: bash "${RUNNER_TEMP}/gh-aw/actions/install_copilot_cli.sh" 1.0.52 env: GH_HOST: github.com - name: Install AWF binary - run: bash "${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh" v0.25.20 + run: bash "${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh" v0.25.55 - name: Parse integrity filter lists id: parse-guard-vars env: @@ -372,17 +417,37 @@ jobs: GH_AW_TRUSTED_USERS_VAR: ${{ vars.GH_AW_GITHUB_TRUSTED_USERS || '' }} GH_AW_APPROVAL_LABELS_VAR: ${{ vars.GH_AW_GITHUB_APPROVAL_LABELS || '' }} run: bash "${RUNNER_TEMP}/gh-aw/actions/parse_guard_list.sh" + - name: Download activation artifact + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 + with: + name: activation + path: /tmp/gh-aw + - name: Restore agent config folders from base branch + if: steps.checkout-pr.outcome == 'success' + env: + GH_AW_AGENT_FOLDERS: ".agents .antigravity .claude .codex .crush .gemini .github .opencode .pi" + GH_AW_AGENT_FILES: ".crush.json AGENTS.md ANTIGRAVITY.md CLAUDE.md GEMINI.md PI.md opencode.jsonc" + run: bash "${RUNNER_TEMP}/gh-aw/actions/restore_base_github_folders.sh" + - name: Restore inline sub-agents from activation artifact + env: + GH_AW_SUB_AGENT_DIR: ".github/agents" + GH_AW_SUB_AGENT_EXT: ".agent.md" + run: bash "${RUNNER_TEMP}/gh-aw/actions/restore_inline_sub_agents.sh" + - name: Restore inline skills from activation artifact + env: + GH_AW_SKILL_DIR: ".github/skills" + run: bash "${RUNNER_TEMP}/gh-aw/actions/restore_inline_skills.sh" - name: Download container images - run: bash "${RUNNER_TEMP}/gh-aw/actions/download_docker_images.sh" ghcr.io/github/gh-aw-firewall/agent:0.25.20 ghcr.io/github/gh-aw-firewall/api-proxy:0.25.20 ghcr.io/github/gh-aw-firewall/squid:0.25.20 ghcr.io/github/gh-aw-mcpg:v0.2.19 ghcr.io/github/github-mcp-server:v0.32.0 node:lts-alpine - - name: Write Safe Outputs Config + run: bash "${RUNNER_TEMP}/gh-aw/actions/download_docker_images.sh" ghcr.io/github/gh-aw-firewall/agent:0.25.55 ghcr.io/github/gh-aw-firewall/api-proxy:0.25.55 ghcr.io/github/gh-aw-firewall/squid:0.25.55 ghcr.io/github/gh-aw-mcpg:v0.3.19 ghcr.io/github/github-mcp-server:v1.0.4@sha256:e3816a476a977cfb836e7d221510011436c654d11861db66ecfd826601aba6a4 node:lts-alpine@sha256:2bdb65ed1dab192432bc31c95f94155ca5ad7fc1392fb7eb7526ab682fa5bf14 + - name: Generate Safe Outputs Config run: | mkdir -p "${RUNNER_TEMP}/gh-aw/safeoutputs" mkdir -p /tmp/gh-aw/safeoutputs mkdir -p /tmp/gh-aw/mcp-logs/safeoutputs cat > "${RUNNER_TEMP}/gh-aw/safeoutputs/config.json" << 'GH_AW_SAFE_OUTPUTS_CONFIG_f63147129cd97ff0_EOF' - {"create_pull_request":{"allowed_files":[".github/docs/**"],"draft":false,"labels":["automation","NO_RELEASE_NOTES"],"max":1,"max_patch_size":1024,"protected_files":["package.json","bun.lockb","bunfig.toml","deno.json","deno.jsonc","deno.lock","global.json","NuGet.Config","Directory.Packages.props","mix.exs","mix.lock","go.mod","go.sum","stack.yaml","stack.yaml.lock","pom.xml","build.gradle","build.gradle.kts","settings.gradle","settings.gradle.kts","gradle.properties","package-lock.json","yarn.lock","pnpm-lock.yaml","npm-shrinkwrap.json","requirements.txt","Pipfile","Pipfile.lock","pyproject.toml","setup.py","setup.cfg","Gemfile","Gemfile.lock","uv.lock","CODEOWNERS"],"protected_path_prefixes":[".github/",".agents/"],"title_prefix":"[Agentic State Machine] "},"create_report_incomplete_issue":{},"missing_data":{},"missing_tool":{},"noop":{"max":1,"report-as-issue":"false"},"report_incomplete":{}} + {"create_pull_request":{"allowed_files":[".github/docs/**"],"draft":false,"labels":["automation","NO_RELEASE_NOTES"],"max":1,"max_patch_files":100,"max_patch_size":1024,"protect_top_level_dot_folders":true,"protected_files":["package.json","bun.lockb","bunfig.toml","deno.json","deno.jsonc","deno.lock","global.json","NuGet.Config","Directory.Packages.props","mix.exs","mix.lock","go.mod","go.sum","stack.yaml","stack.yaml.lock","pom.xml","build.gradle","build.gradle.kts","settings.gradle","settings.gradle.kts","gradle.properties","package-lock.json","yarn.lock","pnpm-lock.yaml","npm-shrinkwrap.json","requirements.txt","Pipfile","Pipfile.lock","pyproject.toml","setup.py","setup.cfg","Gemfile","Gemfile.lock","uv.lock","CODEOWNERS","DESIGN.md","README.md","CONTRIBUTING.md","CHANGELOG.md","SECURITY.md","CODE_OF_CONDUCT.md","AGENTS.md","CLAUDE.md","GEMINI.md"],"protected_files_policy":"request_review","title_prefix":"[Agentic State Machine] "},"create_report_incomplete_issue":{},"missing_data":{},"missing_tool":{},"noop":{"max":1,"report-as-issue":"false"},"report_incomplete":{}} GH_AW_SAFE_OUTPUTS_CONFIG_f63147129cd97ff0_EOF - - name: Write Safe Outputs Tools + - name: Generate Safe Outputs Tools env: GH_AW_TOOLS_META_JSON: | { @@ -397,6 +462,11 @@ jobs: "create_pull_request": { "defaultMax": 1, "fields": { + "base": { + "type": "string", + "sanitize": true, + "maxLength": 128 + }, "body": { "required": true, "type": "string", @@ -504,7 +574,7 @@ jobs: } } } - uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 with: script: | const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); @@ -560,11 +630,12 @@ jobs: GITHUB_MCP_SERVER_TOKEN: ${{ secrets.GH_AW_GITHUB_MCP_SERVER_TOKEN || secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} run: | set -eo pipefail - mkdir -p /tmp/gh-aw/mcp-config + mkdir -p "${RUNNER_TEMP}/gh-aw/mcp-config" # Export gateway environment variables for MCP config and gateway script - export MCP_GATEWAY_PORT="80" + export MCP_GATEWAY_PORT="8080" export MCP_GATEWAY_DOMAIN="host.docker.internal" + export MCP_GATEWAY_HOST_DOMAIN="localhost" MCP_GATEWAY_API_KEY=$(openssl rand -base64 45 | tr -d '/+=') echo "::add-mask::${MCP_GATEWAY_API_KEY}" export MCP_GATEWAY_API_KEY @@ -574,15 +645,24 @@ jobs: export DEBUG="*" export GH_AW_ENGINE="copilot" - export MCP_GATEWAY_DOCKER_COMMAND='docker run -i --rm --network host -v /var/run/docker.sock:/var/run/docker.sock -e MCP_GATEWAY_PORT -e MCP_GATEWAY_DOMAIN -e MCP_GATEWAY_API_KEY -e MCP_GATEWAY_PAYLOAD_DIR -e MCP_GATEWAY_PAYLOAD_SIZE_THRESHOLD -e DEBUG -e MCP_GATEWAY_LOG_DIR -e GH_AW_MCP_LOG_DIR -e GH_AW_SAFE_OUTPUTS -e GH_AW_SAFE_OUTPUTS_CONFIG_PATH -e GH_AW_SAFE_OUTPUTS_TOOLS_PATH -e GH_AW_ASSETS_BRANCH -e GH_AW_ASSETS_MAX_SIZE_KB -e GH_AW_ASSETS_ALLOWED_EXTS -e DEFAULT_BRANCH -e GITHUB_MCP_SERVER_TOKEN -e GITHUB_MCP_GUARD_MIN_INTEGRITY -e GITHUB_MCP_GUARD_REPOS -e GITHUB_REPOSITORY -e GITHUB_SERVER_URL -e GITHUB_SHA -e GITHUB_WORKSPACE -e GITHUB_TOKEN -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RUN_ATTEMPT -e GITHUB_JOB -e GITHUB_ACTION -e GITHUB_EVENT_NAME -e GITHUB_EVENT_PATH -e GITHUB_ACTOR -e GITHUB_ACTOR_ID -e GITHUB_TRIGGERING_ACTOR -e GITHUB_WORKFLOW -e GITHUB_WORKFLOW_REF -e GITHUB_WORKFLOW_SHA -e GITHUB_REF -e GITHUB_REF_NAME -e GITHUB_REF_TYPE -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GH_AW_SAFE_OUTPUTS_PORT -e GH_AW_SAFE_OUTPUTS_API_KEY -v /tmp/gh-aw/mcp-payloads:/tmp/gh-aw/mcp-payloads:rw -v /opt:/opt:ro -v /tmp:/tmp:rw -v '"${GITHUB_WORKSPACE}"':'"${GITHUB_WORKSPACE}"':rw ghcr.io/github/gh-aw-mcpg:v0.2.19' + MCP_GATEWAY_UID=$(id -u 2>/dev/null || echo '0') + MCP_GATEWAY_GID=$(id -g 2>/dev/null || echo '0') + case "${DOCKER_HOST:-}" in + unix://* ) DOCKER_SOCK_PATH="${DOCKER_HOST#unix://}" ;; + /* ) DOCKER_SOCK_PATH="$DOCKER_HOST" ;; + * ) DOCKER_SOCK_PATH=/var/run/docker.sock ;; + esac + DOCKER_SOCK_GID=$(stat -c '%g' "$DOCKER_SOCK_PATH" 2>/dev/null || echo '0') + export MCP_GATEWAY_DOCKER_COMMAND='docker run -i --rm --network host --add-host host.docker.internal:127.0.0.1 --user '"${MCP_GATEWAY_UID}"':'"${MCP_GATEWAY_GID}"' --group-add '"${DOCKER_SOCK_GID}"' -v '"${DOCKER_SOCK_PATH}"':/var/run/docker.sock -e MCP_GATEWAY_PORT -e MCP_GATEWAY_DOMAIN -e MCP_GATEWAY_API_KEY -e MCP_GATEWAY_PAYLOAD_DIR -e MCP_GATEWAY_PAYLOAD_SIZE_THRESHOLD -e DOCKER_HOST=unix:///var/run/docker.sock -e DEBUG -e MCP_GATEWAY_LOG_DIR -e GH_AW_MCP_LOG_DIR -e GH_AW_SAFE_OUTPUTS -e GH_AW_SAFE_OUTPUTS_CONFIG_PATH -e GH_AW_SAFE_OUTPUTS_TOOLS_PATH -e GH_AW_ASSETS_BRANCH -e GH_AW_ASSETS_MAX_SIZE_KB -e GH_AW_ASSETS_ALLOWED_EXTS -e DEFAULT_BRANCH -e GITHUB_MCP_SERVER_TOKEN -e GITHUB_MCP_GUARD_MIN_INTEGRITY -e GITHUB_MCP_GUARD_REPOS -e GITHUB_REPOSITORY -e GITHUB_SERVER_URL -e GITHUB_SHA -e GITHUB_WORKSPACE -e GITHUB_TOKEN -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RUN_ATTEMPT -e GITHUB_JOB -e GITHUB_ACTION -e GITHUB_EVENT_NAME -e GITHUB_EVENT_PATH -e GITHUB_ACTOR -e GITHUB_ACTOR_ID -e GITHUB_TRIGGERING_ACTOR -e GITHUB_WORKFLOW -e GITHUB_WORKFLOW_REF -e GITHUB_WORKFLOW_SHA -e GITHUB_REF -e GITHUB_REF_NAME -e GITHUB_REF_TYPE -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GH_AW_SAFE_OUTPUTS_PORT -e GH_AW_SAFE_OUTPUTS_API_KEY -v /tmp/gh-aw/mcp-payloads:/tmp/gh-aw/mcp-payloads:rw -v /opt:/opt:ro -v /tmp:/tmp:rw -v '"${GITHUB_WORKSPACE}"':'"${GITHUB_WORKSPACE}"':rw ghcr.io/github/gh-aw-mcpg:v0.3.19' mkdir -p /home/runner/.copilot - cat << GH_AW_MCP_CONFIG_903e0d922f6fd3f9_EOF | bash "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.sh" + GH_AW_NODE=$(which node 2>/dev/null || command -v node 2>/dev/null || echo node) + cat << GH_AW_MCP_CONFIG_903e0d922f6fd3f9_EOF | "$GH_AW_NODE" "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.cjs" { "mcpServers": { "github": { "type": "stdio", - "container": "ghcr.io/github/github-mcp-server:v0.32.0", + "container": "ghcr.io/github/github-mcp-server:v1.0.4", "env": { "GITHUB_HOST": "\${GITHUB_SERVER_URL}", "GITHUB_PERSONAL_ACCESS_TOKEN": "\${GITHUB_MCP_SERVER_TOKEN}", @@ -622,36 +702,62 @@ jobs: } } GH_AW_MCP_CONFIG_903e0d922f6fd3f9_EOF - - name: Download activation artifact - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 + - name: Mount MCP servers as CLIs + id: mount-mcp-clis + continue-on-error: true + env: + MCP_GATEWAY_API_KEY: ${{ steps.start-mcp-gateway.outputs.gateway-api-key }} + MCP_GATEWAY_DOMAIN: ${{ steps.start-mcp-gateway.outputs.gateway-domain }} + MCP_GATEWAY_PORT: ${{ steps.start-mcp-gateway.outputs.gateway-port }} + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 with: - name: activation - path: /tmp/gh-aw - - name: Clean git credentials + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/mount_mcp_as_cli.cjs'); + await main(); + - name: Clean credentials continue-on-error: true run: bash "${RUNNER_TEMP}/gh-aw/actions/clean_git_credentials.sh" + - name: Audit pre-agent workspace + id: pre_agent_audit + continue-on-error: true + run: bash "${RUNNER_TEMP}/gh-aw/actions/audit_pre_agent_workspace.sh" - name: Execute GitHub Copilot CLI id: agentic_execution # Copilot CLI tool arguments (sorted): timeout-minutes: 15 run: | set -o pipefail + printf '%s' "$(date +%s%3N)" > /tmp/gh-aw/agent_cli_start_ms.txt touch /tmp/gh-aw/agent-step-summary.md + GH_AW_NODE_BIN=$(command -v node 2>/dev/null || true) + export GH_AW_NODE_BIN + export COPILOT_API_KEY="$COPILOT_DUMMY_BYOK" (umask 177 && touch /tmp/gh-aw/agent-stdio.log) + printf '%s\n' '{"$schema":"https://github.com/github/gh-aw-firewall/releases/download/v0.25.55/awf-config.schema.json","network":{"allowDomains":["*.githubusercontent.com","api.business.githubcopilot.com","api.enterprise.githubcopilot.com","api.github.com","api.githubcopilot.com","api.individual.githubcopilot.com","api.snapcraft.io","archive.ubuntu.com","azure.archive.ubuntu.com","codeload.github.com","crl.geotrust.com","crl.globalsign.com","crl.identrust.com","crl.sectigo.com","crl.thawte.com","crl.usertrust.com","crl.verisign.com","crl3.digicert.com","crl4.digicert.com","crls.ssl.com","docs.github.com","github-cloud.githubusercontent.com","github-cloud.s3.amazonaws.com","github.blog","github.com","github.githubassets.com","host.docker.internal","json-schema.org","json.schemastore.org","keyserver.ubuntu.com","lfs.github.com","objects.githubusercontent.com","ocsp.digicert.com","ocsp.geotrust.com","ocsp.globalsign.com","ocsp.identrust.com","ocsp.sectigo.com","ocsp.ssl.com","ocsp.thawte.com","ocsp.usertrust.com","ocsp.verisign.com","packagecloud.io","packages.cloud.google.com","packages.microsoft.com","patch-diff.githubusercontent.com","ppa.launchpad.net","raw.githubusercontent.com","registry.npmjs.org","s.symcb.com","s.symcd.com","security.ubuntu.com","telemetry.enterprise.githubcopilot.com","ts-crl.ws.symantec.com","ts-ocsp.ws.symantec.com","www.googleapis.com"]},"apiProxy":{"enabled":true,"enableTokenSteering":true,"maxRuns":500,"maxEffectiveTokens":25000000,"models":{"agent":["sonnet-6x","gpt-5.4","gpt-5.3","gemini-pro","any"],"antigravity":["copilot/antigravity*","google/antigravity*","gemini/antigravity*"],"any":["copilot/*","anthropic/*","openai/*","google/*","gemini/*"],"claude":["agent"],"codex":["agent"],"coding":["copilot/gpt-5*codex*","openai/gpt-5*codex*","gpt-5-codex"],"computer-use":["copilot/*computer-use*","google/*computer-use*","gemini/*computer-use*","openai/*computer-use*"],"copilot":["agent"],"deep-research":["copilot/deep-research*","copilot/o3-deep-research*","copilot/o4-mini-deep-research*","google/deep-research*","gemini/deep-research*","openai/o3-deep-research*","openai/o4-mini-deep-research*"],"gemini":["agent"],"gemini-3-flash":["copilot/gemini-3*flash*","google/gemini-3*flash*","gemini/gemini-3*flash*"],"gemini-3-pro":["copilot/gemini-3*pro*","google/gemini-3*pro*","gemini/gemini-3*pro*"],"gemini-3.1-flash":["copilot/gemini-3.1*flash*","google/gemini-3.1*flash*","gemini/gemini-3.1*flash*"],"gemini-3.1-pro":["copilot/gemini-3.1*pro*","google/gemini-3.1*pro*","gemini/gemini-3.1*pro*"],"gemini-3.5-flash":["copilot/gemini-3.5*flash*","google/gemini-3.5*flash*","gemini/gemini-3.5*flash*"],"gemini-flash":["copilot/gemini-*flash*","google/gemini-*flash*","gemini/gemini-*flash*"],"gemini-flash-lite":["copilot/gemini-*flash*lite*","google/gemini-*flash*lite*","gemini/gemini-*flash*lite*"],"gemini-pro":["copilot/gemini-*pro*","google/gemini-*pro*","gemini/gemini-*pro*"],"gemma":["copilot/gemma*","google/gemma*","gemini/gemma*"],"gpt-4.1":["copilot/gpt-4.1*","openai/gpt-4.1*"],"gpt-5":["copilot/gpt-5*","openai/gpt-5*"],"gpt-5-codex":["copilot/gpt-5*codex*","openai/gpt-5*codex*"],"gpt-5-mini":["copilot/gpt-5*mini*","openai/gpt-5*mini*"],"gpt-5-nano":["copilot/gpt-5*nano*","openai/gpt-5*nano*"],"gpt-5-pro":["copilot/gpt-5*pro*","openai/gpt-5*pro*"],"gpt-5.2":["copilot/gpt-5.2*","openai/gpt-5.2*"],"gpt-5.3":["copilot/gpt-5.3*","openai/gpt-5.3*"],"gpt-5.4":["copilot/gpt-5.4*","openai/gpt-5.4*"],"gpt-5.5":["copilot/gpt-5.5*","openai/gpt-5.5*"],"haiku":["copilot/*haiku*","anthropic/*haiku*"],"large":["sonnet","gpt-5-pro","gpt-5","gemini-pro"],"mini":["haiku","gpt-5-mini","gpt-5-nano","gemini-flash-lite"],"opus":["copilot/*opus*","anthropic/*opus*"],"opusplan":["opus?effort=high"],"reasoning":["copilot/o1*","copilot/o3*","copilot/o4*","openai/o1*","openai/o3*","openai/o4*"],"robotics":["copilot/*robotics*","google/*robotics*","gemini/*robotics*"],"small":["mini"],"sonnet":["copilot/*sonnet*","anthropic/*sonnet*"],"sonnet-6x":["copilot/*sonnet-4-5-*","anthropic/*sonnet-4-5-*","copilot/*sonnet-4-6*","anthropic/*sonnet-4-6*"],"summarization":["haiku","gpt-5-mini","gemini-flash-lite","mini"],"vision":["copilot/gemini-*image*","gemini/gemini-*image*","copilot/gemini-*flash*","gemini/gemini-*flash*"]}},"container":{"imageTag":"0.25.55"}}' > "${RUNNER_TEMP}/gh-aw/awf-config.json" + cp "${RUNNER_TEMP}/gh-aw/awf-config.json" /tmp/gh-aw/awf-config.json + GH_AW_DOCKER_HOST_PATH_PREFIX_ARGS="" + if [[ "${DOCKER_HOST:-}" =~ ^tcp:// ]]; then + GH_AW_DOCKER_HOST_PATH_PREFIX_ARGS="--docker-host-path-prefix /tmp/gh-aw" + fi # shellcheck disable=SC1003 - sudo -E awf --container-workdir "${GITHUB_WORKSPACE}" --mount "${RUNNER_TEMP}/gh-aw:${RUNNER_TEMP}/gh-aw:ro" --mount "${RUNNER_TEMP}/gh-aw:/host${RUNNER_TEMP}/gh-aw:ro" --env-all --exclude-env COPILOT_GITHUB_TOKEN --exclude-env GITHUB_MCP_SERVER_TOKEN --exclude-env MCP_GATEWAY_API_KEY --allow-domains '*.githubusercontent.com,api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,docs.github.com,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.blog,github.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,ppa.launchpad.net,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com,www.googleapis.com' --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --audit-dir /tmp/gh-aw/sandbox/firewall/audit --enable-host-access --image-tag 0.25.20 --skip-pull --enable-api-proxy \ - -- /bin/bash -c 'node ${RUNNER_TEMP}/gh-aw/actions/copilot_driver.cjs /usr/local/bin/copilot --add-dir /tmp/gh-aw/ --log-level all --log-dir /tmp/gh-aw/sandbox/agent/logs/ --disable-builtin-mcps --no-ask-user --allow-all-tools --allow-all-paths --add-dir "${GITHUB_WORKSPACE}" --prompt "$(cat /tmp/gh-aw/aw-prompts/prompt.txt)"' 2>&1 | tee -a /tmp/gh-aw/agent-stdio.log + sudo -E awf --config "${RUNNER_TEMP}/gh-aw/awf-config.json" --container-workdir "${GITHUB_WORKSPACE}" --mount "${RUNNER_TEMP}/gh-aw:${RUNNER_TEMP}/gh-aw:ro" --mount "${RUNNER_TEMP}/gh-aw:/host${RUNNER_TEMP}/gh-aw:ro" ${GH_AW_DOCKER_HOST_PATH_PREFIX_ARGS} --env-all --exclude-env COPILOT_GITHUB_TOKEN --exclude-env GITHUB_MCP_SERVER_TOKEN --exclude-env MCP_GATEWAY_API_KEY --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --audit-dir /tmp/gh-aw/sandbox/firewall/audit --enable-host-access --allow-host-ports 80,443,8080 --skip-pull \ + -- /bin/bash -c 'export PATH="${RUNNER_TEMP}/gh-aw/mcp-cli/bin:$PATH" && export PATH="$(find /opt/hostedtoolcache /home/runner/work/_tool -maxdepth 5 -type d -name bin 2>/dev/null | tr '\''\n'\'' '\'':'\'')$PATH"; [ -n "$GOROOT" ] && export PATH="$GOROOT/bin:$PATH" || true && GH_AW_NODE_EXEC="${GH_AW_NODE_BIN:-}"; if [ -z "$GH_AW_NODE_EXEC" ] || [ ! -x "$GH_AW_NODE_EXEC" ]; then GH_AW_NODE_EXEC="$(command -v node 2>/dev/null || true)"; fi; if [ -z "$GH_AW_NODE_EXEC" ]; then echo "node runtime missing on this runner — check runtimes.node in workflow YAML" >&2; exit 127; fi; "$GH_AW_NODE_EXEC" ${RUNNER_TEMP}/gh-aw/actions/copilot_harness.cjs /usr/local/bin/copilot --add-dir /tmp/gh-aw/ --log-level all --log-dir /tmp/gh-aw/sandbox/agent/logs/ --disable-builtin-mcps --no-ask-user --allow-all-tools --allow-all-paths --add-dir "${GITHUB_WORKSPACE}" --prompt-file /tmp/gh-aw/aw-prompts/prompt.txt' 2>&1 | tee -a /tmp/gh-aw/agent-stdio.log env: + AWF_REFLECT_ENABLED: 1 COPILOT_AGENT_RUNNER_TYPE: STANDALONE + COPILOT_DUMMY_BYOK: dummy-byok-key-for-offline-mode COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }} - COPILOT_MODEL: ${{ vars.GH_AW_MODEL_AGENT_COPILOT || '' }} + COPILOT_MODEL: ${{ vars.GH_AW_MODEL_AGENT_COPILOT || 'claude-sonnet-4.6' }} GH_AW_MCP_CONFIG: /home/runner/.copilot/mcp-config.json GH_AW_PHASE: agent GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt GH_AW_SAFE_OUTPUTS: ${{ steps.set-runtime-paths.outputs.GH_AW_SAFE_OUTPUTS }} - GH_AW_VERSION: v0.68.3 + GH_AW_VERSION: v0.76.1 GITHUB_API_URL: ${{ github.api_url }} GITHUB_AW: true + GITHUB_COPILOT_INTEGRATION_ID: agentic-workflows GITHUB_HEAD_REF: ${{ github.head_ref }} GITHUB_MCP_SERVER_TOKEN: ${{ secrets.GH_AW_GITHUB_MCP_SERVER_TOKEN || secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} GITHUB_REF_NAME: ${{ github.ref_name }} @@ -663,11 +769,11 @@ jobs: GIT_COMMITTER_EMAIL: github-actions[bot]@users.noreply.github.com GIT_COMMITTER_NAME: github-actions[bot] XDG_CONFIG_HOME: /home/runner - - name: Detect Copilot errors - id: detect-copilot-errors + - name: Detect agent errors if: always() + id: detect-agent-errors continue-on-error: true - run: node "${RUNNER_TEMP}/gh-aw/actions/detect_copilot_errors.cjs" + run: node "${RUNNER_TEMP}/gh-aw/actions/detect_agent_errors.cjs" - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -696,7 +802,7 @@ jobs: bash "${RUNNER_TEMP}/gh-aw/actions/stop_mcp_gateway.sh" "$GATEWAY_PID" - name: Redact secrets in logs if: always() - uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 with: script: | const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); @@ -722,10 +828,10 @@ jobs: - name: Ingest agent output id: collect_output if: always() - uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: GH_AW_SAFE_OUTPUTS: ${{ steps.set-runtime-paths.outputs.GH_AW_SAFE_OUTPUTS }} - GH_AW_ALLOWED_DOMAINS: "*.githubusercontent.com,api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,docs.github.com,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.blog,github.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,ppa.launchpad.net,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com,www.googleapis.com" + GH_AW_ALLOWED_DOMAINS: "*.githubusercontent.com,api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,docs.github.com,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.blog,github.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,patch-diff.githubusercontent.com,ppa.launchpad.net,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com,www.googleapis.com" GITHUB_SERVER_URL: ${{ github.server_url }} GITHUB_API_URL: ${{ github.api_url }} with: @@ -736,7 +842,7 @@ jobs: await main(); - name: Parse agent logs for step summary if: always() - uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: GH_AW_AGENT_OUTPUT: /tmp/gh-aw/sandbox/agent/logs/ with: @@ -748,7 +854,7 @@ jobs: - name: Parse MCP Gateway logs for step summary if: always() id: parse-mcp-gateway - uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 with: script: | const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); @@ -761,9 +867,9 @@ jobs: env: AWF_LOGS_DIR: /tmp/gh-aw/sandbox/firewall/logs run: | - # Fix permissions on firewall logs so they can be uploaded as artifacts + # Fix permissions on firewall logs/audit dirs so they can be uploaded as artifacts # AWF runs with sudo, creating files owned by root - sudo chmod -R a+r /tmp/gh-aw/sandbox/firewall/logs 2>/dev/null || true + sudo chmod -R a+rX /tmp/gh-aw/sandbox/firewall 2>/dev/null || true # Only run awf logs summary if awf command exists (it may not be installed if workflow failed before install step) if command -v awf &> /dev/null; then awf logs summary | tee -a "$GITHUB_STEP_SUMMARY" @@ -773,13 +879,23 @@ jobs: - name: Parse token usage for step summary if: always() continue-on-error: true - uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 with: script: | const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); setupGlobals(core, github, context, exec, io, getOctokit); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Print AWF reflect summary + if: always() + continue-on-error: true + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io, getOctokit); + const { main } = require('${{ runner.temp }}/gh-aw/actions/awf_reflect_summary.cjs'); + await main(); - name: Write agent output placeholder if missing if: always() run: | @@ -801,14 +917,17 @@ jobs: !/tmp/gh-aw/proxy-logs/proxy-tls/ /tmp/gh-aw/agent_usage.json /tmp/gh-aw/agent-stdio.log + /tmp/gh-aw/pre-agent-audit.txt /tmp/gh-aw/agent/ /tmp/gh-aw/github_rate_limits.jsonl /tmp/gh-aw/safeoutputs.jsonl /tmp/gh-aw/agent_output.json /tmp/gh-aw/aw-*.patch /tmp/gh-aw/aw-*.bundle + /tmp/gh-aw/awf-config.json /tmp/gh-aw/sandbox/firewall/logs/ /tmp/gh-aw/sandbox/firewall/audit/ + /tmp/gh-aw/sandbox/firewall/awf-reflect.json if-no-files-found: ignore conclusion: @@ -828,6 +947,7 @@ jobs: concurrency: group: "gh-aw-conclusion-agentic-state-machine" cancel-in-progress: false + queue: max outputs: incomplete_count: ${{ steps.report_incomplete.outputs.incomplete_count }} noop_message: ${{ steps.noop.outputs.noop_message }} @@ -836,11 +956,18 @@ jobs: steps: - name: Setup Scripts id: setup - uses: github/gh-aw-actions/setup@ba90f2186d7ad780ec640f364005fa24e797b360 # v0.68.3 + uses: github/gh-aw-actions/setup@46d564922b082d0db93244972e8005ea6904ee5f # v0.76.1 with: destination: ${{ runner.temp }}/gh-aw/actions job-name: ${{ github.job }} trace-id: ${{ needs.activation.outputs.setup-trace-id }} + parent-span-id: ${{ needs.activation.outputs.setup-parent-span-id || needs.activation.outputs.setup-span-id }} + env: + GH_AW_SETUP_WORKFLOW_NAME: "Agentic State Machine — Diagram Generator" + GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/agentic-state-machine.lock.yml@${{ github.ref }} + GH_AW_INFO_VERSION: "1.0.52" + GH_AW_INFO_AWF_VERSION: "v0.25.55" + GH_AW_INFO_ENGINE_ID: "copilot" - name: Download agent output artifact id: download-agent-output continue-on-error: true @@ -857,11 +984,12 @@ jobs: echo "GH_AW_AGENT_OUTPUT=/tmp/gh-aw/agent_output.json" >> "$GITHUB_OUTPUT" - name: Process no-op messages id: noop - uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }} GH_AW_NOOP_MAX: "1" GH_AW_WORKFLOW_NAME: "Agentic State Machine — Diagram Generator" + GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/agentic-state-machine.md" GH_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} GH_AW_AGENT_CONCLUSION: ${{ needs.agent.result }} GH_AW_NOOP_REPORT_AS_ISSUE: "false" @@ -874,10 +1002,11 @@ jobs: await main(); - name: Log detection run id: detection_runs - uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }} GH_AW_WORKFLOW_NAME: "Agentic State Machine — Diagram Generator" + GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/agentic-state-machine.md" GH_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} GH_AW_DETECTION_CONCLUSION: ${{ needs.detection.outputs.detection_conclusion }} GH_AW_DETECTION_REASON: ${{ needs.detection.outputs.detection_reason }} @@ -890,11 +1019,12 @@ jobs: await main(); - name: Record missing tool id: missing_tool - uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }} GH_AW_MISSING_TOOL_CREATE_ISSUE: "true" GH_AW_WORKFLOW_NAME: "Agentic State Machine — Diagram Generator" + GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/agentic-state-machine.md" with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} script: | @@ -904,11 +1034,12 @@ jobs: await main(); - name: Record incomplete id: report_incomplete - uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }} GH_AW_REPORT_INCOMPLETE_CREATE_ISSUE: "true" GH_AW_WORKFLOW_NAME: "Agentic State Machine — Diagram Generator" + GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/agentic-state-machine.md" with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} script: | @@ -919,27 +1050,35 @@ jobs: - name: Handle agent failure id: handle_agent_failure if: always() - uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }} GH_AW_WORKFLOW_NAME: "Agentic State Machine — Diagram Generator" + GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/agentic-state-machine.md" GH_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} GH_AW_AGENT_CONCLUSION: ${{ needs.agent.result }} GH_AW_WORKFLOW_ID: "agentic-state-machine" + GH_AW_ACTION_FAILURE_ISSUE_EXPIRES_HOURS: "168" GH_AW_ENGINE_ID: "copilot" GH_AW_SECRET_VERIFICATION_RESULT: ${{ needs.activation.outputs.secret_verification_result }} GH_AW_CHECKOUT_PR_SUCCESS: ${{ needs.agent.outputs.checkout_pr_success }} + GH_AW_EFFECTIVE_TOKENS: ${{ needs.agent.outputs.effective_tokens || '' }} + GH_AW_EFFECTIVE_TOKENS_RATE_LIMIT_ERROR: ${{ needs.agent.outputs.effective_tokens_rate_limit_error || 'false' }} GH_AW_INFERENCE_ACCESS_ERROR: ${{ needs.agent.outputs.inference_access_error }} GH_AW_MCP_POLICY_ERROR: ${{ needs.agent.outputs.mcp_policy_error }} GH_AW_AGENTIC_ENGINE_TIMEOUT: ${{ needs.agent.outputs.agentic_engine_timeout }} GH_AW_MODEL_NOT_SUPPORTED_ERROR: ${{ needs.agent.outputs.model_not_supported_error }} + GH_AW_ENGINE_API_HOSTS: "api.enterprise.githubcopilot.com,api.githubcopilot.com,api.business.githubcopilot.com,api.individual.githubcopilot.com" GH_AW_CODE_PUSH_FAILURE_ERRORS: ${{ needs.safe_outputs.outputs.code_push_failure_errors }} GH_AW_CODE_PUSH_FAILURE_COUNT: ${{ needs.safe_outputs.outputs.code_push_failure_count }} GH_AW_LOCKDOWN_CHECK_FAILED: ${{ needs.activation.outputs.lockdown_check_failed }} GH_AW_STALE_LOCK_FILE_FAILED: ${{ needs.activation.outputs.stale_lock_file_failed }} GH_AW_GROUP_REPORTS: "false" GH_AW_FAILURE_REPORT_AS_ISSUE: "true" + GH_AW_MISSING_TOOL_REPORT_AS_FAILURE: "true" + GH_AW_MISSING_DATA_REPORT_AS_FAILURE: "true" GH_AW_TIMEOUT_MINUTES: "15" + GH_AW_MAX_EFFECTIVE_TOKENS: "25000000" with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} script: | @@ -964,11 +1103,18 @@ jobs: steps: - name: Setup Scripts id: setup - uses: github/gh-aw-actions/setup@ba90f2186d7ad780ec640f364005fa24e797b360 # v0.68.3 + uses: github/gh-aw-actions/setup@46d564922b082d0db93244972e8005ea6904ee5f # v0.76.1 with: destination: ${{ runner.temp }}/gh-aw/actions job-name: ${{ github.job }} trace-id: ${{ needs.activation.outputs.setup-trace-id }} + parent-span-id: ${{ needs.activation.outputs.setup-parent-span-id || needs.activation.outputs.setup-span-id }} + env: + GH_AW_SETUP_WORKFLOW_NAME: "Agentic State Machine — Diagram Generator" + GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/agentic-state-machine.lock.yml@${{ github.ref }} + GH_AW_INFO_VERSION: "1.0.52" + GH_AW_INFO_AWF_VERSION: "v0.25.55" + GH_AW_INFO_ENGINE_ID: "copilot" - name: Download agent output artifact id: download-agent-output continue-on-error: true @@ -994,7 +1140,7 @@ jobs: rm -rf /tmp/gh-aw/sandbox/firewall/logs rm -rf /tmp/gh-aw/sandbox/firewall/audit - name: Download container images - run: bash "${RUNNER_TEMP}/gh-aw/actions/download_docker_images.sh" ghcr.io/github/gh-aw-firewall/agent:0.25.20 ghcr.io/github/gh-aw-firewall/api-proxy:0.25.20 ghcr.io/github/gh-aw-firewall/squid:0.25.20 + run: bash "${RUNNER_TEMP}/gh-aw/actions/download_docker_images.sh" ghcr.io/github/gh-aw-firewall/agent:0.25.55 ghcr.io/github/gh-aw-firewall/api-proxy:0.25.55 ghcr.io/github/gh-aw-firewall/squid:0.25.55 - name: Check if detection needed id: detection_guard if: always() @@ -1009,10 +1155,10 @@ jobs: echo "run_detection=false" >> "$GITHUB_OUTPUT" echo "Detection skipped: no agent outputs or patches to analyze" fi - - name: Clear MCP configuration for detection + - name: Clear MCP Config for detection if: always() && steps.detection_guard.outputs.run_detection == 'true' run: | - rm -f /tmp/gh-aw/mcp-config/mcp-servers.json + rm -f "${RUNNER_TEMP}/gh-aw/mcp-config/mcp-servers.json" rm -f /home/runner/.copilot/mcp-config.json rm -f "$GITHUB_WORKSPACE/.gemini/settings.json" - name: Prepare threat detection files @@ -1031,7 +1177,7 @@ jobs: ls -la /tmp/gh-aw/threat-detection/ 2>/dev/null || true - name: Setup threat detection if: always() && steps.detection_guard.outputs.run_detection == 'true' - uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: WORKFLOW_NAME: "Agentic State Machine — Diagram Generator" WORKFLOW_DESCRIPTION: "Reads all agentic workflow .md files in this repo, extracts the\nstate machine they define, renders Mermaid diagrams + tables in\n.github/docs/state-machine.md. Weekly. Opens PR if changed." @@ -1047,33 +1193,52 @@ jobs: run: | mkdir -p /tmp/gh-aw/threat-detection touch /tmp/gh-aw/threat-detection/detection.log + - name: Setup Node.js + uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 + with: + node-version: '24' + package-manager-cache: false - name: Install GitHub Copilot CLI - run: bash "${RUNNER_TEMP}/gh-aw/actions/install_copilot_cli.sh" 1.0.21 + run: bash "${RUNNER_TEMP}/gh-aw/actions/install_copilot_cli.sh" 1.0.52 env: GH_HOST: github.com - name: Install AWF binary - run: bash "${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh" v0.25.20 + run: bash "${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh" v0.25.55 - name: Execute GitHub Copilot CLI if: always() && steps.detection_guard.outputs.run_detection == 'true' + continue-on-error: true id: detection_agentic_execution # Copilot CLI tool arguments (sorted): timeout-minutes: 20 run: | set -o pipefail + printf '%s' "$(date +%s%3N)" > /tmp/gh-aw/agent_cli_start_ms.txt touch /tmp/gh-aw/agent-step-summary.md + GH_AW_NODE_BIN=$(command -v node 2>/dev/null || true) + export GH_AW_NODE_BIN + export COPILOT_API_KEY="$COPILOT_DUMMY_BYOK" (umask 177 && touch /tmp/gh-aw/threat-detection/detection.log) + printf '%s\n' '{"$schema":"https://github.com/github/gh-aw-firewall/releases/download/v0.25.55/awf-config.schema.json","network":{"allowDomains":["api.business.githubcopilot.com","api.enterprise.githubcopilot.com","api.github.com","api.githubcopilot.com","api.individual.githubcopilot.com","github.com","host.docker.internal","telemetry.enterprise.githubcopilot.com"]},"apiProxy":{"enabled":true,"enableTokenSteering":true,"maxRuns":500,"maxEffectiveTokens":25000000},"container":{"imageTag":"0.25.55"}}' > "${RUNNER_TEMP}/gh-aw/awf-config.json" + cp "${RUNNER_TEMP}/gh-aw/awf-config.json" /tmp/gh-aw/awf-config.json + GH_AW_DOCKER_HOST_PATH_PREFIX_ARGS="" + if [[ "${DOCKER_HOST:-}" =~ ^tcp:// ]]; then + GH_AW_DOCKER_HOST_PATH_PREFIX_ARGS="--docker-host-path-prefix /tmp/gh-aw" + fi # shellcheck disable=SC1003 - sudo -E awf --container-workdir "${GITHUB_WORKSPACE}" --mount "${RUNNER_TEMP}/gh-aw:${RUNNER_TEMP}/gh-aw:ro" --mount "${RUNNER_TEMP}/gh-aw:/host${RUNNER_TEMP}/gh-aw:ro" --env-all --exclude-env COPILOT_GITHUB_TOKEN --allow-domains api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,github.com,host.docker.internal,telemetry.enterprise.githubcopilot.com --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --audit-dir /tmp/gh-aw/sandbox/firewall/audit --enable-host-access --image-tag 0.25.20 --skip-pull --enable-api-proxy \ - -- /bin/bash -c 'node ${RUNNER_TEMP}/gh-aw/actions/copilot_driver.cjs /usr/local/bin/copilot --add-dir /tmp/gh-aw/ --log-level all --log-dir /tmp/gh-aw/sandbox/agent/logs/ --disable-builtin-mcps --no-ask-user --allow-all-tools --add-dir "${GITHUB_WORKSPACE}" --prompt "$(cat /tmp/gh-aw/aw-prompts/prompt.txt)"' 2>&1 | tee -a /tmp/gh-aw/threat-detection/detection.log + sudo -E awf --config "${RUNNER_TEMP}/gh-aw/awf-config.json" --container-workdir "${GITHUB_WORKSPACE}" --mount "${RUNNER_TEMP}/gh-aw:${RUNNER_TEMP}/gh-aw:ro" --mount "${RUNNER_TEMP}/gh-aw:/host${RUNNER_TEMP}/gh-aw:ro" ${GH_AW_DOCKER_HOST_PATH_PREFIX_ARGS} --env-all --exclude-env COPILOT_GITHUB_TOKEN --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --audit-dir /tmp/gh-aw/sandbox/firewall/audit --enable-host-access --allow-host-ports 80,443,8080 --skip-pull \ + -- /bin/bash -c 'export PATH="$(find /opt/hostedtoolcache /home/runner/work/_tool -maxdepth 5 -type d -name bin 2>/dev/null | tr '\''\n'\'' '\'':'\'')$PATH"; [ -n "$GOROOT" ] && export PATH="$GOROOT/bin:$PATH" || true && GH_AW_NODE_EXEC="${GH_AW_NODE_BIN:-}"; if [ -z "$GH_AW_NODE_EXEC" ] || [ ! -x "$GH_AW_NODE_EXEC" ]; then GH_AW_NODE_EXEC="$(command -v node 2>/dev/null || true)"; fi; if [ -z "$GH_AW_NODE_EXEC" ]; then echo "node runtime missing on this runner — check runtimes.node in workflow YAML" >&2; exit 127; fi; "$GH_AW_NODE_EXEC" ${RUNNER_TEMP}/gh-aw/actions/copilot_harness.cjs /usr/local/bin/copilot --add-dir /tmp/gh-aw/ --log-level all --log-dir /tmp/gh-aw/sandbox/agent/logs/ --disable-builtin-mcps --no-ask-user --allow-all-tools --add-dir "${GITHUB_WORKSPACE}" --prompt-file /tmp/gh-aw/aw-prompts/prompt.txt' 2>&1 | tee -a /tmp/gh-aw/threat-detection/detection.log env: + AWF_REFLECT_ENABLED: 1 COPILOT_AGENT_RUNNER_TYPE: STANDALONE + COPILOT_DUMMY_BYOK: dummy-byok-key-for-offline-mode COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }} - COPILOT_MODEL: ${{ vars.GH_AW_MODEL_DETECTION_COPILOT || '' }} + COPILOT_MODEL: ${{ vars.GH_AW_MODEL_DETECTION_COPILOT || 'claude-sonnet-4.6' }} GH_AW_PHASE: detection GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt - GH_AW_VERSION: v0.68.3 + GH_AW_VERSION: v0.76.1 GITHUB_API_URL: ${{ github.api_url }} GITHUB_AW: true + GITHUB_COPILOT_INTEGRATION_ID: agentic-workflows GITHUB_HEAD_REF: ${{ github.head_ref }} GITHUB_REF_NAME: ${{ github.ref_name }} GITHUB_SERVER_URL: ${{ github.server_url }} @@ -1094,16 +1259,35 @@ jobs: - name: Parse and conclude threat detection id: detection_conclusion if: always() - uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 + continue-on-error: true + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: RUN_DETECTION: ${{ steps.detection_guard.outputs.run_detection }} + DETECTION_AGENTIC_EXECUTION_OUTCOME: ${{ steps.detection_agentic_execution.outcome }} GH_AW_DETECTION_CONTINUE_ON_ERROR: "true" with: script: | - const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); - setupGlobals(core, github, context, exec, io, getOctokit); - const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_threat_detection_results.cjs'); - await main(); + try { + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io, getOctokit); + const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_threat_detection_results.cjs'); + await main(); + } catch (loadErr) { + const continueOnError = process.env.GH_AW_DETECTION_CONTINUE_ON_ERROR !== 'false'; + const detectionExecutionFailed = process.env.DETECTION_AGENTIC_EXECUTION_OUTCOME === 'failure'; + const msg = 'ERR_SYSTEM: \u274C Unexpected error loading threat detection module: ' + (loadErr && loadErr.message ? loadErr.message : String(loadErr)); + core.error(msg); + core.setOutput('reason', 'parse_error'); + if (continueOnError && !detectionExecutionFailed) { + core.warning('\u26A0\uFE0F ' + msg); + core.setOutput('conclusion', 'warning'); + core.setOutput('success', 'false'); + } else { + core.setOutput('conclusion', 'failure'); + core.setOutput('success', 'false'); + core.setFailed(msg); + } + } safe_outputs: needs: @@ -1124,8 +1308,10 @@ jobs: GH_AW_EFFECTIVE_TOKENS: ${{ needs.agent.outputs.effective_tokens }} GH_AW_ENGINE_ID: "copilot" GH_AW_ENGINE_MODEL: ${{ needs.agent.outputs.model }} + GH_AW_ENGINE_VERSION: "1.0.52" GH_AW_WORKFLOW_ID: "agentic-state-machine" GH_AW_WORKFLOW_NAME: "Agentic State Machine — Diagram Generator" + GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/agentic-state-machine.md" outputs: code_push_failure_count: ${{ steps.process_safe_outputs.outputs.code_push_failure_count }} code_push_failure_errors: ${{ steps.process_safe_outputs.outputs.code_push_failure_errors }} @@ -1138,11 +1324,18 @@ jobs: steps: - name: Setup Scripts id: setup - uses: github/gh-aw-actions/setup@ba90f2186d7ad780ec640f364005fa24e797b360 # v0.68.3 + uses: github/gh-aw-actions/setup@46d564922b082d0db93244972e8005ea6904ee5f # v0.76.1 with: destination: ${{ runner.temp }}/gh-aw/actions job-name: ${{ github.job }} trace-id: ${{ needs.activation.outputs.setup-trace-id }} + parent-span-id: ${{ needs.activation.outputs.setup-parent-span-id || needs.activation.outputs.setup-span-id }} + env: + GH_AW_SETUP_WORKFLOW_NAME: "Agentic State Machine — Diagram Generator" + GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/agentic-state-machine.lock.yml@${{ github.ref }} + GH_AW_INFO_VERSION: "1.0.52" + GH_AW_INFO_AWF_VERSION: "v0.25.55" + GH_AW_INFO_ENGINE_ID: "copilot" - name: Download agent output artifact id: download-agent-output continue-on-error: true @@ -1163,11 +1356,42 @@ jobs: with: name: agent path: /tmp/gh-aw/ + - name: Extract base branch from agent output + id: extract-base-branch + if: steps.download-agent-output.outcome == 'success' + shell: bash + run: | + if [ -f "/tmp/gh-aw/agent_output.json" ]; then + GH_AW_NODE=$(which node 2>/dev/null || command -v node 2>/dev/null || echo node) + BASE_BRANCH=$("$GH_AW_NODE" -e " + try { + const data = JSON.parse(require('fs').readFileSync('/tmp/gh-aw/agent_output.json', 'utf8')); + const item = (data.items || []).find(i => + (i.type === 'create_pull_request' || i.type === 'push_to_pull_request_branch') && + i.base_branch + ); + if (item) process.stdout.write(item.base_branch); + } catch(e) {} + " 2>/dev/null || true) + # Validate: only allow safe git branch name characters + if [[ "$BASE_BRANCH" =~ ^[a-zA-Z0-9/_.-]+$ ]] && [ ${#BASE_BRANCH} -le 255 ]; then + printf 'base-branch=%s\n' "$BASE_BRANCH" >> "$GITHUB_OUTPUT" + echo "Extracted base branch from safe output: $BASE_BRANCH" + fi + fi + - name: Checkout repository (trusted default branch for comment events) + if: (!cancelled()) && needs.agent.result != 'skipped' && contains(needs.agent.outputs.output_types, 'create_pull_request') && (github.event_name == 'issue_comment' || github.event_name == 'pull_request_review_comment') + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + ref: ${{ github.event.repository.default_branch }} + token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} + persist-credentials: false + fetch-depth: 1 - name: Checkout repository - if: (!cancelled()) && needs.agent.result != 'skipped' && contains(needs.agent.outputs.output_types, 'create_pull_request') + if: (!cancelled()) && needs.agent.result != 'skipped' && contains(needs.agent.outputs.output_types, 'create_pull_request') && github.event_name != 'issue_comment' && github.event_name != 'pull_request_review_comment' uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: - ref: ${{ github.base_ref || github.event.pull_request.base.ref || github.ref_name || github.event.repository.default_branch }} + ref: ${{ steps.extract-base-branch.outputs.base-branch || github.base_ref || github.event.pull_request.base.ref || github.ref_name || github.event.repository.default_branch }} token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} persist-credentials: false fetch-depth: 1 @@ -1196,13 +1420,14 @@ jobs: echo "GH_HOST=${GH_HOST}" >> "$GITHUB_ENV" - name: Process Safe Outputs id: process_safe_outputs - uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }} - GH_AW_ALLOWED_DOMAINS: "*.githubusercontent.com,api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,docs.github.com,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.blog,github.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,ppa.launchpad.net,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com,www.googleapis.com" + GH_AW_COMMENT_ID: ${{ needs.activation.outputs.comment_id }} + GH_AW_ALLOWED_DOMAINS: "*.githubusercontent.com,api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,docs.github.com,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.blog,github.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,patch-diff.githubusercontent.com,ppa.launchpad.net,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com,www.googleapis.com" GITHUB_SERVER_URL: ${{ github.server_url }} GITHUB_API_URL: ${{ github.api_url }} - GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"create_pull_request\":{\"allowed_files\":[\".github/docs/**\"],\"draft\":false,\"labels\":[\"automation\",\"NO_RELEASE_NOTES\"],\"max\":1,\"max_patch_size\":1024,\"protected_files\":[\"package.json\",\"bun.lockb\",\"bunfig.toml\",\"deno.json\",\"deno.jsonc\",\"deno.lock\",\"global.json\",\"NuGet.Config\",\"Directory.Packages.props\",\"mix.exs\",\"mix.lock\",\"go.mod\",\"go.sum\",\"stack.yaml\",\"stack.yaml.lock\",\"pom.xml\",\"build.gradle\",\"build.gradle.kts\",\"settings.gradle\",\"settings.gradle.kts\",\"gradle.properties\",\"package-lock.json\",\"yarn.lock\",\"pnpm-lock.yaml\",\"npm-shrinkwrap.json\",\"requirements.txt\",\"Pipfile\",\"Pipfile.lock\",\"pyproject.toml\",\"setup.py\",\"setup.cfg\",\"Gemfile\",\"Gemfile.lock\",\"uv.lock\",\"CODEOWNERS\",\"AGENTS.md\"],\"protected_path_prefixes\":[\".github/\",\".agents/\"],\"title_prefix\":\"[Agentic State Machine] \"},\"create_report_incomplete_issue\":{},\"missing_data\":{},\"missing_tool\":{},\"noop\":{\"max\":1,\"report-as-issue\":\"false\"},\"report_incomplete\":{}}" + GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"create_pull_request\":{\"allowed_files\":[\".github/docs/**\"],\"draft\":false,\"labels\":[\"automation\",\"NO_RELEASE_NOTES\"],\"max\":1,\"max_patch_files\":100,\"max_patch_size\":1024,\"protect_top_level_dot_folders\":true,\"protected_files\":[\"package.json\",\"bun.lockb\",\"bunfig.toml\",\"deno.json\",\"deno.jsonc\",\"deno.lock\",\"global.json\",\"NuGet.Config\",\"Directory.Packages.props\",\"mix.exs\",\"mix.lock\",\"go.mod\",\"go.sum\",\"stack.yaml\",\"stack.yaml.lock\",\"pom.xml\",\"build.gradle\",\"build.gradle.kts\",\"settings.gradle\",\"settings.gradle.kts\",\"gradle.properties\",\"package-lock.json\",\"yarn.lock\",\"pnpm-lock.yaml\",\"npm-shrinkwrap.json\",\"requirements.txt\",\"Pipfile\",\"Pipfile.lock\",\"pyproject.toml\",\"setup.py\",\"setup.cfg\",\"Gemfile\",\"Gemfile.lock\",\"uv.lock\",\"CODEOWNERS\",\"DESIGN.md\",\"README.md\",\"CONTRIBUTING.md\",\"CHANGELOG.md\",\"SECURITY.md\",\"CODE_OF_CONDUCT.md\",\"AGENTS.md\",\"CLAUDE.md\",\"GEMINI.md\"],\"protected_files_policy\":\"request_review\",\"title_prefix\":\"[Agentic State Machine] \"},\"create_report_incomplete_issue\":{},\"missing_data\":{},\"missing_tool\":{},\"noop\":{\"max\":1,\"report-as-issue\":\"false\"},\"report_incomplete\":{}}" GH_AW_CI_TRIGGER_TOKEN: ${{ secrets.GH_AW_CI_TRIGGER_TOKEN }} with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/aw-auto-update.lock.yml b/.github/workflows/aw-auto-update.lock.yml index 749e049633f..86f1d628a1c 100644 --- a/.github/workflows/aw-auto-update.lock.yml +++ b/.github/workflows/aw-auto-update.lock.yml @@ -1,5 +1,5 @@ -# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"c44a2f68ba9ebc265231a8a921ca9879b1d2d5a4ff2f39778a6b2a2999a00052","compiler_version":"v0.72.1","strict":true,"agent_id":"copilot"} -# gh-aw-manifest: {"version":1,"secrets":["COPILOT_GITHUB_TOKEN","GH_AW_CI_TRIGGER_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/checkout","sha":"de0fac2e4500dabe0009e67214ff5f5447ce83dd","version":"v6.0.2"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/setup-node","sha":"48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e","version":"v6.4.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"},{"repo":"github/gh-aw-actions/setup","sha":"bc56a0cad2f450c562810785ef38649c04db812a","version":"v0.72.1"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.25.41"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.41"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.25.41"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.3.6","digest":"sha256:2bb8eef86006a4c5963c55616a9c51c32f27bfdecb023b8aa6f91f6718d9171c","pinned_image":"ghcr.io/github/gh-aw-mcpg:v0.3.6@sha256:2bb8eef86006a4c5963c55616a9c51c32f27bfdecb023b8aa6f91f6718d9171c"},{"image":"ghcr.io/github/github-mcp-server:v1.0.3","digest":"sha256:2ac27ef03461ef2b877031b838a7d1fd7f12b12d4ace7796d8cad91446d55959","pinned_image":"ghcr.io/github/github-mcp-server:v1.0.3@sha256:2ac27ef03461ef2b877031b838a7d1fd7f12b12d4ace7796d8cad91446d55959"},{"image":"node:lts-alpine","digest":"sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f","pinned_image":"node:lts-alpine@sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f"}]} +# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"c44a2f68ba9ebc265231a8a921ca9879b1d2d5a4ff2f39778a6b2a2999a00052","compiler_version":"v0.76.1","strict":true,"agent_id":"copilot"} +# gh-aw-manifest: {"version":1,"secrets":["COPILOT_GITHUB_TOKEN","GH_AW_CI_TRIGGER_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/checkout","sha":"de0fac2e4500dabe0009e67214ff5f5447ce83dd","version":"v6.0.2"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/setup-node","sha":"48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e","version":"v6.4.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"},{"repo":"github/gh-aw-actions/setup","sha":"46d564922b082d0db93244972e8005ea6904ee5f","version":"v0.76.1"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.25.55"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.55"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.25.55"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.3.19"},{"image":"ghcr.io/github/github-mcp-server:v1.0.4","digest":"sha256:e3816a476a977cfb836e7d221510011436c654d11861db66ecfd826601aba6a4","pinned_image":"ghcr.io/github/github-mcp-server:v1.0.4@sha256:e3816a476a977cfb836e7d221510011436c654d11861db66ecfd826601aba6a4"},{"image":"node:lts-alpine","digest":"sha256:2bdb65ed1dab192432bc31c95f94155ca5ad7fc1392fb7eb7526ab682fa5bf14","pinned_image":"node:lts-alpine@sha256:2bdb65ed1dab192432bc31c95f94155ca5ad7fc1392fb7eb7526ab682fa5bf14"}]} # ___ _ _ # / _ \ | | (_) # | |_| | __ _ ___ _ __ | |_ _ ___ @@ -14,7 +14,7 @@ # \ /\ / (_) | | | | ( | | | | (_) \ V V /\__ \ # \/ \/ \___/|_| |_|\_\|_| |_|\___/ \_/\_/ |___/ # -# This file was automatically generated by gh-aw (v0.72.1). DO NOT EDIT. +# This file was automatically generated by gh-aw (v0.76.1). DO NOT EDIT. # # To update this file, edit the corresponding .md file and run: # gh aw compile @@ -38,18 +38,18 @@ # - actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 # - actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 # - actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 -# - github/gh-aw-actions/setup@bc56a0cad2f450c562810785ef38649c04db812a # v0.72.1 +# - github/gh-aw-actions/setup@46d564922b082d0db93244972e8005ea6904ee5f # v0.76.1 # # Container images used: -# - ghcr.io/github/gh-aw-firewall/agent:0.25.41 -# - ghcr.io/github/gh-aw-firewall/api-proxy:0.25.41 -# - ghcr.io/github/gh-aw-firewall/squid:0.25.41 -# - ghcr.io/github/gh-aw-mcpg:v0.3.6@sha256:2bb8eef86006a4c5963c55616a9c51c32f27bfdecb023b8aa6f91f6718d9171c -# - ghcr.io/github/github-mcp-server:v1.0.3@sha256:2ac27ef03461ef2b877031b838a7d1fd7f12b12d4ace7796d8cad91446d55959 -# - node:lts-alpine@sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f +# - ghcr.io/github/gh-aw-firewall/agent:0.25.55 +# - ghcr.io/github/gh-aw-firewall/api-proxy:0.25.55 +# - ghcr.io/github/gh-aw-firewall/squid:0.25.55 +# - ghcr.io/github/gh-aw-mcpg:v0.3.19 +# - ghcr.io/github/github-mcp-server:v1.0.4@sha256:e3816a476a977cfb836e7d221510011436c654d11861db66ecfd826601aba6a4 +# - node:lts-alpine@sha256:2bdb65ed1dab192432bc31c95f94155ca5ad7fc1392fb7eb7526ab682fa5bf14 name: "Agentic Workflow Auto-Update" -"on": +on: schedule: - cron: "52 */24 * * *" # Friendly format: every 24h (scattered) @@ -57,7 +57,7 @@ name: "Agentic Workflow Auto-Update" inputs: aw_context: default: "" - description: Agent caller context (used internally by Agentic Workflows). + description: "Agent caller context (used internally by Agentic Workflows)." required: false type: string @@ -81,35 +81,39 @@ jobs: lockdown_check_failed: ${{ steps.generate_aw_info.outputs.lockdown_check_failed == 'true' }} model: ${{ steps.generate_aw_info.outputs.model }} secret_verification_result: ${{ steps.validate-secret.outputs.verification_result }} + setup-parent-span-id: ${{ steps.setup.outputs.parent-span-id || steps.setup.outputs.span-id }} + setup-span-id: ${{ steps.setup.outputs.span-id }} setup-trace-id: ${{ steps.setup.outputs.trace-id }} stale_lock_file_failed: ${{ steps.check-lock-file.outputs.stale_lock_file_failed == 'true' }} steps: - name: Setup Scripts id: setup - uses: github/gh-aw-actions/setup@bc56a0cad2f450c562810785ef38649c04db812a # v0.72.1 + uses: github/gh-aw-actions/setup@46d564922b082d0db93244972e8005ea6904ee5f # v0.76.1 with: destination: ${{ runner.temp }}/gh-aw/actions job-name: ${{ github.job }} env: GH_AW_SETUP_WORKFLOW_NAME: "Agentic Workflow Auto-Update" GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/aw-auto-update.lock.yml@${{ github.ref }} - GH_AW_INFO_VERSION: "1.0.40" + GH_AW_INFO_VERSION: "1.0.52" + GH_AW_INFO_AWF_VERSION: "v0.25.55" + GH_AW_INFO_ENGINE_ID: "copilot" - name: Generate agentic run info id: generate_aw_info env: GH_AW_INFO_ENGINE_ID: "copilot" GH_AW_INFO_ENGINE_NAME: "GitHub Copilot CLI" GH_AW_INFO_MODEL: ${{ vars.GH_AW_MODEL_AGENT_COPILOT || 'claude-sonnet-4.6' }} - GH_AW_INFO_VERSION: "1.0.40" - GH_AW_INFO_AGENT_VERSION: "1.0.40" - GH_AW_INFO_CLI_VERSION: "v0.72.1" + GH_AW_INFO_VERSION: "1.0.52" + GH_AW_INFO_AGENT_VERSION: "1.0.52" + GH_AW_INFO_CLI_VERSION: "v0.76.1" GH_AW_INFO_WORKFLOW_NAME: "Agentic Workflow Auto-Update" GH_AW_INFO_EXPERIMENTAL: "false" GH_AW_INFO_SUPPORTS_TOOLS_ALLOWLIST: "true" GH_AW_INFO_STAGED: "false" GH_AW_INFO_ALLOWED_DOMAINS: '["defaults","go","github"]' GH_AW_INFO_FIREWALL_ENABLED: "true" - GH_AW_INFO_AWF_VERSION: "v0.25.41" + GH_AW_INFO_AWF_VERSION: "v0.25.55" GH_AW_INFO_AWMG_VERSION: "" GH_AW_INFO_FIREWALL_TYPE: "squid" GH_AW_COMPILED_STRICT: "true" @@ -132,6 +136,7 @@ jobs: sparse-checkout: | .github .agents + .antigravity .claude .codex .crush @@ -142,8 +147,8 @@ jobs: fetch-depth: 1 - name: Save agent config folders for base branch restoration env: - GH_AW_AGENT_FOLDERS: ".agents .claude .codex .crush .gemini .github .opencode .pi" - GH_AW_AGENT_FILES: ".crush.json AGENTS.md CLAUDE.md GEMINI.md PI.md opencode.jsonc" + GH_AW_AGENT_FOLDERS: ".agents .antigravity .claude .codex .crush .gemini .github .opencode .pi" + GH_AW_AGENT_FILES: ".crush.json AGENTS.md ANTIGRAVITY.md CLAUDE.md GEMINI.md PI.md opencode.jsonc" # poutine:ignore untrusted_checkout_exec run: bash "${RUNNER_TEMP}/gh-aw/actions/save_base_github_folders.sh" - name: Check workflow lock file @@ -161,7 +166,7 @@ jobs: - name: Check compile-agentic version uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: - GH_AW_COMPILED_VERSION: "v0.72.1" + GH_AW_COMPILED_VERSION: "v0.76.1" with: script: | const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); @@ -172,11 +177,11 @@ jobs: env: GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt GH_AW_SAFE_OUTPUTS: ${{ runner.temp }}/gh-aw/safeoutputs/outputs.jsonl + GH_AW_EXPR_1A3A194A: ${{ github.event.discussion.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'discussion' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }} + GH_AW_EXPR_463A214A: ${{ github.event.pull_request.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'pull_request' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }} + GH_AW_EXPR_802A9F6A: ${{ github.event.issue.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'issue' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }} + GH_AW_EXPR_FF1D34CE: ${{ github.event.comment.id || fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').comment_id }} GH_AW_GITHUB_ACTOR: ${{ github.actor }} - GH_AW_GITHUB_EVENT_COMMENT_ID: ${{ github.event.comment.id }} - GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER: ${{ github.event.discussion.number }} - GH_AW_GITHUB_EVENT_ISSUE_NUMBER: ${{ github.event.issue.number }} - GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }} GH_AW_GITHUB_REPOSITORY: ${{ github.repository }} GH_AW_GITHUB_RUN_ID: ${{ github.run_id }} GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }} @@ -204,28 +209,28 @@ jobs: cat << 'GH_AW_PROMPT_96b5579e2ed86490_EOF' The following GitHub context information is available for this workflow: - {{#if __GH_AW_GITHUB_ACTOR__ }} + {{#if github.actor}} - **actor**: __GH_AW_GITHUB_ACTOR__ {{/if}} - {{#if __GH_AW_GITHUB_REPOSITORY__ }} + {{#if github.repository}} - **repository**: __GH_AW_GITHUB_REPOSITORY__ {{/if}} - {{#if __GH_AW_GITHUB_WORKSPACE__ }} + {{#if github.workspace}} - **workspace**: __GH_AW_GITHUB_WORKSPACE__ {{/if}} - {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }} - - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ + {{#if github.event.issue.number || (github.aw.context.item_type == 'issue' && github.aw.context.item_number)}} + - **issue-number**: #__GH_AW_EXPR_802A9F6A__ {{/if}} - {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }} - - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ + {{#if github.event.discussion.number || (github.aw.context.item_type == 'discussion' && github.aw.context.item_number)}} + - **discussion-number**: #__GH_AW_EXPR_1A3A194A__ {{/if}} - {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }} - - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ + {{#if github.event.pull_request.number || (github.aw.context.item_type == 'pull_request' && github.aw.context.item_number)}} + - **pull-request-number**: #__GH_AW_EXPR_463A214A__ {{/if}} - {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }} - - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__ + {{#if github.event.comment.id || github.aw.context.comment_id}} + - **comment-id**: __GH_AW_EXPR_FF1D34CE__ {{/if}} - {{#if __GH_AW_GITHUB_RUN_ID__ }} + {{#if github.run_id}} - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__ {{/if}} - **checkouts**: The following repositories have been checked out and are available in the workspace: @@ -255,11 +260,11 @@ jobs: uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt + GH_AW_EXPR_1A3A194A: ${{ github.event.discussion.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'discussion' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }} + GH_AW_EXPR_463A214A: ${{ github.event.pull_request.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'pull_request' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }} + GH_AW_EXPR_802A9F6A: ${{ github.event.issue.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'issue' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }} + GH_AW_EXPR_FF1D34CE: ${{ github.event.comment.id || fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').comment_id }} GH_AW_GITHUB_ACTOR: ${{ github.actor }} - GH_AW_GITHUB_EVENT_COMMENT_ID: ${{ github.event.comment.id }} - GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER: ${{ github.event.discussion.number }} - GH_AW_GITHUB_EVENT_ISSUE_NUMBER: ${{ github.event.issue.number }} - GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }} GH_AW_GITHUB_REPOSITORY: ${{ github.repository }} GH_AW_GITHUB_RUN_ID: ${{ github.run_id }} GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }} @@ -275,11 +280,11 @@ jobs: return await substitutePlaceholders({ file: process.env.GH_AW_PROMPT, substitutions: { + GH_AW_EXPR_1A3A194A: process.env.GH_AW_EXPR_1A3A194A, + GH_AW_EXPR_463A214A: process.env.GH_AW_EXPR_463A214A, + GH_AW_EXPR_802A9F6A: process.env.GH_AW_EXPR_802A9F6A, + GH_AW_EXPR_FF1D34CE: process.env.GH_AW_EXPR_FF1D34CE, GH_AW_GITHUB_ACTOR: process.env.GH_AW_GITHUB_ACTOR, - GH_AW_GITHUB_EVENT_COMMENT_ID: process.env.GH_AW_GITHUB_EVENT_COMMENT_ID, - GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER: process.env.GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER, - GH_AW_GITHUB_EVENT_ISSUE_NUMBER: process.env.GH_AW_GITHUB_EVENT_ISSUE_NUMBER, - GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER: process.env.GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER, GH_AW_GITHUB_REPOSITORY: process.env.GH_AW_GITHUB_REPOSITORY, GH_AW_GITHUB_RUN_ID: process.env.GH_AW_GITHUB_RUN_ID, GH_AW_GITHUB_WORKSPACE: process.env.GH_AW_GITHUB_WORKSPACE, @@ -310,6 +315,7 @@ jobs: /tmp/gh-aw/github_rate_limits.jsonl /tmp/gh-aw/base /tmp/gh-aw/.github/agents + /tmp/gh-aw/.github/skills if-no-files-found: ignore retention-days: 1 @@ -327,29 +333,35 @@ jobs: GH_AW_MCP_LOG_DIR: /tmp/gh-aw/mcp-logs/safeoutputs GH_AW_WORKFLOW_ID_SANITIZED: awautoupdate outputs: - agentic_engine_timeout: ${{ steps.detect-copilot-errors.outputs.agentic_engine_timeout || 'false' }} + agentic_engine_timeout: ${{ steps.detect-agent-errors.outputs.agentic_engine_timeout || 'false' }} checkout_pr_success: ${{ steps.checkout-pr.outputs.checkout_pr_success || 'true' }} effective_tokens: ${{ steps.parse-mcp-gateway.outputs.effective_tokens }} + effective_tokens_rate_limit_error: ${{ steps.parse-mcp-gateway.outputs.effective_tokens_rate_limit_error || 'false' }} has_patch: ${{ steps.collect_output.outputs.has_patch }} - inference_access_error: ${{ steps.detect-copilot-errors.outputs.inference_access_error || 'false' }} - mcp_policy_error: ${{ steps.detect-copilot-errors.outputs.mcp_policy_error || 'false' }} + inference_access_error: ${{ steps.detect-agent-errors.outputs.inference_access_error || 'false' }} + mcp_policy_error: ${{ steps.detect-agent-errors.outputs.mcp_policy_error || 'false' }} model: ${{ needs.activation.outputs.model }} - model_not_supported_error: ${{ steps.detect-copilot-errors.outputs.model_not_supported_error || 'false' }} + model_not_supported_error: ${{ steps.detect-agent-errors.outputs.model_not_supported_error || 'false' }} output: ${{ steps.collect_output.outputs.output }} output_types: ${{ steps.collect_output.outputs.output_types }} + setup-parent-span-id: ${{ steps.setup.outputs.parent-span-id || steps.setup.outputs.span-id }} + setup-span-id: ${{ steps.setup.outputs.span-id }} setup-trace-id: ${{ steps.setup.outputs.trace-id }} steps: - name: Setup Scripts id: setup - uses: github/gh-aw-actions/setup@bc56a0cad2f450c562810785ef38649c04db812a # v0.72.1 + uses: github/gh-aw-actions/setup@46d564922b082d0db93244972e8005ea6904ee5f # v0.76.1 with: destination: ${{ runner.temp }}/gh-aw/actions job-name: ${{ github.job }} trace-id: ${{ needs.activation.outputs.setup-trace-id }} + parent-span-id: ${{ needs.activation.outputs.setup-parent-span-id || needs.activation.outputs.setup-span-id }} env: GH_AW_SETUP_WORKFLOW_NAME: "Agentic Workflow Auto-Update" GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/aw-auto-update.lock.yml@${{ github.ref }} - GH_AW_INFO_VERSION: "1.0.40" + GH_AW_INFO_VERSION: "1.0.52" + GH_AW_INFO_AWF_VERSION: "v0.25.55" + GH_AW_INFO_ENGINE_ID: "copilot" - name: Set runtime paths id: set-runtime-paths run: | @@ -397,11 +409,11 @@ jobs: const { main } = require('${{ runner.temp }}/gh-aw/actions/checkout_pr_branch.cjs'); await main(); - name: Install GitHub Copilot CLI - run: bash "${RUNNER_TEMP}/gh-aw/actions/install_copilot_cli.sh" 1.0.40 + run: bash "${RUNNER_TEMP}/gh-aw/actions/install_copilot_cli.sh" 1.0.52 env: GH_HOST: github.com - name: Install AWF binary - run: bash "${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh" v0.25.41 + run: bash "${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh" v0.25.55 - name: Parse integrity filter lists id: parse-guard-vars env: @@ -417,23 +429,27 @@ jobs: - name: Restore agent config folders from base branch if: steps.checkout-pr.outcome == 'success' env: - GH_AW_AGENT_FOLDERS: ".agents .claude .codex .crush .gemini .github .opencode .pi" - GH_AW_AGENT_FILES: ".crush.json AGENTS.md CLAUDE.md GEMINI.md PI.md opencode.jsonc" + GH_AW_AGENT_FOLDERS: ".agents .antigravity .claude .codex .crush .gemini .github .opencode .pi" + GH_AW_AGENT_FILES: ".crush.json AGENTS.md ANTIGRAVITY.md CLAUDE.md GEMINI.md PI.md opencode.jsonc" run: bash "${RUNNER_TEMP}/gh-aw/actions/restore_base_github_folders.sh" - name: Restore inline sub-agents from activation artifact env: GH_AW_SUB_AGENT_DIR: ".github/agents" GH_AW_SUB_AGENT_EXT: ".agent.md" run: bash "${RUNNER_TEMP}/gh-aw/actions/restore_inline_sub_agents.sh" + - name: Restore inline skills from activation artifact + env: + GH_AW_SKILL_DIR: ".github/skills" + run: bash "${RUNNER_TEMP}/gh-aw/actions/restore_inline_skills.sh" - name: Download container images - run: bash "${RUNNER_TEMP}/gh-aw/actions/download_docker_images.sh" ghcr.io/github/gh-aw-firewall/agent:0.25.41 ghcr.io/github/gh-aw-firewall/api-proxy:0.25.41 ghcr.io/github/gh-aw-firewall/squid:0.25.41 ghcr.io/github/gh-aw-mcpg:v0.3.6@sha256:2bb8eef86006a4c5963c55616a9c51c32f27bfdecb023b8aa6f91f6718d9171c ghcr.io/github/github-mcp-server:v1.0.3@sha256:2ac27ef03461ef2b877031b838a7d1fd7f12b12d4ace7796d8cad91446d55959 node:lts-alpine@sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f + run: bash "${RUNNER_TEMP}/gh-aw/actions/download_docker_images.sh" ghcr.io/github/gh-aw-firewall/agent:0.25.55 ghcr.io/github/gh-aw-firewall/api-proxy:0.25.55 ghcr.io/github/gh-aw-firewall/squid:0.25.55 ghcr.io/github/gh-aw-mcpg:v0.3.19 ghcr.io/github/github-mcp-server:v1.0.4@sha256:e3816a476a977cfb836e7d221510011436c654d11861db66ecfd826601aba6a4 node:lts-alpine@sha256:2bdb65ed1dab192432bc31c95f94155ca5ad7fc1392fb7eb7526ab682fa5bf14 - name: Generate Safe Outputs Config run: | mkdir -p "${RUNNER_TEMP}/gh-aw/safeoutputs" mkdir -p /tmp/gh-aw/safeoutputs mkdir -p /tmp/gh-aw/mcp-logs/safeoutputs cat > "${RUNNER_TEMP}/gh-aw/safeoutputs/config.json" << 'GH_AW_SAFE_OUTPUTS_CONFIG_9d88d7a86ef27a50_EOF' - {"create_pull_request":{"allowed_files":[".github/workflows/*.md",".github/workflows/*.lock.yml",".github/workflows/shared/**",".github/aw/**",".github/agents/**"],"draft":false,"labels":["automation"],"max":1,"max_patch_files":100,"max_patch_size":1024,"protect_top_level_dot_folders":true,"protected_files":["package.json","bun.lockb","bunfig.toml","deno.json","deno.jsonc","deno.lock","global.json","NuGet.Config","Directory.Packages.props","mix.exs","mix.lock","go.mod","go.sum","stack.yaml","stack.yaml.lock","pom.xml","build.gradle","build.gradle.kts","settings.gradle","settings.gradle.kts","gradle.properties","package-lock.json","yarn.lock","pnpm-lock.yaml","npm-shrinkwrap.json","requirements.txt","Pipfile","Pipfile.lock","pyproject.toml","setup.py","setup.cfg","Gemfile","Gemfile.lock","uv.lock","CODEOWNERS","DESIGN.md","README.md","CONTRIBUTING.md","CHANGELOG.md","SECURITY.md","CODE_OF_CONDUCT.md","AGENTS.md","CLAUDE.md","GEMINI.md"],"protected_files_policy":"fallback-to-issue","title_prefix":"[Auto Update] "},"create_report_incomplete_issue":{},"missing_data":{},"missing_tool":{},"noop":{"max":1,"report-as-issue":"false"},"push_to_pull_request_branch":{"allowed_files":[".github/workflows/*.md",".github/workflows/*.lock.yml",".github/workflows/shared/**",".github/aw/**",".github/agents/**"],"if_no_changes":"warn","labels":["automation"],"max":1,"max_patch_size":1024,"protect_top_level_dot_folders":true,"protected_files":["package.json","bun.lockb","bunfig.toml","deno.json","deno.jsonc","deno.lock","global.json","NuGet.Config","Directory.Packages.props","mix.exs","mix.lock","go.mod","go.sum","stack.yaml","stack.yaml.lock","pom.xml","build.gradle","build.gradle.kts","settings.gradle","settings.gradle.kts","gradle.properties","package-lock.json","yarn.lock","pnpm-lock.yaml","npm-shrinkwrap.json","requirements.txt","Pipfile","Pipfile.lock","pyproject.toml","setup.py","setup.cfg","Gemfile","Gemfile.lock","uv.lock","CODEOWNERS","DESIGN.md","README.md","CONTRIBUTING.md","CHANGELOG.md","SECURITY.md","CODE_OF_CONDUCT.md","AGENTS.md","CLAUDE.md","GEMINI.md"],"protected_files_policy":"fallback-to-issue","target":"*","title_prefix":"[Auto Update] "},"report_incomplete":{}} + {"create_pull_request":{"allowed_files":[".github/workflows/*.md",".github/workflows/*.lock.yml",".github/workflows/shared/**",".github/aw/**",".github/agents/**"],"draft":false,"labels":["automation"],"max":1,"max_patch_files":100,"max_patch_size":1024,"protect_top_level_dot_folders":true,"protected_files":["package.json","bun.lockb","bunfig.toml","deno.json","deno.jsonc","deno.lock","global.json","NuGet.Config","Directory.Packages.props","mix.exs","mix.lock","go.mod","go.sum","stack.yaml","stack.yaml.lock","pom.xml","build.gradle","build.gradle.kts","settings.gradle","settings.gradle.kts","gradle.properties","package-lock.json","yarn.lock","pnpm-lock.yaml","npm-shrinkwrap.json","requirements.txt","Pipfile","Pipfile.lock","pyproject.toml","setup.py","setup.cfg","Gemfile","Gemfile.lock","uv.lock","CODEOWNERS","DESIGN.md","README.md","CONTRIBUTING.md","CHANGELOG.md","SECURITY.md","CODE_OF_CONDUCT.md","AGENTS.md","CLAUDE.md","GEMINI.md"],"protected_files_policy":"fallback-to-issue","title_prefix":"[Auto Update] "},"create_report_incomplete_issue":{},"missing_data":{},"missing_tool":{},"noop":{"max":1,"report-as-issue":"false"},"push_to_pull_request_branch":{"allowed_files":[".github/workflows/*.md",".github/workflows/*.lock.yml",".github/workflows/shared/**",".github/aw/**",".github/agents/**"],"if_no_changes":"warn","max":1,"max_patch_size":1024,"protect_top_level_dot_folders":true,"protected_files":["package.json","bun.lockb","bunfig.toml","deno.json","deno.jsonc","deno.lock","global.json","NuGet.Config","Directory.Packages.props","mix.exs","mix.lock","go.mod","go.sum","stack.yaml","stack.yaml.lock","pom.xml","build.gradle","build.gradle.kts","settings.gradle","settings.gradle.kts","gradle.properties","package-lock.json","yarn.lock","pnpm-lock.yaml","npm-shrinkwrap.json","requirements.txt","Pipfile","Pipfile.lock","pyproject.toml","setup.py","setup.cfg","Gemfile","Gemfile.lock","uv.lock","CODEOWNERS","DESIGN.md","README.md","CONTRIBUTING.md","CHANGELOG.md","SECURITY.md","CODE_OF_CONDUCT.md","AGENTS.md","CLAUDE.md","GEMINI.md"],"protected_files_policy":"fallback-to-issue","required_labels":["automation"],"target":"*","title_prefix":"[Auto Update] "},"report_incomplete":{}} GH_AW_SAFE_OUTPUTS_CONFIG_9d88d7a86ef27a50_EOF - name: Generate Safe Outputs Tools env: @@ -656,8 +672,13 @@ jobs: export GH_AW_ENGINE="copilot" MCP_GATEWAY_UID=$(id -u 2>/dev/null || echo '0') MCP_GATEWAY_GID=$(id -g 2>/dev/null || echo '0') - DOCKER_SOCK_GID=$(stat -c '%g' /var/run/docker.sock 2>/dev/null || echo '0') - export MCP_GATEWAY_DOCKER_COMMAND='docker run -i --rm --network host --add-host host.docker.internal:127.0.0.1 --user '"${MCP_GATEWAY_UID}"':'"${MCP_GATEWAY_GID}"' --group-add '"${DOCKER_SOCK_GID}"' -v /var/run/docker.sock:/var/run/docker.sock -e MCP_GATEWAY_PORT -e MCP_GATEWAY_DOMAIN -e MCP_GATEWAY_API_KEY -e MCP_GATEWAY_PAYLOAD_DIR -e MCP_GATEWAY_PAYLOAD_SIZE_THRESHOLD -e DEBUG -e MCP_GATEWAY_LOG_DIR -e GH_AW_MCP_LOG_DIR -e GH_AW_SAFE_OUTPUTS -e GH_AW_SAFE_OUTPUTS_CONFIG_PATH -e GH_AW_SAFE_OUTPUTS_TOOLS_PATH -e GH_AW_ASSETS_BRANCH -e GH_AW_ASSETS_MAX_SIZE_KB -e GH_AW_ASSETS_ALLOWED_EXTS -e DEFAULT_BRANCH -e GITHUB_MCP_SERVER_TOKEN -e GITHUB_MCP_GUARD_MIN_INTEGRITY -e GITHUB_MCP_GUARD_REPOS -e GITHUB_REPOSITORY -e GITHUB_SERVER_URL -e GITHUB_SHA -e GITHUB_WORKSPACE -e GITHUB_TOKEN -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RUN_ATTEMPT -e GITHUB_JOB -e GITHUB_ACTION -e GITHUB_EVENT_NAME -e GITHUB_EVENT_PATH -e GITHUB_ACTOR -e GITHUB_ACTOR_ID -e GITHUB_TRIGGERING_ACTOR -e GITHUB_WORKFLOW -e GITHUB_WORKFLOW_REF -e GITHUB_WORKFLOW_SHA -e GITHUB_REF -e GITHUB_REF_NAME -e GITHUB_REF_TYPE -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GH_AW_SAFE_OUTPUTS_PORT -e GH_AW_SAFE_OUTPUTS_API_KEY -v /tmp/gh-aw/mcp-payloads:/tmp/gh-aw/mcp-payloads:rw -v /opt:/opt:ro -v /tmp:/tmp:rw -v '"${GITHUB_WORKSPACE}"':'"${GITHUB_WORKSPACE}"':rw ghcr.io/github/gh-aw-mcpg:v0.3.6' + case "${DOCKER_HOST:-}" in + unix://* ) DOCKER_SOCK_PATH="${DOCKER_HOST#unix://}" ;; + /* ) DOCKER_SOCK_PATH="$DOCKER_HOST" ;; + * ) DOCKER_SOCK_PATH=/var/run/docker.sock ;; + esac + DOCKER_SOCK_GID=$(stat -c '%g' "$DOCKER_SOCK_PATH" 2>/dev/null || echo '0') + export MCP_GATEWAY_DOCKER_COMMAND='docker run -i --rm --network host --add-host host.docker.internal:127.0.0.1 --user '"${MCP_GATEWAY_UID}"':'"${MCP_GATEWAY_GID}"' --group-add '"${DOCKER_SOCK_GID}"' -v '"${DOCKER_SOCK_PATH}"':/var/run/docker.sock -e MCP_GATEWAY_PORT -e MCP_GATEWAY_DOMAIN -e MCP_GATEWAY_API_KEY -e MCP_GATEWAY_PAYLOAD_DIR -e MCP_GATEWAY_PAYLOAD_SIZE_THRESHOLD -e DOCKER_HOST=unix:///var/run/docker.sock -e DEBUG -e MCP_GATEWAY_LOG_DIR -e GH_AW_MCP_LOG_DIR -e GH_AW_SAFE_OUTPUTS -e GH_AW_SAFE_OUTPUTS_CONFIG_PATH -e GH_AW_SAFE_OUTPUTS_TOOLS_PATH -e GH_AW_ASSETS_BRANCH -e GH_AW_ASSETS_MAX_SIZE_KB -e GH_AW_ASSETS_ALLOWED_EXTS -e DEFAULT_BRANCH -e GITHUB_MCP_SERVER_TOKEN -e GITHUB_MCP_GUARD_MIN_INTEGRITY -e GITHUB_MCP_GUARD_REPOS -e GITHUB_REPOSITORY -e GITHUB_SERVER_URL -e GITHUB_SHA -e GITHUB_WORKSPACE -e GITHUB_TOKEN -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RUN_ATTEMPT -e GITHUB_JOB -e GITHUB_ACTION -e GITHUB_EVENT_NAME -e GITHUB_EVENT_PATH -e GITHUB_ACTOR -e GITHUB_ACTOR_ID -e GITHUB_TRIGGERING_ACTOR -e GITHUB_WORKFLOW -e GITHUB_WORKFLOW_REF -e GITHUB_WORKFLOW_SHA -e GITHUB_REF -e GITHUB_REF_NAME -e GITHUB_REF_TYPE -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GH_AW_SAFE_OUTPUTS_PORT -e GH_AW_SAFE_OUTPUTS_API_KEY -v /tmp/gh-aw/mcp-payloads:/tmp/gh-aw/mcp-payloads:rw -v /opt:/opt:ro -v /tmp:/tmp:rw -v '"${GITHUB_WORKSPACE}"':'"${GITHUB_WORKSPACE}"':rw ghcr.io/github/gh-aw-mcpg:v0.3.19' mkdir -p /home/runner/.copilot GH_AW_NODE=$(which node 2>/dev/null || command -v node 2>/dev/null || echo node) @@ -666,7 +687,7 @@ jobs: "mcpServers": { "github": { "type": "stdio", - "container": "ghcr.io/github/github-mcp-server:v1.0.3", + "container": "ghcr.io/github/github-mcp-server:v1.0.4", "env": { "GITHUB_HOST": "\${GITHUB_SERVER_URL}", "GITHUB_PERSONAL_ACCESS_TOKEN": "\${GITHUB_MCP_SERVER_TOKEN}", @@ -733,25 +754,32 @@ jobs: timeout-minutes: 15 run: | set -o pipefail + printf '%s' "$(date +%s%3N)" > /tmp/gh-aw/agent_cli_start_ms.txt touch /tmp/gh-aw/agent-step-summary.md GH_AW_NODE_BIN=$(command -v node 2>/dev/null || true) export GH_AW_NODE_BIN + export COPILOT_API_KEY="$COPILOT_DUMMY_BYOK" (umask 177 && touch /tmp/gh-aw/agent-stdio.log) - printf '%s\n' '{"$schema":"https://github.com/github/gh-aw-firewall/releases/download/v0.25.41/awf-config.schema.json","network":{"allowDomains":["*.githubusercontent.com","api.business.githubcopilot.com","api.enterprise.githubcopilot.com","api.github.com","api.githubcopilot.com","api.individual.githubcopilot.com","api.snapcraft.io","archive.ubuntu.com","azure.archive.ubuntu.com","codeload.github.com","crl.geotrust.com","crl.globalsign.com","crl.identrust.com","crl.sectigo.com","crl.thawte.com","crl.usertrust.com","crl.verisign.com","crl3.digicert.com","crl4.digicert.com","crls.ssl.com","docs.github.com","github-cloud.githubusercontent.com","github-cloud.s3.amazonaws.com","github.blog","github.com","github.githubassets.com","go.dev","golang.org","goproxy.io","host.docker.internal","json-schema.org","json.schemastore.org","keyserver.ubuntu.com","lfs.github.com","objects.githubusercontent.com","ocsp.digicert.com","ocsp.geotrust.com","ocsp.globalsign.com","ocsp.identrust.com","ocsp.sectigo.com","ocsp.ssl.com","ocsp.thawte.com","ocsp.usertrust.com","ocsp.verisign.com","packagecloud.io","packages.cloud.google.com","packages.microsoft.com","pkg.go.dev","ppa.launchpad.net","proxy.golang.org","raw.githubusercontent.com","registry.npmjs.org","s.symcb.com","s.symcd.com","security.ubuntu.com","storage.googleapis.com","sum.golang.org","telemetry.enterprise.githubcopilot.com","ts-crl.ws.symantec.com","ts-ocsp.ws.symantec.com","www.googleapis.com"]},"apiProxy":{"enabled":true,"models":{"auto":["large"],"deep-research":["copilot/deep-research*","copilot/o3-deep-research*","copilot/o4-mini-deep-research*","google/deep-research*","openai/o3-deep-research*","openai/o4-mini-deep-research*"],"gemini-flash":["copilot/gemini-*flash*","google/gemini-*flash*"],"gemini-pro":["copilot/gemini-*pro*","google/gemini-*pro*"],"gpt-4.1":["copilot/gpt-4.1*","openai/gpt-4.1*"],"gpt-5":["copilot/gpt-5*","openai/gpt-5*"],"gpt-5-codex":["copilot/gpt-5*codex*","openai/gpt-5*codex*"],"gpt-5-mini":["copilot/gpt-5*mini*","openai/gpt-5*mini*"],"gpt-5-nano":["copilot/gpt-5*nano*","openai/gpt-5*nano*"],"gpt-5-pro":["copilot/gpt-5*pro*","openai/gpt-5*pro*"],"haiku":["copilot/*haiku*","anthropic/*haiku*"],"large":["sonnet","gpt-5-pro","gpt-5","gemini-pro"],"mini":["haiku","gpt-5-mini","gpt-5-nano","gemini-flash"],"opus":["copilot/*opus*","anthropic/*opus*"],"reasoning":["copilot/o1*","copilot/o3*","copilot/o4*","openai/o1*","openai/o3*","openai/o4*"],"small":["mini"],"sonnet":["copilot/*sonnet*","anthropic/*sonnet*"]}},"container":{"imageTag":"0.25.41"}}' > "${RUNNER_TEMP}/gh-aw/awf-config.json" && cp "${RUNNER_TEMP}/gh-aw/awf-config.json" /tmp/gh-aw/awf-config.json + printf '%s\n' '{"$schema":"https://github.com/github/gh-aw-firewall/releases/download/v0.25.55/awf-config.schema.json","network":{"allowDomains":["*.githubusercontent.com","api.business.githubcopilot.com","api.enterprise.githubcopilot.com","api.github.com","api.githubcopilot.com","api.individual.githubcopilot.com","api.snapcraft.io","archive.ubuntu.com","azure.archive.ubuntu.com","codeload.github.com","crl.geotrust.com","crl.globalsign.com","crl.identrust.com","crl.sectigo.com","crl.thawte.com","crl.usertrust.com","crl.verisign.com","crl3.digicert.com","crl4.digicert.com","crls.ssl.com","docs.github.com","github-cloud.githubusercontent.com","github-cloud.s3.amazonaws.com","github.blog","github.com","github.githubassets.com","go.dev","golang.org","goproxy.io","host.docker.internal","json-schema.org","json.schemastore.org","keyserver.ubuntu.com","lfs.github.com","objects.githubusercontent.com","ocsp.digicert.com","ocsp.geotrust.com","ocsp.globalsign.com","ocsp.identrust.com","ocsp.sectigo.com","ocsp.ssl.com","ocsp.thawte.com","ocsp.usertrust.com","ocsp.verisign.com","packagecloud.io","packages.cloud.google.com","packages.microsoft.com","patch-diff.githubusercontent.com","pkg.go.dev","ppa.launchpad.net","proxy.golang.org","raw.githubusercontent.com","registry.npmjs.org","s.symcb.com","s.symcd.com","security.ubuntu.com","storage.googleapis.com","sum.golang.org","telemetry.enterprise.githubcopilot.com","ts-crl.ws.symantec.com","ts-ocsp.ws.symantec.com","www.googleapis.com"]},"apiProxy":{"enabled":true,"enableTokenSteering":true,"maxRuns":500,"maxEffectiveTokens":25000000,"models":{"agent":["sonnet-6x","gpt-5.4","gpt-5.3","gemini-pro","any"],"antigravity":["copilot/antigravity*","google/antigravity*","gemini/antigravity*"],"any":["copilot/*","anthropic/*","openai/*","google/*","gemini/*"],"claude":["agent"],"codex":["agent"],"coding":["copilot/gpt-5*codex*","openai/gpt-5*codex*","gpt-5-codex"],"computer-use":["copilot/*computer-use*","google/*computer-use*","gemini/*computer-use*","openai/*computer-use*"],"copilot":["agent"],"deep-research":["copilot/deep-research*","copilot/o3-deep-research*","copilot/o4-mini-deep-research*","google/deep-research*","gemini/deep-research*","openai/o3-deep-research*","openai/o4-mini-deep-research*"],"gemini":["agent"],"gemini-3-flash":["copilot/gemini-3*flash*","google/gemini-3*flash*","gemini/gemini-3*flash*"],"gemini-3-pro":["copilot/gemini-3*pro*","google/gemini-3*pro*","gemini/gemini-3*pro*"],"gemini-3.1-flash":["copilot/gemini-3.1*flash*","google/gemini-3.1*flash*","gemini/gemini-3.1*flash*"],"gemini-3.1-pro":["copilot/gemini-3.1*pro*","google/gemini-3.1*pro*","gemini/gemini-3.1*pro*"],"gemini-3.5-flash":["copilot/gemini-3.5*flash*","google/gemini-3.5*flash*","gemini/gemini-3.5*flash*"],"gemini-flash":["copilot/gemini-*flash*","google/gemini-*flash*","gemini/gemini-*flash*"],"gemini-flash-lite":["copilot/gemini-*flash*lite*","google/gemini-*flash*lite*","gemini/gemini-*flash*lite*"],"gemini-pro":["copilot/gemini-*pro*","google/gemini-*pro*","gemini/gemini-*pro*"],"gemma":["copilot/gemma*","google/gemma*","gemini/gemma*"],"gpt-4.1":["copilot/gpt-4.1*","openai/gpt-4.1*"],"gpt-5":["copilot/gpt-5*","openai/gpt-5*"],"gpt-5-codex":["copilot/gpt-5*codex*","openai/gpt-5*codex*"],"gpt-5-mini":["copilot/gpt-5*mini*","openai/gpt-5*mini*"],"gpt-5-nano":["copilot/gpt-5*nano*","openai/gpt-5*nano*"],"gpt-5-pro":["copilot/gpt-5*pro*","openai/gpt-5*pro*"],"gpt-5.2":["copilot/gpt-5.2*","openai/gpt-5.2*"],"gpt-5.3":["copilot/gpt-5.3*","openai/gpt-5.3*"],"gpt-5.4":["copilot/gpt-5.4*","openai/gpt-5.4*"],"gpt-5.5":["copilot/gpt-5.5*","openai/gpt-5.5*"],"haiku":["copilot/*haiku*","anthropic/*haiku*"],"large":["sonnet","gpt-5-pro","gpt-5","gemini-pro"],"mini":["haiku","gpt-5-mini","gpt-5-nano","gemini-flash-lite"],"opus":["copilot/*opus*","anthropic/*opus*"],"opusplan":["opus?effort=high"],"reasoning":["copilot/o1*","copilot/o3*","copilot/o4*","openai/o1*","openai/o3*","openai/o4*"],"robotics":["copilot/*robotics*","google/*robotics*","gemini/*robotics*"],"small":["mini"],"sonnet":["copilot/*sonnet*","anthropic/*sonnet*"],"sonnet-6x":["copilot/*sonnet-4-5-*","anthropic/*sonnet-4-5-*","copilot/*sonnet-4-6*","anthropic/*sonnet-4-6*"],"summarization":["haiku","gpt-5-mini","gemini-flash-lite","mini"],"vision":["copilot/gemini-*image*","gemini/gemini-*image*","copilot/gemini-*flash*","gemini/gemini-*flash*"]}},"container":{"imageTag":"0.25.55"}}' > "${RUNNER_TEMP}/gh-aw/awf-config.json" + cp "${RUNNER_TEMP}/gh-aw/awf-config.json" /tmp/gh-aw/awf-config.json + GH_AW_DOCKER_HOST_PATH_PREFIX_ARGS="" + if [[ "${DOCKER_HOST:-}" =~ ^tcp:// ]]; then + GH_AW_DOCKER_HOST_PATH_PREFIX_ARGS="--docker-host-path-prefix /tmp/gh-aw" + fi # shellcheck disable=SC1003 - sudo -E awf --config "${RUNNER_TEMP}/gh-aw/awf-config.json" --container-workdir "${GITHUB_WORKSPACE}" --mount "${RUNNER_TEMP}/gh-aw:${RUNNER_TEMP}/gh-aw:ro" --mount "${RUNNER_TEMP}/gh-aw:/host${RUNNER_TEMP}/gh-aw:ro" --env-all --exclude-env COPILOT_GITHUB_TOKEN --exclude-env GITHUB_MCP_SERVER_TOKEN --exclude-env MCP_GATEWAY_API_KEY --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --audit-dir /tmp/gh-aw/sandbox/firewall/audit --enable-host-access --allow-host-ports 80,443,8080 --skip-pull \ - -- /bin/bash -c 'export PATH="${RUNNER_TEMP}/gh-aw/mcp-cli/bin:$PATH" && export PATH="$(find /opt/hostedtoolcache /home/runner/work/_tool -maxdepth 4 -type d -name bin 2>/dev/null | tr '\''\n'\'' '\'':'\'')$PATH"; [ -n "$GOROOT" ] && export PATH="$GOROOT/bin:$PATH" || true && GH_AW_NODE_EXEC="${GH_AW_NODE_BIN:-}"; if [ -z "$GH_AW_NODE_EXEC" ] || [ ! -x "$GH_AW_NODE_EXEC" ]; then GH_AW_NODE_EXEC="$(command -v node 2>/dev/null || echo node)"; fi; "$GH_AW_NODE_EXEC" ${RUNNER_TEMP}/gh-aw/actions/copilot_harness.cjs /usr/local/bin/copilot --add-dir /tmp/gh-aw/ --log-level all --log-dir /tmp/gh-aw/sandbox/agent/logs/ --disable-builtin-mcps --no-ask-user --allow-all-tools --allow-all-paths --add-dir "${GITHUB_WORKSPACE}" --prompt-file /tmp/gh-aw/aw-prompts/prompt.txt' 2>&1 | tee -a /tmp/gh-aw/agent-stdio.log + sudo -E awf --config "${RUNNER_TEMP}/gh-aw/awf-config.json" --container-workdir "${GITHUB_WORKSPACE}" --mount "${RUNNER_TEMP}/gh-aw:${RUNNER_TEMP}/gh-aw:ro" --mount "${RUNNER_TEMP}/gh-aw:/host${RUNNER_TEMP}/gh-aw:ro" ${GH_AW_DOCKER_HOST_PATH_PREFIX_ARGS} --env-all --exclude-env COPILOT_GITHUB_TOKEN --exclude-env GITHUB_MCP_SERVER_TOKEN --exclude-env MCP_GATEWAY_API_KEY --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --audit-dir /tmp/gh-aw/sandbox/firewall/audit --enable-host-access --allow-host-ports 80,443,8080 --skip-pull \ + -- /bin/bash -c 'export PATH="${RUNNER_TEMP}/gh-aw/mcp-cli/bin:$PATH" && export PATH="$(find /opt/hostedtoolcache /home/runner/work/_tool -maxdepth 5 -type d -name bin 2>/dev/null | tr '\''\n'\'' '\'':'\'')$PATH"; [ -n "$GOROOT" ] && export PATH="$GOROOT/bin:$PATH" || true && GH_AW_NODE_EXEC="${GH_AW_NODE_BIN:-}"; if [ -z "$GH_AW_NODE_EXEC" ] || [ ! -x "$GH_AW_NODE_EXEC" ]; then GH_AW_NODE_EXEC="$(command -v node 2>/dev/null || true)"; fi; if [ -z "$GH_AW_NODE_EXEC" ]; then echo "node runtime missing on this runner — check runtimes.node in workflow YAML" >&2; exit 127; fi; "$GH_AW_NODE_EXEC" ${RUNNER_TEMP}/gh-aw/actions/copilot_harness.cjs /usr/local/bin/copilot --add-dir /tmp/gh-aw/ --log-level all --log-dir /tmp/gh-aw/sandbox/agent/logs/ --disable-builtin-mcps --no-ask-user --allow-all-tools --allow-all-paths --add-dir "${GITHUB_WORKSPACE}" --prompt-file /tmp/gh-aw/aw-prompts/prompt.txt' 2>&1 | tee -a /tmp/gh-aw/agent-stdio.log env: AWF_REFLECT_ENABLED: 1 COPILOT_AGENT_RUNNER_TYPE: STANDALONE - COPILOT_API_KEY: dummy-byok-key-for-offline-mode + COPILOT_DUMMY_BYOK: dummy-byok-key-for-offline-mode COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }} COPILOT_MODEL: ${{ vars.GH_AW_MODEL_AGENT_COPILOT || 'claude-sonnet-4.6' }} GH_AW_MCP_CONFIG: /home/runner/.copilot/mcp-config.json GH_AW_PHASE: agent GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt GH_AW_SAFE_OUTPUTS: ${{ steps.set-runtime-paths.outputs.GH_AW_SAFE_OUTPUTS }} - GH_AW_VERSION: v0.72.1 + GH_AW_VERSION: v0.76.1 GITHUB_API_URL: ${{ github.api_url }} GITHUB_AW: true GITHUB_COPILOT_INTEGRATION_ID: agentic-workflows @@ -766,11 +794,11 @@ jobs: GIT_COMMITTER_EMAIL: github-actions[bot]@users.noreply.github.com GIT_COMMITTER_NAME: github-actions[bot] XDG_CONFIG_HOME: /home/runner - - name: Detect Copilot errors - id: detect-copilot-errors + - name: Detect agent errors if: always() + id: detect-agent-errors continue-on-error: true - run: node "${RUNNER_TEMP}/gh-aw/actions/detect_copilot_errors.cjs" + run: node "${RUNNER_TEMP}/gh-aw/actions/detect_agent_errors.cjs" - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -828,7 +856,7 @@ jobs: uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: GH_AW_SAFE_OUTPUTS: ${{ steps.set-runtime-paths.outputs.GH_AW_SAFE_OUTPUTS }} - GH_AW_ALLOWED_DOMAINS: "*.githubusercontent.com,api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,docs.github.com,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.blog,github.com,github.githubassets.com,go.dev,golang.org,goproxy.io,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,pkg.go.dev,ppa.launchpad.net,proxy.golang.org,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,storage.googleapis.com,sum.golang.org,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com,www.googleapis.com" + GH_AW_ALLOWED_DOMAINS: "*.githubusercontent.com,api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,docs.github.com,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.blog,github.com,github.githubassets.com,go.dev,golang.org,goproxy.io,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,patch-diff.githubusercontent.com,pkg.go.dev,ppa.launchpad.net,proxy.golang.org,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,storage.googleapis.com,sum.golang.org,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com,www.googleapis.com" GITHUB_SERVER_URL: ${{ github.server_url }} GITHUB_API_URL: ${{ github.api_url }} with: @@ -944,6 +972,7 @@ jobs: concurrency: group: "gh-aw-conclusion-aw-auto-update" cancel-in-progress: false + queue: max outputs: incomplete_count: ${{ steps.report_incomplete.outputs.incomplete_count }} noop_message: ${{ steps.noop.outputs.noop_message }} @@ -952,15 +981,18 @@ jobs: steps: - name: Setup Scripts id: setup - uses: github/gh-aw-actions/setup@bc56a0cad2f450c562810785ef38649c04db812a # v0.72.1 + uses: github/gh-aw-actions/setup@46d564922b082d0db93244972e8005ea6904ee5f # v0.76.1 with: destination: ${{ runner.temp }}/gh-aw/actions job-name: ${{ github.job }} trace-id: ${{ needs.activation.outputs.setup-trace-id }} + parent-span-id: ${{ needs.activation.outputs.setup-parent-span-id || needs.activation.outputs.setup-span-id }} env: GH_AW_SETUP_WORKFLOW_NAME: "Agentic Workflow Auto-Update" GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/aw-auto-update.lock.yml@${{ github.ref }} - GH_AW_INFO_VERSION: "1.0.40" + GH_AW_INFO_VERSION: "1.0.52" + GH_AW_INFO_AWF_VERSION: "v0.25.55" + GH_AW_INFO_ENGINE_ID: "copilot" - name: Download agent output artifact id: download-agent-output continue-on-error: true @@ -982,6 +1014,7 @@ jobs: GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }} GH_AW_NOOP_MAX: "1" GH_AW_WORKFLOW_NAME: "Agentic Workflow Auto-Update" + GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/aw-auto-update.md" GH_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} GH_AW_AGENT_CONCLUSION: ${{ needs.agent.result }} GH_AW_NOOP_REPORT_AS_ISSUE: "false" @@ -998,6 +1031,7 @@ jobs: env: GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }} GH_AW_WORKFLOW_NAME: "Agentic Workflow Auto-Update" + GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/aw-auto-update.md" GH_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} GH_AW_DETECTION_CONCLUSION: ${{ needs.detection.outputs.detection_conclusion }} GH_AW_DETECTION_REASON: ${{ needs.detection.outputs.detection_reason }} @@ -1015,6 +1049,7 @@ jobs: GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }} GH_AW_MISSING_TOOL_CREATE_ISSUE: "true" GH_AW_WORKFLOW_NAME: "Agentic Workflow Auto-Update" + GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/aw-auto-update.md" with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} script: | @@ -1029,6 +1064,7 @@ jobs: GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }} GH_AW_REPORT_INCOMPLETE_CREATE_ISSUE: "true" GH_AW_WORKFLOW_NAME: "Agentic Workflow Auto-Update" + GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/aw-auto-update.md" with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} script: | @@ -1043,6 +1079,7 @@ jobs: env: GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }} GH_AW_WORKFLOW_NAME: "Agentic Workflow Auto-Update" + GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/aw-auto-update.md" GH_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} GH_AW_AGENT_CONCLUSION: ${{ needs.agent.result }} GH_AW_WORKFLOW_ID: "aw-auto-update" @@ -1050,6 +1087,8 @@ jobs: GH_AW_ENGINE_ID: "copilot" GH_AW_SECRET_VERIFICATION_RESULT: ${{ needs.activation.outputs.secret_verification_result }} GH_AW_CHECKOUT_PR_SUCCESS: ${{ needs.agent.outputs.checkout_pr_success }} + GH_AW_EFFECTIVE_TOKENS: ${{ needs.agent.outputs.effective_tokens || '' }} + GH_AW_EFFECTIVE_TOKENS_RATE_LIMIT_ERROR: ${{ needs.agent.outputs.effective_tokens_rate_limit_error || 'false' }} GH_AW_INFERENCE_ACCESS_ERROR: ${{ needs.agent.outputs.inference_access_error }} GH_AW_MCP_POLICY_ERROR: ${{ needs.agent.outputs.mcp_policy_error }} GH_AW_AGENTIC_ENGINE_TIMEOUT: ${{ needs.agent.outputs.agentic_engine_timeout }} @@ -1064,6 +1103,7 @@ jobs: GH_AW_MISSING_TOOL_REPORT_AS_FAILURE: "true" GH_AW_MISSING_DATA_REPORT_AS_FAILURE: "true" GH_AW_TIMEOUT_MINUTES: "15" + GH_AW_MAX_EFFECTIVE_TOKENS: "25000000" with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} script: | @@ -1088,15 +1128,18 @@ jobs: steps: - name: Setup Scripts id: setup - uses: github/gh-aw-actions/setup@bc56a0cad2f450c562810785ef38649c04db812a # v0.72.1 + uses: github/gh-aw-actions/setup@46d564922b082d0db93244972e8005ea6904ee5f # v0.76.1 with: destination: ${{ runner.temp }}/gh-aw/actions job-name: ${{ github.job }} trace-id: ${{ needs.activation.outputs.setup-trace-id }} + parent-span-id: ${{ needs.activation.outputs.setup-parent-span-id || needs.activation.outputs.setup-span-id }} env: GH_AW_SETUP_WORKFLOW_NAME: "Agentic Workflow Auto-Update" GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/aw-auto-update.lock.yml@${{ github.ref }} - GH_AW_INFO_VERSION: "1.0.40" + GH_AW_INFO_VERSION: "1.0.52" + GH_AW_INFO_AWF_VERSION: "v0.25.55" + GH_AW_INFO_ENGINE_ID: "copilot" - name: Download agent output artifact id: download-agent-output continue-on-error: true @@ -1122,7 +1165,7 @@ jobs: rm -rf /tmp/gh-aw/sandbox/firewall/logs rm -rf /tmp/gh-aw/sandbox/firewall/audit - name: Download container images - run: bash "${RUNNER_TEMP}/gh-aw/actions/download_docker_images.sh" ghcr.io/github/gh-aw-firewall/agent:0.25.41 ghcr.io/github/gh-aw-firewall/api-proxy:0.25.41 ghcr.io/github/gh-aw-firewall/squid:0.25.41 + run: bash "${RUNNER_TEMP}/gh-aw/actions/download_docker_images.sh" ghcr.io/github/gh-aw-firewall/agent:0.25.55 ghcr.io/github/gh-aw-firewall/api-proxy:0.25.55 ghcr.io/github/gh-aw-firewall/squid:0.25.55 - name: Check if detection needed id: detection_guard if: always() @@ -1181,11 +1224,11 @@ jobs: node-version: '24' package-manager-cache: false - name: Install GitHub Copilot CLI - run: bash "${RUNNER_TEMP}/gh-aw/actions/install_copilot_cli.sh" 1.0.40 + run: bash "${RUNNER_TEMP}/gh-aw/actions/install_copilot_cli.sh" 1.0.52 env: GH_HOST: github.com - name: Install AWF binary - run: bash "${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh" v0.25.41 + run: bash "${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh" v0.25.55 - name: Execute GitHub Copilot CLI if: always() && steps.detection_guard.outputs.run_detection == 'true' continue-on-error: true @@ -1194,23 +1237,30 @@ jobs: timeout-minutes: 20 run: | set -o pipefail + printf '%s' "$(date +%s%3N)" > /tmp/gh-aw/agent_cli_start_ms.txt touch /tmp/gh-aw/agent-step-summary.md GH_AW_NODE_BIN=$(command -v node 2>/dev/null || true) export GH_AW_NODE_BIN + export COPILOT_API_KEY="$COPILOT_DUMMY_BYOK" (umask 177 && touch /tmp/gh-aw/threat-detection/detection.log) - printf '%s\n' '{"$schema":"https://github.com/github/gh-aw-firewall/releases/download/v0.25.41/awf-config.schema.json","network":{"allowDomains":["api.business.githubcopilot.com","api.enterprise.githubcopilot.com","api.github.com","api.githubcopilot.com","api.individual.githubcopilot.com","github.com","host.docker.internal","telemetry.enterprise.githubcopilot.com"]},"apiProxy":{"enabled":true},"container":{"imageTag":"0.25.41"}}' > "${RUNNER_TEMP}/gh-aw/awf-config.json" && cp "${RUNNER_TEMP}/gh-aw/awf-config.json" /tmp/gh-aw/awf-config.json + printf '%s\n' '{"$schema":"https://github.com/github/gh-aw-firewall/releases/download/v0.25.55/awf-config.schema.json","network":{"allowDomains":["api.business.githubcopilot.com","api.enterprise.githubcopilot.com","api.github.com","api.githubcopilot.com","api.individual.githubcopilot.com","github.com","host.docker.internal","telemetry.enterprise.githubcopilot.com"]},"apiProxy":{"enabled":true,"enableTokenSteering":true,"maxRuns":500,"maxEffectiveTokens":25000000},"container":{"imageTag":"0.25.55"}}' > "${RUNNER_TEMP}/gh-aw/awf-config.json" + cp "${RUNNER_TEMP}/gh-aw/awf-config.json" /tmp/gh-aw/awf-config.json + GH_AW_DOCKER_HOST_PATH_PREFIX_ARGS="" + if [[ "${DOCKER_HOST:-}" =~ ^tcp:// ]]; then + GH_AW_DOCKER_HOST_PATH_PREFIX_ARGS="--docker-host-path-prefix /tmp/gh-aw" + fi # shellcheck disable=SC1003 - sudo -E awf --config "${RUNNER_TEMP}/gh-aw/awf-config.json" --container-workdir "${GITHUB_WORKSPACE}" --mount "${RUNNER_TEMP}/gh-aw:${RUNNER_TEMP}/gh-aw:ro" --mount "${RUNNER_TEMP}/gh-aw:/host${RUNNER_TEMP}/gh-aw:ro" --env-all --exclude-env COPILOT_GITHUB_TOKEN --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --audit-dir /tmp/gh-aw/sandbox/firewall/audit --enable-host-access --allow-host-ports 80,443,8080 --skip-pull \ - -- /bin/bash -c 'export PATH="$(find /opt/hostedtoolcache /home/runner/work/_tool -maxdepth 4 -type d -name bin 2>/dev/null | tr '\''\n'\'' '\'':'\'')$PATH"; [ -n "$GOROOT" ] && export PATH="$GOROOT/bin:$PATH" || true && GH_AW_NODE_EXEC="${GH_AW_NODE_BIN:-}"; if [ -z "$GH_AW_NODE_EXEC" ] || [ ! -x "$GH_AW_NODE_EXEC" ]; then GH_AW_NODE_EXEC="$(command -v node 2>/dev/null || echo node)"; fi; "$GH_AW_NODE_EXEC" ${RUNNER_TEMP}/gh-aw/actions/copilot_harness.cjs /usr/local/bin/copilot --add-dir /tmp/gh-aw/ --log-level all --log-dir /tmp/gh-aw/sandbox/agent/logs/ --disable-builtin-mcps --no-ask-user --allow-all-tools --add-dir "${GITHUB_WORKSPACE}" --prompt-file /tmp/gh-aw/aw-prompts/prompt.txt' 2>&1 | tee -a /tmp/gh-aw/threat-detection/detection.log + sudo -E awf --config "${RUNNER_TEMP}/gh-aw/awf-config.json" --container-workdir "${GITHUB_WORKSPACE}" --mount "${RUNNER_TEMP}/gh-aw:${RUNNER_TEMP}/gh-aw:ro" --mount "${RUNNER_TEMP}/gh-aw:/host${RUNNER_TEMP}/gh-aw:ro" ${GH_AW_DOCKER_HOST_PATH_PREFIX_ARGS} --env-all --exclude-env COPILOT_GITHUB_TOKEN --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --audit-dir /tmp/gh-aw/sandbox/firewall/audit --enable-host-access --allow-host-ports 80,443,8080 --skip-pull \ + -- /bin/bash -c 'export PATH="$(find /opt/hostedtoolcache /home/runner/work/_tool -maxdepth 5 -type d -name bin 2>/dev/null | tr '\''\n'\'' '\'':'\'')$PATH"; [ -n "$GOROOT" ] && export PATH="$GOROOT/bin:$PATH" || true && GH_AW_NODE_EXEC="${GH_AW_NODE_BIN:-}"; if [ -z "$GH_AW_NODE_EXEC" ] || [ ! -x "$GH_AW_NODE_EXEC" ]; then GH_AW_NODE_EXEC="$(command -v node 2>/dev/null || true)"; fi; if [ -z "$GH_AW_NODE_EXEC" ]; then echo "node runtime missing on this runner — check runtimes.node in workflow YAML" >&2; exit 127; fi; "$GH_AW_NODE_EXEC" ${RUNNER_TEMP}/gh-aw/actions/copilot_harness.cjs /usr/local/bin/copilot --add-dir /tmp/gh-aw/ --log-level all --log-dir /tmp/gh-aw/sandbox/agent/logs/ --disable-builtin-mcps --no-ask-user --allow-all-tools --add-dir "${GITHUB_WORKSPACE}" --prompt-file /tmp/gh-aw/aw-prompts/prompt.txt' 2>&1 | tee -a /tmp/gh-aw/threat-detection/detection.log env: AWF_REFLECT_ENABLED: 1 COPILOT_AGENT_RUNNER_TYPE: STANDALONE - COPILOT_API_KEY: dummy-byok-key-for-offline-mode + COPILOT_DUMMY_BYOK: dummy-byok-key-for-offline-mode COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }} COPILOT_MODEL: ${{ vars.GH_AW_MODEL_DETECTION_COPILOT || 'claude-sonnet-4.6' }} GH_AW_PHASE: detection GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt - GH_AW_VERSION: v0.72.1 + GH_AW_VERSION: v0.76.1 GITHUB_API_URL: ${{ github.api_url }} GITHUB_AW: true GITHUB_COPILOT_INTEGRATION_ID: agentic-workflows @@ -1238,6 +1288,7 @@ jobs: uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: RUN_DETECTION: ${{ steps.detection_guard.outputs.run_detection }} + DETECTION_AGENTIC_EXECUTION_OUTCOME: ${{ steps.detection_agentic_execution.outcome }} GH_AW_DETECTION_CONTINUE_ON_ERROR: "true" with: script: | @@ -1248,10 +1299,11 @@ jobs: await main(); } catch (loadErr) { const continueOnError = process.env.GH_AW_DETECTION_CONTINUE_ON_ERROR !== 'false'; + const detectionExecutionFailed = process.env.DETECTION_AGENTIC_EXECUTION_OUTCOME === 'failure'; const msg = 'ERR_SYSTEM: \u274C Unexpected error loading threat detection module: ' + (loadErr && loadErr.message ? loadErr.message : String(loadErr)); core.error(msg); core.setOutput('reason', 'parse_error'); - if (continueOnError) { + if (continueOnError && !detectionExecutionFailed) { core.warning('\u26A0\uFE0F ' + msg); core.setOutput('conclusion', 'warning'); core.setOutput('success', 'false'); @@ -1281,9 +1333,10 @@ jobs: GH_AW_EFFECTIVE_TOKENS: ${{ needs.agent.outputs.effective_tokens }} GH_AW_ENGINE_ID: "copilot" GH_AW_ENGINE_MODEL: ${{ needs.agent.outputs.model }} - GH_AW_ENGINE_VERSION: "1.0.40" + GH_AW_ENGINE_VERSION: "1.0.52" GH_AW_WORKFLOW_ID: "aw-auto-update" GH_AW_WORKFLOW_NAME: "Agentic Workflow Auto-Update" + GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/aw-auto-update.md" outputs: code_push_failure_count: ${{ steps.process_safe_outputs.outputs.code_push_failure_count }} code_push_failure_errors: ${{ steps.process_safe_outputs.outputs.code_push_failure_errors }} @@ -1298,15 +1351,18 @@ jobs: steps: - name: Setup Scripts id: setup - uses: github/gh-aw-actions/setup@bc56a0cad2f450c562810785ef38649c04db812a # v0.72.1 + uses: github/gh-aw-actions/setup@46d564922b082d0db93244972e8005ea6904ee5f # v0.76.1 with: destination: ${{ runner.temp }}/gh-aw/actions job-name: ${{ github.job }} trace-id: ${{ needs.activation.outputs.setup-trace-id }} + parent-span-id: ${{ needs.activation.outputs.setup-parent-span-id || needs.activation.outputs.setup-span-id }} env: GH_AW_SETUP_WORKFLOW_NAME: "Agentic Workflow Auto-Update" GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/aw-auto-update.lock.yml@${{ github.ref }} - GH_AW_INFO_VERSION: "1.0.40" + GH_AW_INFO_VERSION: "1.0.52" + GH_AW_INFO_AWF_VERSION: "v0.25.55" + GH_AW_INFO_ENGINE_ID: "copilot" - name: Download agent output artifact id: download-agent-output continue-on-error: true @@ -1350,8 +1406,16 @@ jobs: echo "Extracted base branch from safe output: $BASE_BRANCH" fi fi + - name: Checkout repository (trusted default branch for comment events) + if: ((!cancelled()) && needs.agent.result != 'skipped' && contains(needs.agent.outputs.output_types, 'create_pull_request') || (!cancelled()) && needs.agent.result != 'skipped' && contains(needs.agent.outputs.output_types, 'push_to_pull_request_branch')) && (github.event_name == 'issue_comment' || github.event_name == 'pull_request_review_comment') + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + ref: ${{ github.event.repository.default_branch }} + token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} + persist-credentials: false + fetch-depth: 1 - name: Checkout repository - if: (!cancelled()) && needs.agent.result != 'skipped' && contains(needs.agent.outputs.output_types, 'create_pull_request') || (!cancelled()) && needs.agent.result != 'skipped' && contains(needs.agent.outputs.output_types, 'push_to_pull_request_branch') + if: ((!cancelled()) && needs.agent.result != 'skipped' && contains(needs.agent.outputs.output_types, 'create_pull_request') || (!cancelled()) && needs.agent.result != 'skipped' && contains(needs.agent.outputs.output_types, 'push_to_pull_request_branch')) && github.event_name != 'issue_comment' && github.event_name != 'pull_request_review_comment' uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: ref: ${{ steps.extract-base-branch.outputs.base-branch || github.base_ref || github.event.pull_request.base.ref || github.ref_name || github.event.repository.default_branch }} @@ -1386,10 +1450,11 @@ jobs: uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }} - GH_AW_ALLOWED_DOMAINS: "*.githubusercontent.com,api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,docs.github.com,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.blog,github.com,github.githubassets.com,go.dev,golang.org,goproxy.io,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,pkg.go.dev,ppa.launchpad.net,proxy.golang.org,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,storage.googleapis.com,sum.golang.org,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com,www.googleapis.com" + GH_AW_COMMENT_ID: ${{ needs.activation.outputs.comment_id }} + GH_AW_ALLOWED_DOMAINS: "*.githubusercontent.com,api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,docs.github.com,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.blog,github.com,github.githubassets.com,go.dev,golang.org,goproxy.io,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,patch-diff.githubusercontent.com,pkg.go.dev,ppa.launchpad.net,proxy.golang.org,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,storage.googleapis.com,sum.golang.org,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com,www.googleapis.com" GITHUB_SERVER_URL: ${{ github.server_url }} GITHUB_API_URL: ${{ github.api_url }} - GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"create_pull_request\":{\"allowed_files\":[\".github/workflows/*.md\",\".github/workflows/*.lock.yml\",\".github/workflows/shared/**\",\".github/aw/**\",\".github/agents/**\"],\"draft\":false,\"labels\":[\"automation\"],\"max\":1,\"max_patch_files\":100,\"max_patch_size\":1024,\"protect_top_level_dot_folders\":true,\"protected_files\":[\"package.json\",\"bun.lockb\",\"bunfig.toml\",\"deno.json\",\"deno.jsonc\",\"deno.lock\",\"global.json\",\"NuGet.Config\",\"Directory.Packages.props\",\"mix.exs\",\"mix.lock\",\"go.mod\",\"go.sum\",\"stack.yaml\",\"stack.yaml.lock\",\"pom.xml\",\"build.gradle\",\"build.gradle.kts\",\"settings.gradle\",\"settings.gradle.kts\",\"gradle.properties\",\"package-lock.json\",\"yarn.lock\",\"pnpm-lock.yaml\",\"npm-shrinkwrap.json\",\"requirements.txt\",\"Pipfile\",\"Pipfile.lock\",\"pyproject.toml\",\"setup.py\",\"setup.cfg\",\"Gemfile\",\"Gemfile.lock\",\"uv.lock\",\"CODEOWNERS\",\"DESIGN.md\",\"README.md\",\"CONTRIBUTING.md\",\"CHANGELOG.md\",\"SECURITY.md\",\"CODE_OF_CONDUCT.md\",\"AGENTS.md\",\"CLAUDE.md\",\"GEMINI.md\"],\"protected_files_policy\":\"fallback-to-issue\",\"title_prefix\":\"[Auto Update] \"},\"create_report_incomplete_issue\":{},\"missing_data\":{},\"missing_tool\":{},\"noop\":{\"max\":1,\"report-as-issue\":\"false\"},\"push_to_pull_request_branch\":{\"allowed_files\":[\".github/workflows/*.md\",\".github/workflows/*.lock.yml\",\".github/workflows/shared/**\",\".github/aw/**\",\".github/agents/**\"],\"if_no_changes\":\"warn\",\"labels\":[\"automation\"],\"max\":1,\"max_patch_size\":1024,\"protect_top_level_dot_folders\":true,\"protected_files\":[\"package.json\",\"bun.lockb\",\"bunfig.toml\",\"deno.json\",\"deno.jsonc\",\"deno.lock\",\"global.json\",\"NuGet.Config\",\"Directory.Packages.props\",\"mix.exs\",\"mix.lock\",\"go.mod\",\"go.sum\",\"stack.yaml\",\"stack.yaml.lock\",\"pom.xml\",\"build.gradle\",\"build.gradle.kts\",\"settings.gradle\",\"settings.gradle.kts\",\"gradle.properties\",\"package-lock.json\",\"yarn.lock\",\"pnpm-lock.yaml\",\"npm-shrinkwrap.json\",\"requirements.txt\",\"Pipfile\",\"Pipfile.lock\",\"pyproject.toml\",\"setup.py\",\"setup.cfg\",\"Gemfile\",\"Gemfile.lock\",\"uv.lock\",\"CODEOWNERS\",\"DESIGN.md\",\"README.md\",\"CONTRIBUTING.md\",\"CHANGELOG.md\",\"SECURITY.md\",\"CODE_OF_CONDUCT.md\",\"AGENTS.md\",\"CLAUDE.md\",\"GEMINI.md\"],\"protected_files_policy\":\"fallback-to-issue\",\"target\":\"*\",\"title_prefix\":\"[Auto Update] \"},\"report_incomplete\":{}}" + GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"create_pull_request\":{\"allowed_files\":[\".github/workflows/*.md\",\".github/workflows/*.lock.yml\",\".github/workflows/shared/**\",\".github/aw/**\",\".github/agents/**\"],\"draft\":false,\"labels\":[\"automation\"],\"max\":1,\"max_patch_files\":100,\"max_patch_size\":1024,\"protect_top_level_dot_folders\":true,\"protected_files\":[\"package.json\",\"bun.lockb\",\"bunfig.toml\",\"deno.json\",\"deno.jsonc\",\"deno.lock\",\"global.json\",\"NuGet.Config\",\"Directory.Packages.props\",\"mix.exs\",\"mix.lock\",\"go.mod\",\"go.sum\",\"stack.yaml\",\"stack.yaml.lock\",\"pom.xml\",\"build.gradle\",\"build.gradle.kts\",\"settings.gradle\",\"settings.gradle.kts\",\"gradle.properties\",\"package-lock.json\",\"yarn.lock\",\"pnpm-lock.yaml\",\"npm-shrinkwrap.json\",\"requirements.txt\",\"Pipfile\",\"Pipfile.lock\",\"pyproject.toml\",\"setup.py\",\"setup.cfg\",\"Gemfile\",\"Gemfile.lock\",\"uv.lock\",\"CODEOWNERS\",\"DESIGN.md\",\"README.md\",\"CONTRIBUTING.md\",\"CHANGELOG.md\",\"SECURITY.md\",\"CODE_OF_CONDUCT.md\",\"AGENTS.md\",\"CLAUDE.md\",\"GEMINI.md\"],\"protected_files_policy\":\"fallback-to-issue\",\"title_prefix\":\"[Auto Update] \"},\"create_report_incomplete_issue\":{},\"missing_data\":{},\"missing_tool\":{},\"noop\":{\"max\":1,\"report-as-issue\":\"false\"},\"push_to_pull_request_branch\":{\"allowed_files\":[\".github/workflows/*.md\",\".github/workflows/*.lock.yml\",\".github/workflows/shared/**\",\".github/aw/**\",\".github/agents/**\"],\"if_no_changes\":\"warn\",\"max\":1,\"max_patch_size\":1024,\"protect_top_level_dot_folders\":true,\"protected_files\":[\"package.json\",\"bun.lockb\",\"bunfig.toml\",\"deno.json\",\"deno.jsonc\",\"deno.lock\",\"global.json\",\"NuGet.Config\",\"Directory.Packages.props\",\"mix.exs\",\"mix.lock\",\"go.mod\",\"go.sum\",\"stack.yaml\",\"stack.yaml.lock\",\"pom.xml\",\"build.gradle\",\"build.gradle.kts\",\"settings.gradle\",\"settings.gradle.kts\",\"gradle.properties\",\"package-lock.json\",\"yarn.lock\",\"pnpm-lock.yaml\",\"npm-shrinkwrap.json\",\"requirements.txt\",\"Pipfile\",\"Pipfile.lock\",\"pyproject.toml\",\"setup.py\",\"setup.cfg\",\"Gemfile\",\"Gemfile.lock\",\"uv.lock\",\"CODEOWNERS\",\"DESIGN.md\",\"README.md\",\"CONTRIBUTING.md\",\"CHANGELOG.md\",\"SECURITY.md\",\"CODE_OF_CONDUCT.md\",\"AGENTS.md\",\"CLAUDE.md\",\"GEMINI.md\"],\"protected_files_policy\":\"fallback-to-issue\",\"required_labels\":[\"automation\"],\"target\":\"*\",\"title_prefix\":\"[Auto Update] \"},\"report_incomplete\":{}}" GH_AW_CI_TRIGGER_TOKEN: ${{ secrets.GH_AW_CI_TRIGGER_TOKEN }} with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/labelops-flake-fix.lock.yml b/.github/workflows/labelops-flake-fix.lock.yml index 77508b79fb9..4900ff447b7 100644 --- a/.github/workflows/labelops-flake-fix.lock.yml +++ b/.github/workflows/labelops-flake-fix.lock.yml @@ -1,5 +1,5 @@ -# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"b57dad0a191c4e58997973ee6d20c383ea318c0dbd31ac872d67ae41414ed448","compiler_version":"v0.72.1","strict":true,"agent_id":"copilot"} -# gh-aw-manifest: {"version":1,"secrets":["COPILOT_GITHUB_TOKEN","GH_AW_CI_TRIGGER_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/checkout","sha":"de0fac2e4500dabe0009e67214ff5f5447ce83dd","version":"v6.0.2"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/setup-node","sha":"48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e","version":"v6.4.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"},{"repo":"github/gh-aw-actions/setup","sha":"bc56a0cad2f450c562810785ef38649c04db812a","version":"v0.72.1"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.25.41"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.41"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.25.41"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.3.6","digest":"sha256:2bb8eef86006a4c5963c55616a9c51c32f27bfdecb023b8aa6f91f6718d9171c","pinned_image":"ghcr.io/github/gh-aw-mcpg:v0.3.6@sha256:2bb8eef86006a4c5963c55616a9c51c32f27bfdecb023b8aa6f91f6718d9171c"},{"image":"ghcr.io/github/github-mcp-server:v1.0.3","digest":"sha256:2ac27ef03461ef2b877031b838a7d1fd7f12b12d4ace7796d8cad91446d55959","pinned_image":"ghcr.io/github/github-mcp-server:v1.0.3@sha256:2ac27ef03461ef2b877031b838a7d1fd7f12b12d4ace7796d8cad91446d55959"},{"image":"node:lts-alpine","digest":"sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f","pinned_image":"node:lts-alpine@sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f"}]} +# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"b57dad0a191c4e58997973ee6d20c383ea318c0dbd31ac872d67ae41414ed448","compiler_version":"v0.76.1","strict":true,"agent_id":"copilot"} +# gh-aw-manifest: {"version":1,"secrets":["COPILOT_GITHUB_TOKEN","GH_AW_CI_TRIGGER_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/checkout","sha":"de0fac2e4500dabe0009e67214ff5f5447ce83dd","version":"v6.0.2"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/setup-node","sha":"48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e","version":"v6.4.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"},{"repo":"github/gh-aw-actions/setup","sha":"46d564922b082d0db93244972e8005ea6904ee5f","version":"v0.76.1"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.25.55"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.55"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.25.55"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.3.19"},{"image":"ghcr.io/github/github-mcp-server:v1.0.4","digest":"sha256:e3816a476a977cfb836e7d221510011436c654d11861db66ecfd826601aba6a4","pinned_image":"ghcr.io/github/github-mcp-server:v1.0.4@sha256:e3816a476a977cfb836e7d221510011436c654d11861db66ecfd826601aba6a4"},{"image":"node:lts-alpine","digest":"sha256:2bdb65ed1dab192432bc31c95f94155ca5ad7fc1392fb7eb7526ab682fa5bf14","pinned_image":"node:lts-alpine@sha256:2bdb65ed1dab192432bc31c95f94155ca5ad7fc1392fb7eb7526ab682fa5bf14"}]} # ___ _ _ # / _ \ | | (_) # | |_| | __ _ ___ _ __ | |_ _ ___ @@ -14,7 +14,7 @@ # \ /\ / (_) | | | | ( | | | | (_) \ V V /\__ \ # \/ \/ \___/|_| |_|\_\|_| |_|\___/ \_/\_/ |___/ # -# This file was automatically generated by gh-aw (v0.72.1). DO NOT EDIT. +# This file was automatically generated by gh-aw (v0.76.1). DO NOT EDIT. # # To update this file, edit the corresponding .md file and run: # gh aw compile @@ -43,23 +43,23 @@ # - actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 # - actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 # - actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 -# - github/gh-aw-actions/setup@bc56a0cad2f450c562810785ef38649c04db812a # v0.72.1 +# - github/gh-aw-actions/setup@46d564922b082d0db93244972e8005ea6904ee5f # v0.76.1 # # Container images used: -# - ghcr.io/github/gh-aw-firewall/agent:0.25.41 -# - ghcr.io/github/gh-aw-firewall/api-proxy:0.25.41 -# - ghcr.io/github/gh-aw-firewall/squid:0.25.41 -# - ghcr.io/github/gh-aw-mcpg:v0.3.6@sha256:2bb8eef86006a4c5963c55616a9c51c32f27bfdecb023b8aa6f91f6718d9171c -# - ghcr.io/github/github-mcp-server:v1.0.3@sha256:2ac27ef03461ef2b877031b838a7d1fd7f12b12d4ace7796d8cad91446d55959 -# - node:lts-alpine@sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f +# - ghcr.io/github/gh-aw-firewall/agent:0.25.55 +# - ghcr.io/github/gh-aw-firewall/api-proxy:0.25.55 +# - ghcr.io/github/gh-aw-firewall/squid:0.25.55 +# - ghcr.io/github/gh-aw-mcpg:v0.3.19 +# - ghcr.io/github/github-mcp-server:v1.0.4@sha256:e3816a476a977cfb836e7d221510011436c654d11861db66ecfd826601aba6a4 +# - node:lts-alpine@sha256:2bdb65ed1dab192432bc31c95f94155ca5ad7fc1392fb7eb7526ab682fa5bf14 name: "LabelOps — Flake Fixer" -"on": +on: workflow_dispatch: inputs: aw_context: default: "" - description: Agent caller context (used internally by Agentic Workflows). + description: "Agent caller context (used internally by Agentic Workflows)." required: false type: string affected_prs: @@ -96,35 +96,39 @@ jobs: lockdown_check_failed: ${{ steps.generate_aw_info.outputs.lockdown_check_failed == 'true' }} model: ${{ steps.generate_aw_info.outputs.model }} secret_verification_result: ${{ steps.validate-secret.outputs.verification_result }} + setup-parent-span-id: ${{ steps.setup.outputs.parent-span-id || steps.setup.outputs.span-id }} + setup-span-id: ${{ steps.setup.outputs.span-id }} setup-trace-id: ${{ steps.setup.outputs.trace-id }} stale_lock_file_failed: ${{ steps.check-lock-file.outputs.stale_lock_file_failed == 'true' }} steps: - name: Setup Scripts id: setup - uses: github/gh-aw-actions/setup@bc56a0cad2f450c562810785ef38649c04db812a # v0.72.1 + uses: github/gh-aw-actions/setup@46d564922b082d0db93244972e8005ea6904ee5f # v0.76.1 with: destination: ${{ runner.temp }}/gh-aw/actions job-name: ${{ github.job }} env: GH_AW_SETUP_WORKFLOW_NAME: "LabelOps — Flake Fixer" GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/labelops-flake-fix.lock.yml@${{ github.ref }} - GH_AW_INFO_VERSION: "1.0.40" + GH_AW_INFO_VERSION: "1.0.52" + GH_AW_INFO_AWF_VERSION: "v0.25.55" + GH_AW_INFO_ENGINE_ID: "copilot" - name: Generate agentic run info id: generate_aw_info env: GH_AW_INFO_ENGINE_ID: "copilot" GH_AW_INFO_ENGINE_NAME: "GitHub Copilot CLI" GH_AW_INFO_MODEL: ${{ vars.GH_AW_MODEL_AGENT_COPILOT || 'claude-sonnet-4.6' }} - GH_AW_INFO_VERSION: "1.0.40" - GH_AW_INFO_AGENT_VERSION: "1.0.40" - GH_AW_INFO_CLI_VERSION: "v0.72.1" + GH_AW_INFO_VERSION: "1.0.52" + GH_AW_INFO_AGENT_VERSION: "1.0.52" + GH_AW_INFO_CLI_VERSION: "v0.76.1" GH_AW_INFO_WORKFLOW_NAME: "LabelOps — Flake Fixer" GH_AW_INFO_EXPERIMENTAL: "false" GH_AW_INFO_SUPPORTS_TOOLS_ALLOWLIST: "true" GH_AW_INFO_STAGED: "false" GH_AW_INFO_ALLOWED_DOMAINS: '["defaults","dotnet","dev.azure.com"]' GH_AW_INFO_FIREWALL_ENABLED: "true" - GH_AW_INFO_AWF_VERSION: "v0.25.41" + GH_AW_INFO_AWF_VERSION: "v0.25.55" GH_AW_INFO_AWMG_VERSION: "" GH_AW_INFO_FIREWALL_TYPE: "squid" GH_AW_COMPILED_STRICT: "true" @@ -147,6 +151,7 @@ jobs: sparse-checkout: | .github .agents + .antigravity .claude .codex .crush @@ -157,8 +162,8 @@ jobs: fetch-depth: 1 - name: Save agent config folders for base branch restoration env: - GH_AW_AGENT_FOLDERS: ".agents .claude .codex .crush .gemini .github .opencode .pi" - GH_AW_AGENT_FILES: ".crush.json AGENTS.md CLAUDE.md GEMINI.md PI.md opencode.jsonc" + GH_AW_AGENT_FOLDERS: ".agents .antigravity .claude .codex .crush .gemini .github .opencode .pi" + GH_AW_AGENT_FILES: ".crush.json AGENTS.md ANTIGRAVITY.md CLAUDE.md GEMINI.md PI.md opencode.jsonc" # poutine:ignore untrusted_checkout_exec run: bash "${RUNNER_TEMP}/gh-aw/actions/save_base_github_folders.sh" - name: Check workflow lock file @@ -176,7 +181,7 @@ jobs: - name: Check compile-agentic version uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: - GH_AW_COMPILED_VERSION: "v0.72.1" + GH_AW_COMPILED_VERSION: "v0.76.1" with: script: | const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); @@ -187,11 +192,11 @@ jobs: env: GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt GH_AW_SAFE_OUTPUTS: ${{ runner.temp }}/gh-aw/safeoutputs/outputs.jsonl + GH_AW_EXPR_1A3A194A: ${{ github.event.discussion.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'discussion' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }} + GH_AW_EXPR_463A214A: ${{ github.event.pull_request.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'pull_request' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }} + GH_AW_EXPR_802A9F6A: ${{ github.event.issue.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'issue' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }} + GH_AW_EXPR_FF1D34CE: ${{ github.event.comment.id || fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').comment_id }} GH_AW_GITHUB_ACTOR: ${{ github.actor }} - GH_AW_GITHUB_EVENT_COMMENT_ID: ${{ github.event.comment.id }} - GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER: ${{ github.event.discussion.number }} - GH_AW_GITHUB_EVENT_ISSUE_NUMBER: ${{ github.event.issue.number }} - GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }} GH_AW_GITHUB_REPOSITORY: ${{ github.repository }} GH_AW_GITHUB_RUN_ID: ${{ github.run_id }} GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }} @@ -221,28 +226,28 @@ jobs: cat << 'GH_AW_PROMPT_3ef1d691023fed3a_EOF' The following GitHub context information is available for this workflow: - {{#if __GH_AW_GITHUB_ACTOR__ }} + {{#if github.actor}} - **actor**: __GH_AW_GITHUB_ACTOR__ {{/if}} - {{#if __GH_AW_GITHUB_REPOSITORY__ }} + {{#if github.repository}} - **repository**: __GH_AW_GITHUB_REPOSITORY__ {{/if}} - {{#if __GH_AW_GITHUB_WORKSPACE__ }} + {{#if github.workspace}} - **workspace**: __GH_AW_GITHUB_WORKSPACE__ {{/if}} - {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }} - - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ + {{#if github.event.issue.number || (github.aw.context.item_type == 'issue' && github.aw.context.item_number)}} + - **issue-number**: #__GH_AW_EXPR_802A9F6A__ {{/if}} - {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }} - - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ + {{#if github.event.discussion.number || (github.aw.context.item_type == 'discussion' && github.aw.context.item_number)}} + - **discussion-number**: #__GH_AW_EXPR_1A3A194A__ {{/if}} - {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }} - - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ + {{#if github.event.pull_request.number || (github.aw.context.item_type == 'pull_request' && github.aw.context.item_number)}} + - **pull-request-number**: #__GH_AW_EXPR_463A214A__ {{/if}} - {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }} - - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__ + {{#if github.event.comment.id || github.aw.context.comment_id}} + - **comment-id**: __GH_AW_EXPR_FF1D34CE__ {{/if}} - {{#if __GH_AW_GITHUB_RUN_ID__ }} + {{#if github.run_id}} - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__ {{/if}} - **checkouts**: The following repositories have been checked out and are available in the workspace: @@ -275,11 +280,11 @@ jobs: uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt + GH_AW_EXPR_1A3A194A: ${{ github.event.discussion.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'discussion' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }} + GH_AW_EXPR_463A214A: ${{ github.event.pull_request.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'pull_request' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }} + GH_AW_EXPR_802A9F6A: ${{ github.event.issue.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'issue' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }} + GH_AW_EXPR_FF1D34CE: ${{ github.event.comment.id || fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').comment_id }} GH_AW_GITHUB_ACTOR: ${{ github.actor }} - GH_AW_GITHUB_EVENT_COMMENT_ID: ${{ github.event.comment.id }} - GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER: ${{ github.event.discussion.number }} - GH_AW_GITHUB_EVENT_ISSUE_NUMBER: ${{ github.event.issue.number }} - GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }} GH_AW_GITHUB_REPOSITORY: ${{ github.repository }} GH_AW_GITHUB_RUN_ID: ${{ github.run_id }} GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }} @@ -298,11 +303,11 @@ jobs: return await substitutePlaceholders({ file: process.env.GH_AW_PROMPT, substitutions: { + GH_AW_EXPR_1A3A194A: process.env.GH_AW_EXPR_1A3A194A, + GH_AW_EXPR_463A214A: process.env.GH_AW_EXPR_463A214A, + GH_AW_EXPR_802A9F6A: process.env.GH_AW_EXPR_802A9F6A, + GH_AW_EXPR_FF1D34CE: process.env.GH_AW_EXPR_FF1D34CE, GH_AW_GITHUB_ACTOR: process.env.GH_AW_GITHUB_ACTOR, - GH_AW_GITHUB_EVENT_COMMENT_ID: process.env.GH_AW_GITHUB_EVENT_COMMENT_ID, - GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER: process.env.GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER, - GH_AW_GITHUB_EVENT_ISSUE_NUMBER: process.env.GH_AW_GITHUB_EVENT_ISSUE_NUMBER, - GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER: process.env.GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER, GH_AW_GITHUB_REPOSITORY: process.env.GH_AW_GITHUB_REPOSITORY, GH_AW_GITHUB_RUN_ID: process.env.GH_AW_GITHUB_RUN_ID, GH_AW_GITHUB_WORKSPACE: process.env.GH_AW_GITHUB_WORKSPACE, @@ -336,6 +341,7 @@ jobs: /tmp/gh-aw/github_rate_limits.jsonl /tmp/gh-aw/base /tmp/gh-aw/.github/agents + /tmp/gh-aw/.github/skills if-no-files-found: ignore retention-days: 1 @@ -351,29 +357,35 @@ jobs: GH_AW_MCP_LOG_DIR: /tmp/gh-aw/mcp-logs/safeoutputs GH_AW_WORKFLOW_ID_SANITIZED: labelopsflakefix outputs: - agentic_engine_timeout: ${{ steps.detect-copilot-errors.outputs.agentic_engine_timeout || 'false' }} + agentic_engine_timeout: ${{ steps.detect-agent-errors.outputs.agentic_engine_timeout || 'false' }} checkout_pr_success: ${{ steps.checkout-pr.outputs.checkout_pr_success || 'true' }} effective_tokens: ${{ steps.parse-mcp-gateway.outputs.effective_tokens }} + effective_tokens_rate_limit_error: ${{ steps.parse-mcp-gateway.outputs.effective_tokens_rate_limit_error || 'false' }} has_patch: ${{ steps.collect_output.outputs.has_patch }} - inference_access_error: ${{ steps.detect-copilot-errors.outputs.inference_access_error || 'false' }} - mcp_policy_error: ${{ steps.detect-copilot-errors.outputs.mcp_policy_error || 'false' }} + inference_access_error: ${{ steps.detect-agent-errors.outputs.inference_access_error || 'false' }} + mcp_policy_error: ${{ steps.detect-agent-errors.outputs.mcp_policy_error || 'false' }} model: ${{ needs.activation.outputs.model }} - model_not_supported_error: ${{ steps.detect-copilot-errors.outputs.model_not_supported_error || 'false' }} + model_not_supported_error: ${{ steps.detect-agent-errors.outputs.model_not_supported_error || 'false' }} output: ${{ steps.collect_output.outputs.output }} output_types: ${{ steps.collect_output.outputs.output_types }} + setup-parent-span-id: ${{ steps.setup.outputs.parent-span-id || steps.setup.outputs.span-id }} + setup-span-id: ${{ steps.setup.outputs.span-id }} setup-trace-id: ${{ steps.setup.outputs.trace-id }} steps: - name: Setup Scripts id: setup - uses: github/gh-aw-actions/setup@bc56a0cad2f450c562810785ef38649c04db812a # v0.72.1 + uses: github/gh-aw-actions/setup@46d564922b082d0db93244972e8005ea6904ee5f # v0.76.1 with: destination: ${{ runner.temp }}/gh-aw/actions job-name: ${{ github.job }} trace-id: ${{ needs.activation.outputs.setup-trace-id }} + parent-span-id: ${{ needs.activation.outputs.setup-parent-span-id || needs.activation.outputs.setup-span-id }} env: GH_AW_SETUP_WORKFLOW_NAME: "LabelOps — Flake Fixer" GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/labelops-flake-fix.lock.yml@${{ github.ref }} - GH_AW_INFO_VERSION: "1.0.40" + GH_AW_INFO_VERSION: "1.0.52" + GH_AW_INFO_AWF_VERSION: "v0.25.55" + GH_AW_INFO_ENGINE_ID: "copilot" - name: Set runtime paths id: set-runtime-paths run: | @@ -422,11 +434,11 @@ jobs: const { main } = require('${{ runner.temp }}/gh-aw/actions/checkout_pr_branch.cjs'); await main(); - name: Install GitHub Copilot CLI - run: bash "${RUNNER_TEMP}/gh-aw/actions/install_copilot_cli.sh" 1.0.40 + run: bash "${RUNNER_TEMP}/gh-aw/actions/install_copilot_cli.sh" 1.0.52 env: GH_HOST: github.com - name: Install AWF binary - run: bash "${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh" v0.25.41 + run: bash "${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh" v0.25.55 - name: Parse integrity filter lists id: parse-guard-vars env: @@ -442,16 +454,20 @@ jobs: - name: Restore agent config folders from base branch if: steps.checkout-pr.outcome == 'success' env: - GH_AW_AGENT_FOLDERS: ".agents .claude .codex .crush .gemini .github .opencode .pi" - GH_AW_AGENT_FILES: ".crush.json AGENTS.md CLAUDE.md GEMINI.md PI.md opencode.jsonc" + GH_AW_AGENT_FOLDERS: ".agents .antigravity .claude .codex .crush .gemini .github .opencode .pi" + GH_AW_AGENT_FILES: ".crush.json AGENTS.md ANTIGRAVITY.md CLAUDE.md GEMINI.md PI.md opencode.jsonc" run: bash "${RUNNER_TEMP}/gh-aw/actions/restore_base_github_folders.sh" - name: Restore inline sub-agents from activation artifact env: GH_AW_SUB_AGENT_DIR: ".github/agents" GH_AW_SUB_AGENT_EXT: ".agent.md" run: bash "${RUNNER_TEMP}/gh-aw/actions/restore_inline_sub_agents.sh" + - name: Restore inline skills from activation artifact + env: + GH_AW_SKILL_DIR: ".github/skills" + run: bash "${RUNNER_TEMP}/gh-aw/actions/restore_inline_skills.sh" - name: Download container images - run: bash "${RUNNER_TEMP}/gh-aw/actions/download_docker_images.sh" ghcr.io/github/gh-aw-firewall/agent:0.25.41 ghcr.io/github/gh-aw-firewall/api-proxy:0.25.41 ghcr.io/github/gh-aw-firewall/squid:0.25.41 ghcr.io/github/gh-aw-mcpg:v0.3.6@sha256:2bb8eef86006a4c5963c55616a9c51c32f27bfdecb023b8aa6f91f6718d9171c ghcr.io/github/github-mcp-server:v1.0.3@sha256:2ac27ef03461ef2b877031b838a7d1fd7f12b12d4ace7796d8cad91446d55959 node:lts-alpine@sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f + run: bash "${RUNNER_TEMP}/gh-aw/actions/download_docker_images.sh" ghcr.io/github/gh-aw-firewall/agent:0.25.55 ghcr.io/github/gh-aw-firewall/api-proxy:0.25.55 ghcr.io/github/gh-aw-firewall/squid:0.25.55 ghcr.io/github/gh-aw-mcpg:v0.3.19 ghcr.io/github/github-mcp-server:v1.0.4@sha256:e3816a476a977cfb836e7d221510011436c654d11861db66ecfd826601aba6a4 node:lts-alpine@sha256:2bdb65ed1dab192432bc31c95f94155ca5ad7fc1392fb7eb7526ab682fa5bf14 - name: Generate Safe Outputs Config run: | mkdir -p "${RUNNER_TEMP}/gh-aw/safeoutputs" @@ -505,6 +521,9 @@ jobs: "sanitize": true, "maxLength": 65000 }, + "fields": { + "type": "array" + }, "labels": { "type": "array", "itemType": "string", @@ -717,8 +736,13 @@ jobs: export GH_AW_ENGINE="copilot" MCP_GATEWAY_UID=$(id -u 2>/dev/null || echo '0') MCP_GATEWAY_GID=$(id -g 2>/dev/null || echo '0') - DOCKER_SOCK_GID=$(stat -c '%g' /var/run/docker.sock 2>/dev/null || echo '0') - export MCP_GATEWAY_DOCKER_COMMAND='docker run -i --rm --network host --add-host host.docker.internal:127.0.0.1 --user '"${MCP_GATEWAY_UID}"':'"${MCP_GATEWAY_GID}"' --group-add '"${DOCKER_SOCK_GID}"' -v /var/run/docker.sock:/var/run/docker.sock -e MCP_GATEWAY_PORT -e MCP_GATEWAY_DOMAIN -e MCP_GATEWAY_API_KEY -e MCP_GATEWAY_PAYLOAD_DIR -e MCP_GATEWAY_PAYLOAD_SIZE_THRESHOLD -e DEBUG -e MCP_GATEWAY_LOG_DIR -e GH_AW_MCP_LOG_DIR -e GH_AW_SAFE_OUTPUTS -e GH_AW_SAFE_OUTPUTS_CONFIG_PATH -e GH_AW_SAFE_OUTPUTS_TOOLS_PATH -e GH_AW_ASSETS_BRANCH -e GH_AW_ASSETS_MAX_SIZE_KB -e GH_AW_ASSETS_ALLOWED_EXTS -e DEFAULT_BRANCH -e GITHUB_MCP_SERVER_TOKEN -e GITHUB_MCP_GUARD_MIN_INTEGRITY -e GITHUB_MCP_GUARD_REPOS -e GITHUB_REPOSITORY -e GITHUB_SERVER_URL -e GITHUB_SHA -e GITHUB_WORKSPACE -e GITHUB_TOKEN -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RUN_ATTEMPT -e GITHUB_JOB -e GITHUB_ACTION -e GITHUB_EVENT_NAME -e GITHUB_EVENT_PATH -e GITHUB_ACTOR -e GITHUB_ACTOR_ID -e GITHUB_TRIGGERING_ACTOR -e GITHUB_WORKFLOW -e GITHUB_WORKFLOW_REF -e GITHUB_WORKFLOW_SHA -e GITHUB_REF -e GITHUB_REF_NAME -e GITHUB_REF_TYPE -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GH_AW_SAFE_OUTPUTS_PORT -e GH_AW_SAFE_OUTPUTS_API_KEY -v /tmp/gh-aw/mcp-payloads:/tmp/gh-aw/mcp-payloads:rw -v /opt:/opt:ro -v /tmp:/tmp:rw -v '"${GITHUB_WORKSPACE}"':'"${GITHUB_WORKSPACE}"':rw ghcr.io/github/gh-aw-mcpg:v0.3.6' + case "${DOCKER_HOST:-}" in + unix://* ) DOCKER_SOCK_PATH="${DOCKER_HOST#unix://}" ;; + /* ) DOCKER_SOCK_PATH="$DOCKER_HOST" ;; + * ) DOCKER_SOCK_PATH=/var/run/docker.sock ;; + esac + DOCKER_SOCK_GID=$(stat -c '%g' "$DOCKER_SOCK_PATH" 2>/dev/null || echo '0') + export MCP_GATEWAY_DOCKER_COMMAND='docker run -i --rm --network host --add-host host.docker.internal:127.0.0.1 --user '"${MCP_GATEWAY_UID}"':'"${MCP_GATEWAY_GID}"' --group-add '"${DOCKER_SOCK_GID}"' -v '"${DOCKER_SOCK_PATH}"':/var/run/docker.sock -e MCP_GATEWAY_PORT -e MCP_GATEWAY_DOMAIN -e MCP_GATEWAY_API_KEY -e MCP_GATEWAY_PAYLOAD_DIR -e MCP_GATEWAY_PAYLOAD_SIZE_THRESHOLD -e DOCKER_HOST=unix:///var/run/docker.sock -e DEBUG -e MCP_GATEWAY_LOG_DIR -e GH_AW_MCP_LOG_DIR -e GH_AW_SAFE_OUTPUTS -e GH_AW_SAFE_OUTPUTS_CONFIG_PATH -e GH_AW_SAFE_OUTPUTS_TOOLS_PATH -e GH_AW_ASSETS_BRANCH -e GH_AW_ASSETS_MAX_SIZE_KB -e GH_AW_ASSETS_ALLOWED_EXTS -e DEFAULT_BRANCH -e GITHUB_MCP_SERVER_TOKEN -e GITHUB_MCP_GUARD_MIN_INTEGRITY -e GITHUB_MCP_GUARD_REPOS -e GITHUB_REPOSITORY -e GITHUB_SERVER_URL -e GITHUB_SHA -e GITHUB_WORKSPACE -e GITHUB_TOKEN -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RUN_ATTEMPT -e GITHUB_JOB -e GITHUB_ACTION -e GITHUB_EVENT_NAME -e GITHUB_EVENT_PATH -e GITHUB_ACTOR -e GITHUB_ACTOR_ID -e GITHUB_TRIGGERING_ACTOR -e GITHUB_WORKFLOW -e GITHUB_WORKFLOW_REF -e GITHUB_WORKFLOW_SHA -e GITHUB_REF -e GITHUB_REF_NAME -e GITHUB_REF_TYPE -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GH_AW_SAFE_OUTPUTS_PORT -e GH_AW_SAFE_OUTPUTS_API_KEY -v /tmp/gh-aw/mcp-payloads:/tmp/gh-aw/mcp-payloads:rw -v /opt:/opt:ro -v /tmp:/tmp:rw -v '"${GITHUB_WORKSPACE}"':'"${GITHUB_WORKSPACE}"':rw ghcr.io/github/gh-aw-mcpg:v0.3.19' mkdir -p /home/runner/.copilot GH_AW_NODE=$(which node 2>/dev/null || command -v node 2>/dev/null || echo node) @@ -727,7 +751,7 @@ jobs: "mcpServers": { "github": { "type": "stdio", - "container": "ghcr.io/github/github-mcp-server:v1.0.3", + "container": "ghcr.io/github/github-mcp-server:v1.0.4", "env": { "GITHUB_HOST": "\${GITHUB_SERVER_URL}", "GITHUB_PERSONAL_ACCESS_TOKEN": "\${GITHUB_MCP_SERVER_TOKEN}", @@ -794,25 +818,32 @@ jobs: timeout-minutes: 60 run: | set -o pipefail + printf '%s' "$(date +%s%3N)" > /tmp/gh-aw/agent_cli_start_ms.txt touch /tmp/gh-aw/agent-step-summary.md GH_AW_NODE_BIN=$(command -v node 2>/dev/null || true) export GH_AW_NODE_BIN + export COPILOT_API_KEY="$COPILOT_DUMMY_BYOK" (umask 177 && touch /tmp/gh-aw/agent-stdio.log) - printf '%s\n' '{"$schema":"https://github.com/github/gh-aw-firewall/releases/download/v0.25.41/awf-config.schema.json","network":{"allowDomains":["*.vsblob.vsassets.io","api.business.githubcopilot.com","api.enterprise.githubcopilot.com","api.github.com","api.githubcopilot.com","api.individual.githubcopilot.com","api.nuget.org","api.snapcraft.io","archive.ubuntu.com","azure.archive.ubuntu.com","azuresearch-usnc.nuget.org","azuresearch-ussc.nuget.org","builds.dotnet.microsoft.com","ci.dot.net","crl.geotrust.com","crl.globalsign.com","crl.identrust.com","crl.sectigo.com","crl.thawte.com","crl.usertrust.com","crl.verisign.com","crl3.digicert.com","crl4.digicert.com","crls.ssl.com","dc.services.visualstudio.com","dev.azure.com","dist.nuget.org","dot.net","dotnet.microsoft.com","dotnetcli.blob.core.windows.net","github.com","host.docker.internal","json-schema.org","json.schemastore.org","keyserver.ubuntu.com","nuget.org","nuget.pkg.github.com","nugetregistryv2prod.blob.core.windows.net","ocsp.digicert.com","ocsp.geotrust.com","ocsp.globalsign.com","ocsp.identrust.com","ocsp.sectigo.com","ocsp.ssl.com","ocsp.thawte.com","ocsp.usertrust.com","ocsp.verisign.com","oneocsp.microsoft.com","packagecloud.io","packages.cloud.google.com","packages.microsoft.com","pkgs.dev.azure.com","ppa.launchpad.net","raw.githubusercontent.com","registry.npmjs.org","s.symcb.com","s.symcd.com","security.ubuntu.com","telemetry.enterprise.githubcopilot.com","ts-crl.ws.symantec.com","ts-ocsp.ws.symantec.com","www.googleapis.com","www.microsoft.com"]},"apiProxy":{"enabled":true,"models":{"auto":["large"],"deep-research":["copilot/deep-research*","copilot/o3-deep-research*","copilot/o4-mini-deep-research*","google/deep-research*","openai/o3-deep-research*","openai/o4-mini-deep-research*"],"gemini-flash":["copilot/gemini-*flash*","google/gemini-*flash*"],"gemini-pro":["copilot/gemini-*pro*","google/gemini-*pro*"],"gpt-4.1":["copilot/gpt-4.1*","openai/gpt-4.1*"],"gpt-5":["copilot/gpt-5*","openai/gpt-5*"],"gpt-5-codex":["copilot/gpt-5*codex*","openai/gpt-5*codex*"],"gpt-5-mini":["copilot/gpt-5*mini*","openai/gpt-5*mini*"],"gpt-5-nano":["copilot/gpt-5*nano*","openai/gpt-5*nano*"],"gpt-5-pro":["copilot/gpt-5*pro*","openai/gpt-5*pro*"],"haiku":["copilot/*haiku*","anthropic/*haiku*"],"large":["sonnet","gpt-5-pro","gpt-5","gemini-pro"],"mini":["haiku","gpt-5-mini","gpt-5-nano","gemini-flash"],"opus":["copilot/*opus*","anthropic/*opus*"],"reasoning":["copilot/o1*","copilot/o3*","copilot/o4*","openai/o1*","openai/o3*","openai/o4*"],"small":["mini"],"sonnet":["copilot/*sonnet*","anthropic/*sonnet*"]}},"container":{"imageTag":"0.25.41"}}' > "${RUNNER_TEMP}/gh-aw/awf-config.json" && cp "${RUNNER_TEMP}/gh-aw/awf-config.json" /tmp/gh-aw/awf-config.json + printf '%s\n' '{"$schema":"https://github.com/github/gh-aw-firewall/releases/download/v0.25.55/awf-config.schema.json","network":{"allowDomains":["*.vsblob.vsassets.io","api.business.githubcopilot.com","api.enterprise.githubcopilot.com","api.github.com","api.githubcopilot.com","api.individual.githubcopilot.com","api.nuget.org","api.snapcraft.io","archive.ubuntu.com","azure.archive.ubuntu.com","azuresearch-usnc.nuget.org","azuresearch-ussc.nuget.org","builds.dotnet.microsoft.com","ci.dot.net","crl.geotrust.com","crl.globalsign.com","crl.identrust.com","crl.sectigo.com","crl.thawte.com","crl.usertrust.com","crl.verisign.com","crl3.digicert.com","crl4.digicert.com","crls.ssl.com","dc.services.visualstudio.com","dev.azure.com","dist.nuget.org","dot.net","dotnet.microsoft.com","dotnetcli.blob.core.windows.net","github.com","host.docker.internal","json-schema.org","json.schemastore.org","keyserver.ubuntu.com","nuget.org","nuget.pkg.github.com","nugetregistryv2prod.blob.core.windows.net","ocsp.digicert.com","ocsp.geotrust.com","ocsp.globalsign.com","ocsp.identrust.com","ocsp.sectigo.com","ocsp.ssl.com","ocsp.thawte.com","ocsp.usertrust.com","ocsp.verisign.com","oneocsp.microsoft.com","packagecloud.io","packages.cloud.google.com","packages.microsoft.com","pkgs.dev.azure.com","ppa.launchpad.net","raw.githubusercontent.com","registry.npmjs.org","s.symcb.com","s.symcd.com","security.ubuntu.com","telemetry.enterprise.githubcopilot.com","ts-crl.ws.symantec.com","ts-ocsp.ws.symantec.com","www.googleapis.com","www.microsoft.com"]},"apiProxy":{"enabled":true,"enableTokenSteering":true,"maxRuns":500,"maxEffectiveTokens":25000000,"models":{"agent":["sonnet-6x","gpt-5.4","gpt-5.3","gemini-pro","any"],"antigravity":["copilot/antigravity*","google/antigravity*","gemini/antigravity*"],"any":["copilot/*","anthropic/*","openai/*","google/*","gemini/*"],"claude":["agent"],"codex":["agent"],"coding":["copilot/gpt-5*codex*","openai/gpt-5*codex*","gpt-5-codex"],"computer-use":["copilot/*computer-use*","google/*computer-use*","gemini/*computer-use*","openai/*computer-use*"],"copilot":["agent"],"deep-research":["copilot/deep-research*","copilot/o3-deep-research*","copilot/o4-mini-deep-research*","google/deep-research*","gemini/deep-research*","openai/o3-deep-research*","openai/o4-mini-deep-research*"],"gemini":["agent"],"gemini-3-flash":["copilot/gemini-3*flash*","google/gemini-3*flash*","gemini/gemini-3*flash*"],"gemini-3-pro":["copilot/gemini-3*pro*","google/gemini-3*pro*","gemini/gemini-3*pro*"],"gemini-3.1-flash":["copilot/gemini-3.1*flash*","google/gemini-3.1*flash*","gemini/gemini-3.1*flash*"],"gemini-3.1-pro":["copilot/gemini-3.1*pro*","google/gemini-3.1*pro*","gemini/gemini-3.1*pro*"],"gemini-3.5-flash":["copilot/gemini-3.5*flash*","google/gemini-3.5*flash*","gemini/gemini-3.5*flash*"],"gemini-flash":["copilot/gemini-*flash*","google/gemini-*flash*","gemini/gemini-*flash*"],"gemini-flash-lite":["copilot/gemini-*flash*lite*","google/gemini-*flash*lite*","gemini/gemini-*flash*lite*"],"gemini-pro":["copilot/gemini-*pro*","google/gemini-*pro*","gemini/gemini-*pro*"],"gemma":["copilot/gemma*","google/gemma*","gemini/gemma*"],"gpt-4.1":["copilot/gpt-4.1*","openai/gpt-4.1*"],"gpt-5":["copilot/gpt-5*","openai/gpt-5*"],"gpt-5-codex":["copilot/gpt-5*codex*","openai/gpt-5*codex*"],"gpt-5-mini":["copilot/gpt-5*mini*","openai/gpt-5*mini*"],"gpt-5-nano":["copilot/gpt-5*nano*","openai/gpt-5*nano*"],"gpt-5-pro":["copilot/gpt-5*pro*","openai/gpt-5*pro*"],"gpt-5.2":["copilot/gpt-5.2*","openai/gpt-5.2*"],"gpt-5.3":["copilot/gpt-5.3*","openai/gpt-5.3*"],"gpt-5.4":["copilot/gpt-5.4*","openai/gpt-5.4*"],"gpt-5.5":["copilot/gpt-5.5*","openai/gpt-5.5*"],"haiku":["copilot/*haiku*","anthropic/*haiku*"],"large":["sonnet","gpt-5-pro","gpt-5","gemini-pro"],"mini":["haiku","gpt-5-mini","gpt-5-nano","gemini-flash-lite"],"opus":["copilot/*opus*","anthropic/*opus*"],"opusplan":["opus?effort=high"],"reasoning":["copilot/o1*","copilot/o3*","copilot/o4*","openai/o1*","openai/o3*","openai/o4*"],"robotics":["copilot/*robotics*","google/*robotics*","gemini/*robotics*"],"small":["mini"],"sonnet":["copilot/*sonnet*","anthropic/*sonnet*"],"sonnet-6x":["copilot/*sonnet-4-5-*","anthropic/*sonnet-4-5-*","copilot/*sonnet-4-6*","anthropic/*sonnet-4-6*"],"summarization":["haiku","gpt-5-mini","gemini-flash-lite","mini"],"vision":["copilot/gemini-*image*","gemini/gemini-*image*","copilot/gemini-*flash*","gemini/gemini-*flash*"]}},"container":{"imageTag":"0.25.55"}}' > "${RUNNER_TEMP}/gh-aw/awf-config.json" + cp "${RUNNER_TEMP}/gh-aw/awf-config.json" /tmp/gh-aw/awf-config.json + GH_AW_DOCKER_HOST_PATH_PREFIX_ARGS="" + if [[ "${DOCKER_HOST:-}" =~ ^tcp:// ]]; then + GH_AW_DOCKER_HOST_PATH_PREFIX_ARGS="--docker-host-path-prefix /tmp/gh-aw" + fi # shellcheck disable=SC1003 - sudo -E awf --config "${RUNNER_TEMP}/gh-aw/awf-config.json" --container-workdir "${GITHUB_WORKSPACE}" --mount "${RUNNER_TEMP}/gh-aw:${RUNNER_TEMP}/gh-aw:ro" --mount "${RUNNER_TEMP}/gh-aw:/host${RUNNER_TEMP}/gh-aw:ro" --env-all --exclude-env COPILOT_GITHUB_TOKEN --exclude-env GITHUB_MCP_SERVER_TOKEN --exclude-env MCP_GATEWAY_API_KEY --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --audit-dir /tmp/gh-aw/sandbox/firewall/audit --enable-host-access --allow-host-ports 80,443,8080 --skip-pull \ - -- /bin/bash -c 'export PATH="${RUNNER_TEMP}/gh-aw/mcp-cli/bin:$PATH" && export PATH="$(find /opt/hostedtoolcache /home/runner/work/_tool -maxdepth 4 -type d -name bin 2>/dev/null | tr '\''\n'\'' '\'':'\'')$PATH"; [ -n "$GOROOT" ] && export PATH="$GOROOT/bin:$PATH" || true && GH_AW_NODE_EXEC="${GH_AW_NODE_BIN:-}"; if [ -z "$GH_AW_NODE_EXEC" ] || [ ! -x "$GH_AW_NODE_EXEC" ]; then GH_AW_NODE_EXEC="$(command -v node 2>/dev/null || echo node)"; fi; "$GH_AW_NODE_EXEC" ${RUNNER_TEMP}/gh-aw/actions/copilot_harness.cjs /usr/local/bin/copilot --add-dir /tmp/gh-aw/ --log-level all --log-dir /tmp/gh-aw/sandbox/agent/logs/ --disable-builtin-mcps --no-ask-user --allow-all-tools --allow-all-paths --add-dir "${GITHUB_WORKSPACE}" --prompt-file /tmp/gh-aw/aw-prompts/prompt.txt' 2>&1 | tee -a /tmp/gh-aw/agent-stdio.log + sudo -E awf --config "${RUNNER_TEMP}/gh-aw/awf-config.json" --container-workdir "${GITHUB_WORKSPACE}" --mount "${RUNNER_TEMP}/gh-aw:${RUNNER_TEMP}/gh-aw:ro" --mount "${RUNNER_TEMP}/gh-aw:/host${RUNNER_TEMP}/gh-aw:ro" ${GH_AW_DOCKER_HOST_PATH_PREFIX_ARGS} --env-all --exclude-env COPILOT_GITHUB_TOKEN --exclude-env GITHUB_MCP_SERVER_TOKEN --exclude-env MCP_GATEWAY_API_KEY --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --audit-dir /tmp/gh-aw/sandbox/firewall/audit --enable-host-access --allow-host-ports 80,443,8080 --skip-pull \ + -- /bin/bash -c 'export PATH="${RUNNER_TEMP}/gh-aw/mcp-cli/bin:$PATH" && export PATH="$(find /opt/hostedtoolcache /home/runner/work/_tool -maxdepth 5 -type d -name bin 2>/dev/null | tr '\''\n'\'' '\'':'\'')$PATH"; [ -n "$GOROOT" ] && export PATH="$GOROOT/bin:$PATH" || true && GH_AW_NODE_EXEC="${GH_AW_NODE_BIN:-}"; if [ -z "$GH_AW_NODE_EXEC" ] || [ ! -x "$GH_AW_NODE_EXEC" ]; then GH_AW_NODE_EXEC="$(command -v node 2>/dev/null || true)"; fi; if [ -z "$GH_AW_NODE_EXEC" ]; then echo "node runtime missing on this runner — check runtimes.node in workflow YAML" >&2; exit 127; fi; "$GH_AW_NODE_EXEC" ${RUNNER_TEMP}/gh-aw/actions/copilot_harness.cjs /usr/local/bin/copilot --add-dir /tmp/gh-aw/ --log-level all --log-dir /tmp/gh-aw/sandbox/agent/logs/ --disable-builtin-mcps --no-ask-user --allow-all-tools --allow-all-paths --add-dir "${GITHUB_WORKSPACE}" --prompt-file /tmp/gh-aw/aw-prompts/prompt.txt' 2>&1 | tee -a /tmp/gh-aw/agent-stdio.log env: AWF_REFLECT_ENABLED: 1 COPILOT_AGENT_RUNNER_TYPE: STANDALONE - COPILOT_API_KEY: dummy-byok-key-for-offline-mode + COPILOT_DUMMY_BYOK: dummy-byok-key-for-offline-mode COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }} COPILOT_MODEL: ${{ vars.GH_AW_MODEL_AGENT_COPILOT || 'claude-sonnet-4.6' }} GH_AW_MCP_CONFIG: /home/runner/.copilot/mcp-config.json GH_AW_PHASE: agent GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt GH_AW_SAFE_OUTPUTS: ${{ steps.set-runtime-paths.outputs.GH_AW_SAFE_OUTPUTS }} - GH_AW_VERSION: v0.72.1 + GH_AW_VERSION: v0.76.1 GITHUB_API_URL: ${{ github.api_url }} GITHUB_AW: true GITHUB_COPILOT_INTEGRATION_ID: agentic-workflows @@ -827,11 +858,11 @@ jobs: GIT_COMMITTER_EMAIL: github-actions[bot]@users.noreply.github.com GIT_COMMITTER_NAME: github-actions[bot] XDG_CONFIG_HOME: /home/runner - - name: Detect Copilot errors - id: detect-copilot-errors + - name: Detect agent errors if: always() + id: detect-agent-errors continue-on-error: true - run: node "${RUNNER_TEMP}/gh-aw/actions/detect_copilot_errors.cjs" + run: node "${RUNNER_TEMP}/gh-aw/actions/detect_agent_errors.cjs" - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -1006,6 +1037,7 @@ jobs: concurrency: group: "gh-aw-conclusion-labelops-flake-fix" cancel-in-progress: false + queue: max outputs: incomplete_count: ${{ steps.report_incomplete.outputs.incomplete_count }} noop_message: ${{ steps.noop.outputs.noop_message }} @@ -1014,15 +1046,18 @@ jobs: steps: - name: Setup Scripts id: setup - uses: github/gh-aw-actions/setup@bc56a0cad2f450c562810785ef38649c04db812a # v0.72.1 + uses: github/gh-aw-actions/setup@46d564922b082d0db93244972e8005ea6904ee5f # v0.76.1 with: destination: ${{ runner.temp }}/gh-aw/actions job-name: ${{ github.job }} trace-id: ${{ needs.activation.outputs.setup-trace-id }} + parent-span-id: ${{ needs.activation.outputs.setup-parent-span-id || needs.activation.outputs.setup-span-id }} env: GH_AW_SETUP_WORKFLOW_NAME: "LabelOps — Flake Fixer" GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/labelops-flake-fix.lock.yml@${{ github.ref }} - GH_AW_INFO_VERSION: "1.0.40" + GH_AW_INFO_VERSION: "1.0.52" + GH_AW_INFO_AWF_VERSION: "v0.25.55" + GH_AW_INFO_ENGINE_ID: "copilot" - name: Download agent output artifact id: download-agent-output continue-on-error: true @@ -1044,6 +1079,7 @@ jobs: GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }} GH_AW_NOOP_MAX: "1" GH_AW_WORKFLOW_NAME: "LabelOps — Flake Fixer" + GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/labelops-flake-fix.md" GH_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} GH_AW_AGENT_CONCLUSION: ${{ needs.agent.result }} GH_AW_NOOP_REPORT_AS_ISSUE: "true" @@ -1060,6 +1096,7 @@ jobs: env: GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }} GH_AW_WORKFLOW_NAME: "LabelOps — Flake Fixer" + GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/labelops-flake-fix.md" GH_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} GH_AW_DETECTION_CONCLUSION: ${{ needs.detection.outputs.detection_conclusion }} GH_AW_DETECTION_REASON: ${{ needs.detection.outputs.detection_reason }} @@ -1077,6 +1114,7 @@ jobs: GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }} GH_AW_MISSING_TOOL_CREATE_ISSUE: "true" GH_AW_WORKFLOW_NAME: "LabelOps — Flake Fixer" + GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/labelops-flake-fix.md" with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} script: | @@ -1091,6 +1129,7 @@ jobs: GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }} GH_AW_REPORT_INCOMPLETE_CREATE_ISSUE: "true" GH_AW_WORKFLOW_NAME: "LabelOps — Flake Fixer" + GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/labelops-flake-fix.md" with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} script: | @@ -1105,6 +1144,7 @@ jobs: env: GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }} GH_AW_WORKFLOW_NAME: "LabelOps — Flake Fixer" + GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/labelops-flake-fix.md" GH_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} GH_AW_AGENT_CONCLUSION: ${{ needs.agent.result }} GH_AW_WORKFLOW_ID: "labelops-flake-fix" @@ -1112,6 +1152,8 @@ jobs: GH_AW_ENGINE_ID: "copilot" GH_AW_SECRET_VERIFICATION_RESULT: ${{ needs.activation.outputs.secret_verification_result }} GH_AW_CHECKOUT_PR_SUCCESS: ${{ needs.agent.outputs.checkout_pr_success }} + GH_AW_EFFECTIVE_TOKENS: ${{ needs.agent.outputs.effective_tokens || '' }} + GH_AW_EFFECTIVE_TOKENS_RATE_LIMIT_ERROR: ${{ needs.agent.outputs.effective_tokens_rate_limit_error || 'false' }} GH_AW_INFERENCE_ACCESS_ERROR: ${{ needs.agent.outputs.inference_access_error }} GH_AW_MCP_POLICY_ERROR: ${{ needs.agent.outputs.mcp_policy_error }} GH_AW_AGENTIC_ENGINE_TIMEOUT: ${{ needs.agent.outputs.agentic_engine_timeout }} @@ -1126,6 +1168,7 @@ jobs: GH_AW_MISSING_TOOL_REPORT_AS_FAILURE: "true" GH_AW_MISSING_DATA_REPORT_AS_FAILURE: "true" GH_AW_TIMEOUT_MINUTES: "60" + GH_AW_MAX_EFFECTIVE_TOKENS: "25000000" with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} script: | @@ -1150,15 +1193,18 @@ jobs: steps: - name: Setup Scripts id: setup - uses: github/gh-aw-actions/setup@bc56a0cad2f450c562810785ef38649c04db812a # v0.72.1 + uses: github/gh-aw-actions/setup@46d564922b082d0db93244972e8005ea6904ee5f # v0.76.1 with: destination: ${{ runner.temp }}/gh-aw/actions job-name: ${{ github.job }} trace-id: ${{ needs.activation.outputs.setup-trace-id }} + parent-span-id: ${{ needs.activation.outputs.setup-parent-span-id || needs.activation.outputs.setup-span-id }} env: GH_AW_SETUP_WORKFLOW_NAME: "LabelOps — Flake Fixer" GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/labelops-flake-fix.lock.yml@${{ github.ref }} - GH_AW_INFO_VERSION: "1.0.40" + GH_AW_INFO_VERSION: "1.0.52" + GH_AW_INFO_AWF_VERSION: "v0.25.55" + GH_AW_INFO_ENGINE_ID: "copilot" - name: Download agent output artifact id: download-agent-output continue-on-error: true @@ -1184,7 +1230,7 @@ jobs: rm -rf /tmp/gh-aw/sandbox/firewall/logs rm -rf /tmp/gh-aw/sandbox/firewall/audit - name: Download container images - run: bash "${RUNNER_TEMP}/gh-aw/actions/download_docker_images.sh" ghcr.io/github/gh-aw-firewall/agent:0.25.41 ghcr.io/github/gh-aw-firewall/api-proxy:0.25.41 ghcr.io/github/gh-aw-firewall/squid:0.25.41 + run: bash "${RUNNER_TEMP}/gh-aw/actions/download_docker_images.sh" ghcr.io/github/gh-aw-firewall/agent:0.25.55 ghcr.io/github/gh-aw-firewall/api-proxy:0.25.55 ghcr.io/github/gh-aw-firewall/squid:0.25.55 - name: Check if detection needed id: detection_guard if: always() @@ -1243,11 +1289,11 @@ jobs: node-version: '24' package-manager-cache: false - name: Install GitHub Copilot CLI - run: bash "${RUNNER_TEMP}/gh-aw/actions/install_copilot_cli.sh" 1.0.40 + run: bash "${RUNNER_TEMP}/gh-aw/actions/install_copilot_cli.sh" 1.0.52 env: GH_HOST: github.com - name: Install AWF binary - run: bash "${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh" v0.25.41 + run: bash "${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh" v0.25.55 - name: Execute GitHub Copilot CLI if: always() && steps.detection_guard.outputs.run_detection == 'true' continue-on-error: true @@ -1256,23 +1302,30 @@ jobs: timeout-minutes: 20 run: | set -o pipefail + printf '%s' "$(date +%s%3N)" > /tmp/gh-aw/agent_cli_start_ms.txt touch /tmp/gh-aw/agent-step-summary.md GH_AW_NODE_BIN=$(command -v node 2>/dev/null || true) export GH_AW_NODE_BIN + export COPILOT_API_KEY="$COPILOT_DUMMY_BYOK" (umask 177 && touch /tmp/gh-aw/threat-detection/detection.log) - printf '%s\n' '{"$schema":"https://github.com/github/gh-aw-firewall/releases/download/v0.25.41/awf-config.schema.json","network":{"allowDomains":["api.business.githubcopilot.com","api.enterprise.githubcopilot.com","api.github.com","api.githubcopilot.com","api.individual.githubcopilot.com","github.com","host.docker.internal","telemetry.enterprise.githubcopilot.com"]},"apiProxy":{"enabled":true},"container":{"imageTag":"0.25.41"}}' > "${RUNNER_TEMP}/gh-aw/awf-config.json" && cp "${RUNNER_TEMP}/gh-aw/awf-config.json" /tmp/gh-aw/awf-config.json + printf '%s\n' '{"$schema":"https://github.com/github/gh-aw-firewall/releases/download/v0.25.55/awf-config.schema.json","network":{"allowDomains":["api.business.githubcopilot.com","api.enterprise.githubcopilot.com","api.github.com","api.githubcopilot.com","api.individual.githubcopilot.com","github.com","host.docker.internal","telemetry.enterprise.githubcopilot.com"]},"apiProxy":{"enabled":true,"enableTokenSteering":true,"maxRuns":500,"maxEffectiveTokens":25000000},"container":{"imageTag":"0.25.55"}}' > "${RUNNER_TEMP}/gh-aw/awf-config.json" + cp "${RUNNER_TEMP}/gh-aw/awf-config.json" /tmp/gh-aw/awf-config.json + GH_AW_DOCKER_HOST_PATH_PREFIX_ARGS="" + if [[ "${DOCKER_HOST:-}" =~ ^tcp:// ]]; then + GH_AW_DOCKER_HOST_PATH_PREFIX_ARGS="--docker-host-path-prefix /tmp/gh-aw" + fi # shellcheck disable=SC1003 - sudo -E awf --config "${RUNNER_TEMP}/gh-aw/awf-config.json" --container-workdir "${GITHUB_WORKSPACE}" --mount "${RUNNER_TEMP}/gh-aw:${RUNNER_TEMP}/gh-aw:ro" --mount "${RUNNER_TEMP}/gh-aw:/host${RUNNER_TEMP}/gh-aw:ro" --env-all --exclude-env COPILOT_GITHUB_TOKEN --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --audit-dir /tmp/gh-aw/sandbox/firewall/audit --enable-host-access --allow-host-ports 80,443,8080 --skip-pull \ - -- /bin/bash -c 'export PATH="$(find /opt/hostedtoolcache /home/runner/work/_tool -maxdepth 4 -type d -name bin 2>/dev/null | tr '\''\n'\'' '\'':'\'')$PATH"; [ -n "$GOROOT" ] && export PATH="$GOROOT/bin:$PATH" || true && GH_AW_NODE_EXEC="${GH_AW_NODE_BIN:-}"; if [ -z "$GH_AW_NODE_EXEC" ] || [ ! -x "$GH_AW_NODE_EXEC" ]; then GH_AW_NODE_EXEC="$(command -v node 2>/dev/null || echo node)"; fi; "$GH_AW_NODE_EXEC" ${RUNNER_TEMP}/gh-aw/actions/copilot_harness.cjs /usr/local/bin/copilot --add-dir /tmp/gh-aw/ --log-level all --log-dir /tmp/gh-aw/sandbox/agent/logs/ --disable-builtin-mcps --no-ask-user --allow-all-tools --add-dir "${GITHUB_WORKSPACE}" --prompt-file /tmp/gh-aw/aw-prompts/prompt.txt' 2>&1 | tee -a /tmp/gh-aw/threat-detection/detection.log + sudo -E awf --config "${RUNNER_TEMP}/gh-aw/awf-config.json" --container-workdir "${GITHUB_WORKSPACE}" --mount "${RUNNER_TEMP}/gh-aw:${RUNNER_TEMP}/gh-aw:ro" --mount "${RUNNER_TEMP}/gh-aw:/host${RUNNER_TEMP}/gh-aw:ro" ${GH_AW_DOCKER_HOST_PATH_PREFIX_ARGS} --env-all --exclude-env COPILOT_GITHUB_TOKEN --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --audit-dir /tmp/gh-aw/sandbox/firewall/audit --enable-host-access --allow-host-ports 80,443,8080 --skip-pull \ + -- /bin/bash -c 'export PATH="$(find /opt/hostedtoolcache /home/runner/work/_tool -maxdepth 5 -type d -name bin 2>/dev/null | tr '\''\n'\'' '\'':'\'')$PATH"; [ -n "$GOROOT" ] && export PATH="$GOROOT/bin:$PATH" || true && GH_AW_NODE_EXEC="${GH_AW_NODE_BIN:-}"; if [ -z "$GH_AW_NODE_EXEC" ] || [ ! -x "$GH_AW_NODE_EXEC" ]; then GH_AW_NODE_EXEC="$(command -v node 2>/dev/null || true)"; fi; if [ -z "$GH_AW_NODE_EXEC" ]; then echo "node runtime missing on this runner — check runtimes.node in workflow YAML" >&2; exit 127; fi; "$GH_AW_NODE_EXEC" ${RUNNER_TEMP}/gh-aw/actions/copilot_harness.cjs /usr/local/bin/copilot --add-dir /tmp/gh-aw/ --log-level all --log-dir /tmp/gh-aw/sandbox/agent/logs/ --disable-builtin-mcps --no-ask-user --allow-all-tools --add-dir "${GITHUB_WORKSPACE}" --prompt-file /tmp/gh-aw/aw-prompts/prompt.txt' 2>&1 | tee -a /tmp/gh-aw/threat-detection/detection.log env: AWF_REFLECT_ENABLED: 1 COPILOT_AGENT_RUNNER_TYPE: STANDALONE - COPILOT_API_KEY: dummy-byok-key-for-offline-mode + COPILOT_DUMMY_BYOK: dummy-byok-key-for-offline-mode COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }} COPILOT_MODEL: ${{ vars.GH_AW_MODEL_DETECTION_COPILOT || 'claude-sonnet-4.6' }} GH_AW_PHASE: detection GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt - GH_AW_VERSION: v0.72.1 + GH_AW_VERSION: v0.76.1 GITHUB_API_URL: ${{ github.api_url }} GITHUB_AW: true GITHUB_COPILOT_INTEGRATION_ID: agentic-workflows @@ -1300,6 +1353,7 @@ jobs: uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: RUN_DETECTION: ${{ steps.detection_guard.outputs.run_detection }} + DETECTION_AGENTIC_EXECUTION_OUTCOME: ${{ steps.detection_agentic_execution.outcome }} GH_AW_DETECTION_CONTINUE_ON_ERROR: "true" with: script: | @@ -1310,10 +1364,11 @@ jobs: await main(); } catch (loadErr) { const continueOnError = process.env.GH_AW_DETECTION_CONTINUE_ON_ERROR !== 'false'; + const detectionExecutionFailed = process.env.DETECTION_AGENTIC_EXECUTION_OUTCOME === 'failure'; const msg = 'ERR_SYSTEM: \u274C Unexpected error loading threat detection module: ' + (loadErr && loadErr.message ? loadErr.message : String(loadErr)); core.error(msg); core.setOutput('reason', 'parse_error'); - if (continueOnError) { + if (continueOnError && !detectionExecutionFailed) { core.warning('\u26A0\uFE0F ' + msg); core.setOutput('conclusion', 'warning'); core.setOutput('success', 'false'); @@ -1344,9 +1399,10 @@ jobs: GH_AW_EFFECTIVE_TOKENS: ${{ needs.agent.outputs.effective_tokens }} GH_AW_ENGINE_ID: "copilot" GH_AW_ENGINE_MODEL: ${{ needs.agent.outputs.model }} - GH_AW_ENGINE_VERSION: "1.0.40" + GH_AW_ENGINE_VERSION: "1.0.52" GH_AW_WORKFLOW_ID: "labelops-flake-fix" GH_AW_WORKFLOW_NAME: "LabelOps — Flake Fixer" + GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/labelops-flake-fix.md" outputs: code_push_failure_count: ${{ steps.process_safe_outputs.outputs.code_push_failure_count }} code_push_failure_errors: ${{ steps.process_safe_outputs.outputs.code_push_failure_errors }} @@ -1363,15 +1419,18 @@ jobs: steps: - name: Setup Scripts id: setup - uses: github/gh-aw-actions/setup@bc56a0cad2f450c562810785ef38649c04db812a # v0.72.1 + uses: github/gh-aw-actions/setup@46d564922b082d0db93244972e8005ea6904ee5f # v0.76.1 with: destination: ${{ runner.temp }}/gh-aw/actions job-name: ${{ github.job }} trace-id: ${{ needs.activation.outputs.setup-trace-id }} + parent-span-id: ${{ needs.activation.outputs.setup-parent-span-id || needs.activation.outputs.setup-span-id }} env: GH_AW_SETUP_WORKFLOW_NAME: "LabelOps — Flake Fixer" GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/labelops-flake-fix.lock.yml@${{ github.ref }} - GH_AW_INFO_VERSION: "1.0.40" + GH_AW_INFO_VERSION: "1.0.52" + GH_AW_INFO_AWF_VERSION: "v0.25.55" + GH_AW_INFO_ENGINE_ID: "copilot" - name: Download agent output artifact id: download-agent-output continue-on-error: true @@ -1415,14 +1474,22 @@ jobs: echo "Extracted base branch from safe output: $BASE_BRANCH" fi fi + - name: Checkout repository (trusted default branch for comment events) + if: (!cancelled()) && needs.agent.result != 'skipped' && contains(needs.agent.outputs.output_types, 'create_pull_request') && (github.event_name == 'issue_comment' || github.event_name == 'pull_request_review_comment') + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + ref: ${{ github.event.repository.default_branch }} + token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} + persist-credentials: false + fetch-depth: 0 - name: Checkout repository - if: (!cancelled()) && needs.agent.result != 'skipped' && contains(needs.agent.outputs.output_types, 'create_pull_request') + if: (!cancelled()) && needs.agent.result != 'skipped' && contains(needs.agent.outputs.output_types, 'create_pull_request') && github.event_name != 'issue_comment' && github.event_name != 'pull_request_review_comment' uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: ref: ${{ steps.extract-base-branch.outputs.base-branch || github.base_ref || github.event.pull_request.base.ref || github.ref_name || github.event.repository.default_branch }} token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} persist-credentials: false - fetch-depth: 1 + fetch-depth: 0 - name: Configure Git credentials if: (!cancelled()) && needs.agent.result != 'skipped' && contains(needs.agent.outputs.output_types, 'create_pull_request') env: @@ -1451,6 +1518,7 @@ jobs: uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }} + GH_AW_COMMENT_ID: ${{ needs.activation.outputs.comment_id }} GH_AW_ALLOWED_DOMAINS: "*.vsblob.vsassets.io,api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.nuget.org,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,azuresearch-usnc.nuget.org,azuresearch-ussc.nuget.org,builds.dotnet.microsoft.com,ci.dot.net,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,dc.services.visualstudio.com,dev.azure.com,dist.nuget.org,dot.net,dotnet.microsoft.com,dotnetcli.blob.core.windows.net,github.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,nuget.org,nuget.pkg.github.com,nugetregistryv2prod.blob.core.windows.net,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,oneocsp.microsoft.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,pkgs.dev.azure.com,ppa.launchpad.net,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com,www.googleapis.com,www.microsoft.com" GITHUB_SERVER_URL: ${{ github.server_url }} GITHUB_API_URL: ${{ github.api_url }} diff --git a/.github/workflows/labelops-pr-maintenance.lock.yml b/.github/workflows/labelops-pr-maintenance.lock.yml index bc69a47da5b..597daed2681 100644 --- a/.github/workflows/labelops-pr-maintenance.lock.yml +++ b/.github/workflows/labelops-pr-maintenance.lock.yml @@ -1,5 +1,5 @@ -# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"6ea17bdbe818e2f36b27d8a7d5320b7f9ce64f2f959116b09bb01401bece519a","compiler_version":"v0.74.8","strict":true,"agent_id":"copilot"} -# gh-aw-manifest: {"version":1,"secrets":["COPILOT_GITHUB_TOKEN","GH_AW_CI_TRIGGER_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/checkout","sha":"de0fac2e4500dabe0009e67214ff5f5447ce83dd","version":"v6.0.2"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/setup-node","sha":"48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e","version":"v6.4.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"},{"repo":"github/gh-aw-actions/setup","sha":"efa55847f72aadb03490d955263ff911bf758700","version":"v0.74.8"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.25.49"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.49"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.25.49"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.3.9","digest":"sha256:64828b42a4482f58fab16509d7f8f495a6d97c972a98a68aff20543531ac0388","pinned_image":"ghcr.io/github/gh-aw-mcpg:v0.3.9@sha256:64828b42a4482f58fab16509d7f8f495a6d97c972a98a68aff20543531ac0388"},{"image":"ghcr.io/github/github-mcp-server:v1.0.4"},{"image":"node:lts-alpine","digest":"sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f","pinned_image":"node:lts-alpine@sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f"}]} +# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"6ea17bdbe818e2f36b27d8a7d5320b7f9ce64f2f959116b09bb01401bece519a","compiler_version":"v0.76.1","strict":true,"agent_id":"copilot"} +# gh-aw-manifest: {"version":1,"secrets":["COPILOT_GITHUB_TOKEN","GH_AW_CI_TRIGGER_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/checkout","sha":"de0fac2e4500dabe0009e67214ff5f5447ce83dd","version":"v6.0.2"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/setup-node","sha":"48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e","version":"v6.4.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"},{"repo":"github/gh-aw-actions/setup","sha":"46d564922b082d0db93244972e8005ea6904ee5f","version":"v0.76.1"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.25.55"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.55"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.25.55"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.3.19"},{"image":"ghcr.io/github/github-mcp-server:v1.0.4","digest":"sha256:e3816a476a977cfb836e7d221510011436c654d11861db66ecfd826601aba6a4","pinned_image":"ghcr.io/github/github-mcp-server:v1.0.4@sha256:e3816a476a977cfb836e7d221510011436c654d11861db66ecfd826601aba6a4"},{"image":"node:lts-alpine","digest":"sha256:2bdb65ed1dab192432bc31c95f94155ca5ad7fc1392fb7eb7526ab682fa5bf14","pinned_image":"node:lts-alpine@sha256:2bdb65ed1dab192432bc31c95f94155ca5ad7fc1392fb7eb7526ab682fa5bf14"}]} # ___ _ _ # / _ \ | | (_) # | |_| | __ _ ___ _ __ | |_ _ ___ @@ -14,7 +14,7 @@ # \ /\ / (_) | | | | ( | | | | (_) \ V V /\__ \ # \/ \/ \___/|_| |_|\_\|_| |_|\___/ \_/\_/ |___/ # -# This file was automatically generated by gh-aw (v0.74.8). DO NOT EDIT. +# This file was automatically generated by gh-aw (v0.76.1). DO NOT EDIT. # # To update this file, edit the corresponding .md file and run: # gh aw compile @@ -42,15 +42,15 @@ # - actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 # - actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 # - actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 -# - github/gh-aw-actions/setup@efa55847f72aadb03490d955263ff911bf758700 # v0.74.8 +# - github/gh-aw-actions/setup@46d564922b082d0db93244972e8005ea6904ee5f # v0.76.1 # # Container images used: -# - ghcr.io/github/gh-aw-firewall/agent:0.25.49 -# - ghcr.io/github/gh-aw-firewall/api-proxy:0.25.49 -# - ghcr.io/github/gh-aw-firewall/squid:0.25.49 -# - ghcr.io/github/gh-aw-mcpg:v0.3.9@sha256:64828b42a4482f58fab16509d7f8f495a6d97c972a98a68aff20543531ac0388 -# - ghcr.io/github/github-mcp-server:v1.0.4 -# - node:lts-alpine@sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f +# - ghcr.io/github/gh-aw-firewall/agent:0.25.55 +# - ghcr.io/github/gh-aw-firewall/api-proxy:0.25.55 +# - ghcr.io/github/gh-aw-firewall/squid:0.25.55 +# - ghcr.io/github/gh-aw-mcpg:v0.3.19 +# - ghcr.io/github/github-mcp-server:v1.0.4@sha256:e3816a476a977cfb836e7d221510011436c654d11861db66ecfd826601aba6a4 +# - node:lts-alpine@sha256:2bdb65ed1dab192432bc31c95f94155ca5ad7fc1392fb7eb7526ab682fa5bf14 name: "LabelOps — PR Maintenance" on: @@ -93,31 +93,32 @@ jobs: steps: - name: Setup Scripts id: setup - uses: github/gh-aw-actions/setup@efa55847f72aadb03490d955263ff911bf758700 # v0.74.8 + uses: github/gh-aw-actions/setup@46d564922b082d0db93244972e8005ea6904ee5f # v0.76.1 with: destination: ${{ runner.temp }}/gh-aw/actions job-name: ${{ github.job }} env: GH_AW_SETUP_WORKFLOW_NAME: "LabelOps — PR Maintenance" GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/labelops-pr-maintenance.lock.yml@${{ github.ref }} - GH_AW_INFO_VERSION: "1.0.48" + GH_AW_INFO_VERSION: "1.0.52" + GH_AW_INFO_AWF_VERSION: "v0.25.55" GH_AW_INFO_ENGINE_ID: "copilot" - name: Generate agentic run info id: generate_aw_info env: GH_AW_INFO_ENGINE_ID: "copilot" GH_AW_INFO_ENGINE_NAME: "GitHub Copilot CLI" - GH_AW_INFO_MODEL: ${{ vars.GH_AW_MODEL_AGENT_COPILOT || 'claude-sonnet-4.5' }} - GH_AW_INFO_VERSION: "1.0.48" - GH_AW_INFO_AGENT_VERSION: "1.0.48" - GH_AW_INFO_CLI_VERSION: "v0.74.8" + GH_AW_INFO_MODEL: ${{ vars.GH_AW_MODEL_AGENT_COPILOT || 'claude-sonnet-4.6' }} + GH_AW_INFO_VERSION: "1.0.52" + GH_AW_INFO_AGENT_VERSION: "1.0.52" + GH_AW_INFO_CLI_VERSION: "v0.76.1" GH_AW_INFO_WORKFLOW_NAME: "LabelOps — PR Maintenance" GH_AW_INFO_EXPERIMENTAL: "false" GH_AW_INFO_SUPPORTS_TOOLS_ALLOWLIST: "true" GH_AW_INFO_STAGED: "false" GH_AW_INFO_ALLOWED_DOMAINS: '["defaults","dotnet","dev.azure.com"]' GH_AW_INFO_FIREWALL_ENABLED: "true" - GH_AW_INFO_AWF_VERSION: "v0.25.49" + GH_AW_INFO_AWF_VERSION: "v0.25.55" GH_AW_INFO_AWMG_VERSION: "" GH_AW_INFO_FIREWALL_TYPE: "squid" GH_AW_COMPILED_STRICT: "true" @@ -140,6 +141,7 @@ jobs: sparse-checkout: | .github .agents + .antigravity .claude .codex .crush @@ -150,8 +152,8 @@ jobs: fetch-depth: 1 - name: Save agent config folders for base branch restoration env: - GH_AW_AGENT_FOLDERS: ".agents .claude .codex .crush .gemini .github .opencode .pi" - GH_AW_AGENT_FILES: ".crush.json AGENTS.md CLAUDE.md GEMINI.md PI.md opencode.jsonc" + GH_AW_AGENT_FOLDERS: ".agents .antigravity .claude .codex .crush .gemini .github .opencode .pi" + GH_AW_AGENT_FILES: ".crush.json AGENTS.md ANTIGRAVITY.md CLAUDE.md GEMINI.md PI.md opencode.jsonc" # poutine:ignore untrusted_checkout_exec run: bash "${RUNNER_TEMP}/gh-aw/actions/save_base_github_folders.sh" - name: Check workflow lock file @@ -169,7 +171,7 @@ jobs: - name: Check compile-agentic version uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: - GH_AW_COMPILED_VERSION: "v0.74.8" + GH_AW_COMPILED_VERSION: "v0.76.1" with: script: | const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); @@ -317,6 +319,7 @@ jobs: /tmp/gh-aw/github_rate_limits.jsonl /tmp/gh-aw/base /tmp/gh-aw/.github/agents + /tmp/gh-aw/.github/skills if-no-files-found: ignore retention-days: 1 @@ -334,15 +337,15 @@ jobs: GH_AW_MCP_LOG_DIR: /tmp/gh-aw/mcp-logs/safeoutputs GH_AW_WORKFLOW_ID_SANITIZED: labelopsprmaintenance outputs: - agentic_engine_timeout: ${{ steps.detect-copilot-errors.outputs.agentic_engine_timeout || 'false' }} + agentic_engine_timeout: ${{ steps.detect-agent-errors.outputs.agentic_engine_timeout || 'false' }} checkout_pr_success: ${{ steps.checkout-pr.outputs.checkout_pr_success || 'true' }} effective_tokens: ${{ steps.parse-mcp-gateway.outputs.effective_tokens }} effective_tokens_rate_limit_error: ${{ steps.parse-mcp-gateway.outputs.effective_tokens_rate_limit_error || 'false' }} has_patch: ${{ steps.collect_output.outputs.has_patch }} - inference_access_error: ${{ steps.detect-copilot-errors.outputs.inference_access_error || 'false' }} - mcp_policy_error: ${{ steps.detect-copilot-errors.outputs.mcp_policy_error || 'false' }} + inference_access_error: ${{ steps.detect-agent-errors.outputs.inference_access_error || 'false' }} + mcp_policy_error: ${{ steps.detect-agent-errors.outputs.mcp_policy_error || 'false' }} model: ${{ needs.activation.outputs.model }} - model_not_supported_error: ${{ steps.detect-copilot-errors.outputs.model_not_supported_error || 'false' }} + model_not_supported_error: ${{ steps.detect-agent-errors.outputs.model_not_supported_error || 'false' }} output: ${{ steps.collect_output.outputs.output }} output_types: ${{ steps.collect_output.outputs.output_types }} setup-parent-span-id: ${{ steps.setup.outputs.parent-span-id || steps.setup.outputs.span-id }} @@ -351,7 +354,7 @@ jobs: steps: - name: Setup Scripts id: setup - uses: github/gh-aw-actions/setup@efa55847f72aadb03490d955263ff911bf758700 # v0.74.8 + uses: github/gh-aw-actions/setup@46d564922b082d0db93244972e8005ea6904ee5f # v0.76.1 with: destination: ${{ runner.temp }}/gh-aw/actions job-name: ${{ github.job }} @@ -360,7 +363,8 @@ jobs: env: GH_AW_SETUP_WORKFLOW_NAME: "LabelOps — PR Maintenance" GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/labelops-pr-maintenance.lock.yml@${{ github.ref }} - GH_AW_INFO_VERSION: "1.0.48" + GH_AW_INFO_VERSION: "1.0.52" + GH_AW_INFO_AWF_VERSION: "v0.25.55" GH_AW_INFO_ENGINE_ID: "copilot" - name: Set runtime paths id: set-runtime-paths @@ -415,11 +419,11 @@ jobs: const { main } = require('${{ runner.temp }}/gh-aw/actions/checkout_pr_branch.cjs'); await main(); - name: Install GitHub Copilot CLI - run: bash "${RUNNER_TEMP}/gh-aw/actions/install_copilot_cli.sh" 1.0.48 + run: bash "${RUNNER_TEMP}/gh-aw/actions/install_copilot_cli.sh" 1.0.52 env: GH_HOST: github.com - name: Install AWF binary - run: bash "${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh" v0.25.49 + run: bash "${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh" v0.25.55 - name: Parse integrity filter lists id: parse-guard-vars env: @@ -435,16 +439,20 @@ jobs: - name: Restore agent config folders from base branch if: steps.checkout-pr.outcome == 'success' env: - GH_AW_AGENT_FOLDERS: ".agents .claude .codex .crush .gemini .github .opencode .pi" - GH_AW_AGENT_FILES: ".crush.json AGENTS.md CLAUDE.md GEMINI.md PI.md opencode.jsonc" + GH_AW_AGENT_FOLDERS: ".agents .antigravity .claude .codex .crush .gemini .github .opencode .pi" + GH_AW_AGENT_FILES: ".crush.json AGENTS.md ANTIGRAVITY.md CLAUDE.md GEMINI.md PI.md opencode.jsonc" run: bash "${RUNNER_TEMP}/gh-aw/actions/restore_base_github_folders.sh" - name: Restore inline sub-agents from activation artifact env: GH_AW_SUB_AGENT_DIR: ".github/agents" GH_AW_SUB_AGENT_EXT: ".agent.md" run: bash "${RUNNER_TEMP}/gh-aw/actions/restore_inline_sub_agents.sh" + - name: Restore inline skills from activation artifact + env: + GH_AW_SKILL_DIR: ".github/skills" + run: bash "${RUNNER_TEMP}/gh-aw/actions/restore_inline_skills.sh" - name: Download container images - run: bash "${RUNNER_TEMP}/gh-aw/actions/download_docker_images.sh" ghcr.io/github/gh-aw-firewall/agent:0.25.49 ghcr.io/github/gh-aw-firewall/api-proxy:0.25.49 ghcr.io/github/gh-aw-firewall/squid:0.25.49 ghcr.io/github/gh-aw-mcpg:v0.3.9@sha256:64828b42a4482f58fab16509d7f8f495a6d97c972a98a68aff20543531ac0388 ghcr.io/github/github-mcp-server:v1.0.4 node:lts-alpine@sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f + run: bash "${RUNNER_TEMP}/gh-aw/actions/download_docker_images.sh" ghcr.io/github/gh-aw-firewall/agent:0.25.55 ghcr.io/github/gh-aw-firewall/api-proxy:0.25.55 ghcr.io/github/gh-aw-firewall/squid:0.25.55 ghcr.io/github/gh-aw-mcpg:v0.3.19 ghcr.io/github/github-mcp-server:v1.0.4@sha256:e3816a476a977cfb836e7d221510011436c654d11861db66ecfd826601aba6a4 node:lts-alpine@sha256:2bdb65ed1dab192432bc31c95f94155ca5ad7fc1392fb7eb7526ab682fa5bf14 - name: Generate Safe Outputs Config run: | mkdir -p "${RUNNER_TEMP}/gh-aw/safeoutputs" @@ -715,7 +723,7 @@ jobs: * ) DOCKER_SOCK_PATH=/var/run/docker.sock ;; esac DOCKER_SOCK_GID=$(stat -c '%g' "$DOCKER_SOCK_PATH" 2>/dev/null || echo '0') - export MCP_GATEWAY_DOCKER_COMMAND='docker run -i --rm --network host --add-host host.docker.internal:127.0.0.1 --user '"${MCP_GATEWAY_UID}"':'"${MCP_GATEWAY_GID}"' --group-add '"${DOCKER_SOCK_GID}"' -v '"${DOCKER_SOCK_PATH}"':/var/run/docker.sock -e MCP_GATEWAY_PORT -e MCP_GATEWAY_DOMAIN -e MCP_GATEWAY_API_KEY -e MCP_GATEWAY_PAYLOAD_DIR -e MCP_GATEWAY_PAYLOAD_SIZE_THRESHOLD -e DOCKER_HOST=unix:///var/run/docker.sock -e DEBUG -e MCP_GATEWAY_LOG_DIR -e GH_AW_MCP_LOG_DIR -e GH_AW_SAFE_OUTPUTS -e GH_AW_SAFE_OUTPUTS_CONFIG_PATH -e GH_AW_SAFE_OUTPUTS_TOOLS_PATH -e GH_AW_ASSETS_BRANCH -e GH_AW_ASSETS_MAX_SIZE_KB -e GH_AW_ASSETS_ALLOWED_EXTS -e DEFAULT_BRANCH -e GITHUB_MCP_SERVER_TOKEN -e GITHUB_MCP_GUARD_MIN_INTEGRITY -e GITHUB_MCP_GUARD_REPOS -e GITHUB_REPOSITORY -e GITHUB_SERVER_URL -e GITHUB_SHA -e GITHUB_WORKSPACE -e GITHUB_TOKEN -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RUN_ATTEMPT -e GITHUB_JOB -e GITHUB_ACTION -e GITHUB_EVENT_NAME -e GITHUB_EVENT_PATH -e GITHUB_ACTOR -e GITHUB_ACTOR_ID -e GITHUB_TRIGGERING_ACTOR -e GITHUB_WORKFLOW -e GITHUB_WORKFLOW_REF -e GITHUB_WORKFLOW_SHA -e GITHUB_REF -e GITHUB_REF_NAME -e GITHUB_REF_TYPE -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GH_AW_SAFE_OUTPUTS_PORT -e GH_AW_SAFE_OUTPUTS_API_KEY -v /tmp/gh-aw/mcp-payloads:/tmp/gh-aw/mcp-payloads:rw -v /opt:/opt:ro -v /tmp:/tmp:rw -v '"${GITHUB_WORKSPACE}"':'"${GITHUB_WORKSPACE}"':rw ghcr.io/github/gh-aw-mcpg:v0.3.9' + export MCP_GATEWAY_DOCKER_COMMAND='docker run -i --rm --network host --add-host host.docker.internal:127.0.0.1 --user '"${MCP_GATEWAY_UID}"':'"${MCP_GATEWAY_GID}"' --group-add '"${DOCKER_SOCK_GID}"' -v '"${DOCKER_SOCK_PATH}"':/var/run/docker.sock -e MCP_GATEWAY_PORT -e MCP_GATEWAY_DOMAIN -e MCP_GATEWAY_API_KEY -e MCP_GATEWAY_PAYLOAD_DIR -e MCP_GATEWAY_PAYLOAD_SIZE_THRESHOLD -e DOCKER_HOST=unix:///var/run/docker.sock -e DEBUG -e MCP_GATEWAY_LOG_DIR -e GH_AW_MCP_LOG_DIR -e GH_AW_SAFE_OUTPUTS -e GH_AW_SAFE_OUTPUTS_CONFIG_PATH -e GH_AW_SAFE_OUTPUTS_TOOLS_PATH -e GH_AW_ASSETS_BRANCH -e GH_AW_ASSETS_MAX_SIZE_KB -e GH_AW_ASSETS_ALLOWED_EXTS -e DEFAULT_BRANCH -e GITHUB_MCP_SERVER_TOKEN -e GITHUB_MCP_GUARD_MIN_INTEGRITY -e GITHUB_MCP_GUARD_REPOS -e GITHUB_REPOSITORY -e GITHUB_SERVER_URL -e GITHUB_SHA -e GITHUB_WORKSPACE -e GITHUB_TOKEN -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RUN_ATTEMPT -e GITHUB_JOB -e GITHUB_ACTION -e GITHUB_EVENT_NAME -e GITHUB_EVENT_PATH -e GITHUB_ACTOR -e GITHUB_ACTOR_ID -e GITHUB_TRIGGERING_ACTOR -e GITHUB_WORKFLOW -e GITHUB_WORKFLOW_REF -e GITHUB_WORKFLOW_SHA -e GITHUB_REF -e GITHUB_REF_NAME -e GITHUB_REF_TYPE -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GH_AW_SAFE_OUTPUTS_PORT -e GH_AW_SAFE_OUTPUTS_API_KEY -v /tmp/gh-aw/mcp-payloads:/tmp/gh-aw/mcp-payloads:rw -v /opt:/opt:ro -v /tmp:/tmp:rw -v '"${GITHUB_WORKSPACE}"':'"${GITHUB_WORKSPACE}"':rw ghcr.io/github/gh-aw-mcpg:v0.3.19' mkdir -p /home/runner/.copilot GH_AW_NODE=$(which node 2>/dev/null || command -v node 2>/dev/null || echo node) @@ -797,7 +805,7 @@ jobs: export GH_AW_NODE_BIN export COPILOT_API_KEY="$COPILOT_DUMMY_BYOK" (umask 177 && touch /tmp/gh-aw/agent-stdio.log) - printf '%s\n' '{"$schema":"https://github.com/github/gh-aw-firewall/releases/download/v0.25.49/awf-config.schema.json","network":{"allowDomains":["*.vsblob.vsassets.io","api.business.githubcopilot.com","api.enterprise.githubcopilot.com","api.github.com","api.githubcopilot.com","api.individual.githubcopilot.com","api.nuget.org","api.snapcraft.io","archive.ubuntu.com","azure.archive.ubuntu.com","azuresearch-usnc.nuget.org","azuresearch-ussc.nuget.org","builds.dotnet.microsoft.com","ci.dot.net","crl.geotrust.com","crl.globalsign.com","crl.identrust.com","crl.sectigo.com","crl.thawte.com","crl.usertrust.com","crl.verisign.com","crl3.digicert.com","crl4.digicert.com","crls.ssl.com","dc.services.visualstudio.com","dev.azure.com","dist.nuget.org","dot.net","dotnet.microsoft.com","dotnetcli.blob.core.windows.net","github.com","host.docker.internal","json-schema.org","json.schemastore.org","keyserver.ubuntu.com","nuget.org","nuget.pkg.github.com","nugetregistryv2prod.blob.core.windows.net","ocsp.digicert.com","ocsp.geotrust.com","ocsp.globalsign.com","ocsp.identrust.com","ocsp.sectigo.com","ocsp.ssl.com","ocsp.thawte.com","ocsp.usertrust.com","ocsp.verisign.com","oneocsp.microsoft.com","packagecloud.io","packages.cloud.google.com","packages.microsoft.com","pkgs.dev.azure.com","ppa.launchpad.net","raw.githubusercontent.com","registry.npmjs.org","s.symcb.com","s.symcd.com","security.ubuntu.com","telemetry.enterprise.githubcopilot.com","ts-crl.ws.symantec.com","ts-ocsp.ws.symantec.com","www.googleapis.com","www.microsoft.com"]},"apiProxy":{"enabled":true,"enableTokenSteering":true,"maxRuns":500,"maxEffectiveTokens":25000000,"models":{"agent":["sonnet-6x","gpt-5.4","gpt-5","gemini-pro","haiku","any"],"any":["copilot/*","anthropic/*","openai/*","google/*","gemini/*"],"auto":["large"],"claude":["agent","sonnet-6x","haiku","any"],"codex":["agent","gpt-5-codex","gpt-5","any"],"coding":["copilot/gpt-5*codex*","openai/gpt-5*codex*","gpt-5-codex"],"copilot":["agent","gpt-5.4","sonnet","gpt-5","any"],"deep-research":["copilot/deep-research*","copilot/o3-deep-research*","copilot/o4-mini-deep-research*","google/deep-research*","gemini/deep-research*","openai/o3-deep-research*","openai/o4-mini-deep-research*"],"gemini":["agent","gemini-pro","gemini-flash","any"],"gemini-flash":["copilot/gemini-*flash*","google/gemini-*flash*","gemini/gemini-*flash*"],"gemini-flash-lite":["copilot/gemini-*flash*lite*","google/gemini-*flash*lite*","gemini/gemini-*flash*lite*"],"gemini-pro":["copilot/gemini-*pro*","google/gemini-*pro*","gemini/gemini-*pro*"],"gemma":["copilot/gemma*","google/gemma*","gemini/gemma*"],"gpt-4.1":["copilot/gpt-4.1*","openai/gpt-4.1*"],"gpt-5":["copilot/gpt-5*","openai/gpt-5*"],"gpt-5-codex":["copilot/gpt-5*codex*","openai/gpt-5*codex*"],"gpt-5-mini":["copilot/gpt-5*mini*","openai/gpt-5*mini*"],"gpt-5-nano":["copilot/gpt-5*nano*","openai/gpt-5*nano*"],"gpt-5-pro":["copilot/gpt-5*pro*","openai/gpt-5*pro*"],"haiku":["copilot/*haiku*","anthropic/*haiku*"],"large":["sonnet","gpt-5-pro","gpt-5","gemini-pro"],"mini":["haiku","gpt-5-mini","gpt-5-nano","gemini-flash-lite","copilot/raptor*mini*"],"opus":["copilot/*opus*","anthropic/*opus*"],"reasoning":["copilot/o1*","copilot/o3*","copilot/o4*","openai/o1*","openai/o3*","openai/o4*"],"small":["mini"],"sonnet":["copilot/*sonnet*","anthropic/*sonnet*"],"sonnet-6x":["copilot/*sonnet-4.5*","copilot/*sonnet-4-5*","anthropic/*sonnet-4.5*","anthropic/*sonnet-4-5*","copilot/*sonnet-3.7*","copilot/*sonnet-3-7*","anthropic/*sonnet-3.7*","anthropic/*sonnet-3-7*","copilot/*sonnet-3.5*","copilot/*sonnet-3-5*","anthropic/*sonnet-3.5*","anthropic/*sonnet-3-5*"],"vision":["copilot/gemini-*image*","gemini/gemini-*image*","copilot/gemini-*flash*","gemini/gemini-*flash*"]}},"container":{"imageTag":"0.25.49"}}' > "${RUNNER_TEMP}/gh-aw/awf-config.json" + printf '%s\n' '{"$schema":"https://github.com/github/gh-aw-firewall/releases/download/v0.25.55/awf-config.schema.json","network":{"allowDomains":["*.vsblob.vsassets.io","api.business.githubcopilot.com","api.enterprise.githubcopilot.com","api.github.com","api.githubcopilot.com","api.individual.githubcopilot.com","api.nuget.org","api.snapcraft.io","archive.ubuntu.com","azure.archive.ubuntu.com","azuresearch-usnc.nuget.org","azuresearch-ussc.nuget.org","builds.dotnet.microsoft.com","ci.dot.net","crl.geotrust.com","crl.globalsign.com","crl.identrust.com","crl.sectigo.com","crl.thawte.com","crl.usertrust.com","crl.verisign.com","crl3.digicert.com","crl4.digicert.com","crls.ssl.com","dc.services.visualstudio.com","dev.azure.com","dist.nuget.org","dot.net","dotnet.microsoft.com","dotnetcli.blob.core.windows.net","github.com","host.docker.internal","json-schema.org","json.schemastore.org","keyserver.ubuntu.com","nuget.org","nuget.pkg.github.com","nugetregistryv2prod.blob.core.windows.net","ocsp.digicert.com","ocsp.geotrust.com","ocsp.globalsign.com","ocsp.identrust.com","ocsp.sectigo.com","ocsp.ssl.com","ocsp.thawte.com","ocsp.usertrust.com","ocsp.verisign.com","oneocsp.microsoft.com","packagecloud.io","packages.cloud.google.com","packages.microsoft.com","pkgs.dev.azure.com","ppa.launchpad.net","raw.githubusercontent.com","registry.npmjs.org","s.symcb.com","s.symcd.com","security.ubuntu.com","telemetry.enterprise.githubcopilot.com","ts-crl.ws.symantec.com","ts-ocsp.ws.symantec.com","www.googleapis.com","www.microsoft.com"]},"apiProxy":{"enabled":true,"enableTokenSteering":true,"maxRuns":500,"maxEffectiveTokens":25000000,"models":{"agent":["sonnet-6x","gpt-5.4","gpt-5.3","gemini-pro","any"],"antigravity":["copilot/antigravity*","google/antigravity*","gemini/antigravity*"],"any":["copilot/*","anthropic/*","openai/*","google/*","gemini/*"],"claude":["agent"],"codex":["agent"],"coding":["copilot/gpt-5*codex*","openai/gpt-5*codex*","gpt-5-codex"],"computer-use":["copilot/*computer-use*","google/*computer-use*","gemini/*computer-use*","openai/*computer-use*"],"copilot":["agent"],"deep-research":["copilot/deep-research*","copilot/o3-deep-research*","copilot/o4-mini-deep-research*","google/deep-research*","gemini/deep-research*","openai/o3-deep-research*","openai/o4-mini-deep-research*"],"gemini":["agent"],"gemini-3-flash":["copilot/gemini-3*flash*","google/gemini-3*flash*","gemini/gemini-3*flash*"],"gemini-3-pro":["copilot/gemini-3*pro*","google/gemini-3*pro*","gemini/gemini-3*pro*"],"gemini-3.1-flash":["copilot/gemini-3.1*flash*","google/gemini-3.1*flash*","gemini/gemini-3.1*flash*"],"gemini-3.1-pro":["copilot/gemini-3.1*pro*","google/gemini-3.1*pro*","gemini/gemini-3.1*pro*"],"gemini-3.5-flash":["copilot/gemini-3.5*flash*","google/gemini-3.5*flash*","gemini/gemini-3.5*flash*"],"gemini-flash":["copilot/gemini-*flash*","google/gemini-*flash*","gemini/gemini-*flash*"],"gemini-flash-lite":["copilot/gemini-*flash*lite*","google/gemini-*flash*lite*","gemini/gemini-*flash*lite*"],"gemini-pro":["copilot/gemini-*pro*","google/gemini-*pro*","gemini/gemini-*pro*"],"gemma":["copilot/gemma*","google/gemma*","gemini/gemma*"],"gpt-4.1":["copilot/gpt-4.1*","openai/gpt-4.1*"],"gpt-5":["copilot/gpt-5*","openai/gpt-5*"],"gpt-5-codex":["copilot/gpt-5*codex*","openai/gpt-5*codex*"],"gpt-5-mini":["copilot/gpt-5*mini*","openai/gpt-5*mini*"],"gpt-5-nano":["copilot/gpt-5*nano*","openai/gpt-5*nano*"],"gpt-5-pro":["copilot/gpt-5*pro*","openai/gpt-5*pro*"],"gpt-5.2":["copilot/gpt-5.2*","openai/gpt-5.2*"],"gpt-5.3":["copilot/gpt-5.3*","openai/gpt-5.3*"],"gpt-5.4":["copilot/gpt-5.4*","openai/gpt-5.4*"],"gpt-5.5":["copilot/gpt-5.5*","openai/gpt-5.5*"],"haiku":["copilot/*haiku*","anthropic/*haiku*"],"large":["sonnet","gpt-5-pro","gpt-5","gemini-pro"],"mini":["haiku","gpt-5-mini","gpt-5-nano","gemini-flash-lite"],"opus":["copilot/*opus*","anthropic/*opus*"],"opusplan":["opus?effort=high"],"reasoning":["copilot/o1*","copilot/o3*","copilot/o4*","openai/o1*","openai/o3*","openai/o4*"],"robotics":["copilot/*robotics*","google/*robotics*","gemini/*robotics*"],"small":["mini"],"sonnet":["copilot/*sonnet*","anthropic/*sonnet*"],"sonnet-6x":["copilot/*sonnet-4-5-*","anthropic/*sonnet-4-5-*","copilot/*sonnet-4-6*","anthropic/*sonnet-4-6*"],"summarization":["haiku","gpt-5-mini","gemini-flash-lite","mini"],"vision":["copilot/gemini-*image*","gemini/gemini-*image*","copilot/gemini-*flash*","gemini/gemini-*flash*"]}},"container":{"imageTag":"0.25.55"}}' > "${RUNNER_TEMP}/gh-aw/awf-config.json" cp "${RUNNER_TEMP}/gh-aw/awf-config.json" /tmp/gh-aw/awf-config.json GH_AW_DOCKER_HOST_PATH_PREFIX_ARGS="" if [[ "${DOCKER_HOST:-}" =~ ^tcp:// ]]; then @@ -811,12 +819,12 @@ jobs: COPILOT_AGENT_RUNNER_TYPE: STANDALONE COPILOT_DUMMY_BYOK: dummy-byok-key-for-offline-mode COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }} - COPILOT_MODEL: ${{ vars.GH_AW_MODEL_AGENT_COPILOT || 'claude-sonnet-4.5' }} + COPILOT_MODEL: ${{ vars.GH_AW_MODEL_AGENT_COPILOT || 'claude-sonnet-4.6' }} GH_AW_MCP_CONFIG: /home/runner/.copilot/mcp-config.json GH_AW_PHASE: agent GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt GH_AW_SAFE_OUTPUTS: ${{ steps.set-runtime-paths.outputs.GH_AW_SAFE_OUTPUTS }} - GH_AW_VERSION: v0.74.8 + GH_AW_VERSION: v0.76.1 GITHUB_API_URL: ${{ github.api_url }} GITHUB_AW: true GITHUB_COPILOT_INTEGRATION_ID: agentic-workflows @@ -831,11 +839,11 @@ jobs: GIT_COMMITTER_EMAIL: github-actions[bot]@users.noreply.github.com GIT_COMMITTER_NAME: github-actions[bot] XDG_CONFIG_HOME: /home/runner - - name: Detect Copilot errors - id: detect-copilot-errors + - name: Detect agent errors if: always() + id: detect-agent-errors continue-on-error: true - run: node "${RUNNER_TEMP}/gh-aw/actions/detect_copilot_errors.cjs" + run: node "${RUNNER_TEMP}/gh-aw/actions/detect_agent_errors.cjs" - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -1020,7 +1028,7 @@ jobs: steps: - name: Setup Scripts id: setup - uses: github/gh-aw-actions/setup@efa55847f72aadb03490d955263ff911bf758700 # v0.74.8 + uses: github/gh-aw-actions/setup@46d564922b082d0db93244972e8005ea6904ee5f # v0.76.1 with: destination: ${{ runner.temp }}/gh-aw/actions job-name: ${{ github.job }} @@ -1029,7 +1037,8 @@ jobs: env: GH_AW_SETUP_WORKFLOW_NAME: "LabelOps — PR Maintenance" GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/labelops-pr-maintenance.lock.yml@${{ github.ref }} - GH_AW_INFO_VERSION: "1.0.48" + GH_AW_INFO_VERSION: "1.0.52" + GH_AW_INFO_AWF_VERSION: "v0.25.55" GH_AW_INFO_ENGINE_ID: "copilot" - name: Download agent output artifact id: download-agent-output @@ -1052,6 +1061,7 @@ jobs: GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }} GH_AW_NOOP_MAX: "1" GH_AW_WORKFLOW_NAME: "LabelOps — PR Maintenance" + GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/labelops-pr-maintenance.md" GH_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} GH_AW_AGENT_CONCLUSION: ${{ needs.agent.result }} GH_AW_NOOP_REPORT_AS_ISSUE: "true" @@ -1068,6 +1078,7 @@ jobs: env: GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }} GH_AW_WORKFLOW_NAME: "LabelOps — PR Maintenance" + GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/labelops-pr-maintenance.md" GH_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} GH_AW_DETECTION_CONCLUSION: ${{ needs.detection.outputs.detection_conclusion }} GH_AW_DETECTION_REASON: ${{ needs.detection.outputs.detection_reason }} @@ -1085,6 +1096,7 @@ jobs: GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }} GH_AW_MISSING_TOOL_CREATE_ISSUE: "true" GH_AW_WORKFLOW_NAME: "LabelOps — PR Maintenance" + GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/labelops-pr-maintenance.md" with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} script: | @@ -1099,6 +1111,7 @@ jobs: GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }} GH_AW_REPORT_INCOMPLETE_CREATE_ISSUE: "true" GH_AW_WORKFLOW_NAME: "LabelOps — PR Maintenance" + GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/labelops-pr-maintenance.md" with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} script: | @@ -1113,6 +1126,7 @@ jobs: env: GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }} GH_AW_WORKFLOW_NAME: "LabelOps — PR Maintenance" + GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/labelops-pr-maintenance.md" GH_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} GH_AW_AGENT_CONCLUSION: ${{ needs.agent.result }} GH_AW_WORKFLOW_ID: "labelops-pr-maintenance" @@ -1161,7 +1175,7 @@ jobs: steps: - name: Setup Scripts id: setup - uses: github/gh-aw-actions/setup@efa55847f72aadb03490d955263ff911bf758700 # v0.74.8 + uses: github/gh-aw-actions/setup@46d564922b082d0db93244972e8005ea6904ee5f # v0.76.1 with: destination: ${{ runner.temp }}/gh-aw/actions job-name: ${{ github.job }} @@ -1170,7 +1184,8 @@ jobs: env: GH_AW_SETUP_WORKFLOW_NAME: "LabelOps — PR Maintenance" GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/labelops-pr-maintenance.lock.yml@${{ github.ref }} - GH_AW_INFO_VERSION: "1.0.48" + GH_AW_INFO_VERSION: "1.0.52" + GH_AW_INFO_AWF_VERSION: "v0.25.55" GH_AW_INFO_ENGINE_ID: "copilot" - name: Download agent output artifact id: download-agent-output @@ -1197,7 +1212,7 @@ jobs: rm -rf /tmp/gh-aw/sandbox/firewall/logs rm -rf /tmp/gh-aw/sandbox/firewall/audit - name: Download container images - run: bash "${RUNNER_TEMP}/gh-aw/actions/download_docker_images.sh" ghcr.io/github/gh-aw-firewall/agent:0.25.49 ghcr.io/github/gh-aw-firewall/api-proxy:0.25.49 ghcr.io/github/gh-aw-firewall/squid:0.25.49 + run: bash "${RUNNER_TEMP}/gh-aw/actions/download_docker_images.sh" ghcr.io/github/gh-aw-firewall/agent:0.25.55 ghcr.io/github/gh-aw-firewall/api-proxy:0.25.55 ghcr.io/github/gh-aw-firewall/squid:0.25.55 - name: Check if detection needed id: detection_guard if: always() @@ -1256,11 +1271,11 @@ jobs: node-version: '24' package-manager-cache: false - name: Install GitHub Copilot CLI - run: bash "${RUNNER_TEMP}/gh-aw/actions/install_copilot_cli.sh" 1.0.48 + run: bash "${RUNNER_TEMP}/gh-aw/actions/install_copilot_cli.sh" 1.0.52 env: GH_HOST: github.com - name: Install AWF binary - run: bash "${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh" v0.25.49 + run: bash "${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh" v0.25.55 - name: Execute GitHub Copilot CLI if: always() && steps.detection_guard.outputs.run_detection == 'true' continue-on-error: true @@ -1275,7 +1290,7 @@ jobs: export GH_AW_NODE_BIN export COPILOT_API_KEY="$COPILOT_DUMMY_BYOK" (umask 177 && touch /tmp/gh-aw/threat-detection/detection.log) - printf '%s\n' '{"$schema":"https://github.com/github/gh-aw-firewall/releases/download/v0.25.49/awf-config.schema.json","network":{"allowDomains":["api.business.githubcopilot.com","api.enterprise.githubcopilot.com","api.github.com","api.githubcopilot.com","api.individual.githubcopilot.com","github.com","host.docker.internal","telemetry.enterprise.githubcopilot.com"]},"apiProxy":{"enabled":true,"enableTokenSteering":true,"maxRuns":500,"maxEffectiveTokens":25000000},"container":{"imageTag":"0.25.49"}}' > "${RUNNER_TEMP}/gh-aw/awf-config.json" + printf '%s\n' '{"$schema":"https://github.com/github/gh-aw-firewall/releases/download/v0.25.55/awf-config.schema.json","network":{"allowDomains":["api.business.githubcopilot.com","api.enterprise.githubcopilot.com","api.github.com","api.githubcopilot.com","api.individual.githubcopilot.com","github.com","host.docker.internal","telemetry.enterprise.githubcopilot.com"]},"apiProxy":{"enabled":true,"enableTokenSteering":true,"maxRuns":500,"maxEffectiveTokens":25000000},"container":{"imageTag":"0.25.55"}}' > "${RUNNER_TEMP}/gh-aw/awf-config.json" cp "${RUNNER_TEMP}/gh-aw/awf-config.json" /tmp/gh-aw/awf-config.json GH_AW_DOCKER_HOST_PATH_PREFIX_ARGS="" if [[ "${DOCKER_HOST:-}" =~ ^tcp:// ]]; then @@ -1289,10 +1304,10 @@ jobs: COPILOT_AGENT_RUNNER_TYPE: STANDALONE COPILOT_DUMMY_BYOK: dummy-byok-key-for-offline-mode COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }} - COPILOT_MODEL: ${{ vars.GH_AW_MODEL_DETECTION_COPILOT || 'claude-sonnet-4.5' }} + COPILOT_MODEL: ${{ vars.GH_AW_MODEL_DETECTION_COPILOT || 'claude-sonnet-4.6' }} GH_AW_PHASE: detection GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt - GH_AW_VERSION: v0.74.8 + GH_AW_VERSION: v0.76.1 GITHUB_API_URL: ${{ github.api_url }} GITHUB_AW: true GITHUB_COPILOT_INTEGRATION_ID: agentic-workflows @@ -1367,9 +1382,10 @@ jobs: GH_AW_EFFECTIVE_TOKENS: ${{ needs.agent.outputs.effective_tokens }} GH_AW_ENGINE_ID: "copilot" GH_AW_ENGINE_MODEL: ${{ needs.agent.outputs.model }} - GH_AW_ENGINE_VERSION: "1.0.48" + GH_AW_ENGINE_VERSION: "1.0.52" GH_AW_WORKFLOW_ID: "labelops-pr-maintenance" GH_AW_WORKFLOW_NAME: "LabelOps — PR Maintenance" + GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/labelops-pr-maintenance.md" outputs: code_push_failure_count: ${{ steps.process_safe_outputs.outputs.code_push_failure_count }} code_push_failure_errors: ${{ steps.process_safe_outputs.outputs.code_push_failure_errors }} @@ -1384,7 +1400,7 @@ jobs: steps: - name: Setup Scripts id: setup - uses: github/gh-aw-actions/setup@efa55847f72aadb03490d955263ff911bf758700 # v0.74.8 + uses: github/gh-aw-actions/setup@46d564922b082d0db93244972e8005ea6904ee5f # v0.76.1 with: destination: ${{ runner.temp }}/gh-aw/actions job-name: ${{ github.job }} @@ -1393,7 +1409,8 @@ jobs: env: GH_AW_SETUP_WORKFLOW_NAME: "LabelOps — PR Maintenance" GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/labelops-pr-maintenance.lock.yml@${{ github.ref }} - GH_AW_INFO_VERSION: "1.0.48" + GH_AW_INFO_VERSION: "1.0.52" + GH_AW_INFO_AWF_VERSION: "v0.25.55" GH_AW_INFO_ENGINE_ID: "copilot" - name: Download agent output artifact id: download-agent-output @@ -1445,7 +1462,7 @@ jobs: ref: ${{ github.event.repository.default_branch }} token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} persist-credentials: false - fetch-depth: 1 + fetch-depth: 0 - name: Checkout repository if: (!cancelled()) && needs.agent.result != 'skipped' && contains(needs.agent.outputs.output_types, 'push_to_pull_request_branch') && github.event_name != 'issue_comment' && github.event_name != 'pull_request_review_comment' uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 @@ -1453,7 +1470,7 @@ jobs: ref: ${{ steps.extract-base-branch.outputs.base-branch || github.base_ref || github.event.pull_request.base.ref || github.ref_name || github.event.repository.default_branch }} token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} persist-credentials: false - fetch-depth: 1 + fetch-depth: 0 - name: Configure Git credentials if: (!cancelled()) && needs.agent.result != 'skipped' && contains(needs.agent.outputs.output_types, 'push_to_pull_request_branch') env: diff --git a/.github/workflows/labelops-pr-security-scan.lock.yml b/.github/workflows/labelops-pr-security-scan.lock.yml index c63925066f6..89f9e9c1926 100644 --- a/.github/workflows/labelops-pr-security-scan.lock.yml +++ b/.github/workflows/labelops-pr-security-scan.lock.yml @@ -1,5 +1,5 @@ -# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"636a346cf305f9bd3a333fdd180ffa87ff8df176d6b95b44bb7bd545201b912b","compiler_version":"v0.68.3","strict":true,"agent_id":"copilot"} -# gh-aw-manifest: {"version":1,"secrets":["COPILOT_GITHUB_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/checkout","sha":"de0fac2e4500dabe0009e67214ff5f5447ce83dd","version":"v6.0.2"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"373c709c69115d41ff229c7e5df9f8788daa9553","version":"v9"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"},{"repo":"github/gh-aw-actions/setup","sha":"ba90f2186d7ad780ec640f364005fa24e797b360","version":"v0.68.3"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.25.20"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.20"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.25.20"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.2.19"},{"image":"ghcr.io/github/github-mcp-server:v0.32.0"},{"image":"node:lts-alpine"}]} +# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"636a346cf305f9bd3a333fdd180ffa87ff8df176d6b95b44bb7bd545201b912b","compiler_version":"v0.76.1","strict":true,"agent_id":"copilot"} +# gh-aw-manifest: {"version":1,"secrets":["COPILOT_GITHUB_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/checkout","sha":"de0fac2e4500dabe0009e67214ff5f5447ce83dd","version":"v6.0.2"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/setup-node","sha":"48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e","version":"v6.4.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"},{"repo":"github/gh-aw-actions/setup","sha":"46d564922b082d0db93244972e8005ea6904ee5f","version":"v0.76.1"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.25.55"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.55"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.25.55"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.3.19"},{"image":"ghcr.io/github/github-mcp-server:v1.0.4","digest":"sha256:e3816a476a977cfb836e7d221510011436c654d11861db66ecfd826601aba6a4","pinned_image":"ghcr.io/github/github-mcp-server:v1.0.4@sha256:e3816a476a977cfb836e7d221510011436c654d11861db66ecfd826601aba6a4"},{"image":"node:lts-alpine","digest":"sha256:2bdb65ed1dab192432bc31c95f94155ca5ad7fc1392fb7eb7526ab682fa5bf14","pinned_image":"node:lts-alpine@sha256:2bdb65ed1dab192432bc31c95f94155ca5ad7fc1392fb7eb7526ab682fa5bf14"}]} # ___ _ _ # / _ \ | | (_) # | |_| | __ _ ___ _ __ | |_ _ ___ @@ -14,7 +14,7 @@ # \ /\ / (_) | | | | ( | | | | (_) \ V V /\__ \ # \/ \/ \___/|_| |_|\_\|_| |_|\___/ \_/\_/ |___/ # -# This file was automatically generated by gh-aw (v0.68.3). DO NOT EDIT. +# This file was automatically generated by gh-aw (v0.76.1). DO NOT EDIT. # # To update this file, edit the corresponding .md file and run: # gh aw compile @@ -36,20 +36,21 @@ # Custom actions used: # - actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 # - actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 -# - actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 +# - actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 +# - actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 # - actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 -# - github/gh-aw-actions/setup@ba90f2186d7ad780ec640f364005fa24e797b360 # v0.68.3 +# - github/gh-aw-actions/setup@46d564922b082d0db93244972e8005ea6904ee5f # v0.76.1 # # Container images used: -# - ghcr.io/github/gh-aw-firewall/agent:0.25.20 -# - ghcr.io/github/gh-aw-firewall/api-proxy:0.25.20 -# - ghcr.io/github/gh-aw-firewall/squid:0.25.20 -# - ghcr.io/github/gh-aw-mcpg:v0.2.19 -# - ghcr.io/github/github-mcp-server:v0.32.0 -# - node:lts-alpine +# - ghcr.io/github/gh-aw-firewall/agent:0.25.55 +# - ghcr.io/github/gh-aw-firewall/api-proxy:0.25.55 +# - ghcr.io/github/gh-aw-firewall/squid:0.25.55 +# - ghcr.io/github/gh-aw-mcpg:v0.3.19 +# - ghcr.io/github/github-mcp-server:v1.0.4@sha256:e3816a476a977cfb836e7d221510011436c654d11861db66ecfd826601aba6a4 +# - node:lts-alpine@sha256:2bdb65ed1dab192432bc31c95f94155ca5ad7fc1392fb7eb7526ab682fa5bf14 name: "PR Tooling Safety Check" -"on": +on: schedule: - cron: "20 */1 * * *" # Friendly format: every 1h (scattered) @@ -57,7 +58,7 @@ name: "PR Tooling Safety Check" inputs: aw_context: default: "" - description: Agent caller context (used internally by Agentic Workflows). + description: "Agent caller context (used internally by Agentic Workflows)." required: false type: string @@ -77,38 +78,47 @@ jobs: outputs: comment_id: "" comment_repo: "" + engine_id: ${{ steps.generate_aw_info.outputs.engine_id }} lockdown_check_failed: ${{ steps.generate_aw_info.outputs.lockdown_check_failed == 'true' }} model: ${{ steps.generate_aw_info.outputs.model }} secret_verification_result: ${{ steps.validate-secret.outputs.verification_result }} + setup-parent-span-id: ${{ steps.setup.outputs.parent-span-id || steps.setup.outputs.span-id }} + setup-span-id: ${{ steps.setup.outputs.span-id }} setup-trace-id: ${{ steps.setup.outputs.trace-id }} stale_lock_file_failed: ${{ steps.check-lock-file.outputs.stale_lock_file_failed == 'true' }} steps: - name: Setup Scripts id: setup - uses: github/gh-aw-actions/setup@ba90f2186d7ad780ec640f364005fa24e797b360 # v0.68.3 + uses: github/gh-aw-actions/setup@46d564922b082d0db93244972e8005ea6904ee5f # v0.76.1 with: destination: ${{ runner.temp }}/gh-aw/actions job-name: ${{ github.job }} + env: + GH_AW_SETUP_WORKFLOW_NAME: "PR Tooling Safety Check" + GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/labelops-pr-security-scan.lock.yml@${{ github.ref }} + GH_AW_INFO_VERSION: "1.0.52" + GH_AW_INFO_AWF_VERSION: "v0.25.55" + GH_AW_INFO_ENGINE_ID: "copilot" - name: Generate agentic run info id: generate_aw_info env: GH_AW_INFO_ENGINE_ID: "copilot" GH_AW_INFO_ENGINE_NAME: "GitHub Copilot CLI" - GH_AW_INFO_MODEL: ${{ vars.GH_AW_MODEL_AGENT_COPILOT || 'auto' }} - GH_AW_INFO_VERSION: "1.0.21" - GH_AW_INFO_AGENT_VERSION: "1.0.21" - GH_AW_INFO_CLI_VERSION: "v0.68.3" + GH_AW_INFO_MODEL: ${{ vars.GH_AW_MODEL_AGENT_COPILOT || 'claude-sonnet-4.6' }} + GH_AW_INFO_VERSION: "1.0.52" + GH_AW_INFO_AGENT_VERSION: "1.0.52" + GH_AW_INFO_CLI_VERSION: "v0.76.1" GH_AW_INFO_WORKFLOW_NAME: "PR Tooling Safety Check" GH_AW_INFO_EXPERIMENTAL: "false" GH_AW_INFO_SUPPORTS_TOOLS_ALLOWLIST: "true" GH_AW_INFO_STAGED: "false" GH_AW_INFO_ALLOWED_DOMAINS: '["defaults","github"]' GH_AW_INFO_FIREWALL_ENABLED: "true" - GH_AW_INFO_AWF_VERSION: "v0.25.20" + GH_AW_INFO_AWF_VERSION: "v0.25.55" GH_AW_INFO_AWMG_VERSION: "" GH_AW_INFO_FIREWALL_TYPE: "squid" GH_AW_COMPILED_STRICT: "true" - uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 with: script: | const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); @@ -127,11 +137,24 @@ jobs: sparse-checkout: | .github .agents + .antigravity + .claude + .codex + .crush + .gemini + .opencode + .pi sparse-checkout-cone-mode: true fetch-depth: 1 + - name: Save agent config folders for base branch restoration + env: + GH_AW_AGENT_FOLDERS: ".agents .antigravity .claude .codex .crush .gemini .github .opencode .pi" + GH_AW_AGENT_FILES: ".crush.json AGENTS.md ANTIGRAVITY.md CLAUDE.md GEMINI.md PI.md opencode.jsonc" + # poutine:ignore untrusted_checkout_exec + run: bash "${RUNNER_TEMP}/gh-aw/actions/save_base_github_folders.sh" - name: Check workflow lock file id: check-lock-file - uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: GH_AW_WORKFLOW_FILE: "labelops-pr-security-scan.lock.yml" GH_AW_CONTEXT_WORKFLOW_REF: "${{ github.workflow_ref }}" @@ -142,9 +165,9 @@ jobs: const { main } = require('${{ runner.temp }}/gh-aw/actions/check_workflow_timestamp_api.cjs'); await main(); - name: Check compile-agentic version - uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: - GH_AW_COMPILED_VERSION: "v0.68.3" + GH_AW_COMPILED_VERSION: "v0.76.1" with: script: | const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); @@ -155,11 +178,11 @@ jobs: env: GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt GH_AW_SAFE_OUTPUTS: ${{ runner.temp }}/gh-aw/safeoutputs/outputs.jsonl + GH_AW_EXPR_1A3A194A: ${{ github.event.discussion.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'discussion' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }} + GH_AW_EXPR_463A214A: ${{ github.event.pull_request.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'pull_request' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }} + GH_AW_EXPR_802A9F6A: ${{ github.event.issue.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'issue' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }} + GH_AW_EXPR_FF1D34CE: ${{ github.event.comment.id || fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').comment_id }} GH_AW_GITHUB_ACTOR: ${{ github.actor }} - GH_AW_GITHUB_EVENT_COMMENT_ID: ${{ github.event.comment.id }} - GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER: ${{ github.event.discussion.number }} - GH_AW_GITHUB_EVENT_ISSUE_NUMBER: ${{ github.event.issue.number }} - GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }} GH_AW_GITHUB_REPOSITORY: ${{ github.repository }} GH_AW_GITHUB_RUN_ID: ${{ github.run_id }} GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }} @@ -180,30 +203,33 @@ jobs: Tools: add_comment(max:25), add_labels(max:50), missing_tool, missing_data, noop + GH_AW_PROMPT_df1e042d37d12612_EOF + cat "${RUNNER_TEMP}/gh-aw/prompts/mcp_cli_tools_prompt.md" + cat << 'GH_AW_PROMPT_df1e042d37d12612_EOF' The following GitHub context information is available for this workflow: - {{#if __GH_AW_GITHUB_ACTOR__ }} + {{#if github.actor}} - **actor**: __GH_AW_GITHUB_ACTOR__ {{/if}} - {{#if __GH_AW_GITHUB_REPOSITORY__ }} + {{#if github.repository}} - **repository**: __GH_AW_GITHUB_REPOSITORY__ {{/if}} - {{#if __GH_AW_GITHUB_WORKSPACE__ }} + {{#if github.workspace}} - **workspace**: __GH_AW_GITHUB_WORKSPACE__ {{/if}} - {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }} - - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ + {{#if github.event.issue.number || (github.aw.context.item_type == 'issue' && github.aw.context.item_number)}} + - **issue-number**: #__GH_AW_EXPR_802A9F6A__ {{/if}} - {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }} - - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ + {{#if github.event.discussion.number || (github.aw.context.item_type == 'discussion' && github.aw.context.item_number)}} + - **discussion-number**: #__GH_AW_EXPR_1A3A194A__ {{/if}} - {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }} - - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ + {{#if github.event.pull_request.number || (github.aw.context.item_type == 'pull_request' && github.aw.context.item_number)}} + - **pull-request-number**: #__GH_AW_EXPR_463A214A__ {{/if}} - {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }} - - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__ + {{#if github.event.comment.id || github.aw.context.comment_id}} + - **comment-id**: __GH_AW_EXPR_FF1D34CE__ {{/if}} - {{#if __GH_AW_GITHUB_RUN_ID__ }} + {{#if github.run_id}} - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__ {{/if}} @@ -216,9 +242,10 @@ jobs: GH_AW_PROMPT_df1e042d37d12612_EOF } > "$GH_AW_PROMPT" - name: Interpolate variables and render templates - uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt + GH_AW_ENGINE_ID: "copilot" with: script: | const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); @@ -226,19 +253,20 @@ jobs: const { main } = require('${{ runner.temp }}/gh-aw/actions/interpolate_prompt.cjs'); await main(); - name: Substitute placeholders - uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt + GH_AW_EXPR_1A3A194A: ${{ github.event.discussion.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'discussion' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }} + GH_AW_EXPR_463A214A: ${{ github.event.pull_request.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'pull_request' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }} + GH_AW_EXPR_802A9F6A: ${{ github.event.issue.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'issue' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }} + GH_AW_EXPR_FF1D34CE: ${{ github.event.comment.id || fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').comment_id }} GH_AW_GITHUB_ACTOR: ${{ github.actor }} - GH_AW_GITHUB_EVENT_COMMENT_ID: ${{ github.event.comment.id }} - GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER: ${{ github.event.discussion.number }} - GH_AW_GITHUB_EVENT_ISSUE_NUMBER: ${{ github.event.issue.number }} - GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }} GH_AW_GITHUB_REPOSITORY: ${{ github.repository }} GH_AW_GITHUB_RUN_ID: ${{ github.run_id }} GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }} + GH_AW_MCP_CLI_SERVERS_LIST: '- `safeoutputs` — run `safeoutputs --help` to see available tools' GH_AW_MEMORY_BRANCH_NAME: 'safety/scanned-PRs' - GH_AW_MEMORY_CONSTRAINTS: "\n\n**Constraints:**\n- **Allowed Files**: Only files matching patterns: *.json\n- **Max File Size**: 10240 bytes (0.01 MB) per file\n- **Max File Count**: 100 files per commit\n- **Max Patch Size**: 10240 bytes (10 KB) total per push (max: 100 KB)\n" + GH_AW_MEMORY_CONSTRAINTS: "\n\n**Constraints:**\n- **Allowed Files**: Only files matching patterns: *.json\n- **Max File Size**: 102400 bytes (0.10 MB) per file\n- **Max File Count**: 100 files per commit\n- **Max Patch Size**: 10240 bytes (10 KB) total per push (max: 1024 KB)\n" GH_AW_MEMORY_DESCRIPTION: '' GH_AW_MEMORY_DIR: '/tmp/gh-aw/repo-memory/default/' GH_AW_MEMORY_TARGET_REPO: ' of the current repository' @@ -254,14 +282,15 @@ jobs: return await substitutePlaceholders({ file: process.env.GH_AW_PROMPT, substitutions: { + GH_AW_EXPR_1A3A194A: process.env.GH_AW_EXPR_1A3A194A, + GH_AW_EXPR_463A214A: process.env.GH_AW_EXPR_463A214A, + GH_AW_EXPR_802A9F6A: process.env.GH_AW_EXPR_802A9F6A, + GH_AW_EXPR_FF1D34CE: process.env.GH_AW_EXPR_FF1D34CE, GH_AW_GITHUB_ACTOR: process.env.GH_AW_GITHUB_ACTOR, - GH_AW_GITHUB_EVENT_COMMENT_ID: process.env.GH_AW_GITHUB_EVENT_COMMENT_ID, - GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER: process.env.GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER, - GH_AW_GITHUB_EVENT_ISSUE_NUMBER: process.env.GH_AW_GITHUB_EVENT_ISSUE_NUMBER, - GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER: process.env.GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER, GH_AW_GITHUB_REPOSITORY: process.env.GH_AW_GITHUB_REPOSITORY, GH_AW_GITHUB_RUN_ID: process.env.GH_AW_GITHUB_RUN_ID, GH_AW_GITHUB_WORKSPACE: process.env.GH_AW_GITHUB_WORKSPACE, + GH_AW_MCP_CLI_SERVERS_LIST: process.env.GH_AW_MCP_CLI_SERVERS_LIST, GH_AW_MEMORY_BRANCH_NAME: process.env.GH_AW_MEMORY_BRANCH_NAME, GH_AW_MEMORY_CONSTRAINTS: process.env.GH_AW_MEMORY_CONSTRAINTS, GH_AW_MEMORY_DESCRIPTION: process.env.GH_AW_MEMORY_DESCRIPTION, @@ -285,10 +314,16 @@ jobs: uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: activation + include-hidden-files: true path: | /tmp/gh-aw/aw_info.json /tmp/gh-aw/aw-prompts/prompt.txt + /tmp/gh-aw/aw-prompts/prompt-template.txt + /tmp/gh-aw/aw-prompts/prompt-import-tree.json /tmp/gh-aw/github_rate_limits.jsonl + /tmp/gh-aw/base + /tmp/gh-aw/.github/agents + /tmp/gh-aw/.github/skills if-no-files-found: ignore retention-days: 1 @@ -306,25 +341,35 @@ jobs: GH_AW_MCP_LOG_DIR: /tmp/gh-aw/mcp-logs/safeoutputs GH_AW_WORKFLOW_ID_SANITIZED: labelopsprsecurityscan outputs: - agentic_engine_timeout: ${{ steps.detect-copilot-errors.outputs.agentic_engine_timeout || 'false' }} + agentic_engine_timeout: ${{ steps.detect-agent-errors.outputs.agentic_engine_timeout || 'false' }} checkout_pr_success: ${{ steps.checkout-pr.outputs.checkout_pr_success || 'true' }} effective_tokens: ${{ steps.parse-mcp-gateway.outputs.effective_tokens }} + effective_tokens_rate_limit_error: ${{ steps.parse-mcp-gateway.outputs.effective_tokens_rate_limit_error || 'false' }} has_patch: ${{ steps.collect_output.outputs.has_patch }} - inference_access_error: ${{ steps.detect-copilot-errors.outputs.inference_access_error || 'false' }} - mcp_policy_error: ${{ steps.detect-copilot-errors.outputs.mcp_policy_error || 'false' }} + inference_access_error: ${{ steps.detect-agent-errors.outputs.inference_access_error || 'false' }} + mcp_policy_error: ${{ steps.detect-agent-errors.outputs.mcp_policy_error || 'false' }} model: ${{ needs.activation.outputs.model }} - model_not_supported_error: ${{ steps.detect-copilot-errors.outputs.model_not_supported_error || 'false' }} + model_not_supported_error: ${{ steps.detect-agent-errors.outputs.model_not_supported_error || 'false' }} output: ${{ steps.collect_output.outputs.output }} output_types: ${{ steps.collect_output.outputs.output_types }} + setup-parent-span-id: ${{ steps.setup.outputs.parent-span-id || steps.setup.outputs.span-id }} + setup-span-id: ${{ steps.setup.outputs.span-id }} setup-trace-id: ${{ steps.setup.outputs.trace-id }} steps: - name: Setup Scripts id: setup - uses: github/gh-aw-actions/setup@ba90f2186d7ad780ec640f364005fa24e797b360 # v0.68.3 + uses: github/gh-aw-actions/setup@46d564922b082d0db93244972e8005ea6904ee5f # v0.76.1 with: destination: ${{ runner.temp }}/gh-aw/actions job-name: ${{ github.job }} trace-id: ${{ needs.activation.outputs.setup-trace-id }} + parent-span-id: ${{ needs.activation.outputs.setup-parent-span-id || needs.activation.outputs.setup-span-id }} + env: + GH_AW_SETUP_WORKFLOW_NAME: "PR Tooling Safety Check" + GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/labelops-pr-security-scan.lock.yml@${{ github.ref }} + GH_AW_INFO_VERSION: "1.0.52" + GH_AW_INFO_AWF_VERSION: "v0.25.55" + GH_AW_INFO_ENGINE_ID: "copilot" - name: Set runtime paths id: set-runtime-paths run: | @@ -370,7 +415,7 @@ jobs: id: checkout-pr if: | github.event.pull_request || github.event.issue.pull_request - uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: GH_TOKEN: ${{ secrets.GH_AW_GITHUB_MCP_SERVER_TOKEN || secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} with: @@ -381,11 +426,11 @@ jobs: const { main } = require('${{ runner.temp }}/gh-aw/actions/checkout_pr_branch.cjs'); await main(); - name: Install GitHub Copilot CLI - run: bash "${RUNNER_TEMP}/gh-aw/actions/install_copilot_cli.sh" 1.0.21 + run: bash "${RUNNER_TEMP}/gh-aw/actions/install_copilot_cli.sh" 1.0.52 env: GH_HOST: github.com - name: Install AWF binary - run: bash "${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh" v0.25.20 + run: bash "${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh" v0.25.55 - name: Parse integrity filter lists id: parse-guard-vars env: @@ -393,17 +438,37 @@ jobs: GH_AW_TRUSTED_USERS_VAR: ${{ vars.GH_AW_GITHUB_TRUSTED_USERS || '' }} GH_AW_APPROVAL_LABELS_VAR: ${{ vars.GH_AW_GITHUB_APPROVAL_LABELS || '' }} run: bash "${RUNNER_TEMP}/gh-aw/actions/parse_guard_list.sh" + - name: Download activation artifact + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 + with: + name: activation + path: /tmp/gh-aw + - name: Restore agent config folders from base branch + if: steps.checkout-pr.outcome == 'success' + env: + GH_AW_AGENT_FOLDERS: ".agents .antigravity .claude .codex .crush .gemini .github .opencode .pi" + GH_AW_AGENT_FILES: ".crush.json AGENTS.md ANTIGRAVITY.md CLAUDE.md GEMINI.md PI.md opencode.jsonc" + run: bash "${RUNNER_TEMP}/gh-aw/actions/restore_base_github_folders.sh" + - name: Restore inline sub-agents from activation artifact + env: + GH_AW_SUB_AGENT_DIR: ".github/agents" + GH_AW_SUB_AGENT_EXT: ".agent.md" + run: bash "${RUNNER_TEMP}/gh-aw/actions/restore_inline_sub_agents.sh" + - name: Restore inline skills from activation artifact + env: + GH_AW_SKILL_DIR: ".github/skills" + run: bash "${RUNNER_TEMP}/gh-aw/actions/restore_inline_skills.sh" - name: Download container images - run: bash "${RUNNER_TEMP}/gh-aw/actions/download_docker_images.sh" ghcr.io/github/gh-aw-firewall/agent:0.25.20 ghcr.io/github/gh-aw-firewall/api-proxy:0.25.20 ghcr.io/github/gh-aw-firewall/squid:0.25.20 ghcr.io/github/gh-aw-mcpg:v0.2.19 ghcr.io/github/github-mcp-server:v0.32.0 node:lts-alpine - - name: Write Safe Outputs Config + run: bash "${RUNNER_TEMP}/gh-aw/actions/download_docker_images.sh" ghcr.io/github/gh-aw-firewall/agent:0.25.55 ghcr.io/github/gh-aw-firewall/api-proxy:0.25.55 ghcr.io/github/gh-aw-firewall/squid:0.25.55 ghcr.io/github/gh-aw-mcpg:v0.3.19 ghcr.io/github/github-mcp-server:v1.0.4@sha256:e3816a476a977cfb836e7d221510011436c654d11861db66ecfd826601aba6a4 node:lts-alpine@sha256:2bdb65ed1dab192432bc31c95f94155ca5ad7fc1392fb7eb7526ab682fa5bf14 + - name: Generate Safe Outputs Config run: | mkdir -p "${RUNNER_TEMP}/gh-aw/safeoutputs" mkdir -p /tmp/gh-aw/safeoutputs mkdir -p /tmp/gh-aw/mcp-logs/safeoutputs cat > "${RUNNER_TEMP}/gh-aw/safeoutputs/config.json" << 'GH_AW_SAFE_OUTPUTS_CONFIG_450ea76844541048_EOF' - {"add_comment":{"hide_older_comments":true,"max":25,"target":"*"},"add_labels":{"allowed":["AI-Tooling-Check-Scanned-Clean","AI-Tooling-Check-Bypassed","⚠️ Affects-Build-Infra","⚠️ Affects-Compiler-Output","⚠️ Affects-Bootstrap","⚠️ Affects-Restore","⚠️ Affects-Design-Time","⚠️ Affects-Test-Tooling","⚠️ Affects-Agent-Config","⚠️ Suspicious-Prompting","⚠️ Scope-Review-Needed"],"max":50,"target":"*"},"create_report_incomplete_issue":{},"missing_data":{},"missing_tool":{},"noop":{"max":1,"report-as-issue":"false"},"push_repo_memory":{"memories":[{"dir":"/tmp/gh-aw/repo-memory/default","id":"default","max_file_count":100,"max_file_size":10240,"max_patch_size":10240}]},"report_incomplete":{}} + {"add_comment":{"hide_older_comments":true,"max":25,"target":"*"},"add_labels":{"allowed":["AI-Tooling-Check-Scanned-Clean","AI-Tooling-Check-Bypassed","⚠️ Affects-Build-Infra","⚠️ Affects-Compiler-Output","⚠️ Affects-Bootstrap","⚠️ Affects-Restore","⚠️ Affects-Design-Time","⚠️ Affects-Test-Tooling","⚠️ Affects-Agent-Config","⚠️ Suspicious-Prompting","⚠️ Scope-Review-Needed"],"max":50,"target":"*"},"create_report_incomplete_issue":{},"missing_data":{},"missing_tool":{},"noop":{"max":1,"report-as-issue":"false"},"push_repo_memory":{"memories":[{"dir":"/tmp/gh-aw/repo-memory/default","id":"default","max_file_count":100,"max_file_size":102400,"max_patch_size":10240}]},"report_incomplete":{}} GH_AW_SAFE_OUTPUTS_CONFIG_450ea76844541048_EOF - - name: Write Safe Outputs Tools + - name: Generate Safe Outputs Tools env: GH_AW_TOOLS_META_JSON: | { @@ -531,7 +596,7 @@ jobs: } } } - uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 with: script: | const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); @@ -587,11 +652,12 @@ jobs: GITHUB_MCP_SERVER_TOKEN: ${{ secrets.GH_AW_GITHUB_MCP_SERVER_TOKEN || secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} run: | set -eo pipefail - mkdir -p /tmp/gh-aw/mcp-config + mkdir -p "${RUNNER_TEMP}/gh-aw/mcp-config" # Export gateway environment variables for MCP config and gateway script - export MCP_GATEWAY_PORT="80" + export MCP_GATEWAY_PORT="8080" export MCP_GATEWAY_DOMAIN="host.docker.internal" + export MCP_GATEWAY_HOST_DOMAIN="localhost" MCP_GATEWAY_API_KEY=$(openssl rand -base64 45 | tr -d '/+=') echo "::add-mask::${MCP_GATEWAY_API_KEY}" export MCP_GATEWAY_API_KEY @@ -601,15 +667,24 @@ jobs: export DEBUG="*" export GH_AW_ENGINE="copilot" - export MCP_GATEWAY_DOCKER_COMMAND='docker run -i --rm --network host -v /var/run/docker.sock:/var/run/docker.sock -e MCP_GATEWAY_PORT -e MCP_GATEWAY_DOMAIN -e MCP_GATEWAY_API_KEY -e MCP_GATEWAY_PAYLOAD_DIR -e MCP_GATEWAY_PAYLOAD_SIZE_THRESHOLD -e DEBUG -e MCP_GATEWAY_LOG_DIR -e GH_AW_MCP_LOG_DIR -e GH_AW_SAFE_OUTPUTS -e GH_AW_SAFE_OUTPUTS_CONFIG_PATH -e GH_AW_SAFE_OUTPUTS_TOOLS_PATH -e GH_AW_ASSETS_BRANCH -e GH_AW_ASSETS_MAX_SIZE_KB -e GH_AW_ASSETS_ALLOWED_EXTS -e DEFAULT_BRANCH -e GITHUB_MCP_SERVER_TOKEN -e GITHUB_MCP_GUARD_MIN_INTEGRITY -e GITHUB_MCP_GUARD_REPOS -e GITHUB_REPOSITORY -e GITHUB_SERVER_URL -e GITHUB_SHA -e GITHUB_WORKSPACE -e GITHUB_TOKEN -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RUN_ATTEMPT -e GITHUB_JOB -e GITHUB_ACTION -e GITHUB_EVENT_NAME -e GITHUB_EVENT_PATH -e GITHUB_ACTOR -e GITHUB_ACTOR_ID -e GITHUB_TRIGGERING_ACTOR -e GITHUB_WORKFLOW -e GITHUB_WORKFLOW_REF -e GITHUB_WORKFLOW_SHA -e GITHUB_REF -e GITHUB_REF_NAME -e GITHUB_REF_TYPE -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GH_AW_SAFE_OUTPUTS_PORT -e GH_AW_SAFE_OUTPUTS_API_KEY -v /tmp/gh-aw/mcp-payloads:/tmp/gh-aw/mcp-payloads:rw -v /opt:/opt:ro -v /tmp:/tmp:rw -v '"${GITHUB_WORKSPACE}"':'"${GITHUB_WORKSPACE}"':rw ghcr.io/github/gh-aw-mcpg:v0.2.19' + MCP_GATEWAY_UID=$(id -u 2>/dev/null || echo '0') + MCP_GATEWAY_GID=$(id -g 2>/dev/null || echo '0') + case "${DOCKER_HOST:-}" in + unix://* ) DOCKER_SOCK_PATH="${DOCKER_HOST#unix://}" ;; + /* ) DOCKER_SOCK_PATH="$DOCKER_HOST" ;; + * ) DOCKER_SOCK_PATH=/var/run/docker.sock ;; + esac + DOCKER_SOCK_GID=$(stat -c '%g' "$DOCKER_SOCK_PATH" 2>/dev/null || echo '0') + export MCP_GATEWAY_DOCKER_COMMAND='docker run -i --rm --network host --add-host host.docker.internal:127.0.0.1 --user '"${MCP_GATEWAY_UID}"':'"${MCP_GATEWAY_GID}"' --group-add '"${DOCKER_SOCK_GID}"' -v '"${DOCKER_SOCK_PATH}"':/var/run/docker.sock -e MCP_GATEWAY_PORT -e MCP_GATEWAY_DOMAIN -e MCP_GATEWAY_API_KEY -e MCP_GATEWAY_PAYLOAD_DIR -e MCP_GATEWAY_PAYLOAD_SIZE_THRESHOLD -e DOCKER_HOST=unix:///var/run/docker.sock -e DEBUG -e MCP_GATEWAY_LOG_DIR -e GH_AW_MCP_LOG_DIR -e GH_AW_SAFE_OUTPUTS -e GH_AW_SAFE_OUTPUTS_CONFIG_PATH -e GH_AW_SAFE_OUTPUTS_TOOLS_PATH -e GH_AW_ASSETS_BRANCH -e GH_AW_ASSETS_MAX_SIZE_KB -e GH_AW_ASSETS_ALLOWED_EXTS -e DEFAULT_BRANCH -e GITHUB_MCP_SERVER_TOKEN -e GITHUB_MCP_GUARD_MIN_INTEGRITY -e GITHUB_MCP_GUARD_REPOS -e GITHUB_REPOSITORY -e GITHUB_SERVER_URL -e GITHUB_SHA -e GITHUB_WORKSPACE -e GITHUB_TOKEN -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RUN_ATTEMPT -e GITHUB_JOB -e GITHUB_ACTION -e GITHUB_EVENT_NAME -e GITHUB_EVENT_PATH -e GITHUB_ACTOR -e GITHUB_ACTOR_ID -e GITHUB_TRIGGERING_ACTOR -e GITHUB_WORKFLOW -e GITHUB_WORKFLOW_REF -e GITHUB_WORKFLOW_SHA -e GITHUB_REF -e GITHUB_REF_NAME -e GITHUB_REF_TYPE -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GH_AW_SAFE_OUTPUTS_PORT -e GH_AW_SAFE_OUTPUTS_API_KEY -v /tmp/gh-aw/mcp-payloads:/tmp/gh-aw/mcp-payloads:rw -v /opt:/opt:ro -v /tmp:/tmp:rw -v '"${GITHUB_WORKSPACE}"':'"${GITHUB_WORKSPACE}"':rw ghcr.io/github/gh-aw-mcpg:v0.3.19' mkdir -p /home/runner/.copilot - cat << GH_AW_MCP_CONFIG_47ad2461f6be2b34_EOF | bash "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.sh" + GH_AW_NODE=$(which node 2>/dev/null || command -v node 2>/dev/null || echo node) + cat << GH_AW_MCP_CONFIG_47ad2461f6be2b34_EOF | "$GH_AW_NODE" "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.cjs" { "mcpServers": { "github": { "type": "stdio", - "container": "ghcr.io/github/github-mcp-server:v0.32.0", + "container": "ghcr.io/github/github-mcp-server:v1.0.4", "env": { "GITHUB_HOST": "\${GITHUB_SERVER_URL}", "GITHUB_PERSONAL_ACCESS_TOKEN": "\${GITHUB_MCP_SERVER_TOKEN}", @@ -649,36 +724,62 @@ jobs: } } GH_AW_MCP_CONFIG_47ad2461f6be2b34_EOF - - name: Download activation artifact - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 + - name: Mount MCP servers as CLIs + id: mount-mcp-clis + continue-on-error: true + env: + MCP_GATEWAY_API_KEY: ${{ steps.start-mcp-gateway.outputs.gateway-api-key }} + MCP_GATEWAY_DOMAIN: ${{ steps.start-mcp-gateway.outputs.gateway-domain }} + MCP_GATEWAY_PORT: ${{ steps.start-mcp-gateway.outputs.gateway-port }} + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 with: - name: activation - path: /tmp/gh-aw - - name: Clean git credentials + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/mount_mcp_as_cli.cjs'); + await main(); + - name: Clean credentials continue-on-error: true run: bash "${RUNNER_TEMP}/gh-aw/actions/clean_git_credentials.sh" + - name: Audit pre-agent workspace + id: pre_agent_audit + continue-on-error: true + run: bash "${RUNNER_TEMP}/gh-aw/actions/audit_pre_agent_workspace.sh" - name: Execute GitHub Copilot CLI id: agentic_execution # Copilot CLI tool arguments (sorted): timeout-minutes: 15 run: | set -o pipefail + printf '%s' "$(date +%s%3N)" > /tmp/gh-aw/agent_cli_start_ms.txt touch /tmp/gh-aw/agent-step-summary.md + GH_AW_NODE_BIN=$(command -v node 2>/dev/null || true) + export GH_AW_NODE_BIN + export COPILOT_API_KEY="$COPILOT_DUMMY_BYOK" (umask 177 && touch /tmp/gh-aw/agent-stdio.log) + printf '%s\n' '{"$schema":"https://github.com/github/gh-aw-firewall/releases/download/v0.25.55/awf-config.schema.json","network":{"allowDomains":["*.githubusercontent.com","api.business.githubcopilot.com","api.enterprise.githubcopilot.com","api.github.com","api.githubcopilot.com","api.individual.githubcopilot.com","api.snapcraft.io","archive.ubuntu.com","azure.archive.ubuntu.com","codeload.github.com","crl.geotrust.com","crl.globalsign.com","crl.identrust.com","crl.sectigo.com","crl.thawte.com","crl.usertrust.com","crl.verisign.com","crl3.digicert.com","crl4.digicert.com","crls.ssl.com","docs.github.com","github-cloud.githubusercontent.com","github-cloud.s3.amazonaws.com","github.blog","github.com","github.githubassets.com","host.docker.internal","json-schema.org","json.schemastore.org","keyserver.ubuntu.com","lfs.github.com","objects.githubusercontent.com","ocsp.digicert.com","ocsp.geotrust.com","ocsp.globalsign.com","ocsp.identrust.com","ocsp.sectigo.com","ocsp.ssl.com","ocsp.thawte.com","ocsp.usertrust.com","ocsp.verisign.com","packagecloud.io","packages.cloud.google.com","packages.microsoft.com","patch-diff.githubusercontent.com","ppa.launchpad.net","raw.githubusercontent.com","registry.npmjs.org","s.symcb.com","s.symcd.com","security.ubuntu.com","telemetry.enterprise.githubcopilot.com","ts-crl.ws.symantec.com","ts-ocsp.ws.symantec.com","www.googleapis.com"]},"apiProxy":{"enabled":true,"enableTokenSteering":true,"maxRuns":500,"maxEffectiveTokens":25000000,"models":{"agent":["sonnet-6x","gpt-5.4","gpt-5.3","gemini-pro","any"],"antigravity":["copilot/antigravity*","google/antigravity*","gemini/antigravity*"],"any":["copilot/*","anthropic/*","openai/*","google/*","gemini/*"],"claude":["agent"],"codex":["agent"],"coding":["copilot/gpt-5*codex*","openai/gpt-5*codex*","gpt-5-codex"],"computer-use":["copilot/*computer-use*","google/*computer-use*","gemini/*computer-use*","openai/*computer-use*"],"copilot":["agent"],"deep-research":["copilot/deep-research*","copilot/o3-deep-research*","copilot/o4-mini-deep-research*","google/deep-research*","gemini/deep-research*","openai/o3-deep-research*","openai/o4-mini-deep-research*"],"gemini":["agent"],"gemini-3-flash":["copilot/gemini-3*flash*","google/gemini-3*flash*","gemini/gemini-3*flash*"],"gemini-3-pro":["copilot/gemini-3*pro*","google/gemini-3*pro*","gemini/gemini-3*pro*"],"gemini-3.1-flash":["copilot/gemini-3.1*flash*","google/gemini-3.1*flash*","gemini/gemini-3.1*flash*"],"gemini-3.1-pro":["copilot/gemini-3.1*pro*","google/gemini-3.1*pro*","gemini/gemini-3.1*pro*"],"gemini-3.5-flash":["copilot/gemini-3.5*flash*","google/gemini-3.5*flash*","gemini/gemini-3.5*flash*"],"gemini-flash":["copilot/gemini-*flash*","google/gemini-*flash*","gemini/gemini-*flash*"],"gemini-flash-lite":["copilot/gemini-*flash*lite*","google/gemini-*flash*lite*","gemini/gemini-*flash*lite*"],"gemini-pro":["copilot/gemini-*pro*","google/gemini-*pro*","gemini/gemini-*pro*"],"gemma":["copilot/gemma*","google/gemma*","gemini/gemma*"],"gpt-4.1":["copilot/gpt-4.1*","openai/gpt-4.1*"],"gpt-5":["copilot/gpt-5*","openai/gpt-5*"],"gpt-5-codex":["copilot/gpt-5*codex*","openai/gpt-5*codex*"],"gpt-5-mini":["copilot/gpt-5*mini*","openai/gpt-5*mini*"],"gpt-5-nano":["copilot/gpt-5*nano*","openai/gpt-5*nano*"],"gpt-5-pro":["copilot/gpt-5*pro*","openai/gpt-5*pro*"],"gpt-5.2":["copilot/gpt-5.2*","openai/gpt-5.2*"],"gpt-5.3":["copilot/gpt-5.3*","openai/gpt-5.3*"],"gpt-5.4":["copilot/gpt-5.4*","openai/gpt-5.4*"],"gpt-5.5":["copilot/gpt-5.5*","openai/gpt-5.5*"],"haiku":["copilot/*haiku*","anthropic/*haiku*"],"large":["sonnet","gpt-5-pro","gpt-5","gemini-pro"],"mini":["haiku","gpt-5-mini","gpt-5-nano","gemini-flash-lite"],"opus":["copilot/*opus*","anthropic/*opus*"],"opusplan":["opus?effort=high"],"reasoning":["copilot/o1*","copilot/o3*","copilot/o4*","openai/o1*","openai/o3*","openai/o4*"],"robotics":["copilot/*robotics*","google/*robotics*","gemini/*robotics*"],"small":["mini"],"sonnet":["copilot/*sonnet*","anthropic/*sonnet*"],"sonnet-6x":["copilot/*sonnet-4-5-*","anthropic/*sonnet-4-5-*","copilot/*sonnet-4-6*","anthropic/*sonnet-4-6*"],"summarization":["haiku","gpt-5-mini","gemini-flash-lite","mini"],"vision":["copilot/gemini-*image*","gemini/gemini-*image*","copilot/gemini-*flash*","gemini/gemini-*flash*"]}},"container":{"imageTag":"0.25.55"}}' > "${RUNNER_TEMP}/gh-aw/awf-config.json" + cp "${RUNNER_TEMP}/gh-aw/awf-config.json" /tmp/gh-aw/awf-config.json + GH_AW_DOCKER_HOST_PATH_PREFIX_ARGS="" + if [[ "${DOCKER_HOST:-}" =~ ^tcp:// ]]; then + GH_AW_DOCKER_HOST_PATH_PREFIX_ARGS="--docker-host-path-prefix /tmp/gh-aw" + fi # shellcheck disable=SC1003 - sudo -E awf --container-workdir "${GITHUB_WORKSPACE}" --mount "${RUNNER_TEMP}/gh-aw:${RUNNER_TEMP}/gh-aw:ro" --mount "${RUNNER_TEMP}/gh-aw:/host${RUNNER_TEMP}/gh-aw:ro" --env-all --exclude-env COPILOT_GITHUB_TOKEN --exclude-env GITHUB_MCP_SERVER_TOKEN --exclude-env MCP_GATEWAY_API_KEY --allow-domains '*.githubusercontent.com,api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,docs.github.com,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.blog,github.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,ppa.launchpad.net,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com,www.googleapis.com' --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --audit-dir /tmp/gh-aw/sandbox/firewall/audit --enable-host-access --image-tag 0.25.20 --skip-pull --enable-api-proxy \ - -- /bin/bash -c 'node ${RUNNER_TEMP}/gh-aw/actions/copilot_driver.cjs /usr/local/bin/copilot --add-dir /tmp/gh-aw/ --log-level all --log-dir /tmp/gh-aw/sandbox/agent/logs/ --disable-builtin-mcps --no-ask-user --allow-all-tools --allow-all-paths --add-dir "${GITHUB_WORKSPACE}" --prompt "$(cat /tmp/gh-aw/aw-prompts/prompt.txt)"' 2>&1 | tee -a /tmp/gh-aw/agent-stdio.log + sudo -E awf --config "${RUNNER_TEMP}/gh-aw/awf-config.json" --container-workdir "${GITHUB_WORKSPACE}" --mount "${RUNNER_TEMP}/gh-aw:${RUNNER_TEMP}/gh-aw:ro" --mount "${RUNNER_TEMP}/gh-aw:/host${RUNNER_TEMP}/gh-aw:ro" ${GH_AW_DOCKER_HOST_PATH_PREFIX_ARGS} --env-all --exclude-env COPILOT_GITHUB_TOKEN --exclude-env GITHUB_MCP_SERVER_TOKEN --exclude-env MCP_GATEWAY_API_KEY --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --audit-dir /tmp/gh-aw/sandbox/firewall/audit --enable-host-access --allow-host-ports 80,443,8080 --skip-pull \ + -- /bin/bash -c 'export PATH="${RUNNER_TEMP}/gh-aw/mcp-cli/bin:$PATH" && export PATH="$(find /opt/hostedtoolcache /home/runner/work/_tool -maxdepth 5 -type d -name bin 2>/dev/null | tr '\''\n'\'' '\'':'\'')$PATH"; [ -n "$GOROOT" ] && export PATH="$GOROOT/bin:$PATH" || true && GH_AW_NODE_EXEC="${GH_AW_NODE_BIN:-}"; if [ -z "$GH_AW_NODE_EXEC" ] || [ ! -x "$GH_AW_NODE_EXEC" ]; then GH_AW_NODE_EXEC="$(command -v node 2>/dev/null || true)"; fi; if [ -z "$GH_AW_NODE_EXEC" ]; then echo "node runtime missing on this runner — check runtimes.node in workflow YAML" >&2; exit 127; fi; "$GH_AW_NODE_EXEC" ${RUNNER_TEMP}/gh-aw/actions/copilot_harness.cjs /usr/local/bin/copilot --add-dir /tmp/gh-aw/ --log-level all --log-dir /tmp/gh-aw/sandbox/agent/logs/ --disable-builtin-mcps --no-ask-user --allow-all-tools --allow-all-paths --add-dir "${GITHUB_WORKSPACE}" --prompt-file /tmp/gh-aw/aw-prompts/prompt.txt' 2>&1 | tee -a /tmp/gh-aw/agent-stdio.log env: + AWF_REFLECT_ENABLED: 1 COPILOT_AGENT_RUNNER_TYPE: STANDALONE + COPILOT_DUMMY_BYOK: dummy-byok-key-for-offline-mode COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }} - COPILOT_MODEL: ${{ vars.GH_AW_MODEL_AGENT_COPILOT || '' }} + COPILOT_MODEL: ${{ vars.GH_AW_MODEL_AGENT_COPILOT || 'claude-sonnet-4.6' }} GH_AW_MCP_CONFIG: /home/runner/.copilot/mcp-config.json GH_AW_PHASE: agent GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt GH_AW_SAFE_OUTPUTS: ${{ steps.set-runtime-paths.outputs.GH_AW_SAFE_OUTPUTS }} - GH_AW_VERSION: v0.68.3 + GH_AW_VERSION: v0.76.1 GITHUB_API_URL: ${{ github.api_url }} GITHUB_AW: true + GITHUB_COPILOT_INTEGRATION_ID: agentic-workflows GITHUB_HEAD_REF: ${{ github.head_ref }} GITHUB_MCP_SERVER_TOKEN: ${{ secrets.GH_AW_GITHUB_MCP_SERVER_TOKEN || secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} GITHUB_REF_NAME: ${{ github.ref_name }} @@ -690,11 +791,11 @@ jobs: GIT_COMMITTER_EMAIL: github-actions[bot]@users.noreply.github.com GIT_COMMITTER_NAME: github-actions[bot] XDG_CONFIG_HOME: /home/runner - - name: Detect Copilot errors - id: detect-copilot-errors + - name: Detect agent errors if: always() + id: detect-agent-errors continue-on-error: true - run: node "${RUNNER_TEMP}/gh-aw/actions/detect_copilot_errors.cjs" + run: node "${RUNNER_TEMP}/gh-aw/actions/detect_agent_errors.cjs" - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -723,7 +824,7 @@ jobs: bash "${RUNNER_TEMP}/gh-aw/actions/stop_mcp_gateway.sh" "$GATEWAY_PID" - name: Redact secrets in logs if: always() - uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 with: script: | const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); @@ -749,10 +850,10 @@ jobs: - name: Ingest agent output id: collect_output if: always() - uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: GH_AW_SAFE_OUTPUTS: ${{ steps.set-runtime-paths.outputs.GH_AW_SAFE_OUTPUTS }} - GH_AW_ALLOWED_DOMAINS: "*.githubusercontent.com,api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,docs.github.com,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.blog,github.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,ppa.launchpad.net,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com,www.googleapis.com" + GH_AW_ALLOWED_DOMAINS: "*.githubusercontent.com,api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,docs.github.com,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.blog,github.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,patch-diff.githubusercontent.com,ppa.launchpad.net,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com,www.googleapis.com" GITHUB_SERVER_URL: ${{ github.server_url }} GITHUB_API_URL: ${{ github.api_url }} with: @@ -763,7 +864,7 @@ jobs: await main(); - name: Parse agent logs for step summary if: always() - uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: GH_AW_AGENT_OUTPUT: /tmp/gh-aw/sandbox/agent/logs/ with: @@ -775,7 +876,7 @@ jobs: - name: Parse MCP Gateway logs for step summary if: always() id: parse-mcp-gateway - uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 with: script: | const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); @@ -788,9 +889,9 @@ jobs: env: AWF_LOGS_DIR: /tmp/gh-aw/sandbox/firewall/logs run: | - # Fix permissions on firewall logs so they can be uploaded as artifacts + # Fix permissions on firewall logs/audit dirs so they can be uploaded as artifacts # AWF runs with sudo, creating files owned by root - sudo chmod -R a+r /tmp/gh-aw/sandbox/firewall/logs 2>/dev/null || true + sudo chmod -R a+rX /tmp/gh-aw/sandbox/firewall 2>/dev/null || true # Only run awf logs summary if awf command exists (it may not be installed if workflow failed before install step) if command -v awf &> /dev/null; then awf logs summary | tee -a "$GITHUB_STEP_SUMMARY" @@ -800,13 +901,23 @@ jobs: - name: Parse token usage for step summary if: always() continue-on-error: true - uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 with: script: | const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); setupGlobals(core, github, context, exec, io, getOctokit); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Print AWF reflect summary + if: always() + continue-on-error: true + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io, getOctokit); + const { main } = require('${{ runner.temp }}/gh-aw/actions/awf_reflect_summary.cjs'); + await main(); - name: Write agent output placeholder if missing if: always() run: | @@ -814,6 +925,12 @@ jobs: echo '{"items":[]}' > /tmp/gh-aw/agent_output.json fi # Upload repo memory as artifacts for push job + - name: Sanitize repo-memory filenames (default) + if: always() + continue-on-error: true + env: + MEMORY_DIR: /tmp/gh-aw/repo-memory/default + run: bash "${RUNNER_TEMP}/gh-aw/actions/sanitize_repo_memory_filenames.sh" - name: Upload repo-memory artifact (default) if: always() uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 @@ -837,14 +954,17 @@ jobs: !/tmp/gh-aw/proxy-logs/proxy-tls/ /tmp/gh-aw/agent_usage.json /tmp/gh-aw/agent-stdio.log + /tmp/gh-aw/pre-agent-audit.txt /tmp/gh-aw/agent/ /tmp/gh-aw/github_rate_limits.jsonl /tmp/gh-aw/safeoutputs.jsonl /tmp/gh-aw/agent_output.json /tmp/gh-aw/aw-*.patch /tmp/gh-aw/aw-*.bundle + /tmp/gh-aw/awf-config.json /tmp/gh-aw/sandbox/firewall/logs/ /tmp/gh-aw/sandbox/firewall/audit/ + /tmp/gh-aw/sandbox/firewall/awf-reflect.json if-no-files-found: ignore conclusion: @@ -866,6 +986,7 @@ jobs: concurrency: group: "gh-aw-conclusion-labelops-pr-security-scan" cancel-in-progress: false + queue: max outputs: incomplete_count: ${{ steps.report_incomplete.outputs.incomplete_count }} noop_message: ${{ steps.noop.outputs.noop_message }} @@ -874,11 +995,18 @@ jobs: steps: - name: Setup Scripts id: setup - uses: github/gh-aw-actions/setup@ba90f2186d7ad780ec640f364005fa24e797b360 # v0.68.3 + uses: github/gh-aw-actions/setup@46d564922b082d0db93244972e8005ea6904ee5f # v0.76.1 with: destination: ${{ runner.temp }}/gh-aw/actions job-name: ${{ github.job }} trace-id: ${{ needs.activation.outputs.setup-trace-id }} + parent-span-id: ${{ needs.activation.outputs.setup-parent-span-id || needs.activation.outputs.setup-span-id }} + env: + GH_AW_SETUP_WORKFLOW_NAME: "PR Tooling Safety Check" + GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/labelops-pr-security-scan.lock.yml@${{ github.ref }} + GH_AW_INFO_VERSION: "1.0.52" + GH_AW_INFO_AWF_VERSION: "v0.25.55" + GH_AW_INFO_ENGINE_ID: "copilot" - name: Download agent output artifact id: download-agent-output continue-on-error: true @@ -895,11 +1023,12 @@ jobs: echo "GH_AW_AGENT_OUTPUT=/tmp/gh-aw/agent_output.json" >> "$GITHUB_OUTPUT" - name: Process no-op messages id: noop - uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }} GH_AW_NOOP_MAX: "1" GH_AW_WORKFLOW_NAME: "PR Tooling Safety Check" + GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/labelops-pr-security-scan.md" GH_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} GH_AW_AGENT_CONCLUSION: ${{ needs.agent.result }} GH_AW_NOOP_REPORT_AS_ISSUE: "false" @@ -912,10 +1041,11 @@ jobs: await main(); - name: Log detection run id: detection_runs - uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }} GH_AW_WORKFLOW_NAME: "PR Tooling Safety Check" + GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/labelops-pr-security-scan.md" GH_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} GH_AW_DETECTION_CONCLUSION: ${{ needs.detection.outputs.detection_conclusion }} GH_AW_DETECTION_REASON: ${{ needs.detection.outputs.detection_reason }} @@ -928,11 +1058,12 @@ jobs: await main(); - name: Record missing tool id: missing_tool - uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }} GH_AW_MISSING_TOOL_CREATE_ISSUE: "true" GH_AW_WORKFLOW_NAME: "PR Tooling Safety Check" + GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/labelops-pr-security-scan.md" with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} script: | @@ -942,11 +1073,12 @@ jobs: await main(); - name: Record incomplete id: report_incomplete - uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }} GH_AW_REPORT_INCOMPLETE_CREATE_ISSUE: "true" GH_AW_WORKFLOW_NAME: "PR Tooling Safety Check" + GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/labelops-pr-security-scan.md" with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} script: | @@ -957,20 +1089,25 @@ jobs: - name: Handle agent failure id: handle_agent_failure if: always() - uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }} GH_AW_WORKFLOW_NAME: "PR Tooling Safety Check" + GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/labelops-pr-security-scan.md" GH_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} GH_AW_AGENT_CONCLUSION: ${{ needs.agent.result }} GH_AW_WORKFLOW_ID: "labelops-pr-security-scan" + GH_AW_ACTION_FAILURE_ISSUE_EXPIRES_HOURS: "168" GH_AW_ENGINE_ID: "copilot" GH_AW_SECRET_VERIFICATION_RESULT: ${{ needs.activation.outputs.secret_verification_result }} GH_AW_CHECKOUT_PR_SUCCESS: ${{ needs.agent.outputs.checkout_pr_success }} + GH_AW_EFFECTIVE_TOKENS: ${{ needs.agent.outputs.effective_tokens || '' }} + GH_AW_EFFECTIVE_TOKENS_RATE_LIMIT_ERROR: ${{ needs.agent.outputs.effective_tokens_rate_limit_error || 'false' }} GH_AW_INFERENCE_ACCESS_ERROR: ${{ needs.agent.outputs.inference_access_error }} GH_AW_MCP_POLICY_ERROR: ${{ needs.agent.outputs.mcp_policy_error }} GH_AW_AGENTIC_ENGINE_TIMEOUT: ${{ needs.agent.outputs.agentic_engine_timeout }} GH_AW_MODEL_NOT_SUPPORTED_ERROR: ${{ needs.agent.outputs.model_not_supported_error }} + GH_AW_ENGINE_API_HOSTS: "api.enterprise.githubcopilot.com,api.githubcopilot.com,api.business.githubcopilot.com,api.individual.githubcopilot.com" GH_AW_LOCKDOWN_CHECK_FAILED: ${{ needs.activation.outputs.lockdown_check_failed }} GH_AW_STALE_LOCK_FILE_FAILED: ${{ needs.activation.outputs.stale_lock_file_failed }} GH_AW_PUSH_REPO_MEMORY_RESULT: ${{ needs.push_repo_memory.result }} @@ -979,7 +1116,10 @@ jobs: GH_AW_REPO_MEMORY_PATCH_SIZE_EXCEEDED_default: ${{ needs.push_repo_memory.outputs.patch_size_exceeded_default }} GH_AW_GROUP_REPORTS: "false" GH_AW_FAILURE_REPORT_AS_ISSUE: "true" + GH_AW_MISSING_TOOL_REPORT_AS_FAILURE: "true" + GH_AW_MISSING_DATA_REPORT_AS_FAILURE: "true" GH_AW_TIMEOUT_MINUTES: "15" + GH_AW_MAX_EFFECTIVE_TOKENS: "25000000" with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} script: | @@ -1004,11 +1144,18 @@ jobs: steps: - name: Setup Scripts id: setup - uses: github/gh-aw-actions/setup@ba90f2186d7ad780ec640f364005fa24e797b360 # v0.68.3 + uses: github/gh-aw-actions/setup@46d564922b082d0db93244972e8005ea6904ee5f # v0.76.1 with: destination: ${{ runner.temp }}/gh-aw/actions job-name: ${{ github.job }} trace-id: ${{ needs.activation.outputs.setup-trace-id }} + parent-span-id: ${{ needs.activation.outputs.setup-parent-span-id || needs.activation.outputs.setup-span-id }} + env: + GH_AW_SETUP_WORKFLOW_NAME: "PR Tooling Safety Check" + GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/labelops-pr-security-scan.lock.yml@${{ github.ref }} + GH_AW_INFO_VERSION: "1.0.52" + GH_AW_INFO_AWF_VERSION: "v0.25.55" + GH_AW_INFO_ENGINE_ID: "copilot" - name: Download agent output artifact id: download-agent-output continue-on-error: true @@ -1034,7 +1181,7 @@ jobs: rm -rf /tmp/gh-aw/sandbox/firewall/logs rm -rf /tmp/gh-aw/sandbox/firewall/audit - name: Download container images - run: bash "${RUNNER_TEMP}/gh-aw/actions/download_docker_images.sh" ghcr.io/github/gh-aw-firewall/agent:0.25.20 ghcr.io/github/gh-aw-firewall/api-proxy:0.25.20 ghcr.io/github/gh-aw-firewall/squid:0.25.20 + run: bash "${RUNNER_TEMP}/gh-aw/actions/download_docker_images.sh" ghcr.io/github/gh-aw-firewall/agent:0.25.55 ghcr.io/github/gh-aw-firewall/api-proxy:0.25.55 ghcr.io/github/gh-aw-firewall/squid:0.25.55 - name: Check if detection needed id: detection_guard if: always() @@ -1049,10 +1196,10 @@ jobs: echo "run_detection=false" >> "$GITHUB_OUTPUT" echo "Detection skipped: no agent outputs or patches to analyze" fi - - name: Clear MCP configuration for detection + - name: Clear MCP Config for detection if: always() && steps.detection_guard.outputs.run_detection == 'true' run: | - rm -f /tmp/gh-aw/mcp-config/mcp-servers.json + rm -f "${RUNNER_TEMP}/gh-aw/mcp-config/mcp-servers.json" rm -f /home/runner/.copilot/mcp-config.json rm -f "$GITHUB_WORKSPACE/.gemini/settings.json" - name: Prepare threat detection files @@ -1071,7 +1218,7 @@ jobs: ls -la /tmp/gh-aw/threat-detection/ 2>/dev/null || true - name: Setup threat detection if: always() && steps.detection_guard.outputs.run_detection == 'true' - uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: WORKFLOW_NAME: "PR Tooling Safety Check" WORKFLOW_DESCRIPTION: "PR Tooling Safety Check — labels open PRs with what phases they affect.\nRuns hourly. Text-only — reads diffs via GitHub API, never checks out\nor builds PR code. Labels tell maintainers what a PR touches before\nthey build, test, or load it into Copilot." @@ -1087,33 +1234,52 @@ jobs: run: | mkdir -p /tmp/gh-aw/threat-detection touch /tmp/gh-aw/threat-detection/detection.log + - name: Setup Node.js + uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 + with: + node-version: '24' + package-manager-cache: false - name: Install GitHub Copilot CLI - run: bash "${RUNNER_TEMP}/gh-aw/actions/install_copilot_cli.sh" 1.0.21 + run: bash "${RUNNER_TEMP}/gh-aw/actions/install_copilot_cli.sh" 1.0.52 env: GH_HOST: github.com - name: Install AWF binary - run: bash "${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh" v0.25.20 + run: bash "${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh" v0.25.55 - name: Execute GitHub Copilot CLI if: always() && steps.detection_guard.outputs.run_detection == 'true' + continue-on-error: true id: detection_agentic_execution # Copilot CLI tool arguments (sorted): timeout-minutes: 20 run: | set -o pipefail + printf '%s' "$(date +%s%3N)" > /tmp/gh-aw/agent_cli_start_ms.txt touch /tmp/gh-aw/agent-step-summary.md + GH_AW_NODE_BIN=$(command -v node 2>/dev/null || true) + export GH_AW_NODE_BIN + export COPILOT_API_KEY="$COPILOT_DUMMY_BYOK" (umask 177 && touch /tmp/gh-aw/threat-detection/detection.log) + printf '%s\n' '{"$schema":"https://github.com/github/gh-aw-firewall/releases/download/v0.25.55/awf-config.schema.json","network":{"allowDomains":["api.business.githubcopilot.com","api.enterprise.githubcopilot.com","api.github.com","api.githubcopilot.com","api.individual.githubcopilot.com","github.com","host.docker.internal","telemetry.enterprise.githubcopilot.com"]},"apiProxy":{"enabled":true,"enableTokenSteering":true,"maxRuns":500,"maxEffectiveTokens":25000000},"container":{"imageTag":"0.25.55"}}' > "${RUNNER_TEMP}/gh-aw/awf-config.json" + cp "${RUNNER_TEMP}/gh-aw/awf-config.json" /tmp/gh-aw/awf-config.json + GH_AW_DOCKER_HOST_PATH_PREFIX_ARGS="" + if [[ "${DOCKER_HOST:-}" =~ ^tcp:// ]]; then + GH_AW_DOCKER_HOST_PATH_PREFIX_ARGS="--docker-host-path-prefix /tmp/gh-aw" + fi # shellcheck disable=SC1003 - sudo -E awf --container-workdir "${GITHUB_WORKSPACE}" --mount "${RUNNER_TEMP}/gh-aw:${RUNNER_TEMP}/gh-aw:ro" --mount "${RUNNER_TEMP}/gh-aw:/host${RUNNER_TEMP}/gh-aw:ro" --env-all --exclude-env COPILOT_GITHUB_TOKEN --allow-domains api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,github.com,host.docker.internal,telemetry.enterprise.githubcopilot.com --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --audit-dir /tmp/gh-aw/sandbox/firewall/audit --enable-host-access --image-tag 0.25.20 --skip-pull --enable-api-proxy \ - -- /bin/bash -c 'node ${RUNNER_TEMP}/gh-aw/actions/copilot_driver.cjs /usr/local/bin/copilot --add-dir /tmp/gh-aw/ --log-level all --log-dir /tmp/gh-aw/sandbox/agent/logs/ --disable-builtin-mcps --no-ask-user --allow-all-tools --add-dir "${GITHUB_WORKSPACE}" --prompt "$(cat /tmp/gh-aw/aw-prompts/prompt.txt)"' 2>&1 | tee -a /tmp/gh-aw/threat-detection/detection.log + sudo -E awf --config "${RUNNER_TEMP}/gh-aw/awf-config.json" --container-workdir "${GITHUB_WORKSPACE}" --mount "${RUNNER_TEMP}/gh-aw:${RUNNER_TEMP}/gh-aw:ro" --mount "${RUNNER_TEMP}/gh-aw:/host${RUNNER_TEMP}/gh-aw:ro" ${GH_AW_DOCKER_HOST_PATH_PREFIX_ARGS} --env-all --exclude-env COPILOT_GITHUB_TOKEN --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --audit-dir /tmp/gh-aw/sandbox/firewall/audit --enable-host-access --allow-host-ports 80,443,8080 --skip-pull \ + -- /bin/bash -c 'export PATH="$(find /opt/hostedtoolcache /home/runner/work/_tool -maxdepth 5 -type d -name bin 2>/dev/null | tr '\''\n'\'' '\'':'\'')$PATH"; [ -n "$GOROOT" ] && export PATH="$GOROOT/bin:$PATH" || true && GH_AW_NODE_EXEC="${GH_AW_NODE_BIN:-}"; if [ -z "$GH_AW_NODE_EXEC" ] || [ ! -x "$GH_AW_NODE_EXEC" ]; then GH_AW_NODE_EXEC="$(command -v node 2>/dev/null || true)"; fi; if [ -z "$GH_AW_NODE_EXEC" ]; then echo "node runtime missing on this runner — check runtimes.node in workflow YAML" >&2; exit 127; fi; "$GH_AW_NODE_EXEC" ${RUNNER_TEMP}/gh-aw/actions/copilot_harness.cjs /usr/local/bin/copilot --add-dir /tmp/gh-aw/ --log-level all --log-dir /tmp/gh-aw/sandbox/agent/logs/ --disable-builtin-mcps --no-ask-user --allow-all-tools --add-dir "${GITHUB_WORKSPACE}" --prompt-file /tmp/gh-aw/aw-prompts/prompt.txt' 2>&1 | tee -a /tmp/gh-aw/threat-detection/detection.log env: + AWF_REFLECT_ENABLED: 1 COPILOT_AGENT_RUNNER_TYPE: STANDALONE + COPILOT_DUMMY_BYOK: dummy-byok-key-for-offline-mode COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }} - COPILOT_MODEL: ${{ vars.GH_AW_MODEL_DETECTION_COPILOT || '' }} + COPILOT_MODEL: ${{ vars.GH_AW_MODEL_DETECTION_COPILOT || 'claude-sonnet-4.6' }} GH_AW_PHASE: detection GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt - GH_AW_VERSION: v0.68.3 + GH_AW_VERSION: v0.76.1 GITHUB_API_URL: ${{ github.api_url }} GITHUB_AW: true + GITHUB_COPILOT_INTEGRATION_ID: agentic-workflows GITHUB_HEAD_REF: ${{ github.head_ref }} GITHUB_REF_NAME: ${{ github.ref_name }} GITHUB_SERVER_URL: ${{ github.server_url }} @@ -1134,16 +1300,35 @@ jobs: - name: Parse and conclude threat detection id: detection_conclusion if: always() - uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 + continue-on-error: true + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: RUN_DETECTION: ${{ steps.detection_guard.outputs.run_detection }} + DETECTION_AGENTIC_EXECUTION_OUTCOME: ${{ steps.detection_agentic_execution.outcome }} GH_AW_DETECTION_CONTINUE_ON_ERROR: "true" with: script: | - const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); - setupGlobals(core, github, context, exec, io, getOctokit); - const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_threat_detection_results.cjs'); - await main(); + try { + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io, getOctokit); + const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_threat_detection_results.cjs'); + await main(); + } catch (loadErr) { + const continueOnError = process.env.GH_AW_DETECTION_CONTINUE_ON_ERROR !== 'false'; + const detectionExecutionFailed = process.env.DETECTION_AGENTIC_EXECUTION_OUTCOME === 'failure'; + const msg = 'ERR_SYSTEM: \u274C Unexpected error loading threat detection module: ' + (loadErr && loadErr.message ? loadErr.message : String(loadErr)); + core.error(msg); + core.setOutput('reason', 'parse_error'); + if (continueOnError && !detectionExecutionFailed) { + core.warning('\u26A0\uFE0F ' + msg); + core.setOutput('conclusion', 'warning'); + core.setOutput('success', 'false'); + } else { + core.setOutput('conclusion', 'failure'); + core.setOutput('success', 'false'); + core.setFailed(msg); + } + } push_repo_memory: needs: @@ -1152,7 +1337,7 @@ jobs: - detection if: > always() && (!cancelled()) && (needs.detection.result == 'success' || needs.detection.result == 'skipped') && - needs.agent.result != 'skipped' + needs.agent.result == 'success' runs-on: ubuntu-slim permissions: contents: write @@ -1166,11 +1351,18 @@ jobs: steps: - name: Setup Scripts id: setup - uses: github/gh-aw-actions/setup@ba90f2186d7ad780ec640f364005fa24e797b360 # v0.68.3 + uses: github/gh-aw-actions/setup@46d564922b082d0db93244972e8005ea6904ee5f # v0.76.1 with: destination: ${{ runner.temp }}/gh-aw/actions job-name: ${{ github.job }} trace-id: ${{ needs.activation.outputs.setup-trace-id }} + parent-span-id: ${{ needs.activation.outputs.setup-parent-span-id || needs.activation.outputs.setup-span-id }} + env: + GH_AW_SETUP_WORKFLOW_NAME: "PR Tooling Safety Check" + GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/labelops-pr-security-scan.lock.yml@${{ github.ref }} + GH_AW_INFO_VERSION: "1.0.52" + GH_AW_INFO_AWF_VERSION: "v0.25.55" + GH_AW_INFO_ENGINE_ID: "copilot" - name: Checkout repository uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: @@ -1198,7 +1390,7 @@ jobs: - name: Push repo-memory changes (default) id: push_repo_memory_default if: always() - uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: GH_TOKEN: ${{ github.token }} GITHUB_RUN_ID: ${{ github.run_id }} @@ -1207,7 +1399,7 @@ jobs: MEMORY_ID: default TARGET_REPO: ${{ github.repository }} BRANCH_NAME: safety/scanned-PRs - MAX_FILE_SIZE: 10240 + MAX_FILE_SIZE: 102400 MAX_FILE_COUNT: 100 MAX_PATCH_SIZE: 10240 ALLOWED_EXTENSIONS: '[]' @@ -1239,8 +1431,10 @@ jobs: GH_AW_EFFECTIVE_TOKENS: ${{ needs.agent.outputs.effective_tokens }} GH_AW_ENGINE_ID: "copilot" GH_AW_ENGINE_MODEL: ${{ needs.agent.outputs.model }} + GH_AW_ENGINE_VERSION: "1.0.52" GH_AW_WORKFLOW_ID: "labelops-pr-security-scan" GH_AW_WORKFLOW_NAME: "PR Tooling Safety Check" + GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/labelops-pr-security-scan.md" outputs: code_push_failure_count: ${{ steps.process_safe_outputs.outputs.code_push_failure_count }} code_push_failure_errors: ${{ steps.process_safe_outputs.outputs.code_push_failure_errors }} @@ -1253,11 +1447,18 @@ jobs: steps: - name: Setup Scripts id: setup - uses: github/gh-aw-actions/setup@ba90f2186d7ad780ec640f364005fa24e797b360 # v0.68.3 + uses: github/gh-aw-actions/setup@46d564922b082d0db93244972e8005ea6904ee5f # v0.76.1 with: destination: ${{ runner.temp }}/gh-aw/actions job-name: ${{ github.job }} trace-id: ${{ needs.activation.outputs.setup-trace-id }} + parent-span-id: ${{ needs.activation.outputs.setup-parent-span-id || needs.activation.outputs.setup-span-id }} + env: + GH_AW_SETUP_WORKFLOW_NAME: "PR Tooling Safety Check" + GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/labelops-pr-security-scan.lock.yml@${{ github.ref }} + GH_AW_INFO_VERSION: "1.0.52" + GH_AW_INFO_AWF_VERSION: "v0.25.55" + GH_AW_INFO_ENGINE_ID: "copilot" - name: Download agent output artifact id: download-agent-output continue-on-error: true @@ -1283,10 +1484,11 @@ jobs: echo "GH_HOST=${GH_HOST}" >> "$GITHUB_ENV" - name: Process Safe Outputs id: process_safe_outputs - uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }} - GH_AW_ALLOWED_DOMAINS: "*.githubusercontent.com,api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,docs.github.com,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.blog,github.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,ppa.launchpad.net,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com,www.googleapis.com" + GH_AW_COMMENT_ID: ${{ needs.activation.outputs.comment_id }} + GH_AW_ALLOWED_DOMAINS: "*.githubusercontent.com,api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,docs.github.com,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.blog,github.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,patch-diff.githubusercontent.com,ppa.launchpad.net,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com,www.googleapis.com" GITHUB_SERVER_URL: ${{ github.server_url }} GITHUB_API_URL: ${{ github.api_url }} GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"add_comment\":{\"hide_older_comments\":true,\"max\":25,\"target\":\"*\"},\"add_labels\":{\"allowed\":[\"AI-Tooling-Check-Scanned-Clean\",\"AI-Tooling-Check-Bypassed\",\"⚠️ Affects-Build-Infra\",\"⚠️ Affects-Compiler-Output\",\"⚠️ Affects-Bootstrap\",\"⚠️ Affects-Restore\",\"⚠️ Affects-Design-Time\",\"⚠️ Affects-Test-Tooling\",\"⚠️ Affects-Agent-Config\",\"⚠️ Suspicious-Prompting\",\"⚠️ Scope-Review-Needed\"],\"max\":50,\"target\":\"*\"},\"create_report_incomplete_issue\":{},\"missing_data\":{},\"missing_tool\":{},\"noop\":{\"max\":1,\"report-as-issue\":\"false\"},\"report_incomplete\":{}}" diff --git a/.github/workflows/regression-pr-shepherd.lock.yml b/.github/workflows/regression-pr-shepherd.lock.yml index 5134aa4866e..affd7768ea0 100644 --- a/.github/workflows/regression-pr-shepherd.lock.yml +++ b/.github/workflows/regression-pr-shepherd.lock.yml @@ -1,5 +1,5 @@ -# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"5e2628326458dcf774cd1f570bdc0c5cc7e94cfd93c9e30843b0f6fb8ff3989e","compiler_version":"v0.72.1","strict":true,"agent_id":"copilot"} -# gh-aw-manifest: {"version":1,"secrets":["COPILOT_GITHUB_TOKEN","GH_AW_CI_TRIGGER_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/checkout","sha":"de0fac2e4500dabe0009e67214ff5f5447ce83dd","version":"v6.0.2"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/setup-node","sha":"48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e","version":"v6.4.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"},{"repo":"github/gh-aw-actions/setup","sha":"bc56a0cad2f450c562810785ef38649c04db812a","version":"v0.72.1"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.25.41"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.41"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.25.41"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.3.6","digest":"sha256:2bb8eef86006a4c5963c55616a9c51c32f27bfdecb023b8aa6f91f6718d9171c","pinned_image":"ghcr.io/github/gh-aw-mcpg:v0.3.6@sha256:2bb8eef86006a4c5963c55616a9c51c32f27bfdecb023b8aa6f91f6718d9171c"},{"image":"ghcr.io/github/github-mcp-server:v1.0.3","digest":"sha256:2ac27ef03461ef2b877031b838a7d1fd7f12b12d4ace7796d8cad91446d55959","pinned_image":"ghcr.io/github/github-mcp-server:v1.0.3@sha256:2ac27ef03461ef2b877031b838a7d1fd7f12b12d4ace7796d8cad91446d55959"},{"image":"node:lts-alpine","digest":"sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f","pinned_image":"node:lts-alpine@sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f"}]} +# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"5e2628326458dcf774cd1f570bdc0c5cc7e94cfd93c9e30843b0f6fb8ff3989e","compiler_version":"v0.76.1","strict":true,"agent_id":"copilot"} +# gh-aw-manifest: {"version":1,"secrets":["COPILOT_GITHUB_TOKEN","GH_AW_CI_TRIGGER_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/checkout","sha":"de0fac2e4500dabe0009e67214ff5f5447ce83dd","version":"v6.0.2"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/setup-node","sha":"48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e","version":"v6.4.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"},{"repo":"github/gh-aw-actions/setup","sha":"46d564922b082d0db93244972e8005ea6904ee5f","version":"v0.76.1"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.25.55"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.55"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.25.55"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.3.19"},{"image":"ghcr.io/github/github-mcp-server:v1.0.4","digest":"sha256:e3816a476a977cfb836e7d221510011436c654d11861db66ecfd826601aba6a4","pinned_image":"ghcr.io/github/github-mcp-server:v1.0.4@sha256:e3816a476a977cfb836e7d221510011436c654d11861db66ecfd826601aba6a4"},{"image":"node:lts-alpine","digest":"sha256:2bdb65ed1dab192432bc31c95f94155ca5ad7fc1392fb7eb7526ab682fa5bf14","pinned_image":"node:lts-alpine@sha256:2bdb65ed1dab192432bc31c95f94155ca5ad7fc1392fb7eb7526ab682fa5bf14"}]} # ___ _ _ # / _ \ | | (_) # | |_| | __ _ ___ _ __ | |_ _ ___ @@ -14,7 +14,7 @@ # \ /\ / (_) | | | | ( | | | | (_) \ V V /\__ \ # \/ \/ \___/|_| |_|\_\|_| |_|\___/ \_/\_/ |___/ # -# This file was automatically generated by gh-aw (v0.72.1). DO NOT EDIT. +# This file was automatically generated by gh-aw (v0.76.1). DO NOT EDIT. # # To update this file, edit the corresponding .md file and run: # gh aw compile @@ -40,18 +40,18 @@ # - actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 # - actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 # - actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 -# - github/gh-aw-actions/setup@bc56a0cad2f450c562810785ef38649c04db812a # v0.72.1 +# - github/gh-aw-actions/setup@46d564922b082d0db93244972e8005ea6904ee5f # v0.76.1 # # Container images used: -# - ghcr.io/github/gh-aw-firewall/agent:0.25.41 -# - ghcr.io/github/gh-aw-firewall/api-proxy:0.25.41 -# - ghcr.io/github/gh-aw-firewall/squid:0.25.41 -# - ghcr.io/github/gh-aw-mcpg:v0.3.6@sha256:2bb8eef86006a4c5963c55616a9c51c32f27bfdecb023b8aa6f91f6718d9171c -# - ghcr.io/github/github-mcp-server:v1.0.3@sha256:2ac27ef03461ef2b877031b838a7d1fd7f12b12d4ace7796d8cad91446d55959 -# - node:lts-alpine@sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f +# - ghcr.io/github/gh-aw-firewall/agent:0.25.55 +# - ghcr.io/github/gh-aw-firewall/api-proxy:0.25.55 +# - ghcr.io/github/gh-aw-firewall/squid:0.25.55 +# - ghcr.io/github/gh-aw-mcpg:v0.3.19 +# - ghcr.io/github/github-mcp-server:v1.0.4@sha256:e3816a476a977cfb836e7d221510011436c654d11861db66ecfd826601aba6a4 +# - node:lts-alpine@sha256:2bdb65ed1dab192432bc31c95f94155ca5ad7fc1392fb7eb7526ab682fa5bf14 name: "Regression PR Shepherd" -"on": +on: schedule: - cron: "54 */4 * * *" # Friendly format: every 4h (scattered) @@ -59,7 +59,7 @@ name: "Regression PR Shepherd" inputs: aw_context: default: "" - description: Agent caller context (used internally by Agentic Workflows). + description: "Agent caller context (used internally by Agentic Workflows)." required: false type: string @@ -83,35 +83,39 @@ jobs: lockdown_check_failed: ${{ steps.generate_aw_info.outputs.lockdown_check_failed == 'true' }} model: ${{ steps.generate_aw_info.outputs.model }} secret_verification_result: ${{ steps.validate-secret.outputs.verification_result }} + setup-parent-span-id: ${{ steps.setup.outputs.parent-span-id || steps.setup.outputs.span-id }} + setup-span-id: ${{ steps.setup.outputs.span-id }} setup-trace-id: ${{ steps.setup.outputs.trace-id }} stale_lock_file_failed: ${{ steps.check-lock-file.outputs.stale_lock_file_failed == 'true' }} steps: - name: Setup Scripts id: setup - uses: github/gh-aw-actions/setup@bc56a0cad2f450c562810785ef38649c04db812a # v0.72.1 + uses: github/gh-aw-actions/setup@46d564922b082d0db93244972e8005ea6904ee5f # v0.76.1 with: destination: ${{ runner.temp }}/gh-aw/actions job-name: ${{ github.job }} env: GH_AW_SETUP_WORKFLOW_NAME: "Regression PR Shepherd" GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/regression-pr-shepherd.lock.yml@${{ github.ref }} - GH_AW_INFO_VERSION: "1.0.40" + GH_AW_INFO_VERSION: "1.0.52" + GH_AW_INFO_AWF_VERSION: "v0.25.55" + GH_AW_INFO_ENGINE_ID: "copilot" - name: Generate agentic run info id: generate_aw_info env: GH_AW_INFO_ENGINE_ID: "copilot" GH_AW_INFO_ENGINE_NAME: "GitHub Copilot CLI" GH_AW_INFO_MODEL: ${{ vars.GH_AW_MODEL_AGENT_COPILOT || 'claude-sonnet-4.6' }} - GH_AW_INFO_VERSION: "1.0.40" - GH_AW_INFO_AGENT_VERSION: "1.0.40" - GH_AW_INFO_CLI_VERSION: "v0.72.1" + GH_AW_INFO_VERSION: "1.0.52" + GH_AW_INFO_AGENT_VERSION: "1.0.52" + GH_AW_INFO_CLI_VERSION: "v0.76.1" GH_AW_INFO_WORKFLOW_NAME: "Regression PR Shepherd" GH_AW_INFO_EXPERIMENTAL: "false" GH_AW_INFO_SUPPORTS_TOOLS_ALLOWLIST: "true" GH_AW_INFO_STAGED: "false" GH_AW_INFO_ALLOWED_DOMAINS: '["defaults","dotnet"]' GH_AW_INFO_FIREWALL_ENABLED: "true" - GH_AW_INFO_AWF_VERSION: "v0.25.41" + GH_AW_INFO_AWF_VERSION: "v0.25.55" GH_AW_INFO_AWMG_VERSION: "" GH_AW_INFO_FIREWALL_TYPE: "squid" GH_AW_COMPILED_STRICT: "true" @@ -134,6 +138,7 @@ jobs: sparse-checkout: | .github .agents + .antigravity .claude .codex .crush @@ -144,8 +149,8 @@ jobs: fetch-depth: 1 - name: Save agent config folders for base branch restoration env: - GH_AW_AGENT_FOLDERS: ".agents .claude .codex .crush .gemini .github .opencode .pi" - GH_AW_AGENT_FILES: ".crush.json AGENTS.md CLAUDE.md GEMINI.md PI.md opencode.jsonc" + GH_AW_AGENT_FOLDERS: ".agents .antigravity .claude .codex .crush .gemini .github .opencode .pi" + GH_AW_AGENT_FILES: ".crush.json AGENTS.md ANTIGRAVITY.md CLAUDE.md GEMINI.md PI.md opencode.jsonc" # poutine:ignore untrusted_checkout_exec run: bash "${RUNNER_TEMP}/gh-aw/actions/save_base_github_folders.sh" - name: Check workflow lock file @@ -163,7 +168,7 @@ jobs: - name: Check compile-agentic version uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: - GH_AW_COMPILED_VERSION: "v0.72.1" + GH_AW_COMPILED_VERSION: "v0.76.1" with: script: | const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); @@ -174,11 +179,11 @@ jobs: env: GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt GH_AW_SAFE_OUTPUTS: ${{ runner.temp }}/gh-aw/safeoutputs/outputs.jsonl + GH_AW_EXPR_1A3A194A: ${{ github.event.discussion.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'discussion' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }} + GH_AW_EXPR_463A214A: ${{ github.event.pull_request.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'pull_request' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }} + GH_AW_EXPR_802A9F6A: ${{ github.event.issue.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'issue' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }} + GH_AW_EXPR_FF1D34CE: ${{ github.event.comment.id || fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').comment_id }} GH_AW_GITHUB_ACTOR: ${{ github.actor }} - GH_AW_GITHUB_EVENT_COMMENT_ID: ${{ github.event.comment.id }} - GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER: ${{ github.event.discussion.number }} - GH_AW_GITHUB_EVENT_ISSUE_NUMBER: ${{ github.event.issue.number }} - GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }} GH_AW_GITHUB_REPOSITORY: ${{ github.repository }} GH_AW_GITHUB_RUN_ID: ${{ github.run_id }} GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }} @@ -207,28 +212,28 @@ jobs: cat << 'GH_AW_PROMPT_8960ae325e3fb07b_EOF' The following GitHub context information is available for this workflow: - {{#if __GH_AW_GITHUB_ACTOR__ }} + {{#if github.actor}} - **actor**: __GH_AW_GITHUB_ACTOR__ {{/if}} - {{#if __GH_AW_GITHUB_REPOSITORY__ }} + {{#if github.repository}} - **repository**: __GH_AW_GITHUB_REPOSITORY__ {{/if}} - {{#if __GH_AW_GITHUB_WORKSPACE__ }} + {{#if github.workspace}} - **workspace**: __GH_AW_GITHUB_WORKSPACE__ {{/if}} - {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }} - - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ + {{#if github.event.issue.number || (github.aw.context.item_type == 'issue' && github.aw.context.item_number)}} + - **issue-number**: #__GH_AW_EXPR_802A9F6A__ {{/if}} - {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }} - - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ + {{#if github.event.discussion.number || (github.aw.context.item_type == 'discussion' && github.aw.context.item_number)}} + - **discussion-number**: #__GH_AW_EXPR_1A3A194A__ {{/if}} - {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }} - - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ + {{#if github.event.pull_request.number || (github.aw.context.item_type == 'pull_request' && github.aw.context.item_number)}} + - **pull-request-number**: #__GH_AW_EXPR_463A214A__ {{/if}} - {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }} - - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__ + {{#if github.event.comment.id || github.aw.context.comment_id}} + - **comment-id**: __GH_AW_EXPR_FF1D34CE__ {{/if}} - {{#if __GH_AW_GITHUB_RUN_ID__ }} + {{#if github.run_id}} - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__ {{/if}} @@ -255,17 +260,17 @@ jobs: uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt + GH_AW_EXPR_1A3A194A: ${{ github.event.discussion.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'discussion' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }} + GH_AW_EXPR_463A214A: ${{ github.event.pull_request.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'pull_request' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }} + GH_AW_EXPR_802A9F6A: ${{ github.event.issue.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'issue' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }} + GH_AW_EXPR_FF1D34CE: ${{ github.event.comment.id || fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').comment_id }} GH_AW_GITHUB_ACTOR: ${{ github.actor }} - GH_AW_GITHUB_EVENT_COMMENT_ID: ${{ github.event.comment.id }} - GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER: ${{ github.event.discussion.number }} - GH_AW_GITHUB_EVENT_ISSUE_NUMBER: ${{ github.event.issue.number }} - GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }} GH_AW_GITHUB_REPOSITORY: ${{ github.repository }} GH_AW_GITHUB_RUN_ID: ${{ github.run_id }} GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }} GH_AW_MCP_CLI_SERVERS_LIST: '- `safeoutputs` — run `safeoutputs --help` to see available tools' GH_AW_MEMORY_BRANCH_NAME: 'memory/regression-pr-shepherd' - GH_AW_MEMORY_CONSTRAINTS: "\n\n**Constraints:**\n- **Max File Size**: 10240 bytes (0.01 MB) per file\n- **Max File Count**: 100 files per commit\n- **Max Patch Size**: 10240 bytes (10 KB) total per push (max: 100 KB)\n" + GH_AW_MEMORY_CONSTRAINTS: "\n\n**Constraints:**\n- **Max File Size**: 102400 bytes (0.10 MB) per file\n- **Max File Count**: 100 files per commit\n- **Max Patch Size**: 10240 bytes (10 KB) total per push (max: 1024 KB)\n" GH_AW_MEMORY_DESCRIPTION: '' GH_AW_MEMORY_DIR: '/tmp/gh-aw/repo-memory/default/' GH_AW_MEMORY_TARGET_REPO: ' of the current repository' @@ -281,11 +286,11 @@ jobs: return await substitutePlaceholders({ file: process.env.GH_AW_PROMPT, substitutions: { + GH_AW_EXPR_1A3A194A: process.env.GH_AW_EXPR_1A3A194A, + GH_AW_EXPR_463A214A: process.env.GH_AW_EXPR_463A214A, + GH_AW_EXPR_802A9F6A: process.env.GH_AW_EXPR_802A9F6A, + GH_AW_EXPR_FF1D34CE: process.env.GH_AW_EXPR_FF1D34CE, GH_AW_GITHUB_ACTOR: process.env.GH_AW_GITHUB_ACTOR, - GH_AW_GITHUB_EVENT_COMMENT_ID: process.env.GH_AW_GITHUB_EVENT_COMMENT_ID, - GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER: process.env.GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER, - GH_AW_GITHUB_EVENT_ISSUE_NUMBER: process.env.GH_AW_GITHUB_EVENT_ISSUE_NUMBER, - GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER: process.env.GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER, GH_AW_GITHUB_REPOSITORY: process.env.GH_AW_GITHUB_REPOSITORY, GH_AW_GITHUB_RUN_ID: process.env.GH_AW_GITHUB_RUN_ID, GH_AW_GITHUB_WORKSPACE: process.env.GH_AW_GITHUB_WORKSPACE, @@ -322,6 +327,7 @@ jobs: /tmp/gh-aw/github_rate_limits.jsonl /tmp/gh-aw/base /tmp/gh-aw/.github/agents + /tmp/gh-aw/.github/skills if-no-files-found: ignore retention-days: 1 @@ -339,29 +345,35 @@ jobs: GH_AW_MCP_LOG_DIR: /tmp/gh-aw/mcp-logs/safeoutputs GH_AW_WORKFLOW_ID_SANITIZED: regressionprshepherd outputs: - agentic_engine_timeout: ${{ steps.detect-copilot-errors.outputs.agentic_engine_timeout || 'false' }} + agentic_engine_timeout: ${{ steps.detect-agent-errors.outputs.agentic_engine_timeout || 'false' }} checkout_pr_success: ${{ steps.checkout-pr.outputs.checkout_pr_success || 'true' }} effective_tokens: ${{ steps.parse-mcp-gateway.outputs.effective_tokens }} + effective_tokens_rate_limit_error: ${{ steps.parse-mcp-gateway.outputs.effective_tokens_rate_limit_error || 'false' }} has_patch: ${{ steps.collect_output.outputs.has_patch }} - inference_access_error: ${{ steps.detect-copilot-errors.outputs.inference_access_error || 'false' }} - mcp_policy_error: ${{ steps.detect-copilot-errors.outputs.mcp_policy_error || 'false' }} + inference_access_error: ${{ steps.detect-agent-errors.outputs.inference_access_error || 'false' }} + mcp_policy_error: ${{ steps.detect-agent-errors.outputs.mcp_policy_error || 'false' }} model: ${{ needs.activation.outputs.model }} - model_not_supported_error: ${{ steps.detect-copilot-errors.outputs.model_not_supported_error || 'false' }} + model_not_supported_error: ${{ steps.detect-agent-errors.outputs.model_not_supported_error || 'false' }} output: ${{ steps.collect_output.outputs.output }} output_types: ${{ steps.collect_output.outputs.output_types }} + setup-parent-span-id: ${{ steps.setup.outputs.parent-span-id || steps.setup.outputs.span-id }} + setup-span-id: ${{ steps.setup.outputs.span-id }} setup-trace-id: ${{ steps.setup.outputs.trace-id }} steps: - name: Setup Scripts id: setup - uses: github/gh-aw-actions/setup@bc56a0cad2f450c562810785ef38649c04db812a # v0.72.1 + uses: github/gh-aw-actions/setup@46d564922b082d0db93244972e8005ea6904ee5f # v0.76.1 with: destination: ${{ runner.temp }}/gh-aw/actions job-name: ${{ github.job }} trace-id: ${{ needs.activation.outputs.setup-trace-id }} + parent-span-id: ${{ needs.activation.outputs.setup-parent-span-id || needs.activation.outputs.setup-span-id }} env: GH_AW_SETUP_WORKFLOW_NAME: "Regression PR Shepherd" GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/regression-pr-shepherd.lock.yml@${{ github.ref }} - GH_AW_INFO_VERSION: "1.0.40" + GH_AW_INFO_VERSION: "1.0.52" + GH_AW_INFO_AWF_VERSION: "v0.25.55" + GH_AW_INFO_ENGINE_ID: "copilot" - name: Set runtime paths id: set-runtime-paths run: | @@ -418,11 +430,11 @@ jobs: const { main } = require('${{ runner.temp }}/gh-aw/actions/checkout_pr_branch.cjs'); await main(); - name: Install GitHub Copilot CLI - run: bash "${RUNNER_TEMP}/gh-aw/actions/install_copilot_cli.sh" 1.0.40 + run: bash "${RUNNER_TEMP}/gh-aw/actions/install_copilot_cli.sh" 1.0.52 env: GH_HOST: github.com - name: Install AWF binary - run: bash "${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh" v0.25.41 + run: bash "${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh" v0.25.55 - name: Parse integrity filter lists id: parse-guard-vars env: @@ -438,23 +450,27 @@ jobs: - name: Restore agent config folders from base branch if: steps.checkout-pr.outcome == 'success' env: - GH_AW_AGENT_FOLDERS: ".agents .claude .codex .crush .gemini .github .opencode .pi" - GH_AW_AGENT_FILES: ".crush.json AGENTS.md CLAUDE.md GEMINI.md PI.md opencode.jsonc" + GH_AW_AGENT_FOLDERS: ".agents .antigravity .claude .codex .crush .gemini .github .opencode .pi" + GH_AW_AGENT_FILES: ".crush.json AGENTS.md ANTIGRAVITY.md CLAUDE.md GEMINI.md PI.md opencode.jsonc" run: bash "${RUNNER_TEMP}/gh-aw/actions/restore_base_github_folders.sh" - name: Restore inline sub-agents from activation artifact env: GH_AW_SUB_AGENT_DIR: ".github/agents" GH_AW_SUB_AGENT_EXT: ".agent.md" run: bash "${RUNNER_TEMP}/gh-aw/actions/restore_inline_sub_agents.sh" + - name: Restore inline skills from activation artifact + env: + GH_AW_SKILL_DIR: ".github/skills" + run: bash "${RUNNER_TEMP}/gh-aw/actions/restore_inline_skills.sh" - name: Download container images - run: bash "${RUNNER_TEMP}/gh-aw/actions/download_docker_images.sh" ghcr.io/github/gh-aw-firewall/agent:0.25.41 ghcr.io/github/gh-aw-firewall/api-proxy:0.25.41 ghcr.io/github/gh-aw-firewall/squid:0.25.41 ghcr.io/github/gh-aw-mcpg:v0.3.6@sha256:2bb8eef86006a4c5963c55616a9c51c32f27bfdecb023b8aa6f91f6718d9171c ghcr.io/github/github-mcp-server:v1.0.3@sha256:2ac27ef03461ef2b877031b838a7d1fd7f12b12d4ace7796d8cad91446d55959 node:lts-alpine@sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f + run: bash "${RUNNER_TEMP}/gh-aw/actions/download_docker_images.sh" ghcr.io/github/gh-aw-firewall/agent:0.25.55 ghcr.io/github/gh-aw-firewall/api-proxy:0.25.55 ghcr.io/github/gh-aw-firewall/squid:0.25.55 ghcr.io/github/gh-aw-mcpg:v0.3.19 ghcr.io/github/github-mcp-server:v1.0.4@sha256:e3816a476a977cfb836e7d221510011436c654d11861db66ecfd826601aba6a4 node:lts-alpine@sha256:2bdb65ed1dab192432bc31c95f94155ca5ad7fc1392fb7eb7526ab682fa5bf14 - name: Generate Safe Outputs Config run: | mkdir -p "${RUNNER_TEMP}/gh-aw/safeoutputs" mkdir -p /tmp/gh-aw/safeoutputs mkdir -p /tmp/gh-aw/mcp-logs/safeoutputs cat > "${RUNNER_TEMP}/gh-aw/safeoutputs/config.json" << 'GH_AW_SAFE_OUTPUTS_CONFIG_b679b4ba9044cac3_EOF' - {"add_comment":{"hide_older_comments":true,"max":5,"target":"*"},"create_report_incomplete_issue":{},"missing_data":{},"missing_tool":{},"noop":{"max":1,"report-as-issue":"false"},"push_repo_memory":{"memories":[{"dir":"/tmp/gh-aw/repo-memory/default","id":"default","max_file_count":100,"max_file_size":10240,"max_patch_size":10240}]},"push_to_pull_request_branch":{"allowed_files":["tests/**","vsintegration/tests/**"],"if_no_changes":"warn","labels":["AI-Issue-Regression-PR"],"max":10,"max_patch_size":1024,"protect_top_level_dot_folders":true,"protected_files":["package.json","bun.lockb","bunfig.toml","deno.json","deno.jsonc","deno.lock","global.json","NuGet.Config","Directory.Packages.props","mix.exs","mix.lock","go.mod","go.sum","stack.yaml","stack.yaml.lock","pom.xml","build.gradle","build.gradle.kts","settings.gradle","settings.gradle.kts","gradle.properties","package-lock.json","yarn.lock","pnpm-lock.yaml","npm-shrinkwrap.json","requirements.txt","Pipfile","Pipfile.lock","pyproject.toml","setup.py","setup.cfg","Gemfile","Gemfile.lock","uv.lock","CODEOWNERS","DESIGN.md","README.md","CONTRIBUTING.md","CHANGELOG.md","SECURITY.md","CODE_OF_CONDUCT.md","AGENTS.md","CLAUDE.md","GEMINI.md"],"protected_files_policy":"fallback-to-issue","target":"*","title_prefix":"Add regression test: "},"remove_labels":{"allowed":["AI-thinks-issue-fixed"],"max":5,"target":"*"},"report_incomplete":{}} + {"add_comment":{"hide_older_comments":true,"max":5,"target":"*"},"create_report_incomplete_issue":{},"missing_data":{},"missing_tool":{},"noop":{"max":1,"report-as-issue":"false"},"push_repo_memory":{"memories":[{"dir":"/tmp/gh-aw/repo-memory/default","id":"default","max_file_count":100,"max_file_size":102400,"max_patch_size":10240}]},"push_to_pull_request_branch":{"allowed_files":["tests/**","vsintegration/tests/**"],"if_no_changes":"warn","max":10,"max_patch_size":1024,"protect_top_level_dot_folders":true,"protected_files":["package.json","bun.lockb","bunfig.toml","deno.json","deno.jsonc","deno.lock","global.json","NuGet.Config","Directory.Packages.props","mix.exs","mix.lock","go.mod","go.sum","stack.yaml","stack.yaml.lock","pom.xml","build.gradle","build.gradle.kts","settings.gradle","settings.gradle.kts","gradle.properties","package-lock.json","yarn.lock","pnpm-lock.yaml","npm-shrinkwrap.json","requirements.txt","Pipfile","Pipfile.lock","pyproject.toml","setup.py","setup.cfg","Gemfile","Gemfile.lock","uv.lock","CODEOWNERS","DESIGN.md","README.md","CONTRIBUTING.md","CHANGELOG.md","SECURITY.md","CODE_OF_CONDUCT.md","AGENTS.md","CLAUDE.md","GEMINI.md"],"protected_files_policy":"fallback-to-issue","required_labels":["AI-Issue-Regression-PR"],"target":"*","title_prefix":"Add regression test: "},"remove_labels":{"allowed":["AI-thinks-issue-fixed"],"max":5,"target":"*"},"report_incomplete":{}} GH_AW_SAFE_OUTPUTS_CONFIG_b679b4ba9044cac3_EOF - name: Generate Safe Outputs Tools env: @@ -678,8 +694,13 @@ jobs: export GH_AW_ENGINE="copilot" MCP_GATEWAY_UID=$(id -u 2>/dev/null || echo '0') MCP_GATEWAY_GID=$(id -g 2>/dev/null || echo '0') - DOCKER_SOCK_GID=$(stat -c '%g' /var/run/docker.sock 2>/dev/null || echo '0') - export MCP_GATEWAY_DOCKER_COMMAND='docker run -i --rm --network host --add-host host.docker.internal:127.0.0.1 --user '"${MCP_GATEWAY_UID}"':'"${MCP_GATEWAY_GID}"' --group-add '"${DOCKER_SOCK_GID}"' -v /var/run/docker.sock:/var/run/docker.sock -e MCP_GATEWAY_PORT -e MCP_GATEWAY_DOMAIN -e MCP_GATEWAY_API_KEY -e MCP_GATEWAY_PAYLOAD_DIR -e MCP_GATEWAY_PAYLOAD_SIZE_THRESHOLD -e DEBUG -e MCP_GATEWAY_LOG_DIR -e GH_AW_MCP_LOG_DIR -e GH_AW_SAFE_OUTPUTS -e GH_AW_SAFE_OUTPUTS_CONFIG_PATH -e GH_AW_SAFE_OUTPUTS_TOOLS_PATH -e GH_AW_ASSETS_BRANCH -e GH_AW_ASSETS_MAX_SIZE_KB -e GH_AW_ASSETS_ALLOWED_EXTS -e DEFAULT_BRANCH -e GITHUB_MCP_SERVER_TOKEN -e GITHUB_MCP_GUARD_MIN_INTEGRITY -e GITHUB_MCP_GUARD_REPOS -e GITHUB_REPOSITORY -e GITHUB_SERVER_URL -e GITHUB_SHA -e GITHUB_WORKSPACE -e GITHUB_TOKEN -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RUN_ATTEMPT -e GITHUB_JOB -e GITHUB_ACTION -e GITHUB_EVENT_NAME -e GITHUB_EVENT_PATH -e GITHUB_ACTOR -e GITHUB_ACTOR_ID -e GITHUB_TRIGGERING_ACTOR -e GITHUB_WORKFLOW -e GITHUB_WORKFLOW_REF -e GITHUB_WORKFLOW_SHA -e GITHUB_REF -e GITHUB_REF_NAME -e GITHUB_REF_TYPE -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GH_AW_SAFE_OUTPUTS_PORT -e GH_AW_SAFE_OUTPUTS_API_KEY -v /tmp/gh-aw/mcp-payloads:/tmp/gh-aw/mcp-payloads:rw -v /opt:/opt:ro -v /tmp:/tmp:rw -v '"${GITHUB_WORKSPACE}"':'"${GITHUB_WORKSPACE}"':rw ghcr.io/github/gh-aw-mcpg:v0.3.6' + case "${DOCKER_HOST:-}" in + unix://* ) DOCKER_SOCK_PATH="${DOCKER_HOST#unix://}" ;; + /* ) DOCKER_SOCK_PATH="$DOCKER_HOST" ;; + * ) DOCKER_SOCK_PATH=/var/run/docker.sock ;; + esac + DOCKER_SOCK_GID=$(stat -c '%g' "$DOCKER_SOCK_PATH" 2>/dev/null || echo '0') + export MCP_GATEWAY_DOCKER_COMMAND='docker run -i --rm --network host --add-host host.docker.internal:127.0.0.1 --user '"${MCP_GATEWAY_UID}"':'"${MCP_GATEWAY_GID}"' --group-add '"${DOCKER_SOCK_GID}"' -v '"${DOCKER_SOCK_PATH}"':/var/run/docker.sock -e MCP_GATEWAY_PORT -e MCP_GATEWAY_DOMAIN -e MCP_GATEWAY_API_KEY -e MCP_GATEWAY_PAYLOAD_DIR -e MCP_GATEWAY_PAYLOAD_SIZE_THRESHOLD -e DOCKER_HOST=unix:///var/run/docker.sock -e DEBUG -e MCP_GATEWAY_LOG_DIR -e GH_AW_MCP_LOG_DIR -e GH_AW_SAFE_OUTPUTS -e GH_AW_SAFE_OUTPUTS_CONFIG_PATH -e GH_AW_SAFE_OUTPUTS_TOOLS_PATH -e GH_AW_ASSETS_BRANCH -e GH_AW_ASSETS_MAX_SIZE_KB -e GH_AW_ASSETS_ALLOWED_EXTS -e DEFAULT_BRANCH -e GITHUB_MCP_SERVER_TOKEN -e GITHUB_MCP_GUARD_MIN_INTEGRITY -e GITHUB_MCP_GUARD_REPOS -e GITHUB_REPOSITORY -e GITHUB_SERVER_URL -e GITHUB_SHA -e GITHUB_WORKSPACE -e GITHUB_TOKEN -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RUN_ATTEMPT -e GITHUB_JOB -e GITHUB_ACTION -e GITHUB_EVENT_NAME -e GITHUB_EVENT_PATH -e GITHUB_ACTOR -e GITHUB_ACTOR_ID -e GITHUB_TRIGGERING_ACTOR -e GITHUB_WORKFLOW -e GITHUB_WORKFLOW_REF -e GITHUB_WORKFLOW_SHA -e GITHUB_REF -e GITHUB_REF_NAME -e GITHUB_REF_TYPE -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GH_AW_SAFE_OUTPUTS_PORT -e GH_AW_SAFE_OUTPUTS_API_KEY -v /tmp/gh-aw/mcp-payloads:/tmp/gh-aw/mcp-payloads:rw -v /opt:/opt:ro -v /tmp:/tmp:rw -v '"${GITHUB_WORKSPACE}"':'"${GITHUB_WORKSPACE}"':rw ghcr.io/github/gh-aw-mcpg:v0.3.19' mkdir -p /home/runner/.copilot GH_AW_NODE=$(which node 2>/dev/null || command -v node 2>/dev/null || echo node) @@ -688,7 +709,7 @@ jobs: "mcpServers": { "github": { "type": "stdio", - "container": "ghcr.io/github/github-mcp-server:v1.0.3", + "container": "ghcr.io/github/github-mcp-server:v1.0.4", "env": { "GITHUB_HOST": "\${GITHUB_SERVER_URL}", "GITHUB_PERSONAL_ACCESS_TOKEN": "\${GITHUB_MCP_SERVER_TOKEN}", @@ -755,25 +776,32 @@ jobs: timeout-minutes: 30 run: | set -o pipefail + printf '%s' "$(date +%s%3N)" > /tmp/gh-aw/agent_cli_start_ms.txt touch /tmp/gh-aw/agent-step-summary.md GH_AW_NODE_BIN=$(command -v node 2>/dev/null || true) export GH_AW_NODE_BIN + export COPILOT_API_KEY="$COPILOT_DUMMY_BYOK" (umask 177 && touch /tmp/gh-aw/agent-stdio.log) - printf '%s\n' '{"$schema":"https://github.com/github/gh-aw-firewall/releases/download/v0.25.41/awf-config.schema.json","network":{"allowDomains":["*.vsblob.vsassets.io","api.business.githubcopilot.com","api.enterprise.githubcopilot.com","api.github.com","api.githubcopilot.com","api.individual.githubcopilot.com","api.nuget.org","api.snapcraft.io","archive.ubuntu.com","azure.archive.ubuntu.com","azuresearch-usnc.nuget.org","azuresearch-ussc.nuget.org","builds.dotnet.microsoft.com","ci.dot.net","crl.geotrust.com","crl.globalsign.com","crl.identrust.com","crl.sectigo.com","crl.thawte.com","crl.usertrust.com","crl.verisign.com","crl3.digicert.com","crl4.digicert.com","crls.ssl.com","dc.services.visualstudio.com","dist.nuget.org","dot.net","dotnet.microsoft.com","dotnetcli.blob.core.windows.net","github.com","host.docker.internal","json-schema.org","json.schemastore.org","keyserver.ubuntu.com","nuget.org","nuget.pkg.github.com","nugetregistryv2prod.blob.core.windows.net","ocsp.digicert.com","ocsp.geotrust.com","ocsp.globalsign.com","ocsp.identrust.com","ocsp.sectigo.com","ocsp.ssl.com","ocsp.thawte.com","ocsp.usertrust.com","ocsp.verisign.com","oneocsp.microsoft.com","packagecloud.io","packages.cloud.google.com","packages.microsoft.com","pkgs.dev.azure.com","ppa.launchpad.net","raw.githubusercontent.com","registry.npmjs.org","s.symcb.com","s.symcd.com","security.ubuntu.com","telemetry.enterprise.githubcopilot.com","ts-crl.ws.symantec.com","ts-ocsp.ws.symantec.com","www.googleapis.com","www.microsoft.com"]},"apiProxy":{"enabled":true,"models":{"auto":["large"],"deep-research":["copilot/deep-research*","copilot/o3-deep-research*","copilot/o4-mini-deep-research*","google/deep-research*","openai/o3-deep-research*","openai/o4-mini-deep-research*"],"gemini-flash":["copilot/gemini-*flash*","google/gemini-*flash*"],"gemini-pro":["copilot/gemini-*pro*","google/gemini-*pro*"],"gpt-4.1":["copilot/gpt-4.1*","openai/gpt-4.1*"],"gpt-5":["copilot/gpt-5*","openai/gpt-5*"],"gpt-5-codex":["copilot/gpt-5*codex*","openai/gpt-5*codex*"],"gpt-5-mini":["copilot/gpt-5*mini*","openai/gpt-5*mini*"],"gpt-5-nano":["copilot/gpt-5*nano*","openai/gpt-5*nano*"],"gpt-5-pro":["copilot/gpt-5*pro*","openai/gpt-5*pro*"],"haiku":["copilot/*haiku*","anthropic/*haiku*"],"large":["sonnet","gpt-5-pro","gpt-5","gemini-pro"],"mini":["haiku","gpt-5-mini","gpt-5-nano","gemini-flash"],"opus":["copilot/*opus*","anthropic/*opus*"],"reasoning":["copilot/o1*","copilot/o3*","copilot/o4*","openai/o1*","openai/o3*","openai/o4*"],"small":["mini"],"sonnet":["copilot/*sonnet*","anthropic/*sonnet*"]}},"container":{"imageTag":"0.25.41"}}' > "${RUNNER_TEMP}/gh-aw/awf-config.json" && cp "${RUNNER_TEMP}/gh-aw/awf-config.json" /tmp/gh-aw/awf-config.json + printf '%s\n' '{"$schema":"https://github.com/github/gh-aw-firewall/releases/download/v0.25.55/awf-config.schema.json","network":{"allowDomains":["*.vsblob.vsassets.io","api.business.githubcopilot.com","api.enterprise.githubcopilot.com","api.github.com","api.githubcopilot.com","api.individual.githubcopilot.com","api.nuget.org","api.snapcraft.io","archive.ubuntu.com","azure.archive.ubuntu.com","azuresearch-usnc.nuget.org","azuresearch-ussc.nuget.org","builds.dotnet.microsoft.com","ci.dot.net","crl.geotrust.com","crl.globalsign.com","crl.identrust.com","crl.sectigo.com","crl.thawte.com","crl.usertrust.com","crl.verisign.com","crl3.digicert.com","crl4.digicert.com","crls.ssl.com","dc.services.visualstudio.com","dist.nuget.org","dot.net","dotnet.microsoft.com","dotnetcli.blob.core.windows.net","github.com","host.docker.internal","json-schema.org","json.schemastore.org","keyserver.ubuntu.com","nuget.org","nuget.pkg.github.com","nugetregistryv2prod.blob.core.windows.net","ocsp.digicert.com","ocsp.geotrust.com","ocsp.globalsign.com","ocsp.identrust.com","ocsp.sectigo.com","ocsp.ssl.com","ocsp.thawte.com","ocsp.usertrust.com","ocsp.verisign.com","oneocsp.microsoft.com","packagecloud.io","packages.cloud.google.com","packages.microsoft.com","pkgs.dev.azure.com","ppa.launchpad.net","raw.githubusercontent.com","registry.npmjs.org","s.symcb.com","s.symcd.com","security.ubuntu.com","telemetry.enterprise.githubcopilot.com","ts-crl.ws.symantec.com","ts-ocsp.ws.symantec.com","www.googleapis.com","www.microsoft.com"]},"apiProxy":{"enabled":true,"enableTokenSteering":true,"maxRuns":500,"maxEffectiveTokens":25000000,"models":{"agent":["sonnet-6x","gpt-5.4","gpt-5.3","gemini-pro","any"],"antigravity":["copilot/antigravity*","google/antigravity*","gemini/antigravity*"],"any":["copilot/*","anthropic/*","openai/*","google/*","gemini/*"],"claude":["agent"],"codex":["agent"],"coding":["copilot/gpt-5*codex*","openai/gpt-5*codex*","gpt-5-codex"],"computer-use":["copilot/*computer-use*","google/*computer-use*","gemini/*computer-use*","openai/*computer-use*"],"copilot":["agent"],"deep-research":["copilot/deep-research*","copilot/o3-deep-research*","copilot/o4-mini-deep-research*","google/deep-research*","gemini/deep-research*","openai/o3-deep-research*","openai/o4-mini-deep-research*"],"gemini":["agent"],"gemini-3-flash":["copilot/gemini-3*flash*","google/gemini-3*flash*","gemini/gemini-3*flash*"],"gemini-3-pro":["copilot/gemini-3*pro*","google/gemini-3*pro*","gemini/gemini-3*pro*"],"gemini-3.1-flash":["copilot/gemini-3.1*flash*","google/gemini-3.1*flash*","gemini/gemini-3.1*flash*"],"gemini-3.1-pro":["copilot/gemini-3.1*pro*","google/gemini-3.1*pro*","gemini/gemini-3.1*pro*"],"gemini-3.5-flash":["copilot/gemini-3.5*flash*","google/gemini-3.5*flash*","gemini/gemini-3.5*flash*"],"gemini-flash":["copilot/gemini-*flash*","google/gemini-*flash*","gemini/gemini-*flash*"],"gemini-flash-lite":["copilot/gemini-*flash*lite*","google/gemini-*flash*lite*","gemini/gemini-*flash*lite*"],"gemini-pro":["copilot/gemini-*pro*","google/gemini-*pro*","gemini/gemini-*pro*"],"gemma":["copilot/gemma*","google/gemma*","gemini/gemma*"],"gpt-4.1":["copilot/gpt-4.1*","openai/gpt-4.1*"],"gpt-5":["copilot/gpt-5*","openai/gpt-5*"],"gpt-5-codex":["copilot/gpt-5*codex*","openai/gpt-5*codex*"],"gpt-5-mini":["copilot/gpt-5*mini*","openai/gpt-5*mini*"],"gpt-5-nano":["copilot/gpt-5*nano*","openai/gpt-5*nano*"],"gpt-5-pro":["copilot/gpt-5*pro*","openai/gpt-5*pro*"],"gpt-5.2":["copilot/gpt-5.2*","openai/gpt-5.2*"],"gpt-5.3":["copilot/gpt-5.3*","openai/gpt-5.3*"],"gpt-5.4":["copilot/gpt-5.4*","openai/gpt-5.4*"],"gpt-5.5":["copilot/gpt-5.5*","openai/gpt-5.5*"],"haiku":["copilot/*haiku*","anthropic/*haiku*"],"large":["sonnet","gpt-5-pro","gpt-5","gemini-pro"],"mini":["haiku","gpt-5-mini","gpt-5-nano","gemini-flash-lite"],"opus":["copilot/*opus*","anthropic/*opus*"],"opusplan":["opus?effort=high"],"reasoning":["copilot/o1*","copilot/o3*","copilot/o4*","openai/o1*","openai/o3*","openai/o4*"],"robotics":["copilot/*robotics*","google/*robotics*","gemini/*robotics*"],"small":["mini"],"sonnet":["copilot/*sonnet*","anthropic/*sonnet*"],"sonnet-6x":["copilot/*sonnet-4-5-*","anthropic/*sonnet-4-5-*","copilot/*sonnet-4-6*","anthropic/*sonnet-4-6*"],"summarization":["haiku","gpt-5-mini","gemini-flash-lite","mini"],"vision":["copilot/gemini-*image*","gemini/gemini-*image*","copilot/gemini-*flash*","gemini/gemini-*flash*"]}},"container":{"imageTag":"0.25.55"}}' > "${RUNNER_TEMP}/gh-aw/awf-config.json" + cp "${RUNNER_TEMP}/gh-aw/awf-config.json" /tmp/gh-aw/awf-config.json + GH_AW_DOCKER_HOST_PATH_PREFIX_ARGS="" + if [[ "${DOCKER_HOST:-}" =~ ^tcp:// ]]; then + GH_AW_DOCKER_HOST_PATH_PREFIX_ARGS="--docker-host-path-prefix /tmp/gh-aw" + fi # shellcheck disable=SC1003 - sudo -E awf --config "${RUNNER_TEMP}/gh-aw/awf-config.json" --container-workdir "${GITHUB_WORKSPACE}" --mount "${RUNNER_TEMP}/gh-aw:${RUNNER_TEMP}/gh-aw:ro" --mount "${RUNNER_TEMP}/gh-aw:/host${RUNNER_TEMP}/gh-aw:ro" --env-all --exclude-env COPILOT_GITHUB_TOKEN --exclude-env GITHUB_MCP_SERVER_TOKEN --exclude-env MCP_GATEWAY_API_KEY --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --audit-dir /tmp/gh-aw/sandbox/firewall/audit --enable-host-access --allow-host-ports 80,443,8080 --skip-pull \ - -- /bin/bash -c 'export PATH="${RUNNER_TEMP}/gh-aw/mcp-cli/bin:$PATH" && export PATH="$(find /opt/hostedtoolcache /home/runner/work/_tool -maxdepth 4 -type d -name bin 2>/dev/null | tr '\''\n'\'' '\'':'\'')$PATH"; [ -n "$GOROOT" ] && export PATH="$GOROOT/bin:$PATH" || true && GH_AW_NODE_EXEC="${GH_AW_NODE_BIN:-}"; if [ -z "$GH_AW_NODE_EXEC" ] || [ ! -x "$GH_AW_NODE_EXEC" ]; then GH_AW_NODE_EXEC="$(command -v node 2>/dev/null || echo node)"; fi; "$GH_AW_NODE_EXEC" ${RUNNER_TEMP}/gh-aw/actions/copilot_harness.cjs /usr/local/bin/copilot --add-dir /tmp/gh-aw/ --log-level all --log-dir /tmp/gh-aw/sandbox/agent/logs/ --disable-builtin-mcps --no-ask-user --allow-all-tools --allow-all-paths --add-dir "${GITHUB_WORKSPACE}" --prompt-file /tmp/gh-aw/aw-prompts/prompt.txt' 2>&1 | tee -a /tmp/gh-aw/agent-stdio.log + sudo -E awf --config "${RUNNER_TEMP}/gh-aw/awf-config.json" --container-workdir "${GITHUB_WORKSPACE}" --mount "${RUNNER_TEMP}/gh-aw:${RUNNER_TEMP}/gh-aw:ro" --mount "${RUNNER_TEMP}/gh-aw:/host${RUNNER_TEMP}/gh-aw:ro" ${GH_AW_DOCKER_HOST_PATH_PREFIX_ARGS} --env-all --exclude-env COPILOT_GITHUB_TOKEN --exclude-env GITHUB_MCP_SERVER_TOKEN --exclude-env MCP_GATEWAY_API_KEY --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --audit-dir /tmp/gh-aw/sandbox/firewall/audit --enable-host-access --allow-host-ports 80,443,8080 --skip-pull \ + -- /bin/bash -c 'export PATH="${RUNNER_TEMP}/gh-aw/mcp-cli/bin:$PATH" && export PATH="$(find /opt/hostedtoolcache /home/runner/work/_tool -maxdepth 5 -type d -name bin 2>/dev/null | tr '\''\n'\'' '\'':'\'')$PATH"; [ -n "$GOROOT" ] && export PATH="$GOROOT/bin:$PATH" || true && GH_AW_NODE_EXEC="${GH_AW_NODE_BIN:-}"; if [ -z "$GH_AW_NODE_EXEC" ] || [ ! -x "$GH_AW_NODE_EXEC" ]; then GH_AW_NODE_EXEC="$(command -v node 2>/dev/null || true)"; fi; if [ -z "$GH_AW_NODE_EXEC" ]; then echo "node runtime missing on this runner — check runtimes.node in workflow YAML" >&2; exit 127; fi; "$GH_AW_NODE_EXEC" ${RUNNER_TEMP}/gh-aw/actions/copilot_harness.cjs /usr/local/bin/copilot --add-dir /tmp/gh-aw/ --log-level all --log-dir /tmp/gh-aw/sandbox/agent/logs/ --disable-builtin-mcps --no-ask-user --allow-all-tools --allow-all-paths --add-dir "${GITHUB_WORKSPACE}" --prompt-file /tmp/gh-aw/aw-prompts/prompt.txt' 2>&1 | tee -a /tmp/gh-aw/agent-stdio.log env: AWF_REFLECT_ENABLED: 1 COPILOT_AGENT_RUNNER_TYPE: STANDALONE - COPILOT_API_KEY: dummy-byok-key-for-offline-mode + COPILOT_DUMMY_BYOK: dummy-byok-key-for-offline-mode COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }} COPILOT_MODEL: ${{ vars.GH_AW_MODEL_AGENT_COPILOT || 'claude-sonnet-4.6' }} GH_AW_MCP_CONFIG: /home/runner/.copilot/mcp-config.json GH_AW_PHASE: agent GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt GH_AW_SAFE_OUTPUTS: ${{ steps.set-runtime-paths.outputs.GH_AW_SAFE_OUTPUTS }} - GH_AW_VERSION: v0.72.1 + GH_AW_VERSION: v0.76.1 GITHUB_API_URL: ${{ github.api_url }} GITHUB_AW: true GITHUB_COPILOT_INTEGRATION_ID: agentic-workflows @@ -788,11 +816,11 @@ jobs: GIT_COMMITTER_EMAIL: github-actions[bot]@users.noreply.github.com GIT_COMMITTER_NAME: github-actions[bot] XDG_CONFIG_HOME: /home/runner - - name: Detect Copilot errors - id: detect-copilot-errors + - name: Detect agent errors if: always() + id: detect-agent-errors continue-on-error: true - run: node "${RUNNER_TEMP}/gh-aw/actions/detect_copilot_errors.cjs" + run: node "${RUNNER_TEMP}/gh-aw/actions/detect_agent_errors.cjs" - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -983,6 +1011,7 @@ jobs: concurrency: group: "gh-aw-conclusion-regression-pr-shepherd" cancel-in-progress: false + queue: max outputs: incomplete_count: ${{ steps.report_incomplete.outputs.incomplete_count }} noop_message: ${{ steps.noop.outputs.noop_message }} @@ -991,15 +1020,18 @@ jobs: steps: - name: Setup Scripts id: setup - uses: github/gh-aw-actions/setup@bc56a0cad2f450c562810785ef38649c04db812a # v0.72.1 + uses: github/gh-aw-actions/setup@46d564922b082d0db93244972e8005ea6904ee5f # v0.76.1 with: destination: ${{ runner.temp }}/gh-aw/actions job-name: ${{ github.job }} trace-id: ${{ needs.activation.outputs.setup-trace-id }} + parent-span-id: ${{ needs.activation.outputs.setup-parent-span-id || needs.activation.outputs.setup-span-id }} env: GH_AW_SETUP_WORKFLOW_NAME: "Regression PR Shepherd" GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/regression-pr-shepherd.lock.yml@${{ github.ref }} - GH_AW_INFO_VERSION: "1.0.40" + GH_AW_INFO_VERSION: "1.0.52" + GH_AW_INFO_AWF_VERSION: "v0.25.55" + GH_AW_INFO_ENGINE_ID: "copilot" - name: Download agent output artifact id: download-agent-output continue-on-error: true @@ -1021,6 +1053,7 @@ jobs: GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }} GH_AW_NOOP_MAX: "1" GH_AW_WORKFLOW_NAME: "Regression PR Shepherd" + GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/regression-pr-shepherd.md" GH_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} GH_AW_AGENT_CONCLUSION: ${{ needs.agent.result }} GH_AW_NOOP_REPORT_AS_ISSUE: "false" @@ -1037,6 +1070,7 @@ jobs: env: GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }} GH_AW_WORKFLOW_NAME: "Regression PR Shepherd" + GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/regression-pr-shepherd.md" GH_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} GH_AW_DETECTION_CONCLUSION: ${{ needs.detection.outputs.detection_conclusion }} GH_AW_DETECTION_REASON: ${{ needs.detection.outputs.detection_reason }} @@ -1054,6 +1088,7 @@ jobs: GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }} GH_AW_MISSING_TOOL_CREATE_ISSUE: "true" GH_AW_WORKFLOW_NAME: "Regression PR Shepherd" + GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/regression-pr-shepherd.md" with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} script: | @@ -1068,6 +1103,7 @@ jobs: GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }} GH_AW_REPORT_INCOMPLETE_CREATE_ISSUE: "true" GH_AW_WORKFLOW_NAME: "Regression PR Shepherd" + GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/regression-pr-shepherd.md" with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} script: | @@ -1082,6 +1118,7 @@ jobs: env: GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }} GH_AW_WORKFLOW_NAME: "Regression PR Shepherd" + GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/regression-pr-shepherd.md" GH_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} GH_AW_AGENT_CONCLUSION: ${{ needs.agent.result }} GH_AW_WORKFLOW_ID: "regression-pr-shepherd" @@ -1089,6 +1126,8 @@ jobs: GH_AW_ENGINE_ID: "copilot" GH_AW_SECRET_VERIFICATION_RESULT: ${{ needs.activation.outputs.secret_verification_result }} GH_AW_CHECKOUT_PR_SUCCESS: ${{ needs.agent.outputs.checkout_pr_success }} + GH_AW_EFFECTIVE_TOKENS: ${{ needs.agent.outputs.effective_tokens || '' }} + GH_AW_EFFECTIVE_TOKENS_RATE_LIMIT_ERROR: ${{ needs.agent.outputs.effective_tokens_rate_limit_error || 'false' }} GH_AW_INFERENCE_ACCESS_ERROR: ${{ needs.agent.outputs.inference_access_error }} GH_AW_MCP_POLICY_ERROR: ${{ needs.agent.outputs.mcp_policy_error }} GH_AW_AGENTIC_ENGINE_TIMEOUT: ${{ needs.agent.outputs.agentic_engine_timeout }} @@ -1107,6 +1146,7 @@ jobs: GH_AW_MISSING_TOOL_REPORT_AS_FAILURE: "true" GH_AW_MISSING_DATA_REPORT_AS_FAILURE: "true" GH_AW_TIMEOUT_MINUTES: "30" + GH_AW_MAX_EFFECTIVE_TOKENS: "25000000" with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} script: | @@ -1131,15 +1171,18 @@ jobs: steps: - name: Setup Scripts id: setup - uses: github/gh-aw-actions/setup@bc56a0cad2f450c562810785ef38649c04db812a # v0.72.1 + uses: github/gh-aw-actions/setup@46d564922b082d0db93244972e8005ea6904ee5f # v0.76.1 with: destination: ${{ runner.temp }}/gh-aw/actions job-name: ${{ github.job }} trace-id: ${{ needs.activation.outputs.setup-trace-id }} + parent-span-id: ${{ needs.activation.outputs.setup-parent-span-id || needs.activation.outputs.setup-span-id }} env: GH_AW_SETUP_WORKFLOW_NAME: "Regression PR Shepherd" GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/regression-pr-shepherd.lock.yml@${{ github.ref }} - GH_AW_INFO_VERSION: "1.0.40" + GH_AW_INFO_VERSION: "1.0.52" + GH_AW_INFO_AWF_VERSION: "v0.25.55" + GH_AW_INFO_ENGINE_ID: "copilot" - name: Download agent output artifact id: download-agent-output continue-on-error: true @@ -1165,7 +1208,7 @@ jobs: rm -rf /tmp/gh-aw/sandbox/firewall/logs rm -rf /tmp/gh-aw/sandbox/firewall/audit - name: Download container images - run: bash "${RUNNER_TEMP}/gh-aw/actions/download_docker_images.sh" ghcr.io/github/gh-aw-firewall/agent:0.25.41 ghcr.io/github/gh-aw-firewall/api-proxy:0.25.41 ghcr.io/github/gh-aw-firewall/squid:0.25.41 + run: bash "${RUNNER_TEMP}/gh-aw/actions/download_docker_images.sh" ghcr.io/github/gh-aw-firewall/agent:0.25.55 ghcr.io/github/gh-aw-firewall/api-proxy:0.25.55 ghcr.io/github/gh-aw-firewall/squid:0.25.55 - name: Check if detection needed id: detection_guard if: always() @@ -1224,11 +1267,11 @@ jobs: node-version: '24' package-manager-cache: false - name: Install GitHub Copilot CLI - run: bash "${RUNNER_TEMP}/gh-aw/actions/install_copilot_cli.sh" 1.0.40 + run: bash "${RUNNER_TEMP}/gh-aw/actions/install_copilot_cli.sh" 1.0.52 env: GH_HOST: github.com - name: Install AWF binary - run: bash "${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh" v0.25.41 + run: bash "${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh" v0.25.55 - name: Execute GitHub Copilot CLI if: always() && steps.detection_guard.outputs.run_detection == 'true' continue-on-error: true @@ -1237,23 +1280,30 @@ jobs: timeout-minutes: 20 run: | set -o pipefail + printf '%s' "$(date +%s%3N)" > /tmp/gh-aw/agent_cli_start_ms.txt touch /tmp/gh-aw/agent-step-summary.md GH_AW_NODE_BIN=$(command -v node 2>/dev/null || true) export GH_AW_NODE_BIN + export COPILOT_API_KEY="$COPILOT_DUMMY_BYOK" (umask 177 && touch /tmp/gh-aw/threat-detection/detection.log) - printf '%s\n' '{"$schema":"https://github.com/github/gh-aw-firewall/releases/download/v0.25.41/awf-config.schema.json","network":{"allowDomains":["api.business.githubcopilot.com","api.enterprise.githubcopilot.com","api.github.com","api.githubcopilot.com","api.individual.githubcopilot.com","github.com","host.docker.internal","telemetry.enterprise.githubcopilot.com"]},"apiProxy":{"enabled":true},"container":{"imageTag":"0.25.41"}}' > "${RUNNER_TEMP}/gh-aw/awf-config.json" && cp "${RUNNER_TEMP}/gh-aw/awf-config.json" /tmp/gh-aw/awf-config.json + printf '%s\n' '{"$schema":"https://github.com/github/gh-aw-firewall/releases/download/v0.25.55/awf-config.schema.json","network":{"allowDomains":["api.business.githubcopilot.com","api.enterprise.githubcopilot.com","api.github.com","api.githubcopilot.com","api.individual.githubcopilot.com","github.com","host.docker.internal","telemetry.enterprise.githubcopilot.com"]},"apiProxy":{"enabled":true,"enableTokenSteering":true,"maxRuns":500,"maxEffectiveTokens":25000000},"container":{"imageTag":"0.25.55"}}' > "${RUNNER_TEMP}/gh-aw/awf-config.json" + cp "${RUNNER_TEMP}/gh-aw/awf-config.json" /tmp/gh-aw/awf-config.json + GH_AW_DOCKER_HOST_PATH_PREFIX_ARGS="" + if [[ "${DOCKER_HOST:-}" =~ ^tcp:// ]]; then + GH_AW_DOCKER_HOST_PATH_PREFIX_ARGS="--docker-host-path-prefix /tmp/gh-aw" + fi # shellcheck disable=SC1003 - sudo -E awf --config "${RUNNER_TEMP}/gh-aw/awf-config.json" --container-workdir "${GITHUB_WORKSPACE}" --mount "${RUNNER_TEMP}/gh-aw:${RUNNER_TEMP}/gh-aw:ro" --mount "${RUNNER_TEMP}/gh-aw:/host${RUNNER_TEMP}/gh-aw:ro" --env-all --exclude-env COPILOT_GITHUB_TOKEN --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --audit-dir /tmp/gh-aw/sandbox/firewall/audit --enable-host-access --allow-host-ports 80,443,8080 --skip-pull \ - -- /bin/bash -c 'export PATH="$(find /opt/hostedtoolcache /home/runner/work/_tool -maxdepth 4 -type d -name bin 2>/dev/null | tr '\''\n'\'' '\'':'\'')$PATH"; [ -n "$GOROOT" ] && export PATH="$GOROOT/bin:$PATH" || true && GH_AW_NODE_EXEC="${GH_AW_NODE_BIN:-}"; if [ -z "$GH_AW_NODE_EXEC" ] || [ ! -x "$GH_AW_NODE_EXEC" ]; then GH_AW_NODE_EXEC="$(command -v node 2>/dev/null || echo node)"; fi; "$GH_AW_NODE_EXEC" ${RUNNER_TEMP}/gh-aw/actions/copilot_harness.cjs /usr/local/bin/copilot --add-dir /tmp/gh-aw/ --log-level all --log-dir /tmp/gh-aw/sandbox/agent/logs/ --disable-builtin-mcps --no-ask-user --allow-all-tools --add-dir "${GITHUB_WORKSPACE}" --prompt-file /tmp/gh-aw/aw-prompts/prompt.txt' 2>&1 | tee -a /tmp/gh-aw/threat-detection/detection.log + sudo -E awf --config "${RUNNER_TEMP}/gh-aw/awf-config.json" --container-workdir "${GITHUB_WORKSPACE}" --mount "${RUNNER_TEMP}/gh-aw:${RUNNER_TEMP}/gh-aw:ro" --mount "${RUNNER_TEMP}/gh-aw:/host${RUNNER_TEMP}/gh-aw:ro" ${GH_AW_DOCKER_HOST_PATH_PREFIX_ARGS} --env-all --exclude-env COPILOT_GITHUB_TOKEN --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --audit-dir /tmp/gh-aw/sandbox/firewall/audit --enable-host-access --allow-host-ports 80,443,8080 --skip-pull \ + -- /bin/bash -c 'export PATH="$(find /opt/hostedtoolcache /home/runner/work/_tool -maxdepth 5 -type d -name bin 2>/dev/null | tr '\''\n'\'' '\'':'\'')$PATH"; [ -n "$GOROOT" ] && export PATH="$GOROOT/bin:$PATH" || true && GH_AW_NODE_EXEC="${GH_AW_NODE_BIN:-}"; if [ -z "$GH_AW_NODE_EXEC" ] || [ ! -x "$GH_AW_NODE_EXEC" ]; then GH_AW_NODE_EXEC="$(command -v node 2>/dev/null || true)"; fi; if [ -z "$GH_AW_NODE_EXEC" ]; then echo "node runtime missing on this runner — check runtimes.node in workflow YAML" >&2; exit 127; fi; "$GH_AW_NODE_EXEC" ${RUNNER_TEMP}/gh-aw/actions/copilot_harness.cjs /usr/local/bin/copilot --add-dir /tmp/gh-aw/ --log-level all --log-dir /tmp/gh-aw/sandbox/agent/logs/ --disable-builtin-mcps --no-ask-user --allow-all-tools --add-dir "${GITHUB_WORKSPACE}" --prompt-file /tmp/gh-aw/aw-prompts/prompt.txt' 2>&1 | tee -a /tmp/gh-aw/threat-detection/detection.log env: AWF_REFLECT_ENABLED: 1 COPILOT_AGENT_RUNNER_TYPE: STANDALONE - COPILOT_API_KEY: dummy-byok-key-for-offline-mode + COPILOT_DUMMY_BYOK: dummy-byok-key-for-offline-mode COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }} COPILOT_MODEL: ${{ vars.GH_AW_MODEL_DETECTION_COPILOT || 'claude-sonnet-4.6' }} GH_AW_PHASE: detection GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt - GH_AW_VERSION: v0.72.1 + GH_AW_VERSION: v0.76.1 GITHUB_API_URL: ${{ github.api_url }} GITHUB_AW: true GITHUB_COPILOT_INTEGRATION_ID: agentic-workflows @@ -1281,6 +1331,7 @@ jobs: uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: RUN_DETECTION: ${{ steps.detection_guard.outputs.run_detection }} + DETECTION_AGENTIC_EXECUTION_OUTCOME: ${{ steps.detection_agentic_execution.outcome }} GH_AW_DETECTION_CONTINUE_ON_ERROR: "true" with: script: | @@ -1291,10 +1342,11 @@ jobs: await main(); } catch (loadErr) { const continueOnError = process.env.GH_AW_DETECTION_CONTINUE_ON_ERROR !== 'false'; + const detectionExecutionFailed = process.env.DETECTION_AGENTIC_EXECUTION_OUTCOME === 'failure'; const msg = 'ERR_SYSTEM: \u274C Unexpected error loading threat detection module: ' + (loadErr && loadErr.message ? loadErr.message : String(loadErr)); core.error(msg); core.setOutput('reason', 'parse_error'); - if (continueOnError) { + if (continueOnError && !detectionExecutionFailed) { core.warning('\u26A0\uFE0F ' + msg); core.setOutput('conclusion', 'warning'); core.setOutput('success', 'false'); @@ -1326,15 +1378,18 @@ jobs: steps: - name: Setup Scripts id: setup - uses: github/gh-aw-actions/setup@bc56a0cad2f450c562810785ef38649c04db812a # v0.72.1 + uses: github/gh-aw-actions/setup@46d564922b082d0db93244972e8005ea6904ee5f # v0.76.1 with: destination: ${{ runner.temp }}/gh-aw/actions job-name: ${{ github.job }} trace-id: ${{ needs.activation.outputs.setup-trace-id }} + parent-span-id: ${{ needs.activation.outputs.setup-parent-span-id || needs.activation.outputs.setup-span-id }} env: GH_AW_SETUP_WORKFLOW_NAME: "Regression PR Shepherd" GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/regression-pr-shepherd.lock.yml@${{ github.ref }} - GH_AW_INFO_VERSION: "1.0.40" + GH_AW_INFO_VERSION: "1.0.52" + GH_AW_INFO_AWF_VERSION: "v0.25.55" + GH_AW_INFO_ENGINE_ID: "copilot" - name: Checkout repository uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: @@ -1371,7 +1426,7 @@ jobs: MEMORY_ID: default TARGET_REPO: ${{ github.repository }} BRANCH_NAME: memory/regression-pr-shepherd - MAX_FILE_SIZE: 10240 + MAX_FILE_SIZE: 102400 MAX_FILE_COUNT: 100 MAX_PATCH_SIZE: 10240 ALLOWED_EXTENSIONS: '[]' @@ -1402,9 +1457,10 @@ jobs: GH_AW_EFFECTIVE_TOKENS: ${{ needs.agent.outputs.effective_tokens }} GH_AW_ENGINE_ID: "copilot" GH_AW_ENGINE_MODEL: ${{ needs.agent.outputs.model }} - GH_AW_ENGINE_VERSION: "1.0.40" + GH_AW_ENGINE_VERSION: "1.0.52" GH_AW_WORKFLOW_ID: "regression-pr-shepherd" GH_AW_WORKFLOW_NAME: "Regression PR Shepherd" + GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/regression-pr-shepherd.md" outputs: code_push_failure_count: ${{ steps.process_safe_outputs.outputs.code_push_failure_count }} code_push_failure_errors: ${{ steps.process_safe_outputs.outputs.code_push_failure_errors }} @@ -1419,15 +1475,18 @@ jobs: steps: - name: Setup Scripts id: setup - uses: github/gh-aw-actions/setup@bc56a0cad2f450c562810785ef38649c04db812a # v0.72.1 + uses: github/gh-aw-actions/setup@46d564922b082d0db93244972e8005ea6904ee5f # v0.76.1 with: destination: ${{ runner.temp }}/gh-aw/actions job-name: ${{ github.job }} trace-id: ${{ needs.activation.outputs.setup-trace-id }} + parent-span-id: ${{ needs.activation.outputs.setup-parent-span-id || needs.activation.outputs.setup-span-id }} env: GH_AW_SETUP_WORKFLOW_NAME: "Regression PR Shepherd" GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/regression-pr-shepherd.lock.yml@${{ github.ref }} - GH_AW_INFO_VERSION: "1.0.40" + GH_AW_INFO_VERSION: "1.0.52" + GH_AW_INFO_AWF_VERSION: "v0.25.55" + GH_AW_INFO_ENGINE_ID: "copilot" - name: Download agent output artifact id: download-agent-output continue-on-error: true @@ -1471,8 +1530,16 @@ jobs: echo "Extracted base branch from safe output: $BASE_BRANCH" fi fi + - name: Checkout repository (trusted default branch for comment events) + if: (!cancelled()) && needs.agent.result != 'skipped' && contains(needs.agent.outputs.output_types, 'push_to_pull_request_branch') && (github.event_name == 'issue_comment' || github.event_name == 'pull_request_review_comment') + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + ref: ${{ github.event.repository.default_branch }} + token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} + persist-credentials: false + fetch-depth: 1 - name: Checkout repository - if: (!cancelled()) && needs.agent.result != 'skipped' && contains(needs.agent.outputs.output_types, 'push_to_pull_request_branch') + if: (!cancelled()) && needs.agent.result != 'skipped' && contains(needs.agent.outputs.output_types, 'push_to_pull_request_branch') && github.event_name != 'issue_comment' && github.event_name != 'pull_request_review_comment' uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: ref: ${{ steps.extract-base-branch.outputs.base-branch || github.base_ref || github.event.pull_request.base.ref || github.ref_name || github.event.repository.default_branch }} @@ -1507,10 +1574,11 @@ jobs: uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }} + GH_AW_COMMENT_ID: ${{ needs.activation.outputs.comment_id }} GH_AW_ALLOWED_DOMAINS: "*.vsblob.vsassets.io,api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.nuget.org,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,azuresearch-usnc.nuget.org,azuresearch-ussc.nuget.org,builds.dotnet.microsoft.com,ci.dot.net,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,dc.services.visualstudio.com,dist.nuget.org,dot.net,dotnet.microsoft.com,dotnetcli.blob.core.windows.net,github.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,nuget.org,nuget.pkg.github.com,nugetregistryv2prod.blob.core.windows.net,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,oneocsp.microsoft.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,pkgs.dev.azure.com,ppa.launchpad.net,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com,www.googleapis.com,www.microsoft.com" GITHUB_SERVER_URL: ${{ github.server_url }} GITHUB_API_URL: ${{ github.api_url }} - GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"add_comment\":{\"hide_older_comments\":true,\"max\":5,\"target\":\"*\"},\"create_report_incomplete_issue\":{},\"missing_data\":{},\"missing_tool\":{},\"noop\":{\"max\":1,\"report-as-issue\":\"false\"},\"push_to_pull_request_branch\":{\"allowed_files\":[\"tests/**\",\"vsintegration/tests/**\"],\"if_no_changes\":\"warn\",\"labels\":[\"AI-Issue-Regression-PR\"],\"max\":10,\"max_patch_size\":1024,\"protect_top_level_dot_folders\":true,\"protected_files\":[\"package.json\",\"bun.lockb\",\"bunfig.toml\",\"deno.json\",\"deno.jsonc\",\"deno.lock\",\"global.json\",\"NuGet.Config\",\"Directory.Packages.props\",\"mix.exs\",\"mix.lock\",\"go.mod\",\"go.sum\",\"stack.yaml\",\"stack.yaml.lock\",\"pom.xml\",\"build.gradle\",\"build.gradle.kts\",\"settings.gradle\",\"settings.gradle.kts\",\"gradle.properties\",\"package-lock.json\",\"yarn.lock\",\"pnpm-lock.yaml\",\"npm-shrinkwrap.json\",\"requirements.txt\",\"Pipfile\",\"Pipfile.lock\",\"pyproject.toml\",\"setup.py\",\"setup.cfg\",\"Gemfile\",\"Gemfile.lock\",\"uv.lock\",\"CODEOWNERS\",\"DESIGN.md\",\"README.md\",\"CONTRIBUTING.md\",\"CHANGELOG.md\",\"SECURITY.md\",\"CODE_OF_CONDUCT.md\",\"AGENTS.md\",\"CLAUDE.md\",\"GEMINI.md\"],\"protected_files_policy\":\"fallback-to-issue\",\"target\":\"*\",\"title_prefix\":\"Add regression test: \"},\"remove_labels\":{\"allowed\":[\"AI-thinks-issue-fixed\"],\"max\":5,\"target\":\"*\"},\"report_incomplete\":{}}" + GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"add_comment\":{\"hide_older_comments\":true,\"max\":5,\"target\":\"*\"},\"create_report_incomplete_issue\":{},\"missing_data\":{},\"missing_tool\":{},\"noop\":{\"max\":1,\"report-as-issue\":\"false\"},\"push_to_pull_request_branch\":{\"allowed_files\":[\"tests/**\",\"vsintegration/tests/**\"],\"if_no_changes\":\"warn\",\"max\":10,\"max_patch_size\":1024,\"protect_top_level_dot_folders\":true,\"protected_files\":[\"package.json\",\"bun.lockb\",\"bunfig.toml\",\"deno.json\",\"deno.jsonc\",\"deno.lock\",\"global.json\",\"NuGet.Config\",\"Directory.Packages.props\",\"mix.exs\",\"mix.lock\",\"go.mod\",\"go.sum\",\"stack.yaml\",\"stack.yaml.lock\",\"pom.xml\",\"build.gradle\",\"build.gradle.kts\",\"settings.gradle\",\"settings.gradle.kts\",\"gradle.properties\",\"package-lock.json\",\"yarn.lock\",\"pnpm-lock.yaml\",\"npm-shrinkwrap.json\",\"requirements.txt\",\"Pipfile\",\"Pipfile.lock\",\"pyproject.toml\",\"setup.py\",\"setup.cfg\",\"Gemfile\",\"Gemfile.lock\",\"uv.lock\",\"CODEOWNERS\",\"DESIGN.md\",\"README.md\",\"CONTRIBUTING.md\",\"CHANGELOG.md\",\"SECURITY.md\",\"CODE_OF_CONDUCT.md\",\"AGENTS.md\",\"CLAUDE.md\",\"GEMINI.md\"],\"protected_files_policy\":\"fallback-to-issue\",\"required_labels\":[\"AI-Issue-Regression-PR\"],\"target\":\"*\",\"title_prefix\":\"Add regression test: \"},\"remove_labels\":{\"allowed\":[\"AI-thinks-issue-fixed\"],\"max\":5,\"target\":\"*\"},\"report_incomplete\":{}}" GH_AW_CI_TRIGGER_TOKEN: ${{ secrets.GH_AW_CI_TRIGGER_TOKEN }} with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/repo-assist.lock.yml b/.github/workflows/repo-assist.lock.yml index fe528826c9b..1363cd6154c 100644 --- a/.github/workflows/repo-assist.lock.yml +++ b/.github/workflows/repo-assist.lock.yml @@ -1,5 +1,5 @@ -# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"d92aced0e96b8b34c5b1bea1c9671fc2d2cdd732b393998313d559e2b8d83303","compiler_version":"v0.72.1","strict":true,"agent_id":"copilot"} -# gh-aw-manifest: {"version":1,"secrets":["COPILOT_GITHUB_TOKEN","GH_AW_CI_TRIGGER_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/checkout","sha":"de0fac2e4500dabe0009e67214ff5f5447ce83dd","version":"v6.0.2"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/setup-node","sha":"48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e","version":"v6.4.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"},{"repo":"github/gh-aw-actions/setup","sha":"bc56a0cad2f450c562810785ef38649c04db812a","version":"v0.72.1"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.25.41"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.41"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.25.41"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.3.6","digest":"sha256:2bb8eef86006a4c5963c55616a9c51c32f27bfdecb023b8aa6f91f6718d9171c","pinned_image":"ghcr.io/github/gh-aw-mcpg:v0.3.6@sha256:2bb8eef86006a4c5963c55616a9c51c32f27bfdecb023b8aa6f91f6718d9171c"},{"image":"ghcr.io/github/github-mcp-server:v1.0.3","digest":"sha256:2ac27ef03461ef2b877031b838a7d1fd7f12b12d4ace7796d8cad91446d55959","pinned_image":"ghcr.io/github/github-mcp-server:v1.0.3@sha256:2ac27ef03461ef2b877031b838a7d1fd7f12b12d4ace7796d8cad91446d55959"},{"image":"node:lts-alpine","digest":"sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f","pinned_image":"node:lts-alpine@sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f"}]} +# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"9fa883b5eb44e42f4f4bc55aea4d8197f676b0cca13b99debef7716c7a4fec0c","compiler_version":"v0.76.1","strict":true,"agent_id":"copilot"} +# gh-aw-manifest: {"version":1,"secrets":["COPILOT_GITHUB_TOKEN","GH_AW_CI_TRIGGER_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/checkout","sha":"de0fac2e4500dabe0009e67214ff5f5447ce83dd","version":"v6.0.2"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/setup-node","sha":"48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e","version":"v6.4.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"},{"repo":"github/gh-aw-actions/setup","sha":"46d564922b082d0db93244972e8005ea6904ee5f","version":"v0.76.1"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.25.55"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.55"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.25.55"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.3.19"},{"image":"ghcr.io/github/github-mcp-server:v1.0.4","digest":"sha256:e3816a476a977cfb836e7d221510011436c654d11861db66ecfd826601aba6a4","pinned_image":"ghcr.io/github/github-mcp-server:v1.0.4@sha256:e3816a476a977cfb836e7d221510011436c654d11861db66ecfd826601aba6a4"},{"image":"node:lts-alpine","digest":"sha256:2bdb65ed1dab192432bc31c95f94155ca5ad7fc1392fb7eb7526ab682fa5bf14","pinned_image":"node:lts-alpine@sha256:2bdb65ed1dab192432bc31c95f94155ca5ad7fc1392fb7eb7526ab682fa5bf14"}]} # ___ _ _ # / _ \ | | (_) # | |_| | __ _ ___ _ __ | |_ _ ___ @@ -14,7 +14,7 @@ # \ /\ / (_) | | | | ( | | | | (_) \ V V /\__ \ # \/ \/ \___/|_| |_|\_\|_| |_|\___/ \_/\_/ |___/ # -# This file was automatically generated by gh-aw (v0.72.1). DO NOT EDIT. +# This file was automatically generated by gh-aw (v0.76.1). DO NOT EDIT. # # To update this file, edit githubnext/agentics/workflows/repo-assist.md@7c7feb61a52b662eb2089aa2945588b7a200d404 and run: # gh aw compile @@ -50,18 +50,18 @@ # - actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 # - actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 # - actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 -# - github/gh-aw-actions/setup@bc56a0cad2f450c562810785ef38649c04db812a # v0.72.1 +# - github/gh-aw-actions/setup@46d564922b082d0db93244972e8005ea6904ee5f # v0.76.1 # # Container images used: -# - ghcr.io/github/gh-aw-firewall/agent:0.25.41 -# - ghcr.io/github/gh-aw-firewall/api-proxy:0.25.41 -# - ghcr.io/github/gh-aw-firewall/squid:0.25.41 -# - ghcr.io/github/gh-aw-mcpg:v0.3.6@sha256:2bb8eef86006a4c5963c55616a9c51c32f27bfdecb023b8aa6f91f6718d9171c -# - ghcr.io/github/github-mcp-server:v1.0.3@sha256:2ac27ef03461ef2b877031b838a7d1fd7f12b12d4ace7796d8cad91446d55959 -# - node:lts-alpine@sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f +# - ghcr.io/github/gh-aw-firewall/agent:0.25.55 +# - ghcr.io/github/gh-aw-firewall/api-proxy:0.25.55 +# - ghcr.io/github/gh-aw-firewall/squid:0.25.55 +# - ghcr.io/github/gh-aw-mcpg:v0.3.19 +# - ghcr.io/github/github-mcp-server:v1.0.4@sha256:e3816a476a977cfb836e7d221510011436c654d11861db66ecfd826601aba6a4 +# - node:lts-alpine@sha256:2bdb65ed1dab192432bc31c95f94155ca5ad7fc1392fb7eb7526ab682fa5bf14 name: "Repo Assist" -"on": +on: discussion: types: - created @@ -94,7 +94,7 @@ name: "Repo Assist" inputs: aw_context: default: "" - description: Agent caller context (used internally by Agentic Workflows). + description: "Agent caller context (used internally by Agentic Workflows)." required: false type: string @@ -125,6 +125,8 @@ jobs: lockdown_check_failed: ${{ steps.generate_aw_info.outputs.lockdown_check_failed == 'true' }} model: ${{ steps.generate_aw_info.outputs.model }} secret_verification_result: ${{ steps.validate-secret.outputs.verification_result }} + setup-parent-span-id: ${{ steps.setup.outputs.parent-span-id || steps.setup.outputs.span-id }} + setup-span-id: ${{ steps.setup.outputs.span-id }} setup-trace-id: ${{ steps.setup.outputs.trace-id }} slash_command: ${{ needs.pre_activation.outputs.matched_command }} stale_lock_file_failed: ${{ steps.check-lock-file.outputs.stale_lock_file_failed == 'true' }} @@ -133,33 +135,39 @@ jobs: steps: - name: Setup Scripts id: setup - uses: github/gh-aw-actions/setup@bc56a0cad2f450c562810785ef38649c04db812a # v0.72.1 + uses: github/gh-aw-actions/setup@46d564922b082d0db93244972e8005ea6904ee5f # v0.76.1 with: destination: ${{ runner.temp }}/gh-aw/actions job-name: ${{ github.job }} trace-id: ${{ needs.pre_activation.outputs.setup-trace-id }} + parent-span-id: ${{ needs.pre_activation.outputs.setup-parent-span-id || needs.pre_activation.outputs.setup-span-id }} env: GH_AW_SETUP_WORKFLOW_NAME: "Repo Assist" GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/repo-assist.lock.yml@${{ github.ref }} - GH_AW_INFO_VERSION: "1.0.40" + GH_AW_INFO_VERSION: "1.0.52" + GH_AW_INFO_AWF_VERSION: "v0.25.55" + GH_AW_INFO_BODY_MODIFIED: "false" + GH_AW_INFO_ENGINE_ID: "copilot" - name: Generate agentic run info id: generate_aw_info env: GH_AW_INFO_ENGINE_ID: "copilot" GH_AW_INFO_ENGINE_NAME: "GitHub Copilot CLI" GH_AW_INFO_MODEL: ${{ vars.GH_AW_MODEL_AGENT_COPILOT || 'claude-sonnet-4.6' }} - GH_AW_INFO_VERSION: "1.0.40" - GH_AW_INFO_AGENT_VERSION: "1.0.40" - GH_AW_INFO_CLI_VERSION: "v0.72.1" + GH_AW_INFO_VERSION: "1.0.52" + GH_AW_INFO_AGENT_VERSION: "1.0.52" + GH_AW_INFO_CLI_VERSION: "v0.76.1" GH_AW_INFO_WORKFLOW_NAME: "Repo Assist" GH_AW_INFO_EXPERIMENTAL: "false" GH_AW_INFO_SUPPORTS_TOOLS_ALLOWLIST: "true" GH_AW_INFO_STAGED: "false" GH_AW_INFO_ALLOWED_DOMAINS: '["defaults","dotnet","python"]' GH_AW_INFO_FIREWALL_ENABLED: "true" - GH_AW_INFO_AWF_VERSION: "v0.25.41" + GH_AW_INFO_AWF_VERSION: "v0.25.55" GH_AW_INFO_AWMG_VERSION: "" GH_AW_INFO_FIREWALL_TYPE: "squid" + GH_AW_INFO_FRONTMATTER_SOURCE: "githubnext/agentics/workflows/repo-assist.md@7c7feb61a52b662eb2089aa2945588b7a200d404" + GH_AW_INFO_BODY_MODIFIED: "false" GH_AW_COMPILED_STRICT: "true" uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 with: @@ -170,7 +178,7 @@ jobs: await main(core, context); - name: Add eyes reaction for immediate feedback id: react - if: github.event_name == 'issues' || github.event_name == 'issue_comment' || github.event_name == 'pull_request_review_comment' || github.event_name == 'discussion' || github.event_name == 'discussion_comment' || github.event_name == 'pull_request' && github.event.pull_request.head.repo.id == github.repository_id || github.event_name == 'pull_request_review' && github.event.pull_request.head.repo.id == github.repository_id + if: github.event_name == 'issues' || github.event_name == 'issue_comment' || github.event_name == 'pull_request_review_comment' || github.event_name == 'discussion' || github.event_name == 'discussion_comment' || github.event_name == 'pull_request' && github.event.pull_request.head.repo.id == github.repository_id uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: GH_AW_REACTION: "eyes" @@ -193,6 +201,7 @@ jobs: sparse-checkout: | .github .agents + .antigravity .claude .codex .crush @@ -203,8 +212,8 @@ jobs: fetch-depth: 1 - name: Save agent config folders for base branch restoration env: - GH_AW_AGENT_FOLDERS: ".agents .claude .codex .crush .gemini .github .opencode .pi" - GH_AW_AGENT_FILES: ".crush.json AGENTS.md CLAUDE.md GEMINI.md PI.md opencode.jsonc" + GH_AW_AGENT_FOLDERS: ".agents .antigravity .claude .codex .crush .gemini .github .opencode .pi" + GH_AW_AGENT_FILES: ".crush.json AGENTS.md ANTIGRAVITY.md CLAUDE.md GEMINI.md PI.md opencode.jsonc" # poutine:ignore untrusted_checkout_exec run: bash "${RUNNER_TEMP}/gh-aw/actions/save_base_github_folders.sh" - name: Check workflow lock file @@ -222,7 +231,7 @@ jobs: - name: Check compile-agentic version uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: - GH_AW_COMPILED_VERSION: "v0.72.1" + GH_AW_COMPILED_VERSION: "v0.76.1" with: script: | const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); @@ -242,7 +251,7 @@ jobs: await main(); - name: Add comment with workflow run link id: add-comment - if: github.event_name == 'issues' || github.event_name == 'issue_comment' || github.event_name == 'pull_request_review_comment' || github.event_name == 'discussion' || github.event_name == 'discussion_comment' || github.event_name == 'pull_request' && github.event.pull_request.head.repo.id == github.repository_id || github.event_name == 'pull_request_review' && github.event.pull_request.head.repo.id == github.repository_id + if: github.event_name == 'issues' || github.event_name == 'issue_comment' || github.event_name == 'pull_request_review_comment' || github.event_name == 'discussion' || github.event_name == 'discussion_comment' || github.event_name == 'pull_request' && github.event.pull_request.head.repo.id == github.repository_id uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: GH_AW_WORKFLOW_NAME: "Repo Assist" @@ -257,11 +266,11 @@ jobs: env: GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt GH_AW_SAFE_OUTPUTS: ${{ runner.temp }}/gh-aw/safeoutputs/outputs.jsonl + GH_AW_EXPR_1A3A194A: ${{ github.event.discussion.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'discussion' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }} + GH_AW_EXPR_463A214A: ${{ github.event.pull_request.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'pull_request' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }} + GH_AW_EXPR_802A9F6A: ${{ github.event.issue.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'issue' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }} + GH_AW_EXPR_FF1D34CE: ${{ github.event.comment.id || fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').comment_id }} GH_AW_GITHUB_ACTOR: ${{ github.actor }} - GH_AW_GITHUB_EVENT_COMMENT_ID: ${{ github.event.comment.id }} - GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER: ${{ github.event.discussion.number }} - GH_AW_GITHUB_EVENT_ISSUE_NUMBER: ${{ github.event.issue.number }} - GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }} GH_AW_GITHUB_REPOSITORY: ${{ github.repository }} GH_AW_GITHUB_RUN_ID: ${{ github.run_id }} GH_AW_GITHUB_SERVER_URL: ${{ github.server_url }} @@ -273,49 +282,49 @@ jobs: run: | bash "${RUNNER_TEMP}/gh-aw/actions/create_prompt_first.sh" { - cat << 'GH_AW_PROMPT_079de9fc4fac651c_EOF' + cat << 'GH_AW_PROMPT_2fa3ba19d5d984ea_EOF' - GH_AW_PROMPT_079de9fc4fac651c_EOF + GH_AW_PROMPT_2fa3ba19d5d984ea_EOF cat "${RUNNER_TEMP}/gh-aw/prompts/xpia.md" cat "${RUNNER_TEMP}/gh-aw/prompts/temp_folder_prompt.md" cat "${RUNNER_TEMP}/gh-aw/prompts/markdown.md" cat "${RUNNER_TEMP}/gh-aw/prompts/repo_memory_prompt.md" cat "${RUNNER_TEMP}/gh-aw/prompts/safe_outputs_prompt.md" - cat << 'GH_AW_PROMPT_079de9fc4fac651c_EOF' + cat << 'GH_AW_PROMPT_2fa3ba19d5d984ea_EOF' Tools: add_comment(max:10), create_issue(max:4), update_issue, create_pull_request(max:10), add_labels(max:30), remove_labels(max:10), push_to_pull_request_branch(max:4), missing_tool, missing_data, noop - GH_AW_PROMPT_079de9fc4fac651c_EOF + GH_AW_PROMPT_2fa3ba19d5d984ea_EOF cat "${RUNNER_TEMP}/gh-aw/prompts/safe_outputs_create_pull_request.md" cat "${RUNNER_TEMP}/gh-aw/prompts/safe_outputs_push_to_pr_branch.md" - cat << 'GH_AW_PROMPT_079de9fc4fac651c_EOF' + cat << 'GH_AW_PROMPT_2fa3ba19d5d984ea_EOF' - GH_AW_PROMPT_079de9fc4fac651c_EOF + GH_AW_PROMPT_2fa3ba19d5d984ea_EOF cat "${RUNNER_TEMP}/gh-aw/prompts/mcp_cli_tools_prompt.md" - cat << 'GH_AW_PROMPT_079de9fc4fac651c_EOF' + cat << 'GH_AW_PROMPT_2fa3ba19d5d984ea_EOF' The following GitHub context information is available for this workflow: - {{#if __GH_AW_GITHUB_ACTOR__ }} + {{#if github.actor}} - **actor**: __GH_AW_GITHUB_ACTOR__ {{/if}} - {{#if __GH_AW_GITHUB_REPOSITORY__ }} + {{#if github.repository}} - **repository**: __GH_AW_GITHUB_REPOSITORY__ {{/if}} - {{#if __GH_AW_GITHUB_WORKSPACE__ }} + {{#if github.workspace}} - **workspace**: __GH_AW_GITHUB_WORKSPACE__ {{/if}} - {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }} - - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ + {{#if github.event.issue.number || (github.aw.context.item_type == 'issue' && github.aw.context.item_number)}} + - **issue-number**: #__GH_AW_EXPR_802A9F6A__ {{/if}} - {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }} - - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ + {{#if github.event.discussion.number || (github.aw.context.item_type == 'discussion' && github.aw.context.item_number)}} + - **discussion-number**: #__GH_AW_EXPR_1A3A194A__ {{/if}} - {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }} - - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ + {{#if github.event.pull_request.number || (github.aw.context.item_type == 'pull_request' && github.aw.context.item_number)}} + - **pull-request-number**: #__GH_AW_EXPR_463A214A__ {{/if}} - {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }} - - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__ + {{#if github.event.comment.id || github.aw.context.comment_id}} + - **comment-id**: __GH_AW_EXPR_FF1D34CE__ {{/if}} - {{#if __GH_AW_GITHUB_RUN_ID__ }} + {{#if github.run_id}} - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__ {{/if}} - **checkouts**: The following repositories have been checked out and are available in the workspace: @@ -323,7 +332,7 @@ jobs: - **Note**: If a branch you need is not in the list above and is not listed as an additional fetched ref, it has NOT been checked out. For private repositories you cannot fetch it without proper authentication. If the branch is required and not available, exit with an error and ask the user to add it to the `fetch:` option of the `checkout:` configuration (e.g., `fetch: ["refs/pulls/open/*"]` for all open PR refs, or `fetch: ["main", "feature/my-branch"]` for specific branches). - GH_AW_PROMPT_079de9fc4fac651c_EOF + GH_AW_PROMPT_2fa3ba19d5d984ea_EOF cat "${RUNNER_TEMP}/gh-aw/prompts/github_mcp_tools_with_safeoutputs_prompt.md" if [ "$GITHUB_EVENT_NAME" = "issue_comment" ] && [ -n "$GH_AW_IS_PR_COMMENT" ] || [ "$GITHUB_EVENT_NAME" = "pull_request_review_comment" ] || [ "$GITHUB_EVENT_NAME" = "pull_request_review" ]; then cat "${RUNNER_TEMP}/gh-aw/prompts/pr_context_prompt.md" @@ -331,10 +340,10 @@ jobs: if [ "$GITHUB_EVENT_NAME" = "issue_comment" ] && [ -n "$GH_AW_IS_PR_COMMENT" ] || [ "$GITHUB_EVENT_NAME" = "pull_request_review_comment" ] || [ "$GITHUB_EVENT_NAME" = "pull_request_review" ]; then cat "${RUNNER_TEMP}/gh-aw/prompts/pr_context_push_to_pr_branch_guidance.md" fi - cat << 'GH_AW_PROMPT_079de9fc4fac651c_EOF' + cat << 'GH_AW_PROMPT_2fa3ba19d5d984ea_EOF' {{#runtime-import .github/workflows/repo-assist.md}} - GH_AW_PROMPT_079de9fc4fac651c_EOF + GH_AW_PROMPT_2fa3ba19d5d984ea_EOF } > "$GH_AW_PROMPT" - name: Interpolate variables and render templates uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 @@ -355,11 +364,11 @@ jobs: uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt + GH_AW_EXPR_1A3A194A: ${{ github.event.discussion.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'discussion' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }} + GH_AW_EXPR_463A214A: ${{ github.event.pull_request.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'pull_request' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }} + GH_AW_EXPR_802A9F6A: ${{ github.event.issue.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'issue' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }} + GH_AW_EXPR_FF1D34CE: ${{ github.event.comment.id || fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').comment_id }} GH_AW_GITHUB_ACTOR: ${{ github.actor }} - GH_AW_GITHUB_EVENT_COMMENT_ID: ${{ github.event.comment.id }} - GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER: ${{ github.event.discussion.number }} - GH_AW_GITHUB_EVENT_ISSUE_NUMBER: ${{ github.event.issue.number }} - GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }} GH_AW_GITHUB_REPOSITORY: ${{ github.repository }} GH_AW_GITHUB_RUN_ID: ${{ github.run_id }} GH_AW_GITHUB_SERVER_URL: ${{ github.server_url }} @@ -367,7 +376,7 @@ jobs: GH_AW_IS_PR_COMMENT: ${{ github.event.issue.pull_request && 'true' || '' }} GH_AW_MCP_CLI_SERVERS_LIST: '- `safeoutputs` — run `safeoutputs --help` to see available tools' GH_AW_MEMORY_BRANCH_NAME: 'memory/repo-assist' - GH_AW_MEMORY_CONSTRAINTS: "\n\n**Constraints:**\n- **Max File Size**: 10240 bytes (0.01 MB) per file\n- **Max File Count**: 100 files per commit\n- **Max Patch Size**: 10240 bytes (10 KB) total per push (max: 100 KB)\n" + GH_AW_MEMORY_CONSTRAINTS: "\n\n**Constraints:**\n- **Max File Size**: 102400 bytes (0.10 MB) per file\n- **Max File Count**: 100 files per commit\n- **Max Patch Size**: 10240 bytes (10 KB) total per push (max: 1024 KB)\n" GH_AW_MEMORY_DESCRIPTION: '' GH_AW_MEMORY_DIR: '/tmp/gh-aw/repo-memory/default/' GH_AW_MEMORY_TARGET_REPO: ' of the current repository' @@ -386,11 +395,11 @@ jobs: return await substitutePlaceholders({ file: process.env.GH_AW_PROMPT, substitutions: { + GH_AW_EXPR_1A3A194A: process.env.GH_AW_EXPR_1A3A194A, + GH_AW_EXPR_463A214A: process.env.GH_AW_EXPR_463A214A, + GH_AW_EXPR_802A9F6A: process.env.GH_AW_EXPR_802A9F6A, + GH_AW_EXPR_FF1D34CE: process.env.GH_AW_EXPR_FF1D34CE, GH_AW_GITHUB_ACTOR: process.env.GH_AW_GITHUB_ACTOR, - GH_AW_GITHUB_EVENT_COMMENT_ID: process.env.GH_AW_GITHUB_EVENT_COMMENT_ID, - GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER: process.env.GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER, - GH_AW_GITHUB_EVENT_ISSUE_NUMBER: process.env.GH_AW_GITHUB_EVENT_ISSUE_NUMBER, - GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER: process.env.GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER, GH_AW_GITHUB_REPOSITORY: process.env.GH_AW_GITHUB_REPOSITORY, GH_AW_GITHUB_RUN_ID: process.env.GH_AW_GITHUB_RUN_ID, GH_AW_GITHUB_SERVER_URL: process.env.GH_AW_GITHUB_SERVER_URL, @@ -432,6 +441,7 @@ jobs: /tmp/gh-aw/github_rate_limits.jsonl /tmp/gh-aw/base /tmp/gh-aw/.github/agents + /tmp/gh-aw/.github/skills if-no-files-found: ignore retention-days: 1 @@ -447,29 +457,36 @@ jobs: GH_AW_MCP_LOG_DIR: /tmp/gh-aw/mcp-logs/safeoutputs GH_AW_WORKFLOW_ID_SANITIZED: repoassist outputs: - agentic_engine_timeout: ${{ steps.detect-copilot-errors.outputs.agentic_engine_timeout || 'false' }} + agentic_engine_timeout: ${{ steps.detect-agent-errors.outputs.agentic_engine_timeout || 'false' }} checkout_pr_success: ${{ steps.checkout-pr.outputs.checkout_pr_success || 'true' }} effective_tokens: ${{ steps.parse-mcp-gateway.outputs.effective_tokens }} + effective_tokens_rate_limit_error: ${{ steps.parse-mcp-gateway.outputs.effective_tokens_rate_limit_error || 'false' }} has_patch: ${{ steps.collect_output.outputs.has_patch }} - inference_access_error: ${{ steps.detect-copilot-errors.outputs.inference_access_error || 'false' }} - mcp_policy_error: ${{ steps.detect-copilot-errors.outputs.mcp_policy_error || 'false' }} + inference_access_error: ${{ steps.detect-agent-errors.outputs.inference_access_error || 'false' }} + mcp_policy_error: ${{ steps.detect-agent-errors.outputs.mcp_policy_error || 'false' }} model: ${{ needs.activation.outputs.model }} - model_not_supported_error: ${{ steps.detect-copilot-errors.outputs.model_not_supported_error || 'false' }} + model_not_supported_error: ${{ steps.detect-agent-errors.outputs.model_not_supported_error || 'false' }} output: ${{ steps.collect_output.outputs.output }} output_types: ${{ steps.collect_output.outputs.output_types }} + setup-parent-span-id: ${{ steps.setup.outputs.parent-span-id || steps.setup.outputs.span-id }} + setup-span-id: ${{ steps.setup.outputs.span-id }} setup-trace-id: ${{ steps.setup.outputs.trace-id }} steps: - name: Setup Scripts id: setup - uses: github/gh-aw-actions/setup@bc56a0cad2f450c562810785ef38649c04db812a # v0.72.1 + uses: github/gh-aw-actions/setup@46d564922b082d0db93244972e8005ea6904ee5f # v0.76.1 with: destination: ${{ runner.temp }}/gh-aw/actions job-name: ${{ github.job }} trace-id: ${{ needs.activation.outputs.setup-trace-id }} + parent-span-id: ${{ needs.activation.outputs.setup-parent-span-id || needs.activation.outputs.setup-span-id }} env: GH_AW_SETUP_WORKFLOW_NAME: "Repo Assist" GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/repo-assist.lock.yml@${{ github.ref }} - GH_AW_INFO_VERSION: "1.0.40" + GH_AW_INFO_VERSION: "1.0.52" + GH_AW_INFO_AWF_VERSION: "v0.25.55" + GH_AW_INFO_BODY_MODIFIED: "false" + GH_AW_INFO_ENGINE_ID: "copilot" - name: Set runtime paths id: set-runtime-paths run: | @@ -500,18 +517,18 @@ jobs: GH_TOKEN: ${{ secrets.GH_AW_GITHUB_MCP_SERVER_TOKEN || secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} GITHUB_SERVER_URL: ${{ github.server_url }} DIFC_PROXY_POLICY: '{"allow-only":{"min-integrity":"none","repos":"all"}}' - DIFC_PROXY_IMAGE: 'ghcr.io/github/gh-aw-mcpg:v0.3.6' + DIFC_PROXY_IMAGE: 'ghcr.io/github/gh-aw-mcpg:v0.3.19' run: | bash "${RUNNER_TEMP}/gh-aw/actions/start_difc_proxy.sh" - name: Fetch repo data for task weighting run: | mkdir -p /tmp/gh-aw - # Fetch open issues with labels (up to 500) - gh issue list --state open --limit 500 --json number,labels > /tmp/gh-aw/issues.json + # Fetch open issues with labels (up to 200, reduced from 500 to avoid DIFC proxy timeouts) + gh issue list --state open --limit 200 --json number,labels > /tmp/gh-aw/issues.json || echo '[]' > /tmp/gh-aw/issues.json - # Fetch open PRs with titles (up to 200) - gh pr list --state open --limit 200 --json number,title > /tmp/gh-aw/prs.json + # Fetch open PRs with titles (up to 100, reduced from 200 to avoid DIFC proxy timeouts) + gh pr list --state open --limit 100 --json number,title > /tmp/gh-aw/prs.json || echo '[]' > /tmp/gh-aw/prs.json # Compute task weights and select two tasks for this run python3 - << 'EOF' @@ -637,11 +654,11 @@ jobs: const { main } = require('${{ runner.temp }}/gh-aw/actions/checkout_pr_branch.cjs'); await main(); - name: Install GitHub Copilot CLI - run: bash "${RUNNER_TEMP}/gh-aw/actions/install_copilot_cli.sh" 1.0.40 + run: bash "${RUNNER_TEMP}/gh-aw/actions/install_copilot_cli.sh" 1.0.52 env: GH_HOST: github.com - name: Install AWF binary - run: bash "${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh" v0.25.41 + run: bash "${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh" v0.25.55 - name: Parse integrity filter lists id: parse-guard-vars env: @@ -661,24 +678,28 @@ jobs: - name: Restore agent config folders from base branch if: steps.checkout-pr.outcome == 'success' env: - GH_AW_AGENT_FOLDERS: ".agents .claude .codex .crush .gemini .github .opencode .pi" - GH_AW_AGENT_FILES: ".crush.json AGENTS.md CLAUDE.md GEMINI.md PI.md opencode.jsonc" + GH_AW_AGENT_FOLDERS: ".agents .antigravity .claude .codex .crush .gemini .github .opencode .pi" + GH_AW_AGENT_FILES: ".crush.json AGENTS.md ANTIGRAVITY.md CLAUDE.md GEMINI.md PI.md opencode.jsonc" run: bash "${RUNNER_TEMP}/gh-aw/actions/restore_base_github_folders.sh" - name: Restore inline sub-agents from activation artifact env: GH_AW_SUB_AGENT_DIR: ".github/agents" GH_AW_SUB_AGENT_EXT: ".agent.md" run: bash "${RUNNER_TEMP}/gh-aw/actions/restore_inline_sub_agents.sh" + - name: Restore inline skills from activation artifact + env: + GH_AW_SKILL_DIR: ".github/skills" + run: bash "${RUNNER_TEMP}/gh-aw/actions/restore_inline_skills.sh" - name: Download container images - run: bash "${RUNNER_TEMP}/gh-aw/actions/download_docker_images.sh" ghcr.io/github/gh-aw-firewall/agent:0.25.41 ghcr.io/github/gh-aw-firewall/api-proxy:0.25.41 ghcr.io/github/gh-aw-firewall/squid:0.25.41 ghcr.io/github/gh-aw-mcpg:v0.3.6@sha256:2bb8eef86006a4c5963c55616a9c51c32f27bfdecb023b8aa6f91f6718d9171c ghcr.io/github/github-mcp-server:v1.0.3@sha256:2ac27ef03461ef2b877031b838a7d1fd7f12b12d4ace7796d8cad91446d55959 node:lts-alpine@sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f + run: bash "${RUNNER_TEMP}/gh-aw/actions/download_docker_images.sh" ghcr.io/github/gh-aw-firewall/agent:0.25.55 ghcr.io/github/gh-aw-firewall/api-proxy:0.25.55 ghcr.io/github/gh-aw-firewall/squid:0.25.55 ghcr.io/github/gh-aw-mcpg:v0.3.19 ghcr.io/github/github-mcp-server:v1.0.4@sha256:e3816a476a977cfb836e7d221510011436c654d11861db66ecfd826601aba6a4 node:lts-alpine@sha256:2bdb65ed1dab192432bc31c95f94155ca5ad7fc1392fb7eb7526ab682fa5bf14 - name: Generate Safe Outputs Config run: | mkdir -p "${RUNNER_TEMP}/gh-aw/safeoutputs" mkdir -p /tmp/gh-aw/safeoutputs mkdir -p /tmp/gh-aw/mcp-logs/safeoutputs - cat > "${RUNNER_TEMP}/gh-aw/safeoutputs/config.json" << 'GH_AW_SAFE_OUTPUTS_CONFIG_f8d257d8df397a18_EOF' - {"add_comment":{"hide_older_comments":true,"max":10,"target":"*"},"add_labels":{"allowed":["AI-thinks-issue-fixed","AI-thinks-windows-only"],"max":30,"target":"*"},"create_issue":{"labels":["automation","repo-assist"],"max":4,"title_prefix":"[Repo Assist] "},"create_pull_request":{"allowed_files":["tests/**","vsintegration/tests/**"],"auto_merge":true,"draft":false,"labels":["NO_RELEASE_NOTES","AI-Issue-Regression-PR"],"max":10,"max_patch_files":100,"max_patch_size":1024,"protect_top_level_dot_folders":true,"protected_files":["package.json","bun.lockb","bunfig.toml","deno.json","deno.jsonc","deno.lock","global.json","NuGet.Config","Directory.Packages.props","mix.exs","mix.lock","go.mod","go.sum","stack.yaml","stack.yaml.lock","pom.xml","build.gradle","build.gradle.kts","settings.gradle","settings.gradle.kts","gradle.properties","package-lock.json","yarn.lock","pnpm-lock.yaml","npm-shrinkwrap.json","requirements.txt","Pipfile","Pipfile.lock","pyproject.toml","setup.py","setup.cfg","Gemfile","Gemfile.lock","uv.lock","CODEOWNERS","DESIGN.md","README.md","CONTRIBUTING.md","CHANGELOG.md","SECURITY.md","CODE_OF_CONDUCT.md","AGENTS.md","CLAUDE.md","GEMINI.md"],"reviewers":["abonie","T-Gro"],"title_prefix":"Add regression test: "},"create_report_incomplete_issue":{},"missing_data":{},"missing_tool":{},"noop":{"max":1,"report-as-issue":"false"},"push_repo_memory":{"memories":[{"dir":"/tmp/gh-aw/repo-memory/default","id":"default","max_file_count":100,"max_file_size":10240,"max_patch_size":10240}]},"push_to_pull_request_branch":{"if_no_changes":"warn","max":4,"max_patch_size":1024,"protect_top_level_dot_folders":true,"protected_files":["package.json","bun.lockb","bunfig.toml","deno.json","deno.jsonc","deno.lock","global.json","NuGet.Config","Directory.Packages.props","mix.exs","mix.lock","go.mod","go.sum","stack.yaml","stack.yaml.lock","pom.xml","build.gradle","build.gradle.kts","settings.gradle","settings.gradle.kts","gradle.properties","package-lock.json","yarn.lock","pnpm-lock.yaml","npm-shrinkwrap.json","requirements.txt","Pipfile","Pipfile.lock","pyproject.toml","setup.py","setup.cfg","Gemfile","Gemfile.lock","uv.lock","CODEOWNERS","DESIGN.md","README.md","CONTRIBUTING.md","CHANGELOG.md","SECURITY.md","CODE_OF_CONDUCT.md","AGENTS.md","CLAUDE.md","GEMINI.md"],"protected_files_policy":"fallback-to-issue","target":"*","title_prefix":"[Repo Assist] "},"remove_labels":{"allowed":["AI-thinks-issue-fixed","AI-thinks-windows-only"],"max":10,"target":"*"},"report_incomplete":{},"update_issue":{"allow_body":true,"max":1,"target":"*","title_prefix":"[Repo Assist] "}} - GH_AW_SAFE_OUTPUTS_CONFIG_f8d257d8df397a18_EOF + cat > "${RUNNER_TEMP}/gh-aw/safeoutputs/config.json" << 'GH_AW_SAFE_OUTPUTS_CONFIG_700889b37c0f68ad_EOF' + {"add_comment":{"hide_older_comments":true,"max":10,"target":"*"},"add_labels":{"allowed":["AI-thinks-issue-fixed","AI-thinks-windows-only"],"max":30,"target":"*"},"create_issue":{"labels":["automation","repo-assist"],"max":4,"title_prefix":"[Repo Assist] "},"create_pull_request":{"allowed_files":["tests/**","vsintegration/tests/**"],"auto_merge":true,"draft":false,"labels":["NO_RELEASE_NOTES","AI-Issue-Regression-PR"],"max":10,"max_patch_files":100,"max_patch_size":1024,"protect_top_level_dot_folders":true,"protected_files":["package.json","bun.lockb","bunfig.toml","deno.json","deno.jsonc","deno.lock","global.json","NuGet.Config","Directory.Packages.props","mix.exs","mix.lock","go.mod","go.sum","stack.yaml","stack.yaml.lock","pom.xml","build.gradle","build.gradle.kts","settings.gradle","settings.gradle.kts","gradle.properties","package-lock.json","yarn.lock","pnpm-lock.yaml","npm-shrinkwrap.json","requirements.txt","Pipfile","Pipfile.lock","pyproject.toml","setup.py","setup.cfg","Gemfile","Gemfile.lock","uv.lock","CODEOWNERS","DESIGN.md","README.md","CONTRIBUTING.md","CHANGELOG.md","SECURITY.md","CODE_OF_CONDUCT.md","AGENTS.md","CLAUDE.md","GEMINI.md"],"protected_files_policy":"request_review","reviewers":["abonie","T-Gro"],"title_prefix":"Add regression test: "},"create_report_incomplete_issue":{},"missing_data":{},"missing_tool":{},"noop":{"max":1,"report-as-issue":"false"},"push_repo_memory":{"memories":[{"dir":"/tmp/gh-aw/repo-memory/default","id":"default","max_file_count":100,"max_file_size":102400,"max_patch_size":10240}]},"push_to_pull_request_branch":{"if_no_changes":"warn","max":4,"max_patch_size":1024,"protect_top_level_dot_folders":true,"protected_files":["package.json","bun.lockb","bunfig.toml","deno.json","deno.jsonc","deno.lock","global.json","NuGet.Config","Directory.Packages.props","mix.exs","mix.lock","go.mod","go.sum","stack.yaml","stack.yaml.lock","pom.xml","build.gradle","build.gradle.kts","settings.gradle","settings.gradle.kts","gradle.properties","package-lock.json","yarn.lock","pnpm-lock.yaml","npm-shrinkwrap.json","requirements.txt","Pipfile","Pipfile.lock","pyproject.toml","setup.py","setup.cfg","Gemfile","Gemfile.lock","uv.lock","CODEOWNERS","DESIGN.md","README.md","CONTRIBUTING.md","CHANGELOG.md","SECURITY.md","CODE_OF_CONDUCT.md","AGENTS.md","CLAUDE.md","GEMINI.md"],"protected_files_policy":"fallback-to-issue","target":"*","title_prefix":"[Repo Assist] "},"remove_labels":{"allowed":["AI-thinks-issue-fixed","AI-thinks-windows-only"],"max":10,"target":"*"},"report_incomplete":{},"update_issue":{"allow_body":true,"max":1,"target":"*","title_prefix":"[Repo Assist] "}} + GH_AW_SAFE_OUTPUTS_CONFIG_700889b37c0f68ad_EOF - name: Generate Safe Outputs Tools env: GH_AW_TOOLS_META_JSON: | @@ -747,6 +768,9 @@ jobs: "sanitize": true, "maxLength": 65000 }, + "fields": { + "type": "array" + }, "labels": { "type": "array", "itemType": "string", @@ -1052,17 +1076,22 @@ jobs: export GH_AW_ENGINE="copilot" MCP_GATEWAY_UID=$(id -u 2>/dev/null || echo '0') MCP_GATEWAY_GID=$(id -g 2>/dev/null || echo '0') - DOCKER_SOCK_GID=$(stat -c '%g' /var/run/docker.sock 2>/dev/null || echo '0') - export MCP_GATEWAY_DOCKER_COMMAND='docker run -i --rm --network host --add-host host.docker.internal:127.0.0.1 --user '"${MCP_GATEWAY_UID}"':'"${MCP_GATEWAY_GID}"' --group-add '"${DOCKER_SOCK_GID}"' -v /var/run/docker.sock:/var/run/docker.sock -e MCP_GATEWAY_PORT -e MCP_GATEWAY_DOMAIN -e MCP_GATEWAY_API_KEY -e MCP_GATEWAY_PAYLOAD_DIR -e MCP_GATEWAY_PAYLOAD_SIZE_THRESHOLD -e DEBUG -e MCP_GATEWAY_LOG_DIR -e GH_AW_MCP_LOG_DIR -e GH_AW_SAFE_OUTPUTS -e GH_AW_SAFE_OUTPUTS_CONFIG_PATH -e GH_AW_SAFE_OUTPUTS_TOOLS_PATH -e GH_AW_ASSETS_BRANCH -e GH_AW_ASSETS_MAX_SIZE_KB -e GH_AW_ASSETS_ALLOWED_EXTS -e DEFAULT_BRANCH -e GITHUB_MCP_SERVER_TOKEN -e GITHUB_MCP_GUARD_MIN_INTEGRITY -e GITHUB_MCP_GUARD_REPOS -e GITHUB_REPOSITORY -e GITHUB_SERVER_URL -e GITHUB_SHA -e GITHUB_WORKSPACE -e GITHUB_TOKEN -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RUN_ATTEMPT -e GITHUB_JOB -e GITHUB_ACTION -e GITHUB_EVENT_NAME -e GITHUB_EVENT_PATH -e GITHUB_ACTOR -e GITHUB_ACTOR_ID -e GITHUB_TRIGGERING_ACTOR -e GITHUB_WORKFLOW -e GITHUB_WORKFLOW_REF -e GITHUB_WORKFLOW_SHA -e GITHUB_REF -e GITHUB_REF_NAME -e GITHUB_REF_TYPE -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GH_AW_SAFE_OUTPUTS_PORT -e GH_AW_SAFE_OUTPUTS_API_KEY -v /tmp/gh-aw/mcp-payloads:/tmp/gh-aw/mcp-payloads:rw -v /opt:/opt:ro -v /tmp:/tmp:rw -v '"${GITHUB_WORKSPACE}"':'"${GITHUB_WORKSPACE}"':rw ghcr.io/github/gh-aw-mcpg:v0.3.6' + case "${DOCKER_HOST:-}" in + unix://* ) DOCKER_SOCK_PATH="${DOCKER_HOST#unix://}" ;; + /* ) DOCKER_SOCK_PATH="$DOCKER_HOST" ;; + * ) DOCKER_SOCK_PATH=/var/run/docker.sock ;; + esac + DOCKER_SOCK_GID=$(stat -c '%g' "$DOCKER_SOCK_PATH" 2>/dev/null || echo '0') + export MCP_GATEWAY_DOCKER_COMMAND='docker run -i --rm --network host --add-host host.docker.internal:127.0.0.1 --user '"${MCP_GATEWAY_UID}"':'"${MCP_GATEWAY_GID}"' --group-add '"${DOCKER_SOCK_GID}"' -v '"${DOCKER_SOCK_PATH}"':/var/run/docker.sock -e MCP_GATEWAY_PORT -e MCP_GATEWAY_DOMAIN -e MCP_GATEWAY_API_KEY -e MCP_GATEWAY_PAYLOAD_DIR -e MCP_GATEWAY_PAYLOAD_SIZE_THRESHOLD -e DOCKER_HOST=unix:///var/run/docker.sock -e DEBUG -e MCP_GATEWAY_LOG_DIR -e GH_AW_MCP_LOG_DIR -e GH_AW_SAFE_OUTPUTS -e GH_AW_SAFE_OUTPUTS_CONFIG_PATH -e GH_AW_SAFE_OUTPUTS_TOOLS_PATH -e GH_AW_ASSETS_BRANCH -e GH_AW_ASSETS_MAX_SIZE_KB -e GH_AW_ASSETS_ALLOWED_EXTS -e DEFAULT_BRANCH -e GITHUB_MCP_SERVER_TOKEN -e GITHUB_MCP_GUARD_MIN_INTEGRITY -e GITHUB_MCP_GUARD_REPOS -e GITHUB_REPOSITORY -e GITHUB_SERVER_URL -e GITHUB_SHA -e GITHUB_WORKSPACE -e GITHUB_TOKEN -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RUN_ATTEMPT -e GITHUB_JOB -e GITHUB_ACTION -e GITHUB_EVENT_NAME -e GITHUB_EVENT_PATH -e GITHUB_ACTOR -e GITHUB_ACTOR_ID -e GITHUB_TRIGGERING_ACTOR -e GITHUB_WORKFLOW -e GITHUB_WORKFLOW_REF -e GITHUB_WORKFLOW_SHA -e GITHUB_REF -e GITHUB_REF_NAME -e GITHUB_REF_TYPE -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GH_AW_SAFE_OUTPUTS_PORT -e GH_AW_SAFE_OUTPUTS_API_KEY -v /tmp/gh-aw/mcp-payloads:/tmp/gh-aw/mcp-payloads:rw -v /opt:/opt:ro -v /tmp:/tmp:rw -v '"${GITHUB_WORKSPACE}"':'"${GITHUB_WORKSPACE}"':rw ghcr.io/github/gh-aw-mcpg:v0.3.19' mkdir -p /home/runner/.copilot GH_AW_NODE=$(which node 2>/dev/null || command -v node 2>/dev/null || echo node) - cat << GH_AW_MCP_CONFIG_291347f0cb9616aa_EOF | "$GH_AW_NODE" "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.cjs" + cat << GH_AW_MCP_CONFIG_eaf58476447d0d61_EOF | "$GH_AW_NODE" "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.cjs" { "mcpServers": { "github": { "type": "stdio", - "container": "ghcr.io/github/github-mcp-server:v1.0.3", + "container": "ghcr.io/github/github-mcp-server:v1.0.4", "env": { "GITHUB_HOST": "\${GITHUB_SERVER_URL}", "GITHUB_PERSONAL_ACCESS_TOKEN": "\${GITHUB_MCP_SERVER_TOKEN}", @@ -1101,7 +1130,7 @@ jobs: "payloadDir": "${MCP_GATEWAY_PAYLOAD_DIR}" } } - GH_AW_MCP_CONFIG_291347f0cb9616aa_EOF + GH_AW_MCP_CONFIG_eaf58476447d0d61_EOF - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true @@ -1129,25 +1158,32 @@ jobs: timeout-minutes: 60 run: | set -o pipefail + printf '%s' "$(date +%s%3N)" > /tmp/gh-aw/agent_cli_start_ms.txt touch /tmp/gh-aw/agent-step-summary.md GH_AW_NODE_BIN=$(command -v node 2>/dev/null || true) export GH_AW_NODE_BIN + export COPILOT_API_KEY="$COPILOT_DUMMY_BYOK" (umask 177 && touch /tmp/gh-aw/agent-stdio.log) - printf '%s\n' '{"$schema":"https://github.com/github/gh-aw-firewall/releases/download/v0.25.41/awf-config.schema.json","network":{"allowDomains":["*.pythonhosted.org","*.vsblob.vsassets.io","anaconda.org","api.business.githubcopilot.com","api.enterprise.githubcopilot.com","api.github.com","api.githubcopilot.com","api.individual.githubcopilot.com","api.nuget.org","api.snapcraft.io","archive.ubuntu.com","azure.archive.ubuntu.com","azuresearch-usnc.nuget.org","azuresearch-ussc.nuget.org","binstar.org","bootstrap.pypa.io","builds.dotnet.microsoft.com","ci.dot.net","conda.anaconda.org","conda.binstar.org","crl.geotrust.com","crl.globalsign.com","crl.identrust.com","crl.sectigo.com","crl.thawte.com","crl.usertrust.com","crl.verisign.com","crl3.digicert.com","crl4.digicert.com","crls.ssl.com","dc.services.visualstudio.com","dist.nuget.org","dot.net","dotnet.microsoft.com","dotnetcli.blob.core.windows.net","files.pythonhosted.org","github.com","host.docker.internal","json-schema.org","json.schemastore.org","keyserver.ubuntu.com","nuget.org","nuget.pkg.github.com","nugetregistryv2prod.blob.core.windows.net","ocsp.digicert.com","ocsp.geotrust.com","ocsp.globalsign.com","ocsp.identrust.com","ocsp.sectigo.com","ocsp.ssl.com","ocsp.thawte.com","ocsp.usertrust.com","ocsp.verisign.com","oneocsp.microsoft.com","packagecloud.io","packages.cloud.google.com","packages.microsoft.com","pip.pypa.io","pkgs.dev.azure.com","ppa.launchpad.net","pypi.org","pypi.python.org","raw.githubusercontent.com","registry.npmjs.org","repo.anaconda.com","repo.continuum.io","s.symcb.com","s.symcd.com","security.ubuntu.com","telemetry.enterprise.githubcopilot.com","ts-crl.ws.symantec.com","ts-ocsp.ws.symantec.com","www.googleapis.com","www.microsoft.com"]},"apiProxy":{"enabled":true,"models":{"auto":["large"],"deep-research":["copilot/deep-research*","copilot/o3-deep-research*","copilot/o4-mini-deep-research*","google/deep-research*","openai/o3-deep-research*","openai/o4-mini-deep-research*"],"gemini-flash":["copilot/gemini-*flash*","google/gemini-*flash*"],"gemini-pro":["copilot/gemini-*pro*","google/gemini-*pro*"],"gpt-4.1":["copilot/gpt-4.1*","openai/gpt-4.1*"],"gpt-5":["copilot/gpt-5*","openai/gpt-5*"],"gpt-5-codex":["copilot/gpt-5*codex*","openai/gpt-5*codex*"],"gpt-5-mini":["copilot/gpt-5*mini*","openai/gpt-5*mini*"],"gpt-5-nano":["copilot/gpt-5*nano*","openai/gpt-5*nano*"],"gpt-5-pro":["copilot/gpt-5*pro*","openai/gpt-5*pro*"],"haiku":["copilot/*haiku*","anthropic/*haiku*"],"large":["sonnet","gpt-5-pro","gpt-5","gemini-pro"],"mini":["haiku","gpt-5-mini","gpt-5-nano","gemini-flash"],"opus":["copilot/*opus*","anthropic/*opus*"],"reasoning":["copilot/o1*","copilot/o3*","copilot/o4*","openai/o1*","openai/o3*","openai/o4*"],"small":["mini"],"sonnet":["copilot/*sonnet*","anthropic/*sonnet*"]}},"container":{"imageTag":"0.25.41"}}' > "${RUNNER_TEMP}/gh-aw/awf-config.json" && cp "${RUNNER_TEMP}/gh-aw/awf-config.json" /tmp/gh-aw/awf-config.json + printf '%s\n' '{"$schema":"https://github.com/github/gh-aw-firewall/releases/download/v0.25.55/awf-config.schema.json","network":{"allowDomains":["*.pythonhosted.org","*.vsblob.vsassets.io","anaconda.org","api.business.githubcopilot.com","api.enterprise.githubcopilot.com","api.github.com","api.githubcopilot.com","api.individual.githubcopilot.com","api.nuget.org","api.snapcraft.io","archive.ubuntu.com","azure.archive.ubuntu.com","azuresearch-usnc.nuget.org","azuresearch-ussc.nuget.org","binstar.org","bootstrap.pypa.io","builds.dotnet.microsoft.com","ci.dot.net","conda.anaconda.org","conda.binstar.org","crl.geotrust.com","crl.globalsign.com","crl.identrust.com","crl.sectigo.com","crl.thawte.com","crl.usertrust.com","crl.verisign.com","crl3.digicert.com","crl4.digicert.com","crls.ssl.com","dc.services.visualstudio.com","dist.nuget.org","dot.net","dotnet.microsoft.com","dotnetcli.blob.core.windows.net","files.pythonhosted.org","github.com","host.docker.internal","json-schema.org","json.schemastore.org","keyserver.ubuntu.com","nuget.org","nuget.pkg.github.com","nugetregistryv2prod.blob.core.windows.net","ocsp.digicert.com","ocsp.geotrust.com","ocsp.globalsign.com","ocsp.identrust.com","ocsp.sectigo.com","ocsp.ssl.com","ocsp.thawte.com","ocsp.usertrust.com","ocsp.verisign.com","oneocsp.microsoft.com","packagecloud.io","packages.cloud.google.com","packages.microsoft.com","pip.pypa.io","pkgs.dev.azure.com","ppa.launchpad.net","pypi.org","pypi.python.org","raw.githubusercontent.com","registry.npmjs.org","repo.anaconda.com","repo.continuum.io","s.symcb.com","s.symcd.com","security.ubuntu.com","telemetry.enterprise.githubcopilot.com","ts-crl.ws.symantec.com","ts-ocsp.ws.symantec.com","www.googleapis.com","www.microsoft.com"]},"apiProxy":{"enabled":true,"enableTokenSteering":true,"maxRuns":500,"maxEffectiveTokens":25000000,"models":{"agent":["sonnet-6x","gpt-5.4","gpt-5.3","gemini-pro","any"],"antigravity":["copilot/antigravity*","google/antigravity*","gemini/antigravity*"],"any":["copilot/*","anthropic/*","openai/*","google/*","gemini/*"],"claude":["agent"],"codex":["agent"],"coding":["copilot/gpt-5*codex*","openai/gpt-5*codex*","gpt-5-codex"],"computer-use":["copilot/*computer-use*","google/*computer-use*","gemini/*computer-use*","openai/*computer-use*"],"copilot":["agent"],"deep-research":["copilot/deep-research*","copilot/o3-deep-research*","copilot/o4-mini-deep-research*","google/deep-research*","gemini/deep-research*","openai/o3-deep-research*","openai/o4-mini-deep-research*"],"gemini":["agent"],"gemini-3-flash":["copilot/gemini-3*flash*","google/gemini-3*flash*","gemini/gemini-3*flash*"],"gemini-3-pro":["copilot/gemini-3*pro*","google/gemini-3*pro*","gemini/gemini-3*pro*"],"gemini-3.1-flash":["copilot/gemini-3.1*flash*","google/gemini-3.1*flash*","gemini/gemini-3.1*flash*"],"gemini-3.1-pro":["copilot/gemini-3.1*pro*","google/gemini-3.1*pro*","gemini/gemini-3.1*pro*"],"gemini-3.5-flash":["copilot/gemini-3.5*flash*","google/gemini-3.5*flash*","gemini/gemini-3.5*flash*"],"gemini-flash":["copilot/gemini-*flash*","google/gemini-*flash*","gemini/gemini-*flash*"],"gemini-flash-lite":["copilot/gemini-*flash*lite*","google/gemini-*flash*lite*","gemini/gemini-*flash*lite*"],"gemini-pro":["copilot/gemini-*pro*","google/gemini-*pro*","gemini/gemini-*pro*"],"gemma":["copilot/gemma*","google/gemma*","gemini/gemma*"],"gpt-4.1":["copilot/gpt-4.1*","openai/gpt-4.1*"],"gpt-5":["copilot/gpt-5*","openai/gpt-5*"],"gpt-5-codex":["copilot/gpt-5*codex*","openai/gpt-5*codex*"],"gpt-5-mini":["copilot/gpt-5*mini*","openai/gpt-5*mini*"],"gpt-5-nano":["copilot/gpt-5*nano*","openai/gpt-5*nano*"],"gpt-5-pro":["copilot/gpt-5*pro*","openai/gpt-5*pro*"],"gpt-5.2":["copilot/gpt-5.2*","openai/gpt-5.2*"],"gpt-5.3":["copilot/gpt-5.3*","openai/gpt-5.3*"],"gpt-5.4":["copilot/gpt-5.4*","openai/gpt-5.4*"],"gpt-5.5":["copilot/gpt-5.5*","openai/gpt-5.5*"],"haiku":["copilot/*haiku*","anthropic/*haiku*"],"large":["sonnet","gpt-5-pro","gpt-5","gemini-pro"],"mini":["haiku","gpt-5-mini","gpt-5-nano","gemini-flash-lite"],"opus":["copilot/*opus*","anthropic/*opus*"],"opusplan":["opus?effort=high"],"reasoning":["copilot/o1*","copilot/o3*","copilot/o4*","openai/o1*","openai/o3*","openai/o4*"],"robotics":["copilot/*robotics*","google/*robotics*","gemini/*robotics*"],"small":["mini"],"sonnet":["copilot/*sonnet*","anthropic/*sonnet*"],"sonnet-6x":["copilot/*sonnet-4-5-*","anthropic/*sonnet-4-5-*","copilot/*sonnet-4-6*","anthropic/*sonnet-4-6*"],"summarization":["haiku","gpt-5-mini","gemini-flash-lite","mini"],"vision":["copilot/gemini-*image*","gemini/gemini-*image*","copilot/gemini-*flash*","gemini/gemini-*flash*"]}},"container":{"imageTag":"0.25.55"}}' > "${RUNNER_TEMP}/gh-aw/awf-config.json" + cp "${RUNNER_TEMP}/gh-aw/awf-config.json" /tmp/gh-aw/awf-config.json + GH_AW_DOCKER_HOST_PATH_PREFIX_ARGS="" + if [[ "${DOCKER_HOST:-}" =~ ^tcp:// ]]; then + GH_AW_DOCKER_HOST_PATH_PREFIX_ARGS="--docker-host-path-prefix /tmp/gh-aw" + fi # shellcheck disable=SC1003 - sudo -E awf --config "${RUNNER_TEMP}/gh-aw/awf-config.json" --container-workdir "${GITHUB_WORKSPACE}" --mount "${RUNNER_TEMP}/gh-aw:${RUNNER_TEMP}/gh-aw:ro" --mount "${RUNNER_TEMP}/gh-aw:/host${RUNNER_TEMP}/gh-aw:ro" --env-all --exclude-env COPILOT_GITHUB_TOKEN --exclude-env GITHUB_MCP_SERVER_TOKEN --exclude-env MCP_GATEWAY_API_KEY --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --audit-dir /tmp/gh-aw/sandbox/firewall/audit --enable-host-access --allow-host-ports 80,443,8080 --skip-pull \ - -- /bin/bash -c 'export PATH="${RUNNER_TEMP}/gh-aw/mcp-cli/bin:$PATH" && export PATH="$(find /opt/hostedtoolcache /home/runner/work/_tool -maxdepth 4 -type d -name bin 2>/dev/null | tr '\''\n'\'' '\'':'\'')$PATH"; [ -n "$GOROOT" ] && export PATH="$GOROOT/bin:$PATH" || true && GH_AW_NODE_EXEC="${GH_AW_NODE_BIN:-}"; if [ -z "$GH_AW_NODE_EXEC" ] || [ ! -x "$GH_AW_NODE_EXEC" ]; then GH_AW_NODE_EXEC="$(command -v node 2>/dev/null || echo node)"; fi; "$GH_AW_NODE_EXEC" ${RUNNER_TEMP}/gh-aw/actions/copilot_harness.cjs /usr/local/bin/copilot --add-dir /tmp/gh-aw/ --log-level all --log-dir /tmp/gh-aw/sandbox/agent/logs/ --disable-builtin-mcps --no-ask-user --allow-all-tools --allow-all-paths --add-dir "${GITHUB_WORKSPACE}" --prompt-file /tmp/gh-aw/aw-prompts/prompt.txt' 2>&1 | tee -a /tmp/gh-aw/agent-stdio.log + sudo -E awf --config "${RUNNER_TEMP}/gh-aw/awf-config.json" --container-workdir "${GITHUB_WORKSPACE}" --mount "${RUNNER_TEMP}/gh-aw:${RUNNER_TEMP}/gh-aw:ro" --mount "${RUNNER_TEMP}/gh-aw:/host${RUNNER_TEMP}/gh-aw:ro" ${GH_AW_DOCKER_HOST_PATH_PREFIX_ARGS} --env-all --exclude-env COPILOT_GITHUB_TOKEN --exclude-env GITHUB_MCP_SERVER_TOKEN --exclude-env MCP_GATEWAY_API_KEY --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --audit-dir /tmp/gh-aw/sandbox/firewall/audit --enable-host-access --allow-host-ports 80,443,8080 --skip-pull \ + -- /bin/bash -c 'export PATH="${RUNNER_TEMP}/gh-aw/mcp-cli/bin:$PATH" && export PATH="$(find /opt/hostedtoolcache /home/runner/work/_tool -maxdepth 5 -type d -name bin 2>/dev/null | tr '\''\n'\'' '\'':'\'')$PATH"; [ -n "$GOROOT" ] && export PATH="$GOROOT/bin:$PATH" || true && GH_AW_NODE_EXEC="${GH_AW_NODE_BIN:-}"; if [ -z "$GH_AW_NODE_EXEC" ] || [ ! -x "$GH_AW_NODE_EXEC" ]; then GH_AW_NODE_EXEC="$(command -v node 2>/dev/null || true)"; fi; if [ -z "$GH_AW_NODE_EXEC" ]; then echo "node runtime missing on this runner — check runtimes.node in workflow YAML" >&2; exit 127; fi; "$GH_AW_NODE_EXEC" ${RUNNER_TEMP}/gh-aw/actions/copilot_harness.cjs /usr/local/bin/copilot --add-dir /tmp/gh-aw/ --log-level all --log-dir /tmp/gh-aw/sandbox/agent/logs/ --disable-builtin-mcps --no-ask-user --allow-all-tools --allow-all-paths --add-dir "${GITHUB_WORKSPACE}" --prompt-file /tmp/gh-aw/aw-prompts/prompt.txt' 2>&1 | tee -a /tmp/gh-aw/agent-stdio.log env: AWF_REFLECT_ENABLED: 1 COPILOT_AGENT_RUNNER_TYPE: STANDALONE - COPILOT_API_KEY: dummy-byok-key-for-offline-mode + COPILOT_DUMMY_BYOK: dummy-byok-key-for-offline-mode COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }} COPILOT_MODEL: ${{ vars.GH_AW_MODEL_AGENT_COPILOT || 'claude-sonnet-4.6' }} GH_AW_MCP_CONFIG: /home/runner/.copilot/mcp-config.json GH_AW_PHASE: agent GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt GH_AW_SAFE_OUTPUTS: ${{ steps.set-runtime-paths.outputs.GH_AW_SAFE_OUTPUTS }} - GH_AW_VERSION: v0.72.1 + GH_AW_VERSION: v0.76.1 GITHUB_API_URL: ${{ github.api_url }} GITHUB_AW: true GITHUB_COPILOT_INTEGRATION_ID: agentic-workflows @@ -1162,11 +1198,11 @@ jobs: GIT_COMMITTER_EMAIL: github-actions[bot]@users.noreply.github.com GIT_COMMITTER_NAME: github-actions[bot] XDG_CONFIG_HOME: /home/runner - - name: Detect Copilot errors - id: detect-copilot-errors + - name: Detect agent errors if: always() + id: detect-agent-errors continue-on-error: true - run: node "${RUNNER_TEMP}/gh-aw/actions/detect_copilot_errors.cjs" + run: node "${RUNNER_TEMP}/gh-aw/actions/detect_agent_errors.cjs" - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -1227,7 +1263,7 @@ jobs: GH_AW_ALLOWED_DOMAINS: "*.pythonhosted.org,*.vsblob.vsassets.io,anaconda.org,api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.nuget.org,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,azuresearch-usnc.nuget.org,azuresearch-ussc.nuget.org,binstar.org,bootstrap.pypa.io,builds.dotnet.microsoft.com,ci.dot.net,conda.anaconda.org,conda.binstar.org,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,dc.services.visualstudio.com,dist.nuget.org,dot.net,dotnet.microsoft.com,dotnetcli.blob.core.windows.net,files.pythonhosted.org,github.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,nuget.org,nuget.pkg.github.com,nugetregistryv2prod.blob.core.windows.net,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,oneocsp.microsoft.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,pip.pypa.io,pkgs.dev.azure.com,ppa.launchpad.net,pypi.org,pypi.python.org,raw.githubusercontent.com,registry.npmjs.org,repo.anaconda.com,repo.continuum.io,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com,www.googleapis.com,www.microsoft.com" GITHUB_SERVER_URL: ${{ github.server_url }} GITHUB_API_URL: ${{ github.api_url }} - GH_AW_COMMAND: repo-assist + GH_AW_COMMANDS: "[\"repo-assist\"]" with: script: | const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); @@ -1358,6 +1394,7 @@ jobs: concurrency: group: "gh-aw-conclusion-repo-assist" cancel-in-progress: false + queue: max outputs: incomplete_count: ${{ steps.report_incomplete.outputs.incomplete_count }} noop_message: ${{ steps.noop.outputs.noop_message }} @@ -1366,15 +1403,19 @@ jobs: steps: - name: Setup Scripts id: setup - uses: github/gh-aw-actions/setup@bc56a0cad2f450c562810785ef38649c04db812a # v0.72.1 + uses: github/gh-aw-actions/setup@46d564922b082d0db93244972e8005ea6904ee5f # v0.76.1 with: destination: ${{ runner.temp }}/gh-aw/actions job-name: ${{ github.job }} trace-id: ${{ needs.activation.outputs.setup-trace-id }} + parent-span-id: ${{ needs.activation.outputs.setup-parent-span-id || needs.activation.outputs.setup-span-id }} env: GH_AW_SETUP_WORKFLOW_NAME: "Repo Assist" GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/repo-assist.lock.yml@${{ github.ref }} - GH_AW_INFO_VERSION: "1.0.40" + GH_AW_INFO_VERSION: "1.0.52" + GH_AW_INFO_AWF_VERSION: "v0.25.55" + GH_AW_INFO_BODY_MODIFIED: "false" + GH_AW_INFO_ENGINE_ID: "copilot" - name: Download agent output artifact id: download-agent-output continue-on-error: true @@ -1474,6 +1515,8 @@ jobs: GH_AW_ENGINE_ID: "copilot" GH_AW_SECRET_VERIFICATION_RESULT: ${{ needs.activation.outputs.secret_verification_result }} GH_AW_CHECKOUT_PR_SUCCESS: ${{ needs.agent.outputs.checkout_pr_success }} + GH_AW_EFFECTIVE_TOKENS: ${{ needs.agent.outputs.effective_tokens || '' }} + GH_AW_EFFECTIVE_TOKENS_RATE_LIMIT_ERROR: ${{ needs.agent.outputs.effective_tokens_rate_limit_error || 'false' }} GH_AW_INFERENCE_ACCESS_ERROR: ${{ needs.agent.outputs.inference_access_error }} GH_AW_MCP_POLICY_ERROR: ${{ needs.agent.outputs.mcp_policy_error }} GH_AW_AGENTIC_ENGINE_TIMEOUT: ${{ needs.agent.outputs.agentic_engine_timeout }} @@ -1493,6 +1536,7 @@ jobs: GH_AW_MISSING_TOOL_REPORT_AS_FAILURE: "true" GH_AW_MISSING_DATA_REPORT_AS_FAILURE: "true" GH_AW_TIMEOUT_MINUTES: "60" + GH_AW_MAX_EFFECTIVE_TOKENS: "25000000" with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} script: | @@ -1538,15 +1582,19 @@ jobs: steps: - name: Setup Scripts id: setup - uses: github/gh-aw-actions/setup@bc56a0cad2f450c562810785ef38649c04db812a # v0.72.1 + uses: github/gh-aw-actions/setup@46d564922b082d0db93244972e8005ea6904ee5f # v0.76.1 with: destination: ${{ runner.temp }}/gh-aw/actions job-name: ${{ github.job }} trace-id: ${{ needs.activation.outputs.setup-trace-id }} + parent-span-id: ${{ needs.activation.outputs.setup-parent-span-id || needs.activation.outputs.setup-span-id }} env: GH_AW_SETUP_WORKFLOW_NAME: "Repo Assist" GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/repo-assist.lock.yml@${{ github.ref }} - GH_AW_INFO_VERSION: "1.0.40" + GH_AW_INFO_VERSION: "1.0.52" + GH_AW_INFO_AWF_VERSION: "v0.25.55" + GH_AW_INFO_BODY_MODIFIED: "false" + GH_AW_INFO_ENGINE_ID: "copilot" - name: Download agent output artifact id: download-agent-output continue-on-error: true @@ -1572,7 +1620,7 @@ jobs: rm -rf /tmp/gh-aw/sandbox/firewall/logs rm -rf /tmp/gh-aw/sandbox/firewall/audit - name: Download container images - run: bash "${RUNNER_TEMP}/gh-aw/actions/download_docker_images.sh" ghcr.io/github/gh-aw-firewall/agent:0.25.41 ghcr.io/github/gh-aw-firewall/api-proxy:0.25.41 ghcr.io/github/gh-aw-firewall/squid:0.25.41 + run: bash "${RUNNER_TEMP}/gh-aw/actions/download_docker_images.sh" ghcr.io/github/gh-aw-firewall/agent:0.25.55 ghcr.io/github/gh-aw-firewall/api-proxy:0.25.55 ghcr.io/github/gh-aw-firewall/squid:0.25.55 - name: Check if detection needed id: detection_guard if: always() @@ -1631,11 +1679,11 @@ jobs: node-version: '24' package-manager-cache: false - name: Install GitHub Copilot CLI - run: bash "${RUNNER_TEMP}/gh-aw/actions/install_copilot_cli.sh" 1.0.40 + run: bash "${RUNNER_TEMP}/gh-aw/actions/install_copilot_cli.sh" 1.0.52 env: GH_HOST: github.com - name: Install AWF binary - run: bash "${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh" v0.25.41 + run: bash "${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh" v0.25.55 - name: Execute GitHub Copilot CLI if: always() && steps.detection_guard.outputs.run_detection == 'true' continue-on-error: true @@ -1644,23 +1692,30 @@ jobs: timeout-minutes: 20 run: | set -o pipefail + printf '%s' "$(date +%s%3N)" > /tmp/gh-aw/agent_cli_start_ms.txt touch /tmp/gh-aw/agent-step-summary.md GH_AW_NODE_BIN=$(command -v node 2>/dev/null || true) export GH_AW_NODE_BIN + export COPILOT_API_KEY="$COPILOT_DUMMY_BYOK" (umask 177 && touch /tmp/gh-aw/threat-detection/detection.log) - printf '%s\n' '{"$schema":"https://github.com/github/gh-aw-firewall/releases/download/v0.25.41/awf-config.schema.json","network":{"allowDomains":["api.business.githubcopilot.com","api.enterprise.githubcopilot.com","api.github.com","api.githubcopilot.com","api.individual.githubcopilot.com","github.com","host.docker.internal","telemetry.enterprise.githubcopilot.com"]},"apiProxy":{"enabled":true},"container":{"imageTag":"0.25.41"}}' > "${RUNNER_TEMP}/gh-aw/awf-config.json" && cp "${RUNNER_TEMP}/gh-aw/awf-config.json" /tmp/gh-aw/awf-config.json + printf '%s\n' '{"$schema":"https://github.com/github/gh-aw-firewall/releases/download/v0.25.55/awf-config.schema.json","network":{"allowDomains":["api.business.githubcopilot.com","api.enterprise.githubcopilot.com","api.github.com","api.githubcopilot.com","api.individual.githubcopilot.com","github.com","host.docker.internal","telemetry.enterprise.githubcopilot.com"]},"apiProxy":{"enabled":true,"enableTokenSteering":true,"maxRuns":500,"maxEffectiveTokens":25000000},"container":{"imageTag":"0.25.55"}}' > "${RUNNER_TEMP}/gh-aw/awf-config.json" + cp "${RUNNER_TEMP}/gh-aw/awf-config.json" /tmp/gh-aw/awf-config.json + GH_AW_DOCKER_HOST_PATH_PREFIX_ARGS="" + if [[ "${DOCKER_HOST:-}" =~ ^tcp:// ]]; then + GH_AW_DOCKER_HOST_PATH_PREFIX_ARGS="--docker-host-path-prefix /tmp/gh-aw" + fi # shellcheck disable=SC1003 - sudo -E awf --config "${RUNNER_TEMP}/gh-aw/awf-config.json" --container-workdir "${GITHUB_WORKSPACE}" --mount "${RUNNER_TEMP}/gh-aw:${RUNNER_TEMP}/gh-aw:ro" --mount "${RUNNER_TEMP}/gh-aw:/host${RUNNER_TEMP}/gh-aw:ro" --env-all --exclude-env COPILOT_GITHUB_TOKEN --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --audit-dir /tmp/gh-aw/sandbox/firewall/audit --enable-host-access --allow-host-ports 80,443,8080 --skip-pull \ - -- /bin/bash -c 'export PATH="$(find /opt/hostedtoolcache /home/runner/work/_tool -maxdepth 4 -type d -name bin 2>/dev/null | tr '\''\n'\'' '\'':'\'')$PATH"; [ -n "$GOROOT" ] && export PATH="$GOROOT/bin:$PATH" || true && GH_AW_NODE_EXEC="${GH_AW_NODE_BIN:-}"; if [ -z "$GH_AW_NODE_EXEC" ] || [ ! -x "$GH_AW_NODE_EXEC" ]; then GH_AW_NODE_EXEC="$(command -v node 2>/dev/null || echo node)"; fi; "$GH_AW_NODE_EXEC" ${RUNNER_TEMP}/gh-aw/actions/copilot_harness.cjs /usr/local/bin/copilot --add-dir /tmp/gh-aw/ --log-level all --log-dir /tmp/gh-aw/sandbox/agent/logs/ --disable-builtin-mcps --no-ask-user --allow-all-tools --add-dir "${GITHUB_WORKSPACE}" --prompt-file /tmp/gh-aw/aw-prompts/prompt.txt' 2>&1 | tee -a /tmp/gh-aw/threat-detection/detection.log + sudo -E awf --config "${RUNNER_TEMP}/gh-aw/awf-config.json" --container-workdir "${GITHUB_WORKSPACE}" --mount "${RUNNER_TEMP}/gh-aw:${RUNNER_TEMP}/gh-aw:ro" --mount "${RUNNER_TEMP}/gh-aw:/host${RUNNER_TEMP}/gh-aw:ro" ${GH_AW_DOCKER_HOST_PATH_PREFIX_ARGS} --env-all --exclude-env COPILOT_GITHUB_TOKEN --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --audit-dir /tmp/gh-aw/sandbox/firewall/audit --enable-host-access --allow-host-ports 80,443,8080 --skip-pull \ + -- /bin/bash -c 'export PATH="$(find /opt/hostedtoolcache /home/runner/work/_tool -maxdepth 5 -type d -name bin 2>/dev/null | tr '\''\n'\'' '\'':'\'')$PATH"; [ -n "$GOROOT" ] && export PATH="$GOROOT/bin:$PATH" || true && GH_AW_NODE_EXEC="${GH_AW_NODE_BIN:-}"; if [ -z "$GH_AW_NODE_EXEC" ] || [ ! -x "$GH_AW_NODE_EXEC" ]; then GH_AW_NODE_EXEC="$(command -v node 2>/dev/null || true)"; fi; if [ -z "$GH_AW_NODE_EXEC" ]; then echo "node runtime missing on this runner — check runtimes.node in workflow YAML" >&2; exit 127; fi; "$GH_AW_NODE_EXEC" ${RUNNER_TEMP}/gh-aw/actions/copilot_harness.cjs /usr/local/bin/copilot --add-dir /tmp/gh-aw/ --log-level all --log-dir /tmp/gh-aw/sandbox/agent/logs/ --disable-builtin-mcps --no-ask-user --allow-all-tools --add-dir "${GITHUB_WORKSPACE}" --prompt-file /tmp/gh-aw/aw-prompts/prompt.txt' 2>&1 | tee -a /tmp/gh-aw/threat-detection/detection.log env: AWF_REFLECT_ENABLED: 1 COPILOT_AGENT_RUNNER_TYPE: STANDALONE - COPILOT_API_KEY: dummy-byok-key-for-offline-mode + COPILOT_DUMMY_BYOK: dummy-byok-key-for-offline-mode COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }} COPILOT_MODEL: ${{ vars.GH_AW_MODEL_DETECTION_COPILOT || 'claude-sonnet-4.6' }} GH_AW_PHASE: detection GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt - GH_AW_VERSION: v0.72.1 + GH_AW_VERSION: v0.76.1 GITHUB_API_URL: ${{ github.api_url }} GITHUB_AW: true GITHUB_COPILOT_INTEGRATION_ID: agentic-workflows @@ -1688,6 +1743,7 @@ jobs: uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: RUN_DETECTION: ${{ steps.detection_guard.outputs.run_detection }} + DETECTION_AGENTIC_EXECUTION_OUTCOME: ${{ steps.detection_agentic_execution.outcome }} GH_AW_DETECTION_CONTINUE_ON_ERROR: "true" with: script: | @@ -1698,10 +1754,11 @@ jobs: await main(); } catch (loadErr) { const continueOnError = process.env.GH_AW_DETECTION_CONTINUE_ON_ERROR !== 'false'; + const detectionExecutionFailed = process.env.DETECTION_AGENTIC_EXECUTION_OUTCOME === 'failure'; const msg = 'ERR_SYSTEM: \u274C Unexpected error loading threat detection module: ' + (loadErr && loadErr.message ? loadErr.message : String(loadErr)); core.error(msg); core.setOutput('reason', 'parse_error'); - if (continueOnError) { + if (continueOnError && !detectionExecutionFailed) { core.warning('\u26A0\uFE0F ' + msg); core.setOutput('conclusion', 'warning'); core.setOutput('success', 'false'); @@ -1718,18 +1775,23 @@ jobs: outputs: activated: ${{ steps.check_membership.outputs.is_team_member == 'true' && steps.check_command_position.outputs.command_position_ok == 'true' }} matched_command: ${{ steps.check_command_position.outputs.matched_command }} + setup-parent-span-id: ${{ steps.setup.outputs.parent-span-id || steps.setup.outputs.span-id }} + setup-span-id: ${{ steps.setup.outputs.span-id }} setup-trace-id: ${{ steps.setup.outputs.trace-id }} steps: - name: Setup Scripts id: setup - uses: github/gh-aw-actions/setup@bc56a0cad2f450c562810785ef38649c04db812a # v0.72.1 + uses: github/gh-aw-actions/setup@46d564922b082d0db93244972e8005ea6904ee5f # v0.76.1 with: destination: ${{ runner.temp }}/gh-aw/actions job-name: ${{ github.job }} env: GH_AW_SETUP_WORKFLOW_NAME: "Repo Assist" GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/repo-assist.lock.yml@${{ github.ref }} - GH_AW_INFO_VERSION: "1.0.40" + GH_AW_INFO_VERSION: "1.0.52" + GH_AW_INFO_AWF_VERSION: "v0.25.55" + GH_AW_INFO_BODY_MODIFIED: "false" + GH_AW_INFO_ENGINE_ID: "copilot" - name: Check team membership for command workflow id: check_membership uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 @@ -1775,15 +1837,19 @@ jobs: steps: - name: Setup Scripts id: setup - uses: github/gh-aw-actions/setup@bc56a0cad2f450c562810785ef38649c04db812a # v0.72.1 + uses: github/gh-aw-actions/setup@46d564922b082d0db93244972e8005ea6904ee5f # v0.76.1 with: destination: ${{ runner.temp }}/gh-aw/actions job-name: ${{ github.job }} trace-id: ${{ needs.activation.outputs.setup-trace-id }} + parent-span-id: ${{ needs.activation.outputs.setup-parent-span-id || needs.activation.outputs.setup-span-id }} env: GH_AW_SETUP_WORKFLOW_NAME: "Repo Assist" GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/repo-assist.lock.yml@${{ github.ref }} - GH_AW_INFO_VERSION: "1.0.40" + GH_AW_INFO_VERSION: "1.0.52" + GH_AW_INFO_AWF_VERSION: "v0.25.55" + GH_AW_INFO_BODY_MODIFIED: "false" + GH_AW_INFO_ENGINE_ID: "copilot" - name: Checkout repository uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: @@ -1820,7 +1886,7 @@ jobs: MEMORY_ID: default TARGET_REPO: ${{ github.repository }} BRANCH_NAME: memory/repo-assist - MAX_FILE_SIZE: 10240 + MAX_FILE_SIZE: 102400 MAX_FILE_COUNT: 100 MAX_PATCH_SIZE: 10240 ALLOWED_EXTENSIONS: '[]' @@ -1851,7 +1917,7 @@ jobs: GH_AW_EFFECTIVE_TOKENS: ${{ needs.agent.outputs.effective_tokens }} GH_AW_ENGINE_ID: "copilot" GH_AW_ENGINE_MODEL: ${{ needs.agent.outputs.model }} - GH_AW_ENGINE_VERSION: "1.0.40" + GH_AW_ENGINE_VERSION: "1.0.52" GH_AW_SAFE_OUTPUT_MESSAGES: "{\"footer\":\"\\u003e Generated by 🌈 {workflow_name}, see [workflow run]({run_url}). [Learn more](https://github.com/githubnext/agentics/blob/main/docs/repo-assist.md).\",\"runStarted\":\"{workflow_name} is processing {event_type}, see [workflow run]({run_url})...\",\"runSuccess\":\"✓ {workflow_name} completed successfully, see [workflow run]({run_url}).\",\"runFailure\":\"✗ {workflow_name} encountered {status}, see [workflow run]({run_url}).\"}" GH_AW_WORKFLOW_ID: "repo-assist" GH_AW_WORKFLOW_NAME: "Repo Assist" @@ -1875,15 +1941,19 @@ jobs: steps: - name: Setup Scripts id: setup - uses: github/gh-aw-actions/setup@bc56a0cad2f450c562810785ef38649c04db812a # v0.72.1 + uses: github/gh-aw-actions/setup@46d564922b082d0db93244972e8005ea6904ee5f # v0.76.1 with: destination: ${{ runner.temp }}/gh-aw/actions job-name: ${{ github.job }} trace-id: ${{ needs.activation.outputs.setup-trace-id }} + parent-span-id: ${{ needs.activation.outputs.setup-parent-span-id || needs.activation.outputs.setup-span-id }} env: GH_AW_SETUP_WORKFLOW_NAME: "Repo Assist" GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/repo-assist.lock.yml@${{ github.ref }} - GH_AW_INFO_VERSION: "1.0.40" + GH_AW_INFO_VERSION: "1.0.52" + GH_AW_INFO_AWF_VERSION: "v0.25.55" + GH_AW_INFO_BODY_MODIFIED: "false" + GH_AW_INFO_ENGINE_ID: "copilot" - name: Download agent output artifact id: download-agent-output continue-on-error: true @@ -1927,14 +1997,22 @@ jobs: echo "Extracted base branch from safe output: $BASE_BRANCH" fi fi + - name: Checkout repository (trusted default branch for comment events) + if: ((!cancelled()) && needs.agent.result != 'skipped' && contains(needs.agent.outputs.output_types, 'create_pull_request') || (!cancelled()) && needs.agent.result != 'skipped' && contains(needs.agent.outputs.output_types, 'push_to_pull_request_branch')) && (github.event_name == 'issue_comment' || github.event_name == 'pull_request_review_comment') + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + ref: ${{ github.event.repository.default_branch }} + token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} + persist-credentials: false + fetch-depth: 0 - name: Checkout repository - if: (!cancelled()) && needs.agent.result != 'skipped' && contains(needs.agent.outputs.output_types, 'create_pull_request') || (!cancelled()) && needs.agent.result != 'skipped' && contains(needs.agent.outputs.output_types, 'push_to_pull_request_branch') + if: ((!cancelled()) && needs.agent.result != 'skipped' && contains(needs.agent.outputs.output_types, 'create_pull_request') || (!cancelled()) && needs.agent.result != 'skipped' && contains(needs.agent.outputs.output_types, 'push_to_pull_request_branch')) && github.event_name != 'issue_comment' && github.event_name != 'pull_request_review_comment' uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: ref: ${{ steps.extract-base-branch.outputs.base-branch || github.base_ref || github.event.pull_request.base.ref || github.ref_name || github.event.repository.default_branch }} token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} persist-credentials: false - fetch-depth: 1 + fetch-depth: 0 - name: Configure Git credentials if: (!cancelled()) && needs.agent.result != 'skipped' && contains(needs.agent.outputs.output_types, 'create_pull_request') || (!cancelled()) && needs.agent.result != 'skipped' && contains(needs.agent.outputs.output_types, 'push_to_pull_request_branch') env: @@ -1963,10 +2041,11 @@ jobs: uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }} + GH_AW_COMMENT_ID: ${{ needs.activation.outputs.comment_id }} GH_AW_ALLOWED_DOMAINS: "*.pythonhosted.org,*.vsblob.vsassets.io,anaconda.org,api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.nuget.org,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,azuresearch-usnc.nuget.org,azuresearch-ussc.nuget.org,binstar.org,bootstrap.pypa.io,builds.dotnet.microsoft.com,ci.dot.net,conda.anaconda.org,conda.binstar.org,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,dc.services.visualstudio.com,dist.nuget.org,dot.net,dotnet.microsoft.com,dotnetcli.blob.core.windows.net,files.pythonhosted.org,github.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,nuget.org,nuget.pkg.github.com,nugetregistryv2prod.blob.core.windows.net,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,oneocsp.microsoft.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,pip.pypa.io,pkgs.dev.azure.com,ppa.launchpad.net,pypi.org,pypi.python.org,raw.githubusercontent.com,registry.npmjs.org,repo.anaconda.com,repo.continuum.io,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com,www.googleapis.com,www.microsoft.com" GITHUB_SERVER_URL: ${{ github.server_url }} GITHUB_API_URL: ${{ github.api_url }} - GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"add_comment\":{\"hide_older_comments\":true,\"max\":10,\"target\":\"*\"},\"add_labels\":{\"allowed\":[\"AI-thinks-issue-fixed\",\"AI-thinks-windows-only\"],\"max\":30,\"target\":\"*\"},\"create_issue\":{\"labels\":[\"automation\",\"repo-assist\"],\"max\":4,\"title_prefix\":\"[Repo Assist] \"},\"create_pull_request\":{\"allowed_files\":[\"tests/**\",\"vsintegration/tests/**\"],\"auto_merge\":true,\"draft\":false,\"labels\":[\"NO_RELEASE_NOTES\",\"AI-Issue-Regression-PR\"],\"max\":10,\"max_patch_files\":100,\"max_patch_size\":1024,\"protect_top_level_dot_folders\":true,\"protected_files\":[\"package.json\",\"bun.lockb\",\"bunfig.toml\",\"deno.json\",\"deno.jsonc\",\"deno.lock\",\"global.json\",\"NuGet.Config\",\"Directory.Packages.props\",\"mix.exs\",\"mix.lock\",\"go.mod\",\"go.sum\",\"stack.yaml\",\"stack.yaml.lock\",\"pom.xml\",\"build.gradle\",\"build.gradle.kts\",\"settings.gradle\",\"settings.gradle.kts\",\"gradle.properties\",\"package-lock.json\",\"yarn.lock\",\"pnpm-lock.yaml\",\"npm-shrinkwrap.json\",\"requirements.txt\",\"Pipfile\",\"Pipfile.lock\",\"pyproject.toml\",\"setup.py\",\"setup.cfg\",\"Gemfile\",\"Gemfile.lock\",\"uv.lock\",\"CODEOWNERS\",\"DESIGN.md\",\"README.md\",\"CONTRIBUTING.md\",\"CHANGELOG.md\",\"SECURITY.md\",\"CODE_OF_CONDUCT.md\",\"AGENTS.md\",\"CLAUDE.md\",\"GEMINI.md\"],\"reviewers\":[\"abonie\",\"T-Gro\"],\"title_prefix\":\"Add regression test: \"},\"create_report_incomplete_issue\":{},\"missing_data\":{},\"missing_tool\":{},\"noop\":{\"max\":1,\"report-as-issue\":\"false\"},\"push_to_pull_request_branch\":{\"if_no_changes\":\"warn\",\"max\":4,\"max_patch_size\":1024,\"protect_top_level_dot_folders\":true,\"protected_files\":[\"package.json\",\"bun.lockb\",\"bunfig.toml\",\"deno.json\",\"deno.jsonc\",\"deno.lock\",\"global.json\",\"NuGet.Config\",\"Directory.Packages.props\",\"mix.exs\",\"mix.lock\",\"go.mod\",\"go.sum\",\"stack.yaml\",\"stack.yaml.lock\",\"pom.xml\",\"build.gradle\",\"build.gradle.kts\",\"settings.gradle\",\"settings.gradle.kts\",\"gradle.properties\",\"package-lock.json\",\"yarn.lock\",\"pnpm-lock.yaml\",\"npm-shrinkwrap.json\",\"requirements.txt\",\"Pipfile\",\"Pipfile.lock\",\"pyproject.toml\",\"setup.py\",\"setup.cfg\",\"Gemfile\",\"Gemfile.lock\",\"uv.lock\",\"CODEOWNERS\",\"DESIGN.md\",\"README.md\",\"CONTRIBUTING.md\",\"CHANGELOG.md\",\"SECURITY.md\",\"CODE_OF_CONDUCT.md\",\"AGENTS.md\",\"CLAUDE.md\",\"GEMINI.md\"],\"protected_files_policy\":\"fallback-to-issue\",\"target\":\"*\",\"title_prefix\":\"[Repo Assist] \"},\"remove_labels\":{\"allowed\":[\"AI-thinks-issue-fixed\",\"AI-thinks-windows-only\"],\"max\":10,\"target\":\"*\"},\"report_incomplete\":{},\"update_issue\":{\"allow_body\":true,\"max\":1,\"target\":\"*\",\"title_prefix\":\"[Repo Assist] \"}}" + GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"add_comment\":{\"hide_older_comments\":true,\"max\":10,\"target\":\"*\"},\"add_labels\":{\"allowed\":[\"AI-thinks-issue-fixed\",\"AI-thinks-windows-only\"],\"max\":30,\"target\":\"*\"},\"create_issue\":{\"labels\":[\"automation\",\"repo-assist\"],\"max\":4,\"title_prefix\":\"[Repo Assist] \"},\"create_pull_request\":{\"allowed_files\":[\"tests/**\",\"vsintegration/tests/**\"],\"auto_merge\":true,\"draft\":false,\"labels\":[\"NO_RELEASE_NOTES\",\"AI-Issue-Regression-PR\"],\"max\":10,\"max_patch_files\":100,\"max_patch_size\":1024,\"protect_top_level_dot_folders\":true,\"protected_files\":[\"package.json\",\"bun.lockb\",\"bunfig.toml\",\"deno.json\",\"deno.jsonc\",\"deno.lock\",\"global.json\",\"NuGet.Config\",\"Directory.Packages.props\",\"mix.exs\",\"mix.lock\",\"go.mod\",\"go.sum\",\"stack.yaml\",\"stack.yaml.lock\",\"pom.xml\",\"build.gradle\",\"build.gradle.kts\",\"settings.gradle\",\"settings.gradle.kts\",\"gradle.properties\",\"package-lock.json\",\"yarn.lock\",\"pnpm-lock.yaml\",\"npm-shrinkwrap.json\",\"requirements.txt\",\"Pipfile\",\"Pipfile.lock\",\"pyproject.toml\",\"setup.py\",\"setup.cfg\",\"Gemfile\",\"Gemfile.lock\",\"uv.lock\",\"CODEOWNERS\",\"DESIGN.md\",\"README.md\",\"CONTRIBUTING.md\",\"CHANGELOG.md\",\"SECURITY.md\",\"CODE_OF_CONDUCT.md\",\"AGENTS.md\",\"CLAUDE.md\",\"GEMINI.md\"],\"protected_files_policy\":\"request_review\",\"reviewers\":[\"abonie\",\"T-Gro\"],\"title_prefix\":\"Add regression test: \"},\"create_report_incomplete_issue\":{},\"missing_data\":{},\"missing_tool\":{},\"noop\":{\"max\":1,\"report-as-issue\":\"false\"},\"push_to_pull_request_branch\":{\"if_no_changes\":\"warn\",\"max\":4,\"max_patch_size\":1024,\"protect_top_level_dot_folders\":true,\"protected_files\":[\"package.json\",\"bun.lockb\",\"bunfig.toml\",\"deno.json\",\"deno.jsonc\",\"deno.lock\",\"global.json\",\"NuGet.Config\",\"Directory.Packages.props\",\"mix.exs\",\"mix.lock\",\"go.mod\",\"go.sum\",\"stack.yaml\",\"stack.yaml.lock\",\"pom.xml\",\"build.gradle\",\"build.gradle.kts\",\"settings.gradle\",\"settings.gradle.kts\",\"gradle.properties\",\"package-lock.json\",\"yarn.lock\",\"pnpm-lock.yaml\",\"npm-shrinkwrap.json\",\"requirements.txt\",\"Pipfile\",\"Pipfile.lock\",\"pyproject.toml\",\"setup.py\",\"setup.cfg\",\"Gemfile\",\"Gemfile.lock\",\"uv.lock\",\"CODEOWNERS\",\"DESIGN.md\",\"README.md\",\"CONTRIBUTING.md\",\"CHANGELOG.md\",\"SECURITY.md\",\"CODE_OF_CONDUCT.md\",\"AGENTS.md\",\"CLAUDE.md\",\"GEMINI.md\"],\"protected_files_policy\":\"fallback-to-issue\",\"target\":\"*\",\"title_prefix\":\"[Repo Assist] \"},\"remove_labels\":{\"allowed\":[\"AI-thinks-issue-fixed\",\"AI-thinks-windows-only\"],\"max\":10,\"target\":\"*\"},\"report_incomplete\":{},\"update_issue\":{\"allow_body\":true,\"max\":1,\"target\":\"*\",\"title_prefix\":\"[Repo Assist] \"}}" GH_AW_CI_TRIGGER_TOKEN: ${{ secrets.GH_AW_CI_TRIGGER_TOKEN }} with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/repo-assist.md b/.github/workflows/repo-assist.md index a72dabae9e7..331eee30a1b 100644 --- a/.github/workflows/repo-assist.md +++ b/.github/workflows/repo-assist.md @@ -91,11 +91,11 @@ steps: run: | mkdir -p /tmp/gh-aw - # Fetch open issues with labels (up to 500) - gh issue list --state open --limit 500 --json number,labels > /tmp/gh-aw/issues.json + # Fetch open issues with labels (up to 200, reduced from 500 to avoid DIFC proxy timeouts) + gh issue list --state open --limit 200 --json number,labels > /tmp/gh-aw/issues.json || echo '[]' > /tmp/gh-aw/issues.json - # Fetch open PRs with titles (up to 200) - gh pr list --state open --limit 200 --json number,title > /tmp/gh-aw/prs.json + # Fetch open PRs with titles (up to 100, reduced from 200 to avoid DIFC proxy timeouts) + gh pr list --state open --limit 100 --json number,title > /tmp/gh-aw/prs.json || echo '[]' > /tmp/gh-aw/prs.json # Compute task weights and select two tasks for this run python3 - << 'EOF' From da3960f891b52de20f08630c6c086cc806b5fd7f Mon Sep 17 00:00:00 2001 From: Evgeny Tsvetkov <61620612+evgTSV@users.noreply.github.com> Date: Thu, 28 May 2026 14:21:35 +0500 Subject: [PATCH 19/72] Fix overload resolution of static member extension (#19698) * Fix #19664: Extension static methods are resolved if similar intrisic methods exist --- .../.FSharp.Compiler.Service/11.0.100.md | 1 + src/Compiler/Checking/NameResolution.fs | 8 ++-- .../StaticMethodResolution.fs | 41 +++++++++++++++++ .../StaticPropertyResolution.fs | 45 +++++++++++++++++++ .../FSharp.Compiler.ComponentTests.fsproj | 2 + 5 files changed, 94 insertions(+), 3 deletions(-) create mode 100644 tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MethodResolution/StaticMethodResolution.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/PropertyResolution/StaticPropertyResolution.fs diff --git a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md index 5d0a107d4f1..51c14214f3c 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md +++ b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md @@ -55,6 +55,7 @@ * Fix signature generation: SRTP constraints use postfix syntax that fails conformance, now uses explicit type param declarations. ([Issue #19594](https://github.com/dotnet/fsharp/issues/19594), [PR #19609](https://github.com/dotnet/fsharp/pull/19609)) * Fix signature generation: type params with special characters missing backtick escaping. ([Issue #19595](https://github.com/dotnet/fsharp/issues/19595), [PR #19609](https://github.com/dotnet/fsharp/pull/19609)) * Fix internal error when using custom attribute with `[]` value type parameter and no `[]`. ([Issue #8353](https://github.com/dotnet/fsharp/issues/8353), [PR #19484](https://github.com/dotnet/fsharp/pull/19484)) +* Fix overload resolution of static member extension if one or more intrinsics candidates exist ([Issue #19664](https://github.com/dotnet/fsharp/issues/19664), [PR #19698](https://github.com/dotnet/fsharp/pull/19698)) * Fix parallel compilation of scripts ([PR #19649](https://github.com/dotnet/fsharp/pull/19649)) * Fix parser recovery, name resolution, and code completion for unfinished enum patterns ([PR #19708](https://github.com/dotnet/fsharp/pull/19708)) * Parser: fix unexpected diagnostics in debug builds, improve error messages ([PR #19730](https://github.com/dotnet/fsharp/pull/19730)) diff --git a/src/Compiler/Checking/NameResolution.fs b/src/Compiler/Checking/NameResolution.fs index b9b35bad26f..898dc78aa75 100644 --- a/src/Compiler/Checking/NameResolution.fs +++ b/src/Compiler/Checking/NameResolution.fs @@ -4169,8 +4169,10 @@ let ResolveNestedField sink (ncenv: NameResolver) nenv ad recdTy lid = /// determine any valid members // // QUERY (instantiationGenerator cleanup): it would be really nice not to flow instantiationGenerator to here. -let private ResolveExprDotLongIdent (ncenv: NameResolver) m ad nenv ty (id: Ident) rest (typeNameResInfo: TypeNameResolutionInfo) findFlag maybeArgExpr = - let lookupKind = LookupKind.Expr LookupIsInstance.Yes +let private ResolveExprDotLongIdent (ncenv: NameResolver) m ad nenv ty (id: Ident) rest (typeNameResInfo: TypeNameResolutionInfo) findFlag staticOnly maybeArgExpr = + let lookupKind = + if staticOnly then LookupKind.Expr LookupIsInstance.No + else LookupKind.Expr LookupIsInstance.Yes let adhocDotSearchAccessible = AtMostOneResult m (ResolveLongIdentInTypePrim ncenv nenv lookupKind ResolutionInfo.Empty 1 m ad id rest findFlag typeNameResInfo ty maybeArgExpr) match adhocDotSearchAccessible with | Exception _ -> @@ -4335,7 +4337,7 @@ let ResolveExprDotLongIdentAndComputeRange (sink: TcResultsSink) (ncenv: NameRes let resInfo, item, rest = match lid with | id :: rest -> - ResolveExprDotLongIdent ncenv wholem ad nenv ty id rest typeNameResInfo findFlag maybeAppliedArgExpr + ResolveExprDotLongIdent ncenv wholem ad nenv ty id rest typeNameResInfo findFlag staticOnly maybeAppliedArgExpr | _ -> error(InternalError("ResolveExprDotLongIdentAndComputeRange", wholem)) let itemRange, itemIdentRange = ComputeItemRange wholem lid rest resInfo, item, rest, itemRange, itemIdentRange diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MethodResolution/StaticMethodResolution.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MethodResolution/StaticMethodResolution.fs new file mode 100644 index 00000000000..c6602a0f1be --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MethodResolution/StaticMethodResolution.fs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Conformance.BasicGrammarElements + +open FSharp.Test.Compiler +open Xunit + +module StaticMethodResolution = + + // Regression test for https://github.com/dotnet/fsharp/issues/19664 + // + // When a static extension method is defined in a *different* [] module than + // the generic type it extends, and shares its name with an intrinsic static member, + // resolving the call via the explicit-type-argument syntax `Type.Member(...)` + // previously failed with FS0505. The non-generic dotted form `Type.Member(...)` + // resolved correctly, so any regression test that omits the explicit type arguments + // does not actually exercise the bug. See the discussion at + // https://github.com/dotnet/fsharp/issues/19675#issuecomment-4373059900. + [] + let ``Static extension on generic type resolves with explicit type arguments``() = + Fsx """ +module Extensions = + + type StaticGeneric<'T> = + static member Bar() = () + static member Bar(_: int, _: int) = () + + [] + module StaticGenericExtensions = + type StaticGeneric<'T> with + static member Bar(_: int) = () + +module Program = + open Extensions + + StaticGeneric.Bar() // intrinsic, 0 args + StaticGeneric.Bar(42) // regressed: extension, 1 arg, see issue 19664 (FS0505) + StaticGeneric.Bar(42, 0) // intrinsic, 2 args + """ + |> typecheck + |> shouldSucceed \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/PropertyResolution/StaticPropertyResolution.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/PropertyResolution/StaticPropertyResolution.fs new file mode 100644 index 00000000000..33fe8740def --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/PropertyResolution/StaticPropertyResolution.fs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Conformance.BasicGrammarElements + +open FSharp.Test.Compiler +open Xunit + +module StaticPropertyResolution = + + // Regression test for static property accessors (getter/setter) resolution. + // Related to https://github.com/dotnet/fsharp/issues/19797 + // + // When a static extension 'set' or 'get' accessor is defined in a *different* module + // than the generic type it extends, and the corresponding property has the other intrinsic + // static accessor + // (i.e. the intrinsic property has a 'get' and the extension has a 'set', or vice versa) + // + // For instance, resolving the assignment via explicit-type-argument syntax, + // where the 'set' accessor is an extension and the 'get' accessor is intrinsic, + // Type.Property <- value previously failed with FS0810. + // + // The non-generic dotted form `Type.Member` + // resolved correctly, so any regression test that omits the explicit type arguments + // does not actually exercise the bug. See the discussion at + // https://github.com/dotnet/fsharp/issues/19675#issuecomment-4373059900. + [] + let ``Static property on generic type resolves the extension accessor when the other is intrinsic``() = + Fsx """ +module Lib = + + type Label<'T> = + static member Text with get() = "Static Intrinsic" + + [] + module Utils = + type Label<'T> with + static member Text with set (v) = printfn "Extension" + +module Program = + open Lib + + Label.Text <- "Text" // regressed: extension setter, see issue 19797 (FS0810) + """ + |> typecheck + |> shouldSucceed \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj index 01492c57fd3..acfeca79f35 100644 --- a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj +++ b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj @@ -65,6 +65,8 @@ + + From b70df2c154eb6c4fea621b1a29438348a708789f Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Thu, 28 May 2026 11:38:24 +0200 Subject: [PATCH 20/72] =?UTF-8?q?[Auto=20Update]=20Agentic=20workflows=20?= =?UTF-8?q?=E2=80=94=20fix=20safe-outputs=20config=20and=20apply=20pending?= =?UTF-8?q?=20upgrade=20(#19756)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Initial plan * Update agentic workflows via gh aw upgrade and fix safe-outputs config - Updated actions/github-script from v8 to v9 - Updated github/gh-aw-actions/setup from v0.68.3 to v0.72.1 - Updated github/gh-aw/actions/setup from v0.67.2 to v0.72.1 - Updated actions-lock.json with pinned container images - Recompiled all workflow lock files - Updated agent file to v0.72.1 references - Fixed aw-auto-update.md safe-outputs config: - Added github-app config for workflows permission - Added allow-workflows: true for create-pull-request and push-to-pull-request-branch - Changed protected-files from fallback-to-issue to allowed Co-authored-by: T-Gro <46543583+T-Gro@users.noreply.github.com> * Recompile all workflows after merge conflict resolution (gh-aw v0.74.8) Co-authored-by: T-Gro <46543583+T-Gro@users.noreply.github.com> * Recompile all workflows after merge conflict resolution Co-authored-by: T-Gro <46543583+T-Gro@users.noreply.github.com> * Recompile workflows after merge conflict resolution Co-authored-by: T-Gro <46543583+T-Gro@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: T-Gro <46543583+T-Gro@users.noreply.github.com> Co-authored-by: Tomas Grosup Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Tomas Grosup --- .github/agents/agentic-workflows.agent.md | 81 ++++++++++++--- .github/workflows/aw-auto-update.lock.yml | 114 +++++++++++++++++----- .github/workflows/aw-auto-update.md | 9 +- 3 files changed, 163 insertions(+), 41 deletions(-) diff --git a/.github/agents/agentic-workflows.agent.md b/.github/agents/agentic-workflows.agent.md index c7ab589fd2a..f7e5eb4f1cd 100644 --- a/.github/agents/agentic-workflows.agent.md +++ b/.github/agents/agentic-workflows.agent.md @@ -1,5 +1,4 @@ --- -name: agentic-workflows description: GitHub Agentic Workflows (gh-aw) - Create, debug, and upgrade AI-powered workflows with intelligent prompt routing disable-model-invocation: true --- @@ -20,6 +19,13 @@ This is a **dispatcher agent** that routes your request to the appropriate speci - **Creating shared components**: Routes to `create-shared-agentic-workflow` prompt - **Fixing Dependabot PRs**: Routes to `dependabot` prompt — use this when Dependabot opens PRs that modify generated manifest files (`.github/workflows/package.json`, `.github/workflows/requirements.txt`, `.github/workflows/go.mod`). Never merge those PRs directly; instead update the source `.md` files and rerun `gh aw compile --dependabot` to bundle all fixes - **Analyzing test coverage**: Routes to `test-coverage` prompt — consult this whenever the workflow reads, analyzes, or reports on test coverage data from PRs or CI runs +- **Rendering ASCII charts in markdown**: Routes to `asciicharts` guide — consult this whenever the workflow needs compact charts that render reliably in GitHub issues, comments, or discussions +- **CLI commands and triggering workflows**: Routes to `cli-commands` guide — consult this whenever the user asks how to run, compile, debug, or manage workflows from the command line, or when they need the MCP tool equivalent of a `gh aw` command +- **Reducing token consumption / cost optimization**: Routes to `token-optimization` guide — consult this whenever the user asks how to reduce token usage, lower costs, speed up workflows, or measure the impact of prompt changes with experiments +- **Choosing workflow architectures and design patterns**: Routes to `patterns` guide — consult this whenever the user asks for strategy, architecture, operating models, or pattern selection for agentic workflows + +> [!IMPORTANT] +> For architecture/pattern-selection requests, load `https://github.com/github/gh-aw/blob/v0.74.8/.github/aw/patterns.md` first. Workflows may optionally include: @@ -31,7 +37,7 @@ Workflows may optionally include: - Workflow files: `.github/workflows/*.md` and `.github/workflows/**/*.md` - Workflow lock files: `.github/workflows/*.lock.yml` - Shared components: `.github/workflows/shared/*.md` -- Configuration: https://github.com/github/gh-aw/blob/v0.67.1/.github/aw/github-agentic-workflows.md +- Configuration: https://github.com/github/gh-aw/blob/v0.74.8/.github/aw/github-agentic-workflows.md ## Problems This Solves @@ -53,7 +59,7 @@ When you interact with this agent, it will: ### Create New Workflow **Load when**: User wants to create a new workflow from scratch, add automation, or design a workflow that doesn't exist yet -**Prompt file**: https://github.com/github/gh-aw/blob/v0.67.1/.github/aw/create-agentic-workflow.md +**Prompt file**: https://github.com/github/gh-aw/blob/v0.74.8/.github/aw/create-agentic-workflow.md **Use cases**: - "Create a workflow that triages issues" @@ -63,7 +69,7 @@ When you interact with this agent, it will: ### Update Existing Workflow **Load when**: User wants to modify, improve, or refactor an existing workflow -**Prompt file**: https://github.com/github/gh-aw/blob/v0.67.1/.github/aw/update-agentic-workflow.md +**Prompt file**: https://github.com/github/gh-aw/blob/v0.74.8/.github/aw/update-agentic-workflow.md **Use cases**: - "Add web-fetch tool to the issue-classifier workflow" @@ -73,7 +79,7 @@ When you interact with this agent, it will: ### Debug Workflow **Load when**: User needs to investigate, audit, debug, or understand a workflow, troubleshoot issues, analyze logs, or fix errors -**Prompt file**: https://github.com/github/gh-aw/blob/v0.67.1/.github/aw/debug-agentic-workflow.md +**Prompt file**: https://github.com/github/gh-aw/blob/v0.74.8/.github/aw/debug-agentic-workflow.md **Use cases**: - "Why is this workflow failing?" @@ -83,7 +89,7 @@ When you interact with this agent, it will: ### Upgrade Agentic Workflows **Load when**: User wants to upgrade workflows to a new gh-aw version or fix deprecations -**Prompt file**: https://github.com/github/gh-aw/blob/v0.67.1/.github/aw/upgrade-agentic-workflows.md +**Prompt file**: https://github.com/github/gh-aw/blob/v0.74.8/.github/aw/upgrade-agentic-workflows.md **Use cases**: - "Upgrade all workflows to the latest version" @@ -93,7 +99,7 @@ When you interact with this agent, it will: ### Create a Report-Generating Workflow **Load when**: The workflow being created or updated produces reports — recurring status updates, audit summaries, analyses, or any structured output posted as a GitHub issue, discussion, or comment -**Prompt file**: https://github.com/github/gh-aw/blob/v0.67.1/.github/aw/report.md +**Prompt file**: https://github.com/github/gh-aw/blob/v0.74.8/.github/aw/report.md **Use cases**: - "Create a weekly CI health report" @@ -103,7 +109,7 @@ When you interact with this agent, it will: ### Create Shared Agentic Workflow **Load when**: User wants to create a reusable workflow component or wrap an MCP server -**Prompt file**: https://github.com/github/gh-aw/blob/v0.67.1/.github/aw/create-shared-agentic-workflow.md +**Prompt file**: https://github.com/github/gh-aw/blob/v0.74.8/.github/aw/create-shared-agentic-workflow.md **Use cases**: - "Create a shared component for Notion integration" @@ -113,7 +119,7 @@ When you interact with this agent, it will: ### Fix Dependabot PRs **Load when**: User needs to close or fix open Dependabot PRs that update dependencies in generated manifest files (`.github/workflows/package.json`, `.github/workflows/requirements.txt`, `.github/workflows/go.mod`) -**Prompt file**: https://github.com/github/gh-aw/blob/v0.67.1/.github/aw/dependabot.md +**Prompt file**: https://github.com/github/gh-aw/blob/v0.74.8/.github/aw/dependabot.md **Use cases**: - "Fix the open Dependabot PRs for npm dependencies" @@ -123,13 +129,58 @@ When you interact with this agent, it will: ### Analyze Test Coverage **Load when**: The workflow reads, analyzes, or reports test coverage — whether triggered by a PR, a schedule, or a slash command. Always consult this prompt before designing the coverage data strategy. -**Prompt file**: https://github.com/github/gh-aw/blob/v0.67.1/.github/aw/test-coverage.md +**Prompt file**: https://github.com/github/gh-aw/blob/v0.74.8/.github/aw/test-coverage.md **Use cases**: - "Create a workflow that comments coverage on PRs" - "Analyze coverage trends over time" - "Add a coverage gate that blocks PRs below a threshold" +### Render ASCII Charts in Markdown +**Load when**: The workflow needs in-markdown charts (sparklines, bars, table+trend views) that must align cleanly and render reliably across GitHub surfaces, including mobile. + +**Reference file**: https://github.com/github/gh-aw/blob/v0.74.8/.github/aw/asciicharts.md + +**Use cases**: +- "Show a compact trend chart in an issue comment" +- "Render a dashboard table with sparkline trends" +- "Generate aligned ASCII bars for service metrics" + +### CLI Commands Reference +**Load when**: The user asks how to run, compile, debug, or manage workflows from the command line; needs the MCP tool equivalent of a `gh aw` command; or is in a restricted environment (e.g., Copilot Cloud) without direct CLI access. + +**Reference file**: https://github.com/github/gh-aw/blob/v0.74.8/.github/aw/cli-commands.md + +**Use cases**: +- "How do I trigger workflow X on the main branch?" +- "What's the MCP equivalent of `gh aw logs`?" +- "I'm in Copilot Cloud — how do I compile a workflow?" +- "Show me all available gh aw commands" + +### Token Consumption Optimization +**Load when**: The user asks how to reduce token usage, lower workflow costs, make a workflow faster or cheaper, or measure the impact of prompt or configuration changes. + +**Reference file**: https://github.com/github/gh-aw/blob/v0.74.8/.github/aw/token-optimization.md + +**Use cases**: +- "How do I reduce the token cost of this workflow?" +- "My workflow is too expensive — how do I optimize it?" +- "How do I compare token usage between two runs?" +- "Should I use gh-proxy or the MCP server?" +- "How do I use sub-agents to reduce costs?" +- "How do I measure the impact of a prompt change?" + +### Workflow Pattern Selection +**Load when**: The user asks for architecture, strategy, operating model selection, or pattern recommendations for building agentic workflows. + +**Reference file**: https://github.com/github/gh-aw/blob/v0.74.8/.github/aw/patterns.md + +**Use cases**: +- "Which pattern should I use for multi-repo rollout?" +- "How should I structure this workflow architecture?" +- "What pattern fits slash-command triage?" +- "Should this be DispatchOps or DailyOps?" + ## Instructions When a user interacts with you: @@ -148,6 +199,10 @@ gh aw init # Generate the lock file for a workflow gh aw compile [workflow-name] +# Trigger a workflow on demand (preferred over gh workflow run) +gh aw run # interactive input collection +gh aw run --ref main # run on a specific branch + # Debug workflow runs gh aw logs [workflow-name] gh aw audit @@ -170,10 +225,12 @@ gh aw compile --validate ## Important Notes -- Always reference the instructions file at https://github.com/github/gh-aw/blob/v0.67.1/.github/aw/github-agentic-workflows.md for complete documentation +- Always reference the instructions file at https://github.com/github/gh-aw/blob/v0.74.8/.github/aw/github-agentic-workflows.md for complete documentation - Use the MCP tool `agentic-workflows` when running in GitHub Copilot Cloud - Workflows must be compiled to `.lock.yml` files before running in GitHub Actions - **Bash tools are enabled by default** - Don't restrict bash commands unnecessarily since workflows are sandboxed by the AWF - Follow security best practices: minimal permissions, explicit network access, no template injection -- **Network configuration**: Use ecosystem identifiers (`node`, `python`, `go`, etc.) or explicit FQDNs in `network.allowed`. Bare shorthands like `npm` or `pypi` are **not** valid. See https://github.com/github/gh-aw/blob/v0.67.1/.github/aw/network.md for the full list of valid ecosystem identifiers and domain patterns. +- **Network configuration**: Use ecosystem identifiers (`node`, `python`, `go`, etc.) or explicit FQDNs in `network.allowed`. Bare shorthands like `npm` or `pypi` are **not** valid. See https://github.com/github/gh-aw/blob/v0.74.8/.github/aw/network.md for the full list of valid ecosystem identifiers and domain patterns. - **Single-file output**: When creating a workflow, produce exactly **one** workflow `.md` file. Do not create separate documentation files (architecture docs, runbooks, usage guides, etc.). If documentation is needed, add a brief `## Usage` section inside the workflow file itself. +- **Triggering runs**: Always use `gh aw run ` to trigger a workflow on demand — not `gh workflow run .lock.yml`. `gh aw run` handles workflow resolution by short name, input parsing and validation, and correct run-tracking for agentic workflows. Use `--ref ` to run on a specific branch. +- **CLI commands reference**: For a complete guide on all `gh aw` commands and their MCP tool equivalents (for restricted environments), see https://github.com/github/gh-aw/blob/v0.74.8/.github/aw/cli-commands.md diff --git a/.github/workflows/aw-auto-update.lock.yml b/.github/workflows/aw-auto-update.lock.yml index 86f1d628a1c..02270e9bf8e 100644 --- a/.github/workflows/aw-auto-update.lock.yml +++ b/.github/workflows/aw-auto-update.lock.yml @@ -1,5 +1,5 @@ -# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"c44a2f68ba9ebc265231a8a921ca9879b1d2d5a4ff2f39778a6b2a2999a00052","compiler_version":"v0.76.1","strict":true,"agent_id":"copilot"} -# gh-aw-manifest: {"version":1,"secrets":["COPILOT_GITHUB_TOKEN","GH_AW_CI_TRIGGER_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/checkout","sha":"de0fac2e4500dabe0009e67214ff5f5447ce83dd","version":"v6.0.2"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/setup-node","sha":"48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e","version":"v6.4.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"},{"repo":"github/gh-aw-actions/setup","sha":"46d564922b082d0db93244972e8005ea6904ee5f","version":"v0.76.1"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.25.55"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.55"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.25.55"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.3.19"},{"image":"ghcr.io/github/github-mcp-server:v1.0.4","digest":"sha256:e3816a476a977cfb836e7d221510011436c654d11861db66ecfd826601aba6a4","pinned_image":"ghcr.io/github/github-mcp-server:v1.0.4@sha256:e3816a476a977cfb836e7d221510011436c654d11861db66ecfd826601aba6a4"},{"image":"node:lts-alpine","digest":"sha256:2bdb65ed1dab192432bc31c95f94155ca5ad7fc1392fb7eb7526ab682fa5bf14","pinned_image":"node:lts-alpine@sha256:2bdb65ed1dab192432bc31c95f94155ca5ad7fc1392fb7eb7526ab682fa5bf14"}]} +# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"82a4e9e173f3461905c0653e89f22cc1f304534d6129de16180c1d511ad243d3","compiler_version":"v0.76.1","strict":true,"agent_id":"copilot"} +# gh-aw-manifest: {"version":1,"secrets":["APP_PRIVATE_KEY","COPILOT_GITHUB_TOKEN","GH_AW_CI_TRIGGER_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/checkout","sha":"de0fac2e4500dabe0009e67214ff5f5447ce83dd","version":"v6.0.2"},{"repo":"actions/create-github-app-token","sha":"bcd2ba49218906704ab6c1aa796996da409d3eb1","version":"v3.2.0"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/setup-node","sha":"48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e","version":"v6.4.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"},{"repo":"github/gh-aw-actions/setup","sha":"46d564922b082d0db93244972e8005ea6904ee5f","version":"v0.76.1"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.25.55"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.55"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.25.55"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.3.19"},{"image":"ghcr.io/github/github-mcp-server:v1.0.4","digest":"sha256:e3816a476a977cfb836e7d221510011436c654d11861db66ecfd826601aba6a4","pinned_image":"ghcr.io/github/github-mcp-server:v1.0.4@sha256:e3816a476a977cfb836e7d221510011436c654d11861db66ecfd826601aba6a4"},{"image":"node:lts-alpine","digest":"sha256:2bdb65ed1dab192432bc31c95f94155ca5ad7fc1392fb7eb7526ab682fa5bf14","pinned_image":"node:lts-alpine@sha256:2bdb65ed1dab192432bc31c95f94155ca5ad7fc1392fb7eb7526ab682fa5bf14"}]} # ___ _ _ # / _ \ | | (_) # | |_| | __ _ ___ _ __ | |_ _ ___ @@ -26,6 +26,7 @@ # If changes are detected, pushes them to a long-lived branch and creates or updates a PR. # # Secrets used: +# - APP_PRIVATE_KEY # - COPILOT_GITHUB_TOKEN # - GH_AW_CI_TRIGGER_TOKEN # - GH_AW_GITHUB_MCP_SERVER_TOKEN @@ -34,6 +35,7 @@ # # Custom actions used: # - actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 +# - actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0 # - actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 # - actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 # - actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 @@ -189,24 +191,24 @@ jobs: run: | bash "${RUNNER_TEMP}/gh-aw/actions/create_prompt_first.sh" { - cat << 'GH_AW_PROMPT_96b5579e2ed86490_EOF' + cat << 'GH_AW_PROMPT_8892d1e930c999ae_EOF' - GH_AW_PROMPT_96b5579e2ed86490_EOF + GH_AW_PROMPT_8892d1e930c999ae_EOF cat "${RUNNER_TEMP}/gh-aw/prompts/xpia.md" cat "${RUNNER_TEMP}/gh-aw/prompts/temp_folder_prompt.md" cat "${RUNNER_TEMP}/gh-aw/prompts/markdown.md" cat "${RUNNER_TEMP}/gh-aw/prompts/safe_outputs_prompt.md" - cat << 'GH_AW_PROMPT_96b5579e2ed86490_EOF' + cat << 'GH_AW_PROMPT_8892d1e930c999ae_EOF' Tools: create_pull_request, push_to_pull_request_branch, missing_tool, missing_data, noop - GH_AW_PROMPT_96b5579e2ed86490_EOF + GH_AW_PROMPT_8892d1e930c999ae_EOF cat "${RUNNER_TEMP}/gh-aw/prompts/safe_outputs_create_pull_request.md" cat "${RUNNER_TEMP}/gh-aw/prompts/safe_outputs_push_to_pr_branch.md" - cat << 'GH_AW_PROMPT_96b5579e2ed86490_EOF' + cat << 'GH_AW_PROMPT_8892d1e930c999ae_EOF' - GH_AW_PROMPT_96b5579e2ed86490_EOF + GH_AW_PROMPT_8892d1e930c999ae_EOF cat "${RUNNER_TEMP}/gh-aw/prompts/mcp_cli_tools_prompt.md" - cat << 'GH_AW_PROMPT_96b5579e2ed86490_EOF' + cat << 'GH_AW_PROMPT_8892d1e930c999ae_EOF' The following GitHub context information is available for this workflow: {{#if github.actor}} @@ -238,12 +240,12 @@ jobs: - **Note**: If a branch you need is not in the list above and is not listed as an additional fetched ref, it has NOT been checked out. For private repositories you cannot fetch it without proper authentication. If the branch is required and not available, exit with an error and ask the user to add it to the `fetch:` option of the `checkout:` configuration (e.g., `fetch: ["refs/pulls/open/*"]` for all open PR refs, or `fetch: ["main", "feature/my-branch"]` for specific branches). - GH_AW_PROMPT_96b5579e2ed86490_EOF + GH_AW_PROMPT_8892d1e930c999ae_EOF cat "${RUNNER_TEMP}/gh-aw/prompts/github_mcp_tools_with_safeoutputs_prompt.md" - cat << 'GH_AW_PROMPT_96b5579e2ed86490_EOF' + cat << 'GH_AW_PROMPT_8892d1e930c999ae_EOF' {{#runtime-import .github/workflows/aw-auto-update.md}} - GH_AW_PROMPT_96b5579e2ed86490_EOF + GH_AW_PROMPT_8892d1e930c999ae_EOF } > "$GH_AW_PROMPT" - name: Interpolate variables and render templates uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 @@ -448,9 +450,9 @@ jobs: mkdir -p "${RUNNER_TEMP}/gh-aw/safeoutputs" mkdir -p /tmp/gh-aw/safeoutputs mkdir -p /tmp/gh-aw/mcp-logs/safeoutputs - cat > "${RUNNER_TEMP}/gh-aw/safeoutputs/config.json" << 'GH_AW_SAFE_OUTPUTS_CONFIG_9d88d7a86ef27a50_EOF' - {"create_pull_request":{"allowed_files":[".github/workflows/*.md",".github/workflows/*.lock.yml",".github/workflows/shared/**",".github/aw/**",".github/agents/**"],"draft":false,"labels":["automation"],"max":1,"max_patch_files":100,"max_patch_size":1024,"protect_top_level_dot_folders":true,"protected_files":["package.json","bun.lockb","bunfig.toml","deno.json","deno.jsonc","deno.lock","global.json","NuGet.Config","Directory.Packages.props","mix.exs","mix.lock","go.mod","go.sum","stack.yaml","stack.yaml.lock","pom.xml","build.gradle","build.gradle.kts","settings.gradle","settings.gradle.kts","gradle.properties","package-lock.json","yarn.lock","pnpm-lock.yaml","npm-shrinkwrap.json","requirements.txt","Pipfile","Pipfile.lock","pyproject.toml","setup.py","setup.cfg","Gemfile","Gemfile.lock","uv.lock","CODEOWNERS","DESIGN.md","README.md","CONTRIBUTING.md","CHANGELOG.md","SECURITY.md","CODE_OF_CONDUCT.md","AGENTS.md","CLAUDE.md","GEMINI.md"],"protected_files_policy":"fallback-to-issue","title_prefix":"[Auto Update] "},"create_report_incomplete_issue":{},"missing_data":{},"missing_tool":{},"noop":{"max":1,"report-as-issue":"false"},"push_to_pull_request_branch":{"allowed_files":[".github/workflows/*.md",".github/workflows/*.lock.yml",".github/workflows/shared/**",".github/aw/**",".github/agents/**"],"if_no_changes":"warn","max":1,"max_patch_size":1024,"protect_top_level_dot_folders":true,"protected_files":["package.json","bun.lockb","bunfig.toml","deno.json","deno.jsonc","deno.lock","global.json","NuGet.Config","Directory.Packages.props","mix.exs","mix.lock","go.mod","go.sum","stack.yaml","stack.yaml.lock","pom.xml","build.gradle","build.gradle.kts","settings.gradle","settings.gradle.kts","gradle.properties","package-lock.json","yarn.lock","pnpm-lock.yaml","npm-shrinkwrap.json","requirements.txt","Pipfile","Pipfile.lock","pyproject.toml","setup.py","setup.cfg","Gemfile","Gemfile.lock","uv.lock","CODEOWNERS","DESIGN.md","README.md","CONTRIBUTING.md","CHANGELOG.md","SECURITY.md","CODE_OF_CONDUCT.md","AGENTS.md","CLAUDE.md","GEMINI.md"],"protected_files_policy":"fallback-to-issue","required_labels":["automation"],"target":"*","title_prefix":"[Auto Update] "},"report_incomplete":{}} - GH_AW_SAFE_OUTPUTS_CONFIG_9d88d7a86ef27a50_EOF + cat > "${RUNNER_TEMP}/gh-aw/safeoutputs/config.json" << 'GH_AW_SAFE_OUTPUTS_CONFIG_7203a8720d5d860e_EOF' + {"create_pull_request":{"allowed_files":[".github/workflows/*.md",".github/workflows/*.lock.yml",".github/workflows/shared/**",".github/aw/**",".github/agents/**"],"draft":false,"labels":["automation"],"max":1,"max_patch_files":100,"max_patch_size":1024,"protect_top_level_dot_folders":true,"protected_files":["package.json","bun.lockb","bunfig.toml","deno.json","deno.jsonc","deno.lock","global.json","NuGet.Config","Directory.Packages.props","mix.exs","mix.lock","go.mod","go.sum","stack.yaml","stack.yaml.lock","pom.xml","build.gradle","build.gradle.kts","settings.gradle","settings.gradle.kts","gradle.properties","package-lock.json","yarn.lock","pnpm-lock.yaml","npm-shrinkwrap.json","requirements.txt","Pipfile","Pipfile.lock","pyproject.toml","setup.py","setup.cfg","Gemfile","Gemfile.lock","uv.lock","CODEOWNERS","DESIGN.md","README.md","CONTRIBUTING.md","CHANGELOG.md","SECURITY.md","CODE_OF_CONDUCT.md","AGENTS.md","CLAUDE.md","GEMINI.md"],"protected_files_policy":"allowed","title_prefix":"[Auto Update] "},"create_report_incomplete_issue":{},"missing_data":{},"missing_tool":{},"noop":{"max":1,"report-as-issue":"false"},"push_to_pull_request_branch":{"allowed_files":[".github/workflows/*.md",".github/workflows/*.lock.yml",".github/workflows/shared/**",".github/aw/**",".github/agents/**"],"if_no_changes":"warn","max":1,"max_patch_size":1024,"protect_top_level_dot_folders":true,"protected_files":["package.json","bun.lockb","bunfig.toml","deno.json","deno.jsonc","deno.lock","global.json","NuGet.Config","Directory.Packages.props","mix.exs","mix.lock","go.mod","go.sum","stack.yaml","stack.yaml.lock","pom.xml","build.gradle","build.gradle.kts","settings.gradle","settings.gradle.kts","gradle.properties","package-lock.json","yarn.lock","pnpm-lock.yaml","npm-shrinkwrap.json","requirements.txt","Pipfile","Pipfile.lock","pyproject.toml","setup.py","setup.cfg","Gemfile","Gemfile.lock","uv.lock","CODEOWNERS","DESIGN.md","README.md","CONTRIBUTING.md","CHANGELOG.md","SECURITY.md","CODE_OF_CONDUCT.md","AGENTS.md","CLAUDE.md","GEMINI.md"],"protected_files_policy":"allowed","required_labels":["automation"],"target":"*","title_prefix":"[Auto Update] "},"report_incomplete":{}} + GH_AW_SAFE_OUTPUTS_CONFIG_7203a8720d5d860e_EOF - name: Generate Safe Outputs Tools env: GH_AW_TOOLS_META_JSON: | @@ -682,7 +684,7 @@ jobs: mkdir -p /home/runner/.copilot GH_AW_NODE=$(which node 2>/dev/null || command -v node 2>/dev/null || echo node) - cat << GH_AW_MCP_CONFIG_518a6cfd15c91356_EOF | "$GH_AW_NODE" "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.cjs" + cat << GH_AW_MCP_CONFIG_dadd7da5f2558446_EOF | "$GH_AW_NODE" "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.cjs" { "mcpServers": { "github": { @@ -726,7 +728,7 @@ jobs: "payloadDir": "${MCP_GATEWAY_PAYLOAD_DIR}" } } - GH_AW_MCP_CONFIG_518a6cfd15c91356_EOF + GH_AW_MCP_CONFIG_dadd7da5f2558446_EOF - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true @@ -993,6 +995,20 @@ jobs: GH_AW_INFO_VERSION: "1.0.52" GH_AW_INFO_AWF_VERSION: "v0.25.55" GH_AW_INFO_ENGINE_ID: "copilot" + - name: Generate GitHub App token + id: safe-outputs-app-token + uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0 + with: + client-id: ${{ vars.APP_ID }} + private-key: ${{ secrets.APP_PRIVATE_KEY }} + owner: ${{ github.repository_owner }} + repositories: ${{ github.event.repository.name }} + github-api-url: ${{ github.api_url }} + permission-administration: read + permission-contents: write + permission-issues: write + permission-pull-requests: write + permission-workflows: write - name: Download agent output artifact id: download-agent-output continue-on-error: true @@ -1019,7 +1035,7 @@ jobs: GH_AW_AGENT_CONCLUSION: ${{ needs.agent.result }} GH_AW_NOOP_REPORT_AS_ISSUE: "false" with: - github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} + github-token: ${{ steps.safe-outputs-app-token.outputs.token }} script: | const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); setupGlobals(core, github, context, exec, io, getOctokit); @@ -1036,7 +1052,7 @@ jobs: GH_AW_DETECTION_CONCLUSION: ${{ needs.detection.outputs.detection_conclusion }} GH_AW_DETECTION_REASON: ${{ needs.detection.outputs.detection_reason }} with: - github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} + github-token: ${{ steps.safe-outputs-app-token.outputs.token }} script: | const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); setupGlobals(core, github, context, exec, io, getOctokit); @@ -1051,7 +1067,7 @@ jobs: GH_AW_WORKFLOW_NAME: "Agentic Workflow Auto-Update" GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/aw-auto-update.md" with: - github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} + github-token: ${{ steps.safe-outputs-app-token.outputs.token }} script: | const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); setupGlobals(core, github, context, exec, io, getOctokit); @@ -1066,7 +1082,7 @@ jobs: GH_AW_WORKFLOW_NAME: "Agentic Workflow Auto-Update" GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/aw-auto-update.md" with: - github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} + github-token: ${{ steps.safe-outputs-app-token.outputs.token }} script: | const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); setupGlobals(core, github, context, exec, io, getOctokit); @@ -1096,6 +1112,8 @@ jobs: GH_AW_ENGINE_API_HOSTS: "api.enterprise.githubcopilot.com,api.githubcopilot.com,api.business.githubcopilot.com,api.individual.githubcopilot.com" GH_AW_CODE_PUSH_FAILURE_ERRORS: ${{ needs.safe_outputs.outputs.code_push_failure_errors }} GH_AW_CODE_PUSH_FAILURE_COUNT: ${{ needs.safe_outputs.outputs.code_push_failure_count }} + GH_AW_SAFE_OUTPUTS_APP_TOKEN_MINTING_FAILED: ${{ needs.safe_outputs.outputs.app_token_minting_failed }} + GH_AW_CONCLUSION_APP_TOKEN_MINTING_FAILED: ${{ steps.safe-outputs-app-token.outcome == 'failure' }} GH_AW_LOCKDOWN_CHECK_FAILED: ${{ needs.activation.outputs.lockdown_check_failed }} GH_AW_STALE_LOCK_FILE_FAILED: ${{ needs.activation.outputs.stale_lock_file_failed }} GH_AW_GROUP_REPORTS: "false" @@ -1105,12 +1123,25 @@ jobs: GH_AW_TIMEOUT_MINUTES: "15" GH_AW_MAX_EFFECTIVE_TOKENS: "25000000" with: - github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} + github-token: ${{ steps.safe-outputs-app-token.outputs.token }} script: | const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); setupGlobals(core, github, context, exec, io, getOctokit); const { main } = require('${{ runner.temp }}/gh-aw/actions/handle_agent_failure.cjs'); await main(); + - name: Invalidate GitHub App token + if: always() && steps.safe-outputs-app-token.outputs.token != '' + env: + TOKEN: ${{ steps.safe-outputs-app-token.outputs.token }} + run: | + echo "Revoking GitHub App installation token..." + # GitHub CLI will auth with the token being revoked. + gh api \ + --method DELETE \ + -H "Authorization: token $TOKEN" \ + /installation/token || echo "Token revoke may already be expired." + + echo "Token invalidation step complete." detection: needs: @@ -1338,6 +1369,7 @@ jobs: GH_AW_WORKFLOW_NAME: "Agentic Workflow Auto-Update" GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/aw-auto-update.md" outputs: + app_token_minting_failed: ${{ steps.safe-outputs-app-token.outcome == 'failure' }} code_push_failure_count: ${{ steps.process_safe_outputs.outputs.code_push_failure_count }} code_push_failure_errors: ${{ steps.process_safe_outputs.outputs.code_push_failure_errors }} create_discussion_error_count: ${{ steps.process_safe_outputs.outputs.create_discussion_error_count }} @@ -1383,6 +1415,20 @@ jobs: with: name: agent path: /tmp/gh-aw/ + - name: Generate GitHub App token + id: safe-outputs-app-token + uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0 + with: + client-id: ${{ vars.APP_ID }} + private-key: ${{ secrets.APP_PRIVATE_KEY }} + owner: ${{ github.repository_owner }} + repositories: ${{ github.event.repository.name }} + github-api-url: ${{ github.api_url }} + permission-administration: read + permission-contents: write + permission-issues: write + permission-pull-requests: write + permission-workflows: write - name: Extract base branch from agent output id: extract-base-branch if: steps.download-agent-output.outcome == 'success' @@ -1411,7 +1457,7 @@ jobs: uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: ref: ${{ github.event.repository.default_branch }} - token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} + token: ${{ steps.safe-outputs-app-token.outputs.token }} persist-credentials: false fetch-depth: 1 - name: Checkout repository @@ -1419,7 +1465,7 @@ jobs: uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: ref: ${{ steps.extract-base-branch.outputs.base-branch || github.base_ref || github.event.pull_request.base.ref || github.ref_name || github.event.repository.default_branch }} - token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} + token: ${{ steps.safe-outputs-app-token.outputs.token }} persist-credentials: false fetch-depth: 1 - name: Configure Git credentials @@ -1427,7 +1473,7 @@ jobs: env: REPO_NAME: ${{ github.repository }} SERVER_URL: ${{ github.server_url }} - GIT_TOKEN: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} + GIT_TOKEN: ${{ steps.safe-outputs-app-token.outputs.token }} run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" @@ -1454,15 +1500,29 @@ jobs: GH_AW_ALLOWED_DOMAINS: "*.githubusercontent.com,api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,docs.github.com,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.blog,github.com,github.githubassets.com,go.dev,golang.org,goproxy.io,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,patch-diff.githubusercontent.com,pkg.go.dev,ppa.launchpad.net,proxy.golang.org,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,storage.googleapis.com,sum.golang.org,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com,www.googleapis.com" GITHUB_SERVER_URL: ${{ github.server_url }} GITHUB_API_URL: ${{ github.api_url }} - GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"create_pull_request\":{\"allowed_files\":[\".github/workflows/*.md\",\".github/workflows/*.lock.yml\",\".github/workflows/shared/**\",\".github/aw/**\",\".github/agents/**\"],\"draft\":false,\"labels\":[\"automation\"],\"max\":1,\"max_patch_files\":100,\"max_patch_size\":1024,\"protect_top_level_dot_folders\":true,\"protected_files\":[\"package.json\",\"bun.lockb\",\"bunfig.toml\",\"deno.json\",\"deno.jsonc\",\"deno.lock\",\"global.json\",\"NuGet.Config\",\"Directory.Packages.props\",\"mix.exs\",\"mix.lock\",\"go.mod\",\"go.sum\",\"stack.yaml\",\"stack.yaml.lock\",\"pom.xml\",\"build.gradle\",\"build.gradle.kts\",\"settings.gradle\",\"settings.gradle.kts\",\"gradle.properties\",\"package-lock.json\",\"yarn.lock\",\"pnpm-lock.yaml\",\"npm-shrinkwrap.json\",\"requirements.txt\",\"Pipfile\",\"Pipfile.lock\",\"pyproject.toml\",\"setup.py\",\"setup.cfg\",\"Gemfile\",\"Gemfile.lock\",\"uv.lock\",\"CODEOWNERS\",\"DESIGN.md\",\"README.md\",\"CONTRIBUTING.md\",\"CHANGELOG.md\",\"SECURITY.md\",\"CODE_OF_CONDUCT.md\",\"AGENTS.md\",\"CLAUDE.md\",\"GEMINI.md\"],\"protected_files_policy\":\"fallback-to-issue\",\"title_prefix\":\"[Auto Update] \"},\"create_report_incomplete_issue\":{},\"missing_data\":{},\"missing_tool\":{},\"noop\":{\"max\":1,\"report-as-issue\":\"false\"},\"push_to_pull_request_branch\":{\"allowed_files\":[\".github/workflows/*.md\",\".github/workflows/*.lock.yml\",\".github/workflows/shared/**\",\".github/aw/**\",\".github/agents/**\"],\"if_no_changes\":\"warn\",\"max\":1,\"max_patch_size\":1024,\"protect_top_level_dot_folders\":true,\"protected_files\":[\"package.json\",\"bun.lockb\",\"bunfig.toml\",\"deno.json\",\"deno.jsonc\",\"deno.lock\",\"global.json\",\"NuGet.Config\",\"Directory.Packages.props\",\"mix.exs\",\"mix.lock\",\"go.mod\",\"go.sum\",\"stack.yaml\",\"stack.yaml.lock\",\"pom.xml\",\"build.gradle\",\"build.gradle.kts\",\"settings.gradle\",\"settings.gradle.kts\",\"gradle.properties\",\"package-lock.json\",\"yarn.lock\",\"pnpm-lock.yaml\",\"npm-shrinkwrap.json\",\"requirements.txt\",\"Pipfile\",\"Pipfile.lock\",\"pyproject.toml\",\"setup.py\",\"setup.cfg\",\"Gemfile\",\"Gemfile.lock\",\"uv.lock\",\"CODEOWNERS\",\"DESIGN.md\",\"README.md\",\"CONTRIBUTING.md\",\"CHANGELOG.md\",\"SECURITY.md\",\"CODE_OF_CONDUCT.md\",\"AGENTS.md\",\"CLAUDE.md\",\"GEMINI.md\"],\"protected_files_policy\":\"fallback-to-issue\",\"required_labels\":[\"automation\"],\"target\":\"*\",\"title_prefix\":\"[Auto Update] \"},\"report_incomplete\":{}}" + GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"create_pull_request\":{\"allowed_files\":[\".github/workflows/*.md\",\".github/workflows/*.lock.yml\",\".github/workflows/shared/**\",\".github/aw/**\",\".github/agents/**\"],\"draft\":false,\"labels\":[\"automation\"],\"max\":1,\"max_patch_files\":100,\"max_patch_size\":1024,\"protect_top_level_dot_folders\":true,\"protected_files\":[\"package.json\",\"bun.lockb\",\"bunfig.toml\",\"deno.json\",\"deno.jsonc\",\"deno.lock\",\"global.json\",\"NuGet.Config\",\"Directory.Packages.props\",\"mix.exs\",\"mix.lock\",\"go.mod\",\"go.sum\",\"stack.yaml\",\"stack.yaml.lock\",\"pom.xml\",\"build.gradle\",\"build.gradle.kts\",\"settings.gradle\",\"settings.gradle.kts\",\"gradle.properties\",\"package-lock.json\",\"yarn.lock\",\"pnpm-lock.yaml\",\"npm-shrinkwrap.json\",\"requirements.txt\",\"Pipfile\",\"Pipfile.lock\",\"pyproject.toml\",\"setup.py\",\"setup.cfg\",\"Gemfile\",\"Gemfile.lock\",\"uv.lock\",\"CODEOWNERS\",\"DESIGN.md\",\"README.md\",\"CONTRIBUTING.md\",\"CHANGELOG.md\",\"SECURITY.md\",\"CODE_OF_CONDUCT.md\",\"AGENTS.md\",\"CLAUDE.md\",\"GEMINI.md\"],\"protected_files_policy\":\"allowed\",\"title_prefix\":\"[Auto Update] \"},\"create_report_incomplete_issue\":{},\"missing_data\":{},\"missing_tool\":{},\"noop\":{\"max\":1,\"report-as-issue\":\"false\"},\"push_to_pull_request_branch\":{\"allowed_files\":[\".github/workflows/*.md\",\".github/workflows/*.lock.yml\",\".github/workflows/shared/**\",\".github/aw/**\",\".github/agents/**\"],\"if_no_changes\":\"warn\",\"max\":1,\"max_patch_size\":1024,\"protect_top_level_dot_folders\":true,\"protected_files\":[\"package.json\",\"bun.lockb\",\"bunfig.toml\",\"deno.json\",\"deno.jsonc\",\"deno.lock\",\"global.json\",\"NuGet.Config\",\"Directory.Packages.props\",\"mix.exs\",\"mix.lock\",\"go.mod\",\"go.sum\",\"stack.yaml\",\"stack.yaml.lock\",\"pom.xml\",\"build.gradle\",\"build.gradle.kts\",\"settings.gradle\",\"settings.gradle.kts\",\"gradle.properties\",\"package-lock.json\",\"yarn.lock\",\"pnpm-lock.yaml\",\"npm-shrinkwrap.json\",\"requirements.txt\",\"Pipfile\",\"Pipfile.lock\",\"pyproject.toml\",\"setup.py\",\"setup.cfg\",\"Gemfile\",\"Gemfile.lock\",\"uv.lock\",\"CODEOWNERS\",\"DESIGN.md\",\"README.md\",\"CONTRIBUTING.md\",\"CHANGELOG.md\",\"SECURITY.md\",\"CODE_OF_CONDUCT.md\",\"AGENTS.md\",\"CLAUDE.md\",\"GEMINI.md\"],\"protected_files_policy\":\"allowed\",\"required_labels\":[\"automation\"],\"target\":\"*\",\"title_prefix\":\"[Auto Update] \"},\"report_incomplete\":{}}" GH_AW_CI_TRIGGER_TOKEN: ${{ secrets.GH_AW_CI_TRIGGER_TOKEN }} + GITHUB_TOKEN: ${{ steps.safe-outputs-app-token.outputs.token }} with: - github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} + github-token: ${{ steps.safe-outputs-app-token.outputs.token }} script: | const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); setupGlobals(core, github, context, exec, io, getOctokit); const { main } = require('${{ runner.temp }}/gh-aw/actions/safe_output_handler_manager.cjs'); await main(); + - name: Invalidate GitHub App token + if: always() && steps.safe-outputs-app-token.outputs.token != '' + env: + TOKEN: ${{ steps.safe-outputs-app-token.outputs.token }} + run: | + echo "Revoking GitHub App installation token..." + # GitHub CLI will auth with the token being revoked. + gh api \ + --method DELETE \ + -H "Authorization: token $TOKEN" \ + /installation/token || echo "Token revoke may already be expired." + + echo "Token invalidation step complete." - name: Upload Safe Outputs Items if: always() uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 diff --git a/.github/workflows/aw-auto-update.md b/.github/workflows/aw-auto-update.md index 8ca4e52ee54..11bbb39f8c2 100644 --- a/.github/workflows/aw-auto-update.md +++ b/.github/workflows/aw-auto-update.md @@ -27,6 +27,9 @@ tools: bash: true safe-outputs: + github-app: + client-id: ${{ vars.APP_ID }} + private-key: ${{ secrets.APP_PRIVATE_KEY }} noop: report-as-issue: false create-pull-request: @@ -34,25 +37,27 @@ safe-outputs: title-prefix: "[Auto Update] " labels: [automation] max: 1 + allow-workflows: true allowed-files: - ".github/workflows/*.md" - ".github/workflows/*.lock.yml" - ".github/workflows/shared/**" - ".github/aw/**" - ".github/agents/**" - protected-files: fallback-to-issue + protected-files: allowed push-to-pull-request-branch: target: "*" title-prefix: "[Auto Update] " labels: [automation] max: 1 + allow-workflows: true allowed-files: - ".github/workflows/*.md" - ".github/workflows/*.lock.yml" - ".github/workflows/shared/**" - ".github/aw/**" - ".github/agents/**" - protected-files: fallback-to-issue + protected-files: allowed --- # Agentic Workflow Auto-Update From 93ba0ea275385e578e0be1565fe39cbae83a78f7 Mon Sep 17 00:00:00 2001 From: Eugene Auduchinok Date: Thu, 28 May 2026 12:50:33 +0200 Subject: [PATCH 21/72] Parser: recover on unfinished if and binary expressions (#19724) --- .../.FSharp.Compiler.Service/11.0.100.md | 2 + src/Compiler/pars.fsy | 102 +++++++++++++++++- .../OffsideExceptions/OffsideExceptions.fs | 24 +---- tests/fsharp/typecheck/sigs/neg29.bsl | 4 +- .../Expression/Binary - Eq 05.fs.bsl | 3 +- .../Expression/Binary - Eq 06.fs.bsl | 3 +- .../Expression/Binary - Plus 04.fs.bsl | 3 +- .../data/SyntaxTree/Expression/If 03.fs.bsl | 3 +- .../data/SyntaxTree/Expression/If 11.fs | 6 ++ .../data/SyntaxTree/Expression/If 11.fs.bsl | 42 ++++++++ .../data/SyntaxTree/Expression/If 12.fs | 6 ++ .../data/SyntaxTree/Expression/If 12.fs.bsl | 38 +++++++ .../data/SyntaxTree/Expression/If 13.fs | 6 ++ .../data/SyntaxTree/Expression/If 13.fs.bsl | 40 +++++++ .../data/SyntaxTree/Expression/If 14.fs | 6 ++ .../data/SyntaxTree/Expression/If 14.fs.bsl | 42 ++++++++ 16 files changed, 297 insertions(+), 33 deletions(-) create mode 100644 tests/service/data/SyntaxTree/Expression/If 11.fs create mode 100644 tests/service/data/SyntaxTree/Expression/If 11.fs.bsl create mode 100644 tests/service/data/SyntaxTree/Expression/If 12.fs create mode 100644 tests/service/data/SyntaxTree/Expression/If 12.fs.bsl create mode 100644 tests/service/data/SyntaxTree/Expression/If 13.fs create mode 100644 tests/service/data/SyntaxTree/Expression/If 13.fs.bsl create mode 100644 tests/service/data/SyntaxTree/Expression/If 14.fs create mode 100644 tests/service/data/SyntaxTree/Expression/If 14.fs.bsl diff --git a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md index 51c14214f3c..b53ba177d0d 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md +++ b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md @@ -60,6 +60,8 @@ * Fix parser recovery, name resolution, and code completion for unfinished enum patterns ([PR #19708](https://github.com/dotnet/fsharp/pull/19708)) * Parser: fix unexpected diagnostics in debug builds, improve error messages ([PR #19730](https://github.com/dotnet/fsharp/pull/19730)) * Fix signature conformance: overloaded member with unit parameter `M(())` now matches sig `member M: unit -> unit`. ([Issue #19596](https://github.com/dotnet/fsharp/issues/19596), [PR #19615](https://github.com/dotnet/fsharp/pull/19615)) +* Parser: recover on unfinished if and binary expressions +([PR #19724](https://github.com/dotnet/fsharp/pull/19724)) ### Added diff --git a/src/Compiler/pars.fsy b/src/Compiler/pars.fsy index 99870fe2b9a..bfeb413d3ca 100644 --- a/src/Compiler/pars.fsy +++ b/src/Compiler/pars.fsy @@ -241,7 +241,7 @@ let parse_error_rich = Some(fun (ctxt: ParseErrorContext<_>) -> /* start with lowest */ -%nonassoc prec_atompat_pathop_error +%nonassoc prec_recover /* the lowest precedence to use as the last chance recovery */ %nonassoc prec_args_error /* less than RPAREN */ %nonassoc prec_atomexpr_lparen_error /* less than RPAREN */ @@ -4335,6 +4335,16 @@ declExpr: let trivia = { IfKeyword = mIf; IsElif = false; ThenKeyword = mThen; ElseKeyword = None; IfToThenRange = m } SynExpr.IfThenElse($2, arbExpr ("if1", mThen), None, spIfToThen, true, m, trivia) } + | IF declExpr %prec prec_recover + { let mIf = rhs parseState 1 + errorR (Error(FSComp.SR.parsIncompleteIf (), mIf)) + let ifExpr = $2 + let mThen = ifExpr.Range.EndRange + let m = unionRanges mIf mThen + let spIfToThen = DebugPointAtBinding.Yes m + let trivia = { IfKeyword = mIf; IsElif = false; ThenKeyword = mThen; ElseKeyword = None; IfToThenRange = m } + SynExpr.IfThenElse($2, arbExpr ("if4", mThen), None, spIfToThen, true, m, trivia) } + | IF recover %prec expr_if { errorR (Error(FSComp.SR.parsIncompleteIf (), rhs parseState 1)) let m = rhs parseState 1 @@ -4674,6 +4684,11 @@ declExpr: reportParseErrorAt mOp (FSComp.SR.parsUnfinishedExpression "in") mkSynInfix mOp $1 "@in" (arbExpr ("declExprInfixJoinIn", mOp.EndRange)) } + | declExpr JOIN_IN %prec prec_recover + { let mOp = rhs parseState 2 + reportParseErrorAt mOp (FSComp.SR.parsUnfinishedExpression "in") + mkSynInfix mOp $1 "@in" (arbExpr ("declExprInfixJoinIn2", mOp.EndRange)) } + | declExpr BAR_BAR declExpr { mkSynInfix (rhs parseState 2) $1 "||" $3 } @@ -4682,6 +4697,11 @@ declExpr: reportParseErrorAt mOp (FSComp.SR.parsUnfinishedExpression "||") mkSynInfix mOp $1 "||" (arbExpr ("declExprInfixBarBar", mOp.EndRange)) } + | declExpr BAR_BAR %prec prec_recover + { let mOp = rhs parseState 2 + reportParseErrorAt mOp (FSComp.SR.parsUnfinishedExpression "||") + mkSynInfix mOp $1 "||" (arbExpr ("declExprInfixBarBar2", mOp.EndRange)) } + | declExpr INFIX_BAR_OP declExpr { mkSynInfix (rhs parseState 2) $1 $2 $3 } @@ -4690,6 +4710,11 @@ declExpr: reportParseErrorAt mOp (FSComp.SR.parsUnfinishedExpression $2) mkSynInfix mOp $1 $2 (arbExpr ("declExprInfixBarOp", mOp.EndRange)) } + | declExpr INFIX_BAR_OP %prec prec_recover + { let mOp = rhs parseState 2 + reportParseErrorAt mOp (FSComp.SR.parsUnfinishedExpression $2) + mkSynInfix mOp $1 $2 (arbExpr ("declExprInfixBarOp2", mOp.EndRange)) } + | declExpr AMP_AMP declExpr { mkSynInfix (rhs parseState 2) $1 "&&" $3 } @@ -4698,6 +4723,11 @@ declExpr: reportParseErrorAt mOp (FSComp.SR.parsUnfinishedExpression "&&") mkSynInfix mOp $1 "&&" (arbExpr ("declExprInfixAmpAmp", mOp.EndRange)) } + | declExpr AMP_AMP %prec prec_recover + { let mOp = rhs parseState 2 + reportParseErrorAt mOp (FSComp.SR.parsUnfinishedExpression "&&") + mkSynInfix mOp $1 "&&" (arbExpr ("declExprInfixAmpAmp2", mOp.EndRange)) } + | declExpr INFIX_AMP_OP declExpr { mkSynInfix (rhs parseState 2) $1 $2 $3 } @@ -4706,6 +4736,11 @@ declExpr: reportParseErrorAt mOp (FSComp.SR.parsUnfinishedExpression $2) mkSynInfix mOp $1 $2 (arbExpr ("declExprInfixAmpOp", (rhs parseState 3).StartRange)) } + | declExpr INFIX_AMP_OP %prec prec_recover + { let mOp = rhs parseState 2 + reportParseErrorAt mOp (FSComp.SR.parsUnfinishedExpression $2) + mkSynInfix mOp $1 $2 (arbExpr ("declExprInfixAmpOp2", (rhs parseState 3).StartRange)) } + | declExpr EQUALS declExpr { mkSynInfix (rhs parseState 2) $1 "=" $3 } @@ -4714,6 +4749,11 @@ declExpr: reportParseErrorAt mOp (FSComp.SR.parsUnfinishedExpression "=") mkSynInfix mOp $1 "=" (arbExpr ("declExprInfixEquals", mOp.EndRange)) } + | declExpr EQUALS %prec prec_recover + { let mOp = rhs parseState 2 + reportParseErrorAt mOp (FSComp.SR.parsUnfinishedExpression "=") + mkSynInfix mOp $1 "=" (arbExpr ("declExprInfixEquals2", mOp.EndRange)) } + | declExpr INFIX_COMPARE_OP declExpr { mkSynInfix (rhs parseState 2) $1 $2 $3 } @@ -4722,6 +4762,11 @@ declExpr: reportParseErrorAt mOp (FSComp.SR.parsUnfinishedExpression $2) mkSynInfix mOp $1 $2 (arbExpr ("declExprInfix", mOp.EndRange)) } + | declExpr INFIX_COMPARE_OP %prec prec_recover + { let mOp = rhs parseState 2 + reportParseErrorAt mOp (FSComp.SR.parsUnfinishedExpression $2) + mkSynInfix mOp $1 $2 (arbExpr ("declExprInfix2", mOp.EndRange)) } + | declExpr DOLLAR declExpr { mkSynInfix (rhs parseState 2) $1 "$" $3 } @@ -4730,6 +4775,11 @@ declExpr: reportParseErrorAt mOp (FSComp.SR.parsUnfinishedExpression "$") mkSynInfix mOp $1 "$" (arbExpr ("declExprInfixDollar", mOp.EndRange)) } + | declExpr DOLLAR %prec prec_recover + { let mOp = rhs parseState 2 + reportParseErrorAt mOp (FSComp.SR.parsUnfinishedExpression "$") + mkSynInfix mOp $1 "$" (arbExpr ("declExprInfixDollar2", mOp.EndRange)) } + | declExpr LESS declExpr { mkSynInfix (rhs parseState 2) $1 "<" $3 } @@ -4738,6 +4788,11 @@ declExpr: reportParseErrorAt mOp (FSComp.SR.parsUnfinishedExpression "<") mkSynInfix mOp $1 "<" (arbExpr ("declExprInfixLess", mOp.EndRange)) } + | declExpr LESS %prec prec_recover + { let mOp = rhs parseState 2 + reportParseErrorAt mOp (FSComp.SR.parsUnfinishedExpression "<") + mkSynInfix mOp $1 "<" (arbExpr ("declExprInfixLess2", mOp.EndRange)) } + | declExpr GREATER declExpr { mkSynInfix (rhs parseState 2) $1 ">" $3 } @@ -4746,6 +4801,11 @@ declExpr: reportParseErrorAt mOp (FSComp.SR.parsUnfinishedExpression ">") mkSynInfix mOp $1 ">" (arbExpr ("declExprInfixGreater", mOp.EndRange)) } + | declExpr GREATER %prec prec_recover + { let mOp = rhs parseState 2 + reportParseErrorAt mOp (FSComp.SR.parsUnfinishedExpression ">") + mkSynInfix mOp $1 ">" (arbExpr ("declExprInfixGreater2", mOp.EndRange)) } + | declExpr INFIX_AT_HAT_OP declExpr { mkSynInfix (rhs parseState 2) $1 $2 $3 } @@ -4762,6 +4822,11 @@ declExpr: reportParseErrorAt mOp (FSComp.SR.parsUnfinishedExpression $2) mkSynInfix mOp $1 $2 (arbExpr ("declExprInfixPercent", mOp.EndRange)) } + | declExpr PERCENT_OP %prec prec_recover + { let mOp = rhs parseState 2 + reportParseErrorAt mOp (FSComp.SR.parsUnfinishedExpression $2) + mkSynInfix mOp $1 $2 (arbExpr ("declExprInfixPercent2", mOp.EndRange)) } + | declExpr COLON_COLON declExpr { let mOp = rhs parseState 2 let m = unionRanges $1.Range $3.Range @@ -4777,6 +4842,14 @@ declExpr: let tupExpr = SynExpr.Tuple(false, [$1; (arbExpr ("declExprInfixColonColon", mOp.EndRange))], [mOp], m) SynExpr.App(ExprAtomicFlag.NonAtomic, true, identExpr, tupExpr, m) } + | declExpr COLON_COLON %prec prec_recover + { let mOp = rhs parseState 2 + let m = unionRanges $1.Range mOp + reportParseErrorAt mOp (FSComp.SR.parsUnfinishedExpression "::") + let identExpr = mkSynOperator mOp "::" + let tupExpr = SynExpr.Tuple(false, [$1; (arbExpr ("declExprInfixColonColon2", mOp.EndRange))], [mOp], m) + SynExpr.App(ExprAtomicFlag.NonAtomic, true, identExpr, tupExpr, m) } + | declExpr PLUS_MINUS_OP declExpr { mkSynInfix (rhs parseState 2) $1 $2 $3 } @@ -4785,6 +4858,11 @@ declExpr: reportParseErrorAt mOp (FSComp.SR.parsUnfinishedExpression $2) mkSynInfix mOp $1 $2 (arbExpr ("declExprInfixPlusMinus", mOp.EndRange)) } + | declExpr PLUS_MINUS_OP %prec prec_recover + { let mOp = rhs parseState 2 + reportParseErrorAt mOp (FSComp.SR.parsUnfinishedExpression $2) + mkSynInfix mOp $1 $2 (arbExpr ("declExprInfixPlusMinus2", mOp.EndRange)) } + | declExpr MINUS declExpr { mkSynInfix (rhs parseState 2) $1 "-" $3 } @@ -4793,6 +4871,11 @@ declExpr: reportParseErrorAt mOp (FSComp.SR.parsUnfinishedExpression "-") mkSynInfix mOp $1 "-" (arbExpr ("declExprInfixMinus", mOp.EndRange)) } + | declExpr MINUS %prec prec_recover + { let mOp = rhs parseState 2 + reportParseErrorAt mOp (FSComp.SR.parsUnfinishedExpression "-") + mkSynInfix mOp $1 "-" (arbExpr ("declExprInfixMinus2", mOp.EndRange)) } + | declExpr STAR declExpr { mkSynInfix (rhs parseState 2) $1 "*" $3 } @@ -4801,6 +4884,11 @@ declExpr: reportParseErrorAt mOp (FSComp.SR.parsUnfinishedExpression "*") mkSynInfix mOp $1 "*" (arbExpr ("declExprInfixStar", mOp.EndRange)) } + | declExpr STAR %prec prec_recover + { let mOp = rhs parseState 2 + reportParseErrorAt mOp (FSComp.SR.parsUnfinishedExpression "*") + mkSynInfix mOp $1 "*" (arbExpr ("declExprInfixStar2", mOp.EndRange)) } + | declExpr INFIX_STAR_DIV_MOD_OP declExpr { mkSynInfix (rhs parseState 2) $1 $2 $3 } @@ -4809,6 +4897,11 @@ declExpr: reportParseErrorAt mOp (FSComp.SR.parsUnfinishedExpression $2) mkSynInfix mOp $1 $2 (arbExpr ("declExprInfixStarDivMod", mOp.EndRange)) } + | declExpr INFIX_STAR_DIV_MOD_OP %prec prec_recover + { let mOp = rhs parseState 2 + reportParseErrorAt mOp (FSComp.SR.parsUnfinishedExpression $2) + mkSynInfix mOp $1 $2 (arbExpr ("declExprInfixStarDivMod2", mOp.EndRange)) } + | declExpr INFIX_STAR_STAR_OP declExpr { mkSynInfix (rhs parseState 2) $1 $2 $3 } @@ -4817,6 +4910,11 @@ declExpr: reportParseErrorAt mOp (FSComp.SR.parsUnfinishedExpression $2) mkSynInfix mOp $1 $2 (arbExpr ("declExprInfixStarStar", mOp.EndRange)) } + | declExpr INFIX_STAR_STAR_OP %prec prec_recover + { let mOp = rhs parseState 2 + reportParseErrorAt mOp (FSComp.SR.parsUnfinishedExpression $2) + mkSynInfix mOp $1 $2 (arbExpr ("declExprInfixStarStar2", mOp.EndRange)) } + | declExpr DOT_DOT declExpr { let wholem = rhs2 parseState 1 3 let mOperator = rhs parseState 2 @@ -6935,7 +7033,7 @@ pathOp: { let ident, trivia = $1 SynLongIdent([ident], [], [Some trivia]) } - | ident DOT %prec prec_atompat_pathop_error + | ident DOT %prec prec_recover { let mDot = rhs parseState 2 reportParseErrorAt mDot.EndRange (FSComp.SR.parsIdentifierExpected()) SynLongIdent([$1], [mDot], [None]) } diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/OffsideExceptions/OffsideExceptions.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/OffsideExceptions/OffsideExceptions.fs index 8153a9e44bc..9dc910ba249 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/OffsideExceptions/OffsideExceptions.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/OffsideExceptions/OffsideExceptions.fs @@ -242,27 +242,9 @@ module A """ |> typecheck |> shouldFail - |> withResults [ - { Error = Error 10 - Range = { StartLine = 5 - StartColumn = 1 - EndLine = 5 - EndColumn = 3 } - Message = - "Incomplete structured construct at or before this point in expression" }; - { Error = Error 589 - Range = { StartLine = 3 - StartColumn = 13 - EndLine = 3 - EndColumn = 15 } - Message = - "Incomplete conditional. Expected 'if then ' or 'if then else '." }; - { Error = Error 10 - Range = { StartLine = 5 - StartColumn = 31 - EndLine = 5 - EndColumn = 33 } - Message = "Unexpected infix operator in implementation file" } + |> withDiagnostics [ + Error 589, Line 3, Col 13, Line 3, Col 15, "Incomplete conditional. Expected 'if then ' or 'if then else '." + Error 10, Line 5, Col 31, Line 5, Col 33, "Unexpected infix operator in implementation file" ] |> ignore diff --git a/tests/fsharp/typecheck/sigs/neg29.bsl b/tests/fsharp/typecheck/sigs/neg29.bsl index 5f75bb8cdb0..424491fab2f 100644 --- a/tests/fsharp/typecheck/sigs/neg29.bsl +++ b/tests/fsharp/typecheck/sigs/neg29.bsl @@ -1,8 +1,8 @@ neg29.fs(5,19,6,16): parse error FS0010: Incomplete structured construct at or before this point in type name. Expected '>' or other token. -neg29.fs(6,19,6,20): parse error FS0010: Unexpected symbol '(' in expression - neg29.fs(6,18,6,19): parse error FS3156: Unexpected token '>' or incomplete expression +neg29.fs(6,19,6,20): parse error FS0010: Unexpected symbol '(' in definition. Expected incomplete structured construct at or before this point or other token. + neg29.fs(9,1,9,1): parse error FS0010: Incomplete structured construct at or before this point in implementation file diff --git a/tests/service/data/SyntaxTree/Expression/Binary - Eq 05.fs.bsl b/tests/service/data/SyntaxTree/Expression/Binary - Eq 05.fs.bsl index 43fc5bc8157..08d0d9b96b4 100644 --- a/tests/service/data/SyntaxTree/Expression/Binary - Eq 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Binary - Eq 05.fs.bsl @@ -21,7 +21,7 @@ ImplFile [Some (OriginalNotation "=")]), None, (3,4--3,5)), Ident a, (3,2--3,5)), ArbitraryAfterError - ("declExprInfixEquals", (3,5--3,5)), (3,2--3,5)); + ("declExprInfixEquals2", (3,5--3,5)), (3,2--3,5)); App (NonAtomic, false, App @@ -41,5 +41,4 @@ ImplFile WarnDirectives = [] CodeComments = [] }, set [])) -(3,5)-(3,6) parse error Unexpected symbol ',' in expression (3,4)-(3,5) parse error Unexpected token '=' or incomplete expression diff --git a/tests/service/data/SyntaxTree/Expression/Binary - Eq 06.fs.bsl b/tests/service/data/SyntaxTree/Expression/Binary - Eq 06.fs.bsl index 930c655f57a..e7caca2dc43 100644 --- a/tests/service/data/SyntaxTree/Expression/Binary - Eq 06.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Binary - Eq 06.fs.bsl @@ -32,7 +32,7 @@ ImplFile [Some (OriginalNotation "=")]), None, (3,11--3,12)), Ident b, (3,9--3,12)), ArbitraryAfterError - ("declExprInfixEquals", (3,12--3,12)), (3,9--3,12)); + ("declExprInfixEquals2", (3,12--3,12)), (3,9--3,12)); App (NonAtomic, false, App @@ -52,5 +52,4 @@ ImplFile WarnDirectives = [] CodeComments = [] }, set [])) -(3,12)-(3,13) parse error Unexpected symbol ',' in expression (3,11)-(3,12) parse error Unexpected token '=' or incomplete expression diff --git a/tests/service/data/SyntaxTree/Expression/Binary - Plus 04.fs.bsl b/tests/service/data/SyntaxTree/Expression/Binary - Plus 04.fs.bsl index 6ed4a9524f4..d47ef4241e1 100644 --- a/tests/service/data/SyntaxTree/Expression/Binary - Plus 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Binary - Plus 04.fs.bsl @@ -24,7 +24,7 @@ ImplFile ([op_Addition], [], [Some (OriginalNotation "+")]), None, (3,2--3,3)), Ident a, (3,0--3,3)), ArbitraryAfterError - ("declExprInfixPlusMinus", (3,3--3,3)), (3,0--3,3)), + ("declExprInfixPlusMinus2", (3,3--3,3)), (3,0--3,3)), (3,0--4,2)), Const (Unit, (4,3--4,5)), (3,0--4,5)), (3,0--4,5))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, @@ -33,5 +33,4 @@ ImplFile WarnDirectives = [] CodeComments = [] }, set [])) -(4,0)-(4,2) parse error Unexpected infix operator in expression (3,2)-(3,3) parse error Unexpected token '+' or incomplete expression diff --git a/tests/service/data/SyntaxTree/Expression/If 03.fs.bsl b/tests/service/data/SyntaxTree/Expression/If 03.fs.bsl index ae9e6a4ec23..bc1c36dc638 100644 --- a/tests/service/data/SyntaxTree/Expression/If 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/If 03.fs.bsl @@ -6,7 +6,7 @@ ImplFile [Expr (IfThenElse (Const (Bool true, (3,3--3,7)), - ArbitraryAfterError ("if1", (3,7--3,7)), None, Yes (3,0--3,7), + ArbitraryAfterError ("if4", (3,7--3,7)), None, Yes (3,0--3,7), true, (3,0--3,7), { IfKeyword = (3,0--3,2) IsElif = false ThenKeyword = (3,7--3,7) @@ -19,5 +19,4 @@ ImplFile WarnDirectives = [] CodeComments = [] }, set [])) -(3,8)-(5,0) parse error Incomplete structured construct at or before this point in expression (3,0)-(3,2) parse error Incomplete conditional. Expected 'if then ' or 'if then else '. diff --git a/tests/service/data/SyntaxTree/Expression/If 11.fs b/tests/service/data/SyntaxTree/Expression/If 11.fs new file mode 100644 index 00000000000..b544f2cf903 --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/If 11.fs @@ -0,0 +1,6 @@ +module Module + +do + if true && + + () diff --git a/tests/service/data/SyntaxTree/Expression/If 11.fs.bsl b/tests/service/data/SyntaxTree/Expression/If 11.fs.bsl new file mode 100644 index 00000000000..905054b3f44 --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/If 11.fs.bsl @@ -0,0 +1,42 @@ +ImplFile + (ParsedImplFileInput + ("/root/Expression/If 11.fs", false, QualifiedNameOfFile Module, [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Expr + (Do + (Sequential + (SuppressNeither, true, + IfThenElse + (App + (NonAtomic, false, + App + (NonAtomic, true, + LongIdent + (false, + SynLongIdent + ([op_BooleanAnd], [], + [Some (OriginalNotation "&&")]), None, + (4,12--4,14)), Const (Bool true, (4,7--4,11)), + (4,7--4,14)), + ArbitraryAfterError + ("declExprInfixAmpAmp2", (4,14--4,14)), (4,7--4,14)), + ArbitraryAfterError ("if4", (4,14--4,14)), None, + Yes (4,4--4,14), true, (4,4--4,14), + { IfKeyword = (4,4--4,6) + IsElif = false + ThenKeyword = (4,14--4,14) + ElseKeyword = None + IfToThenRange = (4,4--4,14) }), + Const (Unit, (6,4--6,6)), (4,4--6,6), + { SeparatorRange = None }), (3,0--6,6)), (3,0--6,6))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--6,6), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) + +(6,4)-(6,5) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (4:5). Try indenting this further. +To continue using non-conforming indentation, pass the '--strict-indentation-' flag to the compiler, or set the language version to F# 7. +(4,12)-(4,14) parse error Unexpected token '&&' or incomplete expression +(4,4)-(4,6) parse error Incomplete conditional. Expected 'if then ' or 'if then else '. diff --git a/tests/service/data/SyntaxTree/Expression/If 12.fs b/tests/service/data/SyntaxTree/Expression/If 12.fs new file mode 100644 index 00000000000..05db19e2d79 --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/If 12.fs @@ -0,0 +1,6 @@ +module Module + +do + if true && + +() diff --git a/tests/service/data/SyntaxTree/Expression/If 12.fs.bsl b/tests/service/data/SyntaxTree/Expression/If 12.fs.bsl new file mode 100644 index 00000000000..42d610056cb --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/If 12.fs.bsl @@ -0,0 +1,38 @@ +ImplFile + (ParsedImplFileInput + ("/root/Expression/If 12.fs", false, QualifiedNameOfFile Module, [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Expr + (Do + (IfThenElse + (App + (NonAtomic, false, + App + (NonAtomic, true, + LongIdent + (false, + SynLongIdent + ([op_BooleanAnd], [], + [Some (OriginalNotation "&&")]), None, + (4,12--4,14)), Const (Bool true, (4,7--4,11)), + (4,7--4,14)), + ArbitraryAfterError ("declExprInfixAmpAmp", (4,14--4,14)), + (4,7--4,14)), ArbitraryAfterError ("if4", (4,14--4,14)), + None, Yes (4,4--4,14), true, (4,4--4,14), + { IfKeyword = (4,4--4,6) + IsElif = false + ThenKeyword = (4,14--4,14) + ElseKeyword = None + IfToThenRange = (4,4--4,14) }), (3,0--4,14)), (3,0--4,14)); + Expr (Const (Unit, (6,0--6,2)), (6,0--6,2))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--6,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) + +(6,0)-(6,1) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (4:5). Try indenting this further. +To continue using non-conforming indentation, pass the '--strict-indentation-' flag to the compiler, or set the language version to F# 7. +(4,12)-(4,14) parse error Unexpected token '&&' or incomplete expression +(4,4)-(4,6) parse error Incomplete conditional. Expected 'if then ' or 'if then else '. diff --git a/tests/service/data/SyntaxTree/Expression/If 13.fs b/tests/service/data/SyntaxTree/Expression/If 13.fs new file mode 100644 index 00000000000..d3a2478d255 --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/If 13.fs @@ -0,0 +1,6 @@ +module Module + +do + if true = + + () diff --git a/tests/service/data/SyntaxTree/Expression/If 13.fs.bsl b/tests/service/data/SyntaxTree/Expression/If 13.fs.bsl new file mode 100644 index 00000000000..9f77ead8868 --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/If 13.fs.bsl @@ -0,0 +1,40 @@ +ImplFile + (ParsedImplFileInput + ("/root/Expression/If 13.fs", false, QualifiedNameOfFile Module, [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Expr + (Do + (Sequential + (SuppressNeither, true, + IfThenElse + (App + (NonAtomic, false, + App + (NonAtomic, true, + LongIdent + (false, + SynLongIdent + ([op_Equality], [], + [Some (OriginalNotation "=")]), None, + (4,12--4,13)), Const (Bool true, (4,7--4,11)), + (4,7--4,13)), + ArbitraryAfterError + ("declExprInfixEquals2", (4,13--4,13)), (4,7--4,13)), + ArbitraryAfterError ("if4", (4,13--4,13)), None, + Yes (4,4--4,13), true, (4,4--4,13), + { IfKeyword = (4,4--4,6) + IsElif = false + ThenKeyword = (4,13--4,13) + ElseKeyword = None + IfToThenRange = (4,4--4,13) }), + Const (Unit, (6,4--6,6)), (4,4--6,6), + { SeparatorRange = None }), (3,0--6,6)), (3,0--6,6))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--6,6), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) + +(4,12)-(4,13) parse error Unexpected token '=' or incomplete expression +(4,4)-(4,6) parse error Incomplete conditional. Expected 'if then ' or 'if then else '. diff --git a/tests/service/data/SyntaxTree/Expression/If 14.fs b/tests/service/data/SyntaxTree/Expression/If 14.fs new file mode 100644 index 00000000000..f6405fe9c68 --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/If 14.fs @@ -0,0 +1,6 @@ +module Module + +do + if true == + + () diff --git a/tests/service/data/SyntaxTree/Expression/If 14.fs.bsl b/tests/service/data/SyntaxTree/Expression/If 14.fs.bsl new file mode 100644 index 00000000000..6a79bb6b7ae --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/If 14.fs.bsl @@ -0,0 +1,42 @@ +ImplFile + (ParsedImplFileInput + ("/root/Expression/If 14.fs", false, QualifiedNameOfFile Module, [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Expr + (Do + (Sequential + (SuppressNeither, true, + IfThenElse + (App + (NonAtomic, false, + App + (NonAtomic, true, + LongIdent + (false, + SynLongIdent + ([op_EqualsEquals], [], + [Some (OriginalNotation "==")]), None, + (4,12--4,14)), Const (Bool true, (4,7--4,11)), + (4,7--4,14)), + ArbitraryAfterError ("declExprInfix2", (4,14--4,14)), + (4,7--4,14)), + ArbitraryAfterError ("if4", (4,14--4,14)), None, + Yes (4,4--4,14), true, (4,4--4,14), + { IfKeyword = (4,4--4,6) + IsElif = false + ThenKeyword = (4,14--4,14) + ElseKeyword = None + IfToThenRange = (4,4--4,14) }), + Const (Unit, (6,4--6,6)), (4,4--6,6), + { SeparatorRange = None }), (3,0--6,6)), (3,0--6,6))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--6,6), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) + +(6,4)-(6,5) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (4:5). Try indenting this further. +To continue using non-conforming indentation, pass the '--strict-indentation-' flag to the compiler, or set the language version to F# 7. +(4,12)-(4,14) parse error Unexpected token '==' or incomplete expression +(4,4)-(4,6) parse error Incomplete conditional. Expected 'if then ' or 'if then else '. From 6b2a50e07b094b20b5199297339d4bcf5f816387 Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Thu, 28 May 2026 12:51:39 +0200 Subject: [PATCH 22/72] Fix ValueOption optional args via ?param caller syntax (#19711) (#19742) When the SupportValueOptionsAsOptionalParameters language feature is enabled, do not force option<_> on caller-side ?name = expr arguments during overload inference. Leave the type as a fresh inference variable and let AdjustCalledArgTypeForOptionals (CalleeSide) reconcile against option<_> or voption<_>. Pre-LangVersion-10 behaviour is preserved. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../.FSharp.Compiler.Service/11.0.100.md | 1 + .../Checking/Expressions/CheckExpressions.fs | 16 +++- .../OptionalArguments/OptionalArguments.fs | 79 ++++++++++++++++++- 3 files changed, 91 insertions(+), 5 deletions(-) diff --git a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md index b53ba177d0d..bf4e0a957b5 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md +++ b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md @@ -59,6 +59,7 @@ * Fix parallel compilation of scripts ([PR #19649](https://github.com/dotnet/fsharp/pull/19649)) * Fix parser recovery, name resolution, and code completion for unfinished enum patterns ([PR #19708](https://github.com/dotnet/fsharp/pull/19708)) * Parser: fix unexpected diagnostics in debug builds, improve error messages ([PR #19730](https://github.com/dotnet/fsharp/pull/19730)) +* Fix `[] ?param` optional parameters could not be passed using the explicit `?param = expr` caller-side syntax with a `ValueOption` value. ([Issue #19711](https://github.com/dotnet/fsharp/issues/19711), [PR #19742](https://github.com/dotnet/fsharp/pull/19742)) * Fix signature conformance: overloaded member with unit parameter `M(())` now matches sig `member M: unit -> unit`. ([Issue #19596](https://github.com/dotnet/fsharp/issues/19596), [PR #19615](https://github.com/dotnet/fsharp/pull/19615)) * Parser: recover on unfinished if and binary expressions ([PR #19724](https://github.com/dotnet/fsharp/pull/19724)) diff --git a/src/Compiler/Checking/Expressions/CheckExpressions.fs b/src/Compiler/Checking/Expressions/CheckExpressions.fs index d3b1e26497f..37ff7f54b66 100644 --- a/src/Compiler/Checking/Expressions/CheckExpressions.fs +++ b/src/Compiler/Checking/Expressions/CheckExpressions.fs @@ -10170,13 +10170,21 @@ and TcMethodApplication_SplitSynArguments | _ -> let unnamedCurriedCallerArgs = unnamedCurriedCallerArgs |> List.mapSquared MakeUnnamedCallerArgInfo + let supportsValueOptionalArgs = + g.langVersion.SupportsFeature LanguageFeature.SupportValueOptionsAsOptionalParameters let namedCurriedCallerArgs = namedCurriedCallerArgs |> List.mapSquared (fun (isOpt, nm, x) -> let ty = GetNewInferenceTypeForMethodArg cenv x // #435263: compiler crash with .net optional parameters and F# optional syntax - // named optional arguments should always have option type - // STRUCT OPTIONS: if we allow struct options as optional arguments then we should relax this and rely - // on later inference to work out if this is a struct option or ref option - let ty = if isOpt then mkOptionTy denv.g ty else ty + // For LangVersion < 10 named optional arguments are constrained to option type here + // so that an early, friendly error is reported. With LangVersion >= 10 the parameter + // may be a struct-option (voption) — see issue dotnet/fsharp#19711 — so we leave the + // type as a fresh inference variable and let later unification (CalleeSide branch in + // AdjustCalledArgTypeForOptionals) pick option<_> or voption<_>. + let ty = + if isOpt && not supportsValueOptionalArgs then + mkOptionTy denv.g ty + else + ty nm, isOpt, x, ty, x.Range) (Some (unnamedCurriedCallerArgs, namedCurriedCallerArgs), None, exprTy) diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MemberDefinitions/OptionalArguments/OptionalArguments.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MemberDefinitions/OptionalArguments/OptionalArguments.fs index 48b27ecb666..0af170a336a 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MemberDefinitions/OptionalArguments/OptionalArguments.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MemberDefinitions/OptionalArguments/OptionalArguments.fs @@ -634,4 +634,81 @@ let main _args = |> ILVerifierModule.verifyPEFileWithSystemDlls |> run |> verifyOutputContains [|"main;18;hello;42;"|] - \ No newline at end of file + + // Regression test for https://github.com/dotnet/fsharp/issues/19711 + // `?name = expr` (explicit caller-side question-mark syntax) must accept a + // ValueOption when the declared parameter is `[] ?name`. + [] + let ``ValueOption optional parameters can be passed using ?param syntax on methods`` () = + FSharp """ +module Program +type OptionalArguments() = + member _.NoProblem (?number : int32) = + match number with + | Some v -> printfn "RSome %d" v + | None -> printfn "RNone" + member _.Problem ([] ?number : int32) = + match number with + | ValueSome v -> printfn "VSome %d" v + | ValueNone -> printfn "VNone" + +[] +let main _ = + let o = OptionalArguments() + o.NoProblem 123 + o.NoProblem (number = 123) + o.NoProblem (?number = None) + o.NoProblem (?number = Some 123) + o.NoProblem (?number = Unchecked.defaultof<_>) + o.Problem 123 + o.Problem (number = 123) + o.Problem (?number = ValueNone) + o.Problem (?number = ValueSome 123) + o.Problem (?number = Unchecked.defaultof<_>) + 0 + """ + |> asExe + |> withOptions ["--nowarn:988"] + |> compileAndRun + |> shouldSucceed + |> withOutputContainsAllInOrder [ + "RSome 123"; "RSome 123"; "RNone"; "RSome 123"; "RNone" + "VSome 123"; "VSome 123"; "VNone"; "VSome 123"; "VNone" + ] + + [] + let ``ValueOption optional parameters can be passed using ?param syntax on constructors`` () = + FSharp """ +module Program +type X<'T>([] ?x : 'T) = + member _.M() = + match x with + | ValueSome v -> printfn "VSome %A" v + | ValueNone -> printfn "VNone" + +[] +let main _ = + X(?x = ValueSome 1).M() + X(?x = ValueNone).M() + X(?x = Unchecked.defaultof<_>).M() + 0 + """ + |> asExe + |> withOptions ["--nowarn:988"] + |> compileAndRun + |> shouldSucceed + |> withOutputContainsAllInOrder ["VSome 1"; "VNone"; "VNone"] + + [] + let ``ValueOption optional parameters via ?param syntax fail with langversion 9`` () = + FSharp """ +module Program +type X() = + static member M ([] ?x : int) = () + +X.M(?x = ValueSome 1) + """ + |> withLangVersion90 + |> typecheck + |> shouldFail + |> withDiagnosticMessageMatches "voption" From fc0e130dfa9cc62b2d1f77a0d44a73bb09dfff2a Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Thu, 28 May 2026 16:29:27 +0200 Subject: [PATCH 23/72] Disable noop issue reporting for labelops-pr-maintenance workflow (#19842) * Initial plan * Disable noop issue reporting for labelops-pr-maintenance workflow Co-authored-by: T-Gro <46543583+T-Gro@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: T-Gro <46543583+T-Gro@users.noreply.github.com> Co-authored-by: Tomas Grosup --- .../labelops-pr-maintenance.lock.yml | 36 +++++++++---------- .github/workflows/labelops-pr-maintenance.md | 2 ++ 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/.github/workflows/labelops-pr-maintenance.lock.yml b/.github/workflows/labelops-pr-maintenance.lock.yml index 597daed2681..2060716dfbe 100644 --- a/.github/workflows/labelops-pr-maintenance.lock.yml +++ b/.github/workflows/labelops-pr-maintenance.lock.yml @@ -1,4 +1,4 @@ -# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"6ea17bdbe818e2f36b27d8a7d5320b7f9ce64f2f959116b09bb01401bece519a","compiler_version":"v0.76.1","strict":true,"agent_id":"copilot"} +# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"83b520aa773fc9f01920df086cebab5bcb871ad5305f4e1ab60d4abd717f06a8","compiler_version":"v0.76.1","strict":true,"agent_id":"copilot"} # gh-aw-manifest: {"version":1,"secrets":["COPILOT_GITHUB_TOKEN","GH_AW_CI_TRIGGER_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/checkout","sha":"de0fac2e4500dabe0009e67214ff5f5447ce83dd","version":"v6.0.2"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/setup-node","sha":"48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e","version":"v6.4.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"},{"repo":"github/gh-aw-actions/setup","sha":"46d564922b082d0db93244972e8005ea6904ee5f","version":"v0.76.1"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.25.55"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.55"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.25.55"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.3.19"},{"image":"ghcr.io/github/github-mcp-server:v1.0.4","digest":"sha256:e3816a476a977cfb836e7d221510011436c654d11861db66ecfd826601aba6a4","pinned_image":"ghcr.io/github/github-mcp-server:v1.0.4@sha256:e3816a476a977cfb836e7d221510011436c654d11861db66ecfd826601aba6a4"},{"image":"node:lts-alpine","digest":"sha256:2bdb65ed1dab192432bc31c95f94155ca5ad7fc1392fb7eb7526ab682fa5bf14","pinned_image":"node:lts-alpine@sha256:2bdb65ed1dab192432bc31c95f94155ca5ad7fc1392fb7eb7526ab682fa5bf14"}]} # ___ _ _ # / _ \ | | (_) @@ -194,23 +194,23 @@ jobs: run: | bash "${RUNNER_TEMP}/gh-aw/actions/create_prompt_first.sh" { - cat << 'GH_AW_PROMPT_07e3048c790c30e0_EOF' + cat << 'GH_AW_PROMPT_261bbf6ab0a2459a_EOF' - GH_AW_PROMPT_07e3048c790c30e0_EOF + GH_AW_PROMPT_261bbf6ab0a2459a_EOF cat "${RUNNER_TEMP}/gh-aw/prompts/xpia.md" cat "${RUNNER_TEMP}/gh-aw/prompts/temp_folder_prompt.md" cat "${RUNNER_TEMP}/gh-aw/prompts/markdown.md" cat "${RUNNER_TEMP}/gh-aw/prompts/safe_outputs_prompt.md" - cat << 'GH_AW_PROMPT_07e3048c790c30e0_EOF' + cat << 'GH_AW_PROMPT_261bbf6ab0a2459a_EOF' Tools: add_comment(max:5), add_labels(max:3), push_to_pull_request_branch(max:5), dispatch_workflow(max:3), missing_tool, missing_data, noop - GH_AW_PROMPT_07e3048c790c30e0_EOF + GH_AW_PROMPT_261bbf6ab0a2459a_EOF cat "${RUNNER_TEMP}/gh-aw/prompts/safe_outputs_push_to_pr_branch.md" - cat << 'GH_AW_PROMPT_07e3048c790c30e0_EOF' + cat << 'GH_AW_PROMPT_261bbf6ab0a2459a_EOF' - GH_AW_PROMPT_07e3048c790c30e0_EOF + GH_AW_PROMPT_261bbf6ab0a2459a_EOF cat "${RUNNER_TEMP}/gh-aw/prompts/mcp_cli_tools_prompt.md" - cat << 'GH_AW_PROMPT_07e3048c790c30e0_EOF' + cat << 'GH_AW_PROMPT_261bbf6ab0a2459a_EOF' The following GitHub context information is available for this workflow: {{#if github.actor}} @@ -242,12 +242,12 @@ jobs: - **Note**: If a branch you need is not in the list above and is not listed as an additional fetched ref, it has NOT been checked out. For private repositories you cannot fetch it without proper authentication. If the branch is required and not available, exit with an error and ask the user to add it to the `fetch:` option of the `checkout:` configuration (e.g., `fetch: ["refs/pulls/open/*"]` for all open PR refs, or `fetch: ["main", "feature/my-branch"]` for specific branches). - GH_AW_PROMPT_07e3048c790c30e0_EOF + GH_AW_PROMPT_261bbf6ab0a2459a_EOF cat "${RUNNER_TEMP}/gh-aw/prompts/github_mcp_tools_with_safeoutputs_prompt.md" - cat << 'GH_AW_PROMPT_07e3048c790c30e0_EOF' + cat << 'GH_AW_PROMPT_261bbf6ab0a2459a_EOF' {{#runtime-import .github/workflows/labelops-pr-maintenance.md}} - GH_AW_PROMPT_07e3048c790c30e0_EOF + GH_AW_PROMPT_261bbf6ab0a2459a_EOF } > "$GH_AW_PROMPT" - name: Interpolate variables and render templates uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 @@ -458,9 +458,9 @@ jobs: mkdir -p "${RUNNER_TEMP}/gh-aw/safeoutputs" mkdir -p /tmp/gh-aw/safeoutputs mkdir -p /tmp/gh-aw/mcp-logs/safeoutputs - cat > "${RUNNER_TEMP}/gh-aw/safeoutputs/config.json" << 'GH_AW_SAFE_OUTPUTS_CONFIG_c6b7969aed14cd3a_EOF' - {"add_comment":{"hide_older_comments":true,"max":5,"target":"*"},"add_labels":{"allowed":["AI-needs-CI-fix-input"],"max":3,"target":"*"},"create_report_incomplete_issue":{},"dispatch_workflow":{"aw_context_workflows":["labelops-flake-fix"],"max":3,"workflow_files":{"labelops-flake-fix":".lock.yml"},"workflows":["labelops-flake-fix"]},"missing_data":{},"missing_tool":{},"noop":{"max":1,"report-as-issue":"true"},"push_to_pull_request_branch":{"if_no_changes":"warn","max":5,"max_patch_size":10240,"protect_top_level_dot_folders":true,"protected_files":["package.json","bun.lockb","bunfig.toml","deno.json","deno.jsonc","deno.lock","global.json","NuGet.Config","Directory.Packages.props","mix.exs","mix.lock","go.mod","go.sum","stack.yaml","stack.yaml.lock","pom.xml","build.gradle","build.gradle.kts","settings.gradle","settings.gradle.kts","gradle.properties","package-lock.json","yarn.lock","pnpm-lock.yaml","npm-shrinkwrap.json","requirements.txt","Pipfile","Pipfile.lock","pyproject.toml","setup.py","setup.cfg","Gemfile","Gemfile.lock","uv.lock","CODEOWNERS","DESIGN.md","README.md","CONTRIBUTING.md","CHANGELOG.md","SECURITY.md","CODE_OF_CONDUCT.md","AGENTS.md","CLAUDE.md","GEMINI.md"],"protected_files_policy":"allowed","target":"*"},"report_incomplete":{}} - GH_AW_SAFE_OUTPUTS_CONFIG_c6b7969aed14cd3a_EOF + cat > "${RUNNER_TEMP}/gh-aw/safeoutputs/config.json" << 'GH_AW_SAFE_OUTPUTS_CONFIG_2f6b5b7421bc180e_EOF' + {"add_comment":{"hide_older_comments":true,"max":5,"target":"*"},"add_labels":{"allowed":["AI-needs-CI-fix-input"],"max":3,"target":"*"},"create_report_incomplete_issue":{},"dispatch_workflow":{"aw_context_workflows":["labelops-flake-fix"],"max":3,"workflow_files":{"labelops-flake-fix":".lock.yml"},"workflows":["labelops-flake-fix"]},"missing_data":{},"missing_tool":{},"noop":{"max":1,"report-as-issue":"false"},"push_to_pull_request_branch":{"if_no_changes":"warn","max":5,"max_patch_size":10240,"protect_top_level_dot_folders":true,"protected_files":["package.json","bun.lockb","bunfig.toml","deno.json","deno.jsonc","deno.lock","global.json","NuGet.Config","Directory.Packages.props","mix.exs","mix.lock","go.mod","go.sum","stack.yaml","stack.yaml.lock","pom.xml","build.gradle","build.gradle.kts","settings.gradle","settings.gradle.kts","gradle.properties","package-lock.json","yarn.lock","pnpm-lock.yaml","npm-shrinkwrap.json","requirements.txt","Pipfile","Pipfile.lock","pyproject.toml","setup.py","setup.cfg","Gemfile","Gemfile.lock","uv.lock","CODEOWNERS","DESIGN.md","README.md","CONTRIBUTING.md","CHANGELOG.md","SECURITY.md","CODE_OF_CONDUCT.md","AGENTS.md","CLAUDE.md","GEMINI.md"],"protected_files_policy":"allowed","target":"*"},"report_incomplete":{}} + GH_AW_SAFE_OUTPUTS_CONFIG_2f6b5b7421bc180e_EOF - name: Generate Safe Outputs Tools env: GH_AW_TOOLS_META_JSON: | @@ -727,7 +727,7 @@ jobs: mkdir -p /home/runner/.copilot GH_AW_NODE=$(which node 2>/dev/null || command -v node 2>/dev/null || echo node) - cat << GH_AW_MCP_CONFIG_884f45a80f2a372a_EOF | "$GH_AW_NODE" "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.cjs" + cat << GH_AW_MCP_CONFIG_6d82f34cc0b197e9_EOF | "$GH_AW_NODE" "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.cjs" { "mcpServers": { "github": { @@ -771,7 +771,7 @@ jobs: "payloadDir": "${MCP_GATEWAY_PAYLOAD_DIR}" } } - GH_AW_MCP_CONFIG_884f45a80f2a372a_EOF + GH_AW_MCP_CONFIG_6d82f34cc0b197e9_EOF - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true @@ -1064,7 +1064,7 @@ jobs: GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/labelops-pr-maintenance.md" GH_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} GH_AW_AGENT_CONCLUSION: ${{ needs.agent.result }} - GH_AW_NOOP_REPORT_AS_ISSUE: "true" + GH_AW_NOOP_REPORT_AS_ISSUE: "false" with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} script: | @@ -1503,7 +1503,7 @@ jobs: GH_AW_ALLOWED_DOMAINS: "*.vsblob.vsassets.io,api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.nuget.org,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,azuresearch-usnc.nuget.org,azuresearch-ussc.nuget.org,builds.dotnet.microsoft.com,ci.dot.net,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,dc.services.visualstudio.com,dev.azure.com,dist.nuget.org,dot.net,dotnet.microsoft.com,dotnetcli.blob.core.windows.net,github.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,nuget.org,nuget.pkg.github.com,nugetregistryv2prod.blob.core.windows.net,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,oneocsp.microsoft.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,pkgs.dev.azure.com,ppa.launchpad.net,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com,www.googleapis.com,www.microsoft.com" GITHUB_SERVER_URL: ${{ github.server_url }} GITHUB_API_URL: ${{ github.api_url }} - GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"add_comment\":{\"hide_older_comments\":true,\"max\":5,\"target\":\"*\"},\"add_labels\":{\"allowed\":[\"AI-needs-CI-fix-input\"],\"max\":3,\"target\":\"*\"},\"create_report_incomplete_issue\":{},\"dispatch_workflow\":{\"aw_context_workflows\":[\"labelops-flake-fix\"],\"max\":3,\"workflow_files\":{\"labelops-flake-fix\":\".lock.yml\"},\"workflows\":[\"labelops-flake-fix\"]},\"missing_data\":{},\"missing_tool\":{},\"noop\":{\"max\":1,\"report-as-issue\":\"true\"},\"push_to_pull_request_branch\":{\"if_no_changes\":\"warn\",\"max\":5,\"max_patch_size\":10240,\"protect_top_level_dot_folders\":true,\"protected_files\":[\"package.json\",\"bun.lockb\",\"bunfig.toml\",\"deno.json\",\"deno.jsonc\",\"deno.lock\",\"global.json\",\"NuGet.Config\",\"Directory.Packages.props\",\"mix.exs\",\"mix.lock\",\"go.mod\",\"go.sum\",\"stack.yaml\",\"stack.yaml.lock\",\"pom.xml\",\"build.gradle\",\"build.gradle.kts\",\"settings.gradle\",\"settings.gradle.kts\",\"gradle.properties\",\"package-lock.json\",\"yarn.lock\",\"pnpm-lock.yaml\",\"npm-shrinkwrap.json\",\"requirements.txt\",\"Pipfile\",\"Pipfile.lock\",\"pyproject.toml\",\"setup.py\",\"setup.cfg\",\"Gemfile\",\"Gemfile.lock\",\"uv.lock\",\"CODEOWNERS\",\"DESIGN.md\",\"README.md\",\"CONTRIBUTING.md\",\"CHANGELOG.md\",\"SECURITY.md\",\"CODE_OF_CONDUCT.md\",\"AGENTS.md\",\"CLAUDE.md\",\"GEMINI.md\"],\"protected_files_policy\":\"allowed\",\"target\":\"*\"},\"report_incomplete\":{}}" + GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"add_comment\":{\"hide_older_comments\":true,\"max\":5,\"target\":\"*\"},\"add_labels\":{\"allowed\":[\"AI-needs-CI-fix-input\"],\"max\":3,\"target\":\"*\"},\"create_report_incomplete_issue\":{},\"dispatch_workflow\":{\"aw_context_workflows\":[\"labelops-flake-fix\"],\"max\":3,\"workflow_files\":{\"labelops-flake-fix\":\".lock.yml\"},\"workflows\":[\"labelops-flake-fix\"]},\"missing_data\":{},\"missing_tool\":{},\"noop\":{\"max\":1,\"report-as-issue\":\"false\"},\"push_to_pull_request_branch\":{\"if_no_changes\":\"warn\",\"max\":5,\"max_patch_size\":10240,\"protect_top_level_dot_folders\":true,\"protected_files\":[\"package.json\",\"bun.lockb\",\"bunfig.toml\",\"deno.json\",\"deno.jsonc\",\"deno.lock\",\"global.json\",\"NuGet.Config\",\"Directory.Packages.props\",\"mix.exs\",\"mix.lock\",\"go.mod\",\"go.sum\",\"stack.yaml\",\"stack.yaml.lock\",\"pom.xml\",\"build.gradle\",\"build.gradle.kts\",\"settings.gradle\",\"settings.gradle.kts\",\"gradle.properties\",\"package-lock.json\",\"yarn.lock\",\"pnpm-lock.yaml\",\"npm-shrinkwrap.json\",\"requirements.txt\",\"Pipfile\",\"Pipfile.lock\",\"pyproject.toml\",\"setup.py\",\"setup.cfg\",\"Gemfile\",\"Gemfile.lock\",\"uv.lock\",\"CODEOWNERS\",\"DESIGN.md\",\"README.md\",\"CONTRIBUTING.md\",\"CHANGELOG.md\",\"SECURITY.md\",\"CODE_OF_CONDUCT.md\",\"AGENTS.md\",\"CLAUDE.md\",\"GEMINI.md\"],\"protected_files_policy\":\"allowed\",\"target\":\"*\"},\"report_incomplete\":{}}" GH_AW_CI_TRIGGER_TOKEN: ${{ secrets.GH_AW_CI_TRIGGER_TOKEN }} with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/labelops-pr-maintenance.md b/.github/workflows/labelops-pr-maintenance.md index e817cdc1222..c5fed47a541 100644 --- a/.github/workflows/labelops-pr-maintenance.md +++ b/.github/workflows/labelops-pr-maintenance.md @@ -36,6 +36,8 @@ tools: bash: true safe-outputs: + noop: + report-as-issue: false max-patch-size: 10240 add-comment: max: 5 From 3aa584ac8200677c6f2702a59bed61ab950a1c01 Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Thu, 28 May 2026 16:39:56 +0200 Subject: [PATCH 24/72] Fix delegate Invoke semantic classification (in the IDE)(#19813) --- .../Service/SemanticClassification.fs | 13 +++- .../SemanticClassificationRegressions.fs | 64 +++++++++++++++++++ 2 files changed, 76 insertions(+), 1 deletion(-) diff --git a/src/Compiler/Service/SemanticClassification.fs b/src/Compiler/Service/SemanticClassification.fs index 8fe61e20ddb..066ec2fb41a 100644 --- a/src/Compiler/Service/SemanticClassification.fs +++ b/src/Compiler/Service/SemanticClassification.fs @@ -292,7 +292,18 @@ module TcResolutionsExtensions = match minfos with | [] -> add m SemanticClassificationType.Method | _ -> - if + let isSynthesizedDelegateMemberInDecl = + minfos + |> List.forall (fun minfo -> + let name = minfo.LogicalName + + (name = "Invoke" || name = "BeginInvoke" || name = "EndInvoke") + && minfo.ApparentEnclosingTyconRef.IsFSharpDelegateTycon + && rangeContainsRange minfo.ApparentEnclosingTyconRef.Range m) + + if isSynthesizedDelegateMemberInDecl then + () + elif minfos |> List.forall (fun minfo -> minfo.IsExtensionMember || minfo.IsCSharpStyleExtensionMember) then diff --git a/tests/FSharp.Compiler.ComponentTests/FSharpChecker/SemanticClassificationRegressions.fs b/tests/FSharp.Compiler.ComponentTests/FSharpChecker/SemanticClassificationRegressions.fs index 8af90a38e5d..04093eea56a 100644 --- a/tests/FSharp.Compiler.ComponentTests/FSharpChecker/SemanticClassificationRegressions.fs +++ b/tests/FSharp.Compiler.ComponentTests/FSharpChecker/SemanticClassificationRegressions.fs @@ -16,6 +16,12 @@ let getClassifications (source: string) = let checkResults = getTypeCheckResult results checkResults.GetSemanticClassification(None, RelatedSymbolUseKind.All) +/// Extract the source substring covered by a classification item's range (single-line ranges). +let private substringOfRange (source: string) (r: Range) = + let lines = source.Replace("\r\n", "\n").Split('\n') + let line = lines[r.StartLine - 1] + line.Substring(r.StartColumn, r.EndColumn - r.StartColumn) + /// (#15290 regression) Copy-and-update record fields must not be classified as type names. /// Before the fix, Item.Types was registered with mWholeExpr and ItemOccurrence.Use, producing /// a wide type classification that overshadowed the correct RecordField classification. @@ -136,3 +142,61 @@ type Animal = (7, 2, 8) // s.IsCircle && s.IsSquare — two on same line (12, 1, 7) // t.IsIdent — RequireQualifiedAccess (17, 1, 5) ] // this.IsCat — self-referential member + +/// (#16982) Delegate `Invoke` synthesized in a delegate declaration must not be classified as Method. +[] +let ``Delegate Invoke in declaration not classified as method`` () = + let source = """ +type MyDelegate = delegate of int -> string +""" + let classifications = getClassifications source + let invokeMethods = + classifications + |> Array.filter (fun c -> + c.Type = SemanticClassificationType.Method + && substringOfRange source c.Range = "Invoke") + Assert.Empty(invokeMethods) + +/// (#16982) Negative: at a real call site, `Invoke` must still classify as Method. +[] +let ``Delegate Invoke at call site classified as method`` () = + let source = """ +type MyDelegate = delegate of int -> string +let d = MyDelegate(fun i -> string i) +let result = d.Invoke(42) +""" + let classifications = getClassifications source + let invokeCallSite = + classifications + |> Array.filter (fun c -> + c.Type = SemanticClassificationType.Method && c.Range.StartLine = 4) + Assert.NotEmpty(invokeCallSite) + +/// (#16982) Generic delegate variant. +[] +let ``Generic delegate Invoke not classified as method in decl`` () = + let source = """ +type MyGenDelegate<'T> = delegate of 'T -> 'T +""" + let classifications = getClassifications source + let invokeMethods = + classifications + |> Array.filter (fun c -> + c.Type = SemanticClassificationType.Method + && substringOfRange source c.Range = "Invoke") + Assert.Empty(invokeMethods) + +/// (#16982) The synthesized async-pattern members `BeginInvoke`/`EndInvoke` must also be suppressed in the declaration. +[] +let ``BeginInvoke EndInvoke also not classified in decl`` () = + let source = """ +type MyDelegate = delegate of int -> string +""" + let classifications = getClassifications source + let asyncInvokeMethods = + classifications + |> Array.filter (fun c -> + c.Type = SemanticClassificationType.Method + && (let text = substringOfRange source c.Range + text = "BeginInvoke" || text = "EndInvoke")) + Assert.Empty(asyncInvokeMethods) From 2d7b9e8930f07981c5d4151540ee992b340a8e4e Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Thu, 28 May 2026 16:44:56 +0200 Subject: [PATCH 25/72] Fix #19657: MeasureAnnotatedAbbreviation over ref type + | null (#19775) * Add failing TDD tests for #19657: MeasureAnnotatedAbbreviation over reference type with | null Add four tests in NullableReferenceTypesTests.fs covering: - MeasureAnnotatedAbbreviation over string accepts | null in let bindings, parameters, returns, type abbreviations, and inline instantiations (fails today). - MeasureAnnotatedAbbreviation over user-defined reference class accepts | null (fails today). - MeasureAnnotatedAbbreviation over value types still rejects | null (non-regression, passes today). - Nullness flow and not-null constraints work through the abbreviation (fails today; compilation does not reach the flow assertions). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix #19657: strip measure equations in SolveTypeIsReferenceType MeasureAnnotatedAbbreviation tycons over a reference type (e.g. UMX-style `type string<[] 'm> = string`) previously failed the reference-type constraint check used by the `| null` syntax, producing FS0043. The surface type is a TType_app over a MeasureableReprTycon, which isRefTy does not recognise. Strip measure equations before testing reference semantics so the underlying erased representation is consulted, consistent with TypeNullNever and IsReferenceTyparTy. Value-type erasure still correctly fails FS0043. Also corrects a Sprint 1 test expectation that listed a phantom diagnostic which the compiler does not emit (the matched-on null case is fully covered). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Release notes for #19657 MeasureAnnotatedAbbreviation + | null fix Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Address review findings: rename strippedTy, add edge-case tests - Rename strippedTy -> underlyingTy for consistency with SolveTypeIsNonNullableValueType - Condense comment to single line - Add test: not-struct constraint satisfied by MeasureAnnotatedAbbreviation - Add test: MAA over obj, interface, and chained abbreviation Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../.FSharp.Compiler.Service/11.0.100.md | 1 + src/Compiler/Checking/ConstraintSolver.fs | 4 +- .../Nullness/NullableReferenceTypesTests.fs | 140 ++++++++++++++++++ 3 files changed, 144 insertions(+), 1 deletion(-) diff --git a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md index bf4e0a957b5..c18e1d8f213 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md +++ b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md @@ -59,6 +59,7 @@ * Fix parallel compilation of scripts ([PR #19649](https://github.com/dotnet/fsharp/pull/19649)) * Fix parser recovery, name resolution, and code completion for unfinished enum patterns ([PR #19708](https://github.com/dotnet/fsharp/pull/19708)) * Parser: fix unexpected diagnostics in debug builds, improve error messages ([PR #19730](https://github.com/dotnet/fsharp/pull/19730)) +* Allow `| null` nullable annotation on a `[]` over a reference type (e.g. the FSharp.UMX `type string<[] 'm> = string` pattern). ([Issue #19657](https://github.com/dotnet/fsharp/issues/19657)) * Fix `[] ?param` optional parameters could not be passed using the explicit `?param = expr` caller-side syntax with a `ValueOption` value. ([Issue #19711](https://github.com/dotnet/fsharp/issues/19711), [PR #19742](https://github.com/dotnet/fsharp/pull/19742)) * Fix signature conformance: overloaded member with unit parameter `M(())` now matches sig `member M: unit -> unit`. ([Issue #19596](https://github.com/dotnet/fsharp/issues/19596), [PR #19615](https://github.com/dotnet/fsharp/pull/19615)) * Parser: recover on unfinished if and binary expressions diff --git a/src/Compiler/Checking/ConstraintSolver.fs b/src/Compiler/Checking/ConstraintSolver.fs index 8a567e0ecef..b739cede2de 100644 --- a/src/Compiler/Checking/ConstraintSolver.fs +++ b/src/Compiler/Checking/ConstraintSolver.fs @@ -2990,7 +2990,9 @@ and SolveTypeIsReferenceType (csenv: ConstraintSolverEnv) ndeep m2 trace ty = | ValueSome destTypar -> AddConstraint csenv ndeep m2 trace destTypar (TyparConstraint.IsReferenceType m) | _ -> - if isRefTy g ty then CompleteD + // Strip measure equations so we test the underlying erased representation — see dotnet/fsharp#19657. + let underlyingTy = stripTyEqnsAndMeasureEqns g ty + if isRefTy g underlyingTy then CompleteD else ErrorD (ConstraintSolverError(FSComp.SR.csGenericConstructRequiresReferenceSemantics(NicePrint.minimalStringOfType denv ty), m, m)) and SolveTypeRequiresDefaultConstructor (csenv: ConstraintSolverEnv) ndeep m2 trace origTy = diff --git a/tests/FSharp.Compiler.ComponentTests/Language/Nullness/NullableReferenceTypesTests.fs b/tests/FSharp.Compiler.ComponentTests/Language/Nullness/NullableReferenceTypesTests.fs index c36c51b3a15..c45d73553e2 100644 --- a/tests/FSharp.Compiler.ComponentTests/Language/Nullness/NullableReferenceTypesTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/Language/Nullness/NullableReferenceTypesTests.fs @@ -2065,6 +2065,146 @@ let processMyStr (x:mystring) = Error 3261, Line 12, Col 27, Line 12, Col 39, "Nullness warning: A non-nullable 'string' was expected but this expression is nullable. Consider either changing the target to also be nullable, or use pattern matching to safely handle the null case of this expression." ] +[] +let ``MeasureAnnotatedAbbreviation over string allows nullable annotation in all positions`` () = + FSharp """module MyLibrary + +[] +type string<[] 'm> = string + +[] type test +type TestType = string + +let x: (TestType | null) = Unchecked.defaultof + +let consume (s: TestType | null) = () + +let produce () : TestType | null = null + +type NullableTestType = TestType | null + +let y: (string | null) = null +""" + |> asLibrary + |> typeCheckWithStrictNullness + |> shouldSucceed + +[] +let ``MeasureAnnotatedAbbreviation over user reference type allows nullable annotation`` () = + FSharp """module MyLibrary + +type MyRef() = member _.Hello = "hi" + +[] +type MyRef<[] 'm> = MyRef + +[] type tag +type Tagged = MyRef + +let f (x: Tagged | null) : Tagged | null = x +let g : Tagged | null = null +""" + |> asLibrary + |> typeCheckWithStrictNullness + |> shouldSucceed + +[] +let ``MeasureAnnotatedAbbreviation over value type rejects nullable annotation`` () = + FSharp """module MyLibrary + +[] +type int<[] 'm> = int + +[] +type DateTime<[] 'm> = System.DateTime + +[] type kg +[] type s + +let bad1 : (int | null) = null +let bad2 : (DateTime | null) = null +""" + |> asLibrary + |> typeCheckWithStrictNullness + |> shouldFail + |> withDiagnostics [ + Error 3260, Line 12, Col 13, Line 12, Col 27, "The type 'int' does not support a nullness qualification." + Error 43, Line 12, Col 13, Line 12, Col 27, "A generic construct requires that the type 'int' have reference semantics, but it does not, i.e. it is a struct" + Error 3260, Line 13, Col 13, Line 13, Col 31, "The type 'DateTime' does not support a nullness qualification." + Error 43, Line 13, Col 13, Line 13, Col 31, "A generic construct requires that the type 'DateTime' have reference semantics, but it does not, i.e. it is a struct" + ] + +[] +let ``Nullness flow and not-null constraints work with MeasureAnnotatedAbbreviation over string`` () = + FSharp """module MyLibrary + +[] +type string<[] 'm> = string + +[] type tag +type S = string + +let onlyNotNull (s: S) = () + +let widen (x: S) : S | null = x + +let narrowBad (x: S | null) : S = x + +let matched (x: S | null) = + match x with + | null -> () + | nn -> onlyNotNull nn +""" + |> asLibrary + |> typeCheckWithStrictNullness + |> shouldFail + |> withDiagnostics [ + Error 3261, Line 13, Col 35, Line 13, Col 36, "Nullness warning: A non-nullable 'S' was expected but this expression is nullable. Consider either changing the target to also be nullable, or use pattern matching to safely handle the null case of this expression." + ] + +[] +let ``MeasureAnnotatedAbbreviation satisfies not-struct constraint`` () = + FSharp """module MyLibrary + +[] +type string<[] 'm> = string + +[] type tag +type S = string + +let needsRef<'T when 'T : not struct> (x: 'T) = () +let callIt (s: S) = needsRef s +let callNullable (s: S | null) = needsRef s +""" + |> asLibrary + |> typeCheckWithStrictNullness + |> shouldSucceed + +[] +let ``MeasureAnnotatedAbbreviation over obj, interface, and chained abbreviation allows nullable`` () = + FSharp """module MyLibrary + +[] +type obj<[] 'm> = obj + +[] +type IDisposable<[] 'm> = System.IDisposable + +[] +type string<[] 'm> = string + +type chainedString<[] 'm> = string<'m> + +[] type tag + +let a : obj | null = null +let b : IDisposable | null = null +let c : chainedString | null = null +""" + |> asLibrary + |> typeCheckWithStrictNullness + |> shouldSucceed + [] let ``ToString on reference type still returns nullable string`` () = FSharp """module MyLibrary From ccaa44a45bd5e64b07849c4df6d778f547f6b96d Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Thu, 28 May 2026 18:10:17 +0200 Subject: [PATCH 26/72] Make aw-auto-update detection-only and delegate workflow PRs to Copilot Coding Agent (#19840) * Initial plan * Fix aw-auto-update: add allow-workflows and github-app for workflow file push The workflow was failing with "refusing to allow a GitHub App to create or update workflow without workflows permission" because pushing .github/workflows/ files requires the workflows:write permission. Fix by adding: - allow-workflows: true to create-pull-request and push-to-pull-request-branch - github-app config (client-id/private-key) required for workflows permission - Fixed deprecated labels/title-prefix in push-to-pull-request-branch Co-authored-by: T-Gro <46543583+T-Gro@users.noreply.github.com> * Replace push-to-workflow flow with create-agent-session delegation The previous attempt added a GitHub App with new required secrets to bypass GitHub's rule that GITHUB_TOKEN cannot push under .github/workflows/. The repo has no GH App and no plan to provision one. Make aw-auto-update detection-only: its safe outputs are restricted to noop (the normal steady state) and create-agent-session. When an upgrade is detected, the workflow delegates the actual upgrade + recompile + PR work to a Copilot Coding Agent session authenticated via COPILOT_GITHUB_TOKEN, which already exists in the repo and can write workflow files under its own identity. No new secrets, no GitHub App, no allow-workflows. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Remove explicit github-token from create-agent-session Creating the agent task is an API-only call from the safe-outputs runner; the runner does not touch workflow files (that happens later in the spawned CCA session, under CCA's own identity). Default GITHUB_TOKEN with issues:write should handle it. If gh agent-task create needs more later, we'll add it then. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: T-Gro <46543583+T-Gro@users.noreply.github.com> Co-authored-by: Tomas Grosup Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot --- .github/workflows/aw-auto-update.lock.yml | 284 +++++----------------- .github/workflows/aw-auto-update.md | 168 +++++++++---- 2 files changed, 173 insertions(+), 279 deletions(-) diff --git a/.github/workflows/aw-auto-update.lock.yml b/.github/workflows/aw-auto-update.lock.yml index 02270e9bf8e..f2d2c99daff 100644 --- a/.github/workflows/aw-auto-update.lock.yml +++ b/.github/workflows/aw-auto-update.lock.yml @@ -1,5 +1,5 @@ -# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"82a4e9e173f3461905c0653e89f22cc1f304534d6129de16180c1d511ad243d3","compiler_version":"v0.76.1","strict":true,"agent_id":"copilot"} -# gh-aw-manifest: {"version":1,"secrets":["APP_PRIVATE_KEY","COPILOT_GITHUB_TOKEN","GH_AW_CI_TRIGGER_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/checkout","sha":"de0fac2e4500dabe0009e67214ff5f5447ce83dd","version":"v6.0.2"},{"repo":"actions/create-github-app-token","sha":"bcd2ba49218906704ab6c1aa796996da409d3eb1","version":"v3.2.0"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/setup-node","sha":"48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e","version":"v6.4.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"},{"repo":"github/gh-aw-actions/setup","sha":"46d564922b082d0db93244972e8005ea6904ee5f","version":"v0.76.1"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.25.55"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.55"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.25.55"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.3.19"},{"image":"ghcr.io/github/github-mcp-server:v1.0.4","digest":"sha256:e3816a476a977cfb836e7d221510011436c654d11861db66ecfd826601aba6a4","pinned_image":"ghcr.io/github/github-mcp-server:v1.0.4@sha256:e3816a476a977cfb836e7d221510011436c654d11861db66ecfd826601aba6a4"},{"image":"node:lts-alpine","digest":"sha256:2bdb65ed1dab192432bc31c95f94155ca5ad7fc1392fb7eb7526ab682fa5bf14","pinned_image":"node:lts-alpine@sha256:2bdb65ed1dab192432bc31c95f94155ca5ad7fc1392fb7eb7526ab682fa5bf14"}]} +# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"5118fa2dff6dd5edefa10062845dd96d72a3031fb0d8b19a48dcfe5d25bbf718","compiler_version":"v0.76.1","strict":true,"agent_id":"copilot"} +# gh-aw-manifest: {"version":1,"secrets":["COPILOT_GITHUB_TOKEN","GH_AW_AGENT_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/checkout","sha":"de0fac2e4500dabe0009e67214ff5f5447ce83dd","version":"v6.0.2"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/setup-node","sha":"48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e","version":"v6.4.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"},{"repo":"github/gh-aw-actions/setup","sha":"46d564922b082d0db93244972e8005ea6904ee5f","version":"v0.76.1"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.25.55"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.55"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.25.55"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.3.19"},{"image":"ghcr.io/github/github-mcp-server:v1.0.4","digest":"sha256:e3816a476a977cfb836e7d221510011436c654d11861db66ecfd826601aba6a4","pinned_image":"ghcr.io/github/github-mcp-server:v1.0.4@sha256:e3816a476a977cfb836e7d221510011436c654d11861db66ecfd826601aba6a4"},{"image":"node:lts-alpine","digest":"sha256:2bdb65ed1dab192432bc31c95f94155ca5ad7fc1392fb7eb7526ab682fa5bf14","pinned_image":"node:lts-alpine@sha256:2bdb65ed1dab192432bc31c95f94155ca5ad7fc1392fb7eb7526ab682fa5bf14"}]} # ___ _ _ # / _ \ | | (_) # | |_| | __ _ ___ _ __ | |_ _ ___ @@ -22,20 +22,26 @@ # # For more information: https://github.github.com/gh-aw/introduction/overview/ # -# Keeps agentic workflows up to date by running `gh aw upgrade` and `gh aw compile` daily. -# If changes are detected, pushes them to a long-lived branch and creates or updates a PR. +# Detects whether the gh-aw infrastructure has pending updates. The detection +# run itself has zero write surface: its only outputs are `noop` (nothing to do — +# the normal steady state) or `create-agent-session` (delegate the actual +# upgrade + recompile + PR to a Copilot Coding Agent session). +# +# Rationale: `gh aw compile` writes to `.github/workflows/*.lock.yml`, but the +# default `GITHUB_TOKEN` cannot push under `.github/workflows/` (GitHub platform +# rule). Rather than provisioning a GitHub App or PAT, this workflow delegates +# the write work to a Copilot Coding Agent session, which runs under its own +# identity (COPILOT_GITHUB_TOKEN) and can write workflow files. # # Secrets used: -# - APP_PRIVATE_KEY # - COPILOT_GITHUB_TOKEN -# - GH_AW_CI_TRIGGER_TOKEN +# - GH_AW_AGENT_TOKEN # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN # - GITHUB_TOKEN # # Custom actions used: # - actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 -# - actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0 # - actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 # - actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 # - actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 @@ -50,7 +56,7 @@ # - ghcr.io/github/github-mcp-server:v1.0.4@sha256:e3816a476a977cfb836e7d221510011436c654d11861db66ecfd826601aba6a4 # - node:lts-alpine@sha256:2bdb65ed1dab192432bc31c95f94155ca5ad7fc1392fb7eb7526ab682fa5bf14 -name: "Agentic Workflow Auto-Update" +name: "Agentic Workflow Auto-Update — Detection" on: schedule: - cron: "52 */24 * * *" @@ -68,7 +74,7 @@ permissions: {} concurrency: group: "gh-aw-${{ github.workflow }}" -run-name: "Agentic Workflow Auto-Update" +run-name: "Agentic Workflow Auto-Update — Detection" jobs: activation: @@ -95,7 +101,7 @@ jobs: destination: ${{ runner.temp }}/gh-aw/actions job-name: ${{ github.job }} env: - GH_AW_SETUP_WORKFLOW_NAME: "Agentic Workflow Auto-Update" + GH_AW_SETUP_WORKFLOW_NAME: "Agentic Workflow Auto-Update — Detection" GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/aw-auto-update.lock.yml@${{ github.ref }} GH_AW_INFO_VERSION: "1.0.52" GH_AW_INFO_AWF_VERSION: "v0.25.55" @@ -109,7 +115,7 @@ jobs: GH_AW_INFO_VERSION: "1.0.52" GH_AW_INFO_AGENT_VERSION: "1.0.52" GH_AW_INFO_CLI_VERSION: "v0.76.1" - GH_AW_INFO_WORKFLOW_NAME: "Agentic Workflow Auto-Update" + GH_AW_INFO_WORKFLOW_NAME: "Agentic Workflow Auto-Update — Detection" GH_AW_INFO_EXPERIMENTAL: "false" GH_AW_INFO_SUPPORTS_TOOLS_ALLOWLIST: "true" GH_AW_INFO_STAGED: "false" @@ -191,24 +197,20 @@ jobs: run: | bash "${RUNNER_TEMP}/gh-aw/actions/create_prompt_first.sh" { - cat << 'GH_AW_PROMPT_8892d1e930c999ae_EOF' + cat << 'GH_AW_PROMPT_084889a3ffcd2e2f_EOF' - GH_AW_PROMPT_8892d1e930c999ae_EOF + GH_AW_PROMPT_084889a3ffcd2e2f_EOF cat "${RUNNER_TEMP}/gh-aw/prompts/xpia.md" cat "${RUNNER_TEMP}/gh-aw/prompts/temp_folder_prompt.md" cat "${RUNNER_TEMP}/gh-aw/prompts/markdown.md" cat "${RUNNER_TEMP}/gh-aw/prompts/safe_outputs_prompt.md" - cat << 'GH_AW_PROMPT_8892d1e930c999ae_EOF' + cat << 'GH_AW_PROMPT_084889a3ffcd2e2f_EOF' - Tools: create_pull_request, push_to_pull_request_branch, missing_tool, missing_data, noop - GH_AW_PROMPT_8892d1e930c999ae_EOF - cat "${RUNNER_TEMP}/gh-aw/prompts/safe_outputs_create_pull_request.md" - cat "${RUNNER_TEMP}/gh-aw/prompts/safe_outputs_push_to_pr_branch.md" - cat << 'GH_AW_PROMPT_8892d1e930c999ae_EOF' + Tools: create_agent_session, missing_tool, missing_data, noop - GH_AW_PROMPT_8892d1e930c999ae_EOF + GH_AW_PROMPT_084889a3ffcd2e2f_EOF cat "${RUNNER_TEMP}/gh-aw/prompts/mcp_cli_tools_prompt.md" - cat << 'GH_AW_PROMPT_8892d1e930c999ae_EOF' + cat << 'GH_AW_PROMPT_084889a3ffcd2e2f_EOF' The following GitHub context information is available for this workflow: {{#if github.actor}} @@ -240,12 +242,12 @@ jobs: - **Note**: If a branch you need is not in the list above and is not listed as an additional fetched ref, it has NOT been checked out. For private repositories you cannot fetch it without proper authentication. If the branch is required and not available, exit with an error and ask the user to add it to the `fetch:` option of the `checkout:` configuration (e.g., `fetch: ["refs/pulls/open/*"]` for all open PR refs, or `fetch: ["main", "feature/my-branch"]` for specific branches). - GH_AW_PROMPT_8892d1e930c999ae_EOF + GH_AW_PROMPT_084889a3ffcd2e2f_EOF cat "${RUNNER_TEMP}/gh-aw/prompts/github_mcp_tools_with_safeoutputs_prompt.md" - cat << 'GH_AW_PROMPT_8892d1e930c999ae_EOF' + cat << 'GH_AW_PROMPT_084889a3ffcd2e2f_EOF' {{#runtime-import .github/workflows/aw-auto-update.md}} - GH_AW_PROMPT_8892d1e930c999ae_EOF + GH_AW_PROMPT_084889a3ffcd2e2f_EOF } > "$GH_AW_PROMPT" - name: Interpolate variables and render templates uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 @@ -359,7 +361,7 @@ jobs: trace-id: ${{ needs.activation.outputs.setup-trace-id }} parent-span-id: ${{ needs.activation.outputs.setup-parent-span-id || needs.activation.outputs.setup-span-id }} env: - GH_AW_SETUP_WORKFLOW_NAME: "Agentic Workflow Auto-Update" + GH_AW_SETUP_WORKFLOW_NAME: "Agentic Workflow Auto-Update — Detection" GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/aw-auto-update.lock.yml@${{ github.ref }} GH_AW_INFO_VERSION: "1.0.52" GH_AW_INFO_AWF_VERSION: "v0.25.55" @@ -450,60 +452,33 @@ jobs: mkdir -p "${RUNNER_TEMP}/gh-aw/safeoutputs" mkdir -p /tmp/gh-aw/safeoutputs mkdir -p /tmp/gh-aw/mcp-logs/safeoutputs - cat > "${RUNNER_TEMP}/gh-aw/safeoutputs/config.json" << 'GH_AW_SAFE_OUTPUTS_CONFIG_7203a8720d5d860e_EOF' - {"create_pull_request":{"allowed_files":[".github/workflows/*.md",".github/workflows/*.lock.yml",".github/workflows/shared/**",".github/aw/**",".github/agents/**"],"draft":false,"labels":["automation"],"max":1,"max_patch_files":100,"max_patch_size":1024,"protect_top_level_dot_folders":true,"protected_files":["package.json","bun.lockb","bunfig.toml","deno.json","deno.jsonc","deno.lock","global.json","NuGet.Config","Directory.Packages.props","mix.exs","mix.lock","go.mod","go.sum","stack.yaml","stack.yaml.lock","pom.xml","build.gradle","build.gradle.kts","settings.gradle","settings.gradle.kts","gradle.properties","package-lock.json","yarn.lock","pnpm-lock.yaml","npm-shrinkwrap.json","requirements.txt","Pipfile","Pipfile.lock","pyproject.toml","setup.py","setup.cfg","Gemfile","Gemfile.lock","uv.lock","CODEOWNERS","DESIGN.md","README.md","CONTRIBUTING.md","CHANGELOG.md","SECURITY.md","CODE_OF_CONDUCT.md","AGENTS.md","CLAUDE.md","GEMINI.md"],"protected_files_policy":"allowed","title_prefix":"[Auto Update] "},"create_report_incomplete_issue":{},"missing_data":{},"missing_tool":{},"noop":{"max":1,"report-as-issue":"false"},"push_to_pull_request_branch":{"allowed_files":[".github/workflows/*.md",".github/workflows/*.lock.yml",".github/workflows/shared/**",".github/aw/**",".github/agents/**"],"if_no_changes":"warn","max":1,"max_patch_size":1024,"protect_top_level_dot_folders":true,"protected_files":["package.json","bun.lockb","bunfig.toml","deno.json","deno.jsonc","deno.lock","global.json","NuGet.Config","Directory.Packages.props","mix.exs","mix.lock","go.mod","go.sum","stack.yaml","stack.yaml.lock","pom.xml","build.gradle","build.gradle.kts","settings.gradle","settings.gradle.kts","gradle.properties","package-lock.json","yarn.lock","pnpm-lock.yaml","npm-shrinkwrap.json","requirements.txt","Pipfile","Pipfile.lock","pyproject.toml","setup.py","setup.cfg","Gemfile","Gemfile.lock","uv.lock","CODEOWNERS","DESIGN.md","README.md","CONTRIBUTING.md","CHANGELOG.md","SECURITY.md","CODE_OF_CONDUCT.md","AGENTS.md","CLAUDE.md","GEMINI.md"],"protected_files_policy":"allowed","required_labels":["automation"],"target":"*","title_prefix":"[Auto Update] "},"report_incomplete":{}} - GH_AW_SAFE_OUTPUTS_CONFIG_7203a8720d5d860e_EOF + cat > "${RUNNER_TEMP}/gh-aw/safeoutputs/config.json" << 'GH_AW_SAFE_OUTPUTS_CONFIG_d0f164dc9c0aeebb_EOF' + {"create_agent_session":{"base":"main","max":1},"create_report_incomplete_issue":{},"missing_data":{},"missing_tool":{},"noop":{"max":1,"report-as-issue":"false"},"report_incomplete":{}} + GH_AW_SAFE_OUTPUTS_CONFIG_d0f164dc9c0aeebb_EOF - name: Generate Safe Outputs Tools env: GH_AW_TOOLS_META_JSON: | { "description_suffixes": { - "create_pull_request": " CONSTRAINTS: Maximum 1 pull request(s) can be created. Title will be prefixed with \"[Auto Update] \". Labels [\"automation\"] will be automatically added.", - "push_to_pull_request_branch": " CONSTRAINTS: Maximum 1 push(es) can be made. The target pull request title must start with \"[Auto Update] \"." + "create_agent_session": " CONSTRAINTS: Maximum 1 agent task(s) can be created. Base branch for tasks: \"main\"." }, "repo_params": {}, "dynamic_tools": [] } GH_AW_VALIDATION_JSON: | { - "create_pull_request": { + "create_agent_session": { "defaultMax": 1, "fields": { - "base": { - "type": "string", - "sanitize": true, - "maxLength": 128 - }, "body": { "required": true, "type": "string", "sanitize": true, "maxLength": 65000 }, - "branch": { - "required": true, - "type": "string", - "sanitize": true, - "maxLength": 256 - }, - "draft": { - "type": "boolean" - }, - "labels": { - "type": "array", - "itemType": "string", - "itemSanitize": true, - "itemMaxLength": 128 - }, "repo": { "type": "string", "maxLength": 256 - }, - "title": { - "required": true, - "type": "string", - "sanitize": true, - "maxLength": 128 } } }, @@ -564,26 +539,6 @@ jobs: } } }, - "push_to_pull_request_branch": { - "defaultMax": 1, - "fields": { - "branch": { - "required": true, - "type": "string", - "sanitize": true, - "maxLength": 256 - }, - "message": { - "required": true, - "type": "string", - "sanitize": true, - "maxLength": 65000 - }, - "pull_request_number": { - "issueOrPRNumber": true - } - } - }, "report_incomplete": { "defaultMax": 5, "fields": { @@ -684,7 +639,7 @@ jobs: mkdir -p /home/runner/.copilot GH_AW_NODE=$(which node 2>/dev/null || command -v node 2>/dev/null || echo node) - cat << GH_AW_MCP_CONFIG_dadd7da5f2558446_EOF | "$GH_AW_NODE" "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.cjs" + cat << GH_AW_MCP_CONFIG_28eaa69ff26e35a9_EOF | "$GH_AW_NODE" "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.cjs" { "mcpServers": { "github": { @@ -694,7 +649,7 @@ jobs: "GITHUB_HOST": "\${GITHUB_SERVER_URL}", "GITHUB_PERSONAL_ACCESS_TOKEN": "\${GITHUB_MCP_SERVER_TOKEN}", "GITHUB_READ_ONLY": "1", - "GITHUB_TOOLSETS": "pull_requests" + "GITHUB_TOOLSETS": "pull_requests,issues" }, "guard-policies": { "allow-only": { @@ -728,7 +683,7 @@ jobs: "payloadDir": "${MCP_GATEWAY_PAYLOAD_DIR}" } } - GH_AW_MCP_CONFIG_dadd7da5f2558446_EOF + GH_AW_MCP_CONFIG_28eaa69ff26e35a9_EOF - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true @@ -968,9 +923,8 @@ jobs: needs.activation.outputs.stale_lock_file_failed == 'true') runs-on: ubuntu-slim permissions: - contents: write + contents: read issues: write - pull-requests: write concurrency: group: "gh-aw-conclusion-aw-auto-update" cancel-in-progress: false @@ -990,25 +944,11 @@ jobs: trace-id: ${{ needs.activation.outputs.setup-trace-id }} parent-span-id: ${{ needs.activation.outputs.setup-parent-span-id || needs.activation.outputs.setup-span-id }} env: - GH_AW_SETUP_WORKFLOW_NAME: "Agentic Workflow Auto-Update" + GH_AW_SETUP_WORKFLOW_NAME: "Agentic Workflow Auto-Update — Detection" GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/aw-auto-update.lock.yml@${{ github.ref }} GH_AW_INFO_VERSION: "1.0.52" GH_AW_INFO_AWF_VERSION: "v0.25.55" GH_AW_INFO_ENGINE_ID: "copilot" - - name: Generate GitHub App token - id: safe-outputs-app-token - uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0 - with: - client-id: ${{ vars.APP_ID }} - private-key: ${{ secrets.APP_PRIVATE_KEY }} - owner: ${{ github.repository_owner }} - repositories: ${{ github.event.repository.name }} - github-api-url: ${{ github.api_url }} - permission-administration: read - permission-contents: write - permission-issues: write - permission-pull-requests: write - permission-workflows: write - name: Download agent output artifact id: download-agent-output continue-on-error: true @@ -1029,13 +969,13 @@ jobs: env: GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }} GH_AW_NOOP_MAX: "1" - GH_AW_WORKFLOW_NAME: "Agentic Workflow Auto-Update" + GH_AW_WORKFLOW_NAME: "Agentic Workflow Auto-Update — Detection" GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/aw-auto-update.md" GH_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} GH_AW_AGENT_CONCLUSION: ${{ needs.agent.result }} GH_AW_NOOP_REPORT_AS_ISSUE: "false" with: - github-token: ${{ steps.safe-outputs-app-token.outputs.token }} + github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} script: | const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); setupGlobals(core, github, context, exec, io, getOctokit); @@ -1046,13 +986,13 @@ jobs: uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }} - GH_AW_WORKFLOW_NAME: "Agentic Workflow Auto-Update" + GH_AW_WORKFLOW_NAME: "Agentic Workflow Auto-Update — Detection" GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/aw-auto-update.md" GH_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} GH_AW_DETECTION_CONCLUSION: ${{ needs.detection.outputs.detection_conclusion }} GH_AW_DETECTION_REASON: ${{ needs.detection.outputs.detection_reason }} with: - github-token: ${{ steps.safe-outputs-app-token.outputs.token }} + github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} script: | const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); setupGlobals(core, github, context, exec, io, getOctokit); @@ -1064,10 +1004,10 @@ jobs: env: GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }} GH_AW_MISSING_TOOL_CREATE_ISSUE: "true" - GH_AW_WORKFLOW_NAME: "Agentic Workflow Auto-Update" + GH_AW_WORKFLOW_NAME: "Agentic Workflow Auto-Update — Detection" GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/aw-auto-update.md" with: - github-token: ${{ steps.safe-outputs-app-token.outputs.token }} + github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} script: | const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); setupGlobals(core, github, context, exec, io, getOctokit); @@ -1079,10 +1019,10 @@ jobs: env: GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }} GH_AW_REPORT_INCOMPLETE_CREATE_ISSUE: "true" - GH_AW_WORKFLOW_NAME: "Agentic Workflow Auto-Update" + GH_AW_WORKFLOW_NAME: "Agentic Workflow Auto-Update — Detection" GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/aw-auto-update.md" with: - github-token: ${{ steps.safe-outputs-app-token.outputs.token }} + github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} script: | const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); setupGlobals(core, github, context, exec, io, getOctokit); @@ -1094,7 +1034,7 @@ jobs: uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }} - GH_AW_WORKFLOW_NAME: "Agentic Workflow Auto-Update" + GH_AW_WORKFLOW_NAME: "Agentic Workflow Auto-Update — Detection" GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/aw-auto-update.md" GH_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} GH_AW_AGENT_CONCLUSION: ${{ needs.agent.result }} @@ -1110,10 +1050,6 @@ jobs: GH_AW_AGENTIC_ENGINE_TIMEOUT: ${{ needs.agent.outputs.agentic_engine_timeout }} GH_AW_MODEL_NOT_SUPPORTED_ERROR: ${{ needs.agent.outputs.model_not_supported_error }} GH_AW_ENGINE_API_HOSTS: "api.enterprise.githubcopilot.com,api.githubcopilot.com,api.business.githubcopilot.com,api.individual.githubcopilot.com" - GH_AW_CODE_PUSH_FAILURE_ERRORS: ${{ needs.safe_outputs.outputs.code_push_failure_errors }} - GH_AW_CODE_PUSH_FAILURE_COUNT: ${{ needs.safe_outputs.outputs.code_push_failure_count }} - GH_AW_SAFE_OUTPUTS_APP_TOKEN_MINTING_FAILED: ${{ needs.safe_outputs.outputs.app_token_minting_failed }} - GH_AW_CONCLUSION_APP_TOKEN_MINTING_FAILED: ${{ steps.safe-outputs-app-token.outcome == 'failure' }} GH_AW_LOCKDOWN_CHECK_FAILED: ${{ needs.activation.outputs.lockdown_check_failed }} GH_AW_STALE_LOCK_FILE_FAILED: ${{ needs.activation.outputs.stale_lock_file_failed }} GH_AW_GROUP_REPORTS: "false" @@ -1123,25 +1059,12 @@ jobs: GH_AW_TIMEOUT_MINUTES: "15" GH_AW_MAX_EFFECTIVE_TOKENS: "25000000" with: - github-token: ${{ steps.safe-outputs-app-token.outputs.token }} + github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} script: | const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); setupGlobals(core, github, context, exec, io, getOctokit); const { main } = require('${{ runner.temp }}/gh-aw/actions/handle_agent_failure.cjs'); await main(); - - name: Invalidate GitHub App token - if: always() && steps.safe-outputs-app-token.outputs.token != '' - env: - TOKEN: ${{ steps.safe-outputs-app-token.outputs.token }} - run: | - echo "Revoking GitHub App installation token..." - # GitHub CLI will auth with the token being revoked. - gh api \ - --method DELETE \ - -H "Authorization: token $TOKEN" \ - /installation/token || echo "Token revoke may already be expired." - - echo "Token invalidation step complete." detection: needs: @@ -1166,7 +1089,7 @@ jobs: trace-id: ${{ needs.activation.outputs.setup-trace-id }} parent-span-id: ${{ needs.activation.outputs.setup-parent-span-id || needs.activation.outputs.setup-span-id }} env: - GH_AW_SETUP_WORKFLOW_NAME: "Agentic Workflow Auto-Update" + GH_AW_SETUP_WORKFLOW_NAME: "Agentic Workflow Auto-Update — Detection" GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/aw-auto-update.lock.yml@${{ github.ref }} GH_AW_INFO_VERSION: "1.0.52" GH_AW_INFO_AWF_VERSION: "v0.25.55" @@ -1235,8 +1158,8 @@ jobs: if: always() && steps.detection_guard.outputs.run_detection == 'true' uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: - WORKFLOW_NAME: "Agentic Workflow Auto-Update" - WORKFLOW_DESCRIPTION: "Keeps agentic workflows up to date by running `gh aw upgrade` and `gh aw compile` daily.\nIf changes are detected, pushes them to a long-lived branch and creates or updates a PR." + WORKFLOW_NAME: "Agentic Workflow Auto-Update — Detection" + WORKFLOW_DESCRIPTION: "Detects whether the gh-aw infrastructure has pending updates. The detection\nrun itself has zero write surface: its only outputs are `noop` (nothing to do —\nthe normal steady state) or `create-agent-session` (delegate the actual\nupgrade + recompile + PR to a Copilot Coding Agent session).\n\nRationale: `gh aw compile` writes to `.github/workflows/*.lock.yml`, but the\ndefault `GITHUB_TOKEN` cannot push under `.github/workflows/` (GitHub platform\nrule). Rather than provisioning a GitHub App or PAT, this workflow delegates\nthe write work to a Copilot Coding Agent session, which runs under its own\nidentity (COPILOT_GITHUB_TOKEN) and can write workflow files." HAS_PATCH: ${{ needs.agent.outputs.has_patch }} with: script: | @@ -1353,9 +1276,8 @@ jobs: if: (!cancelled()) && needs.agent.result != 'skipped' && needs.detection.result == 'success' runs-on: ubuntu-slim permissions: - contents: write + contents: read issues: write - pull-requests: write timeout-minutes: 15 env: GH_AW_CALLER_WORKFLOW_ID: "${{ github.repository }}/aw-auto-update" @@ -1366,20 +1288,17 @@ jobs: GH_AW_ENGINE_MODEL: ${{ needs.agent.outputs.model }} GH_AW_ENGINE_VERSION: "1.0.52" GH_AW_WORKFLOW_ID: "aw-auto-update" - GH_AW_WORKFLOW_NAME: "Agentic Workflow Auto-Update" + GH_AW_WORKFLOW_NAME: "Agentic Workflow Auto-Update — Detection" GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/aw-auto-update.md" outputs: - app_token_minting_failed: ${{ steps.safe-outputs-app-token.outcome == 'failure' }} code_push_failure_count: ${{ steps.process_safe_outputs.outputs.code_push_failure_count }} code_push_failure_errors: ${{ steps.process_safe_outputs.outputs.code_push_failure_errors }} + create_agent_session_session_number: ${{ steps.process_safe_outputs.outputs.session_number }} + create_agent_session_session_url: ${{ steps.process_safe_outputs.outputs.session_url }} create_discussion_error_count: ${{ steps.process_safe_outputs.outputs.create_discussion_error_count }} create_discussion_errors: ${{ steps.process_safe_outputs.outputs.create_discussion_errors }} - created_pr_number: ${{ steps.process_safe_outputs.outputs.created_pr_number }} - created_pr_url: ${{ steps.process_safe_outputs.outputs.created_pr_url }} process_safe_outputs_processed_count: ${{ steps.process_safe_outputs.outputs.processed_count }} process_safe_outputs_temporary_id_map: ${{ steps.process_safe_outputs.outputs.temporary_id_map }} - push_commit_sha: ${{ steps.process_safe_outputs.outputs.push_commit_sha }} - push_commit_url: ${{ steps.process_safe_outputs.outputs.push_commit_url }} steps: - name: Setup Scripts id: setup @@ -1390,7 +1309,7 @@ jobs: trace-id: ${{ needs.activation.outputs.setup-trace-id }} parent-span-id: ${{ needs.activation.outputs.setup-parent-span-id || needs.activation.outputs.setup-span-id }} env: - GH_AW_SETUP_WORKFLOW_NAME: "Agentic Workflow Auto-Update" + GH_AW_SETUP_WORKFLOW_NAME: "Agentic Workflow Auto-Update — Detection" GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/aw-auto-update.lock.yml@${{ github.ref }} GH_AW_INFO_VERSION: "1.0.52" GH_AW_INFO_AWF_VERSION: "v0.25.55" @@ -1409,79 +1328,6 @@ jobs: mkdir -p /tmp/gh-aw/ find "/tmp/gh-aw/" -type f -print echo "GH_AW_AGENT_OUTPUT=/tmp/gh-aw/agent_output.json" >> "$GITHUB_OUTPUT" - - name: Download patch artifact - continue-on-error: true - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - name: agent - path: /tmp/gh-aw/ - - name: Generate GitHub App token - id: safe-outputs-app-token - uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0 - with: - client-id: ${{ vars.APP_ID }} - private-key: ${{ secrets.APP_PRIVATE_KEY }} - owner: ${{ github.repository_owner }} - repositories: ${{ github.event.repository.name }} - github-api-url: ${{ github.api_url }} - permission-administration: read - permission-contents: write - permission-issues: write - permission-pull-requests: write - permission-workflows: write - - name: Extract base branch from agent output - id: extract-base-branch - if: steps.download-agent-output.outcome == 'success' - shell: bash - run: | - if [ -f "/tmp/gh-aw/agent_output.json" ]; then - GH_AW_NODE=$(which node 2>/dev/null || command -v node 2>/dev/null || echo node) - BASE_BRANCH=$("$GH_AW_NODE" -e " - try { - const data = JSON.parse(require('fs').readFileSync('/tmp/gh-aw/agent_output.json', 'utf8')); - const item = (data.items || []).find(i => - (i.type === 'create_pull_request' || i.type === 'push_to_pull_request_branch') && - i.base_branch - ); - if (item) process.stdout.write(item.base_branch); - } catch(e) {} - " 2>/dev/null || true) - # Validate: only allow safe git branch name characters - if [[ "$BASE_BRANCH" =~ ^[a-zA-Z0-9/_.-]+$ ]] && [ ${#BASE_BRANCH} -le 255 ]; then - printf 'base-branch=%s\n' "$BASE_BRANCH" >> "$GITHUB_OUTPUT" - echo "Extracted base branch from safe output: $BASE_BRANCH" - fi - fi - - name: Checkout repository (trusted default branch for comment events) - if: ((!cancelled()) && needs.agent.result != 'skipped' && contains(needs.agent.outputs.output_types, 'create_pull_request') || (!cancelled()) && needs.agent.result != 'skipped' && contains(needs.agent.outputs.output_types, 'push_to_pull_request_branch')) && (github.event_name == 'issue_comment' || github.event_name == 'pull_request_review_comment') - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - ref: ${{ github.event.repository.default_branch }} - token: ${{ steps.safe-outputs-app-token.outputs.token }} - persist-credentials: false - fetch-depth: 1 - - name: Checkout repository - if: ((!cancelled()) && needs.agent.result != 'skipped' && contains(needs.agent.outputs.output_types, 'create_pull_request') || (!cancelled()) && needs.agent.result != 'skipped' && contains(needs.agent.outputs.output_types, 'push_to_pull_request_branch')) && github.event_name != 'issue_comment' && github.event_name != 'pull_request_review_comment' - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - ref: ${{ steps.extract-base-branch.outputs.base-branch || github.base_ref || github.event.pull_request.base.ref || github.ref_name || github.event.repository.default_branch }} - token: ${{ steps.safe-outputs-app-token.outputs.token }} - persist-credentials: false - fetch-depth: 1 - - name: Configure Git credentials - if: (!cancelled()) && needs.agent.result != 'skipped' && contains(needs.agent.outputs.output_types, 'create_pull_request') || (!cancelled()) && needs.agent.result != 'skipped' && contains(needs.agent.outputs.output_types, 'push_to_pull_request_branch') - env: - REPO_NAME: ${{ github.repository }} - SERVER_URL: ${{ github.server_url }} - GIT_TOKEN: ${{ steps.safe-outputs-app-token.outputs.token }} - run: | - git config --global user.email "github-actions[bot]@users.noreply.github.com" - git config --global user.name "github-actions[bot]" - git config --global am.keepcr true - # Re-authenticate git with GitHub token - SERVER_URL_STRIPPED="${SERVER_URL#https://}" - git remote set-url origin "https://x-access-token:${GIT_TOKEN}@${SERVER_URL_STRIPPED}/${REPO_NAME}.git" - echo "Git configured with standard GitHub Actions identity" - name: Configure GH_HOST for enterprise compatibility id: ghes-host-config shell: bash @@ -1500,29 +1346,15 @@ jobs: GH_AW_ALLOWED_DOMAINS: "*.githubusercontent.com,api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,docs.github.com,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.blog,github.com,github.githubassets.com,go.dev,golang.org,goproxy.io,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,patch-diff.githubusercontent.com,pkg.go.dev,ppa.launchpad.net,proxy.golang.org,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,storage.googleapis.com,sum.golang.org,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com,www.googleapis.com" GITHUB_SERVER_URL: ${{ github.server_url }} GITHUB_API_URL: ${{ github.api_url }} - GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"create_pull_request\":{\"allowed_files\":[\".github/workflows/*.md\",\".github/workflows/*.lock.yml\",\".github/workflows/shared/**\",\".github/aw/**\",\".github/agents/**\"],\"draft\":false,\"labels\":[\"automation\"],\"max\":1,\"max_patch_files\":100,\"max_patch_size\":1024,\"protect_top_level_dot_folders\":true,\"protected_files\":[\"package.json\",\"bun.lockb\",\"bunfig.toml\",\"deno.json\",\"deno.jsonc\",\"deno.lock\",\"global.json\",\"NuGet.Config\",\"Directory.Packages.props\",\"mix.exs\",\"mix.lock\",\"go.mod\",\"go.sum\",\"stack.yaml\",\"stack.yaml.lock\",\"pom.xml\",\"build.gradle\",\"build.gradle.kts\",\"settings.gradle\",\"settings.gradle.kts\",\"gradle.properties\",\"package-lock.json\",\"yarn.lock\",\"pnpm-lock.yaml\",\"npm-shrinkwrap.json\",\"requirements.txt\",\"Pipfile\",\"Pipfile.lock\",\"pyproject.toml\",\"setup.py\",\"setup.cfg\",\"Gemfile\",\"Gemfile.lock\",\"uv.lock\",\"CODEOWNERS\",\"DESIGN.md\",\"README.md\",\"CONTRIBUTING.md\",\"CHANGELOG.md\",\"SECURITY.md\",\"CODE_OF_CONDUCT.md\",\"AGENTS.md\",\"CLAUDE.md\",\"GEMINI.md\"],\"protected_files_policy\":\"allowed\",\"title_prefix\":\"[Auto Update] \"},\"create_report_incomplete_issue\":{},\"missing_data\":{},\"missing_tool\":{},\"noop\":{\"max\":1,\"report-as-issue\":\"false\"},\"push_to_pull_request_branch\":{\"allowed_files\":[\".github/workflows/*.md\",\".github/workflows/*.lock.yml\",\".github/workflows/shared/**\",\".github/aw/**\",\".github/agents/**\"],\"if_no_changes\":\"warn\",\"max\":1,\"max_patch_size\":1024,\"protect_top_level_dot_folders\":true,\"protected_files\":[\"package.json\",\"bun.lockb\",\"bunfig.toml\",\"deno.json\",\"deno.jsonc\",\"deno.lock\",\"global.json\",\"NuGet.Config\",\"Directory.Packages.props\",\"mix.exs\",\"mix.lock\",\"go.mod\",\"go.sum\",\"stack.yaml\",\"stack.yaml.lock\",\"pom.xml\",\"build.gradle\",\"build.gradle.kts\",\"settings.gradle\",\"settings.gradle.kts\",\"gradle.properties\",\"package-lock.json\",\"yarn.lock\",\"pnpm-lock.yaml\",\"npm-shrinkwrap.json\",\"requirements.txt\",\"Pipfile\",\"Pipfile.lock\",\"pyproject.toml\",\"setup.py\",\"setup.cfg\",\"Gemfile\",\"Gemfile.lock\",\"uv.lock\",\"CODEOWNERS\",\"DESIGN.md\",\"README.md\",\"CONTRIBUTING.md\",\"CHANGELOG.md\",\"SECURITY.md\",\"CODE_OF_CONDUCT.md\",\"AGENTS.md\",\"CLAUDE.md\",\"GEMINI.md\"],\"protected_files_policy\":\"allowed\",\"required_labels\":[\"automation\"],\"target\":\"*\",\"title_prefix\":\"[Auto Update] \"},\"report_incomplete\":{}}" - GH_AW_CI_TRIGGER_TOKEN: ${{ secrets.GH_AW_CI_TRIGGER_TOKEN }} - GITHUB_TOKEN: ${{ steps.safe-outputs-app-token.outputs.token }} + GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"create_agent_session\":{\"base\":\"main\",\"max\":1},\"create_report_incomplete_issue\":{},\"missing_data\":{},\"missing_tool\":{},\"noop\":{\"max\":1,\"report-as-issue\":\"false\"},\"report_incomplete\":{}}" + GH_AW_AGENT_SESSION_TOKEN: ${{ secrets.GH_AW_AGENT_TOKEN || secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} with: - github-token: ${{ steps.safe-outputs-app-token.outputs.token }} + github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} script: | const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); setupGlobals(core, github, context, exec, io, getOctokit); const { main } = require('${{ runner.temp }}/gh-aw/actions/safe_output_handler_manager.cjs'); await main(); - - name: Invalidate GitHub App token - if: always() && steps.safe-outputs-app-token.outputs.token != '' - env: - TOKEN: ${{ steps.safe-outputs-app-token.outputs.token }} - run: | - echo "Revoking GitHub App installation token..." - # GitHub CLI will auth with the token being revoked. - gh api \ - --method DELETE \ - -H "Authorization: token $TOKEN" \ - /installation/token || echo "Token revoke may already be expired." - - echo "Token invalidation step complete." - name: Upload Safe Outputs Items if: always() uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 diff --git a/.github/workflows/aw-auto-update.md b/.github/workflows/aw-auto-update.md index 11bbb39f8c2..41fca3a54e9 100644 --- a/.github/workflows/aw-auto-update.md +++ b/.github/workflows/aw-auto-update.md @@ -1,7 +1,15 @@ --- description: | - Keeps agentic workflows up to date by running `gh aw upgrade` and `gh aw compile` daily. - If changes are detected, pushes them to a long-lived branch and creates or updates a PR. + Detects whether the gh-aw infrastructure has pending updates. The detection + run itself has zero write surface: its only outputs are `noop` (nothing to do — + the normal steady state) or `create-agent-session` (delegate the actual + upgrade + recompile + PR to a Copilot Coding Agent session). + + Rationale: `gh aw compile` writes to `.github/workflows/*.lock.yml`, but the + default `GITHUB_TOKEN` cannot push under `.github/workflows/` (GitHub platform + rule). Rather than provisioning a GitHub App or PAT, this workflow delegates + the write work to a Copilot Coding Agent session, which runs under its own + identity (COPILOT_GITHUB_TOKEN) and can write workflow files. on: schedule: every 24h @@ -22,67 +30,121 @@ checkout: tools: github: - toolsets: [pull_requests] + toolsets: [pull_requests, issues] min-integrity: none bash: true safe-outputs: - github-app: - client-id: ${{ vars.APP_ID }} - private-key: ${{ secrets.APP_PRIVATE_KEY }} noop: report-as-issue: false - create-pull-request: - draft: false - title-prefix: "[Auto Update] " - labels: [automation] - max: 1 - allow-workflows: true - allowed-files: - - ".github/workflows/*.md" - - ".github/workflows/*.lock.yml" - - ".github/workflows/shared/**" - - ".github/aw/**" - - ".github/agents/**" - protected-files: allowed - push-to-pull-request-branch: - target: "*" - title-prefix: "[Auto Update] " - labels: [automation] + create-agent-session: + base: main max: 1 - allow-workflows: true - allowed-files: - - ".github/workflows/*.md" - - ".github/workflows/*.lock.yml" - - ".github/workflows/shared/**" - - ".github/aw/**" - - ".github/agents/**" - protected-files: allowed --- -# Agentic Workflow Auto-Update +# Agentic Workflow Auto-Update — Detection + +You detect whether the gh-aw infrastructure has pending updates and, if so, delegate the actual upgrade work to a Copilot Coding Agent session. **You never commit, push, comment, create issues directly, or open PRs.** Your only allowed safe outputs are `noop` (the normal/expected steady state) and `create-agent-session` (delegate to CCA). -You are a maintenance bot that keeps the repository's agentic workflow infrastructure current. +## Background + +- This repo uses **GitHub Agentic Workflows (`gh aw`)** — source: , docs: . +- Files managed by `gh aw` (the only paths that should ever change as a result of an upgrade): + - `.github/workflows/*.md` — agentic workflow sources + - `.github/workflows/*.lock.yml` — compiled lock files (generated by `gh aw compile`) + - `.github/workflows/shared/**` + - `.github/aw/**` (incl. `actions-lock.json` with pinned action SHAs) + - `.github/agents/**` +- The `create-agent-session` safe output used here is documented at . The safe-outputs job invokes `gh agent-task create` using `COPILOT_GITHUB_TOKEN`, which spawns a Copilot Coding Agent run that has the perms required to write `.github/workflows/`. ## Task -Run these steps in order and stop as soon as one tells you to exit: - -1. **Install gh-aw**: If `gh aw --version` fails, install the extension by running `gh extension install github/gh-aw`. If both fail, report the error and exit immediately. -2. **Upgrade**: Run `gh aw upgrade` to update the gh-aw CLI version and apply any codemods. If the command fails, report the error and exit immediately. -3. **Compile**: Run `gh aw compile` to recompile all workflows. If the command reports errors, report them and exit immediately. -4. **Check for changes**: Run `git diff` to see if anything changed. -5. **If no changes**: Report "Already up to date" and exit immediately. Do not search for PRs, do not run any other commands. -6. **If changes exist**: - - Check if an open PR titled `[Auto Update] Agentic workflows` already exists (search open PRs). - - If a PR exists, push the changes to its branch (`agentics/auto-update-gh-aw`) to update it. Leave a brief comment noting what changed (e.g. "Updated gh-aw-actions/setup from vX to vY"). - - If no PR exists, create a new PR from branch `agentics/auto-update-gh-aw` to `main` with title `[Auto Update] Agentic workflows` and a body summarizing the changes. - -## Rules - -- Only run `gh extension install github/gh-aw`, `gh aw upgrade`, and `gh aw compile`. Do **not** run `go` commands, `npm` commands, or any other package manager or build tool. Do **not** attempt to fix dependency resolution errors or edit generated files (go.mod, go.sum, package.json, etc.) manually. -- Only commit changes to files managed by `gh aw`: `.github/workflows/`, `.github/aw/`, `.github/agents/`. -- Use a single commit with message: `Update agentic workflows via gh aw upgrade`. -- The branch name must always be `agentics/auto-update-gh-aw`. -- If `gh aw upgrade` or `gh aw compile` fails, report the error output and exit. Do **not** try to fix the failure. -- Be concise in PR descriptions and comments. +Run these steps in order: + +1. **Install `gh-aw`.** Run `gh extension install github/gh-aw` (skip if `gh aw --version` already succeeds). If install fails, emit `noop` and stop. +2. **Upgrade.** Run `gh aw upgrade`. If it fails, emit `noop` and stop — do **not** try to fix the failure. +3. **Compile.** Run `gh aw compile`. If it reports errors, emit `noop` and stop. +4. **Capture state for the delegation payload (only used if changes are detected):** + - `NEW_VERSION` ← `gh aw --version` + - `DIFF_STAT` ← `git diff --stat` + - `CHANGED_FILES` ← `git diff --name-only` +5. **Reset working tree.** Run `git reset --hard && git clean -fd` so no local changes leak out of this detection run. +6. **Dedupe check.** Search for an already-open follow-up: + - Open PRs titled `[Auto Update] Agentic workflows` (`gh pr list --search "[Auto Update] Agentic workflows in:title" --state open`). + - Open issues titled `[Auto Update] Agentic workflows` (`gh issue list --search "[Auto Update] Agentic workflows in:title" --state open`) — these are the Copilot agent-session issues from previous runs. + - If **either** exists, emit `noop` and stop. The previous run's PR/session is still pending. +7. **Decide and emit exactly one safe output:** + - `CHANGED_FILES` is empty → emit a single `noop`. **This is the normal/expected outcome on most runs — do not treat it as a failure and do not create an issue.** + - Otherwise → emit a single `create-agent-session` whose `body` is the template in the next section, with ``, ``, and `` substituted. + +## Agent session description (template) + +Use this exact body for the `create-agent-session` output. Title prefix `[Auto Update] Agentic workflows` is required (the dedupe check in step 6 looks for it). + +````markdown +# [Auto Update] Agentic workflows → gh-aw + +The scheduled `aw-auto-update` detection run found that re-running +`gh aw upgrade && gh aw compile` against `main` produces a non-empty diff. +Please apply that diff and open a PR. + +## Steps + +1. Install the gh-aw CLI extension (skip if already installed): + ```bash + gh extension install github/gh-aw + ``` +2. Apply codemods and bump pinned action SHAs: + ```bash + gh aw upgrade + ``` +3. Recompile all workflows (regenerates `.github/workflows/*.lock.yml`): + ```bash + gh aw compile + ``` +4. Stage **only** files managed by `gh aw`: + - `.github/workflows/*.md` + - `.github/workflows/*.lock.yml` + - `.github/workflows/shared/**` + - `.github/aw/**` + - `.github/agents/**` +5. Commit with message: `Update agentic workflows via gh aw upgrade` +6. Open a PR to `main` titled `[Auto Update] Agentic workflows`. Keep the body + short — one line summarizing what changed (e.g. "gh-aw v0.X → v0.Y, codemods + applied"). The Files tab shows the diff; do not list files in the body. + +## Hard rules + +- Do **not** run `go`, `npm`, or any package manager / build tool. +- Do **not** hand-edit `go.mod`, `go.sum`, `package.json`, or any dependency manifest. +- Do **not** hand-edit generated `*.lock.yml` files — only `gh aw compile` writes those. +- If `gh aw upgrade` or `gh aw compile` fails, stop and comment with the error + output. Do **not** try to fix it — open an issue for a human instead. + +## References + +- gh-aw repo: +- gh-aw docs: +- `gh aw upgrade` reference: +- `gh aw compile` reference: + +## Detection evidence + +- `gh aw --version` on the detection run: `` +- `git diff --stat`: + ``` + + ``` +- `git diff --name-only`: + ``` + + ``` +```` + +## Rules (for this detection workflow) + +- Only commands you may run: `gh extension install github/gh-aw`, `gh aw --version`, `gh aw upgrade`, `gh aw compile`, `git diff`, `git reset`, `git clean`, `gh pr list`, `gh issue list`. +- Never run `go`, `npm`, or any package manager / build tool. +- Never commit, push, comment, create issues directly, or open PRs. Your only safe outputs are `noop` and `create-agent-session`. +- Emit exactly one safe output per run. +- `noop` is the expected steady state — do not report it as a failure and do not create an issue for it. From ffa661ab4dbd8067c9091d62ec0a6abaf73a94f0 Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Thu, 28 May 2026 18:43:16 +0200 Subject: [PATCH 27/72] Fix state-machine workflow: add protected-files: allowed for .github/docs/ output (#19852) The agentic-state-machine workflow has been failing since PR #19721 moved the output to .github/docs/state-machine.md. Files under .github/ are treated as protected by gh-aw (agent instruction files, security config). The allowed-files config permits WHICH files can be modified but does not override the built-in protected-files blocking. Adding protected-files: allowed explicitly opts in, which is safe since allowed-files already restricts writes to .github/docs/** only. Fixes #19739 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../workflows/agentic-state-machine.lock.yml | 34 +++++++++---------- .github/workflows/agentic-state-machine.md | 1 + 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/.github/workflows/agentic-state-machine.lock.yml b/.github/workflows/agentic-state-machine.lock.yml index 623ea7aacac..97450d630c7 100644 --- a/.github/workflows/agentic-state-machine.lock.yml +++ b/.github/workflows/agentic-state-machine.lock.yml @@ -1,4 +1,4 @@ -# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"21c77c4aa434153a69f6f746dbea5f9abe823e1252873fcfb7bb4506c8812cc7","compiler_version":"v0.76.1","strict":true,"agent_id":"copilot"} +# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"f0a9a5be54c3821fe440a653a424806cd8d62cd21c7e21c0a18b51f8265129c2","compiler_version":"v0.76.1","strict":true,"agent_id":"copilot"} # gh-aw-manifest: {"version":1,"secrets":["COPILOT_GITHUB_TOKEN","GH_AW_CI_TRIGGER_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/checkout","sha":"de0fac2e4500dabe0009e67214ff5f5447ce83dd","version":"v6.0.2"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/setup-node","sha":"48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e","version":"v6.4.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"},{"repo":"github/gh-aw-actions/setup","sha":"46d564922b082d0db93244972e8005ea6904ee5f","version":"v0.76.1"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.25.55"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.55"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.25.55"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.3.19"},{"image":"ghcr.io/github/github-mcp-server:v1.0.4","digest":"sha256:e3816a476a977cfb836e7d221510011436c654d11861db66ecfd826601aba6a4","pinned_image":"ghcr.io/github/github-mcp-server:v1.0.4@sha256:e3816a476a977cfb836e7d221510011436c654d11861db66ecfd826601aba6a4"},{"image":"node:lts-alpine","digest":"sha256:2bdb65ed1dab192432bc31c95f94155ca5ad7fc1392fb7eb7526ab682fa5bf14","pinned_image":"node:lts-alpine@sha256:2bdb65ed1dab192432bc31c95f94155ca5ad7fc1392fb7eb7526ab682fa5bf14"}]} # ___ _ _ # / _ \ | | (_) @@ -190,23 +190,23 @@ jobs: run: | bash "${RUNNER_TEMP}/gh-aw/actions/create_prompt_first.sh" { - cat << 'GH_AW_PROMPT_96518c4ea1ca6788_EOF' + cat << 'GH_AW_PROMPT_c25e7ff486ebc4da_EOF' - GH_AW_PROMPT_96518c4ea1ca6788_EOF + GH_AW_PROMPT_c25e7ff486ebc4da_EOF cat "${RUNNER_TEMP}/gh-aw/prompts/xpia.md" cat "${RUNNER_TEMP}/gh-aw/prompts/temp_folder_prompt.md" cat "${RUNNER_TEMP}/gh-aw/prompts/markdown.md" cat "${RUNNER_TEMP}/gh-aw/prompts/safe_outputs_prompt.md" - cat << 'GH_AW_PROMPT_96518c4ea1ca6788_EOF' + cat << 'GH_AW_PROMPT_c25e7ff486ebc4da_EOF' Tools: create_pull_request, missing_tool, missing_data, noop - GH_AW_PROMPT_96518c4ea1ca6788_EOF + GH_AW_PROMPT_c25e7ff486ebc4da_EOF cat "${RUNNER_TEMP}/gh-aw/prompts/safe_outputs_create_pull_request.md" - cat << 'GH_AW_PROMPT_96518c4ea1ca6788_EOF' + cat << 'GH_AW_PROMPT_c25e7ff486ebc4da_EOF' - GH_AW_PROMPT_96518c4ea1ca6788_EOF + GH_AW_PROMPT_c25e7ff486ebc4da_EOF cat "${RUNNER_TEMP}/gh-aw/prompts/mcp_cli_tools_prompt.md" - cat << 'GH_AW_PROMPT_96518c4ea1ca6788_EOF' + cat << 'GH_AW_PROMPT_c25e7ff486ebc4da_EOF' The following GitHub context information is available for this workflow: {{#if github.actor}} @@ -235,12 +235,12 @@ jobs: {{/if}} - GH_AW_PROMPT_96518c4ea1ca6788_EOF + GH_AW_PROMPT_c25e7ff486ebc4da_EOF cat "${RUNNER_TEMP}/gh-aw/prompts/github_mcp_tools_with_safeoutputs_prompt.md" - cat << 'GH_AW_PROMPT_96518c4ea1ca6788_EOF' + cat << 'GH_AW_PROMPT_c25e7ff486ebc4da_EOF' {{#runtime-import .github/workflows/agentic-state-machine.md}} - GH_AW_PROMPT_96518c4ea1ca6788_EOF + GH_AW_PROMPT_c25e7ff486ebc4da_EOF } > "$GH_AW_PROMPT" - name: Interpolate variables and render templates uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 @@ -444,9 +444,9 @@ jobs: mkdir -p "${RUNNER_TEMP}/gh-aw/safeoutputs" mkdir -p /tmp/gh-aw/safeoutputs mkdir -p /tmp/gh-aw/mcp-logs/safeoutputs - cat > "${RUNNER_TEMP}/gh-aw/safeoutputs/config.json" << 'GH_AW_SAFE_OUTPUTS_CONFIG_f63147129cd97ff0_EOF' - {"create_pull_request":{"allowed_files":[".github/docs/**"],"draft":false,"labels":["automation","NO_RELEASE_NOTES"],"max":1,"max_patch_files":100,"max_patch_size":1024,"protect_top_level_dot_folders":true,"protected_files":["package.json","bun.lockb","bunfig.toml","deno.json","deno.jsonc","deno.lock","global.json","NuGet.Config","Directory.Packages.props","mix.exs","mix.lock","go.mod","go.sum","stack.yaml","stack.yaml.lock","pom.xml","build.gradle","build.gradle.kts","settings.gradle","settings.gradle.kts","gradle.properties","package-lock.json","yarn.lock","pnpm-lock.yaml","npm-shrinkwrap.json","requirements.txt","Pipfile","Pipfile.lock","pyproject.toml","setup.py","setup.cfg","Gemfile","Gemfile.lock","uv.lock","CODEOWNERS","DESIGN.md","README.md","CONTRIBUTING.md","CHANGELOG.md","SECURITY.md","CODE_OF_CONDUCT.md","AGENTS.md","CLAUDE.md","GEMINI.md"],"protected_files_policy":"request_review","title_prefix":"[Agentic State Machine] "},"create_report_incomplete_issue":{},"missing_data":{},"missing_tool":{},"noop":{"max":1,"report-as-issue":"false"},"report_incomplete":{}} - GH_AW_SAFE_OUTPUTS_CONFIG_f63147129cd97ff0_EOF + cat > "${RUNNER_TEMP}/gh-aw/safeoutputs/config.json" << 'GH_AW_SAFE_OUTPUTS_CONFIG_0a0f9a5472dfe844_EOF' + {"create_pull_request":{"allowed_files":[".github/docs/**"],"draft":false,"labels":["automation","NO_RELEASE_NOTES"],"max":1,"max_patch_files":100,"max_patch_size":1024,"protect_top_level_dot_folders":true,"protected_files":["package.json","bun.lockb","bunfig.toml","deno.json","deno.jsonc","deno.lock","global.json","NuGet.Config","Directory.Packages.props","mix.exs","mix.lock","go.mod","go.sum","stack.yaml","stack.yaml.lock","pom.xml","build.gradle","build.gradle.kts","settings.gradle","settings.gradle.kts","gradle.properties","package-lock.json","yarn.lock","pnpm-lock.yaml","npm-shrinkwrap.json","requirements.txt","Pipfile","Pipfile.lock","pyproject.toml","setup.py","setup.cfg","Gemfile","Gemfile.lock","uv.lock","CODEOWNERS","DESIGN.md","README.md","CONTRIBUTING.md","CHANGELOG.md","SECURITY.md","CODE_OF_CONDUCT.md","AGENTS.md","CLAUDE.md","GEMINI.md"],"protected_files_policy":"allowed","title_prefix":"[Agentic State Machine] "},"create_report_incomplete_issue":{},"missing_data":{},"missing_tool":{},"noop":{"max":1,"report-as-issue":"false"},"report_incomplete":{}} + GH_AW_SAFE_OUTPUTS_CONFIG_0a0f9a5472dfe844_EOF - name: Generate Safe Outputs Tools env: GH_AW_TOOLS_META_JSON: | @@ -657,7 +657,7 @@ jobs: mkdir -p /home/runner/.copilot GH_AW_NODE=$(which node 2>/dev/null || command -v node 2>/dev/null || echo node) - cat << GH_AW_MCP_CONFIG_903e0d922f6fd3f9_EOF | "$GH_AW_NODE" "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.cjs" + cat << GH_AW_MCP_CONFIG_456f2e8364d9a618_EOF | "$GH_AW_NODE" "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.cjs" { "mcpServers": { "github": { @@ -701,7 +701,7 @@ jobs: "payloadDir": "${MCP_GATEWAY_PAYLOAD_DIR}" } } - GH_AW_MCP_CONFIG_903e0d922f6fd3f9_EOF + GH_AW_MCP_CONFIG_456f2e8364d9a618_EOF - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true @@ -1427,7 +1427,7 @@ jobs: GH_AW_ALLOWED_DOMAINS: "*.githubusercontent.com,api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,docs.github.com,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.blog,github.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,patch-diff.githubusercontent.com,ppa.launchpad.net,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com,www.googleapis.com" GITHUB_SERVER_URL: ${{ github.server_url }} GITHUB_API_URL: ${{ github.api_url }} - GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"create_pull_request\":{\"allowed_files\":[\".github/docs/**\"],\"draft\":false,\"labels\":[\"automation\",\"NO_RELEASE_NOTES\"],\"max\":1,\"max_patch_files\":100,\"max_patch_size\":1024,\"protect_top_level_dot_folders\":true,\"protected_files\":[\"package.json\",\"bun.lockb\",\"bunfig.toml\",\"deno.json\",\"deno.jsonc\",\"deno.lock\",\"global.json\",\"NuGet.Config\",\"Directory.Packages.props\",\"mix.exs\",\"mix.lock\",\"go.mod\",\"go.sum\",\"stack.yaml\",\"stack.yaml.lock\",\"pom.xml\",\"build.gradle\",\"build.gradle.kts\",\"settings.gradle\",\"settings.gradle.kts\",\"gradle.properties\",\"package-lock.json\",\"yarn.lock\",\"pnpm-lock.yaml\",\"npm-shrinkwrap.json\",\"requirements.txt\",\"Pipfile\",\"Pipfile.lock\",\"pyproject.toml\",\"setup.py\",\"setup.cfg\",\"Gemfile\",\"Gemfile.lock\",\"uv.lock\",\"CODEOWNERS\",\"DESIGN.md\",\"README.md\",\"CONTRIBUTING.md\",\"CHANGELOG.md\",\"SECURITY.md\",\"CODE_OF_CONDUCT.md\",\"AGENTS.md\",\"CLAUDE.md\",\"GEMINI.md\"],\"protected_files_policy\":\"request_review\",\"title_prefix\":\"[Agentic State Machine] \"},\"create_report_incomplete_issue\":{},\"missing_data\":{},\"missing_tool\":{},\"noop\":{\"max\":1,\"report-as-issue\":\"false\"},\"report_incomplete\":{}}" + GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"create_pull_request\":{\"allowed_files\":[\".github/docs/**\"],\"draft\":false,\"labels\":[\"automation\",\"NO_RELEASE_NOTES\"],\"max\":1,\"max_patch_files\":100,\"max_patch_size\":1024,\"protect_top_level_dot_folders\":true,\"protected_files\":[\"package.json\",\"bun.lockb\",\"bunfig.toml\",\"deno.json\",\"deno.jsonc\",\"deno.lock\",\"global.json\",\"NuGet.Config\",\"Directory.Packages.props\",\"mix.exs\",\"mix.lock\",\"go.mod\",\"go.sum\",\"stack.yaml\",\"stack.yaml.lock\",\"pom.xml\",\"build.gradle\",\"build.gradle.kts\",\"settings.gradle\",\"settings.gradle.kts\",\"gradle.properties\",\"package-lock.json\",\"yarn.lock\",\"pnpm-lock.yaml\",\"npm-shrinkwrap.json\",\"requirements.txt\",\"Pipfile\",\"Pipfile.lock\",\"pyproject.toml\",\"setup.py\",\"setup.cfg\",\"Gemfile\",\"Gemfile.lock\",\"uv.lock\",\"CODEOWNERS\",\"DESIGN.md\",\"README.md\",\"CONTRIBUTING.md\",\"CHANGELOG.md\",\"SECURITY.md\",\"CODE_OF_CONDUCT.md\",\"AGENTS.md\",\"CLAUDE.md\",\"GEMINI.md\"],\"protected_files_policy\":\"allowed\",\"title_prefix\":\"[Agentic State Machine] \"},\"create_report_incomplete_issue\":{},\"missing_data\":{},\"missing_tool\":{},\"noop\":{\"max\":1,\"report-as-issue\":\"false\"},\"report_incomplete\":{}}" GH_AW_CI_TRIGGER_TOKEN: ${{ secrets.GH_AW_CI_TRIGGER_TOKEN }} with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/agentic-state-machine.md b/.github/workflows/agentic-state-machine.md index 60433f9d54a..9fc491bba4b 100644 --- a/.github/workflows/agentic-state-machine.md +++ b/.github/workflows/agentic-state-machine.md @@ -29,6 +29,7 @@ safe-outputs: draft: false max: 1 allowed-files: [".github/docs/**"] + protected-files: allowed --- # Agentic State Machine — Diagram Generator From 1454c921a3811666785107811e22d0b34a8cd749 Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Thu, 28 May 2026 19:56:46 +0200 Subject: [PATCH 28/72] Fix source-build: track Cryptography.Xml via Version.Details (#19839) * Fix source-build: track System.Security.Cryptography.Xml via Version.Details Move System.Security.Cryptography.Xml version management from hardcoded eng/Versions.props to eng/Version.Details.xml + Version.Details.props, following the same pattern as System.Diagnostics.DiagnosticSource and other System.* runtime dependencies. This allows source-build to use the live-built package instead of a prebuilt NuGet download. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Restore PrivateAssets=all on System.Security.Cryptography.Xml Removing PrivateAssets=all caused transitive dependencies (Microsoft.Bcl.Cryptography, System.Formats.Asn1, etc.) to flow into fsc.fsproj on net472, triggering MSB3277 version conflicts with System.ValueTuple from .NET Framework reference assemblies. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot --- eng/Version.Details.props | 2 ++ eng/Version.Details.xml | 6 ++++++ eng/Versions.props | 1 - 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/eng/Version.Details.props b/eng/Version.Details.props index 82ad65afb5a..27fe3ea88b2 100644 --- a/eng/Version.Details.props +++ b/eng/Version.Details.props @@ -32,6 +32,7 @@ This file should be imported by eng/Versions.props 10.0.2 10.0.2 10.0.2 + 10.0.8 @@ -62,5 +63,6 @@ This file should be imported by eng/Versions.props $(SystemCompositionPackageVersion) $(SystemDiagnosticsDiagnosticSourcePackageVersion) $(SystemReflectionMetadataPackageVersion) + $(SystemSecurityCryptographyXmlPackageVersion) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 07b9c1ce026..80f7750a1f0 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -74,6 +74,12 @@ + + + https://github.com/dotnet/runtime + + + diff --git a/eng/Versions.props b/eng/Versions.props index 9f6b9d7b201..64e545f6118 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -89,7 +89,6 @@ 4.6.1 4.6.3 6.1.2 - 10.0.8 From f7114403c238bdc39dbf0d5db339e99bfa626872 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 29 May 2026 11:35:51 +0200 Subject: [PATCH 29/72] docs: update state-machine with security scan workflow and infra changes (#19856) - Add labelops-pr-security-scan (hourly PR safety classifier) - Update aw-auto-update to reflect create-agent-session delegation - Add all security scan labels to label dictionary - Update source hashes Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/docs/state-machine.md | 78 ++++++++++++++++++++++++++++++----- 1 file changed, 67 insertions(+), 11 deletions(-) diff --git a/.github/docs/state-machine.md b/.github/docs/state-machine.md index 7dde7f9a82c..1b590ac96fa 100644 --- a/.github/docs/state-machine.md +++ b/.github/docs/state-machine.md @@ -10,7 +10,8 @@ Auto-generated documentation of all agentic workflows in this repository. | **labelops-pr-maintenance** | ⏰ every 3h | PRs with AI-Auto-Resolve-* labels, CI status | comment, push, labels, dispatch | `AI-Auto-Resolve-CI`, `AI-Auto-Resolve-Conflicts`, `AI-needs-CI-fix-input` | | **regression-pr-shepherd** | ⏰ every 4h | PRs with `AI-Issue-Regression-PR` | comment, push, remove-labels | `AI-Issue-Regression-PR`, `AI-thinks-issue-fixed` | | **labelops-flake-fix** | 🤖 dispatched by labelops-pr-maintenance | Test results, PR diffs | PR, comment, issue | `Flaky`, `automation` | -| **aw-auto-update** | ⏰ every 24h | `.github/workflows/*` files | PR, push | `automation` | +| **labelops-pr-security-scan** | ⏰ every 1h | PR diffs, file lists | labels, comment | `AI-Tooling-Check-Scanned-Clean`, `AI-Tooling-Check-Bypassed`, `⚠️ Affects-*`, `⚠️ Suspicious-Prompting`, `⚠️ Scope-Review-Needed` | +| **aw-auto-update** | ⏰ every 24h | `.github/workflows/*` files | agent-session | `automation` | ## Issue Lifecycle @@ -124,6 +125,46 @@ stateDiagram-v2 Merged --> [*] ``` +## PR Security Scan Lifecycle + +```mermaid +stateDiagram-v2 + direction LR + + [*] --> ScanQueue: ⏰ labelops-pr-security-scan (1h) + + state "Per-PR Classification" as ScanLoop { + ScanQueue --> CheckMemory: 🤖 security-scan reads state.json + + state memcheck <> + CheckMemory --> memcheck + memcheck --> AlreadyScanned: sha unchanged + memcheck --> ClassifyOrigin: new or updated PR + + AlreadyScanned --> [*]: skip + + state origin <> + ClassifyOrigin --> origin + origin --> NonFork: headRepository == this repo + origin --> ForkPR: headRepository != this repo + + NonFork --> Bypassed: 🤖 adds AI-Tooling-Check-Bypassed + ForkPR --> ReadDiff: 🤖 reads file list + diff + + state classify <> + ReadDiff --> classify + classify --> Clean: no categories match + classify --> Flagged: ≥1 category matches + + Clean --> ScannedClean: 🤖 adds AI-Tooling-Check-Scanned-Clean + Flagged --> Labelled: 🤖 adds ⚠️ labels + comment (if changed) + } + + Bypassed --> [*] + ScannedClean --> [*] + Labelled --> [*]: 👤 maintainer reviews flagged areas +``` + ## Infrastructure Lifecycle ```mermaid @@ -139,16 +180,17 @@ stateDiagram-v2 UpToDate --> [*]: 🤖 aw-auto-update noops - ChangesDetected --> PRExists: 🤖 checks for existing PR + ChangesDetected --> DedupeCheck: 🤖 checks for existing PR/session - state prcheck <> - PRExists --> prcheck - prcheck --> UpdateExisting: open PR found - prcheck --> CreateNew: no open PR + state dedup <> + DedupeCheck --> dedup + dedup --> AlreadyOpen: open PR or session exists + dedup --> Delegate: no existing PR/session - UpdateExisting --> WaitReview: 🤖 aw-auto-update pushes to branch - CreateNew --> WaitReview: 🤖 aw-auto-update creates PR + AlreadyOpen --> [*]: 🤖 aw-auto-update noops + Delegate --> AgentSession: 🤖 aw-auto-update creates agent-session + AgentSession --> WaitReview: 🤖 Copilot Coding Agent opens PR WaitReview --> Merged: 👤 maintainer reviews + merges Merged --> [*] ``` @@ -164,6 +206,17 @@ stateDiagram-v2 | `AI-needs-CI-fix-input` | 🤖 labelops-pr-maintenance | 🤖 labelops-pr-maintenance, 👤 maintainer | CI failure requires human intervention | | `AI-Issue-Regression-PR` | 🤖 repo-assist | 🤖 regression-pr-shepherd, 🤖 labelops-pr-maintenance (exclude) | PR is a regression test created by repo-assist | | `Flaky` | 🤖 labelops-flake-fix | 👤 maintainer | Test identified as non-deterministic | +| `AI-Tooling-Check-Scanned-Clean` | 🤖 labelops-pr-security-scan | 👤 maintainer | Fork PR scanned, no safety concerns found | +| `AI-Tooling-Check-Bypassed` | 🤖 labelops-pr-security-scan | 👤 maintainer | Non-fork PR, scan bypassed (trusted origin) | +| `⚠️ Affects-Build-Infra` | 🤖 labelops-pr-security-scan | 👤 maintainer | PR modifies build infrastructure | +| `⚠️ Affects-Compiler-Output` | 🤖 labelops-pr-security-scan | 👤 maintainer | PR affects compiler output | +| `⚠️ Affects-Bootstrap` | 🤖 labelops-pr-security-scan | 👤 maintainer | PR affects bootstrap process | +| `⚠️ Affects-Restore` | 🤖 labelops-pr-security-scan | 👤 maintainer | PR modifies restore/package resolution | +| `⚠️ Affects-Design-Time` | 🤖 labelops-pr-security-scan | 👤 maintainer | PR affects design-time behavior | +| `⚠️ Affects-Test-Tooling` | 🤖 labelops-pr-security-scan | 👤 maintainer | PR modifies test tooling | +| `⚠️ Affects-Agent-Config` | 🤖 labelops-pr-security-scan | 👤 maintainer | PR modifies AI agent configuration | +| `⚠️ Suspicious-Prompting` | 🤖 labelops-pr-security-scan | 👤 maintainer | PR contains prompt injection patterns | +| `⚠️ Scope-Review-Needed` | 🤖 labelops-pr-security-scan | 👤 maintainer | PR diff exceeds stated scope | | `automation` | 🤖 aw-auto-update, 🤖 labelops-flake-fix | 👤 maintainer | PR was created by automation | | `NO_RELEASE_NOTES` | 🤖 repo-assist, 🤖 labelops-flake-fix | ⚙️ CI | PR does not need release notes entry | | `repo-assist` | 🤖 repo-assist | 🤖 repo-assist | Issue is managed by repo-assist (monthly summary) | @@ -182,14 +235,17 @@ stateDiagram-v2 | ⏰ scheduler | 🤖 repo-assist | Every 12h | Cron schedule | | ⏰ scheduler | 🤖 labelops-pr-maintenance | Every 3h | Cron schedule | | ⏰ scheduler | 🤖 regression-pr-shepherd | Every 4h | Cron schedule | +| ⏰ scheduler | 🤖 labelops-pr-security-scan | Every 1h | Cron schedule | | ⏰ scheduler | 🤖 aw-auto-update | Every 24h | Cron schedule | +| 🤖 aw-auto-update | 🤖 Copilot Coding Agent | Changes detected | `create-agent-session` safe output | | 🤖 repo-assist | 🤖 repo-assist | Own PR has CI failure or conflicts | `push-to-pull-request-branch` (self-heal) | | 🤖 labelops-flake-fix | 🤖 labelops-pr-maintenance | Fix PR created | Originating PR comment posted | From c8e6e456a0d82c6376dac83717b2250c0ba9ef75 Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Fri, 29 May 2026 11:36:32 +0200 Subject: [PATCH 30/72] Fix #18841: let _ = &expr now compiles like let x = &expr (#19811) --- .../.FSharp.Compiler.Service/11.0.100.md | 1 + .../Checking/Expressions/CheckExpressions.fs | 11 +- .../DataExpressions/AddressOf/AddressOf.fs | 120 ++++++++++++++++++ 3 files changed, 129 insertions(+), 3 deletions(-) diff --git a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md index c18e1d8f213..90d344310ef 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md +++ b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md @@ -1,5 +1,6 @@ ### Fixed +* Fix FS0421 "The address of the variable cannot be used at this point" incorrectly raised for the discard pattern `let _ = &expr` when `let x = &expr` compiles. ([Issue #18841](https://github.com/dotnet/fsharp/issues/18841), [PR #19811](https://github.com/dotnet/fsharp/pull/19811)) * Honor `--nowarn` and `--warnaserror` for warnings emitted during command-line option parsing ([Issue #19576](https://github.com/dotnet/fsharp/issues/19576), [PR #19776](https://github.com/dotnet/fsharp/pull/19776)) * Fix `[]` prefix attributes being silently dropped on class members, and fix false-positive `AllowMultiple=false` errors when `[]` and `[]` are applied to the same binding. ([Issue #17904](https://github.com/dotnet/fsharp/issues/17904), [Issue #19020](https://github.com/dotnet/fsharp/issues/19020), [PR #19738](https://github.com/dotnet/fsharp/pull/19738)) * Fix attributes on return type of unparenthesized tuple methods being silently dropped from IL. ([Issue #462](https://github.com/dotnet/fsharp/issues/462), [PR #19714](https://github.com/dotnet/fsharp/pull/19714)) diff --git a/src/Compiler/Checking/Expressions/CheckExpressions.fs b/src/Compiler/Checking/Expressions/CheckExpressions.fs index 37ff7f54b66..83e172628b5 100644 --- a/src/Compiler/Checking/Expressions/CheckExpressions.fs +++ b/src/Compiler/Checking/Expressions/CheckExpressions.fs @@ -11883,9 +11883,14 @@ and TcLetBinding (cenv: cenv) isUse env containerInfo declKind tpenv (synBinds, let rhsExpr = mkTypeLambda m generalizedTypars (rhsExpr, tauTy) match checkedPat with - // Don't introduce temporary or 'let' for 'match against wild' or 'match against unit' - - | TPat_wild _ | TPat_const (Const.Unit, _) when not isUse && not isFixed && isNil generalizedTypars -> + // Don't introduce temporary or 'let' for 'match against wild' or 'match against unit', + // unless the RHS is a byref-like value (e.g. `let _ = &s`). For byref-like RHS we + // must keep a real `Expr.Let` so that PostInferenceChecks treats the binding as + // permitting byref expressions, matching the behaviour of `let v = &s`. + // See issue dotnet/fsharp#18841. + + | TPat_wild _ | TPat_const (Const.Unit, _) + when not isUse && not isFixed && isNil generalizedTypars && not (isByrefLikeTy g m tauTy) -> let mkSequentialBind (tm, tmty) = mkSequential m rhsExpr tm, tmty (buildExpr >> mkSequentialBind, env, tpenv) | _ -> diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/DataExpressions/AddressOf/AddressOf.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/DataExpressions/AddressOf/AddressOf.fs index 4f9ceb2067d..4005d80bf5d 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/DataExpressions/AddressOf/AddressOf.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/DataExpressions/AddressOf/AddressOf.fs @@ -27,3 +27,123 @@ module AddressOf = |> shouldFail |> withErrorCode 431 |> withDiagnosticMessageMatches "byref" + + // Issue #18841: let _ = &expr should compile (parity with let x = &expr) + + [] + let ``Issue 18841 - let discard with address-of struct value compiles`` () = + Fsx """ +module Test + +type S = + struct + val Field: int + end + +let test () = + let s = S() + let _ = &s + let a = &s + ignore a + """ + |> typecheck + |> shouldSucceed + + [] + let ``Issue 18841 - let discard with address-of mutable local compiles`` () = + Fsx """ +module Test +let test () = + let mutable x = 42 + let _ = &x + () + """ + |> typecheck + |> shouldSucceed + + [] + let ``Issue 18841 - let discard with address-of struct field compiles`` () = + Fsx """ +module Test + +[] +type S = { mutable Field: int } + +let test () = + let mutable s = { Field = 0 } + let _ = &s.Field + () + """ + |> typecheck + |> shouldSucceed + + [] + let ``Issue 18841 - let discard with parenthesized address-of compiles`` () = + Fsx """ +module Test + +type S = + struct + val Field: int + end + +let test () = + let s = S() + let _ = &(s) + () + """ + |> typecheck + |> shouldSucceed + + [] + let ``Issue 18841 - let discard with address-of inside function parameter compiles`` () = + Fsx """ +module Test + +type S = + struct + val Field: int + end + +let f (s: S) = + let _ = &s + () + """ + |> typecheck + |> shouldSucceed + + [] + let ``Issue 18841 - named binding let x = &s still compiles (regression guard)`` () = + Fsx """ +module Test + +type S = + struct + val Field: int + end + +let test () = + let s = S() + let a = &s + ignore a + """ + |> typecheck + |> shouldSucceed + + [] + let ``Issue 18841 - plain let discard with no address-of still compiles`` () = + Fsx """ +module Test + +type S = + struct + val Field: int + end + +let test () = + let s = S() + let _ = s + () + """ + |> typecheck + |> shouldSucceed From 565bcdb35f4e9c001787b9466342a7800e191d07 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Fri, 29 May 2026 11:42:57 +0200 Subject: [PATCH 31/72] Fix docs path exclusion to use recursive wildcard in azure-pipelines-PR.yml (#19848) * Initial plan * Fix docs path exclusion to use recursive wildcard docs/** Co-authored-by: T-Gro <46543583+T-Gro@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: T-Gro <46543583+T-Gro@users.noreply.github.com> --- azure-pipelines-PR.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines-PR.yml b/azure-pipelines-PR.yml index 4b76589ea7a..b627fab985c 100644 --- a/azure-pipelines-PR.yml +++ b/azure-pipelines-PR.yml @@ -12,7 +12,7 @@ trigger: - '*' exclude: - .github/* - - docs/* + - docs/** - .vscode/* - .devcontainer/* - tests/scripts/* @@ -39,7 +39,7 @@ pr: - '*' exclude: - .github/* - - docs/* + - docs/** - attributions.md - CODE_OF_CONDUCT.md - DEVGUIDE.md From d5364f2fb63ed13652f5074add7bbc4406605708 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Fri, 29 May 2026 11:43:40 +0200 Subject: [PATCH 32/72] Add concurrency group to PR Tooling Safety Check workflow (#19841) * Initial plan * Add concurrency group to PR Tooling Safety Check to prevent concurrent repo-memory pushes Co-authored-by: T-Gro <46543583+T-Gro@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: T-Gro <46543583+T-Gro@users.noreply.github.com> Co-authored-by: Tomas Grosup --- .../labelops-pr-security-scan.lock.yml | 29 ++++++++++--------- .../workflows/labelops-pr-security-scan.md | 4 +++ 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/.github/workflows/labelops-pr-security-scan.lock.yml b/.github/workflows/labelops-pr-security-scan.lock.yml index 89f9e9c1926..bbcc43adfd8 100644 --- a/.github/workflows/labelops-pr-security-scan.lock.yml +++ b/.github/workflows/labelops-pr-security-scan.lock.yml @@ -1,4 +1,4 @@ -# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"636a346cf305f9bd3a333fdd180ffa87ff8df176d6b95b44bb7bd545201b912b","compiler_version":"v0.76.1","strict":true,"agent_id":"copilot"} +# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"0badf5a43f9b4c078fc6eaed74b5fbb08c507f7707f433b5ffc5cf4d2d9addea","compiler_version":"v0.76.1","strict":true,"agent_id":"copilot"} # gh-aw-manifest: {"version":1,"secrets":["COPILOT_GITHUB_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/checkout","sha":"de0fac2e4500dabe0009e67214ff5f5447ce83dd","version":"v6.0.2"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/setup-node","sha":"48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e","version":"v6.4.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"},{"repo":"github/gh-aw-actions/setup","sha":"46d564922b082d0db93244972e8005ea6904ee5f","version":"v0.76.1"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.25.55"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.55"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.25.55"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.3.19"},{"image":"ghcr.io/github/github-mcp-server:v1.0.4","digest":"sha256:e3816a476a977cfb836e7d221510011436c654d11861db66ecfd826601aba6a4","pinned_image":"ghcr.io/github/github-mcp-server:v1.0.4@sha256:e3816a476a977cfb836e7d221510011436c654d11861db66ecfd826601aba6a4"},{"image":"node:lts-alpine","digest":"sha256:2bdb65ed1dab192432bc31c95f94155ca5ad7fc1392fb7eb7526ab682fa5bf14","pinned_image":"node:lts-alpine@sha256:2bdb65ed1dab192432bc31c95f94155ca5ad7fc1392fb7eb7526ab682fa5bf14"}]} # ___ _ _ # / _ \ | | (_) @@ -65,7 +65,8 @@ on: permissions: {} concurrency: - group: "gh-aw-${{ github.workflow }}" + cancel-in-progress: false + group: labelops-pr-security-scan run-name: "PR Tooling Safety Check" @@ -191,21 +192,21 @@ jobs: run: | bash "${RUNNER_TEMP}/gh-aw/actions/create_prompt_first.sh" { - cat << 'GH_AW_PROMPT_df1e042d37d12612_EOF' + cat << 'GH_AW_PROMPT_7907a5ffbf75bd73_EOF' - GH_AW_PROMPT_df1e042d37d12612_EOF + GH_AW_PROMPT_7907a5ffbf75bd73_EOF cat "${RUNNER_TEMP}/gh-aw/prompts/xpia.md" cat "${RUNNER_TEMP}/gh-aw/prompts/temp_folder_prompt.md" cat "${RUNNER_TEMP}/gh-aw/prompts/markdown.md" cat "${RUNNER_TEMP}/gh-aw/prompts/repo_memory_prompt.md" cat "${RUNNER_TEMP}/gh-aw/prompts/safe_outputs_prompt.md" - cat << 'GH_AW_PROMPT_df1e042d37d12612_EOF' + cat << 'GH_AW_PROMPT_7907a5ffbf75bd73_EOF' Tools: add_comment(max:25), add_labels(max:50), missing_tool, missing_data, noop - GH_AW_PROMPT_df1e042d37d12612_EOF + GH_AW_PROMPT_7907a5ffbf75bd73_EOF cat "${RUNNER_TEMP}/gh-aw/prompts/mcp_cli_tools_prompt.md" - cat << 'GH_AW_PROMPT_df1e042d37d12612_EOF' + cat << 'GH_AW_PROMPT_7907a5ffbf75bd73_EOF' The following GitHub context information is available for this workflow: {{#if github.actor}} @@ -234,12 +235,12 @@ jobs: {{/if}} - GH_AW_PROMPT_df1e042d37d12612_EOF + GH_AW_PROMPT_7907a5ffbf75bd73_EOF cat "${RUNNER_TEMP}/gh-aw/prompts/github_mcp_tools_with_safeoutputs_prompt.md" - cat << 'GH_AW_PROMPT_df1e042d37d12612_EOF' + cat << 'GH_AW_PROMPT_7907a5ffbf75bd73_EOF' {{#runtime-import .github/workflows/labelops-pr-security-scan.md}} - GH_AW_PROMPT_df1e042d37d12612_EOF + GH_AW_PROMPT_7907a5ffbf75bd73_EOF } > "$GH_AW_PROMPT" - name: Interpolate variables and render templates uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 @@ -465,9 +466,9 @@ jobs: mkdir -p "${RUNNER_TEMP}/gh-aw/safeoutputs" mkdir -p /tmp/gh-aw/safeoutputs mkdir -p /tmp/gh-aw/mcp-logs/safeoutputs - cat > "${RUNNER_TEMP}/gh-aw/safeoutputs/config.json" << 'GH_AW_SAFE_OUTPUTS_CONFIG_450ea76844541048_EOF' + cat > "${RUNNER_TEMP}/gh-aw/safeoutputs/config.json" << 'GH_AW_SAFE_OUTPUTS_CONFIG_5d417a6af96a1108_EOF' {"add_comment":{"hide_older_comments":true,"max":25,"target":"*"},"add_labels":{"allowed":["AI-Tooling-Check-Scanned-Clean","AI-Tooling-Check-Bypassed","⚠️ Affects-Build-Infra","⚠️ Affects-Compiler-Output","⚠️ Affects-Bootstrap","⚠️ Affects-Restore","⚠️ Affects-Design-Time","⚠️ Affects-Test-Tooling","⚠️ Affects-Agent-Config","⚠️ Suspicious-Prompting","⚠️ Scope-Review-Needed"],"max":50,"target":"*"},"create_report_incomplete_issue":{},"missing_data":{},"missing_tool":{},"noop":{"max":1,"report-as-issue":"false"},"push_repo_memory":{"memories":[{"dir":"/tmp/gh-aw/repo-memory/default","id":"default","max_file_count":100,"max_file_size":102400,"max_patch_size":10240}]},"report_incomplete":{}} - GH_AW_SAFE_OUTPUTS_CONFIG_450ea76844541048_EOF + GH_AW_SAFE_OUTPUTS_CONFIG_5d417a6af96a1108_EOF - name: Generate Safe Outputs Tools env: GH_AW_TOOLS_META_JSON: | @@ -679,7 +680,7 @@ jobs: mkdir -p /home/runner/.copilot GH_AW_NODE=$(which node 2>/dev/null || command -v node 2>/dev/null || echo node) - cat << GH_AW_MCP_CONFIG_47ad2461f6be2b34_EOF | "$GH_AW_NODE" "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.cjs" + cat << GH_AW_MCP_CONFIG_d4d457ef9db914af_EOF | "$GH_AW_NODE" "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.cjs" { "mcpServers": { "github": { @@ -723,7 +724,7 @@ jobs: "payloadDir": "${MCP_GATEWAY_PAYLOAD_DIR}" } } - GH_AW_MCP_CONFIG_47ad2461f6be2b34_EOF + GH_AW_MCP_CONFIG_d4d457ef9db914af_EOF - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/labelops-pr-security-scan.md b/.github/workflows/labelops-pr-security-scan.md index a99366c4ebc..227ad950482 100644 --- a/.github/workflows/labelops-pr-security-scan.md +++ b/.github/workflows/labelops-pr-security-scan.md @@ -11,6 +11,10 @@ on: timeout-minutes: 15 +concurrency: + group: labelops-pr-security-scan + cancel-in-progress: false + permissions: read-all network: From 0d2b018f8bf52128a31a98a2d06f7cd014adfb4c Mon Sep 17 00:00:00 2001 From: Eugene Auduchinok Date: Fri, 29 May 2026 11:44:13 +0200 Subject: [PATCH 33/72] Symbols: add ObsoleteDiagnosticInfo (#19359) * Symbols: add ObsoleteDiagnosticInfo * Extracts fast checks for Obsolete attribute * Fixes RequiredMembers check * Adds Checker.getMethodOverloads test helper * Release notes * Rename * Fix VisualFSharp build --- .../.FSharp.Compiler.Service/11.0.100.md | 1 + src/Compiler/Checking/AttributeChecking.fs | 223 +++++++++++------- src/Compiler/Checking/AttributeChecking.fsi | 14 +- src/Compiler/Facilities/DiagnosticsLogger.fs | 4 +- src/Compiler/Facilities/DiagnosticsLogger.fsi | 7 + src/Compiler/Symbols/Symbols.fs | 42 +++- src/Compiler/Symbols/Symbols.fsi | 9 + .../FSharp.Compiler.Service.Tests/Checker.fs | 7 + ...iler.Service.SurfaceArea.netstandard20.bsl | 27 +++ .../FSharp.Compiler.Service.Tests.fsproj | 1 + .../TypeChecker/Obsolete.fs | 95 ++++++++ .../FSharp.Editor/CodeFixes/CodeFixHelpers.fs | 2 +- 12 files changed, 343 insertions(+), 89 deletions(-) create mode 100644 tests/FSharp.Compiler.Service.Tests/TypeChecker/Obsolete.fs diff --git a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md index 90d344310ef..70ca7428416 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md +++ b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md @@ -69,6 +69,7 @@ ### Added * Added warning FS3884 when a function or delegate value is used as an interpolated string argument. ([PR #19289](https://github.com/dotnet/fsharp/pull/19289)) +* Symbols: add ObsoleteDiagnosticInfo ([PR #19359](https://github.com/dotnet/fsharp/pull/19359)) * Add `#version;;` directive to F# Interactive to display version and environment information. ([Issue #13307](https://github.com/dotnet/fsharp/issues/13307), [PR #19332](https://github.com/dotnet/fsharp/pull/19332)) ### Changed diff --git a/src/Compiler/Checking/AttributeChecking.fs b/src/Compiler/Checking/AttributeChecking.fs index a7352914720..695eb4f3286 100755 --- a/src/Compiler/Checking/AttributeChecking.fs +++ b/src/Compiler/Checking/AttributeChecking.fs @@ -6,11 +6,11 @@ module internal FSharp.Compiler.AttributeChecking open System open System.Collections.Generic +open FSharp.Compiler.Text.Range open Internal.Utilities.Library open FSharp.Compiler.AbstractIL.IL open FSharp.Compiler open FSharp.Compiler.DiagnosticsLogger -open FSharp.Compiler.Features open FSharp.Compiler.Import open FSharp.Compiler.Infos open FSharp.Compiler.TcGlobals @@ -255,25 +255,31 @@ let rec MethInfoHasWellKnownAttribute g (m: range) (ilFlag: WellKnownILAttribute let MethInfoHasWellKnownAttributeSpec (g: TcGlobals) (m: range) (spec: WellKnownMethAttribute) (minfo: MethInfo) = MethInfoHasWellKnownAttribute g m spec.ILFlag spec.ValFlag spec.AttribInfo minfo -let private CheckCompilerFeatureRequiredAttribute cattrs msg m = - // In some cases C# will generate both ObsoleteAttribute and CompilerFeatureRequiredAttribute. - // Specifically, when default constructor is generated for class with any required members in them. - // ObsoleteAttribute should be ignored if CompilerFeatureRequiredAttribute is present, and its name is "RequiredMembers". +let private reportObsoleteDiagnostic m diagnostic = + match diagnostic with + | Some(ObsoleteDiagnosticInfo(isError, id, msg, urlFormat)) -> + let obsoleteDiagnostic = ObsoleteDiagnostic(isError, id, msg, urlFormat, m) + if isError then + ErrorD(obsoleteDiagnostic) + else + WarnD(obsoleteDiagnostic) + + | _ -> CompleteD + +let private HasCompilerFeatureRequiredAttribute (cattrs: ILAttributes) = match cattrs with - | ILAttribDecoded WellKnownILAttributes.CompilerFeatureRequiredAttribute ([ILAttribElem.String (Some featureName) ], _) when featureName = "RequiredMembers" -> - CompleteD - | _ -> - ErrorD (ObsoleteDiagnostic(true, None, msg, None, m)) - + | ILAttribDecoded WellKnownILAttributes.CompilerFeatureRequiredAttribute ([ ILAttribElem.String(Some featureName) ], _) -> featureName = "RequiredMembers" + | _ -> false + let private extractILAttribValueFrom name namedArgs = match namedArgs with | ExtractILAttributeNamedArg name (AttribElemStringArg v) -> Some v | _ -> None -let private extractILAttributeInfo namedArgs = +let private extractILObsoleteAttributeInfo namedArgs = let diagnosticId = extractILAttribValueFrom "DiagnosticId" namedArgs let urlFormat = extractILAttribValueFrom "UrlFormat" namedArgs - (diagnosticId, urlFormat) + diagnosticId, urlFormat let private CheckILExperimentalAttributes cattrs m = match cattrs with @@ -296,47 +302,39 @@ let private CheckILExperimentalAttributes cattrs m = // Empty constructor or only UrlFormat property are not allowed. | _ -> CompleteD -let private CheckILObsoleteAttributes (g: TcGlobals) isByrefLikeTyconRef cattrs m = +let TryGetILObsoleteInfo (g: TcGlobals) isByrefLikeTyconRef cattrs : ObsoleteDiagnosticInfo option = if isByrefLikeTyconRef then + None + else + match TryDecodeILAttribute g.attrib_SystemObsolete.TypeRef cattrs with + | Some([ attribElement ], namedArgs) -> + let diagnosticId, urlFormat = extractILObsoleteAttributeInfo namedArgs + let msg = + match attribElement with + | ILAttribElem.String(Some msg) -> Some msg + | ILAttribElem.String None + | _ -> None + + Some(ObsoleteDiagnosticInfo(false, diagnosticId, msg, urlFormat)) + + | Some([ILAttribElem.String msg; ILAttribElem.Bool isError ], namedArgs) -> + let diagnosticId, urlFormat = extractILObsoleteAttributeInfo namedArgs + Some(ObsoleteDiagnosticInfo(isError, diagnosticId, msg, urlFormat)) + + | Some(_, namedArgs) -> + let diagnosticId, urlFormat = extractILObsoleteAttributeInfo namedArgs + Some(ObsoleteDiagnosticInfo(false, diagnosticId, None, urlFormat)) + + | None -> None + +let private CheckILObsoleteAttributes (g: TcGlobals) isByrefLikeTyconRef cattrs m = + // In some cases C# will generate both ObsoleteAttribute and CompilerFeatureRequiredAttribute. + // Specifically, when default constructor is generated for class with any required members in them. + // ObsoleteAttribute should be ignored if CompilerFeatureRequiredAttribute is present, and its name is "RequiredMembers". + if isByrefLikeTyconRef || HasCompilerFeatureRequiredAttribute cattrs then CompleteD else - match cattrs with - // [Obsolete] - // [Obsolete("Message")] - // [Obsolete("Message", true)] - // [Obsolete("Message", DiagnosticId = "DiagnosticId")] - // [Obsolete("Message", DiagnosticId = "DiagnosticId", UrlFormat = "UrlFormat")] - // [Obsolete(DiagnosticId = "DiagnosticId")] - // [Obsolete(DiagnosticId = "DiagnosticId", UrlFormat = "UrlFormat")] - // [Obsolete("Message", true, DiagnosticId = "DiagnosticId")] - // [Obsolete("Message", true, DiagnosticId = "DiagnosticId", UrlFormat = "UrlFormat")] - // Constructors deciding on IsError and Message properties. - | ILAttribDecoded WellKnownILAttributes.ObsoleteAttribute decoded -> - match decoded with - | ([ attribElement ], namedArgs) -> - let diagnosticId, urlFormat = extractILAttributeInfo namedArgs - let msg = - match attribElement with - | ILAttribElem.String (Some msg) -> Some msg - | ILAttribElem.String None - | _ -> None - - WarnD (ObsoleteDiagnostic(false, diagnosticId, msg, urlFormat, m)) - | ([ILAttribElem.String msg; ILAttribElem.Bool isError ], namedArgs) -> - let diagnosticId, urlFormat = extractILAttributeInfo namedArgs - if isError then - if g.langVersion.SupportsFeature(LanguageFeature.RequiredPropertiesSupport) then - CheckCompilerFeatureRequiredAttribute cattrs msg m - else - ErrorD (ObsoleteDiagnostic(true, diagnosticId, msg, urlFormat, m)) - else - WarnD (ObsoleteDiagnostic(false, diagnosticId, msg, urlFormat, m)) - // Only DiagnosticId, UrlFormat - | (_, namedArgs) -> - let diagnosticId, urlFormat = extractILAttributeInfo namedArgs - WarnD(ObsoleteDiagnostic(false, diagnosticId, None, urlFormat, m)) - // No arguments - | _ -> CompleteD + TryGetILObsoleteInfo g isByrefLikeTyconRef cattrs |> reportObsoleteDiagnostic m /// Check IL attributes for Experimental, warnings as data let private CheckILAttributes (g: TcGlobals) isByrefLikeTyconRef cattrs m = @@ -354,23 +352,39 @@ let private extractObsoleteAttributeInfo namedArgs = let urlFormat = extractILAttribValueFrom "UrlFormat" namedArgs (diagnosticId, urlFormat) +let TryGetFSharpObsoleteInfo g attribs : ObsoleteDiagnosticInfo option = + // [] + // [] + // [] + // [] + // [] + // [] + // [] + // [] + // [] + // Constructors deciding on IsError and Message properties. + match TryFindFSharpAttribute g g.attrib_SystemObsolete attribs with + | Some(Attrib(unnamedArgs = [ AttribStringArg s ]; propVal = namedArgs)) -> + let diagnosticId, urlFormat = extractObsoleteAttributeInfo namedArgs + Some(ObsoleteDiagnosticInfo(false, diagnosticId, Some s, urlFormat)) + + | Some(Attrib(unnamedArgs = [ AttribStringArg s; AttribBoolArg(isError) ]; propVal = namedArgs)) -> + let diagnosticId, urlFormat = extractObsoleteAttributeInfo namedArgs + Some(ObsoleteDiagnosticInfo(isError, diagnosticId, Some s, urlFormat)) + + // Only DiagnosticId, UrlFormat + | Some(Attrib(propVal = namedArgs)) -> + let diagnosticId, urlFormat = extractObsoleteAttributeInfo namedArgs + Some(ObsoleteDiagnosticInfo(false, diagnosticId, None, urlFormat)) + + | None -> None + let private CheckObsoleteAttributes g attribs m = trackErrors { - match attribs with - | EntityAttrib g WellKnownEntityAttributes.ObsoleteAttribute (Attrib(unnamedArgs= [ AttribStringArg s ]; propVal= namedArgs)) -> - let diagnosticId, urlFormat = extractObsoleteAttributeInfo namedArgs - do! WarnD(ObsoleteDiagnostic(false, diagnosticId, Some s, urlFormat, m)) - | EntityAttrib g WellKnownEntityAttributes.ObsoleteAttribute (Attrib(unnamedArgs= [ AttribStringArg s; AttribBoolArg(isError) ]; propVal= namedArgs)) -> - let diagnosticId, urlFormat = extractObsoleteAttributeInfo namedArgs - if isError then - do! ErrorD (ObsoleteDiagnostic(true, diagnosticId, Some s, urlFormat, m)) - else - do! WarnD (ObsoleteDiagnostic(false, diagnosticId, Some s, urlFormat, m)) - // Only DiagnosticId, UrlFormat - | EntityAttrib g WellKnownEntityAttributes.ObsoleteAttribute (Attrib(propVal= namedArgs)) -> - let diagnosticId, urlFormat = extractObsoleteAttributeInfo namedArgs - do! WarnD(ObsoleteDiagnostic(false, diagnosticId, None, urlFormat, m)) - | _ -> () + match TryGetFSharpObsoleteInfo g attribs with + | Some _ as diag -> + do! reportObsoleteDiagnostic m diag + | _ -> () } let private CheckCompilerMessageAttribute g attribs m = @@ -431,22 +445,23 @@ let CheckFSharpAttributes (g:TcGlobals) attribs m = } #if !NO_TYPEPROVIDERS -/// Check a list of provided attributes for 'ObsoleteAttribute', returning errors and warnings as data -let private CheckProvidedAttributes (g: TcGlobals) m (provAttribs: Tainted) = +let TryGetProvidedObsoleteInfo (g: TcGlobals) m (provAttribs: Tainted) : ObsoleteDiagnosticInfo option = let (AttribInfo(tref, _)) = g.attrib_SystemObsolete - match provAttribs.PUntaint((fun a -> a.GetAttributeConstructorArgs(provAttribs.TypeProvider.PUntaintNoFailure(id), tref.FullName)), m) with - | Some ([ Some (:? string as msg) ], _) -> WarnD(ObsoleteDiagnostic(false, None, Some msg, None, m)) - | Some ([ Some (:? string as msg); Some (:?bool as isError) ], _) -> - if isError then - ErrorD (ObsoleteDiagnostic(true, None, Some msg, None, m)) - else - WarnD (ObsoleteDiagnostic(false, None, Some msg, None, m)) - | Some ([ None ], _) -> - WarnD(ObsoleteDiagnostic(false, None, None, None, m)) - | Some _ -> - WarnD(ObsoleteDiagnostic(false, None, None, None, m)) - | None -> - CompleteD + match provAttribs.PUntaint(_.GetAttributeConstructorArgs(provAttribs.TypeProvider.PUntaintNoFailure(id), tref.FullName), m) with + | Some([ Some (:? string as msg) ], _) -> + Some(ObsoleteDiagnosticInfo(false, None, Some msg, None)) + + | Some([ Some (:? string as msg); Some (:? bool as isError) ], _) -> + Some(ObsoleteDiagnosticInfo(isError, None, Some msg, None)) + + | Some _ -> + Some(ObsoleteDiagnosticInfo(false, None, None, None)) + + | _ -> None + +/// Check a list of provided attributes for 'ObsoleteAttribute', returning errors and warnings as data +let private CheckProvidedAttributes (g: TcGlobals) m (provAttribs: Tainted) = + TryGetProvidedObsoleteInfo g m provAttribs |> reportObsoleteDiagnostic m #endif /// Indicate if IL attributes contain 'ObsoleteAttribute'. Used to suppress the item in intellisense. @@ -507,12 +522,21 @@ let CheckPropInfoAttributes pinfo m = #if !NO_TYPEPROVIDERS | ProvidedProp (amap, pi, m) -> CheckProvidedAttributes amap.g m (pi.PApply((fun st -> (st :> IProvidedCustomAttributeProvider)), m)) - #endif +let TryGetPropObsoleteInfo pinfo = + match pinfo with + | ILProp(ILPropInfo(_, pdef)) -> TryGetILObsoleteInfo pinfo.TcGlobals false pdef.CustomAttrs + | FSProp(g, _, Some vref, _) + | FSProp(g, _, _, Some vref) -> TryGetFSharpObsoleteInfo g vref.Attribs + | FSProp _ -> failwith "CheckPropInfoAttributes: unreachable" +#if !NO_TYPEPROVIDERS + | ProvidedProp (amap, pi, m) -> + TryGetProvidedObsoleteInfo amap.g m (pi.PApply((fun st -> (st :> IProvidedCustomAttributeProvider)), m)) +#endif /// Check the attributes associated with a IL field, returning warnings and errors as data. -let CheckILFieldAttributes g (finfo:ILFieldInfo) m = +let CheckILFieldAttributes g (finfo: ILFieldInfo) m = match finfo with | ILFieldInfo(_, pd) -> CheckILAttributes g false pd.CustomAttrs m |> CommitOperationResult @@ -521,16 +545,35 @@ let CheckILFieldAttributes g (finfo:ILFieldInfo) m = CheckProvidedAttributes amap.g m (fi.PApply((fun st -> (st :> IProvidedCustomAttributeProvider)), m)) |> CommitOperationResult #endif +let TryGetILFieldObsoleteInfo g (finfo : ILFieldInfo) = + match finfo with + | ILFieldInfo(_, pd) -> TryGetILObsoleteInfo g false pd.CustomAttrs +#if !NO_TYPEPROVIDERS + | ProvidedField (amap, fi, m) -> + TryGetProvidedObsoleteInfo amap.g m (fi.PApply((fun st -> (st :> IProvidedCustomAttributeProvider)), m)) +#endif + /// Check the attributes on an entity, returning errors and warnings as data. let CheckEntityAttributes g (tcref: TyconRef) m = - if tcref.IsILTycon then + if tcref.IsILTycon then CheckILAttributes g (isByrefLikeTyconRef g m tcref) tcref.ILTyconRawMetadata.CustomAttrs m - else + else CheckFSharpAttributes g tcref.Attribs m - + +let TryGetEntityObsoleteInfo g (tcref: TyconRef) = + if tcref.IsILTycon then + TryGetILObsoleteInfo g (isByrefLikeTyconRef g range0 tcref) tcref.ILTyconRawMetadata.CustomAttrs + else + TryGetFSharpObsoleteInfo g tcref.Attribs + let CheckILEventAttributes g (tcref: TyconRef) cattrs m = CheckILAttributes g (isByrefLikeTyconRef g m tcref) cattrs m +let TryGetEventObsoleteInfo (einfo: EventInfo) = + match einfo with + | ILEvent(ILEventInfo(_, ilEventDef)) -> TryGetILObsoleteInfo einfo.TcGlobals false ilEventDef.CustomAttrs + | _ -> None + let CheckUnitOfMeasureAttributes g (measure: Measure) = let checkAttribs tm m = let attribs = @@ -580,6 +623,16 @@ let CheckMethInfoAttributes g m tyargsOpt (minfo: MethInfo) = | None -> () // no attribute = no errors } +let TryGetMethodObsoleteInfo minfo = + BindMethInfoAttributes range0 minfo + (TryGetILObsoleteInfo minfo.TcGlobals false) + (TryGetFSharpObsoleteInfo minfo.TcGlobals) +#if !NO_TYPEPROVIDERS + (TryGetProvidedObsoleteInfo minfo.TcGlobals range0) +#else + (fun _provAttribs -> None) +#endif + /// Indicate if a method has 'Obsolete', 'CompilerMessageAttribute' or 'TypeProviderEditorHideMethodsAttribute'. /// Used to suppress the item in intellisense. let MethInfoIsUnseen g (m: range) (ty: TType) minfo allowObsolete = diff --git a/src/Compiler/Checking/AttributeChecking.fsi b/src/Compiler/Checking/AttributeChecking.fsi index 564957e1bd7..1c093db7c79 100644 --- a/src/Compiler/Checking/AttributeChecking.fsi +++ b/src/Compiler/Checking/AttributeChecking.fsi @@ -55,6 +55,8 @@ val TryBindMethInfoAttribute: 'a option #endif +val TryGetMethodObsoleteInfo: minfo: MethInfo -> ObsoleteDiagnosticInfo option + val TryFindMethInfoStringAttribute: g: TcGlobals -> m: range -> attribSpec: BuiltinAttribInfo -> minfo: MethInfo -> string option @@ -86,14 +88,20 @@ val CheckILAttributesForUnseenStored: g: TcGlobals -> cattrsStored: ILAttributes val CheckFSharpAttributesForHidden: g: TcGlobals -> attribs: Attrib list -> bool -val CheckFSharpAttributesForObsolete: g: TcGlobals -> attribs: Attrib list -> bool +val TryGetFSharpObsoleteInfo: g: TcGlobals -> attribs: Attrib list -> ObsoleteDiagnosticInfo option + +val CheckFSharpAttributesForObsolete: g: TcGlobals -> attribs: Attribs -> bool val CheckFSharpAttributesForUnseen: g: TcGlobals -> attribs: Attrib list -> allowObsolete: bool -> bool val CheckPropInfoAttributes: pinfo: PropInfo -> m: range -> OperationResult +val TryGetPropObsoleteInfo: pinfo: PropInfo -> ObsoleteDiagnosticInfo option + val CheckILFieldAttributes: g: TcGlobals -> finfo: ILFieldInfo -> m: range -> unit +val TryGetILFieldObsoleteInfo: g: TcGlobals -> finfo: ILFieldInfo -> ObsoleteDiagnosticInfo option + val CheckMethInfoAttributes: g: TcGlobals -> m: range -> tyargsOpt: 'a option -> minfo: MethInfo -> OperationResult @@ -107,6 +115,8 @@ val EventInfoIsUnseen: allowObsolete: bool -> einfo: EventInfo -> bool val CheckEntityAttributes: g: TcGlobals -> tcref: TyconRef -> m: range -> OperationResult +val TryGetEntityObsoleteInfo: g: TcGlobals -> tcref: TyconRef -> ObsoleteDiagnosticInfo option + val CheckUnionCaseAttributes: g: TcGlobals -> x: UnionCaseRef -> m: range -> OperationResult val CheckUnitOfMeasureAttributes: g: TcGlobals -> measure: Measure -> unit @@ -125,3 +135,5 @@ val IsSecurityCriticalAttribute: g: TcGlobals -> Attrib -> bool val IsAssemblyVersionAttribute: g: TcGlobals -> Attrib -> bool val CheckILEventAttributes: g: TcGlobals -> tcref: TyconRef -> cattrs: ILAttributes -> m: range -> OperationResult + +val TryGetEventObsoleteInfo: einfo: EventInfo -> ObsoleteDiagnosticInfo option diff --git a/src/Compiler/Facilities/DiagnosticsLogger.fs b/src/Compiler/Facilities/DiagnosticsLogger.fs index 118fe53d938..d5f87fb2e4e 100644 --- a/src/Compiler/Facilities/DiagnosticsLogger.fs +++ b/src/Compiler/Facilities/DiagnosticsLogger.fs @@ -132,7 +132,9 @@ exception DiagnosticWithSuggestions of number: int * message: string * range: ra /// A diagnostic that is raised when enabled manually, or by default with a language feature exception DiagnosticEnabledWithLanguageFeature of number: int * message: string * range: range * enabledByLangFeature: bool -/// A diagnostic that is raised when a diagnostic is obsolete +type ObsoleteDiagnosticInfo = + | ObsoleteDiagnosticInfo of isError: bool * diagnosticId: string option * message: string option * urlFormat: string option + exception ObsoleteDiagnostic of isError: bool * diagnosticId: string option * diff --git a/src/Compiler/Facilities/DiagnosticsLogger.fsi b/src/Compiler/Facilities/DiagnosticsLogger.fsi index 9c099ab0840..0f801b8b4d4 100644 --- a/src/Compiler/Facilities/DiagnosticsLogger.fsi +++ b/src/Compiler/Facilities/DiagnosticsLogger.fsi @@ -87,6 +87,13 @@ exception DiagnosticWithSuggestions of identifier: string * suggestions: Suggestions +type ObsoleteDiagnosticInfo = + | ObsoleteDiagnosticInfo of + isError: bool * + diagnosticId: string option * + message: string option * + urlFormat: string option + exception ObsoleteDiagnostic of isError: bool * diagnosticId: string option * diff --git a/src/Compiler/Symbols/Symbols.fs b/src/Compiler/Symbols/Symbols.fs index 08252dd76d5..2425aad5877 100644 --- a/src/Compiler/Symbols/Symbols.fs +++ b/src/Compiler/Symbols/Symbols.fs @@ -4,6 +4,7 @@ namespace rec FSharp.Compiler.Symbols open System open System.Collections.Generic +open FSharp.Compiler.DiagnosticsLogger open Internal.Utilities.Collections open Internal.Utilities.Library open FSharp.Compiler @@ -219,6 +220,19 @@ type FSharpDisplayContext(denv: TcGlobals -> DisplayEnv) = member x.WithTopLevelPrefixGenericParameters () = FSharpDisplayContext(fun g -> (denv g).UseTopLevelPrefixGenericParameterStyle()) + +[] +type FSharpObsoleteDiagnosticInfo = + { IsError: bool + DiagnosticId: string option + Message: string option + UrlFormat: string option } + + static member FromDiagnosticInfo(info) = + let (ObsoleteDiagnosticInfo(isError, id, msg, urlFormat)) = info + { IsError = isError; DiagnosticId = id; Message = msg; UrlFormat = urlFormat } + + // delay the realization of 'item' in case it is unresolved type FSharpSymbol(cenv: SymbolEnv, item: unit -> Item, access: FSharpSymbol -> CcuThunk -> AccessorDomain -> bool) = @@ -359,6 +373,9 @@ type FSharpSymbol(cenv: SymbolEnv, item: unit -> Item, access: FSharpSymbol -> C member sym.TryGetAttribute<'T>() = sym.Attributes |> Seq.tryFind (fun attr -> attr.IsAttribute<'T>()) + abstract ObsoleteDiagnosticInfo: FSharpObsoleteDiagnosticInfo option + default _.ObsoleteDiagnosticInfo = None + type FSharpEntity(cenv: SymbolEnv, entity: EntityRef, tyargs: TType list) = inherit FSharpSymbol(cenv, (fun () -> @@ -854,6 +871,9 @@ type FSharpEntity(cenv: SymbolEnv, entity: EntityRef, tyargs: TType list) = member x.TryGetMembersFunctionsAndValues() = try x.MembersFunctionsAndValues with _ -> [||] :> _ + override this.ObsoleteDiagnosticInfo = + TryGetEntityObsoleteInfo cenv.g entity |> Option.map FSharpObsoleteDiagnosticInfo.FromDiagnosticInfo + member this.TryGetMetadataText() = match entity.TryDeref with | ValueSome _ -> @@ -1288,7 +1308,16 @@ type FSharpField(cenv: SymbolEnv, d: FSharpFieldData) = | Choice1Of3 r -> r.Accessibility | Choice2Of3 _ -> taccessPublic | Choice3Of3 _ -> taccessPublic - FSharpAccessibility access + FSharpAccessibility access + + override this.ObsoleteDiagnosticInfo = + let infoOption = + match d.TryRecdField with + | Choice1Of3 recdField -> TryGetFSharpObsoleteInfo cenv.g recdField.FieldAttribs + | Choice2Of3 ilFieldInfo -> TryGetILFieldObsoleteInfo cenv.g ilFieldInfo + | Choice3Of3 _ -> None + + infoOption |> Option.map FSharpObsoleteDiagnosticInfo.FromDiagnosticInfo member private x.V = d @@ -2532,6 +2561,17 @@ type FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = Array.append (enclosingEntityFullName.Split '.') [| x.CompiledName |]) else None + override this.ObsoleteDiagnosticInfo = + let infoOption = + match d with + | E einfo -> TryGetEventObsoleteInfo einfo + | P pinfo -> TryGetPropObsoleteInfo pinfo + | M minfo + | C minfo -> TryGetMethodObsoleteInfo minfo + | V vref -> TryGetFSharpObsoleteInfo cenv.g vref.Attribs + + infoOption |> Option.map FSharpObsoleteDiagnosticInfo.FromDiagnosticInfo + type FSharpType(cenv, ty:TType) = let isUnresolved() = diff --git a/src/Compiler/Symbols/Symbols.fsi b/src/Compiler/Symbols/Symbols.fsi index 8c8a47a3dfb..f85ec7d7a4c 100644 --- a/src/Compiler/Symbols/Symbols.fsi +++ b/src/Compiler/Symbols/Symbols.fsi @@ -79,6 +79,13 @@ type FSharpDisplayContext = /// for example, `int list seq` becomes `seq` member WithTopLevelPrefixGenericParameters: unit -> FSharpDisplayContext +[] +type FSharpObsoleteDiagnosticInfo = + { IsError: bool + DiagnosticId: string option + Message: string option + UrlFormat: string option } + /// Represents a symbol in checked F# source code or a compiled .NET component. /// /// The subtype of the symbol may reveal further information and can be one of FSharpEntity, FSharpUnionCase @@ -148,6 +155,8 @@ type FSharpSymbol = /// Indicates if this symbol has an attribute matching the full name of the given type parameter member HasAttribute<'T> : unit -> bool + abstract ObsoleteDiagnosticInfo: FSharpObsoleteDiagnosticInfo option + /// Represents an assembly as seen by the F# language type FSharpAssembly = diff --git a/tests/FSharp.Compiler.Service.Tests/Checker.fs b/tests/FSharp.Compiler.Service.Tests/Checker.fs index 22dcf2ad502..ca583beb25c 100644 --- a/tests/FSharp.Compiler.Service.Tests/Checker.fs +++ b/tests/FSharp.Compiler.Service.Tests/Checker.fs @@ -128,6 +128,9 @@ module CheckResultsExtensions = member this.GetCodeCompletionSuggestions(context: CodeCompletionContext, parseResults: FSharpParseFileResults, options: FSharpCodeCompletionOptions) = this.GetDeclarationListInfo(Some parseResults, context.Pos.Line, context.LineText, context.PartialIdentifier, options = options) + member this.GetMethodOverloads(context: ResolveContext, names: string list) = + this.GetMethodsAsSymbols(context.Pos.Line, context.Pos.Column, context.LineText, names) + [] module Checker = let getResolveContext (markedSource: string) = @@ -185,3 +188,7 @@ module Checker = let getTooltip (markedSource: string) = getTooltipWithOptions [||] markedSource + + let getMethodOverloads names (markedSource: string) = + let context, checkResults = getCheckedResolveContext markedSource + checkResults.GetMethodOverloads(context, names) diff --git a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.bsl b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.bsl index c1b468804d5..9b33caf5d71 100644 --- a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.bsl +++ b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.bsl @@ -5297,6 +5297,8 @@ FSharp.Compiler.Symbols.FSharpEntity: Microsoft.FSharp.Collections.FSharpList`1[ FSharp.Compiler.Symbols.FSharpEntity: Microsoft.FSharp.Collections.FSharpList`1[System.String] get_AllCompilationPaths() FSharp.Compiler.Symbols.FSharpEntity: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Symbols.FSharpEntity] DeclaringEntity FSharp.Compiler.Symbols.FSharpEntity: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Symbols.FSharpEntity] get_DeclaringEntity() +FSharp.Compiler.Symbols.FSharpEntity: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Symbols.FSharpObsoleteDiagnosticInfo] ObsoleteDiagnosticInfo +FSharp.Compiler.Symbols.FSharpEntity: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Symbols.FSharpObsoleteDiagnosticInfo] get_ObsoleteDiagnosticInfo() FSharp.Compiler.Symbols.FSharpEntity: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Symbols.FSharpType] BaseType FSharp.Compiler.Symbols.FSharpEntity: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Symbols.FSharpType] get_BaseType() FSharp.Compiler.Symbols.FSharpEntity: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.ISourceText] TryGetMetadataText() @@ -5433,6 +5435,8 @@ FSharp.Compiler.Symbols.FSharpField: FSharp.Compiler.Text.Range get_DeclarationL FSharp.Compiler.Symbols.FSharpField: Int32 GetHashCode() FSharp.Compiler.Symbols.FSharpField: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Symbols.FSharpEntity] DeclaringEntity FSharp.Compiler.Symbols.FSharpField: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Symbols.FSharpEntity] get_DeclaringEntity() +FSharp.Compiler.Symbols.FSharpField: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Symbols.FSharpObsoleteDiagnosticInfo] ObsoleteDiagnosticInfo +FSharp.Compiler.Symbols.FSharpField: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Symbols.FSharpObsoleteDiagnosticInfo] get_ObsoleteDiagnosticInfo() FSharp.Compiler.Symbols.FSharpField: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Symbols.FSharpUnionCase] DeclaringUnionCase FSharp.Compiler.Symbols.FSharpField: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Symbols.FSharpUnionCase] get_DeclaringUnionCase() FSharp.Compiler.Symbols.FSharpField: Microsoft.FSharp.Core.FSharpOption`1[System.Object] LiteralValue @@ -5714,6 +5718,8 @@ FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue: Microsoft.FSharp.Core.FSh FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Symbols.FSharpEntity] get_DeclaringEntity() FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue] EventForFSharpProperty FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue] get_EventForFSharpProperty() +FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Symbols.FSharpObsoleteDiagnosticInfo] ObsoleteDiagnosticInfo +FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Symbols.FSharpObsoleteDiagnosticInfo] get_ObsoleteDiagnosticInfo() FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Symbols.FSharpType] FullTypeSafe FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Symbols.FSharpType] get_FullTypeSafe() FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.TaggedText[]] GetReturnTypeLayout(FSharp.Compiler.Symbols.FSharpDisplayContext) @@ -5749,6 +5755,25 @@ FSharp.Compiler.Symbols.FSharpObjectExprOverride: Microsoft.FSharp.Collections.F FSharp.Compiler.Symbols.FSharpObjectExprOverride: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Symbols.FSharpGenericParameter] get_GenericParameters() FSharp.Compiler.Symbols.FSharpObjectExprOverride: Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue]] CurriedParameterGroups FSharp.Compiler.Symbols.FSharpObjectExprOverride: Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue]] get_CurriedParameterGroups() +FSharp.Compiler.Symbols.FSharpObsoleteDiagnosticInfo: Boolean Equals(FSharp.Compiler.Symbols.FSharpObsoleteDiagnosticInfo) +FSharp.Compiler.Symbols.FSharpObsoleteDiagnosticInfo: Boolean Equals(FSharp.Compiler.Symbols.FSharpObsoleteDiagnosticInfo, System.Collections.IEqualityComparer) +FSharp.Compiler.Symbols.FSharpObsoleteDiagnosticInfo: Boolean Equals(System.Object) +FSharp.Compiler.Symbols.FSharpObsoleteDiagnosticInfo: Boolean Equals(System.Object, System.Collections.IEqualityComparer) +FSharp.Compiler.Symbols.FSharpObsoleteDiagnosticInfo: Boolean IsError +FSharp.Compiler.Symbols.FSharpObsoleteDiagnosticInfo: Boolean get_IsError() +FSharp.Compiler.Symbols.FSharpObsoleteDiagnosticInfo: Int32 CompareTo(FSharp.Compiler.Symbols.FSharpObsoleteDiagnosticInfo) +FSharp.Compiler.Symbols.FSharpObsoleteDiagnosticInfo: Int32 CompareTo(System.Object) +FSharp.Compiler.Symbols.FSharpObsoleteDiagnosticInfo: Int32 CompareTo(System.Object, System.Collections.IComparer) +FSharp.Compiler.Symbols.FSharpObsoleteDiagnosticInfo: Int32 GetHashCode() +FSharp.Compiler.Symbols.FSharpObsoleteDiagnosticInfo: Int32 GetHashCode(System.Collections.IEqualityComparer) +FSharp.Compiler.Symbols.FSharpObsoleteDiagnosticInfo: Microsoft.FSharp.Core.FSharpOption`1[System.String] DiagnosticId +FSharp.Compiler.Symbols.FSharpObsoleteDiagnosticInfo: Microsoft.FSharp.Core.FSharpOption`1[System.String] Message +FSharp.Compiler.Symbols.FSharpObsoleteDiagnosticInfo: Microsoft.FSharp.Core.FSharpOption`1[System.String] UrlFormat +FSharp.Compiler.Symbols.FSharpObsoleteDiagnosticInfo: Microsoft.FSharp.Core.FSharpOption`1[System.String] get_DiagnosticId() +FSharp.Compiler.Symbols.FSharpObsoleteDiagnosticInfo: Microsoft.FSharp.Core.FSharpOption`1[System.String] get_Message() +FSharp.Compiler.Symbols.FSharpObsoleteDiagnosticInfo: Microsoft.FSharp.Core.FSharpOption`1[System.String] get_UrlFormat() +FSharp.Compiler.Symbols.FSharpObsoleteDiagnosticInfo: System.String ToString() +FSharp.Compiler.Symbols.FSharpObsoleteDiagnosticInfo: Void .ctor(Boolean, Microsoft.FSharp.Core.FSharpOption`1[System.String], Microsoft.FSharp.Core.FSharpOption`1[System.String], Microsoft.FSharp.Core.FSharpOption`1[System.String]) FSharp.Compiler.Symbols.FSharpOpenDeclaration: Boolean IsOwnNamespace FSharp.Compiler.Symbols.FSharpOpenDeclaration: Boolean get_IsOwnNamespace() FSharp.Compiler.Symbols.FSharpOpenDeclaration: FSharp.Compiler.Syntax.SynOpenDeclTarget Target @@ -5812,6 +5837,8 @@ FSharp.Compiler.Symbols.FSharpSymbol: FSharp.Compiler.Symbols.FSharpAssembly get FSharp.Compiler.Symbols.FSharpSymbol: Int32 GetEffectivelySameAsHash() FSharp.Compiler.Symbols.FSharpSymbol: Int32 GetHashCode() FSharp.Compiler.Symbols.FSharpSymbol: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Symbols.FSharpAttribute] TryGetAttribute[T]() +FSharp.Compiler.Symbols.FSharpSymbol: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Symbols.FSharpObsoleteDiagnosticInfo] ObsoleteDiagnosticInfo +FSharp.Compiler.Symbols.FSharpSymbol: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Symbols.FSharpObsoleteDiagnosticInfo] get_ObsoleteDiagnosticInfo() FSharp.Compiler.Symbols.FSharpSymbol: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] DeclarationLocation FSharp.Compiler.Symbols.FSharpSymbol: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] ImplementationLocation FSharp.Compiler.Symbols.FSharpSymbol: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] SignatureLocation diff --git a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj index b8f6544af1d..1cbea95b31e 100644 --- a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj +++ b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj @@ -27,6 +27,7 @@ + diff --git a/tests/FSharp.Compiler.Service.Tests/TypeChecker/Obsolete.fs b/tests/FSharp.Compiler.Service.Tests/TypeChecker/Obsolete.fs new file mode 100644 index 00000000000..22393f98607 --- /dev/null +++ b/tests/FSharp.Compiler.Service.Tests/TypeChecker/Obsolete.fs @@ -0,0 +1,95 @@ +module FSharp.Compiler.Service.Tests.TypeChecker.Obsolete + +open FSharp.Compiler.Service.Tests +open FSharp.Compiler.Symbols +open FSharp.Test.Assert +open Xunit + +let checkObsoleteMessages message source = + let symbolUse = Checker.getSymbolUse source + symbolUse.Symbol.ObsoleteDiagnosticInfo.Value.Message.Value |> shouldEqual message + +let checkNotObsolete source = + let symbolUse = Checker.getSymbolUse source + symbolUse.Symbol.ObsoleteDiagnosticInfo |> shouldEqual None + +[] +let ``Method 01`` () = + checkObsoleteMessages "Message" """ +type Class() = + [] + static member Method{caret}() = () +""" + +[] +let ``Method 02`` () = + checkObsoleteMessages "Message" """ +type Class() = + [] + static member Method() = () + +Class.Method{caret}() +""" + +[] +let ``Method 03`` () = + checkObsoleteMessages "Message" """ +type Class() = + static member Method(i: int) = () + + [] + static member Method(s: string) = () + +Class.Method{caret}("") +""" + +[] +let ``Method 04`` () = + checkNotObsolete """ +type Class() = + static member Method(i: int) = () + + [] + static member Method(s: string) = () + +Class.Method{caret}(1) +""" + +[] +let ``Method 05`` () = + let methodOverloads = + Checker.getMethodOverloads ["Class"; "Method"] """ +type Class() = + static member Method(i: int) = () + + [] + static member Method(s: string) = () + +Class.Method({caret}1) +""" + methodOverloads.Value + |> List.sortBy _.Symbol.DeclarationLocation.Value.StartLine + |> List.map (_.Symbol.ObsoleteDiagnosticInfo >> (Option.bind _.Message)) + |> shouldEqual [ None; Some "Message"] + +[] +let ``Type 01 - Union`` () = + checkObsoleteMessages "Message" """ +[] +type U{caret} = | A +""" + +[] +let ``Value 01`` () = + checkObsoleteMessages "Message" """ +[] +let s{caret} = "" +""" + +[] +let ``Value 02`` () = + checkObsoleteMessages "Message" """ +[] +let s = "" +let s1 = s{caret} +""" diff --git a/vsintegration/src/FSharp.Editor/CodeFixes/CodeFixHelpers.fs b/vsintegration/src/FSharp.Editor/CodeFixes/CodeFixHelpers.fs index ce646f98f25..f3b36e6aede 100644 --- a/vsintegration/src/FSharp.Editor/CodeFixes/CodeFixHelpers.fs +++ b/vsintegration/src/FSharp.Editor/CodeFixes/CodeFixHelpers.fs @@ -73,7 +73,7 @@ module internal CodeFixHelpers = TelemetryReporter.ReportSingleEvent(TelemetryEvents.CodefixActivated, props) - let createTextChangeCodeFix (codeFix, context: CodeFixContext) = + let createTextChangeCodeFix (codeFix: FSharpCodeFix, context: CodeFixContext) = CodeAction.Create( codeFix.Message, (fun cancellationToken -> From 85e2e2189e552c89ae09f757f95c3aa48f1d585a Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Fri, 29 May 2026 12:59:23 +0200 Subject: [PATCH 34/72] Fix non-deterministic reference assembly MVIDs (#19751) (#19801) Replace randomized String.GetHashCode with deterministic FNV-1a 32-bit hash in TypeHashing.hashText and hashILTypeRef. The per-process hash seed in .NET 6+ caused --refout / ProduceReferenceAssembly to emit a different MVID on every build. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../.FSharp.Compiler.Service/11.0.100.md | 1 + src/Compiler/Driver/fsc.fs | 2 + src/Compiler/Utilities/TypeHashing.fs | 15 ++++++- .../fsc/determinism/determinism.fs | 45 +++++++++++++++++++ 4 files changed, 61 insertions(+), 2 deletions(-) diff --git a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md index 70ca7428416..ffc82a89e11 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md +++ b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md @@ -63,6 +63,7 @@ * Allow `| null` nullable annotation on a `[]` over a reference type (e.g. the FSharp.UMX `type string<[] 'm> = string` pattern). ([Issue #19657](https://github.com/dotnet/fsharp/issues/19657)) * Fix `[] ?param` optional parameters could not be passed using the explicit `?param = expr` caller-side syntax with a `ValueOption` value. ([Issue #19711](https://github.com/dotnet/fsharp/issues/19711), [PR #19742](https://github.com/dotnet/fsharp/pull/19742)) * Fix signature conformance: overloaded member with unit parameter `M(())` now matches sig `member M: unit -> unit`. ([Issue #19596](https://github.com/dotnet/fsharp/issues/19596), [PR #19615](https://github.com/dotnet/fsharp/pull/19615)) +* Reference assembly MVIDs are now deterministic across compiler invocations. Previously, `--refout` / `true` produced a different MVID every build because the implied signature hash used .NET's randomized `String.GetHashCode()`. ([Issue #19751](https://github.com/dotnet/fsharp/issues/19751), [PR #19801](https://github.com/dotnet/fsharp/pull/19801)) * Parser: recover on unfinished if and binary expressions ([PR #19724](https://github.com/dotnet/fsharp/pull/19724)) diff --git a/src/Compiler/Driver/fsc.fs b/src/Compiler/Driver/fsc.fs index 1912f13ff71..43157660212 100644 --- a/src/Compiler/Driver/fsc.fs +++ b/src/Compiler/Driver/fsc.fs @@ -873,6 +873,8 @@ let main3 let observer = if hasIvt then PublicAndInternal else PublicOnly + // `hash` here is on byte[] / int64, neither of which depends on + // String.GetHashCode; safe for deterministic output. See issue #19751. let optDataHash = optDataResources |> List.map (fun ilResource -> diff --git a/src/Compiler/Utilities/TypeHashing.fs b/src/Compiler/Utilities/TypeHashing.fs index 5ada7732fe4..0575381fd4b 100644 --- a/src/Compiler/Utilities/TypeHashing.fs +++ b/src/Compiler/Utilities/TypeHashing.fs @@ -18,7 +18,18 @@ module internal HashingPrimitives = type Hash = int - let inline hashText (s: string) : Hash = hash s + /// FNV-1a 32-bit over UTF-16 code units – deterministic across processes + /// (unlike String.GetHashCode which is randomized in .NET 6+). + let hashStableString (s: string) : Hash = + let mutable h = 2166136261u + + for c in s do + h <- (h ^^^ uint32 c) * 16777619u + + int h + + let hashText (s: string) : Hash = hashStableString s + let inline combineHash acc y : Hash = (acc <<< 1) + y + 631 let inline pipeToHash (value: Hash) (acc: Hash) = combineHash acc value let inline addFullStructuralHash value (acc: Hash) = combineHash acc (hash value) @@ -91,7 +102,7 @@ module HashIL = let hashILTypeRef (tref: ILTypeRef) = tref.Enclosing |> hashListOrderMatters hashText - |> addFullStructuralHash tref.Name + |> pipeToHash (hashText tref.Name) let private hashILArrayShape (sh: ILArrayShape) = sh.Rank diff --git a/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/determinism/determinism.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/determinism/determinism.fs index 54915e18518..be9006bc946 100644 --- a/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/determinism/determinism.fs +++ b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/determinism/determinism.fs @@ -4,8 +4,11 @@ namespace CompilerOptions.Fsc open Xunit open FSharp.Test open FSharp.Test.Compiler +open FSharp.Test.Utilities open System open System.IO +open System.Reflection.Metadata +open System.Reflection.PortableExecutable module determinism = @@ -139,3 +142,45 @@ module Determinism areSame (Path.ChangeExtension(exename1, "pdb")) (Path.ChangeExtension(exename2, "pdb")) | _ -> raise (new Exception "Pathmap1 and PathMap2 do not match") + /// Compile to ref assembly out-of-process via runFscProcess. + /// Separate processes needed because String.GetHashCode is seeded once per process. + let private compileRefAssembly (workDir: string) (sourceFile: string) : string * string = + Directory.CreateDirectory workDir |> ignore + let outDll = Path.Combine(workDir, "Out.dll") + let outRef = Path.Combine(workDir, "Out.ref.dll") + let defaultOpts = CompilerAssert.DefaultProjectOptions(TargetFramework.Current).OtherOptions + let result = runFscProcess [ + yield "--target:library" + yield "--deterministic+" + yield! (defaultOpts |> Array.toList) + yield $"--refout:{outRef}" + yield $"-o:{outDll}" + yield sourceFile + ] + if result.ExitCode <> 0 then + failwithf "fsc exit %d\nstdout:%s\nstderr:%s" result.ExitCode result.StdOut result.StdErr + outDll, outRef + + let private readMvid (dll: string) : Guid = + use peReader = new PEReader(File.OpenRead dll) + let reader = peReader.GetMetadataReader() + reader.GetGuid(reader.GetModuleDefinition().Mvid) + + // Regression test for https://github.com/dotnet/fsharp/issues/19751 + // Two separate fsc processes needed to detect randomized String.GetHashCode seeds. + [] + let ``Reference assembly MVID is deterministic across separate fsc invocations`` () = + let tempRoot = + Path.Combine(Path.GetTempPath(), "fsharp-ref-mvid-test-" + Guid.NewGuid().ToString("N")) + try + Directory.CreateDirectory tempRoot |> ignore + let src = Path.Combine(tempRoot, "Foo.fs") + File.WriteAllText(src, "module Foo.Core\n\nlet foo (x: int) : int = x + 1\n") + + let dll1, ref1 = compileRefAssembly (Path.Combine(tempRoot, "out1")) src + let dll2, ref2 = compileRefAssembly (Path.Combine(tempRoot, "out2")) src + + Assert.Equal(readMvid ref1, readMvid ref2) + Assert.Equal(readMvid dll1, readMvid dll2) + finally + try Directory.Delete(tempRoot, true) with _ -> () From 7e8f7bba9ca5a4aa9abc85f43c9e021b3c2a2bfc Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Fri, 29 May 2026 13:10:07 +0200 Subject: [PATCH 35/72] Fix colorization of type name in MyType.StaticMember (#19800) * Fix colorization of type name in MyType.S (#18009) Accept ItemOccurrence.InvalidUse in LegitTypeOccurrence so that the type-name span in expressions like MyType.S - which name resolution flags as InvalidUse via isWrongItemInExpr - is still classified as a ReferenceType, matching the behavior for the unqualified form MyType.S. --- .../Service/SemanticClassification.fs | 1 + .../SemanticClassificationRegressions.fs | 71 +++++++++++++++++++ 2 files changed, 72 insertions(+) diff --git a/src/Compiler/Service/SemanticClassification.fs b/src/Compiler/Service/SemanticClassification.fs index 066ec2fb41a..da0193e4405 100644 --- a/src/Compiler/Service/SemanticClassification.fs +++ b/src/Compiler/Service/SemanticClassification.fs @@ -151,6 +151,7 @@ module TcResolutionsExtensions = | ItemOccurrence.UseInType | ItemOccurrence.UseInAttribute | ItemOccurrence.Use + | ItemOccurrence.InvalidUse | ItemOccurrence.Binding | ItemOccurrence.Pattern | ItemOccurrence.Open -> Some() diff --git a/tests/FSharp.Compiler.ComponentTests/FSharpChecker/SemanticClassificationRegressions.fs b/tests/FSharp.Compiler.ComponentTests/FSharpChecker/SemanticClassificationRegressions.fs index 04093eea56a..f2a2503da1f 100644 --- a/tests/FSharp.Compiler.ComponentTests/FSharpChecker/SemanticClassificationRegressions.fs +++ b/tests/FSharp.Compiler.ComponentTests/FSharpChecker/SemanticClassificationRegressions.fs @@ -143,6 +143,77 @@ type Animal = (12, 1, 7) // t.IsIdent — RequireQualifiedAccess (17, 1, 5) ] // this.IsCat — self-referential member +/// (#18009 regression) Static method on a generic type with a *qualified* type argument +/// must still classify the type name as a type. +[] +let ``Static method on generic type should classify type name as type`` () = + let source = + """ +module Test + +type MyType<'T> = + static member S = 1 + +let _ = MyType.S +let _ = MyType.S +""" + + let items = getClassifications source + + let isMyTypeRefOnLine line (item: SemanticClassificationItem) = + item.Type = SemanticClassificationType.ReferenceType + && item.Range.StartLine = line + && item.Range.StartColumn = 8 + && item.Range.EndColumn = 14 + + let unqualified = items |> Array.filter (isMyTypeRefOnLine 7) + Assert.True( + unqualified.Length = 1, + sprintf + "Expected exactly one ReferenceType classification for MyType on line 7, got: %A" + (items |> Array.filter (fun i -> i.Range.StartLine = 7) + |> Array.map (fun i -> i.Range.StartColumn, i.Range.EndColumn, i.Type)) + ) + + let qualified = items |> Array.filter (isMyTypeRefOnLine 8) + Assert.True( + qualified.Length = 1, + sprintf + "Expected exactly one ReferenceType classification for MyType on line 8, got: %A" + (items |> Array.filter (fun i -> i.Range.StartLine = 8) + |> Array.map (fun i -> i.Range.StartColumn, i.Range.EndColumn, i.Type)) + ) + +/// (#18009 follow-up) Accepting ItemOccurrence.InvalidUse in LegitTypeOccurrence must +/// not cause unresolved identifiers to be classified as types. +[] +let ``Undeclared identifier in expression position is not classified as a type`` () = + let source = + """ +module Test + +let _ = NotDeclaredAnywhere.S +""" + + let items = getClassifications source + + let badSpans = + items + |> Array.filter (fun item -> + item.Range.StartLine = 4 + && item.Range.StartColumn = 8 + && item.Range.EndColumn = 27 + && (item.Type = SemanticClassificationType.ReferenceType + || item.Type = SemanticClassificationType.ValueType + || item.Type = SemanticClassificationType.Type)) + + Assert.True( + badSpans.Length = 0, + sprintf + "Undeclared identifier should not be classified as a type, but found: %A" + (badSpans |> Array.map (fun i -> i.Range.StartColumn, i.Range.EndColumn, i.Type)) + ) + /// (#16982) Delegate `Invoke` synthesized in a delegate declaration must not be classified as Method. [] let ``Delegate Invoke in declaration not classified as method`` () = From aefec6b6e4efe24d365ceb8f71172404a971bda7 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Fri, 29 May 2026 11:27:02 +0000 Subject: [PATCH 36/72] Reject non-function bindings for single-case and partial active pattern names (#19763) --- .../.FSharp.Compiler.Service/11.0.100.md | 1 + src/Compiler/Checking/PostInferenceChecks.fs | 8 +++++--- .../OffsideExceptions/RelaxWhitespace2.fs | 16 ++++++++-------- .../Named/E_ActivePatternNotAFunction.fs | 6 +++++- .../Conformance/PatternMatching/Named/Named.fs | 8 ++++++-- 5 files changed, 25 insertions(+), 14 deletions(-) diff --git a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md index ffc82a89e11..43601b6e34c 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md +++ b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md @@ -1,5 +1,6 @@ ### Fixed +* Reject non-function bindings for single-case and partial active pattern names with FS1209, matching the existing multi-case behavior. ([PR #19763](https://github.com/dotnet/fsharp/pull/19763)) * Fix FS0421 "The address of the variable cannot be used at this point" incorrectly raised for the discard pattern `let _ = &expr` when `let x = &expr` compiles. ([Issue #18841](https://github.com/dotnet/fsharp/issues/18841), [PR #19811](https://github.com/dotnet/fsharp/pull/19811)) * Honor `--nowarn` and `--warnaserror` for warnings emitted during command-line option parsing ([Issue #19576](https://github.com/dotnet/fsharp/issues/19576), [PR #19776](https://github.com/dotnet/fsharp/pull/19776)) * Fix `[]` prefix attributes being silently dropped on class members, and fix false-positive `AllowMultiple=false` errors when `[]` and `[]` are applied to the same binding. ([Issue #17904](https://github.com/dotnet/fsharp/issues/17904), [Issue #19020](https://github.com/dotnet/fsharp/issues/19020), [PR #19738](https://github.com/dotnet/fsharp/pull/19738)) diff --git a/src/Compiler/Checking/PostInferenceChecks.fs b/src/Compiler/Checking/PostInferenceChecks.fs index 7924394c743..b0891f9ecf3 100644 --- a/src/Compiler/Checking/PostInferenceChecks.fs +++ b/src/Compiler/Checking/PostInferenceChecks.fs @@ -2089,10 +2089,12 @@ and CheckBinding cenv env alwaysCheckNoReraise ctxt (TBind(v, bindRhs, _) as bin let env = { env with external = env.external || ValHasWellKnownAttribute g WellKnownValAttributes.DllImportAttribute v } - // Check that active patterns don't have free type variables in their result + // Check active pattern shape/type constraints match TryGetActivePatternInfo vref with - | Some _apinfo when _apinfo.ActiveTags.Length > 1 -> - if doesActivePatternHaveFreeTypars g vref then + | Some apinfo -> + let hasFreeTypars = doesActivePatternHaveFreeTypars g vref + + if apinfo.ActiveTags.Length > 1 && hasFreeTypars then errorR(Error(FSComp.SR.activePatternChoiceHasFreeTypars(v.LogicalName), v.Range)) | _ -> () diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/OffsideExceptions/RelaxWhitespace2.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/OffsideExceptions/RelaxWhitespace2.fs index 42e8dc1ad9e..ef83e1ba871 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/OffsideExceptions/RelaxWhitespace2.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/OffsideExceptions/RelaxWhitespace2.fs @@ -237,7 +237,7 @@ module ActivePatterns = |) _ = (| A |) - let (|C|) = + let (|C|) _ = if true then ignore (| A |) @@ -255,7 +255,7 @@ module ActivePatterns = F | _ - |) as f = Some (| + |) _ = Some (| C |) let (| @@ -1265,7 +1265,7 @@ type ActivePatterns() = |) = (| A |) - let (|C|) = + let (|C|) _ = if true then ignore (| A |) @@ -1283,7 +1283,7 @@ type ActivePatterns() = F | _ - |) as f = Some (| + |) _ = Some (| C |) let (| @@ -1305,7 +1305,7 @@ type ActivePatterns() = |) = (| A_ |) - static let (|C_|) = + static let (|C_|) _ = if true then ignore (| A_ |) @@ -1323,7 +1323,7 @@ type ActivePatterns() = F_ | _ - |) as f_ = Some (| + |) _ = Some (| C_ |) static let (| @@ -2593,7 +2593,7 @@ let ActivePatterns<'a> = |) _ = (| A |) - let (|C|) = + let (|C|) _ = if true then ignore (| A |) @@ -2611,7 +2611,7 @@ let ActivePatterns<'a> = F | _ - |) as f = Some (| + |) _ = Some (| C |) let (| diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Named/E_ActivePatternNotAFunction.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Named/E_ActivePatternNotAFunction.fs index aa1ff9f0165..e9d1703943b 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Named/E_ActivePatternNotAFunction.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Named/E_ActivePatternNotAFunction.fs @@ -1,5 +1,9 @@ // #Regression #Conformance #PatternMatching #ActivePatterns // Regression test for FSHARP1.0:5590 -//Active pattern '|A|B|' is not a function$ +//Active pattern '|A|B|' is not a function$ +//Active pattern '|C|' is not a function$ +//Active pattern '|D|_|' is not a function$ let (|A|B|) = failwith "" : Choice +let (|C|) = 3 +let (|D|_|) = None diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Named/Named.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Named/Named.fs index c1bfa90f03d..ba48761e5f3 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Named/Named.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Named/Named.fs @@ -184,7 +184,11 @@ module Named = |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldFail - |> withSingleDiagnostic (Error 1209, Line 5, Col 6, Line 5, Col 11, "Active pattern '|A|B|' is not a function") + |> withDiagnostics [ + (Error 1209, Line 7, Col 6, Line 7, Col 11, "Active pattern '|A|B|' is not a function") + (Error 1209, Line 8, Col 6, Line 8, Col 9, "Active pattern '|C|' is not a function") + (Error 1209, Line 9, Col 6, Line 9, Col 11, "Active pattern '|D|_|' is not a function") + ] // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) [] @@ -621,4 +625,4 @@ but here has type |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck - |> shouldSucceed \ No newline at end of file + |> shouldSucceed From 80607ff42e13e0e43f2585de6a1b13d3fb9f4206 Mon Sep 17 00:00:00 2001 From: kerams Date: Mon, 1 Jun 2026 14:57:24 +0200 Subject: [PATCH 37/72] Add InlineIfLambda to Array.init (#19869) --- docs/release-notes/.FSharp.Core/11.0.100.md | 1 + src/FSharp.Core/array.fs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/release-notes/.FSharp.Core/11.0.100.md b/docs/release-notes/.FSharp.Core/11.0.100.md index 70bbaae06fe..7d0385e3b89 100644 --- a/docs/release-notes/.FSharp.Core/11.0.100.md +++ b/docs/release-notes/.FSharp.Core/11.0.100.md @@ -2,3 +2,4 @@ * Fix `Array.exists2` documentation examples to use equal-length arrays; the previous examples would throw `ArgumentException` at runtime instead of returning the documented `false`/`true` values. ([PR #19672](https://github.com/dotnet/fsharp/pull/19672)) * Move `Async.StartChild` to the "Starting Async Computations" docs category alongside `Async.StartChildAsTask`. ([Issue #19667](https://github.com/dotnet/fsharp/issues/19667)) +* Add `InlineIfLambda` to `Array.init` ([PR #19869](https://github.com/dotnet/fsharp/pull/19869)) diff --git a/src/FSharp.Core/array.fs b/src/FSharp.Core/array.fs index 611b632a4e8..967285a909b 100644 --- a/src/FSharp.Core/array.fs +++ b/src/FSharp.Core/array.fs @@ -47,7 +47,7 @@ module Array = Some array.[array.Length - 1] [] - let inline init count initializer = + let inline init count ([] initializer) = Microsoft.FSharp.Primitives.Basics.Array.init count initializer [] From a62e57b66f8c52304f181703eafbd90881a1145e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 2 Jun 2026 11:43:33 +0200 Subject: [PATCH 38/72] Update state-machine.md for security scan draft filter and repo rules (#19872) - Add draft PR filter to security scan diagram - Add repo rules to security scan reads column - Update source hash for labelops-pr-security-scan.md Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/docs/state-machine.md | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/docs/state-machine.md b/.github/docs/state-machine.md index 1b590ac96fa..379cb9185c7 100644 --- a/.github/docs/state-machine.md +++ b/.github/docs/state-machine.md @@ -10,7 +10,7 @@ Auto-generated documentation of all agentic workflows in this repository. | **labelops-pr-maintenance** | ⏰ every 3h | PRs with AI-Auto-Resolve-* labels, CI status | comment, push, labels, dispatch | `AI-Auto-Resolve-CI`, `AI-Auto-Resolve-Conflicts`, `AI-needs-CI-fix-input` | | **regression-pr-shepherd** | ⏰ every 4h | PRs with `AI-Issue-Regression-PR` | comment, push, remove-labels | `AI-Issue-Regression-PR`, `AI-thinks-issue-fixed` | | **labelops-flake-fix** | 🤖 dispatched by labelops-pr-maintenance | Test results, PR diffs | PR, comment, issue | `Flaky`, `automation` | -| **labelops-pr-security-scan** | ⏰ every 1h | PR diffs, file lists | labels, comment | `AI-Tooling-Check-Scanned-Clean`, `AI-Tooling-Check-Bypassed`, `⚠️ Affects-*`, `⚠️ Suspicious-Prompting`, `⚠️ Scope-Review-Needed` | +| **labelops-pr-security-scan** | ⏰ every 1h | PR diffs, file lists, repo rules | labels, comment | `AI-Tooling-Check-Scanned-Clean`, `AI-Tooling-Check-Bypassed`, `⚠️ Affects-*`, `⚠️ Suspicious-Prompting`, `⚠️ Scope-Review-Needed` | | **aw-auto-update** | ⏰ every 24h | `.github/workflows/*` files | agent-session | `automation` | ## Issue Lifecycle @@ -134,10 +134,20 @@ stateDiagram-v2 [*] --> ScanQueue: ⏰ labelops-pr-security-scan (1h) state "Per-PR Classification" as ScanLoop { - ScanQueue --> CheckMemory: 🤖 security-scan reads state.json + ScanQueue --> ReadRules: 🤖 security-scan reads repo rules + ReadRules --> CheckDraft: 🤖 security-scan checks isDraft + + state draftcheck <> + CheckDraft --> draftcheck + draftcheck --> SkipDraft: draft PR + draftcheck --> CheckMemory: non-draft PR + + SkipDraft --> [*]: skip + + CheckMemory --> CheckMemory2: 🤖 security-scan reads state.json state memcheck <> - CheckMemory --> memcheck + CheckMemory2 --> memcheck memcheck --> AlreadyScanned: sha unchanged memcheck --> ClassifyOrigin: new or updated PR @@ -245,7 +255,7 @@ stateDiagram-v2 aw-auto-update.md: da8c5e340a43d73616e3a0203c7e56de9ca4b82ee78b1902afe466a49a08bc17 labelops-flake-fix.md: 7dca5b8faa60f947204f8925c6238fbecf42aa8cbf3144a166120501b0eef1e4 labelops-pr-maintenance.md: 59ba52fc625e0b9112c31864e92154cdf09acf0bc0f2b167aa30a0d76baa898f -labelops-pr-security-scan.md: 4e0ee1ccd6212be30f8ccd334ecbc47123655e2507b5968c1bf2c1678a1ed306 +labelops-pr-security-scan.md: 675430850eaf8edaa86b4d26c9d381ac48e13536469f17748e7104f6e75937c2 regression-pr-shepherd.md: 18a65fe1cdf8aa219158f1d610db14078e5ff2f1ac912df2566bf796792395b5 repo-assist.md: 3775b51d142d22c98e87e48e8ac9d46cdf69e9c8306d5787758a35578dcb1119 --> From c0bc8de964e42b71d5a6e59e77e1f51adc1ebd7d Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Tue, 2 Jun 2026 10:31:30 +0000 Subject: [PATCH 39/72] Fix SRTP `get_Item` witness resolution for `string` indexers (#19757) --- .../.FSharp.Compiler.Service/11.0.100.md | 1 + src/Compiler/TypedTree/TcGlobals.fs | 2 +- .../IWSAMsAndSRTPs/IWSAMsAndSRTPsTests.fs | 20 ++++++++++++++++++- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md index 43601b6e34c..ff1c9aae2dd 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md +++ b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md @@ -61,6 +61,7 @@ * Fix parallel compilation of scripts ([PR #19649](https://github.com/dotnet/fsharp/pull/19649)) * Fix parser recovery, name resolution, and code completion for unfinished enum patterns ([PR #19708](https://github.com/dotnet/fsharp/pull/19708)) * Parser: fix unexpected diagnostics in debug builds, improve error messages ([PR #19730](https://github.com/dotnet/fsharp/pull/19730)) +* Fix internal error when resolving SRTP `get_Item` witness for `string` indexers (`unknown builtin witness 'get_ItemDynamic'`). ([Issue #18093](https://github.com/dotnet/fsharp/issues/18093), [PR #19757](https://github.com/dotnet/fsharp/pull/19757)) * Allow `| null` nullable annotation on a `[]` over a reference type (e.g. the FSharp.UMX `type string<[] 'm> = string` pattern). ([Issue #19657](https://github.com/dotnet/fsharp/issues/19657)) * Fix `[] ?param` optional parameters could not be passed using the explicit `?param = expr` caller-side syntax with a `ValueOption` value. ([Issue #19711](https://github.com/dotnet/fsharp/issues/19711), [PR #19742](https://github.com/dotnet/fsharp/pull/19742)) * Fix signature conformance: overloaded member with unit parameter `M(())` now matches sig `member M: unit -> unit`. ([Issue #19596](https://github.com/dotnet/fsharp/issues/19596), [PR #19615](https://github.com/dotnet/fsharp/pull/19615)) diff --git a/src/Compiler/TypedTree/TcGlobals.fs b/src/Compiler/TypedTree/TcGlobals.fs index ef6e00ffb16..6dfbd42f98c 100644 --- a/src/Compiler/TypedTree/TcGlobals.fs +++ b/src/Compiler/TypedTree/TcGlobals.fs @@ -1929,7 +1929,7 @@ type TcGlobals( Some (g.array_get_info, [retTy], argExprs) | "set_Item", [arrTy; _; elemTy], _, [_; _; _] when isArrayTy g arrTy -> Some (g.array_set_info, [elemTy], argExprs) - | "get_Item", [stringTy; _; _], _, [_; _] when isStringTy g stringTy -> + | "get_Item", [stringTy; _], _, [_; _] when isStringTy g stringTy -> Some (g.getstring_info, [], argExprs) | "op_UnaryPlus", [aty], _, [_] -> // Call Operators.id diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/TypeConstraints/IWSAMsAndSRTPs/IWSAMsAndSRTPsTests.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/TypeConstraints/IWSAMsAndSRTPs/IWSAMsAndSRTPsTests.fs index 2fd70fab940..fb6c648ca49 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/TypeConstraints/IWSAMsAndSRTPs/IWSAMsAndSRTPsTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/TypeConstraints/IWSAMsAndSRTPs/IWSAMsAndSRTPsTests.fs @@ -287,6 +287,24 @@ let main _ = IL_000a: ret }"""] + [] + let ``SRTP get_Item works on strings`` () = + FSharp """ +let inline indexInto (slice: ^T when ^T: (member get_Item: int -> ^U)) i : ^U = + slice.get_Item i + +[] +let main _ = + if indexInto "abcde" 2 <> 'c' then + failwith "Unexpected result" + + 0 + """ + |> asExe + |> withOptions ["--nowarn:77"] + |> compileAndRun + |> shouldSucceed + [] [ string with set) >(x: 'T) = (^T : (member Item: int -> string with set) (x, 3, \"a\"))")>] [ unit) >(x: 'T) = (^T : (member set_Item: int * string -> unit) (x, 3, \"a\"))")>] @@ -699,6 +717,7 @@ let main _ = |> compileAndRun |> shouldSucceed + [] // RealSig [] // Regular [] @@ -1955,4 +1974,3 @@ if resultInt <> 0 then failwith $"Expected 0 but got {resultInt}" |> asExe |> compileAndRun |> shouldSucceed - From a421267dbe0b3ce3dc8bfecb57190c1d459511b5 Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Wed, 3 Jun 2026 09:56:48 +0200 Subject: [PATCH 40/72] Glossary improvement (#19881) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/copilot-instructions.md | 2 + docs/coding-standards.md | 69 ++++++++++++++++++++++++++++----- 2 files changed, 61 insertions(+), 10 deletions(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 6dd66b82a6f..fbc27d0ef18 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -48,6 +48,8 @@ Before submitting: `./build.sh -c Release --testcoreclr` .fs: implementation .fsi: declarations, API docs, context comments +Abbreviations (`ad`, `cenv`, `m`, `tcref`, `eenv`, `cgbuf`, `ncenv`, `tau`, …): see `docs/coding-standards.md` for the canonical glossary before guessing what a short identifier means. + ## Rules Public API change → update .fsi diff --git a/docs/coding-standards.md b/docs/coding-standards.md index 45056e91dce..aa0bb2e0b1e 100644 --- a/docs/coding-standards.md +++ b/docs/coding-standards.md @@ -27,41 +27,90 @@ The compiler codebase uses various abbreviations. Here are some of the most comm | `arg` | Argument (parameter) | | `argty` | Argument (parameter) type | | `arginfo` | Argument (parameter) metadata | -| `ccu` | Reference to an F# compilation unit = an F# DLL (possibly including the DLL being compiled) | +| `boxity` | IL boxity (`ILBoxity` = `AsObject` \| `AsValue`), the IL-level marker distinguishing the reference (boxed) and value-type forms of a type | +| `ccont` | Cancellation continuation in the Async CPS model: `OperationCanceledException -> AsyncReturn`, invoked when an async computation is cancelled | +| `ccu` | Reference to a compilation unit (`CcuThunk`): any referenced assembly (F# or otherwise; `CcuData.IsFSharp` distinguishes), possibly the assembly currently being compiled | | `celem` | Custom attribute element | | `cenv` | Compilation environment. Means different things in different contexts, but usually a parameter for a single compilation state object being passed through a set of related functions in a single phase. The compilation state is often mutable. | -| `cpath` | Compilation path, meaning A.B.C for the overall names containing a type or module definition | +| `cgbuf` | Code-generation buffer (`CodeGenBuffer`): the mutable buffer accumulating IL instructions, locals, exception clauses and sequence points for one method body in IlxGen | +| `cloc` | Compile location (`CompileLocation`): IL scope + top-level impl name + namespace + enclosing-type path (+ source-file qualified name and range) used to place a generated IL entity | +| `cloinfo` | IL closure information (`IlxClosureInfo`): the IlxGen descriptor for an emitted F# closure (free variables, formal signature, IL type) | +| `cont` | Continuation. In FSharp.Core async, the success continuation `cont<'T> = 'T -> AsyncReturn` (`async.fs`). In compiler lowering passes (`LowerCalls`, `LowerComputedCollections`, `LowerStateMachines`), the conventional name for a generic CPS-style callback (typically `Expr -> Expr` / `Expr -> Expr option`) | +| `cpath` | Compilation path (`CompilationPath` = `CompPath of ILScopeRef * SyntaxAccess * (string * ModuleOrNamespaceKind) list`): the IL scope + access + enclosing module/namespace path (the A.B.C container) for a type or module definition | | `css` | Constraint solver state. | +| `ctok` | Compilation thread token (`CompilationThreadToken`): a phantom token witnessing that code runs on the single compilation thread; gates access to the (partially mutable) TAST/`TcImports` data, type-provider resolution and `SourceCodeServices`/`IncrementalBuild` caches | +| `ctxt` | Context (spelled `ctxt` rather than the more common `ctx`): in `ilread.fs` this is an `ILMetadataReader` threaded through the `seekRead*` helpers when parsing .NET metadata; elsewhere it can be a different context type (e.g. `ExecutionContext` in `IlxGen.LookupGeneratedValue`) | +| `csenv` | Constraint solver environment (`ConstraintSolverEnv`): the per-call solver context (range, equivalence env, display env, suspicion/trace state). Threaded through every `Solve*`/`Add*` helper in `ConstraintSolver.fs`; distinct from the mutable `css` (`ConstraintSolverState`) | +| `cuspec` | Compiled-union spec (`IlxUnionSpec`): the IL-level descriptor of a discriminated union (type ref, generic args, cases) used by EraseUnions | | `denv` | Display Environment. Parameters guiding the formatting of types | +| `dtree` | Decision tree (`DecisionTree`, with cases `TDSwitch`/`TDSuccess`/`TDBind`): the compiled pattern-match tree, carried as the `decision` field of `Expr.Match` | | `einfo` | An info object for an event (whether a .NET event, an F# event or a provided event) | | `e` | Expression | +| `econt` | Exception continuation in the Async CPS model: `ExceptionDispatchInfo -> AsyncReturn`, invoked when an async computation faults | +| `eenv` | IlxGen emit environment (`IlxGenEnv`): the threaded code-generation context carrying `ValStorage` mappings (`valsInScope`), witnesses-in-scope, type-parameter representation env (`tyenv`), `CompileLocation` (`cloc`), live-locals set and IL-emit flags during IL emission | +| `emenv` | Reflection.Emit / dynamic-assembly emit env (`ILDynamicAssemblyEmitEnv`, in code spelled `emEnv`): maps compiler IL refs to live `System.Reflection.Emit` types/methods/fields (used by FSI dynamic codegen) | | `env` | Environment. Means different things in different contexts, but usually immutable state being passed and adjusted through a set of related functions in a single phase. | +| `eref` | Entity reference (`EntityRef`): a reference to a TypedTree `Entity` (Tycon/Module). Common bindings: `let eref = ERefNonLocalPreResolved …` (IlxGen), `(eref: EntityRef)` parameters in TypedTree helpers, the `Parent eref` case of `ParentRef` | +| `fdef` | IL field definition (`ILFieldDef`); also commonly spelled `fd` in AbstractIL helpers — these are synonyms | | `finfo` | An info object for a field (whether a .NET field or a provided field) | | `fref` | A reference to an ILFieldRef Abstract IL node for a field reference. Would normally be modernized to `ilFieldRef` | +| `fspec` | Field spec — usually an `ILFieldSpec` in IL emit/read code, also a `RecdField` (record/class field declaration) in TypedTree code paths. **These are distinct types, not synonyms** — the name collision is historical | +| `fvs` | Free variables (`FreeVars`): the structured record of variables/typars free in an expression (computed by `freeInExpr`/`accFreevars*`), used by DetupleArgs, closure conversion and `InnerLambdasToTopLevelFuncs` | | `g` | The TcGlobals value | +| `hier` | Visual Studio hierarchy (`IVsHierarchy`): the VS shell projection of a project tree (project nodes + items) | | `id` | Identifier | -| `lid` | Long Identifier | -| `m` | A source code range marker | -| `mimpl` | IL interface method implementation | +| `ilg` | IL globals (`ILGlobals`): cached well-known IL types/primitives (`typ_Object`, `typ_Int32`, …); the AbsIL counterpart of `TcGlobals`, usually reached as `g.ilg` | +| `itemid` | Visual Studio item id (`VSITEMID`, a `uint32`) identifying a node within an `IVsHierarchy`, with sentinels `VSITEMID_ROOT`/`_NIL`/`_SELECTION` | +| `lid` | Long Identifier (`LongIdent` = `Ident list`); SyntaxTree DU fields conventionally use the full-form synonym `longId` | +| `m` | A source code `range` (file-and-position span). Not to be confused with `Mark`, the IL code-label type in `IlxGen` | +| `mdef` | Usually an IL method definition (`ILMethodDef`) being emitted, also frequently spelled `md` — these are synonyms. In some IlxGen module walks `mdef` is also a module body (`ModuleOrNamespaceContents`/`ILModuleDef`) — distinct types | +| `mgbuf` | Module/assembly generation buffer (the IlxGen `AssemblyBuilder`): collects type defs, method defs, anonymous-record types and resources for the whole assembly being emitted | +| `mimpl` | In IL emit/morph code, an `ILMethodImplDef` (an explicit method-implementation override, often for an interface). In the Symbols layer (`Symbols/Exprs.fs`), the parameter name for a `CheckedImplFile` (a typed implementation file). **These are distinct types, not synonyms** | | `minfo` | An info object for a method (whether a .NET method, an F# method or a provided method) | +| `minst` | Method instantiation — in TypedTree code a `TypeInst` (`TType list`) of method type arguments (the per-method analogue of `tinst`); in AbstractIL method specs an `ILGenericArgs` | | `mk` | Means make in old fashioned F#/OCaml coding style | -| `modul` | a Typed Tree structure for a namespace or F# module | +| `modref` | Module or namespace reference — usually `ModuleOrNamespaceRef` (an alias for `EntityRef`, the parallel of `tcref`/`vref`); in AbstractIL `ILScopeRef.Module` patterns it is an `ILModuleRef` | +| `modul` | In TypedTree contexts a `ModuleOrNamespace` (the typed structure for a namespace or F# module). In AbstractIL contexts (`ilread`/`ilwrite`/`ilprint`/`ilmorph`/`ilreflect`), the same name is used for an `ILModuleDef` (the IL/CLI module being read or emitted; also spelled `ilModule`). **These are distinct types, not synonyms** | +| `mref` | IL method reference (`ILMethodRef`): the IL-level identity of an uninstantiated method (declaring type ref, calling convention, name, generic arity, argument types, return type) | +| `mspec` | Usually an `ILMethodSpec` (IL-level descriptor of an instantiated method) in IL emit code; also `ModuleOrNamespace` in TypedTree module-binding code (`ModuleOrNamespaceBinding.Module(mspec, …)`) and related IlxGen module-location helpers. **These are distinct types, not synonyms** | +| `mty` | Module type (`ModuleOrNamespaceType`, also spelled `mtyp` — these are synonyms): the signature/contents (sub-modules, types, vals) of a module or namespace — used both for the type-checked contents of an implementation and for the declared contents of a signature | +| `ncenv` | Name resolver (`NameResolver`): the `cenv`-style state object (globals/amap/infoReader) threaded through name resolution | +| `nenv` | Name resolution environment (`NameResolutionEnv`): the in-scope name → `Item` lookup tables active at a program point | +| `nleref` | Non-local entity reference (`NonLocalEntityRef of CcuThunk * string[]`): an in-memory path-indexed reference into the namespace/module structure of a CCU (often another assembly, but possibly the CCU being compiled) | +| `nlr` | Non-local reference — usually `NonLocalEntityRef` (as the `nlr` field of `EntityRef`), occasionally `NonLocalValOrMemberRef` (the `nlr` field of `ValRef`). **Distinct types, not synonyms** — different reference layers | | `pat` | Pattern, a syntactic AST node representing part of a pattern in a pattern match | +| `pc` | Program counter — the `int` state label allocated per resumption point in `LowerSequences`/`LowerStateMachines` | +| `penv` | Pass environment — a pass-local `cenv`-style record threaded through an Optimizer pass (e.g. `penv` in `DetupleArgs.fs`, `RewriteContext` in `InnerLambdasToTopLevelFuncs.fs`) | | `pinfo` | An info object for a property (whether a .NET property, an F# property or a provided property) | +| `plid` | Partial long identifier (a `string list`): the dotted prefix typed so far during IDE completion (the "Foo.Bar." path) | +| `q` | In FSharp.Core (`Linq.fs`, `Query.fs`, query/quotation transforms), an F# quotation value (`Quotations.Expr` or `Quotations.Expr<'T>`) being inspected or transformed; occasionally a parser/matcher function in quotation helpers | +| `rdt` | Running Document Table (`IVsRunningDocumentTable`): the Visual Studio service that tracks all open documents and their buffers | +| `reqdty` | Required type (`reqdTy`, a `TType`): the expected/target type flowed into expression type checking | +| `rfinfo` | Record/class field info (`RecdFieldInfo`): an `rfref` together with the enclosing type's instantiation (i.e. a field viewed through a concrete type) | | `rfref` | Record or class field reference, a reference to a Typed Tree node for a record or class field | -| `scoref` | The scope of a reference in IL metadata, either assembly, `.netmodule` or local | +| `scoref` | Scope reference (`ILScopeRef`) for an IL metadata reference: `Local`, `Module` of `ILModuleRef`, `Assembly` of `ILAssemblyRef`, or `PrimaryAssembly` | +| `sm` | Resumable state machine (a `byref>`) passed through CE builder methods, tasks and resumable code; also `byref>` in task-specific paths | | `sp` | Sequence points or debug points | | `spat` | Simple Pattern, a syntactic AST node representing part of a pattern in a pattern match | | `tau` | A type with the "forall" nodes stripped off (i.e. the nodes which represent generic type parameters). Comes from the notation _𝛕_ used in type theory | -| `tcref` | Type constructor reference (an `EntityRef`) | +| `tcaug` | Type constructor augmentation (`TyconAugmentation`, accessed via `tcref.TypeContents`): the mutable bag of interfaces, members and compiler-synthesized overrides (Compare/Equals/Hash) added to a `Tycon` | +| `tcref` | Type constructor reference (`TyconRef`, an alias for `EntityRef`; long-form synonym `tyconRef` is also used): the parallel of `modref`/`vref`/`eref` for class/record/union/exception/abbreviation/measure type constructors | +| `tdef` | IL type definition (`ILTypeDef`); also commonly spelled `td` in AbstractIL helpers — these are synonyms | | `tinst` | Type instantiation | | `tpenv` | Type parameter environment, tracks the type parameters in scope during type checking | +| `tps` | Type parameter list (`Typars` = `Typar list`; long-form synonym `typars` is also used): the typars paired with `tau` in `TType_forall(tps, tau)` / `Expr.TyChoose(tps, …)` | +| `tpsorig` | Original typars (spelled `tpsorig` in code, a `Typar list`): the user-written typars before freshening/renaming, paired with the copied set (`tps`) | +| `traitinfo` | Trait constraint info (`TraitConstraintInfo`, spelled `traitInfo`): the SRTP "method-like" constraint (support types, name, argument types, return type) | +| `tref` | IL type reference (`ILTypeRef`): `Scope` (`ILScopeRef`) + `Enclosing` (string list of enclosing type names) + `Name`. For non-nested types the namespace is encoded in `Name`; nested types use `Enclosing` | | `ty` (not: `typ`) | Type, usually a Typed Tree type | -| `tys` (not: `typs`) | List of types, usually Typed Tree types | +| `tycon` | Type constructor (`Tycon`, an alias for `Entity`): a type or exception definition (class/record/union/abbreviation/exception/measure) in the TypedTree; `tcref.Deref` returns one. Modules and namespaces use the parallel alias `ModuleOrNamespace` | | `typar` | Type Parameter | +| `tys` (not: `typs`) | List of types, usually Typed Tree types | | `tyvar` | Type Variable, usually referring to an IL type variable, the compiled form of an F# type parameter | | `ucref` | Union case reference, a reference to a Typed Tree node for a union case | -| `vref` | Value reference, a reference to a Typed Tree node for a value | +| `vinfo` | Value info — in the Optimizer, the abstract value of an expression: `ExprValueInfo` (the DU with cases `UnknownValue`/`SizeValue`/`ValValue`/`TupleValue`/`RecdValue`/`UnionCaseValue`/`ConstValue`/`CurriedLambdaValue`/…) or the per-binding wrapper `ValInfo` (`ValMakesNoCriticalTailcalls` + `ValExprInfo`). **Distinct types, not synonyms** — `ValInfo` wraps an `ExprValueInfo` | +| `vref` | Value reference (`ValRef`; long-form synonym `valRef` is also used): a reference to a Typed Tree node for a value | +| `vspec` | Val "spec" — a `Val` (the underlying definition behind a `vref`, typically obtained via `vref.Deref`). Often shortened to just `v` in tight scopes | | Phase Abbreviation | Meaning | |:------------------------------|:-----------| From 3f2ef658c0d74df1affd103c1fa2a594d6995ffb Mon Sep 17 00:00:00 2001 From: Jakub Majocha <1760221+majocha@users.noreply.github.com> Date: Wed, 3 Jun 2026 10:07:43 +0200 Subject: [PATCH 41/72] Remove duplicate and unused file (#19886) SkipLocalsInit.fs file exisits in two different folders and only one of the copies is actually included in the project. --- .../SkipLocalsInit.fs | 182 ------------------ 1 file changed, 182 deletions(-) delete mode 100644 tests/FSharp.Compiler.ComponentTests/SkipLocalsInit.fs diff --git a/tests/FSharp.Compiler.ComponentTests/SkipLocalsInit.fs b/tests/FSharp.Compiler.ComponentTests/SkipLocalsInit.fs deleted file mode 100644 index 4f58983e533..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/SkipLocalsInit.fs +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. - -namespace EmittedIL - -open Xunit -open FSharp.Test.Compiler - -module ``SkipLocalsInit`` = - [] - let ``Init in function and closure not emitted when applied on function``() = - FSharp """ -module SkipLocalsInit - -[] -let x () = - [||] |> Array.filter (fun x -> let y = "".Length in y + y = x) |> ignore -""" - |> compile - |> shouldSucceed - |> verifyIL [""" -.method public static void x() cil managed -{ - .custom instance void [runtime]System.Runtime.CompilerServices.SkipLocalsInitAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 4 - .locals (int32[] V_0) -""" - - """ -.method public strict virtual instance bool - Invoke(int32 x) cil managed -{ - - .maxstack 6 - .locals (int32 V_0)"""] - - [] - let ``Init in static method not emitted when applied on class``() = - FSharp """ -module SkipLocalsInit - -[] -type X () = - static member Y () = - let x = "ssa".Length - x + x - """ - |> compile - |> shouldSucceed - |> verifyIL [""" -.custom instance void [runtime]System.Runtime.CompilerServices.SkipLocalsInitAttribute::.ctor() = ( 01 00 00 00 ) -.custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) -""" - - """ -.method public static int32 Y() cil managed -{ - - .maxstack 4 - .locals (int32 V_0)"""] - - [] - let ``Init in static method and function not emitted when applied on module``() = - FSharp """ -[] -module SkipLocalsInit - -let x () = - let x = "ssa".Length - x + x - -type X () = - static member Y () = - let x = "ssa".Length - x + x - """ - |> compile - |> shouldSucceed - |> verifyIL [""" -.custom instance void [runtime]System.Runtime.CompilerServices.SkipLocalsInitAttribute::.ctor() = ( 01 00 00 00 ) -.custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) -""" - - """ -.method public static int32 x() cil managed -{ - - .maxstack 4 - .locals (int32 V_0) -""" - - """ -.method public static int32 Y() cil managed -{ - - .maxstack 4 - .locals (int32 V_0)"""] - - [] - let ``Init in method and closure not emitted when applied on method``() = - FSharp """ -module SkipLocalsInit - -type X () = - [] - member _.Y () = - [||] |> Array.filter (fun x -> let y = "".Length in y + y = x) |> ignore - let x = "ssa".Length - x + x - """ - |> compile - |> shouldSucceed - |> verifyIL [""" -.method public hidebysig instance int32 - Y() cil managed -{ - .custom instance void [runtime]System.Runtime.CompilerServices.SkipLocalsInitAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 4 - .locals (int32[] V_0, - int32 V_1) -""" - - """ -.method public strict virtual instance bool - Invoke(int32 x) cil managed -{ - - .maxstack 6 - .locals (int32 V_0) -""" ] - - [] - let ``Zero init performed to get defaults despite the attribute``() = - FSharp """ -module SkipLocalsInit -open System - -[] -let z () = - let mutable a = Unchecked.defaultof - a - -[] -let x f = - let a = if 1 / 1 = 1 then Nullable () else Nullable 5L - f a |> ignore - """ - |> compile - |> shouldSucceed - |> verifyIL [""" -.locals (valuetype [runtime]System.DateTime V_0) -IL_0000: ldloca.s V_0 -IL_0002: initobj [runtime]System.DateTime -IL_0008: ldloc.0 -IL_0009: ret - """ - - """ -.locals (valuetype [runtime]System.Nullable`1 V_0, - valuetype [runtime]System.Nullable`1 V_1, - !!a V_2) -IL_0000: ldc.i4.1 -IL_0001: ldc.i4.1 -IL_0002: div -IL_0003: ldc.i4.1 -IL_0004: bne.un.s IL_0011 - -IL_0006: ldloca.s V_1 -IL_0008: initobj valuetype [runtime]System.Nullable`1 -IL_000e: ldloc.1 -IL_000f: br.s IL_0018 - -IL_0011: ldc.i4.5 -IL_0012: conv.i8 -IL_0013: newobj instance void valuetype [runtime]System.Nullable`1::.ctor(!0) -IL_0018: stloc.0 -IL_0019: ldarg.0 -IL_001a: ldloc.0 -IL_001b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,!!a>::Invoke(!0) -IL_0020: stloc.2 -IL_0021: ret"""] \ No newline at end of file From 87f9bb7c453e8078eaaf3f4516572254bf35dff9 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Wed, 3 Jun 2026 12:17:44 +0200 Subject: [PATCH 42/72] [main] Update dependencies from dotnet/roslyn (#19827) * Update dependencies from https://github.com/dotnet/roslyn build 20260526.4 On relative base path root Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.Compilers , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.EditorFeatures , Microsoft.CodeAnalysis.EditorFeatures.Text , Microsoft.CodeAnalysis.ExternalAccess.FSharp , Microsoft.CodeAnalysis.Features , Microsoft.VisualStudio.LanguageServices From Version 5.8.0-1.26274.20 -> To Version 5.8.0-1.26276.4 * Update dependencies from https://github.com/dotnet/roslyn build 20260527.7 On relative base path root Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.Compilers , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.EditorFeatures , Microsoft.CodeAnalysis.EditorFeatures.Text , Microsoft.CodeAnalysis.ExternalAccess.FSharp , Microsoft.CodeAnalysis.Features , Microsoft.VisualStudio.LanguageServices From Version 5.8.0-1.26274.20 -> To Version 5.9.0-1.26277.7 * Update dependencies from https://github.com/dotnet/roslyn build 20260528.5 On relative base path root Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.Compilers , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.EditorFeatures , Microsoft.CodeAnalysis.EditorFeatures.Text , Microsoft.CodeAnalysis.ExternalAccess.FSharp , Microsoft.CodeAnalysis.Features , Microsoft.VisualStudio.LanguageServices From Version 5.8.0-1.26274.20 -> To Version 5.9.0-1.26278.5 * Update dependencies from https://github.com/dotnet/roslyn build 20260529.9 On relative base path root Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.Compilers , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.EditorFeatures , Microsoft.CodeAnalysis.EditorFeatures.Text , Microsoft.CodeAnalysis.ExternalAccess.FSharp , Microsoft.CodeAnalysis.Features , Microsoft.VisualStudio.LanguageServices From Version 5.8.0-1.26274.20 -> To Version 5.9.0-1.26279.9 * Update dependencies from https://github.com/dotnet/roslyn build 20260601.8 On relative base path root Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.Compilers , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.EditorFeatures , Microsoft.CodeAnalysis.EditorFeatures.Text , Microsoft.CodeAnalysis.ExternalAccess.FSharp , Microsoft.CodeAnalysis.Features , Microsoft.VisualStudio.LanguageServices From Version 5.8.0-1.26274.20 -> To Version 5.9.0-1.26301.8 * Update dependencies from https://github.com/dotnet/roslyn build 20260602.3 On relative base path root Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.Compilers , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.EditorFeatures , Microsoft.CodeAnalysis.EditorFeatures.Text , Microsoft.CodeAnalysis.ExternalAccess.FSharp , Microsoft.CodeAnalysis.Features , Microsoft.VisualStudio.LanguageServices From Version 5.8.0-1.26274.20 -> To Version 5.9.0-1.26302.3 --------- Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.props | 16 ++++++++-------- eng/Version.Details.xml | 32 ++++++++++++++++---------------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/eng/Version.Details.props b/eng/Version.Details.props index 27fe3ea88b2..76020eb0c6a 100644 --- a/eng/Version.Details.props +++ b/eng/Version.Details.props @@ -19,14 +19,14 @@ This file should be imported by eng/Versions.props 1.0.0-prerelease.26272.1 1.0.0-prerelease.26272.1 - 5.8.0-1.26274.20 - 5.8.0-1.26274.20 - 5.8.0-1.26274.20 - 5.8.0-1.26274.20 - 5.8.0-1.26274.20 - 5.8.0-1.26274.20 - 5.8.0-1.26274.20 - 5.8.0-1.26274.20 + 5.9.0-1.26302.3 + 5.9.0-1.26302.3 + 5.9.0-1.26302.3 + 5.9.0-1.26302.3 + 5.9.0-1.26302.3 + 5.9.0-1.26302.3 + 5.9.0-1.26302.3 + 5.9.0-1.26302.3 10.0.2 10.0.2 diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 80f7750a1f0..dc211cac459 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -18,37 +18,37 @@ https://github.com/dotnet/msbuild 4ea8215937724cd480a29c30187195b5cbda7486 - + https://github.com/dotnet/roslyn - 560c1cca10d974ff096cb051d45c1330420e8e6a + 9fa44037cfccdd8ec2e56429627522e15712af23 - + https://github.com/dotnet/roslyn - 560c1cca10d974ff096cb051d45c1330420e8e6a + 9fa44037cfccdd8ec2e56429627522e15712af23 - + https://github.com/dotnet/roslyn - 560c1cca10d974ff096cb051d45c1330420e8e6a + 9fa44037cfccdd8ec2e56429627522e15712af23 - + https://github.com/dotnet/roslyn - 560c1cca10d974ff096cb051d45c1330420e8e6a + 9fa44037cfccdd8ec2e56429627522e15712af23 - + https://github.com/dotnet/roslyn - 560c1cca10d974ff096cb051d45c1330420e8e6a + 9fa44037cfccdd8ec2e56429627522e15712af23 - + https://github.com/dotnet/roslyn - 560c1cca10d974ff096cb051d45c1330420e8e6a + 9fa44037cfccdd8ec2e56429627522e15712af23 - + https://github.com/dotnet/roslyn - 560c1cca10d974ff096cb051d45c1330420e8e6a + 9fa44037cfccdd8ec2e56429627522e15712af23 - + https://github.com/dotnet/roslyn - 560c1cca10d974ff096cb051d45c1330420e8e6a + 9fa44037cfccdd8ec2e56429627522e15712af23 From 74802deca451e297383181adfb7b7268ec498944 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Wed, 3 Jun 2026 12:17:49 +0200 Subject: [PATCH 43/72] Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20260526.2 (#19824) On relative base path root optimization.linux-arm64.MIBC.Runtime , optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-arm64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime From Version 1.0.0-prerelease.26272.1 -> To Version 1.0.0-prerelease.26276.2 Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.props | 10 +++++----- eng/Version.Details.xml | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/eng/Version.Details.props b/eng/Version.Details.props index 76020eb0c6a..b4fd722ff46 100644 --- a/eng/Version.Details.props +++ b/eng/Version.Details.props @@ -13,11 +13,11 @@ This file should be imported by eng/Versions.props 18.8.0-preview-26275-09 18.8.0-preview-26275-09 - 1.0.0-prerelease.26272.1 - 1.0.0-prerelease.26272.1 - 1.0.0-prerelease.26272.1 - 1.0.0-prerelease.26272.1 - 1.0.0-prerelease.26272.1 + 1.0.0-prerelease.26276.2 + 1.0.0-prerelease.26276.2 + 1.0.0-prerelease.26276.2 + 1.0.0-prerelease.26276.2 + 1.0.0-prerelease.26276.2 5.9.0-1.26302.3 5.9.0-1.26302.3 diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index dc211cac459..e5830610897 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -86,25 +86,25 @@ https://github.com/dotnet/arcade c6213589e6917c4508c966c282eedbe4efda13e5 - + https://dev.azure.com/dnceng/internal/_git/dotnet-optimization - dc7a7b2513eb974ac651682ab4aac0a62edace64 + 66482c2bec0351f496e4cc18d98f0f55f78b0c78 - + https://dev.azure.com/dnceng/internal/_git/dotnet-optimization - dc7a7b2513eb974ac651682ab4aac0a62edace64 + 66482c2bec0351f496e4cc18d98f0f55f78b0c78 - + https://dev.azure.com/dnceng/internal/_git/dotnet-optimization - dc7a7b2513eb974ac651682ab4aac0a62edace64 + 66482c2bec0351f496e4cc18d98f0f55f78b0c78 - + https://dev.azure.com/dnceng/internal/_git/dotnet-optimization - dc7a7b2513eb974ac651682ab4aac0a62edace64 + 66482c2bec0351f496e4cc18d98f0f55f78b0c78 - + https://dev.azure.com/dnceng/internal/_git/dotnet-optimization - dc7a7b2513eb974ac651682ab4aac0a62edace64 + 66482c2bec0351f496e4cc18d98f0f55f78b0c78 From d6558b2769972b8dd0301c2c9a87d902bf59ba8c Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Wed, 3 Jun 2026 12:17:59 +0200 Subject: [PATCH 44/72] [main] Update dependencies from dotnet/arcade (#19825) * Update dependencies from https://github.com/dotnet/arcade build 20260526.7 On relative base path root Microsoft.DotNet.Arcade.Sdk From Version 10.0.0-beta.26275.1 -> To Version 10.0.0-beta.26276.7 * Update dependencies from https://github.com/dotnet/arcade build 20260528.2 On relative base path root Microsoft.DotNet.Arcade.Sdk From Version 10.0.0-beta.26275.1 -> To Version 10.0.0-beta.26278.2 * Update dependencies from https://github.com/dotnet/arcade build 20260601.2 On relative base path root Microsoft.DotNet.Arcade.Sdk From Version 10.0.0-beta.26275.1 -> To Version 10.0.0-beta.26301.2 --------- Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.props | 2 +- eng/Version.Details.xml | 4 ++-- eng/common/core-templates/steps/publish-logs.yml | 3 --- global.json | 2 +- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/eng/Version.Details.props b/eng/Version.Details.props index b4fd722ff46..8198264a4a0 100644 --- a/eng/Version.Details.props +++ b/eng/Version.Details.props @@ -6,7 +6,7 @@ This file should be imported by eng/Versions.props - 10.0.0-beta.26275.1 + 10.0.0-beta.26301.2 18.8.0-preview-26275-09 18.8.0-preview-26275-09 diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index e5830610897..78884c3639f 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -82,9 +82,9 @@ - + https://github.com/dotnet/arcade - c6213589e6917c4508c966c282eedbe4efda13e5 + 2a80f6e04a835d6beee635c93331b38944de8129 https://dev.azure.com/dnceng/internal/_git/dotnet-optimization diff --git a/eng/common/core-templates/steps/publish-logs.yml b/eng/common/core-templates/steps/publish-logs.yml index 4eed0312b80..694f55a926e 100644 --- a/eng/common/core-templates/steps/publish-logs.yml +++ b/eng/common/core-templates/steps/publish-logs.yml @@ -33,9 +33,6 @@ steps: '$(publishing-dnceng-devdiv-code-r-build-re)' '$(dn-bot-all-orgs-artifact-feeds-rw)' '$(akams-client-id)' - '$(microsoft-symbol-server-pat)' - '$(symweb-symbol-server-pat)' - '$(dnceng-symbol-server-pat)' '$(dn-bot-all-orgs-build-rw-code-rw)' '$(System.AccessToken)' ${{parameters.CustomSensitiveDataList}} diff --git a/global.json b/global.json index d1ae62fb540..2f60a93cbf1 100644 --- a/global.json +++ b/global.json @@ -22,7 +22,7 @@ "xcopy-msbuild": "18.0.0" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.26275.1", + "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.26301.2", "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.23255.2" } } From eb038f01c2c79484a32db294d61495992da9c532 Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Wed, 3 Jun 2026 14:02:26 +0200 Subject: [PATCH 45/72] Dedup format specifier locations in computation expressions (#19791) --- .../.FSharp.Compiler.Service/11.0.100.md | 1 + src/Compiler/Checking/NameResolution.fs | 5 ++++- tests/FSharp.Compiler.Service.Tests/EditorTests.fs | 13 +++++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md index ff1c9aae2dd..91284f98907 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md +++ b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md @@ -1,5 +1,6 @@ ### Fixed +* Deduplicate format specifier locations in computation expressions so editor tooling no longer reports duplicate entries for the same `%` specifier. ([Issue #16419](https://github.com/dotnet/fsharp/issues/16419), [PR #19791](https://github.com/dotnet/fsharp/pull/19791)) * Reject non-function bindings for single-case and partial active pattern names with FS1209, matching the existing multi-case behavior. ([PR #19763](https://github.com/dotnet/fsharp/pull/19763)) * Fix FS0421 "The address of the variable cannot be used at this point" incorrectly raised for the discard pattern `let _ = &expr` when `let x = &expr` compiles. ([Issue #18841](https://github.com/dotnet/fsharp/issues/18841), [PR #19811](https://github.com/dotnet/fsharp/pull/19811)) * Honor `--nowarn` and `--warnaserror` for warnings emitted during command-line option parsing ([Issue #19576](https://github.com/dotnet/fsharp/issues/19576), [PR #19776](https://github.com/dotnet/fsharp/pull/19776)) diff --git a/src/Compiler/Checking/NameResolution.fs b/src/Compiler/Checking/NameResolution.fs index 898dc78aa75..36eedebfbe8 100644 --- a/src/Compiler/Checking/NameResolution.fs +++ b/src/Compiler/Checking/NameResolution.fs @@ -2185,6 +2185,8 @@ type TcResultsSinkImpl(tcGlobals, ?sourceText: ISourceText) = let capturedOpenDeclarations = ResizeArray() let capturedFormatSpecifierLocations = ResizeArray<_>() + let capturedFormatSpecifierRanges = HashSet() + let capturedNameResolutionIdentifiers = HashSet { new IEqualityComparer<_> with @@ -2289,7 +2291,8 @@ type TcResultsSinkImpl(tcGlobals, ?sourceText: ISourceText) = capturedMethodGroupResolutions.Add(CapturedNameResolution(itemMethodGroup, [], occurrenceType, nenv, ad, m)) member sink.NotifyFormatSpecifierLocation(m, numArgs) = - capturedFormatSpecifierLocations.Add((m, numArgs)) + if capturedFormatSpecifierRanges.Add(m) then + capturedFormatSpecifierLocations.Add((m, numArgs)) member sink.NotifyRelatedSymbolUse(m, item, kind) = if allowedRange m then diff --git a/tests/FSharp.Compiler.Service.Tests/EditorTests.fs b/tests/FSharp.Compiler.Service.Tests/EditorTests.fs index 44be1a5cfef..f9c1da195fe 100644 --- a/tests/FSharp.Compiler.Service.Tests/EditorTests.fs +++ b/tests/FSharp.Compiler.Service.Tests/EditorTests.fs @@ -541,6 +541,19 @@ let _ = debug "[LanguageService] Type checking fails for '%s' with content=%A an (4, 82, 4, 84, 1); (4, 108, 4, 110, 1)|] +[] +let ``Format specifier locations not duplicated in CE`` () = + let input = "let _ = seq { sprintf \"%d\" 1 }" + let file = "/home/user/Test.fsx" + let _parseResult, typeCheckResults = parseAndCheckScript(file, input) + + let locations = typeCheckResults.GetFormatSpecifierLocationsAndArity() + let percentD = + locations + |> Array.filter (fun (r, _) -> r.StartColumn = 23) + + Assert.Equal(1, percentD.Length) + #if ASSUME_PREVIEW_FSHARP_CORE [] let ``Printf specifiers for regular and verbatim interpolated strings`` () = From 3cf85be4c4c6cd66a456bb6e69343d066d748e3d Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Wed, 3 Jun 2026 15:11:02 +0200 Subject: [PATCH 46/72] Preserve type aliases in match | null refinement (#19745) * Add failing TDD tests for issue #19646 (alias dropped after | null pattern) After 'match x with | null -> ... | s -> ...', the type of s loses its alias (e.g. 'string' becomes 'System.String'). These tests lock in the desired behavior; they fail on main and will pass once the fix lands. Refs https://github.com/dotnet/fsharp/issues/19646 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix #19646: preserve type aliases in match | null refinement The removeNull helper in TcMatchClause was unconditionally calling stripTyEqns, which expanded transparent abbreviations like 'string' to 'System.String'. As a result, in: let test (x: string | null) = match x with | null -> null | s -> s.Replace("a", "b") the inferred type of 's' was displayed as 'String' instead of 'string'. Fix: try the cheap path first (replaceNullnessOfTy KnownWithoutNull), which preserves the abbreviation. If the resulting effective nullness is already WithoutNull (transparent aliases like 'string' / 'MyStr'), use that. Otherwise (abbreviations that encode nullness in their RHS, like 'type objnull = obj | null'), fall back to the full stripTyEqns path introduced by #18852 to keep that regression fixed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Collapse Issue 19646 tests into a Theory Per review feedback: parameterize the three alias preservation cases (string, user alias, Uri alias) into a single Theory with InlineData, and drop the redundant negative test (the case-sensitive substring match on 'string' already rules out 'String'). Refs #19646 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../.FSharp.Compiler.Service/11.0.100.md | 1 + .../Checking/Expressions/CheckExpressions.fs | 17 +++++++++----- .../Nullness/NullableReferenceTypesTests.fs | 22 +++++++++++++++++++ 3 files changed, 35 insertions(+), 5 deletions(-) diff --git a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md index 91284f98907..793bf71982f 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md +++ b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md @@ -5,6 +5,7 @@ * Fix FS0421 "The address of the variable cannot be used at this point" incorrectly raised for the discard pattern `let _ = &expr` when `let x = &expr` compiles. ([Issue #18841](https://github.com/dotnet/fsharp/issues/18841), [PR #19811](https://github.com/dotnet/fsharp/pull/19811)) * Honor `--nowarn` and `--warnaserror` for warnings emitted during command-line option parsing ([Issue #19576](https://github.com/dotnet/fsharp/issues/19576), [PR #19776](https://github.com/dotnet/fsharp/pull/19776)) * Fix `[]` prefix attributes being silently dropped on class members, and fix false-positive `AllowMultiple=false` errors when `[]` and `[]` are applied to the same binding. ([Issue #17904](https://github.com/dotnet/fsharp/issues/17904), [Issue #19020](https://github.com/dotnet/fsharp/issues/19020), [PR #19738](https://github.com/dotnet/fsharp/pull/19738)) +* Preserve type abbreviations (`string`, user-defined aliases) in the refined type of bindings introduced after a `| null` pattern in a `match` expression. ([Issue #19646](https://github.com/dotnet/fsharp/issues/19646), [PR #19745](https://github.com/dotnet/fsharp/pull/19745)) * Fix attributes on return type of unparenthesized tuple methods being silently dropped from IL. ([Issue #462](https://github.com/dotnet/fsharp/issues/462), [PR #19714](https://github.com/dotnet/fsharp/pull/19714)) * Fix false-positive nullness warning (FS3261) when pattern matching narrows nullness inside seq/list/array comprehensions. ([Issue #19644](https://github.com/dotnet/fsharp/issues/19644), [PR #19743](https://github.com/dotnet/fsharp/pull/19743)) * Fix internal error FS0073 "Undefined or unsolved type variable" in IlxGen when nested inline SRTP functions with multiple overloads leave unsolved typars in the non-witness codegen path. ([Issue #19709](https://github.com/dotnet/fsharp/issues/19709), [PR #19710](https://github.com/dotnet/fsharp/pull/19710)) diff --git a/src/Compiler/Checking/Expressions/CheckExpressions.fs b/src/Compiler/Checking/Expressions/CheckExpressions.fs index 83e172628b5..f6e0a61663f 100644 --- a/src/Compiler/Checking/Expressions/CheckExpressions.fs +++ b/src/Compiler/Checking/Expressions/CheckExpressions.fs @@ -4130,11 +4130,18 @@ let formatAvailableNames (names: string array) = /// E.g. `match x with | null -> ... | y -> ...` narrows `inputTy` of the y-clause to non-null. let EliminateNullnessFromInputType (g: TcGlobals) (inputTy: TType) (pat: Pattern) (whenExprOpt: Expr option) : TType = let removeNull t = - // Strip type equations (including abbreviations) and set nullness to non-null. - // For type abbreviations like `type objnull = obj | null`, we need to expand - // the abbreviation and apply non-null to the underlying type. - let stripped = stripTyEqns g t - replaceNullnessOfTy KnownWithoutNull stripped + // Try clearing outer nullness first — preserves aliases (#19646): + // `string | null` → `string` (not `System.String`) + // `type MyStr = string` → `MyStr` + // Fall back to stripTyEqns for abbreviations encoding nullness in RHS (#18488): + // `type objnull = obj | null` — replaceNullness alone is a no-op (combineNullness) + let nonNullOriginal = replaceNullnessOfTy KnownWithoutNull t + + match (nullnessOfTy g nonNullOriginal).TryEvaluate() with + | ValueSome NullnessInfo.WithoutNull -> nonNullOriginal + | _ -> + let stripped = stripTyEqns g t + replaceNullnessOfTy KnownWithoutNull stripped let rec isWild (p: Pattern) = match p with | TPat_wild _ -> true diff --git a/tests/FSharp.Compiler.ComponentTests/Language/Nullness/NullableReferenceTypesTests.fs b/tests/FSharp.Compiler.ComponentTests/Language/Nullness/NullableReferenceTypesTests.fs index c45d73553e2..1a40feaa2cf 100644 --- a/tests/FSharp.Compiler.ComponentTests/Language/Nullness/NullableReferenceTypesTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/Language/Nullness/NullableReferenceTypesTests.fs @@ -2513,3 +2513,25 @@ let main _ = 0 |> compile |> run |> verifyOutputContains [|"-1"|] + +// https://github.com/dotnet/fsharp/issues/19646 +// After `| null -> … | s -> …`, `s` must keep its type alias, not the BCL type. +[] +[] +[] +[] +let ``Issue 19646 - type alias is preserved after null pattern`` + (typeDef: string, paramTypeName: string, expectedSubstring: string) = + FSharp $"""module Test + +{typeDef} + +let test (x: {paramTypeName} | null) : int = + match x with + | null -> 0 + | s -> s + """ + |> asLibrary + |> typeCheckWithStrictNullness + |> shouldFail + |> withDiagnosticMessageMatches expectedSubstring From c81bc8515d47782f5e4143aaacccf093a0f6aea4 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Wed, 3 Jun 2026 14:53:11 +0000 Subject: [PATCH 47/72] =?UTF-8?q?Suppress=20hover/symbol=20resolution=20fo?= =?UTF-8?q?r=20wildcard=20`=5F`=20patterns=20inside=20`member=20=5F.?= =?UTF-8?q?=E2=80=A6`=20(#19760)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../.FSharp.Compiler.Service/11.0.100.md | 1 + src/Compiler/Service/FSharpCheckerResults.fs | 7 ++++ .../TooltipTests.fs | 40 +++++++++++++++++++ 3 files changed, 48 insertions(+) diff --git a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md index 793bf71982f..2d67a9d450b 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md +++ b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md @@ -1,5 +1,6 @@ ### Fixed +* Suppress hover/symbol resolution for wildcard `_` patterns inside `member _.…` bodies that incorrectly showed `val _: T` tooltip. ([PR #19760](https://github.com/dotnet/fsharp/pull/19760)) * Deduplicate format specifier locations in computation expressions so editor tooling no longer reports duplicate entries for the same `%` specifier. ([Issue #16419](https://github.com/dotnet/fsharp/issues/16419), [PR #19791](https://github.com/dotnet/fsharp/pull/19791)) * Reject non-function bindings for single-case and partial active pattern names with FS1209, matching the existing multi-case behavior. ([PR #19763](https://github.com/dotnet/fsharp/pull/19763)) * Fix FS0421 "The address of the variable cannot be used at this point" incorrectly raised for the discard pattern `let _ = &expr` when `let x = &expr` compiles. ([Issue #18841](https://github.com/dotnet/fsharp/issues/18841), [PR #19811](https://github.com/dotnet/fsharp/pull/19811)) diff --git a/src/Compiler/Service/FSharpCheckerResults.fs b/src/Compiler/Service/FSharpCheckerResults.fs index 6e9c1ced079..271d9ae25eb 100644 --- a/src/Compiler/Service/FSharpCheckerResults.fs +++ b/src/Compiler/Service/FSharpCheckerResults.fs @@ -1631,11 +1631,18 @@ type internal TypeCheckInfo | None -> ValueNone | _ -> ValueNone + // Wildcard _ should not resolve to the member's synthetic self-identifier via fallback. + let isDiscardIdentifier = + match residueOpt, origLongIdentOpt with + | None, Some [ "_" ] -> true + | _ -> false + match nameResItems with | NameResResult.Cancel(denv, m) -> Some([], denv, m) | NameResResult.Members(FilterRelevantItems getItem exactMatchResidueOpt (items, denv, m)) -> // lookup based on name resolution results successful Some(items |> List.map (CompletionItem (getType ()) ValueNone), denv, m) + | _ when isDiscardIdentifier -> None | _ -> match origLongIdentOpt with | None -> None diff --git a/tests/FSharp.Compiler.Service.Tests/TooltipTests.fs b/tests/FSharp.Compiler.Service.Tests/TooltipTests.fs index 2947e09f565..9742daf0bf3 100644 --- a/tests/FSharp.Compiler.Service.Tests/TooltipTests.fs +++ b/tests/FSharp.Compiler.Service.Tests/TooltipTests.fs @@ -399,6 +399,9 @@ let assertNameTagInTooltip expectedTag expectedName (tooltip: ToolTipText) = let desc = tags |> Array.map (fun t -> sprintf "(%A, %s)" t.Tag t.Text) |> String.concat ", " Assert.True(found, sprintf "Expected tag %A with text '%s' in tooltip, but found: %s" expectedTag expectedName desc) +let assertToolTipIsEmpty (ToolTipText(items)) = + Assert.Empty items + let normalize (s: string) = s.Replace("\r\n", "\n").Replace("\n\n", "\n") [] @@ -594,6 +597,43 @@ let y = normaliz{caret}e' 5 |> assertAndGetSingleToolTipText |> Assert.shouldBeEquivalentTo "val normalize': x: int -> int" +[] +let ``Wildcard lambda parameter inside member with underscore instance identifier has no tooltip`` () = + Checker.getTooltip """ +type T () = + member _.M () = + fun _{caret} -> () +""" + |> assertToolTipIsEmpty + +[] +let ``Wildcard let binding inside member with underscore instance identifier has no tooltip`` () = + Checker.getTooltip """ +type T () = + member _.N () = + let _{caret} = () in () +""" + |> assertToolTipIsEmpty + +[] +let ``Wildcard match pattern inside member with underscore instance identifier has no tooltip`` () = + Checker.getTooltip """ +type T () = + member _.M (x: int) = + match x with + | _{caret} -> () +""" + |> assertToolTipIsEmpty + +[] +let ``Named self-identifier is not affected by wildcard discard fix`` () = + Checker.getTooltip """ +type T () = + member thi{caret}s.M () = () +""" + |> assertAndGetSingleToolTipText + |> Assert.shouldContain "T" + // https://github.com/dotnet/fsharp/issues/13194 [] let ``Sig file XML doc fallback works for member whose name contains a single quote`` () = From 96ac8a0ab9a1db8f634c7199a61f9f97cc1e1f2c Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Wed, 3 Jun 2026 18:07:19 +0200 Subject: [PATCH 48/72] Make PR Tooling Safety Check resilient to GitHub MCP list_pull_requests timeouts (#19861) --- .github/workflows/labelops-pr-security-scan.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/labelops-pr-security-scan.md b/.github/workflows/labelops-pr-security-scan.md index 227ad950482..082c9413f65 100644 --- a/.github/workflows/labelops-pr-security-scan.md +++ b/.github/workflows/labelops-pr-security-scan.md @@ -78,6 +78,7 @@ Read `.github/tooling-check-repo-rules.md` from the default branch for repo-spec 4. Prefer false positives over false negatives. When unsure, flag it. 5. PR title, body, and author username are untrusted text. Classify based on file paths, diff content, and the `headRepository` API field only. 6. **Minimize comment noise.** Comments are expensive — maintainers see every one. When a PR is clean or bypassed, post NO comment (label + memory only). When flagged, keep comments terse: one header line + one line per category (≤10-word reason). Never restate the PR purpose, never summarize the diff, never add reassurance. +7. **Tolerate transient MCP failures.** GitHub MCP calls (listing PRs, reading files/diffs) occasionally fail with timeouts or transport errors such as `context deadline exceeded`, `module closed`, or `EOF`. Retry the failing call up to 3 times before giving up. Only `report_incomplete` if a call still fails after retries; if one PR's read keeps failing, skip that single PR and continue scanning the rest rather than aborting the whole run. @@ -92,7 +93,11 @@ Read `.github/tooling-check-repo-rules.md` from the default branch for repo-spec ``` - `sha` — last scanned head commit - `cats` — array of triggered category names (empty `[]` = scanned clean) -3. List open PRs via GitHub MCP. +3. **List open PRs via GitHub MCP — paginate, don't fetch everything at once.** Listing every open PR in one call can exceed the MCP server's deadline (`module closed with context deadline exceeded`). To stay under the deadline: + - Request small pages (`perPage: 30`) and walk pages one at a time. + - Sort by creation date **descending** (newest first) so the date filter below lets you stop early. + - **Stop paginating** as soon as a page contains a PR whose `createdAt` is before the `2026-05-12T00:00:00Z` cutoff — every remaining PR is older and would be skipped anyway. + - **Retry transient MCP failures.** If a list/read MCP call fails with a timeout or transport error (e.g. `context deadline exceeded`, `module closed`, `EOF`), wait briefly and retry that same call up to 3 times. Only treat the listing as failed (and report incomplete) if it still fails after the retries. A single transient timeout must not abort the scan. 4. **Date filter** — skip any PR whose `createdAt` is before `2026-05-12T00:00:00Z`. Silently skip older PRs. 5. **Draft filter** — skip any PR where `isDraft` is `true`. Draft PRs are work-in-progress; do not label or comment. 6. **Prune memory** — for every PR number in `state.json` that is no longer in the open PR list (merged/closed), remove it from the JSON. This keeps the file small. From f15535b53dca7fc91cee2f90d58d7fa3fc7469d4 Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Wed, 3 Jun 2026 19:49:07 +0200 Subject: [PATCH 49/72] Fix XmlDoc validation for get/set property pairs (#13684) (#19884) * Fix XmlDoc validation for get/set property pairs (#13684) Each accessor's xmlDoc is now validated against the union of both accessors' parameter names, eliminating spurious 'unknown parameter' and 'no documentation for parameter' warnings under --warnon:3390 when a property documents the full parameter set across getter and setter. --- .../.FSharp.Compiler.Service/11.0.100.md | 1 + src/Compiler/SyntaxTree/SyntaxTreeOps.fs | 15 +++ src/Compiler/SyntaxTree/XmlDoc.fs | 16 +++ src/Compiler/SyntaxTree/XmlDoc.fsi | 5 + .../Language/XmlComments.fs | 124 +++++++++++++++++- ...iler.Service.SurfaceArea.netstandard20.bsl | 1 + 6 files changed, 161 insertions(+), 1 deletion(-) diff --git a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md index 2d67a9d450b..c843ddb3df1 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md +++ b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md @@ -71,6 +71,7 @@ * Reference assembly MVIDs are now deterministic across compiler invocations. Previously, `--refout` / `true` produced a different MVID every build because the implied signature hash used .NET's randomized `String.GetHashCode()`. ([Issue #19751](https://github.com/dotnet/fsharp/issues/19751), [PR #19801](https://github.com/dotnet/fsharp/pull/19801)) * Parser: recover on unfinished if and binary expressions ([PR #19724](https://github.com/dotnet/fsharp/pull/19724)) +* Fix spurious XmlDoc warnings (unknown parameter / no documentation for parameter) under `--warnon:3390` when a get/set property documents the full parameter set across both accessors. ([Issue #13684](https://github.com/dotnet/fsharp/issues/13684), [PR #19884](https://github.com/dotnet/fsharp/pull/19884)) ### Added diff --git a/src/Compiler/SyntaxTree/SyntaxTreeOps.fs b/src/Compiler/SyntaxTree/SyntaxTreeOps.fs index da070557119..1fb56dd697d 100644 --- a/src/Compiler/SyntaxTree/SyntaxTreeOps.fs +++ b/src/Compiler/SyntaxTree/SyntaxTreeOps.fs @@ -1149,6 +1149,21 @@ let rec desugarGetSetMembers (memberDefns: SynMemberDefns) = GetKeyword = Some mGet SetKeyword = Some mSet }) -> + // Each accessor's xmlDoc must validate against the union of both accessors' + // parameter names; otherwise documenting the full property triggers spurious + // 'unknown parameter' / 'no documentation for parameter' warnings on the + // accessor that does not own that name. See issue #13684. + let argNamesOf (SynBinding(valData = SynValData(valInfo = info))) = info.ArgNames + let getArgs = argNamesOf getBinding + let setArgs = argNamesOf setBinding + + let rewrap extra (SynBinding(a, k, isInline, isMutable, attrs, xmlDoc, vd, hp, ri, e, mB, sp, t)) = + let xmlDoc' = PreXmlDoc.WithExtraParamsForCheck(xmlDoc, extra) + SynBinding(a, k, isInline, isMutable, attrs, xmlDoc', vd, hp, ri, e, mB, sp, t) + + let getBinding = rewrap setArgs getBinding + let setBinding = rewrap getArgs setBinding + if Position.posLt mGet.Start mSet.Start then [ SynMemberDefn.Member(getBinding, m); SynMemberDefn.Member(setBinding, m) ] else diff --git a/src/Compiler/SyntaxTree/XmlDoc.fs b/src/Compiler/SyntaxTree/XmlDoc.fs index ed189aba1a5..3207b89905c 100644 --- a/src/Compiler/SyntaxTree/XmlDoc.fs +++ b/src/Compiler/SyntaxTree/XmlDoc.fs @@ -215,6 +215,7 @@ type PreXmlDoc = | PreXmlMerge of PreXmlDoc * PreXmlDoc | PreXmlDoc of pos * XmlDocCollector | PreXmlDocEmpty + | PreXmlDocPairedWith of inner: PreXmlDoc * extraParamNames: string list member x.ToXmlDoc(check: bool, paramNamesOpt: string list option) = match x with @@ -235,6 +236,13 @@ type PreXmlDoc = doc.Check(paramNamesOpt) doc + | PreXmlDocPairedWith(inner, extra) -> + let paramNamesOpt = + match paramNamesOpt with + | Some names -> Some(names @ extra) + | None -> None + + inner.ToXmlDoc(check, paramNamesOpt) member x.Range = match x with @@ -245,6 +253,7 @@ type PreXmlDoc = else unionRanges part1.Range part2.Range | PreXmlDocEmpty -> range0 | PreXmlDoc(pos, collector) -> collector.LinesRange pos + | PreXmlDocPairedWith(inner, _) -> inner.Range member x.IsEmpty = match x with @@ -252,10 +261,12 @@ type PreXmlDoc = | PreXmlMerge(a, b) -> a.IsEmpty && b.IsEmpty | PreXmlDocEmpty -> true | PreXmlDoc(pos, collector) -> not (collector.HasComments pos) + | PreXmlDocPairedWith(inner, _) -> inner.IsEmpty member x.MarkAsInvalid() = match x with | PreXmlDoc(pos, collector) -> collector.SetXmlDocValidity(pos, false) + | PreXmlDocPairedWith(inner, _) -> inner.MarkAsInvalid() | _ -> () static member CreateFromGrabPoint(collector: XmlDocCollector, grabPointPos) = @@ -268,6 +279,11 @@ type PreXmlDoc = static member Merge a b = PreXmlMerge(a, b) + static member WithExtraParamsForCheck(doc: PreXmlDoc, extraParamNames: string list) = + match extraParamNames with + | [] -> doc + | _ -> PreXmlDocPairedWith(doc, extraParamNames) + [] type XmlDocumentationInfo private (tryGetXmlDocument: unit -> XmlDocument option) = diff --git a/src/Compiler/SyntaxTree/XmlDoc.fsi b/src/Compiler/SyntaxTree/XmlDoc.fsi index 561436cfa93..c7ad8d3cac0 100644 --- a/src/Compiler/SyntaxTree/XmlDoc.fsi +++ b/src/Compiler/SyntaxTree/XmlDoc.fsi @@ -74,6 +74,11 @@ type public PreXmlDoc = /// Merge two PreXmlDoc static member Merge: a: PreXmlDoc -> b: PreXmlDoc -> PreXmlDoc + /// Wrap a PreXmlDoc with additional parameter names that should be considered valid + /// when the doc is checked. Used for property get/set pairs so that each accessor's + /// xmldoc validation sees the union of both accessors' parameter names. + static member WithExtraParamsForCheck: doc: PreXmlDoc * extraParamNames: string list -> PreXmlDoc + /// Create a PreXmlDoc from a collection of unprocessed lines static member Create: unprocessedLines: string[] * range: range -> PreXmlDoc diff --git a/tests/FSharp.Compiler.ComponentTests/Language/XmlComments.fs b/tests/FSharp.Compiler.ComponentTests/Language/XmlComments.fs index 47aee9362b7..1ca410a56e2 100644 --- a/tests/FSharp.Compiler.ComponentTests/Language/XmlComments.fs +++ b/tests/FSharp.Compiler.ComponentTests/Language/XmlComments.fs @@ -257,4 +257,126 @@ module M = """ |> withXmlCommentChecking |> compile - |> shouldSucceed \ No newline at end of file + |> shouldSucceed + +module XmlCommentCheckingGetSetProperty = + + [] + let ``Fully documented get-set property produces no xmldoc warning`` () = + Fsx """ +type MyClass() = + /// A property + /// The index + /// The value + member _.Item + with get(index: int) = index + and set (index: int) (value: int) = () + """ + |> withXmlCommentChecking + |> ignoreWarnings + |> compile + |> shouldSucceed + |> withDiagnostics [] + + [] + let ``Simple get-set property with xmldoc no false warning`` () = + Fsx """ +type MyClass() = + /// Gets or sets the value + /// The value + member _.Prop + with get() = 0 + and set (v: int) = () + """ + |> withXmlCommentChecking + |> ignoreWarnings + |> compile + |> shouldSucceed + |> withDiagnostics [] + + [] + let ``Get-only property xmldoc check unaffected`` () = + Fsx """ +type MyClass() = + /// A property + /// The index + member _.Item with get(index: int) = index + """ + |> withXmlCommentChecking + |> ignoreWarnings + |> compile + |> shouldSucceed + |> withDiagnostics [] + + [] + let ``Actually missing param doc still warns for get-set`` () = + Fsx """ +type MyClass() = + /// A property + /// The index + member _.Item + with get(index: int) = index + and set (index: int) (value: int) = () + """ + |> withXmlCommentChecking + |> ignoreWarnings + |> compile + |> shouldSucceed + |> withDiagnostics + [ (Warning 3390, Line 3, Col 5, Line 4, Col 46, + "This XML comment is incomplete: no documentation for parameter 'value'") ] + + [] + let ``Documented param that exists in neither accessor warns`` () = + Fsx """ +type MyClass() = + /// A property + /// The index + /// The value + /// Does not exist + member _.Item + with get(index: int) = index + and set (index: int) (value: int) = () + """ + |> withXmlCommentChecking + |> ignoreWarnings + |> compile + |> shouldSucceed + |> withDiagnostics + [ (Warning 3390, Line 3, Col 5, Line 6, Col 51, + "This XML comment is invalid: unknown parameter 'ghost'") ] + + [] + [] + [] + let ``Get-set with different types fully documented is clean`` (getType: string) (setType: string) = + let source = + "\ntype MyClass() =\n" + + " /// Prop\n" + + " /// The value\n" + + " member _.Prop\n" + + " with get() : " + getType + " = Unchecked.defaultof<_>\n" + + " and set (v: " + setType + ") = ()\n " + Fsx source + |> withXmlCommentChecking + |> ignoreWarnings + |> compile + |> shouldSucceed + |> withDiagnostics [] + + [] + let ``Issue 13684 repro indexed property fully documented is clean`` () = + Fsx """ +type A = + /// + /// + /// + /// + member x.A with get (j: int) : int = 3 + and set (k: int) (l: int) = () + """ + |> withXmlCommentChecking + |> ignoreWarnings + |> compile + |> shouldSucceed + |> withDiagnostics [] \ No newline at end of file diff --git a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.bsl b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.bsl index 9b33caf5d71..93f733ef373 100644 --- a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.bsl +++ b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.bsl @@ -12486,6 +12486,7 @@ FSharp.Compiler.Xml.PreXmlDoc: FSharp.Compiler.Text.Range get_Range() FSharp.Compiler.Xml.PreXmlDoc: FSharp.Compiler.Xml.PreXmlDoc Create(System.String[], FSharp.Compiler.Text.Range) FSharp.Compiler.Xml.PreXmlDoc: FSharp.Compiler.Xml.PreXmlDoc Empty FSharp.Compiler.Xml.PreXmlDoc: FSharp.Compiler.Xml.PreXmlDoc Merge(FSharp.Compiler.Xml.PreXmlDoc, FSharp.Compiler.Xml.PreXmlDoc) +FSharp.Compiler.Xml.PreXmlDoc: FSharp.Compiler.Xml.PreXmlDoc WithExtraParamsForCheck(FSharp.Compiler.Xml.PreXmlDoc, Microsoft.FSharp.Collections.FSharpList`1[System.String]) FSharp.Compiler.Xml.PreXmlDoc: FSharp.Compiler.Xml.PreXmlDoc get_Empty() FSharp.Compiler.Xml.PreXmlDoc: FSharp.Compiler.Xml.XmlDoc ToXmlDoc(Boolean, Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Collections.FSharpList`1[System.String]]) FSharp.Compiler.Xml.PreXmlDoc: Int32 GetHashCode() From 0fb7052e7aa1c3422e716b294eff68fa031f33ae Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Thu, 4 Jun 2026 11:38:32 +0200 Subject: [PATCH 50/72] Fix #16360: stop duplicating editor diagnostics (revert Roslyn workaround) (#19812) --- docs/release-notes/.VisualStudio/18.vNext.md | 1 + .../Diagnostics/DocumentDiagnosticAnalyzer.fs | 19 --- .../DocumentDiagnosticAnalyzerTests.fs | 153 ++++++++++-------- 3 files changed, 85 insertions(+), 88 deletions(-) diff --git a/docs/release-notes/.VisualStudio/18.vNext.md b/docs/release-notes/.VisualStudio/18.vNext.md index a7a62a728f8..781af946d89 100644 --- a/docs/release-notes/.VisualStudio/18.vNext.md +++ b/docs/release-notes/.VisualStudio/18.vNext.md @@ -5,6 +5,7 @@ * Find All References for external DLL symbols now only searches projects that reference the specific assembly. ([Issue #10227](https://github.com/dotnet/fsharp/issues/10227), [PR #19252](https://github.com/dotnet/fsharp/pull/19252)) * Improve static compilation of state machines. ([PR #19297](https://github.com/dotnet/fsharp/pull/19297)) * Make Alt+F1 (momentary toggle) work for inlay hints. ([PR #19421](https://github.com/dotnet/fsharp/pull/19421)) +* Fix doubled F# diagnostics in tooltips. ([Issue #16360](https://github.com/dotnet/fsharp/issues/16360)) ### Changed diff --git a/vsintegration/src/FSharp.Editor/Diagnostics/DocumentDiagnosticAnalyzer.fs b/vsintegration/src/FSharp.Editor/Diagnostics/DocumentDiagnosticAnalyzer.fs index b7f7ed3d4cf..a1a2bbe9f90 100644 --- a/vsintegration/src/FSharp.Editor/Diagnostics/DocumentDiagnosticAnalyzer.fs +++ b/vsintegration/src/FSharp.Editor/Diagnostics/DocumentDiagnosticAnalyzer.fs @@ -79,8 +79,6 @@ type internal FSharpDocumentDiagnosticAnalyzer [] () = let! parseResults = document.GetFSharpParseResultsAsync("GetDiagnostics") - // Old logic, rollback once https://github.com/dotnet/fsharp/issues/15972 is fixed (likely on Roslyn side, since we're returning diagnostics, but they're not getting to VS). - (* match diagnosticType with | DiagnosticsType.Syntax -> for diagnostic in parseResults.Diagnostics do @@ -93,23 +91,6 @@ type internal FSharpDocumentDiagnosticAnalyzer [] () = errors.Add(diagnostic) |> ignore errors.ExceptWith(parseResults.Diagnostics) - *) - - // TODO: see comment above, this is a workaround for issue we have in current VS/Roslyn - match diagnosticType with - | DiagnosticsType.Syntax -> - for diagnostic in parseResults.Diagnostics do - errors.Add(diagnostic) |> ignore - - // We always add syntactic, and do not exclude them when semantic is requested - | DiagnosticsType.Semantic -> - for diagnostic in parseResults.Diagnostics do - errors.Add(diagnostic) |> ignore - - let! _, checkResults = document.GetFSharpParseAndCheckResultsAsync("GetDiagnostics") - - for diagnostic in checkResults.Diagnostics do - errors.Add(diagnostic) |> ignore let! unnecessaryParentheses = match diagnosticType with diff --git a/vsintegration/tests/FSharp.Editor.Tests/DocumentDiagnosticAnalyzerTests.fs b/vsintegration/tests/FSharp.Editor.Tests/DocumentDiagnosticAnalyzerTests.fs index 8f2843f8a76..280844aa9ae 100644 --- a/vsintegration/tests/FSharp.Editor.Tests/DocumentDiagnosticAnalyzerTests.fs +++ b/vsintegration/tests/FSharp.Editor.Tests/DocumentDiagnosticAnalyzerTests.fs @@ -29,6 +29,21 @@ type DocumentDiagnosticAnalyzerTests() = task.Result + member private _.getSyntaxAndSemantic(fileContents: string) = + let task = + cancellableTask { + let document = + RoslynTestHelpers.CreateSolution(fileContents) + |> RoslynTestHelpers.GetSingleDocument + + let! syntactic = FSharpDocumentDiagnosticAnalyzer.GetDiagnostics(document, DiagnosticsType.Syntax) + let! semantic = FSharpDocumentDiagnosticAnalyzer.GetDiagnostics(document, DiagnosticsType.Semantic) + return Seq.toArray syntactic, Seq.toArray semantic + } + |> CancellableTask.start CancellationToken.None + + task.Result + member private this.VerifyNoErrors(fileContents: string, ?additionalFlags: string[]) = let errors = this.getDiagnostics (fileContents, ?additionalFlags = additionalFlags) @@ -88,66 +103,6 @@ type DocumentDiagnosticAnalyzerTests() = actualError.Location.SourceSpan.End |> Assert.shouldBeEqualWith expectedEnd "Error end positions should match" - member private this.VerifyDiagnosticBetweenMarkers_HACK_PLEASE_REFER_TO_COMMENT_INSIDE - (fileContents: string, expectedMessage: string, expectedSeverity: DiagnosticSeverity) - = - // TODO: once workaround (https://github.com/dotnet/fsharp/pull/15982) will not be needed, this should be reverted back to normal method (see PR) - let errors = - this.getDiagnostics fileContents - |> Seq.filter (fun e -> e.Severity = expectedSeverity) - |> Seq.toArray - - errors.Length - |> Assert.shouldBeEqualWith 2 "There should be two errors generated" - - let actualError = errors.[0] - Assert.Equal(expectedSeverity, actualError.Severity) - - actualError.GetMessage() - |> Assert.shouldBeEqualWith expectedMessage "Error messages should match" - - let expectedStart = fileContents.IndexOf(startMarker) + startMarker.Length - - actualError.Location.SourceSpan.Start - |> Assert.shouldBeEqualWith expectedStart "Error start positions should match" - - let expectedEnd = fileContents.IndexOf(endMarker) - - actualError.Location.SourceSpan.End - |> Assert.shouldBeEqualWith expectedEnd "Error end positions should match" - - member private this.VerifyErrorBetweenMarkers_HACK_PLEASE_REFER_TO_COMMENT_INSIDE(fileContents: string, expectedMessage: string) = - // TODO: once workaround (https://github.com/dotnet/fsharp/pull/15982) will not be needed, this should be reverted back to normal method (see PR) - this.VerifyDiagnosticBetweenMarkers_HACK_PLEASE_REFER_TO_COMMENT_INSIDE(fileContents, expectedMessage, DiagnosticSeverity.Error) - - member private this.VerifyErrorAtMarker_HACK_PLEASE_REFER_TO_COMMENT_INSIDE - (fileContents: string, expectedMarker: string, ?expectedMessage: string) - = - let errors = - this.getDiagnostics fileContents - |> Seq.filter (fun e -> e.Severity = DiagnosticSeverity.Error) - |> Seq.toArray - - errors.Length - |> Assert.shouldBeEqualWith 2 "There should be exactly two errors generated" - - let actualError = errors.[0] - - if expectedMessage.IsSome then - actualError.GetMessage() - |> Assert.shouldBeEqualWith expectedMessage.Value "Error messages should match" - - Assert.Equal(DiagnosticSeverity.Error, actualError.Severity) - let expectedStart = fileContents.IndexOf(expectedMarker) - - actualError.Location.SourceSpan.Start - |> Assert.shouldBeEqualWith expectedStart "Error start positions should match" - - let expectedEnd = expectedStart + expectedMarker.Length - - actualError.Location.SourceSpan.End - |> Assert.shouldBeEqualWith expectedEnd "Error end positions should match" - member private this.VerifyErrorBetweenMarkers(fileContents: string, expectedMessage: string) = this.VerifyDiagnosticBetweenMarkers(fileContents, expectedMessage, DiagnosticSeverity.Error) @@ -156,7 +111,7 @@ type DocumentDiagnosticAnalyzerTests() = [] member public this.Error_Expression_IllegalIntegerLiteral() = - this.VerifyErrorBetweenMarkers_HACK_PLEASE_REFER_TO_COMMENT_INSIDE( + this.VerifyErrorBetweenMarkers( fileContents = """ let _ = 1 @@ -167,7 +122,7 @@ let a = 0.1(*start*).(*end*)0 [] member public this.Error_Expression_IncompleteDefine() = - this.VerifyErrorBetweenMarkers_HACK_PLEASE_REFER_TO_COMMENT_INSIDE( + this.VerifyErrorBetweenMarkers( fileContents = """ let a = (*start*);(*end*) @@ -177,7 +132,7 @@ let a = (*start*);(*end*) [] member public this.Error_Expression_KeywordAsValue() = - this.VerifyErrorBetweenMarkers_HACK_PLEASE_REFER_TO_COMMENT_INSIDE( + this.VerifyErrorBetweenMarkers( fileContents = """ let b = @@ -312,7 +267,7 @@ let f () = [] member public this.Error_Identifer_IllegalFloatPointLiteral() = - this.VerifyErrorBetweenMarkers_HACK_PLEASE_REFER_TO_COMMENT_INSIDE( + this.VerifyErrorBetweenMarkers( fileContents = """ let x: float = 1.2(*start*).(*end*)3 @@ -425,7 +380,7 @@ async { if true then return 1 } |> ignore [] member public this.ExtraEndif() = - this.VerifyErrorBetweenMarkers_HACK_PLEASE_REFER_TO_COMMENT_INSIDE( + this.VerifyErrorBetweenMarkers( fileContents = """ #if UNDEFINED @@ -440,7 +395,7 @@ async { if true then return 1 } |> ignore [] member public this.Squiggles_HashNotFirstSymbol_If() = - this.VerifyErrorAtMarker_HACK_PLEASE_REFER_TO_COMMENT_INSIDE( + this.VerifyErrorAtMarker( fileContents = """ (*comment*) #if UNDEFINED @@ -455,7 +410,7 @@ async { if true then return 1 } |> ignore [] member public this.Squiggles_HashNotFirstSymbol_Endif() = - this.VerifyErrorAtMarker_HACK_PLEASE_REFER_TO_COMMENT_INSIDE( + this.VerifyErrorAtMarker( fileContents = """ #if DEBUG @@ -470,7 +425,7 @@ async { if true then return 1 } |> ignore [] member public this.Squiggles_HashIfWithMultilineComment() = - this.VerifyErrorAtMarker_HACK_PLEASE_REFER_TO_COMMENT_INSIDE( + this.VerifyErrorAtMarker( fileContents = """ #if DEBUG (*comment*) @@ -482,7 +437,7 @@ async { if true then return 1 } |> ignore [] member public this.Squiggles_HashIfWithUnexpected() = - this.VerifyErrorAtMarker_HACK_PLEASE_REFER_TO_COMMENT_INSIDE( + this.VerifyErrorAtMarker( fileContents = """ #if DEBUG TEST @@ -523,3 +478,63 @@ printf "%d" x """, additionalFlags = [| "--times" |] ) + + [] + member this.``Parse diagnostic not duplicated in semantic results``() = + let source = "let x = // incomplete expression - parse error\n" + let syntaxDiags, semanticDiags = this.getSyntaxAndSemantic source + + let duplicates = + semanticDiags + |> Array.filter (fun (d: Diagnostic) -> + syntaxDiags + |> Array.exists (fun (s: Diagnostic) -> s.Id = d.Id && s.Location.SourceSpan = d.Location.SourceSpan)) + + Assert.Empty(duplicates) + + [] + member this.``Type error appears only in semantic results``() = + let source = "let x: int = \"hello\"\n" + let _syntaxDiags, semanticDiags = this.getSyntaxAndSemantic source + Assert.Contains(semanticDiags, fun (d: Diagnostic) -> d.Id = "FS0001") + + [] + member this.``Parse errors still reported in syntax pass``() = + let source = "let x =\n" + let syntaxDiags, _ = this.getSyntaxAndSemantic source + Assert.NotEmpty(syntaxDiags) + + [] + member this.``Clean code has no diagnostics``() = + let source = "let x = 42\nlet y = x + 1\n" + let syntaxDiags, semanticDiags = this.getSyntaxAndSemantic source + Assert.Empty(syntaxDiags) + Assert.Empty(semanticDiags) + + [] + member this.``Multiple parse errors not duplicated``() = + let source = "let x =\nlet y =\n" + let syntaxDiags, semanticDiags = this.getSyntaxAndSemantic source + let allDiags = Array.append syntaxDiags semanticDiags + + let uniqueCount = + allDiags + |> Array.distinctBy (fun (d: Diagnostic) -> d.Id, d.Location.SourceSpan) + |> Array.length + + Assert.Equal(allDiags.Length, uniqueCount) + + [] + member this.``Warning not duplicated across passes``() = + let source = "let x = 42\n" + let syntaxDiags, semanticDiags = this.getSyntaxAndSemantic source + + let allWarnings = + Array.append syntaxDiags semanticDiags + |> Array.filter (fun (d: Diagnostic) -> d.Severity = DiagnosticSeverity.Warning) + + let uniqueWarnings = + allWarnings + |> Array.distinctBy (fun (d: Diagnostic) -> d.Id, d.Location.SourceSpan) + + Assert.Equal(allWarnings.Length, uniqueWarnings.Length) From 022cd1aa5543b4680d19a96330eb1dda501aeee3 Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Thu, 4 Jun 2026 11:38:50 +0200 Subject: [PATCH 51/72] chore: update actions/github-script from v6 to v7 (#19843) --- .github/workflows/repository_lockdown_check.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/repository_lockdown_check.yml b/.github/workflows/repository_lockdown_check.yml index 95671a1a338..4676718bf0e 100644 --- a/.github/workflows/repository_lockdown_check.yml +++ b/.github/workflows/repository_lockdown_check.yml @@ -35,7 +35,7 @@ jobs: # If not, create a new comment - name: Create comment if: steps.fc.outputs.comment-id == '' && failure() - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: github-token: ${{ github.token }} script: | @@ -50,7 +50,7 @@ jobs: # If yes, update the comment - name: Update comment if: steps.fc.outputs.comment-id != '' && failure() - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: github-token: ${{ github.token }} script: | @@ -65,7 +65,7 @@ jobs: # If comment exists, but we are no longer in maintenance mode, delete the comment. - name: Delete comment if: steps.fc.outputs.comment-id != '' && success() - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: github-token: ${{ github.token }} script: | From d6db771b0d54b865ad8f6ee748ea82f367ed59f2 Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Thu, 4 Jun 2026 14:13:15 +0200 Subject: [PATCH 52/72] Fix #18086: suppress NuGet restore stdout under FSI --quiet (#19808) * Fix #18086: suppress NuGet restore stdout under FSI --quiet When --quiet (tcConfigB.noFeedback) is active, route the captured stdout of the NuGet restore subprocess to stderr instead of stdout so that warnings like NU1608 and MSBuild `Determining projects to restore...` chatter no longer pollute FSI stdout. Default (non-quiet) behavior is unchanged. result.StdError continues to go to stderr unconditionally. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add release notes entry for #18086 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Apply remaining changes * Remove executor artifact --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../.FSharp.Compiler.Service/11.0.100.md | 1 + src/Compiler/Interactive/fsi.fs | 6 ++- .../CompilerOptions/fsi/FsiCliTests.fs | 47 +++++++++++++++++++ 3 files changed, 53 insertions(+), 1 deletion(-) diff --git a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md index c843ddb3df1..229a7132e83 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md +++ b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md @@ -68,6 +68,7 @@ * Allow `| null` nullable annotation on a `[]` over a reference type (e.g. the FSharp.UMX `type string<[] 'm> = string` pattern). ([Issue #19657](https://github.com/dotnet/fsharp/issues/19657)) * Fix `[] ?param` optional parameters could not be passed using the explicit `?param = expr` caller-side syntax with a `ValueOption` value. ([Issue #19711](https://github.com/dotnet/fsharp/issues/19711), [PR #19742](https://github.com/dotnet/fsharp/pull/19742)) * Fix signature conformance: overloaded member with unit parameter `M(())` now matches sig `member M: unit -> unit`. ([Issue #19596](https://github.com/dotnet/fsharp/issues/19596), [PR #19615](https://github.com/dotnet/fsharp/pull/19615)) +* Fix `--quiet` not suppressing NuGet restore output on stdout in F# Interactive ([Issue #18086](https://github.com/dotnet/fsharp/issues/18086)) * Reference assembly MVIDs are now deterministic across compiler invocations. Previously, `--refout` / `true` produced a different MVID every build because the implied signature hash used .NET's randomized `String.GetHashCode()`. ([Issue #19751](https://github.com/dotnet/fsharp/issues/19751), [PR #19801](https://github.com/dotnet/fsharp/pull/19801)) * Parser: recover on unfinished if and binary expressions ([PR #19724](https://github.com/dotnet/fsharp/pull/19724)) diff --git a/src/Compiler/Interactive/fsi.fs b/src/Compiler/Interactive/fsi.fs index 1ff957e77a8..30801263752 100644 --- a/src/Compiler/Interactive/fsi.fs +++ b/src/Compiler/Interactive/fsi.fs @@ -2819,8 +2819,12 @@ type internal FsiDynamicCompiler if result.Success then + // Under --quiet, route NuGet restore stdout to stderr. + let stdOutSink: System.IO.TextWriter = + if tcConfigB.noFeedback then Console.Error else Console.Out + for line in result.StdOut do - Console.Out.WriteLine(line) + stdOutSink.WriteLine(line) for line in result.StdError do Console.Error.WriteLine(line) diff --git a/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsi/FsiCliTests.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsi/FsiCliTests.fs index a66269e63f6..dbb08a42edb 100644 --- a/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsi/FsiCliTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsi/FsiCliTests.fs @@ -67,3 +67,50 @@ module FsiCliTests = let result = runFsiProcess [option] Assert.NotEqual(0, result.ExitCode) Assert.Contains(expectedError, result.StdErr) + + // ============================================================================ + // Issue #18086: --quiet must suppress NuGet restore stdout chatter + // ============================================================================ + + let private writeTempScript (content: string) : string = + let path = System.IO.Path.Combine(System.IO.Path.GetTempPath(), $"fsi_quiet_{System.Guid.NewGuid():N}.fsx") + System.IO.File.WriteAllText(path, content) + path + + let private runFsiScript (extraArgs: string list) (scriptBody: string) = + let scriptPath = writeTempScript scriptBody + try + let result = runFsiProcess (extraArgs @ [scriptPath]) + result + finally + try System.IO.File.Delete(scriptPath) with _ -> () + + [] + let ``FSI quiet mode suppresses NuGet restore output from stdout`` () = + let script = """ +#r "nuget: Newtonsoft.Json, 13.0.3" +printfn "RESULT_MARKER_18086" +""" + let result = runFsiScript ["--quiet"] script + Assert.Equal(0, result.ExitCode) + Assert.Contains("RESULT_MARKER_18086", result.StdOut) + Assert.DoesNotContain("Determining projects to restore", result.StdOut) + Assert.DoesNotContain("Restored ", result.StdOut) + Assert.DoesNotContain("NU1", result.StdOut) + + [] + let ``FSI default (non-quiet) mode still evaluates script and prints user output`` () = + let script = """ +#r "nuget: Newtonsoft.Json, 13.0.3" +printfn "RESULT_MARKER_18086_DEFAULT" +""" + let result = runFsiScript [] script + Assert.Equal(0, result.ExitCode) + Assert.Contains("RESULT_MARKER_18086_DEFAULT", result.StdOut) + + [] + let ``FSI quiet mode still prints user printfn output to stdout`` () = + let script = """printfn "hello from quiet script" """ + let result = runFsiScript ["--quiet"] script + Assert.Equal(0, result.ExitCode) + Assert.Contains("hello from quiet script", result.StdOut) From 24e36c9768a715229267f4d99f67ed4b464691db Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Thu, 4 Jun 2026 14:31:27 +0200 Subject: [PATCH 53/72] [main] Source code updates from dotnet/dotnet (#19887) --- eng/Version.Details.xml | 2 +- eng/Versions.props | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 78884c3639f..222157fba7e 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,6 +1,6 @@ - + https://github.com/dotnet/msbuild diff --git a/eng/Versions.props b/eng/Versions.props index 64e545f6118..08cde86aa77 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -14,7 +14,7 @@ - 5 + 6 preview$(FSharpPreReleaseIteration) 11 From 37e58b00645c474d3336ac4df0462e6d5fb12edc Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Thu, 4 Jun 2026 14:42:14 +0200 Subject: [PATCH 54/72] Make fsharp-diagnostics skill cross-platform (#19893) --- .github/skills/fsharp-diagnostics/SKILL.md | 56 +++-- .../scripts/get-fsharp-errors.ps1 | 233 ++++++++++++++++++ .../scripts/get-fsharp-errors.sh | 118 --------- .../fsharp-diagnostics/server/Server.fs | 8 + 4 files changed, 273 insertions(+), 142 deletions(-) create mode 100644 .github/skills/fsharp-diagnostics/scripts/get-fsharp-errors.ps1 delete mode 100755 .github/skills/fsharp-diagnostics/scripts/get-fsharp-errors.sh diff --git a/.github/skills/fsharp-diagnostics/SKILL.md b/.github/skills/fsharp-diagnostics/SKILL.md index 846303abe6d..51afcdb4b3b 100644 --- a/.github/skills/fsharp-diagnostics/SKILL.md +++ b/.github/skills/fsharp-diagnostics/SKILL.md @@ -1,48 +1,56 @@ --- name: fsharp-diagnostics -description: "Always invoke after editing .fs files. Provides fast parse/typecheck feedback without a full dotnet build. Prefer this over dotnet build for iterative changes. Also finds symbol references and inferred type hints." +description: Always invoke after editing `.fs` files under `src/Compiler/`. Fast parse/typecheck without `dotnet build`, plus symbol references and inferred type hints. Use whenever the user asks about F# errors, compile errors, type inference, finding usages, or renaming a symbol in the compiler tree. --- # F# Diagnostics -**Scope:** `src/Compiler/` files only (`FSharp.Compiler.Service.fsproj`, Release, net10.0). +**Scope:** `src/Compiler/` files only. -## Setup (run once per shell session) +## Setup (once per session) -```bash -GetErrors() { "$(git rev-parse --show-toplevel)/.github/skills/fsharp-diagnostics/scripts/get-fsharp-errors.sh" "$@"; } +Requires pwsh 7+ (`brew install powershell` / `winget install Microsoft.PowerShell` / `apt install powershell`). + +```pwsh +function GetErrors { & "$(git rev-parse --show-toplevel)/.github/skills/fsharp-diagnostics/scripts/get-fsharp-errors.ps1" @args } ``` +From bash/zsh without a function: `pwsh -File /.github/skills/fsharp-diagnostics/scripts/get-fsharp-errors.ps1 `. + ## Parse first, typecheck second -```bash -GetErrors --parse-only src/Compiler/Checking/CheckBasics.fs -``` -If errors → fix syntax. Do NOT typecheck until parse is clean. -```bash -GetErrors src/Compiler/Checking/CheckBasics.fs +```pwsh +GetErrors -ParseOnly src/Compiler/Checking/CheckBasics.fs # syntax only +GetErrors src/Compiler/Checking/CheckBasics.fs # full typecheck ``` +Fix all parse errors before typechecking; type errors on top of bad syntax are noise. -## Find references for a single symbol (line 1-based, col 0-based) +## Symbol references (line 1-based, col 0-based) -Before renaming or to understand call sites: -```bash -GetErrors --find-refs src/Compiler/Checking/CheckBasics.fs 30 5 +```pwsh +GetErrors -FindRefs src/Compiler/Checking/CheckBasics.fs 30 5 ``` +Use before any rename. -## Type hints for a range selection (begin and end line numbers, 1-based) +## Type hints (line range, 1-based) -To see inferred types as inline `// (name: Type)` comments: -```bash -GetErrors --type-hints src/Compiler/TypedTree/TypedTreeOps.fs 1028 1032 +Returns the range with inferred types as inline `// (name: Type)` comments: +```pwsh +GetErrors -TypeHints src/Compiler/TypedTree/TypedTreeOps.Transforms.fs 100 120 ``` ## Other -```bash -GetErrors --check-project # typecheck entire project -GetErrors --ping -GetErrors --shutdown +```pwsh +GetErrors -CheckProject # typecheck entire project +GetErrors -Ping # liveness check, no side effects +GetErrors -Shutdown ``` -First call starts server (~70s cold start, set initial_wait=600). Auto-shuts down after 4h idle. ~3 GB RAM. +## Timing + +- First real call after a fresh clone: server build + in-memory warmup, 5–15 min → `initial_wait=1200`. +- After warmup: real commands answer in seconds → `initial_wait=180`. +- `-Ping` / `-Shutdown`: sub-second; never trigger build or warmup. + +Auto-shuts down after 4h idle; ~3 GB RAM while running. diff --git a/.github/skills/fsharp-diagnostics/scripts/get-fsharp-errors.ps1 b/.github/skills/fsharp-diagnostics/scripts/get-fsharp-errors.ps1 new file mode 100644 index 00000000000..b0dc87f38b4 --- /dev/null +++ b/.github/skills/fsharp-diagnostics/scripts/get-fsharp-errors.ps1 @@ -0,0 +1,233 @@ +<# +get-fsharp-errors.ps1 - cross-platform client for the fsharp-diag-server. +Requires pwsh 7+ (AF_UNIX socket support on Windows 10 1803+). +#> + +[CmdletBinding(PositionalBinding = $false)] +param( + [switch]$ParseOnly, + [switch]$CheckProject, + [switch]$Ping, + [switch]$Shutdown, + [switch]$FindRefs, + [switch]$TypeHints, + [Parameter(ValueFromRemainingArguments = $true)] + [string[]]$Rest +) + +$ErrorActionPreference = 'Stop' +Set-StrictMode -Version Latest + +$ScriptDir = Split-Path -Parent $PSCommandPath +$ServerProject = (Resolve-Path (Join-Path $ScriptDir '..' 'server')).Path +$SockDir = Join-Path $HOME '.fsharp-diag' +$StartTimeoutSec = 180 # > documented 70s cold start, covers slow nuget restore +$ConnectTimeoutMs = 5000 +$IoTimeoutMs = 1800000 # 30 min - covers cold-clone warmup (nuget restore + FCS in-memory typecheck of ~2M lines) + +function Show-Usage { + @" +Usage: + get-fsharp-errors.ps1 [-ParseOnly] + get-fsharp-errors.ps1 -FindRefs + get-fsharp-errors.ps1 -TypeHints + get-fsharp-errors.ps1 -CheckProject | -Ping | -Shutdown +"@ | Out-Host +} + +function Get-RepoRoot { + # Server normalizes via Path.GetFullPath; client must do the same before hashing. + $raw = try { (& git rev-parse --show-toplevel 2>$null) } catch { $null } + if ([string]::IsNullOrWhiteSpace($raw)) { $raw = (Get-Location).Path } + [System.IO.Path]::GetFullPath($raw.Trim()) +} + +function Get-Hash16([string]$s) { + # Mirrors Server.fs deriveHash exactly. + $bytes = [System.Text.Encoding]::UTF8.GetBytes($s) + [System.Convert]::ToHexString( + [System.Security.Cryptography.SHA256]::HashData($bytes) + ).Substring(0, 16).ToLowerInvariant() +} + +function Get-SocketPath([string]$root) { Join-Path $SockDir ((Get-Hash16 $root) + '.sock') } +function Get-LogPath ([string]$root) { Join-Path $SockDir ((Get-Hash16 $root) + '.log') } +function Get-LockPath ([string]$root) { Join-Path $SockDir ((Get-Hash16 $root) + '.startup.lock') } + +function Resolve-AbsFile([string]$p) { + # Lexical resolution - missing files reach the server's JSON not-found handler. + if ([System.IO.Path]::IsPathRooted($p)) { + [System.IO.Path]::GetFullPath($p) + } else { + [System.IO.Path]::GetFullPath((Join-Path (Get-Location).Path $p)) + } +} + +function New-DiagSocket { + New-Object System.Net.Sockets.Socket( + [System.Net.Sockets.AddressFamily]::Unix, + [System.Net.Sockets.SocketType]::Stream, + [System.Net.Sockets.ProtocolType]::Unspecified) +} + +function Send-Request([string]$sock, [hashtable]$payload, [int]$timeoutMs = $IoTimeoutMs) { + $json = ($payload | ConvertTo-Json -Compress -Depth 4) + "`n" + $bytes = [System.Text.Encoding]::UTF8.GetBytes($json) + $client = New-DiagSocket + try { + $client.SendTimeout = $timeoutMs + $client.ReceiveTimeout = $timeoutMs + $task = $client.ConnectAsync((New-Object System.Net.Sockets.UnixDomainSocketEndPoint($sock))) + if (-not $task.Wait($ConnectTimeoutMs)) { throw "connect timed out after $ConnectTimeoutMs ms ($sock)" } + [void]$client.Send($bytes) + $client.Shutdown([System.Net.Sockets.SocketShutdown]::Send) + # Stream UTF-8 across recv boundaries so multibyte chars don't fragment. + $buf = New-Object byte[] 65536 + $decoder = [System.Text.Encoding]::UTF8.GetDecoder() + $chars = New-Object char[] $buf.Length + $sb = [System.Text.StringBuilder]::new() + while (($n = $client.Receive($buf)) -gt 0) { + $c = $decoder.GetChars($buf, 0, $n, $chars, 0) + [void]$sb.Append($chars, 0, $c) + } + $sb.ToString() + } finally { $client.Dispose() } +} + +function Test-ServerAlive([string]$sock) { + if (-not (Test-Path $sock)) { return $false } + try { (Send-Request $sock @{ command = 'ping' } 2000) -match '"ok"' } catch { $false } +} + +function Get-ServerBinaryPath { + # Ask MSBuild for the configured output path (honors BaseOutputPath etc.). Project settings only - no build required. + $p = & dotnet msbuild $ServerProject /p:Configuration=Release -getProperty:TargetPath 2>$null + if ($LASTEXITCODE -eq 0 -and $p) { $p.Trim() } else { $null } +} + +function Find-ServerBinary { + $p = Get-ServerBinaryPath + if ($p -and (Test-Path $p)) { $p } else { $null } +} + +function Build-DiagServer { + # Visible foreground build so the agent sees nuget restore + compile progress on a cold clone (can be 10+ min). + Write-Host "[fsharp-diag] Building server (first call after clone can take 10+ min for nuget restore + FSharp.Compiler.Service build)..." -ForegroundColor Yellow + $build = Start-Process -FilePath 'dotnet' ` + -ArgumentList @('build','-c','Release', $ServerProject) ` + -NoNewWindow -Wait -PassThru + if ($build.ExitCode -ne 0) { + throw "Server build failed (dotnet build exit $($build.ExitCode))." + } + $dll = Find-ServerBinary + if (-not $dll) { throw "Build reported success but FSharpDiagServer.dll not found (MSBuild TargetPath: $(Get-ServerBinaryPath))." } + $dll +} + +function Start-DiagServer([string]$root, [string]$sock) { + if (Test-ServerAlive $sock) { return } + New-Item -ItemType Directory -Force -Path $SockDir | Out-Null + $lockPath = Get-LockPath $root + $lock = $null + try { + # Serialize startup so racing clients don't spawn duplicate servers. + $lock = [System.IO.File]::Open($lockPath, [System.IO.FileMode]::OpenOrCreate, + [System.IO.FileAccess]::Write, [System.IO.FileShare]::None) + # Re-check after acquiring the lock - peer may have started a server while we waited. + if (Test-ServerAlive $sock) { return } + if (Test-Path $sock) { Remove-Item -Force $sock } + + # Ensure server binary exists. Build is foreground + visible so the agent sees progress. + $dll = Find-ServerBinary + if (-not $dll) { $dll = Build-DiagServer } + + $log = Get-LogPath $root + $psi = New-Object System.Diagnostics.ProcessStartInfo + $psi.FileName = 'dotnet' + # ArgumentList (Collection) handles per-platform quoting (incl. spaces in paths). + # Launch via prebuilt dll so startup is bound by server init (~70s), not by build (~minutes). + foreach ($a in @($dll, '--repo-root', $root)) { [void]$psi.ArgumentList.Add($a) } + $psi.RedirectStandardOutput = $true + $psi.RedirectStandardError = $true + $psi.UseShellExecute = $false + $psi.CreateNoWindow = $true + $proc = [System.Diagnostics.Process]::Start($psi) + # Drain to log file so the child's pipes don't fill and block. + $proc.StandardOutput.BaseStream.CopyToAsync([System.IO.File]::Create($log)) | Out-Null + $proc.StandardError.BaseStream.CopyToAsync( + [System.IO.File]::Create("$log.err")) | Out-Null + # Poll for a LIVE server (file existence is insufficient - server may be mid-bind). + $sw = [System.Diagnostics.Stopwatch]::StartNew() + while ($sw.Elapsed.TotalSeconds -lt $StartTimeoutSec) { + if (Test-ServerAlive $sock) { break } + Start-Sleep -Milliseconds 500 + } + if (-not (Test-ServerAlive $sock)) { + throw "Server failed to bind socket within ${StartTimeoutSec}s. Check log: $log" + } + # Pre-warm the in-memory project so the agent's first real request doesn't hang. + # On a fresh clone this triggers the target project's nuget restore + FCS type-check (5-15 min). + Write-Host "[fsharp-diag] Server bound; warming up in-memory FSharp.Compiler.Service project (5-15 min on cold clone)..." -ForegroundColor Yellow + $resp = Send-Request $sock @{ command = 'warmup' } + if ($resp -notmatch '"warmed"') { + throw "Warmup failed: $resp" + } + Write-Host "[fsharp-diag] Warmup complete." -ForegroundColor Green + } finally { + if ($lock) { $lock.Dispose(); Remove-Item -Force $lockPath -ErrorAction SilentlyContinue } + } +} + +function Assert-RequiredArg([int]$needed, [string]$cmd) { + if (-not $Rest -or $Rest.Count -lt $needed) { + Write-Error "$cmd requires $needed positional argument(s): see -? for usage." -ErrorAction Continue + Show-Usage + exit 1 + } +} + +function ConvertTo-Int32Arg([string]$s, [string]$name) { + $out = 0 + if (-not [int]::TryParse($s, [ref]$out)) { + Write-Error "$name must be an integer, got '$s'" -ErrorAction Continue + Show-Usage + exit 1 + } + $out +} + +# --- main --- + +$root = Get-RepoRoot +$sock = Get-SocketPath $root + +# Validate args BEFORE spawning a 70s+ server. +$payload = + if ($Ping) { @{ command = 'ping' } } + elseif ($Shutdown) { @{ command = 'shutdown' } } + elseif ($CheckProject) { @{ command = 'checkProject' } } + elseif ($ParseOnly) { Assert-RequiredArg 1 '-ParseOnly'; @{ command = 'parseOnly'; file = (Resolve-AbsFile $Rest[0]) } } + elseif ($FindRefs) { Assert-RequiredArg 3 '-FindRefs'; @{ command = 'findRefs'; file = (Resolve-AbsFile $Rest[0]); line = (ConvertTo-Int32Arg $Rest[1] 'line'); col = (ConvertTo-Int32Arg $Rest[2] 'col') } } + elseif ($TypeHints) { Assert-RequiredArg 3 '-TypeHints'; @{ command = 'typeHints'; file = (Resolve-AbsFile $Rest[0]); startLine = (ConvertTo-Int32Arg $Rest[1] 'startLine'); endLine = (ConvertTo-Int32Arg $Rest[2] 'endLine') } } + elseif ($Rest -and $Rest.Count -ge 1) { @{ command = 'check'; file = (Resolve-AbsFile $Rest[0]) } } + else { Show-Usage; exit 1 } + +# Ping and Shutdown are liveness ops - never trigger a build or 10+ min warmup. +# Real commands always go through Start-DiagServer (build + spawn + warmup if needed). +if ($Ping -or $Shutdown) { + try { + Send-Request $sock $payload 2000 + } catch { + Write-Output '{ "status":"not_running" }' + } + exit 0 +} + +Start-DiagServer $root $sock + +try { + Send-Request $sock $payload +} catch { + Write-Error "Cannot reach diagnostics server at $sock`: $($_.Exception.Message)" + exit 1 +} diff --git a/.github/skills/fsharp-diagnostics/scripts/get-fsharp-errors.sh b/.github/skills/fsharp-diagnostics/scripts/get-fsharp-errors.sh deleted file mode 100755 index 824c37f7628..00000000000 --- a/.github/skills/fsharp-diagnostics/scripts/get-fsharp-errors.sh +++ /dev/null @@ -1,118 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -# get-fsharp-errors.sh — minimal passthrough client for fsharp-diag-server -# Usage: -# get-fsharp-errors.sh [--parse-only] -# get-fsharp-errors.sh --check-project -# get-fsharp-errors.sh --ping -# get-fsharp-errors.sh --shutdown - -SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" -SERVER_PROJECT="$(cd "$SCRIPT_DIR/../server" && pwd)" -SOCK_DIR="$HOME/.fsharp-diag" - -get_repo_root() { - git rev-parse --show-toplevel 2>/dev/null || pwd -} - -get_socket_path() { - local root="$1" - local hash - hash=$(printf '%s' "$root" | shasum -a 256 | cut -c1-16) - echo "$SOCK_DIR/${hash}.sock" -} - -ensure_server() { - local root="$1" - local sock="$2" - - # Check if socket exists and server responds to ping - if [ -S "$sock" ]; then - local pong - pong=$(printf '{"command":"ping"}\n' | nc -U "$sock" 2>/dev/null || true) - if echo "$pong" | grep -q '"ok"'; then - return 0 - fi - # Stale socket - rm -f "$sock" - fi - - # Start server - mkdir -p "$SOCK_DIR" - local log_hash - log_hash=$(printf '%s' "$root" | shasum -a 256 | cut -c1-16) - local log_file="$SOCK_DIR/${log_hash}.log" - - nohup dotnet run -c Release --project "$SERVER_PROJECT" -- --repo-root "$root" > "$log_file" 2>&1 & - - # Wait for socket to appear (max 60s) - local waited=0 - while [ ! -S "$sock" ] && [ $waited -lt 60 ]; do - sleep 1 - waited=$((waited + 1)) - done - - if [ ! -S "$sock" ]; then - echo '{"error":"Server failed to start within 60s. Check log: '"$log_file"'"}' >&2 - exit 1 - fi -} - -send_request() { - local sock="$1" - local request="$2" - printf '%s\n' "$request" | nc -U "$sock" -} - -# --- Main --- - -REPO_ROOT=$(get_repo_root) -SOCK_PATH=$(get_socket_path "$REPO_ROOT") - -case "${1:-}" in - --ping) - ensure_server "$REPO_ROOT" "$SOCK_PATH" - send_request "$SOCK_PATH" '{"command":"ping"}' - ;; - --shutdown) - send_request "$SOCK_PATH" '{"command":"shutdown"}' - ;; - --parse-only) - shift - FILE=$(cd "$(dirname "$1")" && pwd)/$(basename "$1") - ensure_server "$REPO_ROOT" "$SOCK_PATH" - send_request "$SOCK_PATH" "{\"command\":\"parseOnly\",\"file\":\"$FILE\"}" - ;; - --check-project) - ensure_server "$REPO_ROOT" "$SOCK_PATH" - send_request "$SOCK_PATH" '{"command":"checkProject"}' - ;; - --find-refs) - shift - FILE=$(cd "$(dirname "$1")" && pwd)/$(basename "$1") - LINE="$2" - COL="$3" - ensure_server "$REPO_ROOT" "$SOCK_PATH" - send_request "$SOCK_PATH" "{\"command\":\"findRefs\",\"file\":\"$FILE\",\"line\":$LINE,\"col\":$COL}" - ;; - --type-hints) - shift - FILE=$(cd "$(dirname "$1")" && pwd)/$(basename "$1") - START_LINE="$2" - END_LINE="$3" - ensure_server "$REPO_ROOT" "$SOCK_PATH" - send_request "$SOCK_PATH" "{\"command\":\"typeHints\",\"file\":\"$FILE\",\"startLine\":$START_LINE,\"endLine\":$END_LINE}" - ;; - -*) - echo "Usage: get-fsharp-errors [--parse-only] " >&2 - echo " get-fsharp-errors --check-project " >&2 - echo " get-fsharp-errors --ping | --shutdown" >&2 - exit 1 - ;; - *) - FILE=$(cd "$(dirname "$1")" && pwd)/$(basename "$1") - ensure_server "$REPO_ROOT" "$SOCK_PATH" - send_request "$SOCK_PATH" "{\"command\":\"check\",\"file\":\"$FILE\"}" - ;; -esac diff --git a/.github/skills/fsharp-diagnostics/server/Server.fs b/.github/skills/fsharp-diagnostics/server/Server.fs index e45a9b9ad9e..d0defb5c373 100644 --- a/.github/skills/fsharp-diagnostics/server/Server.fs +++ b/.github/skills/fsharp-diagnostics/server/Server.fs @@ -68,6 +68,14 @@ let startServer (config: ServerConfig) = match command with | "ping" -> return $"""{{ "status":"ok", "pid":{Environment.ProcessId} }}""" + | "warmup" -> + // Forces the lazy DesignTimeBuild + FCS project load so the next real + // request doesn't hang for 5-15 min on a cold clone. + let! optionsResult = getOptions () + match optionsResult with + | Ok _ -> return """{ "status":"warmed" }""" + | Error msg -> return $"""{{ "error":"warmup failed: {msg}" }}""" + | "parseOnly" -> let file = doc.RootElement.GetProperty("file").GetString() From bc8a51b70917abd1e14409cfe51a3c1da85fedd7 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Thu, 4 Jun 2026 13:41:52 +0000 Subject: [PATCH 55/72] Fix parser error for anonymous record type aliases with postfix type operators when closing bracket is column-aligned (#19762) * Initial plan * Fix anonymous record type alias with array/generic type suffix error when closing bracket is aligned with opening bracket Add BAR_RBRACE to isTypeSeqBlockElementContinuator in LexFilter.fs to prevent incorrect OBLOCKSEP insertion after closing |} in type alias contexts. This fixes the error 'Unexpected symbol [' in member definition' when writing: type T = {| Id: Guid |} [] // or |} seq, |} list, |} option Add tests covering the fixed cases in AnonymousRecords.fs. Agent-Logs-Url: https://github.com/dotnet/fsharp/sessions/efa54b78-f657-43e6-a50e-05db045cba9d Co-authored-by: T-Gro <46543583+T-Gro@users.noreply.github.com> * Add release notes for anonymous record type alias parser fix Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: T-Gro <46543583+T-Gro@users.noreply.github.com> Co-authored-by: Tomas Grosup Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Tomas Grosup --- .../.FSharp.Compiler.Service/11.0.100.md | 1 + src/Compiler/SyntaxTree/LexFilter.fs | 8 +++ .../Types/RecordTypes/AnonymousRecords.fs | 70 +++++++++++++++++++ 3 files changed, 79 insertions(+) diff --git a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md index 229a7132e83..b023d1ade81 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md +++ b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md @@ -64,6 +64,7 @@ * Fix parallel compilation of scripts ([PR #19649](https://github.com/dotnet/fsharp/pull/19649)) * Fix parser recovery, name resolution, and code completion for unfinished enum patterns ([PR #19708](https://github.com/dotnet/fsharp/pull/19708)) * Parser: fix unexpected diagnostics in debug builds, improve error messages ([PR #19730](https://github.com/dotnet/fsharp/pull/19730)) +* Fix parser error for anonymous record type aliases with postfix type operators (e.g. `{| Id: Guid |} []`) when closing bracket is column-aligned with opening bracket. ([Issue #17407](https://github.com/dotnet/fsharp/issues/17407), [PR #19762](https://github.com/dotnet/fsharp/pull/19762)) * Fix internal error when resolving SRTP `get_Item` witness for `string` indexers (`unknown builtin witness 'get_ItemDynamic'`). ([Issue #18093](https://github.com/dotnet/fsharp/issues/18093), [PR #19757](https://github.com/dotnet/fsharp/pull/19757)) * Allow `| null` nullable annotation on a `[]` over a reference type (e.g. the FSharp.UMX `type string<[] 'm> = string` pattern). ([Issue #19657](https://github.com/dotnet/fsharp/issues/19657)) * Fix `[] ?param` optional parameters could not be passed using the explicit `?param = expr` caller-side syntax with a `ValueOption` value. ([Issue #19711](https://github.com/dotnet/fsharp/issues/19711), [PR #19742](https://github.com/dotnet/fsharp/pull/19742)) diff --git a/src/Compiler/SyntaxTree/LexFilter.fs b/src/Compiler/SyntaxTree/LexFilter.fs index ed5da9fd043..e0e450c398f 100644 --- a/src/Compiler/SyntaxTree/LexFilter.fs +++ b/src/Compiler/SyntaxTree/LexFilter.fs @@ -352,6 +352,14 @@ let rec isTypeSeqBlockElementContinuator token = // member x.M1 // member x.M2 | BAR -> true + // Closing tokens for anonymous record types and struct types in type aliases, e.g. + // type T = + // {| Id: int + // |} [] <-- BAR_RBRACE here should not trigger OBLOCKSEP for '[]' + // type T = + // {| Id: int + // |} seq <-- BAR_RBRACE here should not trigger OBLOCKSEP for 'seq' + | BAR_RBRACE -> true | OBLOCKBEGIN | ORIGHT_BLOCK_END _ | OBLOCKEND _ | ODECLEND (_, _) -> true // The following arise during reprocessing of the inserted tokens when we hit a DONE | ODUMMY token -> isTypeSeqBlockElementContinuator token | _ -> false diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/RecordTypes/AnonymousRecords.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/RecordTypes/AnonymousRecords.fs index 69c14a8d418..beef862b27a 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/RecordTypes/AnonymousRecords.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/RecordTypes/AnonymousRecords.fs @@ -673,3 +673,73 @@ let nested2 : {| A: {| B: Expr |}; C: Expr |} = (Error 3350, Line 8, Col 22, Line 8, Col 24, "Feature 'Support for better anonymous record parsing' is not available in F# 9.0. Please use language version 10.0 or greater.") (Error 3350, Line 8, Col 44, Line 8, Col 49, "Feature 'Support for better anonymous record parsing' is not available in F# 9.0. Please use language version 10.0 or greater.") ] + +module TypeAliasIndentation = + + // https://github.com/dotnet/fsharp/issues/17992 + [] + let ``Anonymous record type alias with array suffix - closing bracket aligned with opening``() = + FSharp """ +module M +type T = + {| Id: System.Guid + |} [] +""" + |> typecheck + |> shouldSucceed + + [] + let ``Anonymous record type alias with seq postfix - closing bracket aligned with opening``() = + FSharp """ +module M +type T = + {| Id: System.Guid + |} seq +""" + |> typecheck + |> shouldSucceed + + [] + let ``Anonymous record type alias with list postfix - closing bracket aligned with opening``() = + FSharp """ +module M +type T = + {| Id: System.Guid + |} list +""" + |> typecheck + |> shouldSucceed + + [] + let ``Anonymous record type alias with option postfix - closing bracket aligned with opening``() = + FSharp """ +module M +type T = + {| Id: System.Guid + |} option +""" + |> typecheck + |> shouldSucceed + + [] + let ``Anonymous record type alias with multiple fields and array suffix``() = + FSharp """ +module M +type T = + {| Id: System.Guid + Name: string + |} [] +""" + |> typecheck + |> shouldSucceed + + [] + let ``Anonymous record type alias all on same line still works``() = + FSharp """ +module M +type T = {| Id: System.Guid |} [] +type U = {| Id: System.Guid |} seq +type V = {| Id: System.Guid |} list +""" + |> typecheck + |> shouldSucceed From 9bb6b566911fe336ba5d1bf402baccfb03053f35 Mon Sep 17 00:00:00 2001 From: Eugene Auduchinok Date: Thu, 4 Jun 2026 16:06:12 +0200 Subject: [PATCH 56/72] Emit debug points at a stack-empty position (#19877) --- .../.FSharp.Compiler.Service/11.0.100.md | 1 + src/Compiler/CodeGen/IlxGen.fs | 66 +- tests/AheadOfTime/Trimming/check.ps1 | 4 +- .../ForNInRangeArrays.fs.il.bsl | 2305 ++++++++++------- .../ForNInRangeLists.fs.il.bsl | 2299 ++++++++-------- .../ForXInArray_ToArray.fs.il.bsl | 2075 +++++++++------ .../ForXInArray_ToList.fs.il.bsl | 1058 ++++---- .../ForXInList_ToArray.fs.il.bsl | 1058 ++++---- .../ForXInList_ToList.fs.il.bsl | 1385 +++++----- .../ForXInSeq_ToArray.fs.il.bsl | 1058 ++++---- .../ForXInSeq_ToList.fs.il.bsl | 1058 ++++---- .../DebugPointInOperandPosition.fs | 4 + .../DebugPointInOperandPosition.fs.il.bsl | 64 + ...bugPointInOperandPosition.fs.il.net472.bsl | 63 + .../DebugPointsOnStack/DebugPointsOnStack.fs | 19 + .../GeneratedIterators/GenIter01.fs.il.bsl | 50 +- .../GeneratedIterators/GenIter02.fs.il.bsl | 63 +- .../GeneratedIterators/GenIter03.fs.il.bsl | 50 +- ...nIter04.fs.RealInternalSignatureOff.il.bsl | 56 +- ...enIter04.fs.RealInternalSignatureOn.il.bsl | 52 +- ...RealInternalSignatureOff.OptimizeOn.il.bsl | 143 +- ....RealInternalSignatureOn.OptimizeOn.il.bsl | 143 +- .../EmittedIL/Misc/Misc.fs | 9 + .../EmittedIL/Misc/StructCtorDebugPoints.fs | 15 + .../Misc/StructCtorDebugPoints.fs.il.bsl | 379 +++ .../EmittedIL/Misc/Structs02.fs.il.bsl | 69 +- .../Misc/Structs02_asNetStandard20.fs.il.bsl | 69 +- ...gTest06.fs.RealInternalSignatureOff.il.bsl | 199 +- ...ngTest06.fs.RealInternalSignatureOn.il.bsl | 199 +- ...fs.RealInternalSignatureOff.il.netcore.bsl | 120 +- ....fs.RealInternalSignatureOn.il.netcore.bsl | 120 +- .../FSharp.Compiler.ComponentTests.fsproj | 1 + ...Sharp.Compiler.Service_Release_net10.0.bsl | 6 +- ...ompiler.Service_Release_netstandard2.0.bsl | 6 +- .../EmittedIL/ComputedListExpressions.fs | 56 +- 35 files changed, 8192 insertions(+), 6130 deletions(-) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugPointsOnStack/DebugPointInOperandPosition.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugPointsOnStack/DebugPointInOperandPosition.fs.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugPointsOnStack/DebugPointInOperandPosition.fs.il.net472.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugPointsOnStack/DebugPointsOnStack.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/StructCtorDebugPoints.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/StructCtorDebugPoints.fs.il.bsl diff --git a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md index b023d1ade81..9509ac72a3a 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md +++ b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md @@ -73,6 +73,7 @@ * Reference assembly MVIDs are now deterministic across compiler invocations. Previously, `--refout` / `true` produced a different MVID every build because the implied signature hash used .NET's randomized `String.GetHashCode()`. ([Issue #19751](https://github.com/dotnet/fsharp/issues/19751), [PR #19801](https://github.com/dotnet/fsharp/pull/19801)) * Parser: recover on unfinished if and binary expressions ([PR #19724](https://github.com/dotnet/fsharp/pull/19724)) +* Emit debug points at a stack-empty position ([PR #19877](https://github.com/dotnet/fsharp/pull/19877)) * Fix spurious XmlDoc warnings (unknown parameter / no documentation for parameter) under `--warnon:3390` when a get/set property documents the full parameter set across both accessors. ([Issue #13684](https://github.com/dotnet/fsharp/issues/13684), [PR #19884](https://github.com/dotnet/fsharp/pull/19884)) ### Added diff --git a/src/Compiler/CodeGen/IlxGen.fs b/src/Compiler/CodeGen/IlxGen.fs index 49207b9f480..46b0726fc61 100644 --- a/src/Compiler/CodeGen/IlxGen.fs +++ b/src/Compiler/CodeGen/IlxGen.fs @@ -2588,6 +2588,10 @@ type CodeGenBuffer(m: range, mgbuf: AssemblyBuilder, methodName, alreadyUsedArgs let mutable hasStackAllocatedLocals = false + // An uninitialized reference-type 'this', pending for a chained base/self '.ctor', must not be + // spilled for a debug point: that produces unverifiable IL. + let mutable uninitializedThisOnStackCount = 0 + let codeLabelToPC: Dictionary = Dictionary<_, _>(10) let codeLabelToCodeLabel: Dictionary = @@ -2629,6 +2633,12 @@ type CodeGenBuffer(m: range, mgbuf: AssemblyBuilder, methodName, alreadyUsedArgs member _.GetCurrentStack() = stack + member _.StartUninitializedThisOnStack() = + uninitializedThisOnStackCount <- uninitializedThisOnStackCount + 1 + + member _.EndUninitializedThisOnStack() = + uninitializedThisOnStackCount <- uninitializedThisOnStackCount - 1 + member _.AssertEmptyStack() = if not (isNil stack) then let msg = @@ -2676,6 +2686,21 @@ type CodeGenBuffer(m: range, mgbuf: AssemblyBuilder, methodName, alreadyUsedArgs member cgbuf.EmitDebugPoint(m: range) = if mgbuf.cenv.options.generateDebugSymbols then + // A debug point must be at an empty stack position for the debugger to bind a breakpoint there, + // so spill anything still pending (e.g. a call argument) to temporaries and reload it afterwards. + // An uninitialized reference-type 'this' (pending for a chained '.ctor') can't be spilled, so + // leave the stack as-is in that case. + let spilled = + if uninitializedThisOnStackCount > 0 then + [] + else + [ + for ty in stack -> + let idx = cgbuf.AllocLocal([], ty, false, true) + cgbuf.EmitInstr(pop 1, Push0, mkStloc (uint16 idx)) + idx, ty + ] + let attr = GenILSourceMarker g m let i = I_seqpoint attr hasDebugPoints <- true @@ -2696,6 +2721,9 @@ type CodeGenBuffer(m: range, mgbuf: AssemblyBuilder, methodName, alreadyUsedArgs anyDocument <- Some attr.Document + for idx, ty in List.rev spilled do + cgbuf.EmitInstr(pop 0, Push [ ty ], mkLdloc (uint16 idx)) + // Emit FeeFee breakpoints for hidden code, see https://blogs.msdn.microsoft.com/jmstall/2005/06/19/line-hidden-and-0xfeefee-sequence-points/ member cgbuf.EmitStartOfHiddenCode() = if mgbuf.cenv.options.generateDebugSymbols then @@ -4505,6 +4533,7 @@ and GenApp (cenv: cenv) cgbuf eenv (f, fty, tyargs, curriedArgs, m) sequel = List.splitAt numEnclILTypeArgs ilTyArgs let boxity = mspec.DeclaringType.Boxity + let valu = boxity = AsValue let mspec = mkILMethSpec (mspec.MethodRef, boxity, ilEnclArgTys, ilMethArgTys) // "Unit" return types on static methods become "void" @@ -4560,8 +4589,20 @@ and GenApp (cenv: cenv) cgbuf eenv (f, fty, tyargs, curriedArgs, m) sequel = I_call(isTailCall, mspec, None) // ok, now we're ready to generate + // For a value type the constructor 'this' is a managed pointer, so track it as a byref. + let thisTy = + if valu then + ILType.Byref mspec.DeclaringType + else + mspec.DeclaringType + if isSuperInit || isSelfInit then - CG.EmitInstr cgbuf (pop 0) (Push [ mspec.DeclaringType ]) mkLdarg0 + CG.EmitInstr cgbuf (pop 0) (Push [ thisTy ]) mkLdarg0 + + let pendingUninitializedThis = (isSuperInit || isSelfInit) && not valu + + if pendingUninitializedThis then + cgbuf.StartUninitializedThisOnStack() if not cenv.g.generateWitnesses || witnessInfos.IsEmpty then () // no witness args @@ -4602,9 +4643,12 @@ and GenApp (cenv: cenv) cgbuf eenv (f, fty, tyargs, curriedArgs, m) sequel = CG.EmitInstr cgbuf (pop (nargs + (if mspec.CallingConv.IsStatic || newobj then 0 else 1))) pushes callInstr + if pendingUninitializedThis then + cgbuf.EndUninitializedThisOnStack() + // For isSuperInit, load the 'this' pointer as the pretend 'result' of the operation. It will be popped again in most cases if isSuperInit then - CG.EmitInstr cgbuf (pop 0) (Push [ mspec.DeclaringType ]) mkLdarg0 + CG.EmitInstr cgbuf (pop 0) (Push [ thisTy ]) mkLdarg0 // When generating debug code, generate a 'nop' after a 'call' that returns 'void' // This is what C# does, as it allows the call location to be maintained correctly in the stack frame @@ -5629,10 +5673,21 @@ and GenILCall (virt || useCallVirt cenv boxity ilMethSpec isBaseCall) && ilMethRef.CallingConv.IsInstance + let thisTy = + if valu then + ILType.Byref ilMethSpec.DeclaringType + else + ilMethSpec.DeclaringType + // Load the 'this' pointer to pass to the superclass constructor. This argument is not // in the expression tree since it can't be treated like an ordinary value if isSuperInit then - CG.EmitInstr cgbuf (pop 0) (Push [ ilMethSpec.DeclaringType ]) mkLdarg0 + CG.EmitInstr cgbuf (pop 0) (Push [ thisTy ]) mkLdarg0 + + let pendingUninitializedThis = isSuperInit && not valu + + if pendingUninitializedThis then + cgbuf.StartUninitializedThisOnStack() GenExprs cenv cgbuf eenv argExprs @@ -5652,10 +5707,13 @@ and GenILCall CG.EmitInstr cgbuf (pop (argExprs.Length + (if isSuperInit then 1 else 0))) (if isSuperInit then Push0 else Push ilReturnTys) il + if pendingUninitializedThis then + cgbuf.EndUninitializedThisOnStack() + // Load the 'this' pointer as the pretend 'result' of the isSuperInit operation. // It will be immediately popped in most cases, but may also be used as the target of some "property set" operations. if isSuperInit then - CG.EmitInstr cgbuf (pop 0) (Push [ ilMethSpec.DeclaringType ]) mkLdarg0 + CG.EmitInstr cgbuf (pop 0) (Push [ thisTy ]) mkLdarg0 CommitCallSequel cenv eenv m eenv.cloc cgbuf mustGenerateUnitAfterCall sequel diff --git a/tests/AheadOfTime/Trimming/check.ps1 b/tests/AheadOfTime/Trimming/check.ps1 index aef2b148ced..1695a3684f0 100644 --- a/tests/AheadOfTime/Trimming/check.ps1 +++ b/tests/AheadOfTime/Trimming/check.ps1 @@ -63,10 +63,10 @@ function CheckTrim($root, $tfm, $outputfile, $expected_len, $callerLineNumber) { $allErrors = @() # Check net9.0 trimmed assemblies -$allErrors += CheckTrim -root "SelfContained_Trimming_Test" -tfm "net9.0" -outputfile "FSharp.Core.dll" -expected_len 311296 -callerLineNumber 66 +$allErrors += CheckTrim -root "SelfContained_Trimming_Test" -tfm "net9.0" -outputfile "FSharp.Core.dll" -expected_len 311808 -callerLineNumber 66 # Check net9.0 trimmed assemblies with static linked FSharpCore -$allErrors += CheckTrim -root "StaticLinkedFSharpCore_Trimming_Test" -tfm "net9.0" -outputfile "StaticLinkedFSharpCore_Trimming_Test.dll" -expected_len 9168384 -callerLineNumber 69 +$allErrors += CheckTrim -root "StaticLinkedFSharpCore_Trimming_Test" -tfm "net9.0" -outputfile "StaticLinkedFSharpCore_Trimming_Test.dll" -expected_len 9169408 -callerLineNumber 69 # Check net9.0 trimmed assemblies with F# metadata resources removed $allErrors += CheckTrim -root "FSharpMetadataResource_Trimming_Test" -tfm "net9.0" -outputfile "FSharpMetadataResource_Trimming_Test.dll" -expected_len 7609344 -callerLineNumber 72 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForNInRangeArrays.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForNInRangeArrays.fs.il.bsl index aae11a0f743..f89e175d24e 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForNInRangeArrays.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForNInRangeArrays.fs.il.bsl @@ -390,7 +390,11 @@ .locals init (int32[] V_0, uint64 V_1, int32 V_2, - int32 V_3) + int32 V_3, + native int V_4, + int32[] V_5, + native int V_6, + int32[] V_7) IL_0000: ldc.i4.s 10 IL_0002: conv.i8 IL_0003: conv.ovf.i.un @@ -401,35 +405,43 @@ IL_000c: stloc.1 IL_000d: ldc.i4.1 IL_000e: stloc.2 - IL_000f: br.s IL_0029 + IL_000f: br.s IL_0039 IL_0011: ldloc.0 IL_0012: ldloc.1 IL_0013: conv.i IL_0014: ldloc.2 IL_0015: stloc.3 - IL_0016: ldarg.0 - IL_0017: ldnull - IL_0018: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001d: pop - IL_001e: ldloc.3 - IL_001f: stelem.i4 - IL_0020: ldloc.2 - IL_0021: ldc.i4.1 - IL_0022: add - IL_0023: stloc.2 - IL_0024: ldloc.1 - IL_0025: ldc.i4.1 - IL_0026: conv.i8 - IL_0027: add - IL_0028: stloc.1 - IL_0029: ldloc.1 - IL_002a: ldc.i4.s 10 - IL_002c: conv.i8 - IL_002d: blt.un.s IL_0011 + IL_0016: stloc.s V_4 + IL_0018: stloc.s V_5 + IL_001a: ldloc.s V_5 + IL_001c: ldloc.s V_4 + IL_001e: ldarg.0 + IL_001f: ldnull + IL_0020: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0025: pop + IL_0026: stloc.s V_6 + IL_0028: stloc.s V_7 + IL_002a: ldloc.s V_7 + IL_002c: ldloc.s V_6 + IL_002e: ldloc.3 + IL_002f: stelem.i4 + IL_0030: ldloc.2 + IL_0031: ldc.i4.1 + IL_0032: add + IL_0033: stloc.2 + IL_0034: ldloc.1 + IL_0035: ldc.i4.1 + IL_0036: conv.i8 + IL_0037: add + IL_0038: stloc.1 + IL_0039: ldloc.1 + IL_003a: ldc.i4.s 10 + IL_003c: conv.i8 + IL_003d: blt.un.s IL_0011 - IL_002f: ldloc.0 - IL_0030: ret + IL_003f: ldloc.0 + IL_0040: ret } .method public static int32[] f00(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -441,7 +453,13 @@ .locals init (int32[] V_0, uint64 V_1, int32 V_2, - int32 V_3) + int32 V_3, + native int V_4, + int32[] V_5, + native int V_6, + int32[] V_7, + native int V_8, + int32[] V_9) IL_0000: ldc.i4.s 10 IL_0002: conv.i8 IL_0003: conv.ovf.i.un @@ -452,39 +470,51 @@ IL_000c: stloc.1 IL_000d: ldc.i4.1 IL_000e: stloc.2 - IL_000f: br.s IL_0031 + IL_000f: br.s IL_0049 IL_0011: ldloc.0 IL_0012: ldloc.1 IL_0013: conv.i IL_0014: ldloc.2 IL_0015: stloc.3 - IL_0016: ldarg.0 - IL_0017: ldnull - IL_0018: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001d: pop - IL_001e: ldarg.1 + IL_0016: stloc.s V_4 + IL_0018: stloc.s V_5 + IL_001a: ldloc.s V_5 + IL_001c: ldloc.s V_4 + IL_001e: ldarg.0 IL_001f: ldnull IL_0020: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) IL_0025: pop - IL_0026: ldloc.3 - IL_0027: stelem.i4 - IL_0028: ldloc.2 - IL_0029: ldc.i4.1 - IL_002a: add - IL_002b: stloc.2 - IL_002c: ldloc.1 - IL_002d: ldc.i4.1 - IL_002e: conv.i8 - IL_002f: add - IL_0030: stloc.1 - IL_0031: ldloc.1 - IL_0032: ldc.i4.s 10 - IL_0034: conv.i8 - IL_0035: blt.un.s IL_0011 + IL_0026: stloc.s V_6 + IL_0028: stloc.s V_7 + IL_002a: ldloc.s V_7 + IL_002c: ldloc.s V_6 + IL_002e: ldarg.1 + IL_002f: ldnull + IL_0030: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0035: pop + IL_0036: stloc.s V_8 + IL_0038: stloc.s V_9 + IL_003a: ldloc.s V_9 + IL_003c: ldloc.s V_8 + IL_003e: ldloc.3 + IL_003f: stelem.i4 + IL_0040: ldloc.2 + IL_0041: ldc.i4.1 + IL_0042: add + IL_0043: stloc.2 + IL_0044: ldloc.1 + IL_0045: ldc.i4.1 + IL_0046: conv.i8 + IL_0047: add + IL_0048: stloc.1 + IL_0049: ldloc.1 + IL_004a: ldc.i4.s 10 + IL_004c: conv.i8 + IL_004d: blt.un.s IL_0011 - IL_0037: ldloc.0 - IL_0038: ret + IL_004f: ldloc.0 + IL_0050: ret } .method public static int32[] f000(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed @@ -562,7 +592,9 @@ .locals init (int32[] V_0, uint64 V_1, int32 V_2, - int32 V_3) + int32 V_3, + native int V_4, + int32[] V_5) IL_0000: ldc.i4.s 10 IL_0002: conv.i8 IL_0003: conv.ovf.i.un @@ -573,31 +605,35 @@ IL_000c: stloc.1 IL_000d: ldc.i4.1 IL_000e: stloc.2 - IL_000f: br.s IL_0021 + IL_000f: br.s IL_0029 IL_0011: ldloc.0 IL_0012: ldloc.1 IL_0013: conv.i IL_0014: ldloc.2 IL_0015: stloc.3 - IL_0016: ldloc.3 - IL_0017: stelem.i4 - IL_0018: ldloc.2 - IL_0019: ldc.i4.1 - IL_001a: add - IL_001b: stloc.2 - IL_001c: ldloc.1 - IL_001d: ldc.i4.1 - IL_001e: conv.i8 - IL_001f: add - IL_0020: stloc.1 - IL_0021: ldloc.1 - IL_0022: ldc.i4.s 10 - IL_0024: conv.i8 - IL_0025: blt.un.s IL_0011 + IL_0016: stloc.s V_4 + IL_0018: stloc.s V_5 + IL_001a: ldloc.s V_5 + IL_001c: ldloc.s V_4 + IL_001e: ldloc.3 + IL_001f: stelem.i4 + IL_0020: ldloc.2 + IL_0021: ldc.i4.1 + IL_0022: add + IL_0023: stloc.2 + IL_0024: ldloc.1 + IL_0025: ldc.i4.1 + IL_0026: conv.i8 + IL_0027: add + IL_0028: stloc.1 + IL_0029: ldloc.1 + IL_002a: ldc.i4.s 10 + IL_002c: conv.i8 + IL_002d: blt.un.s IL_0011 - IL_0027: ldloc.0 - IL_0028: ret + IL_002f: ldloc.0 + IL_0030: ret } .method public static int32[] f00000() cil managed @@ -607,7 +643,9 @@ .locals init (int32[] V_0, uint64 V_1, int32 V_2, - int32 V_3) + int32 V_3, + native int V_4, + int32[] V_5) IL_0000: ldc.i4.s 10 IL_0002: conv.i8 IL_0003: conv.ovf.i.un @@ -618,31 +656,35 @@ IL_000c: stloc.1 IL_000d: ldc.i4.1 IL_000e: stloc.2 - IL_000f: br.s IL_0021 + IL_000f: br.s IL_0029 IL_0011: ldloc.0 IL_0012: ldloc.1 IL_0013: conv.i IL_0014: ldloc.2 IL_0015: stloc.3 - IL_0016: ldloc.3 - IL_0017: stelem.i4 - IL_0018: ldloc.2 - IL_0019: ldc.i4.1 - IL_001a: add - IL_001b: stloc.2 - IL_001c: ldloc.1 - IL_001d: ldc.i4.1 - IL_001e: conv.i8 - IL_001f: add - IL_0020: stloc.1 - IL_0021: ldloc.1 - IL_0022: ldc.i4.s 10 - IL_0024: conv.i8 - IL_0025: blt.un.s IL_0011 + IL_0016: stloc.s V_4 + IL_0018: stloc.s V_5 + IL_001a: ldloc.s V_5 + IL_001c: ldloc.s V_4 + IL_001e: ldloc.3 + IL_001f: stelem.i4 + IL_0020: ldloc.2 + IL_0021: ldc.i4.1 + IL_0022: add + IL_0023: stloc.2 + IL_0024: ldloc.1 + IL_0025: ldc.i4.1 + IL_0026: conv.i8 + IL_0027: add + IL_0028: stloc.1 + IL_0029: ldloc.1 + IL_002a: ldc.i4.s 10 + IL_002c: conv.i8 + IL_002d: blt.un.s IL_0011 - IL_0027: ldloc.0 - IL_0028: ret + IL_002f: ldloc.0 + IL_0030: ret } .method public static int32[] f000000() cil managed @@ -652,7 +694,11 @@ .locals init (int32[] V_0, uint64 V_1, int32 V_2, - int32 V_3) + int32 V_3, + native int V_4, + int32[] V_5, + native int V_6, + int32[] V_7) IL_0000: ldc.i4.s 10 IL_0002: conv.i8 IL_0003: conv.ovf.i.un @@ -663,32 +709,39 @@ IL_000c: stloc.1 IL_000d: ldc.i4.1 IL_000e: stloc.2 - IL_000f: br.s IL_0022 + IL_000f: br.s IL_0031 IL_0011: ldloc.0 IL_0012: ldloc.1 IL_0013: conv.i IL_0014: ldloc.2 IL_0015: stloc.3 - IL_0016: nop - IL_0017: ldloc.3 - IL_0018: stelem.i4 - IL_0019: ldloc.2 - IL_001a: ldc.i4.1 - IL_001b: add - IL_001c: stloc.2 - IL_001d: ldloc.1 - IL_001e: ldc.i4.1 - IL_001f: conv.i8 - IL_0020: add - IL_0021: stloc.1 - IL_0022: ldloc.1 - IL_0023: ldc.i4.s 10 - IL_0025: conv.i8 - IL_0026: blt.un.s IL_0011 + IL_0016: stloc.s V_4 + IL_0018: stloc.s V_5 + IL_001a: ldloc.s V_5 + IL_001c: ldloc.s V_4 + IL_001e: stloc.s V_6 + IL_0020: stloc.s V_7 + IL_0022: ldloc.s V_7 + IL_0024: ldloc.s V_6 + IL_0026: ldloc.3 + IL_0027: stelem.i4 + IL_0028: ldloc.2 + IL_0029: ldc.i4.1 + IL_002a: add + IL_002b: stloc.2 + IL_002c: ldloc.1 + IL_002d: ldc.i4.1 + IL_002e: conv.i8 + IL_002f: add + IL_0030: stloc.1 + IL_0031: ldloc.1 + IL_0032: ldc.i4.s 10 + IL_0034: conv.i8 + IL_0035: blt.un.s IL_0011 - IL_0028: ldloc.0 - IL_0029: ret + IL_0037: ldloc.0 + IL_0038: ret } .method public static int32[] f0000000() cil managed @@ -698,7 +751,11 @@ .locals init (int32[] V_0, uint64 V_1, int32 V_2, - int32 V_3) + int32 V_3, + native int V_4, + int32[] V_5, + native int V_6, + int32[] V_7) IL_0000: ldc.i4.s 10 IL_0002: conv.i8 IL_0003: conv.ovf.i.un @@ -709,32 +766,39 @@ IL_000c: stloc.1 IL_000d: ldc.i4.1 IL_000e: stloc.2 - IL_000f: br.s IL_0022 + IL_000f: br.s IL_0031 IL_0011: ldloc.0 IL_0012: ldloc.1 IL_0013: conv.i IL_0014: ldloc.2 IL_0015: stloc.3 - IL_0016: nop - IL_0017: ldloc.3 - IL_0018: stelem.i4 - IL_0019: ldloc.2 - IL_001a: ldc.i4.1 - IL_001b: add - IL_001c: stloc.2 - IL_001d: ldloc.1 - IL_001e: ldc.i4.1 - IL_001f: conv.i8 - IL_0020: add - IL_0021: stloc.1 - IL_0022: ldloc.1 - IL_0023: ldc.i4.s 10 - IL_0025: conv.i8 - IL_0026: blt.un.s IL_0011 + IL_0016: stloc.s V_4 + IL_0018: stloc.s V_5 + IL_001a: ldloc.s V_5 + IL_001c: ldloc.s V_4 + IL_001e: stloc.s V_6 + IL_0020: stloc.s V_7 + IL_0022: ldloc.s V_7 + IL_0024: ldloc.s V_6 + IL_0026: ldloc.3 + IL_0027: stelem.i4 + IL_0028: ldloc.2 + IL_0029: ldc.i4.1 + IL_002a: add + IL_002b: stloc.2 + IL_002c: ldloc.1 + IL_002d: ldc.i4.1 + IL_002e: conv.i8 + IL_002f: add + IL_0030: stloc.1 + IL_0031: ldloc.1 + IL_0032: ldc.i4.s 10 + IL_0034: conv.i8 + IL_0035: blt.un.s IL_0011 - IL_0028: ldloc.0 - IL_0029: ret + IL_0037: ldloc.0 + IL_0038: ret } .method public static int32[] f00000000() cil managed @@ -744,7 +808,13 @@ .locals init (int32[] V_0, uint64 V_1, int32 V_2, - int32 V_3) + int32 V_3, + native int V_4, + int32[] V_5, + native int V_6, + int32[] V_7, + native int V_8, + int32[] V_9) IL_0000: ldc.i4.s 10 IL_0002: conv.i8 IL_0003: conv.ovf.i.un @@ -755,33 +825,43 @@ IL_000c: stloc.1 IL_000d: ldc.i4.1 IL_000e: stloc.2 - IL_000f: br.s IL_0023 + IL_000f: br.s IL_0039 IL_0011: ldloc.0 IL_0012: ldloc.1 IL_0013: conv.i IL_0014: ldloc.2 IL_0015: stloc.3 - IL_0016: nop - IL_0017: nop - IL_0018: ldloc.3 - IL_0019: stelem.i4 - IL_001a: ldloc.2 - IL_001b: ldc.i4.1 - IL_001c: add - IL_001d: stloc.2 - IL_001e: ldloc.1 - IL_001f: ldc.i4.1 - IL_0020: conv.i8 - IL_0021: add - IL_0022: stloc.1 - IL_0023: ldloc.1 - IL_0024: ldc.i4.s 10 - IL_0026: conv.i8 - IL_0027: blt.un.s IL_0011 + IL_0016: stloc.s V_4 + IL_0018: stloc.s V_5 + IL_001a: ldloc.s V_5 + IL_001c: ldloc.s V_4 + IL_001e: stloc.s V_6 + IL_0020: stloc.s V_7 + IL_0022: ldloc.s V_7 + IL_0024: ldloc.s V_6 + IL_0026: stloc.s V_8 + IL_0028: stloc.s V_9 + IL_002a: ldloc.s V_9 + IL_002c: ldloc.s V_8 + IL_002e: ldloc.3 + IL_002f: stelem.i4 + IL_0030: ldloc.2 + IL_0031: ldc.i4.1 + IL_0032: add + IL_0033: stloc.2 + IL_0034: ldloc.1 + IL_0035: ldc.i4.1 + IL_0036: conv.i8 + IL_0037: add + IL_0038: stloc.1 + IL_0039: ldloc.1 + IL_003a: ldc.i4.s 10 + IL_003c: conv.i8 + IL_003d: blt.un.s IL_0011 - IL_0029: ldloc.0 - IL_002a: ret + IL_003f: ldloc.0 + IL_0040: ret } .method public static int32[] f000000000(int32 x, @@ -795,7 +875,13 @@ int32 V_2, int32 V_3, int32 V_4, - int32 V_5) + native int V_5, + int32[] V_6, + int32 V_7, + native int V_8, + int32[] V_9, + native int V_10, + int32[] V_11) IL_0000: ldc.i4.s 10 IL_0002: conv.i8 IL_0003: conv.ovf.i.un @@ -806,43 +892,55 @@ IL_000c: stloc.1 IL_000d: ldc.i4.1 IL_000e: stloc.2 - IL_000f: br.s IL_0031 + IL_000f: br.s IL_0049 IL_0011: ldloc.0 IL_0012: ldloc.1 IL_0013: conv.i IL_0014: ldloc.2 IL_0015: stloc.3 - IL_0016: ldloc.3 - IL_0017: ldarg.0 - IL_0018: add - IL_0019: stloc.s V_4 - IL_001b: ldloc.3 - IL_001c: ldarg.1 - IL_001d: add - IL_001e: stloc.s V_5 - IL_0020: ldloc.3 - IL_0021: ldloc.s V_4 - IL_0023: add - IL_0024: ldloc.s V_5 - IL_0026: add - IL_0027: stelem.i4 - IL_0028: ldloc.2 - IL_0029: ldc.i4.1 - IL_002a: add - IL_002b: stloc.2 - IL_002c: ldloc.1 - IL_002d: ldc.i4.1 - IL_002e: conv.i8 - IL_002f: add - IL_0030: stloc.1 - IL_0031: ldloc.1 - IL_0032: ldc.i4.s 10 - IL_0034: conv.i8 - IL_0035: blt.un.s IL_0011 + IL_0016: stloc.s V_5 + IL_0018: stloc.s V_6 + IL_001a: ldloc.s V_6 + IL_001c: ldloc.s V_5 + IL_001e: ldloc.3 + IL_001f: ldarg.0 + IL_0020: add + IL_0021: stloc.s V_4 + IL_0023: stloc.s V_8 + IL_0025: stloc.s V_9 + IL_0027: ldloc.s V_9 + IL_0029: ldloc.s V_8 + IL_002b: ldloc.3 + IL_002c: ldarg.1 + IL_002d: add + IL_002e: stloc.s V_7 + IL_0030: stloc.s V_10 + IL_0032: stloc.s V_11 + IL_0034: ldloc.s V_11 + IL_0036: ldloc.s V_10 + IL_0038: ldloc.3 + IL_0039: ldloc.s V_4 + IL_003b: add + IL_003c: ldloc.s V_7 + IL_003e: add + IL_003f: stelem.i4 + IL_0040: ldloc.2 + IL_0041: ldc.i4.1 + IL_0042: add + IL_0043: stloc.2 + IL_0044: ldloc.1 + IL_0045: ldc.i4.1 + IL_0046: conv.i8 + IL_0047: add + IL_0048: stloc.1 + IL_0049: ldloc.1 + IL_004a: ldc.i4.s 10 + IL_004c: conv.i8 + IL_004d: blt.un.s IL_0011 - IL_0037: ldloc.0 - IL_0038: ret + IL_004f: ldloc.0 + IL_0050: ret } .method public static int32[] f0000000000(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -854,7 +952,13 @@ .locals init (int32[] V_0, uint64 V_1, int32 V_2, - int32 V_3) + int32 V_3, + native int V_4, + int32[] V_5, + native int V_6, + int32[] V_7, + native int V_8, + int32[] V_9) IL_0000: ldc.i4.s 10 IL_0002: conv.i8 IL_0003: conv.ovf.i.un @@ -865,39 +969,51 @@ IL_000c: stloc.1 IL_000d: ldc.i4.1 IL_000e: stloc.2 - IL_000f: br.s IL_0031 + IL_000f: br.s IL_0049 IL_0011: ldloc.0 IL_0012: ldloc.1 IL_0013: conv.i IL_0014: ldloc.2 IL_0015: stloc.3 - IL_0016: ldarg.0 - IL_0017: ldnull - IL_0018: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001d: pop - IL_001e: ldarg.1 + IL_0016: stloc.s V_4 + IL_0018: stloc.s V_5 + IL_001a: ldloc.s V_5 + IL_001c: ldloc.s V_4 + IL_001e: ldarg.0 IL_001f: ldnull IL_0020: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) IL_0025: pop - IL_0026: ldloc.3 - IL_0027: stelem.i4 - IL_0028: ldloc.2 - IL_0029: ldc.i4.1 - IL_002a: add - IL_002b: stloc.2 - IL_002c: ldloc.1 - IL_002d: ldc.i4.1 - IL_002e: conv.i8 - IL_002f: add - IL_0030: stloc.1 - IL_0031: ldloc.1 - IL_0032: ldc.i4.s 10 - IL_0034: conv.i8 - IL_0035: blt.un.s IL_0011 + IL_0026: stloc.s V_6 + IL_0028: stloc.s V_7 + IL_002a: ldloc.s V_7 + IL_002c: ldloc.s V_6 + IL_002e: ldarg.1 + IL_002f: ldnull + IL_0030: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0035: pop + IL_0036: stloc.s V_8 + IL_0038: stloc.s V_9 + IL_003a: ldloc.s V_9 + IL_003c: ldloc.s V_8 + IL_003e: ldloc.3 + IL_003f: stelem.i4 + IL_0040: ldloc.2 + IL_0041: ldc.i4.1 + IL_0042: add + IL_0043: stloc.2 + IL_0044: ldloc.1 + IL_0045: ldc.i4.1 + IL_0046: conv.i8 + IL_0047: add + IL_0048: stloc.1 + IL_0049: ldloc.1 + IL_004a: ldc.i4.s 10 + IL_004c: conv.i8 + IL_004d: blt.un.s IL_0011 - IL_0037: ldloc.0 - IL_0038: ret + IL_004f: ldloc.0 + IL_0050: ret } .method public static int32[] f00000000000(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -910,7 +1026,10 @@ class [runtime]System.Collections.Generic.IEnumerator`1 V_1, class [runtime]System.Collections.Generic.IEnumerable`1 V_2, int32 V_3, - class [runtime]System.IDisposable V_4) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_5, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_6, + class [runtime]System.IDisposable V_7) IL_0000: nop IL_0001: ldc.i4.1 IL_0002: ldc.i4.1 @@ -922,54 +1041,60 @@ IL_000f: stloc.1 .try { - IL_0010: br.s IL_0040 + IL_0010: br.s IL_004c IL_0012: ldloc.1 IL_0013: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() IL_0018: stloc.3 IL_0019: ldloca.s V_0 - IL_001b: ldarg.0 - IL_001c: ldnull - IL_001d: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0022: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_0027: nop - IL_0028: ldloca.s V_0 - IL_002a: ldarg.1 - IL_002b: ldnull - IL_002c: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0031: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_0036: nop - IL_0037: ldloca.s V_0 - IL_0039: ldloc.3 - IL_003a: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_003f: nop - IL_0040: ldloc.1 - IL_0041: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0046: brtrue.s IL_0012 - - IL_0048: ldnull - IL_0049: stloc.2 - IL_004a: leave.s IL_0061 + IL_001b: stloc.s V_4 + IL_001d: ldloc.s V_4 + IL_001f: ldarg.0 + IL_0020: ldnull + IL_0021: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0026: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_002b: nop + IL_002c: ldloca.s V_0 + IL_002e: stloc.s V_5 + IL_0030: ldloc.s V_5 + IL_0032: ldarg.1 + IL_0033: ldnull + IL_0034: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0039: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_003e: nop + IL_003f: ldloca.s V_0 + IL_0041: stloc.s V_6 + IL_0043: ldloc.s V_6 + IL_0045: ldloc.3 + IL_0046: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_004b: nop + IL_004c: ldloc.1 + IL_004d: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0052: brtrue.s IL_0012 + + IL_0054: ldnull + IL_0055: stloc.2 + IL_0056: leave.s IL_006d } finally { - IL_004c: ldloc.1 - IL_004d: isinst [runtime]System.IDisposable - IL_0052: stloc.s V_4 - IL_0054: ldloc.s V_4 - IL_0056: brfalse.s IL_0060 - - IL_0058: ldloc.s V_4 - IL_005a: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_005f: endfinally - IL_0060: endfinally + IL_0058: ldloc.1 + IL_0059: isinst [runtime]System.IDisposable + IL_005e: stloc.s V_7 + IL_0060: ldloc.s V_7 + IL_0062: brfalse.s IL_006c + + IL_0064: ldloc.s V_7 + IL_0066: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_006b: endfinally + IL_006c: endfinally } - IL_0061: ldloc.2 - IL_0062: pop - IL_0063: ldloca.s V_0 - IL_0065: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_006a: ret + IL_006d: ldloc.2 + IL_006e: pop + IL_006f: ldloca.s V_0 + IL_0071: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_0076: ret } .method public static int32[] f1() cil managed @@ -979,7 +1104,9 @@ .locals init (int32[] V_0, uint64 V_1, int32 V_2, - int32 V_3) + int32 V_3, + native int V_4, + int32[] V_5) IL_0000: ldc.i4.s 10 IL_0002: conv.i8 IL_0003: conv.ovf.i.un @@ -990,31 +1117,35 @@ IL_000c: stloc.1 IL_000d: ldc.i4.1 IL_000e: stloc.2 - IL_000f: br.s IL_0021 + IL_000f: br.s IL_0029 IL_0011: ldloc.0 IL_0012: ldloc.1 IL_0013: conv.i IL_0014: ldloc.2 IL_0015: stloc.3 - IL_0016: ldloc.3 - IL_0017: stelem.i4 - IL_0018: ldloc.2 - IL_0019: ldc.i4.1 - IL_001a: add - IL_001b: stloc.2 - IL_001c: ldloc.1 - IL_001d: ldc.i4.1 - IL_001e: conv.i8 - IL_001f: add - IL_0020: stloc.1 - IL_0021: ldloc.1 - IL_0022: ldc.i4.s 10 - IL_0024: conv.i8 - IL_0025: blt.un.s IL_0011 + IL_0016: stloc.s V_4 + IL_0018: stloc.s V_5 + IL_001a: ldloc.s V_5 + IL_001c: ldloc.s V_4 + IL_001e: ldloc.3 + IL_001f: stelem.i4 + IL_0020: ldloc.2 + IL_0021: ldc.i4.1 + IL_0022: add + IL_0023: stloc.2 + IL_0024: ldloc.1 + IL_0025: ldc.i4.1 + IL_0026: conv.i8 + IL_0027: add + IL_0028: stloc.1 + IL_0029: ldloc.1 + IL_002a: ldc.i4.s 10 + IL_002c: conv.i8 + IL_002d: blt.un.s IL_0011 - IL_0027: ldloc.0 - IL_0028: ret + IL_002f: ldloc.0 + IL_0030: ret } .method public static int32[] f2() cil managed @@ -1032,7 +1163,9 @@ .locals init (int32[] V_0, uint64 V_1, int32 V_2, - int32 V_3) + int32 V_3, + native int V_4, + int32[] V_5) IL_0000: ldc.i4.s 10 IL_0002: conv.i8 IL_0003: conv.ovf.i.un @@ -1043,31 +1176,35 @@ IL_000c: stloc.1 IL_000d: ldc.i4.1 IL_000e: stloc.2 - IL_000f: br.s IL_0021 + IL_000f: br.s IL_0029 IL_0011: ldloc.0 IL_0012: ldloc.1 IL_0013: conv.i IL_0014: ldloc.2 IL_0015: stloc.3 - IL_0016: ldloc.3 - IL_0017: stelem.i4 - IL_0018: ldloc.2 - IL_0019: ldc.i4.1 - IL_001a: add - IL_001b: stloc.2 - IL_001c: ldloc.1 - IL_001d: ldc.i4.1 - IL_001e: conv.i8 - IL_001f: add - IL_0020: stloc.1 - IL_0021: ldloc.1 - IL_0022: ldc.i4.s 10 - IL_0024: conv.i8 - IL_0025: blt.un.s IL_0011 + IL_0016: stloc.s V_4 + IL_0018: stloc.s V_5 + IL_001a: ldloc.s V_5 + IL_001c: ldloc.s V_4 + IL_001e: ldloc.3 + IL_001f: stelem.i4 + IL_0020: ldloc.2 + IL_0021: ldc.i4.1 + IL_0022: add + IL_0023: stloc.2 + IL_0024: ldloc.1 + IL_0025: ldc.i4.1 + IL_0026: conv.i8 + IL_0027: add + IL_0028: stloc.1 + IL_0029: ldloc.1 + IL_002a: ldc.i4.s 10 + IL_002c: conv.i8 + IL_002d: blt.un.s IL_0011 - IL_0027: ldloc.0 - IL_0028: ret + IL_002f: ldloc.0 + IL_0030: ret } .method public static int32[] f4() cil managed @@ -1077,7 +1214,9 @@ .locals init (int32[] V_0, uint64 V_1, int32 V_2, - int32 V_3) + int32 V_3, + native int V_4, + int32[] V_5) IL_0000: ldc.i4.5 IL_0001: conv.i8 IL_0002: conv.ovf.i.un @@ -1088,31 +1227,35 @@ IL_000b: stloc.1 IL_000c: ldc.i4.1 IL_000d: stloc.2 - IL_000e: br.s IL_0020 + IL_000e: br.s IL_0028 IL_0010: ldloc.0 IL_0011: ldloc.1 IL_0012: conv.i IL_0013: ldloc.2 IL_0014: stloc.3 - IL_0015: ldloc.3 - IL_0016: stelem.i4 - IL_0017: ldloc.2 - IL_0018: ldc.i4.2 - IL_0019: add - IL_001a: stloc.2 - IL_001b: ldloc.1 - IL_001c: ldc.i4.1 - IL_001d: conv.i8 - IL_001e: add - IL_001f: stloc.1 - IL_0020: ldloc.1 - IL_0021: ldc.i4.5 - IL_0022: conv.i8 - IL_0023: blt.un.s IL_0010 + IL_0015: stloc.s V_4 + IL_0017: stloc.s V_5 + IL_0019: ldloc.s V_5 + IL_001b: ldloc.s V_4 + IL_001d: ldloc.3 + IL_001e: stelem.i4 + IL_001f: ldloc.2 + IL_0020: ldc.i4.2 + IL_0021: add + IL_0022: stloc.2 + IL_0023: ldloc.1 + IL_0024: ldc.i4.1 + IL_0025: conv.i8 + IL_0026: add + IL_0027: stloc.1 + IL_0028: ldloc.1 + IL_0029: ldc.i4.5 + IL_002a: conv.i8 + IL_002b: blt.un.s IL_0010 - IL_0025: ldloc.0 - IL_0026: ret + IL_002d: ldloc.0 + IL_002e: ret } .method public static int32[] f5() cil managed @@ -1138,7 +1281,9 @@ .locals init (int32[] V_0, uint64 V_1, int32 V_2, - int32 V_3) + int32 V_3, + native int V_4, + int32[] V_5) IL_0000: ldc.i4.s 10 IL_0002: conv.i8 IL_0003: conv.ovf.i.un @@ -1149,31 +1294,35 @@ IL_000c: stloc.1 IL_000d: ldc.i4.s 10 IL_000f: stloc.2 - IL_0010: br.s IL_0022 + IL_0010: br.s IL_002a IL_0012: ldloc.0 IL_0013: ldloc.1 IL_0014: conv.i IL_0015: ldloc.2 IL_0016: stloc.3 - IL_0017: ldloc.3 - IL_0018: stelem.i4 - IL_0019: ldloc.2 - IL_001a: ldc.i4.m1 - IL_001b: add - IL_001c: stloc.2 - IL_001d: ldloc.1 - IL_001e: ldc.i4.1 - IL_001f: conv.i8 - IL_0020: add - IL_0021: stloc.1 - IL_0022: ldloc.1 - IL_0023: ldc.i4.s 10 - IL_0025: conv.i8 - IL_0026: blt.un.s IL_0012 + IL_0017: stloc.s V_4 + IL_0019: stloc.s V_5 + IL_001b: ldloc.s V_5 + IL_001d: ldloc.s V_4 + IL_001f: ldloc.3 + IL_0020: stelem.i4 + IL_0021: ldloc.2 + IL_0022: ldc.i4.m1 + IL_0023: add + IL_0024: stloc.2 + IL_0025: ldloc.1 + IL_0026: ldc.i4.1 + IL_0027: conv.i8 + IL_0028: add + IL_0029: stloc.1 + IL_002a: ldloc.1 + IL_002b: ldc.i4.s 10 + IL_002d: conv.i8 + IL_002e: blt.un.s IL_0012 - IL_0028: ldloc.0 - IL_0029: ret + IL_0030: ldloc.0 + IL_0031: ret } .method public static int32[] f8() cil managed @@ -1183,7 +1332,9 @@ .locals init (int32[] V_0, uint64 V_1, int32 V_2, - int32 V_3) + int32 V_3, + native int V_4, + int32[] V_5) IL_0000: ldc.i4.5 IL_0001: conv.i8 IL_0002: conv.ovf.i.un @@ -1194,31 +1345,35 @@ IL_000b: stloc.1 IL_000c: ldc.i4.s 10 IL_000e: stloc.2 - IL_000f: br.s IL_0022 + IL_000f: br.s IL_002a IL_0011: ldloc.0 IL_0012: ldloc.1 IL_0013: conv.i IL_0014: ldloc.2 IL_0015: stloc.3 - IL_0016: ldloc.3 - IL_0017: stelem.i4 - IL_0018: ldloc.2 - IL_0019: ldc.i4.s -2 - IL_001b: add - IL_001c: stloc.2 - IL_001d: ldloc.1 - IL_001e: ldc.i4.1 - IL_001f: conv.i8 - IL_0020: add - IL_0021: stloc.1 - IL_0022: ldloc.1 - IL_0023: ldc.i4.5 - IL_0024: conv.i8 - IL_0025: blt.un.s IL_0011 + IL_0016: stloc.s V_4 + IL_0018: stloc.s V_5 + IL_001a: ldloc.s V_5 + IL_001c: ldloc.s V_4 + IL_001e: ldloc.3 + IL_001f: stelem.i4 + IL_0020: ldloc.2 + IL_0021: ldc.i4.s -2 + IL_0023: add + IL_0024: stloc.2 + IL_0025: ldloc.1 + IL_0026: ldc.i4.1 + IL_0027: conv.i8 + IL_0028: add + IL_0029: stloc.1 + IL_002a: ldloc.1 + IL_002b: ldc.i4.5 + IL_002c: conv.i8 + IL_002d: blt.un.s IL_0011 - IL_0027: ldloc.0 - IL_0028: ret + IL_002f: ldloc.0 + IL_0030: ret } .method public static int32[] f9(int32 start) cil managed @@ -1230,7 +1385,9 @@ int32[] V_2, uint64 V_3, int32 V_4, - int32 V_5) + int32 V_5, + native int V_6, + int32[] V_7) IL_0000: nop IL_0001: ldc.i4.s 10 IL_0003: ldarg.0 @@ -1267,30 +1424,34 @@ IL_002a: stloc.3 IL_002b: ldarg.0 IL_002c: stloc.s V_4 - IL_002e: br.s IL_0045 + IL_002e: br.s IL_004d IL_0030: ldloc.2 IL_0031: ldloc.3 IL_0032: conv.i IL_0033: ldloc.s V_4 IL_0035: stloc.s V_5 - IL_0037: ldloc.s V_5 - IL_0039: stelem.i4 - IL_003a: ldloc.s V_4 - IL_003c: ldc.i4.1 - IL_003d: add - IL_003e: stloc.s V_4 - IL_0040: ldloc.3 - IL_0041: ldc.i4.1 - IL_0042: conv.i8 - IL_0043: add - IL_0044: stloc.3 - IL_0045: ldloc.3 - IL_0046: ldloc.0 - IL_0047: blt.un.s IL_0030 + IL_0037: stloc.s V_6 + IL_0039: stloc.s V_7 + IL_003b: ldloc.s V_7 + IL_003d: ldloc.s V_6 + IL_003f: ldloc.s V_5 + IL_0041: stelem.i4 + IL_0042: ldloc.s V_4 + IL_0044: ldc.i4.1 + IL_0045: add + IL_0046: stloc.s V_4 + IL_0048: ldloc.3 + IL_0049: ldc.i4.1 + IL_004a: conv.i8 + IL_004b: add + IL_004c: stloc.3 + IL_004d: ldloc.3 + IL_004e: ldloc.0 + IL_004f: blt.un.s IL_0030 - IL_0049: ldloc.2 - IL_004a: ret + IL_0051: ldloc.2 + IL_0052: ret } .method public static int32[] f10(int32 finish) cil managed @@ -1302,7 +1463,9 @@ int32[] V_2, uint64 V_3, int32 V_4, - int32 V_5) + int32 V_5, + native int V_6, + int32[] V_7) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldc.i4.1 @@ -1339,30 +1502,34 @@ IL_0028: stloc.3 IL_0029: ldc.i4.1 IL_002a: stloc.s V_4 - IL_002c: br.s IL_0043 + IL_002c: br.s IL_004b IL_002e: ldloc.2 IL_002f: ldloc.3 IL_0030: conv.i IL_0031: ldloc.s V_4 IL_0033: stloc.s V_5 - IL_0035: ldloc.s V_5 - IL_0037: stelem.i4 - IL_0038: ldloc.s V_4 - IL_003a: ldc.i4.1 - IL_003b: add - IL_003c: stloc.s V_4 - IL_003e: ldloc.3 - IL_003f: ldc.i4.1 - IL_0040: conv.i8 - IL_0041: add - IL_0042: stloc.3 - IL_0043: ldloc.3 - IL_0044: ldloc.0 - IL_0045: blt.un.s IL_002e - - IL_0047: ldloc.2 - IL_0048: ret + IL_0035: stloc.s V_6 + IL_0037: stloc.s V_7 + IL_0039: ldloc.s V_7 + IL_003b: ldloc.s V_6 + IL_003d: ldloc.s V_5 + IL_003f: stelem.i4 + IL_0040: ldloc.s V_4 + IL_0042: ldc.i4.1 + IL_0043: add + IL_0044: stloc.s V_4 + IL_0046: ldloc.3 + IL_0047: ldc.i4.1 + IL_0048: conv.i8 + IL_0049: add + IL_004a: stloc.3 + IL_004b: ldloc.3 + IL_004c: ldloc.0 + IL_004d: blt.un.s IL_002e + + IL_004f: ldloc.2 + IL_0050: ret } .method public static int32[] f11(int32 start, @@ -1376,7 +1543,9 @@ int32[] V_2, uint64 V_3, int32 V_4, - int32 V_5) + int32 V_5, + native int V_6, + int32[] V_7) IL_0000: nop IL_0001: ldarg.1 IL_0002: ldarg.0 @@ -1413,30 +1582,34 @@ IL_0028: stloc.3 IL_0029: ldarg.0 IL_002a: stloc.s V_4 - IL_002c: br.s IL_0043 + IL_002c: br.s IL_004b IL_002e: ldloc.2 IL_002f: ldloc.3 IL_0030: conv.i IL_0031: ldloc.s V_4 IL_0033: stloc.s V_5 - IL_0035: ldloc.s V_5 - IL_0037: stelem.i4 - IL_0038: ldloc.s V_4 - IL_003a: ldc.i4.1 - IL_003b: add - IL_003c: stloc.s V_4 - IL_003e: ldloc.3 - IL_003f: ldc.i4.1 - IL_0040: conv.i8 - IL_0041: add - IL_0042: stloc.3 - IL_0043: ldloc.3 - IL_0044: ldloc.0 - IL_0045: blt.un.s IL_002e - - IL_0047: ldloc.2 - IL_0048: ret + IL_0035: stloc.s V_6 + IL_0037: stloc.s V_7 + IL_0039: ldloc.s V_7 + IL_003b: ldloc.s V_6 + IL_003d: ldloc.s V_5 + IL_003f: stelem.i4 + IL_0040: ldloc.s V_4 + IL_0042: ldc.i4.1 + IL_0043: add + IL_0044: stloc.s V_4 + IL_0046: ldloc.3 + IL_0047: ldc.i4.1 + IL_0048: conv.i8 + IL_0049: add + IL_004a: stloc.3 + IL_004b: ldloc.3 + IL_004c: ldloc.0 + IL_004d: blt.un.s IL_002e + + IL_004f: ldloc.2 + IL_0050: ret } .method public static int32[] f12(int32 start) cil managed @@ -1448,7 +1621,9 @@ int32[] V_2, uint64 V_3, int32 V_4, - int32 V_5) + int32 V_5, + native int V_6, + int32[] V_7) IL_0000: nop IL_0001: ldc.i4.s 10 IL_0003: ldarg.0 @@ -1485,30 +1660,34 @@ IL_002a: stloc.3 IL_002b: ldarg.0 IL_002c: stloc.s V_4 - IL_002e: br.s IL_0045 + IL_002e: br.s IL_004d IL_0030: ldloc.2 IL_0031: ldloc.3 IL_0032: conv.i IL_0033: ldloc.s V_4 IL_0035: stloc.s V_5 - IL_0037: ldloc.s V_5 - IL_0039: stelem.i4 - IL_003a: ldloc.s V_4 - IL_003c: ldc.i4.1 - IL_003d: add - IL_003e: stloc.s V_4 - IL_0040: ldloc.3 - IL_0041: ldc.i4.1 - IL_0042: conv.i8 - IL_0043: add - IL_0044: stloc.3 - IL_0045: ldloc.3 - IL_0046: ldloc.0 - IL_0047: blt.un.s IL_0030 + IL_0037: stloc.s V_6 + IL_0039: stloc.s V_7 + IL_003b: ldloc.s V_7 + IL_003d: ldloc.s V_6 + IL_003f: ldloc.s V_5 + IL_0041: stelem.i4 + IL_0042: ldloc.s V_4 + IL_0044: ldc.i4.1 + IL_0045: add + IL_0046: stloc.s V_4 + IL_0048: ldloc.3 + IL_0049: ldc.i4.1 + IL_004a: conv.i8 + IL_004b: add + IL_004c: stloc.3 + IL_004d: ldloc.3 + IL_004e: ldloc.0 + IL_004f: blt.un.s IL_0030 - IL_0049: ldloc.2 - IL_004a: ret + IL_0051: ldloc.2 + IL_0052: ret } .method public static int32[] f13(int32 step) cil managed @@ -1520,7 +1699,9 @@ int32[] V_2, uint64 V_3, int32 V_4, - int32 V_5) + int32 V_5, + native int V_6, + int32[] V_7) IL_0000: nop IL_0001: ldarg.0 IL_0002: brtrue.s IL_0011 @@ -1603,30 +1784,34 @@ IL_005d: stloc.3 IL_005e: ldc.i4.1 IL_005f: stloc.s V_4 - IL_0061: br.s IL_0078 + IL_0061: br.s IL_0080 IL_0063: ldloc.2 IL_0064: ldloc.3 IL_0065: conv.i IL_0066: ldloc.s V_4 IL_0068: stloc.s V_5 - IL_006a: ldloc.s V_5 - IL_006c: stelem.i4 - IL_006d: ldloc.s V_4 - IL_006f: ldarg.0 - IL_0070: add - IL_0071: stloc.s V_4 - IL_0073: ldloc.3 - IL_0074: ldc.i4.1 - IL_0075: conv.i8 - IL_0076: add - IL_0077: stloc.3 - IL_0078: ldloc.3 - IL_0079: ldloc.0 - IL_007a: blt.un.s IL_0063 - - IL_007c: ldloc.2 - IL_007d: ret + IL_006a: stloc.s V_6 + IL_006c: stloc.s V_7 + IL_006e: ldloc.s V_7 + IL_0070: ldloc.s V_6 + IL_0072: ldloc.s V_5 + IL_0074: stelem.i4 + IL_0075: ldloc.s V_4 + IL_0077: ldarg.0 + IL_0078: add + IL_0079: stloc.s V_4 + IL_007b: ldloc.3 + IL_007c: ldc.i4.1 + IL_007d: conv.i8 + IL_007e: add + IL_007f: stloc.3 + IL_0080: ldloc.3 + IL_0081: ldloc.0 + IL_0082: blt.un.s IL_0063 + + IL_0084: ldloc.2 + IL_0085: ret } .method public static int32[] f14(int32 finish) cil managed @@ -1638,7 +1823,9 @@ int32[] V_2, uint64 V_3, int32 V_4, - int32 V_5) + int32 V_5, + native int V_6, + int32[] V_7) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldc.i4.1 @@ -1675,30 +1862,34 @@ IL_0028: stloc.3 IL_0029: ldc.i4.1 IL_002a: stloc.s V_4 - IL_002c: br.s IL_0043 + IL_002c: br.s IL_004b IL_002e: ldloc.2 IL_002f: ldloc.3 IL_0030: conv.i IL_0031: ldloc.s V_4 IL_0033: stloc.s V_5 - IL_0035: ldloc.s V_5 - IL_0037: stelem.i4 - IL_0038: ldloc.s V_4 - IL_003a: ldc.i4.1 - IL_003b: add - IL_003c: stloc.s V_4 - IL_003e: ldloc.3 - IL_003f: ldc.i4.1 - IL_0040: conv.i8 - IL_0041: add - IL_0042: stloc.3 - IL_0043: ldloc.3 - IL_0044: ldloc.0 - IL_0045: blt.un.s IL_002e - - IL_0047: ldloc.2 - IL_0048: ret + IL_0035: stloc.s V_6 + IL_0037: stloc.s V_7 + IL_0039: ldloc.s V_7 + IL_003b: ldloc.s V_6 + IL_003d: ldloc.s V_5 + IL_003f: stelem.i4 + IL_0040: ldloc.s V_4 + IL_0042: ldc.i4.1 + IL_0043: add + IL_0044: stloc.s V_4 + IL_0046: ldloc.3 + IL_0047: ldc.i4.1 + IL_0048: conv.i8 + IL_0049: add + IL_004a: stloc.3 + IL_004b: ldloc.3 + IL_004c: ldloc.0 + IL_004d: blt.un.s IL_002e + + IL_004f: ldloc.2 + IL_0050: ret } .method public static int32[] f15(int32 start, @@ -1712,7 +1903,9 @@ int32[] V_2, uint64 V_3, int32 V_4, - int32 V_5) + int32 V_5, + native int V_6, + int32[] V_7) IL_0000: nop IL_0001: ldarg.1 IL_0002: brtrue.s IL_0011 @@ -1795,30 +1988,34 @@ IL_005d: stloc.3 IL_005e: ldarg.0 IL_005f: stloc.s V_4 - IL_0061: br.s IL_0078 + IL_0061: br.s IL_0080 IL_0063: ldloc.2 IL_0064: ldloc.3 IL_0065: conv.i IL_0066: ldloc.s V_4 IL_0068: stloc.s V_5 - IL_006a: ldloc.s V_5 - IL_006c: stelem.i4 - IL_006d: ldloc.s V_4 - IL_006f: ldarg.1 - IL_0070: add - IL_0071: stloc.s V_4 - IL_0073: ldloc.3 - IL_0074: ldc.i4.1 - IL_0075: conv.i8 - IL_0076: add - IL_0077: stloc.3 - IL_0078: ldloc.3 - IL_0079: ldloc.0 - IL_007a: blt.un.s IL_0063 - - IL_007c: ldloc.2 - IL_007d: ret + IL_006a: stloc.s V_6 + IL_006c: stloc.s V_7 + IL_006e: ldloc.s V_7 + IL_0070: ldloc.s V_6 + IL_0072: ldloc.s V_5 + IL_0074: stelem.i4 + IL_0075: ldloc.s V_4 + IL_0077: ldarg.1 + IL_0078: add + IL_0079: stloc.s V_4 + IL_007b: ldloc.3 + IL_007c: ldc.i4.1 + IL_007d: conv.i8 + IL_007e: add + IL_007f: stloc.3 + IL_0080: ldloc.3 + IL_0081: ldloc.0 + IL_0082: blt.un.s IL_0063 + + IL_0084: ldloc.2 + IL_0085: ret } .method public static int32[] f16(int32 start, @@ -1832,7 +2029,9 @@ int32[] V_2, uint64 V_3, int32 V_4, - int32 V_5) + int32 V_5, + native int V_6, + int32[] V_7) IL_0000: nop IL_0001: ldarg.1 IL_0002: ldarg.0 @@ -1869,30 +2068,34 @@ IL_0028: stloc.3 IL_0029: ldarg.0 IL_002a: stloc.s V_4 - IL_002c: br.s IL_0043 + IL_002c: br.s IL_004b IL_002e: ldloc.2 IL_002f: ldloc.3 IL_0030: conv.i IL_0031: ldloc.s V_4 IL_0033: stloc.s V_5 - IL_0035: ldloc.s V_5 - IL_0037: stelem.i4 - IL_0038: ldloc.s V_4 - IL_003a: ldc.i4.1 - IL_003b: add - IL_003c: stloc.s V_4 - IL_003e: ldloc.3 - IL_003f: ldc.i4.1 - IL_0040: conv.i8 - IL_0041: add - IL_0042: stloc.3 - IL_0043: ldloc.3 - IL_0044: ldloc.0 - IL_0045: blt.un.s IL_002e - - IL_0047: ldloc.2 - IL_0048: ret + IL_0035: stloc.s V_6 + IL_0037: stloc.s V_7 + IL_0039: ldloc.s V_7 + IL_003b: ldloc.s V_6 + IL_003d: ldloc.s V_5 + IL_003f: stelem.i4 + IL_0040: ldloc.s V_4 + IL_0042: ldc.i4.1 + IL_0043: add + IL_0044: stloc.s V_4 + IL_0046: ldloc.3 + IL_0047: ldc.i4.1 + IL_0048: conv.i8 + IL_0049: add + IL_004a: stloc.3 + IL_004b: ldloc.3 + IL_004c: ldloc.0 + IL_004d: blt.un.s IL_002e + + IL_004f: ldloc.2 + IL_0050: ret } .method public static int32[] f17(int32 step, @@ -1906,7 +2109,9 @@ int32[] V_2, uint64 V_3, int32 V_4, - int32 V_5) + int32 V_5, + native int V_6, + int32[] V_7) IL_0000: nop IL_0001: ldarg.0 IL_0002: brtrue.s IL_0010 @@ -1989,30 +2194,34 @@ IL_0058: stloc.3 IL_0059: ldc.i4.1 IL_005a: stloc.s V_4 - IL_005c: br.s IL_0073 + IL_005c: br.s IL_007b IL_005e: ldloc.2 IL_005f: ldloc.3 IL_0060: conv.i IL_0061: ldloc.s V_4 IL_0063: stloc.s V_5 - IL_0065: ldloc.s V_5 - IL_0067: stelem.i4 - IL_0068: ldloc.s V_4 - IL_006a: ldarg.0 - IL_006b: add - IL_006c: stloc.s V_4 - IL_006e: ldloc.3 - IL_006f: ldc.i4.1 - IL_0070: conv.i8 - IL_0071: add - IL_0072: stloc.3 - IL_0073: ldloc.3 - IL_0074: ldloc.0 - IL_0075: blt.un.s IL_005e - - IL_0077: ldloc.2 - IL_0078: ret + IL_0065: stloc.s V_6 + IL_0067: stloc.s V_7 + IL_0069: ldloc.s V_7 + IL_006b: ldloc.s V_6 + IL_006d: ldloc.s V_5 + IL_006f: stelem.i4 + IL_0070: ldloc.s V_4 + IL_0072: ldarg.0 + IL_0073: add + IL_0074: stloc.s V_4 + IL_0076: ldloc.3 + IL_0077: ldc.i4.1 + IL_0078: conv.i8 + IL_0079: add + IL_007a: stloc.3 + IL_007b: ldloc.3 + IL_007c: ldloc.0 + IL_007d: blt.un.s IL_005e + + IL_007f: ldloc.2 + IL_0080: ret } .method public static int32[] f18(int32 start, @@ -2028,7 +2237,9 @@ int32[] V_2, uint64 V_3, int32 V_4, - int32 V_5) + int32 V_5, + native int V_6, + int32[] V_7) IL_0000: nop IL_0001: ldarg.1 IL_0002: brtrue.s IL_0010 @@ -2111,30 +2322,34 @@ IL_0058: stloc.3 IL_0059: ldarg.0 IL_005a: stloc.s V_4 - IL_005c: br.s IL_0073 + IL_005c: br.s IL_007b IL_005e: ldloc.2 IL_005f: ldloc.3 IL_0060: conv.i IL_0061: ldloc.s V_4 IL_0063: stloc.s V_5 - IL_0065: ldloc.s V_5 - IL_0067: stelem.i4 - IL_0068: ldloc.s V_4 - IL_006a: ldarg.1 - IL_006b: add - IL_006c: stloc.s V_4 - IL_006e: ldloc.3 - IL_006f: ldc.i4.1 - IL_0070: conv.i8 - IL_0071: add - IL_0072: stloc.3 - IL_0073: ldloc.3 - IL_0074: ldloc.0 - IL_0075: blt.un.s IL_005e - - IL_0077: ldloc.2 - IL_0078: ret + IL_0065: stloc.s V_6 + IL_0067: stloc.s V_7 + IL_0069: ldloc.s V_7 + IL_006b: ldloc.s V_6 + IL_006d: ldloc.s V_5 + IL_006f: stelem.i4 + IL_0070: ldloc.s V_4 + IL_0072: ldarg.1 + IL_0073: add + IL_0074: stloc.s V_4 + IL_0076: ldloc.3 + IL_0077: ldc.i4.1 + IL_0078: conv.i8 + IL_0079: add + IL_007a: stloc.3 + IL_007b: ldloc.3 + IL_007c: ldloc.0 + IL_007d: blt.un.s IL_005e + + IL_007f: ldloc.2 + IL_0080: ret } .method public static int32[] f19(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed @@ -2147,7 +2362,9 @@ int32[] V_3, uint64 V_4, int32 V_5, - int32 V_6) + int32 V_6, + native int V_7, + int32[] V_8) IL_0000: ldarg.0 IL_0001: ldnull IL_0002: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) @@ -2187,30 +2404,34 @@ IL_0031: stloc.s V_4 IL_0033: ldloc.0 IL_0034: stloc.s V_5 - IL_0036: br.s IL_0050 + IL_0036: br.s IL_0058 IL_0038: ldloc.3 IL_0039: ldloc.s V_4 IL_003b: conv.i IL_003c: ldloc.s V_5 IL_003e: stloc.s V_6 - IL_0040: ldloc.s V_6 - IL_0042: stelem.i4 - IL_0043: ldloc.s V_5 - IL_0045: ldc.i4.1 - IL_0046: add - IL_0047: stloc.s V_5 - IL_0049: ldloc.s V_4 - IL_004b: ldc.i4.1 - IL_004c: conv.i8 - IL_004d: add - IL_004e: stloc.s V_4 - IL_0050: ldloc.s V_4 - IL_0052: ldloc.1 - IL_0053: blt.un.s IL_0038 - - IL_0055: ldloc.3 - IL_0056: ret + IL_0040: stloc.s V_7 + IL_0042: stloc.s V_8 + IL_0044: ldloc.s V_8 + IL_0046: ldloc.s V_7 + IL_0048: ldloc.s V_6 + IL_004a: stelem.i4 + IL_004b: ldloc.s V_5 + IL_004d: ldc.i4.1 + IL_004e: add + IL_004f: stloc.s V_5 + IL_0051: ldloc.s V_4 + IL_0053: ldc.i4.1 + IL_0054: conv.i8 + IL_0055: add + IL_0056: stloc.s V_4 + IL_0058: ldloc.s V_4 + IL_005a: ldloc.1 + IL_005b: blt.un.s IL_0038 + + IL_005d: ldloc.3 + IL_005e: ret } .method public static int32[] f20(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed @@ -2223,7 +2444,9 @@ int32[] V_3, uint64 V_4, int32 V_5, - int32 V_6) + int32 V_6, + native int V_7, + int32[] V_8) IL_0000: ldarg.0 IL_0001: ldnull IL_0002: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) @@ -2263,30 +2486,34 @@ IL_002f: stloc.s V_4 IL_0031: ldc.i4.1 IL_0032: stloc.s V_5 - IL_0034: br.s IL_004e + IL_0034: br.s IL_0056 IL_0036: ldloc.3 IL_0037: ldloc.s V_4 IL_0039: conv.i IL_003a: ldloc.s V_5 IL_003c: stloc.s V_6 - IL_003e: ldloc.s V_6 - IL_0040: stelem.i4 - IL_0041: ldloc.s V_5 - IL_0043: ldc.i4.1 - IL_0044: add - IL_0045: stloc.s V_5 - IL_0047: ldloc.s V_4 - IL_0049: ldc.i4.1 - IL_004a: conv.i8 - IL_004b: add - IL_004c: stloc.s V_4 - IL_004e: ldloc.s V_4 - IL_0050: ldloc.1 - IL_0051: blt.un.s IL_0036 + IL_003e: stloc.s V_7 + IL_0040: stloc.s V_8 + IL_0042: ldloc.s V_8 + IL_0044: ldloc.s V_7 + IL_0046: ldloc.s V_6 + IL_0048: stelem.i4 + IL_0049: ldloc.s V_5 + IL_004b: ldc.i4.1 + IL_004c: add + IL_004d: stloc.s V_5 + IL_004f: ldloc.s V_4 + IL_0051: ldc.i4.1 + IL_0052: conv.i8 + IL_0053: add + IL_0054: stloc.s V_4 + IL_0056: ldloc.s V_4 + IL_0058: ldloc.1 + IL_0059: blt.un.s IL_0036 - IL_0053: ldloc.3 - IL_0054: ret + IL_005b: ldloc.3 + IL_005c: ret } .method public static int32[] f21(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -2302,7 +2529,9 @@ int32[] V_4, uint64 V_5, int32 V_6, - int32 V_7) + int32 V_7, + native int V_8, + int32[] V_9) IL_0000: ldarg.0 IL_0001: ldnull IL_0002: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) @@ -2346,30 +2575,34 @@ IL_0038: stloc.s V_5 IL_003a: ldloc.0 IL_003b: stloc.s V_6 - IL_003d: br.s IL_0058 + IL_003d: br.s IL_0060 IL_003f: ldloc.s V_4 IL_0041: ldloc.s V_5 IL_0043: conv.i IL_0044: ldloc.s V_6 IL_0046: stloc.s V_7 - IL_0048: ldloc.s V_7 - IL_004a: stelem.i4 - IL_004b: ldloc.s V_6 - IL_004d: ldc.i4.1 - IL_004e: add - IL_004f: stloc.s V_6 - IL_0051: ldloc.s V_5 - IL_0053: ldc.i4.1 - IL_0054: conv.i8 - IL_0055: add - IL_0056: stloc.s V_5 - IL_0058: ldloc.s V_5 - IL_005a: ldloc.2 - IL_005b: blt.un.s IL_003f - - IL_005d: ldloc.s V_4 - IL_005f: ret + IL_0048: stloc.s V_8 + IL_004a: stloc.s V_9 + IL_004c: ldloc.s V_9 + IL_004e: ldloc.s V_8 + IL_0050: ldloc.s V_7 + IL_0052: stelem.i4 + IL_0053: ldloc.s V_6 + IL_0055: ldc.i4.1 + IL_0056: add + IL_0057: stloc.s V_6 + IL_0059: ldloc.s V_5 + IL_005b: ldc.i4.1 + IL_005c: conv.i8 + IL_005d: add + IL_005e: stloc.s V_5 + IL_0060: ldloc.s V_5 + IL_0062: ldloc.2 + IL_0063: blt.un.s IL_003f + + IL_0065: ldloc.s V_4 + IL_0067: ret } .method public static int32[] f22(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed @@ -2382,7 +2615,9 @@ int32[] V_3, uint64 V_4, int32 V_5, - int32 V_6) + int32 V_6, + native int V_7, + int32[] V_8) IL_0000: ldarg.0 IL_0001: ldnull IL_0002: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) @@ -2422,30 +2657,34 @@ IL_0031: stloc.s V_4 IL_0033: ldloc.0 IL_0034: stloc.s V_5 - IL_0036: br.s IL_0050 + IL_0036: br.s IL_0058 IL_0038: ldloc.3 IL_0039: ldloc.s V_4 IL_003b: conv.i IL_003c: ldloc.s V_5 IL_003e: stloc.s V_6 - IL_0040: ldloc.s V_6 - IL_0042: stelem.i4 - IL_0043: ldloc.s V_5 - IL_0045: ldc.i4.1 - IL_0046: add - IL_0047: stloc.s V_5 - IL_0049: ldloc.s V_4 - IL_004b: ldc.i4.1 - IL_004c: conv.i8 - IL_004d: add - IL_004e: stloc.s V_4 - IL_0050: ldloc.s V_4 - IL_0052: ldloc.1 - IL_0053: blt.un.s IL_0038 - - IL_0055: ldloc.3 - IL_0056: ret + IL_0040: stloc.s V_7 + IL_0042: stloc.s V_8 + IL_0044: ldloc.s V_8 + IL_0046: ldloc.s V_7 + IL_0048: ldloc.s V_6 + IL_004a: stelem.i4 + IL_004b: ldloc.s V_5 + IL_004d: ldc.i4.1 + IL_004e: add + IL_004f: stloc.s V_5 + IL_0051: ldloc.s V_4 + IL_0053: ldc.i4.1 + IL_0054: conv.i8 + IL_0055: add + IL_0056: stloc.s V_4 + IL_0058: ldloc.s V_4 + IL_005a: ldloc.1 + IL_005b: blt.un.s IL_0038 + + IL_005d: ldloc.3 + IL_005e: ret } .method public static int32[] f23(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed @@ -2458,7 +2697,9 @@ int32[] V_3, uint64 V_4, int32 V_5, - int32 V_6) + int32 V_6, + native int V_7, + int32[] V_8) IL_0000: ldarg.0 IL_0001: ldnull IL_0002: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) @@ -2544,30 +2785,34 @@ IL_0064: stloc.s V_4 IL_0066: ldc.i4.1 IL_0067: stloc.s V_5 - IL_0069: br.s IL_0083 + IL_0069: br.s IL_008b IL_006b: ldloc.3 IL_006c: ldloc.s V_4 IL_006e: conv.i IL_006f: ldloc.s V_5 IL_0071: stloc.s V_6 - IL_0073: ldloc.s V_6 - IL_0075: stelem.i4 - IL_0076: ldloc.s V_5 - IL_0078: ldloc.0 - IL_0079: add - IL_007a: stloc.s V_5 - IL_007c: ldloc.s V_4 - IL_007e: ldc.i4.1 - IL_007f: conv.i8 - IL_0080: add - IL_0081: stloc.s V_4 - IL_0083: ldloc.s V_4 - IL_0085: ldloc.1 - IL_0086: blt.un.s IL_006b - - IL_0088: ldloc.3 - IL_0089: ret + IL_0073: stloc.s V_7 + IL_0075: stloc.s V_8 + IL_0077: ldloc.s V_8 + IL_0079: ldloc.s V_7 + IL_007b: ldloc.s V_6 + IL_007d: stelem.i4 + IL_007e: ldloc.s V_5 + IL_0080: ldloc.0 + IL_0081: add + IL_0082: stloc.s V_5 + IL_0084: ldloc.s V_4 + IL_0086: ldc.i4.1 + IL_0087: conv.i8 + IL_0088: add + IL_0089: stloc.s V_4 + IL_008b: ldloc.s V_4 + IL_008d: ldloc.1 + IL_008e: blt.un.s IL_006b + + IL_0090: ldloc.3 + IL_0091: ret } .method public static int32[] f24(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed @@ -2580,7 +2825,9 @@ int32[] V_3, uint64 V_4, int32 V_5, - int32 V_6) + int32 V_6, + native int V_7, + int32[] V_8) IL_0000: ldarg.0 IL_0001: ldnull IL_0002: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) @@ -2620,30 +2867,34 @@ IL_002f: stloc.s V_4 IL_0031: ldc.i4.1 IL_0032: stloc.s V_5 - IL_0034: br.s IL_004e + IL_0034: br.s IL_0056 IL_0036: ldloc.3 IL_0037: ldloc.s V_4 IL_0039: conv.i IL_003a: ldloc.s V_5 IL_003c: stloc.s V_6 - IL_003e: ldloc.s V_6 - IL_0040: stelem.i4 - IL_0041: ldloc.s V_5 - IL_0043: ldc.i4.1 - IL_0044: add - IL_0045: stloc.s V_5 - IL_0047: ldloc.s V_4 - IL_0049: ldc.i4.1 - IL_004a: conv.i8 - IL_004b: add - IL_004c: stloc.s V_4 - IL_004e: ldloc.s V_4 - IL_0050: ldloc.1 - IL_0051: blt.un.s IL_0036 + IL_003e: stloc.s V_7 + IL_0040: stloc.s V_8 + IL_0042: ldloc.s V_8 + IL_0044: ldloc.s V_7 + IL_0046: ldloc.s V_6 + IL_0048: stelem.i4 + IL_0049: ldloc.s V_5 + IL_004b: ldc.i4.1 + IL_004c: add + IL_004d: stloc.s V_5 + IL_004f: ldloc.s V_4 + IL_0051: ldc.i4.1 + IL_0052: conv.i8 + IL_0053: add + IL_0054: stloc.s V_4 + IL_0056: ldloc.s V_4 + IL_0058: ldloc.1 + IL_0059: blt.un.s IL_0036 - IL_0053: ldloc.3 - IL_0054: ret + IL_005b: ldloc.3 + IL_005c: ret } .method public static int32[] f25(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -2662,7 +2913,9 @@ int32[] V_5, uint64 V_6, int32 V_7, - int32 V_8) + int32 V_8, + native int V_9, + int32[] V_10) IL_0000: ldarg.0 IL_0001: ldnull IL_0002: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) @@ -2756,30 +3009,34 @@ IL_0073: stloc.s V_6 IL_0075: ldloc.0 IL_0076: stloc.s V_7 - IL_0078: br.s IL_0093 + IL_0078: br.s IL_009b IL_007a: ldloc.s V_5 IL_007c: ldloc.s V_6 IL_007e: conv.i IL_007f: ldloc.s V_7 IL_0081: stloc.s V_8 - IL_0083: ldloc.s V_8 - IL_0085: stelem.i4 - IL_0086: ldloc.s V_7 - IL_0088: ldloc.1 - IL_0089: add - IL_008a: stloc.s V_7 - IL_008c: ldloc.s V_6 - IL_008e: ldc.i4.1 - IL_008f: conv.i8 - IL_0090: add - IL_0091: stloc.s V_6 - IL_0093: ldloc.s V_6 - IL_0095: ldloc.3 - IL_0096: blt.un.s IL_007a - - IL_0098: ldloc.s V_5 - IL_009a: ret + IL_0083: stloc.s V_9 + IL_0085: stloc.s V_10 + IL_0087: ldloc.s V_10 + IL_0089: ldloc.s V_9 + IL_008b: ldloc.s V_8 + IL_008d: stelem.i4 + IL_008e: ldloc.s V_7 + IL_0090: ldloc.1 + IL_0091: add + IL_0092: stloc.s V_7 + IL_0094: ldloc.s V_6 + IL_0096: ldc.i4.1 + IL_0097: conv.i8 + IL_0098: add + IL_0099: stloc.s V_6 + IL_009b: ldloc.s V_6 + IL_009d: ldloc.3 + IL_009e: blt.un.s IL_007a + + IL_00a0: ldloc.s V_5 + IL_00a2: ret } .method public static class [runtime]System.Tuple`2[] @@ -2796,7 +3053,9 @@ class [runtime]System.Tuple`2[] V_2, uint64 V_3, int32 V_4, - int32 V_5) + int32 V_5, + native int V_6, + class [runtime]System.Tuple`2[] V_7) IL_0000: nop IL_0001: ldarg.1 IL_0002: brtrue.s IL_0010 @@ -2879,34 +3138,38 @@ IL_0058: stloc.3 IL_0059: ldarg.0 IL_005a: stloc.s V_4 - IL_005c: br.s IL_007f + IL_005c: br.s IL_0087 IL_005e: ldloc.2 IL_005f: ldloc.3 IL_0060: conv.i IL_0061: ldloc.s V_4 IL_0063: stloc.s V_5 - IL_0065: ldloc.s V_5 - IL_0067: ldloc.s V_5 - IL_0069: conv.r8 - IL_006a: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + IL_0065: stloc.s V_6 + IL_0067: stloc.s V_7 + IL_0069: ldloc.s V_7 + IL_006b: ldloc.s V_6 + IL_006d: ldloc.s V_5 + IL_006f: ldloc.s V_5 + IL_0071: conv.r8 + IL_0072: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, !1) - IL_006f: stelem class [runtime]System.Tuple`2 - IL_0074: ldloc.s V_4 - IL_0076: ldarg.1 - IL_0077: add - IL_0078: stloc.s V_4 - IL_007a: ldloc.3 - IL_007b: ldc.i4.1 - IL_007c: conv.i8 - IL_007d: add - IL_007e: stloc.3 - IL_007f: ldloc.3 - IL_0080: ldloc.0 - IL_0081: blt.un.s IL_005e - - IL_0083: ldloc.2 - IL_0084: ret + IL_0077: stelem class [runtime]System.Tuple`2 + IL_007c: ldloc.s V_4 + IL_007e: ldarg.1 + IL_007f: add + IL_0080: stloc.s V_4 + IL_0082: ldloc.3 + IL_0083: ldc.i4.1 + IL_0084: conv.i8 + IL_0085: add + IL_0086: stloc.3 + IL_0087: ldloc.3 + IL_0088: ldloc.0 + IL_0089: blt.un.s IL_005e + + IL_008b: ldloc.2 + IL_008c: ret } .method public static valuetype [runtime]System.ValueTuple`2[] @@ -2923,7 +3186,9 @@ valuetype [runtime]System.ValueTuple`2[] V_2, uint64 V_3, int32 V_4, - int32 V_5) + int32 V_5, + native int V_6, + valuetype [runtime]System.ValueTuple`2[] V_7) IL_0000: nop IL_0001: ldarg.1 IL_0002: brtrue.s IL_0010 @@ -3006,34 +3271,38 @@ IL_0058: stloc.3 IL_0059: ldarg.0 IL_005a: stloc.s V_4 - IL_005c: br.s IL_007f + IL_005c: br.s IL_0087 IL_005e: ldloc.2 IL_005f: ldloc.3 IL_0060: conv.i IL_0061: ldloc.s V_4 IL_0063: stloc.s V_5 - IL_0065: ldloc.s V_5 - IL_0067: ldloc.s V_5 - IL_0069: conv.r8 - IL_006a: newobj instance void valuetype [runtime]System.ValueTuple`2::.ctor(!0, + IL_0065: stloc.s V_6 + IL_0067: stloc.s V_7 + IL_0069: ldloc.s V_7 + IL_006b: ldloc.s V_6 + IL_006d: ldloc.s V_5 + IL_006f: ldloc.s V_5 + IL_0071: conv.r8 + IL_0072: newobj instance void valuetype [runtime]System.ValueTuple`2::.ctor(!0, !1) - IL_006f: stelem valuetype [runtime]System.ValueTuple`2 - IL_0074: ldloc.s V_4 - IL_0076: ldarg.1 - IL_0077: add - IL_0078: stloc.s V_4 - IL_007a: ldloc.3 - IL_007b: ldc.i4.1 - IL_007c: conv.i8 - IL_007d: add - IL_007e: stloc.3 - IL_007f: ldloc.3 - IL_0080: ldloc.0 - IL_0081: blt.un.s IL_005e - - IL_0083: ldloc.2 - IL_0084: ret + IL_0077: stelem valuetype [runtime]System.ValueTuple`2 + IL_007c: ldloc.s V_4 + IL_007e: ldarg.1 + IL_007f: add + IL_0080: stloc.s V_4 + IL_0082: ldloc.3 + IL_0083: ldc.i4.1 + IL_0084: conv.i8 + IL_0085: add + IL_0086: stloc.3 + IL_0087: ldloc.3 + IL_0088: ldloc.0 + IL_0089: blt.un.s IL_005e + + IL_008b: ldloc.2 + IL_008c: ret } .method public static int32[] f28(int32 start, @@ -3049,7 +3318,11 @@ int32[] V_2, uint64 V_3, int32 V_4, - int32 V_5) + int32 V_5, + native int V_6, + int32[] V_7, + native int V_8, + int32[] V_9) IL_0000: nop IL_0001: ldarg.1 IL_0002: brtrue.s IL_0010 @@ -3132,33 +3405,40 @@ IL_0058: stloc.3 IL_0059: ldarg.0 IL_005a: stloc.s V_4 - IL_005c: br.s IL_0077 + IL_005c: br.s IL_0086 IL_005e: ldloc.2 IL_005f: ldloc.3 IL_0060: conv.i IL_0061: ldloc.s V_4 IL_0063: stloc.s V_5 - IL_0065: nop - IL_0066: ldloc.s V_5 - IL_0068: ldloc.s V_5 - IL_006a: mul - IL_006b: stelem.i4 - IL_006c: ldloc.s V_4 - IL_006e: ldarg.1 - IL_006f: add - IL_0070: stloc.s V_4 - IL_0072: ldloc.3 - IL_0073: ldc.i4.1 - IL_0074: conv.i8 - IL_0075: add - IL_0076: stloc.3 - IL_0077: ldloc.3 - IL_0078: ldloc.0 - IL_0079: blt.un.s IL_005e - - IL_007b: ldloc.2 - IL_007c: ret + IL_0065: stloc.s V_6 + IL_0067: stloc.s V_7 + IL_0069: ldloc.s V_7 + IL_006b: ldloc.s V_6 + IL_006d: stloc.s V_8 + IL_006f: stloc.s V_9 + IL_0071: ldloc.s V_9 + IL_0073: ldloc.s V_8 + IL_0075: ldloc.s V_5 + IL_0077: ldloc.s V_5 + IL_0079: mul + IL_007a: stelem.i4 + IL_007b: ldloc.s V_4 + IL_007d: ldarg.1 + IL_007e: add + IL_007f: stloc.s V_4 + IL_0081: ldloc.3 + IL_0082: ldc.i4.1 + IL_0083: conv.i8 + IL_0084: add + IL_0085: stloc.3 + IL_0086: ldloc.3 + IL_0087: ldloc.0 + IL_0088: blt.un.s IL_005e + + IL_008a: ldloc.2 + IL_008b: ret } .method public static int32[] f29(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -3172,7 +3452,9 @@ int32[] V_2, uint64 V_3, int32 V_4, - int32 V_5) + int32 V_5, + native int V_6, + int32[] V_7) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldnull @@ -3192,35 +3474,39 @@ IL_001c: stloc.3 IL_001d: ldc.i4.1 IL_001e: stloc.s V_4 - IL_0020: br.s IL_003b + IL_0020: br.s IL_0043 IL_0022: ldloc.2 IL_0023: ldloc.3 IL_0024: conv.i IL_0025: ldloc.s V_4 IL_0027: stloc.s V_5 - IL_0029: ldloc.s V_5 - IL_002b: ldloc.0 - IL_002c: add - IL_002d: ldloc.1 - IL_002e: add - IL_002f: stelem.i4 - IL_0030: ldloc.s V_4 - IL_0032: ldc.i4.2 - IL_0033: add - IL_0034: stloc.s V_4 - IL_0036: ldloc.3 - IL_0037: ldc.i4.1 - IL_0038: conv.i8 - IL_0039: add - IL_003a: stloc.3 - IL_003b: ldloc.3 - IL_003c: ldc.i4.5 - IL_003d: conv.i8 - IL_003e: blt.un.s IL_0022 + IL_0029: stloc.s V_6 + IL_002b: stloc.s V_7 + IL_002d: ldloc.s V_7 + IL_002f: ldloc.s V_6 + IL_0031: ldloc.s V_5 + IL_0033: ldloc.0 + IL_0034: add + IL_0035: ldloc.1 + IL_0036: add + IL_0037: stelem.i4 + IL_0038: ldloc.s V_4 + IL_003a: ldc.i4.2 + IL_003b: add + IL_003c: stloc.s V_4 + IL_003e: ldloc.3 + IL_003f: ldc.i4.1 + IL_0040: conv.i8 + IL_0041: add + IL_0042: stloc.3 + IL_0043: ldloc.3 + IL_0044: ldc.i4.5 + IL_0045: conv.i8 + IL_0046: blt.un.s IL_0022 - IL_0040: ldloc.2 - IL_0041: ret + IL_0048: ldloc.2 + IL_0049: ret } .method public static int32[] f30(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -3233,7 +3519,9 @@ int32[] V_1, uint64 V_2, int32 V_3, - int32 V_4) + int32 V_4, + native int V_5, + int32[] V_6) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldnull @@ -3253,33 +3541,37 @@ IL_001c: stloc.2 IL_001d: ldc.i4.1 IL_001e: stloc.3 - IL_001f: br.s IL_0035 + IL_001f: br.s IL_003d IL_0021: ldloc.1 IL_0022: ldloc.2 IL_0023: conv.i IL_0024: ldloc.3 IL_0025: stloc.s V_4 - IL_0027: ldloc.s V_4 - IL_0029: ldloc.0 - IL_002a: add - IL_002b: stelem.i4 - IL_002c: ldloc.3 - IL_002d: ldc.i4.2 - IL_002e: add - IL_002f: stloc.3 - IL_0030: ldloc.2 - IL_0031: ldc.i4.1 - IL_0032: conv.i8 - IL_0033: add - IL_0034: stloc.2 - IL_0035: ldloc.2 - IL_0036: ldc.i4.5 - IL_0037: conv.i8 - IL_0038: blt.un.s IL_0021 - - IL_003a: ldloc.1 - IL_003b: ret + IL_0027: stloc.s V_5 + IL_0029: stloc.s V_6 + IL_002b: ldloc.s V_6 + IL_002d: ldloc.s V_5 + IL_002f: ldloc.s V_4 + IL_0031: ldloc.0 + IL_0032: add + IL_0033: stelem.i4 + IL_0034: ldloc.3 + IL_0035: ldc.i4.2 + IL_0036: add + IL_0037: stloc.3 + IL_0038: ldloc.2 + IL_0039: ldc.i4.1 + IL_003a: conv.i8 + IL_003b: add + IL_003c: stloc.2 + IL_003d: ldloc.2 + IL_003e: ldc.i4.5 + IL_003f: conv.i8 + IL_0040: blt.un.s IL_0021 + + IL_0042: ldloc.1 + IL_0043: ret } .method public static int32[] f31(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -3291,7 +3583,9 @@ .locals init (int32[] V_0, uint64 V_1, int32 V_2, - int32 V_3) + int32 V_3, + native int V_4, + int32[] V_5) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldnull @@ -3311,31 +3605,35 @@ IL_001c: stloc.1 IL_001d: ldc.i4.1 IL_001e: stloc.2 - IL_001f: br.s IL_0031 + IL_001f: br.s IL_0039 IL_0021: ldloc.0 IL_0022: ldloc.1 IL_0023: conv.i IL_0024: ldloc.2 IL_0025: stloc.3 - IL_0026: ldloc.3 - IL_0027: stelem.i4 - IL_0028: ldloc.2 - IL_0029: ldc.i4.2 - IL_002a: add - IL_002b: stloc.2 - IL_002c: ldloc.1 - IL_002d: ldc.i4.1 - IL_002e: conv.i8 - IL_002f: add - IL_0030: stloc.1 - IL_0031: ldloc.1 - IL_0032: ldc.i4.5 - IL_0033: conv.i8 - IL_0034: blt.un.s IL_0021 + IL_0026: stloc.s V_4 + IL_0028: stloc.s V_5 + IL_002a: ldloc.s V_5 + IL_002c: ldloc.s V_4 + IL_002e: ldloc.3 + IL_002f: stelem.i4 + IL_0030: ldloc.2 + IL_0031: ldc.i4.2 + IL_0032: add + IL_0033: stloc.2 + IL_0034: ldloc.1 + IL_0035: ldc.i4.1 + IL_0036: conv.i8 + IL_0037: add + IL_0038: stloc.1 + IL_0039: ldloc.1 + IL_003a: ldc.i4.5 + IL_003b: conv.i8 + IL_003c: blt.un.s IL_0021 - IL_0036: ldloc.0 - IL_0037: ret + IL_003e: ldloc.0 + IL_003f: ret } .method public static int32[] f32(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -3348,7 +3646,9 @@ int32[] V_1, uint64 V_2, int32 V_3, - int32 V_4) + int32 V_4, + native int V_5, + int32[] V_6) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldnull @@ -3368,33 +3668,37 @@ IL_001c: stloc.2 IL_001d: ldc.i4.1 IL_001e: stloc.3 - IL_001f: br.s IL_0035 + IL_001f: br.s IL_003d IL_0021: ldloc.1 IL_0022: ldloc.2 IL_0023: conv.i IL_0024: ldloc.3 IL_0025: stloc.s V_4 - IL_0027: ldloc.s V_4 - IL_0029: ldloc.0 - IL_002a: add - IL_002b: stelem.i4 - IL_002c: ldloc.3 - IL_002d: ldc.i4.2 - IL_002e: add - IL_002f: stloc.3 - IL_0030: ldloc.2 - IL_0031: ldc.i4.1 - IL_0032: conv.i8 - IL_0033: add - IL_0034: stloc.2 - IL_0035: ldloc.2 - IL_0036: ldc.i4.5 - IL_0037: conv.i8 - IL_0038: blt.un.s IL_0021 - - IL_003a: ldloc.1 - IL_003b: ret + IL_0027: stloc.s V_5 + IL_0029: stloc.s V_6 + IL_002b: ldloc.s V_6 + IL_002d: ldloc.s V_5 + IL_002f: ldloc.s V_4 + IL_0031: ldloc.0 + IL_0032: add + IL_0033: stelem.i4 + IL_0034: ldloc.3 + IL_0035: ldc.i4.2 + IL_0036: add + IL_0037: stloc.3 + IL_0038: ldloc.2 + IL_0039: ldc.i4.1 + IL_003a: conv.i8 + IL_003b: add + IL_003c: stloc.2 + IL_003d: ldloc.2 + IL_003e: ldc.i4.5 + IL_003f: conv.i8 + IL_0040: blt.un.s IL_0021 + + IL_0042: ldloc.1 + IL_0043: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Core.Unit[] @@ -3411,7 +3715,9 @@ class [FSharp.Core]Microsoft.FSharp.Core.Unit[] V_2, uint64 V_3, int32 V_4, - int32 V_5) + int32 V_5, + native int V_6, + class [FSharp.Core]Microsoft.FSharp.Core.Unit[] V_7) IL_0000: nop IL_0001: ldarg.1 IL_0002: ldarg.0 @@ -3448,35 +3754,39 @@ IL_0028: stloc.3 IL_0029: ldarg.0 IL_002a: stloc.s V_4 - IL_002c: br.s IL_0055 + IL_002c: br.s IL_005d IL_002e: ldloc.2 IL_002f: ldloc.3 IL_0030: conv.i IL_0031: ldloc.s V_4 IL_0033: stloc.s V_5 - IL_0035: ldsfld class assembly/f33@47 assembly/f33@47::@_instance - IL_003a: ldsfld class assembly/'f33@47-1' assembly/'f33@47-1'::@_instance - IL_003f: ldnull - IL_0040: call !!0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::InvokeFast(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, + IL_0035: stloc.s V_6 + IL_0037: stloc.s V_7 + IL_0039: ldloc.s V_7 + IL_003b: ldloc.s V_6 + IL_003d: ldsfld class assembly/f33@47 assembly/f33@47::@_instance + IL_0042: ldsfld class assembly/'f33@47-1' assembly/'f33@47-1'::@_instance + IL_0047: ldnull + IL_0048: call !!0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::InvokeFast(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, !0, !1) - IL_0045: stelem [FSharp.Core]Microsoft.FSharp.Core.Unit - IL_004a: ldloc.s V_4 - IL_004c: ldc.i4.1 - IL_004d: add - IL_004e: stloc.s V_4 - IL_0050: ldloc.3 - IL_0051: ldc.i4.1 - IL_0052: conv.i8 - IL_0053: add - IL_0054: stloc.3 - IL_0055: ldloc.3 - IL_0056: ldloc.0 - IL_0057: blt.un.s IL_002e + IL_004d: stelem [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_0052: ldloc.s V_4 + IL_0054: ldc.i4.1 + IL_0055: add + IL_0056: stloc.s V_4 + IL_0058: ldloc.3 + IL_0059: ldc.i4.1 + IL_005a: conv.i8 + IL_005b: add + IL_005c: stloc.3 + IL_005d: ldloc.3 + IL_005e: ldloc.0 + IL_005f: blt.un.s IL_002e - IL_0059: ldloc.2 - IL_005a: ret + IL_0061: ldloc.2 + IL_0062: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Core.Unit[] @@ -3496,7 +3806,11 @@ uint64 V_5, int64 V_6, int64 V_7, - uint64 V_8) + native int V_8, + class [FSharp.Core]Microsoft.FSharp.Core.Unit[] V_9, + uint64 V_10, + native int V_11, + class [FSharp.Core]Microsoft.FSharp.Core.Unit[] V_12) IL_0000: nop IL_0001: ldarg.1 IL_0002: ldarg.0 @@ -3545,7 +3859,7 @@ IL_0031: newarr [FSharp.Core]Microsoft.FSharp.Core.Unit IL_0036: stloc.3 IL_0037: ldloc.1 - IL_0038: brfalse.s IL_0080 + IL_0038: brfalse.s IL_0088 IL_003a: ldc.i4.1 IL_003b: stloc.s V_4 @@ -3554,94 +3868,102 @@ IL_003f: stloc.s V_5 IL_0041: ldarg.0 IL_0042: stloc.s V_6 - IL_0044: br.s IL_0079 + IL_0044: br.s IL_0081 IL_0046: ldloc.3 IL_0047: ldloc.s V_5 IL_0049: conv.i IL_004a: ldloc.s V_6 IL_004c: stloc.s V_7 - IL_004e: ldsfld class assembly/f34@48 assembly/f34@48::@_instance - IL_0053: ldsfld class assembly/'f34@48-1' assembly/'f34@48-1'::@_instance - IL_0058: ldnull - IL_0059: call !!0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::InvokeFast(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, + IL_004e: stloc.s V_8 + IL_0050: stloc.s V_9 + IL_0052: ldloc.s V_9 + IL_0054: ldloc.s V_8 + IL_0056: ldsfld class assembly/f34@48 assembly/f34@48::@_instance + IL_005b: ldsfld class assembly/'f34@48-1' assembly/'f34@48-1'::@_instance + IL_0060: ldnull + IL_0061: call !!0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::InvokeFast(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, !0, !1) - IL_005e: stelem [FSharp.Core]Microsoft.FSharp.Core.Unit - IL_0063: ldloc.s V_6 - IL_0065: ldc.i4.1 - IL_0066: conv.i8 - IL_0067: add - IL_0068: stloc.s V_6 - IL_006a: ldloc.s V_5 - IL_006c: ldc.i4.1 - IL_006d: conv.i8 - IL_006e: add - IL_006f: stloc.s V_5 - IL_0071: ldloc.s V_5 - IL_0073: ldc.i4.0 - IL_0074: conv.i8 - IL_0075: cgt.un - IL_0077: stloc.s V_4 - IL_0079: ldloc.s V_4 - IL_007b: brtrue.s IL_0046 - - IL_007d: nop - IL_007e: br.s IL_00cd - - IL_0080: ldarg.1 - IL_0081: ldarg.0 - IL_0082: bge.s IL_0089 - - IL_0084: ldc.i4.0 - IL_0085: conv.i8 - IL_0086: nop - IL_0087: br.s IL_0090 - - IL_0089: ldarg.1 - IL_008a: ldarg.0 - IL_008b: sub - IL_008c: ldc.i4.1 + IL_0066: stelem [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_006b: ldloc.s V_6 + IL_006d: ldc.i4.1 + IL_006e: conv.i8 + IL_006f: add + IL_0070: stloc.s V_6 + IL_0072: ldloc.s V_5 + IL_0074: ldc.i4.1 + IL_0075: conv.i8 + IL_0076: add + IL_0077: stloc.s V_5 + IL_0079: ldloc.s V_5 + IL_007b: ldc.i4.0 + IL_007c: conv.i8 + IL_007d: cgt.un + IL_007f: stloc.s V_4 + IL_0081: ldloc.s V_4 + IL_0083: brtrue.s IL_0046 + + IL_0085: nop + IL_0086: br.s IL_00dd + + IL_0088: ldarg.1 + IL_0089: ldarg.0 + IL_008a: bge.s IL_0091 + + IL_008c: ldc.i4.0 IL_008d: conv.i8 - IL_008e: add.ovf.un - IL_008f: nop - IL_0090: stloc.s V_5 - IL_0092: ldc.i4.0 - IL_0093: conv.i8 - IL_0094: stloc.s V_8 - IL_0096: ldarg.0 - IL_0097: stloc.s V_6 - IL_0099: br.s IL_00c6 - - IL_009b: ldloc.3 - IL_009c: ldloc.s V_8 - IL_009e: conv.i - IL_009f: ldloc.s V_6 - IL_00a1: stloc.s V_7 - IL_00a3: ldsfld class assembly/'f34@48-2' assembly/'f34@48-2'::@_instance - IL_00a8: ldsfld class assembly/'f34@48-3' assembly/'f34@48-3'::@_instance - IL_00ad: ldnull - IL_00ae: call !!0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::InvokeFast(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, + IL_008e: nop + IL_008f: br.s IL_0098 + + IL_0091: ldarg.1 + IL_0092: ldarg.0 + IL_0093: sub + IL_0094: ldc.i4.1 + IL_0095: conv.i8 + IL_0096: add.ovf.un + IL_0097: nop + IL_0098: stloc.s V_5 + IL_009a: ldc.i4.0 + IL_009b: conv.i8 + IL_009c: stloc.s V_10 + IL_009e: ldarg.0 + IL_009f: stloc.s V_6 + IL_00a1: br.s IL_00d6 + + IL_00a3: ldloc.3 + IL_00a4: ldloc.s V_10 + IL_00a6: conv.i + IL_00a7: ldloc.s V_6 + IL_00a9: stloc.s V_7 + IL_00ab: stloc.s V_11 + IL_00ad: stloc.s V_12 + IL_00af: ldloc.s V_12 + IL_00b1: ldloc.s V_11 + IL_00b3: ldsfld class assembly/'f34@48-2' assembly/'f34@48-2'::@_instance + IL_00b8: ldsfld class assembly/'f34@48-3' assembly/'f34@48-3'::@_instance + IL_00bd: ldnull + IL_00be: call !!0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::InvokeFast(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, !0, !1) - IL_00b3: stelem [FSharp.Core]Microsoft.FSharp.Core.Unit - IL_00b8: ldloc.s V_6 - IL_00ba: ldc.i4.1 - IL_00bb: conv.i8 - IL_00bc: add - IL_00bd: stloc.s V_6 - IL_00bf: ldloc.s V_8 - IL_00c1: ldc.i4.1 - IL_00c2: conv.i8 - IL_00c3: add - IL_00c4: stloc.s V_8 - IL_00c6: ldloc.s V_8 - IL_00c8: ldloc.s V_5 - IL_00ca: blt.un.s IL_009b - - IL_00cc: nop - IL_00cd: ldloc.3 - IL_00ce: ret + IL_00c3: stelem [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_00c8: ldloc.s V_6 + IL_00ca: ldc.i4.1 + IL_00cb: conv.i8 + IL_00cc: add + IL_00cd: stloc.s V_6 + IL_00cf: ldloc.s V_10 + IL_00d1: ldc.i4.1 + IL_00d2: conv.i8 + IL_00d3: add + IL_00d4: stloc.s V_10 + IL_00d6: ldloc.s V_10 + IL_00d8: ldloc.s V_5 + IL_00da: blt.un.s IL_00a3 + + IL_00dc: nop + IL_00dd: ldloc.3 + IL_00de: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Core.Unit[] @@ -3661,7 +3983,11 @@ uint64 V_5, uint64 V_6, uint64 V_7, - uint64 V_8) + native int V_8, + class [FSharp.Core]Microsoft.FSharp.Core.Unit[] V_9, + uint64 V_10, + native int V_11, + class [FSharp.Core]Microsoft.FSharp.Core.Unit[] V_12) IL_0000: nop IL_0001: ldarg.1 IL_0002: ldarg.0 @@ -3710,7 +4036,7 @@ IL_0031: newarr [FSharp.Core]Microsoft.FSharp.Core.Unit IL_0036: stloc.3 IL_0037: ldloc.1 - IL_0038: brfalse.s IL_0080 + IL_0038: brfalse.s IL_0088 IL_003a: ldc.i4.1 IL_003b: stloc.s V_4 @@ -3719,94 +4045,102 @@ IL_003f: stloc.s V_5 IL_0041: ldarg.0 IL_0042: stloc.s V_6 - IL_0044: br.s IL_0079 + IL_0044: br.s IL_0081 IL_0046: ldloc.3 IL_0047: ldloc.s V_5 IL_0049: conv.i IL_004a: ldloc.s V_6 IL_004c: stloc.s V_7 - IL_004e: ldsfld class assembly/f35@49 assembly/f35@49::@_instance - IL_0053: ldsfld class assembly/'f35@49-1' assembly/'f35@49-1'::@_instance - IL_0058: ldnull - IL_0059: call !!0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::InvokeFast(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, + IL_004e: stloc.s V_8 + IL_0050: stloc.s V_9 + IL_0052: ldloc.s V_9 + IL_0054: ldloc.s V_8 + IL_0056: ldsfld class assembly/f35@49 assembly/f35@49::@_instance + IL_005b: ldsfld class assembly/'f35@49-1' assembly/'f35@49-1'::@_instance + IL_0060: ldnull + IL_0061: call !!0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::InvokeFast(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, !0, !1) - IL_005e: stelem [FSharp.Core]Microsoft.FSharp.Core.Unit - IL_0063: ldloc.s V_6 - IL_0065: ldc.i4.1 - IL_0066: conv.i8 - IL_0067: add - IL_0068: stloc.s V_6 - IL_006a: ldloc.s V_5 - IL_006c: ldc.i4.1 - IL_006d: conv.i8 - IL_006e: add - IL_006f: stloc.s V_5 - IL_0071: ldloc.s V_5 - IL_0073: ldc.i4.0 - IL_0074: conv.i8 - IL_0075: cgt.un - IL_0077: stloc.s V_4 - IL_0079: ldloc.s V_4 - IL_007b: brtrue.s IL_0046 - - IL_007d: nop - IL_007e: br.s IL_00cd - - IL_0080: ldarg.1 - IL_0081: ldarg.0 - IL_0082: bge.un.s IL_0089 - - IL_0084: ldc.i4.0 - IL_0085: conv.i8 - IL_0086: nop - IL_0087: br.s IL_0090 - - IL_0089: ldarg.1 - IL_008a: ldarg.0 - IL_008b: sub - IL_008c: ldc.i4.1 + IL_0066: stelem [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_006b: ldloc.s V_6 + IL_006d: ldc.i4.1 + IL_006e: conv.i8 + IL_006f: add + IL_0070: stloc.s V_6 + IL_0072: ldloc.s V_5 + IL_0074: ldc.i4.1 + IL_0075: conv.i8 + IL_0076: add + IL_0077: stloc.s V_5 + IL_0079: ldloc.s V_5 + IL_007b: ldc.i4.0 + IL_007c: conv.i8 + IL_007d: cgt.un + IL_007f: stloc.s V_4 + IL_0081: ldloc.s V_4 + IL_0083: brtrue.s IL_0046 + + IL_0085: nop + IL_0086: br.s IL_00dd + + IL_0088: ldarg.1 + IL_0089: ldarg.0 + IL_008a: bge.un.s IL_0091 + + IL_008c: ldc.i4.0 IL_008d: conv.i8 - IL_008e: add.ovf.un - IL_008f: nop - IL_0090: stloc.s V_5 - IL_0092: ldc.i4.0 - IL_0093: conv.i8 - IL_0094: stloc.s V_6 - IL_0096: ldarg.0 - IL_0097: stloc.s V_7 - IL_0099: br.s IL_00c6 - - IL_009b: ldloc.3 - IL_009c: ldloc.s V_6 - IL_009e: conv.i - IL_009f: ldloc.s V_7 - IL_00a1: stloc.s V_8 - IL_00a3: ldsfld class assembly/'f35@49-2' assembly/'f35@49-2'::@_instance - IL_00a8: ldsfld class assembly/'f35@49-3' assembly/'f35@49-3'::@_instance - IL_00ad: ldnull - IL_00ae: call !!0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::InvokeFast(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, + IL_008e: nop + IL_008f: br.s IL_0098 + + IL_0091: ldarg.1 + IL_0092: ldarg.0 + IL_0093: sub + IL_0094: ldc.i4.1 + IL_0095: conv.i8 + IL_0096: add.ovf.un + IL_0097: nop + IL_0098: stloc.s V_5 + IL_009a: ldc.i4.0 + IL_009b: conv.i8 + IL_009c: stloc.s V_6 + IL_009e: ldarg.0 + IL_009f: stloc.s V_7 + IL_00a1: br.s IL_00d6 + + IL_00a3: ldloc.3 + IL_00a4: ldloc.s V_6 + IL_00a6: conv.i + IL_00a7: ldloc.s V_7 + IL_00a9: stloc.s V_10 + IL_00ab: stloc.s V_11 + IL_00ad: stloc.s V_12 + IL_00af: ldloc.s V_12 + IL_00b1: ldloc.s V_11 + IL_00b3: ldsfld class assembly/'f35@49-2' assembly/'f35@49-2'::@_instance + IL_00b8: ldsfld class assembly/'f35@49-3' assembly/'f35@49-3'::@_instance + IL_00bd: ldnull + IL_00be: call !!0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::InvokeFast(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, !0, !1) - IL_00b3: stelem [FSharp.Core]Microsoft.FSharp.Core.Unit - IL_00b8: ldloc.s V_7 - IL_00ba: ldc.i4.1 - IL_00bb: conv.i8 - IL_00bc: add - IL_00bd: stloc.s V_7 - IL_00bf: ldloc.s V_6 - IL_00c1: ldc.i4.1 - IL_00c2: conv.i8 - IL_00c3: add - IL_00c4: stloc.s V_6 - IL_00c6: ldloc.s V_6 - IL_00c8: ldloc.s V_5 - IL_00ca: blt.un.s IL_009b - - IL_00cc: nop - IL_00cd: ldloc.3 - IL_00ce: ret + IL_00c3: stelem [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_00c8: ldloc.s V_7 + IL_00ca: ldc.i4.1 + IL_00cb: conv.i8 + IL_00cc: add + IL_00cd: stloc.s V_7 + IL_00cf: ldloc.s V_6 + IL_00d1: ldc.i4.1 + IL_00d2: conv.i8 + IL_00d3: add + IL_00d4: stloc.s V_6 + IL_00d6: ldloc.s V_6 + IL_00d8: ldloc.s V_5 + IL_00da: blt.un.s IL_00a3 + + IL_00dc: nop + IL_00dd: ldloc.3 + IL_00de: ret } } @@ -3828,4 +4162,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForNInRangeLists.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForNInRangeLists.fs.il.bsl index 3d0f67782c2..842035cf524 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForNInRangeLists.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForNInRangeLists.fs.il.bsl @@ -390,41 +390,47 @@ .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, uint64 V_1, int32 V_2, - int32 V_3) + int32 V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5) IL_0000: ldc.i4.0 IL_0001: conv.i8 IL_0002: stloc.1 IL_0003: ldc.i4.1 IL_0004: stloc.2 - IL_0005: br.s IL_0023 + IL_0005: br.s IL_002b IL_0007: ldloca.s V_0 IL_0009: ldloc.2 IL_000a: stloc.3 - IL_000b: ldarg.0 - IL_000c: ldnull - IL_000d: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0012: pop - IL_0013: ldloc.3 - IL_0014: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0019: nop - IL_001a: ldloc.2 - IL_001b: ldc.i4.1 - IL_001c: add - IL_001d: stloc.2 - IL_001e: ldloc.1 - IL_001f: ldc.i4.1 - IL_0020: conv.i8 - IL_0021: add - IL_0022: stloc.1 - IL_0023: ldloc.1 - IL_0024: ldc.i4.s 10 - IL_0026: conv.i8 - IL_0027: blt.un.s IL_0007 + IL_000b: stloc.s V_4 + IL_000d: ldloc.s V_4 + IL_000f: ldarg.0 + IL_0010: ldnull + IL_0011: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0016: pop + IL_0017: stloc.s V_5 + IL_0019: ldloc.s V_5 + IL_001b: ldloc.3 + IL_001c: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0021: nop + IL_0022: ldloc.2 + IL_0023: ldc.i4.1 + IL_0024: add + IL_0025: stloc.2 + IL_0026: ldloc.1 + IL_0027: ldc.i4.1 + IL_0028: conv.i8 + IL_0029: add + IL_002a: stloc.1 + IL_002b: ldloc.1 + IL_002c: ldc.i4.s 10 + IL_002e: conv.i8 + IL_002f: blt.un.s IL_0007 - IL_0029: ldloca.s V_0 - IL_002b: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0030: ret + IL_0031: ldloca.s V_0 + IL_0033: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0038: ret } .method public static int32[] f00(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -436,7 +442,13 @@ .locals init (int32[] V_0, uint64 V_1, int32 V_2, - int32 V_3) + int32 V_3, + native int V_4, + int32[] V_5, + native int V_6, + int32[] V_7, + native int V_8, + int32[] V_9) IL_0000: ldc.i4.s 10 IL_0002: conv.i8 IL_0003: conv.ovf.i.un @@ -447,39 +459,51 @@ IL_000c: stloc.1 IL_000d: ldc.i4.1 IL_000e: stloc.2 - IL_000f: br.s IL_0031 + IL_000f: br.s IL_0049 IL_0011: ldloc.0 IL_0012: ldloc.1 IL_0013: conv.i IL_0014: ldloc.2 IL_0015: stloc.3 - IL_0016: ldarg.0 - IL_0017: ldnull - IL_0018: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001d: pop - IL_001e: ldarg.1 + IL_0016: stloc.s V_4 + IL_0018: stloc.s V_5 + IL_001a: ldloc.s V_5 + IL_001c: ldloc.s V_4 + IL_001e: ldarg.0 IL_001f: ldnull IL_0020: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) IL_0025: pop - IL_0026: ldloc.3 - IL_0027: stelem.i4 - IL_0028: ldloc.2 - IL_0029: ldc.i4.1 - IL_002a: add - IL_002b: stloc.2 - IL_002c: ldloc.1 - IL_002d: ldc.i4.1 - IL_002e: conv.i8 - IL_002f: add - IL_0030: stloc.1 - IL_0031: ldloc.1 - IL_0032: ldc.i4.s 10 - IL_0034: conv.i8 - IL_0035: blt.un.s IL_0011 - - IL_0037: ldloc.0 - IL_0038: ret + IL_0026: stloc.s V_6 + IL_0028: stloc.s V_7 + IL_002a: ldloc.s V_7 + IL_002c: ldloc.s V_6 + IL_002e: ldarg.1 + IL_002f: ldnull + IL_0030: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0035: pop + IL_0036: stloc.s V_8 + IL_0038: stloc.s V_9 + IL_003a: ldloc.s V_9 + IL_003c: ldloc.s V_8 + IL_003e: ldloc.3 + IL_003f: stelem.i4 + IL_0040: ldloc.2 + IL_0041: ldc.i4.1 + IL_0042: add + IL_0043: stloc.2 + IL_0044: ldloc.1 + IL_0045: ldc.i4.1 + IL_0046: conv.i8 + IL_0047: add + IL_0048: stloc.1 + IL_0049: ldloc.1 + IL_004a: ldc.i4.s 10 + IL_004c: conv.i8 + IL_004d: blt.un.s IL_0011 + + IL_004f: ldloc.0 + IL_0050: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f000(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed @@ -557,37 +581,40 @@ .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, uint64 V_1, int32 V_2, - int32 V_3) + int32 V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4) IL_0000: ldc.i4.0 IL_0001: conv.i8 IL_0002: stloc.1 IL_0003: ldc.i4.1 IL_0004: stloc.2 - IL_0005: br.s IL_001b + IL_0005: br.s IL_001f IL_0007: ldloca.s V_0 IL_0009: ldloc.2 IL_000a: stloc.3 - IL_000b: ldloc.3 - IL_000c: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0011: nop - IL_0012: ldloc.2 - IL_0013: ldc.i4.1 - IL_0014: add - IL_0015: stloc.2 - IL_0016: ldloc.1 + IL_000b: stloc.s V_4 + IL_000d: ldloc.s V_4 + IL_000f: ldloc.3 + IL_0010: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0015: nop + IL_0016: ldloc.2 IL_0017: ldc.i4.1 - IL_0018: conv.i8 - IL_0019: add - IL_001a: stloc.1 - IL_001b: ldloc.1 - IL_001c: ldc.i4.s 10 - IL_001e: conv.i8 - IL_001f: blt.un.s IL_0007 + IL_0018: add + IL_0019: stloc.2 + IL_001a: ldloc.1 + IL_001b: ldc.i4.1 + IL_001c: conv.i8 + IL_001d: add + IL_001e: stloc.1 + IL_001f: ldloc.1 + IL_0020: ldc.i4.s 10 + IL_0022: conv.i8 + IL_0023: blt.un.s IL_0007 - IL_0021: ldloca.s V_0 - IL_0023: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0028: ret + IL_0025: ldloca.s V_0 + IL_0027: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_002c: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f00000() cil managed @@ -597,37 +624,40 @@ .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, uint64 V_1, int32 V_2, - int32 V_3) + int32 V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4) IL_0000: ldc.i4.0 IL_0001: conv.i8 IL_0002: stloc.1 IL_0003: ldc.i4.1 IL_0004: stloc.2 - IL_0005: br.s IL_001b + IL_0005: br.s IL_001f IL_0007: ldloca.s V_0 IL_0009: ldloc.2 IL_000a: stloc.3 - IL_000b: ldloc.3 - IL_000c: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0011: nop - IL_0012: ldloc.2 - IL_0013: ldc.i4.1 - IL_0014: add - IL_0015: stloc.2 - IL_0016: ldloc.1 + IL_000b: stloc.s V_4 + IL_000d: ldloc.s V_4 + IL_000f: ldloc.3 + IL_0010: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0015: nop + IL_0016: ldloc.2 IL_0017: ldc.i4.1 - IL_0018: conv.i8 - IL_0019: add - IL_001a: stloc.1 - IL_001b: ldloc.1 - IL_001c: ldc.i4.s 10 - IL_001e: conv.i8 - IL_001f: blt.un.s IL_0007 + IL_0018: add + IL_0019: stloc.2 + IL_001a: ldloc.1 + IL_001b: ldc.i4.1 + IL_001c: conv.i8 + IL_001d: add + IL_001e: stloc.1 + IL_001f: ldloc.1 + IL_0020: ldc.i4.s 10 + IL_0022: conv.i8 + IL_0023: blt.un.s IL_0007 - IL_0021: ldloca.s V_0 - IL_0023: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0028: ret + IL_0025: ldloca.s V_0 + IL_0027: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_002c: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f000000() cil managed @@ -637,38 +667,43 @@ .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, uint64 V_1, int32 V_2, - int32 V_3) + int32 V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5) IL_0000: ldc.i4.0 IL_0001: conv.i8 IL_0002: stloc.1 IL_0003: ldc.i4.1 IL_0004: stloc.2 - IL_0005: br.s IL_001c + IL_0005: br.s IL_0023 IL_0007: ldloca.s V_0 IL_0009: ldloc.2 IL_000a: stloc.3 - IL_000b: nop - IL_000c: ldloc.3 - IL_000d: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0012: nop - IL_0013: ldloc.2 - IL_0014: ldc.i4.1 - IL_0015: add - IL_0016: stloc.2 - IL_0017: ldloc.1 - IL_0018: ldc.i4.1 - IL_0019: conv.i8 - IL_001a: add - IL_001b: stloc.1 - IL_001c: ldloc.1 - IL_001d: ldc.i4.s 10 - IL_001f: conv.i8 - IL_0020: blt.un.s IL_0007 + IL_000b: stloc.s V_4 + IL_000d: ldloc.s V_4 + IL_000f: stloc.s V_5 + IL_0011: ldloc.s V_5 + IL_0013: ldloc.3 + IL_0014: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0019: nop + IL_001a: ldloc.2 + IL_001b: ldc.i4.1 + IL_001c: add + IL_001d: stloc.2 + IL_001e: ldloc.1 + IL_001f: ldc.i4.1 + IL_0020: conv.i8 + IL_0021: add + IL_0022: stloc.1 + IL_0023: ldloc.1 + IL_0024: ldc.i4.s 10 + IL_0026: conv.i8 + IL_0027: blt.un.s IL_0007 - IL_0022: ldloca.s V_0 - IL_0024: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0029: ret + IL_0029: ldloca.s V_0 + IL_002b: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0030: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f0000000() cil managed @@ -678,38 +713,43 @@ .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, uint64 V_1, int32 V_2, - int32 V_3) + int32 V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5) IL_0000: ldc.i4.0 IL_0001: conv.i8 IL_0002: stloc.1 IL_0003: ldc.i4.1 IL_0004: stloc.2 - IL_0005: br.s IL_001c + IL_0005: br.s IL_0023 IL_0007: ldloca.s V_0 IL_0009: ldloc.2 IL_000a: stloc.3 - IL_000b: nop - IL_000c: ldloc.3 - IL_000d: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0012: nop - IL_0013: ldloc.2 - IL_0014: ldc.i4.1 - IL_0015: add - IL_0016: stloc.2 - IL_0017: ldloc.1 - IL_0018: ldc.i4.1 - IL_0019: conv.i8 - IL_001a: add - IL_001b: stloc.1 - IL_001c: ldloc.1 - IL_001d: ldc.i4.s 10 - IL_001f: conv.i8 - IL_0020: blt.un.s IL_0007 + IL_000b: stloc.s V_4 + IL_000d: ldloc.s V_4 + IL_000f: stloc.s V_5 + IL_0011: ldloc.s V_5 + IL_0013: ldloc.3 + IL_0014: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0019: nop + IL_001a: ldloc.2 + IL_001b: ldc.i4.1 + IL_001c: add + IL_001d: stloc.2 + IL_001e: ldloc.1 + IL_001f: ldc.i4.1 + IL_0020: conv.i8 + IL_0021: add + IL_0022: stloc.1 + IL_0023: ldloc.1 + IL_0024: ldc.i4.s 10 + IL_0026: conv.i8 + IL_0027: blt.un.s IL_0007 - IL_0022: ldloca.s V_0 - IL_0024: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0029: ret + IL_0029: ldloca.s V_0 + IL_002b: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0030: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f00000000() cil managed @@ -719,39 +759,46 @@ .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, uint64 V_1, int32 V_2, - int32 V_3) + int32 V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_6) IL_0000: ldc.i4.0 IL_0001: conv.i8 IL_0002: stloc.1 IL_0003: ldc.i4.1 IL_0004: stloc.2 - IL_0005: br.s IL_001d + IL_0005: br.s IL_0027 IL_0007: ldloca.s V_0 IL_0009: ldloc.2 IL_000a: stloc.3 - IL_000b: nop - IL_000c: nop - IL_000d: ldloc.3 - IL_000e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0013: nop - IL_0014: ldloc.2 - IL_0015: ldc.i4.1 - IL_0016: add - IL_0017: stloc.2 - IL_0018: ldloc.1 - IL_0019: ldc.i4.1 - IL_001a: conv.i8 - IL_001b: add - IL_001c: stloc.1 - IL_001d: ldloc.1 - IL_001e: ldc.i4.s 10 - IL_0020: conv.i8 - IL_0021: blt.un.s IL_0007 + IL_000b: stloc.s V_4 + IL_000d: ldloc.s V_4 + IL_000f: stloc.s V_5 + IL_0011: ldloc.s V_5 + IL_0013: stloc.s V_6 + IL_0015: ldloc.s V_6 + IL_0017: ldloc.3 + IL_0018: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_001d: nop + IL_001e: ldloc.2 + IL_001f: ldc.i4.1 + IL_0020: add + IL_0021: stloc.2 + IL_0022: ldloc.1 + IL_0023: ldc.i4.1 + IL_0024: conv.i8 + IL_0025: add + IL_0026: stloc.1 + IL_0027: ldloc.1 + IL_0028: ldc.i4.s 10 + IL_002a: conv.i8 + IL_002b: blt.un.s IL_0007 - IL_0023: ldloca.s V_0 - IL_0025: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_002a: ret + IL_002d: ldloca.s V_0 + IL_002f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0034: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f000000000(int32 x, int32 y) cil managed @@ -764,49 +811,58 @@ int32 V_2, int32 V_3, int32 V_4, - int32 V_5) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5, + int32 V_6, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_7, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_8) IL_0000: ldc.i4.0 IL_0001: conv.i8 IL_0002: stloc.1 IL_0003: ldc.i4.1 IL_0004: stloc.2 - IL_0005: br.s IL_002b + IL_0005: br.s IL_0037 IL_0007: ldloca.s V_0 IL_0009: ldloc.2 IL_000a: stloc.3 - IL_000b: ldloc.3 - IL_000c: ldarg.0 - IL_000d: add - IL_000e: stloc.s V_4 - IL_0010: ldloc.3 - IL_0011: ldarg.1 - IL_0012: add - IL_0013: stloc.s V_5 - IL_0015: ldloc.3 - IL_0016: ldloc.s V_4 - IL_0018: add - IL_0019: ldloc.s V_5 - IL_001b: add - IL_001c: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0021: nop - IL_0022: ldloc.2 - IL_0023: ldc.i4.1 + IL_000b: stloc.s V_5 + IL_000d: ldloc.s V_5 + IL_000f: ldloc.3 + IL_0010: ldarg.0 + IL_0011: add + IL_0012: stloc.s V_4 + IL_0014: stloc.s V_7 + IL_0016: ldloc.s V_7 + IL_0018: ldloc.3 + IL_0019: ldarg.1 + IL_001a: add + IL_001b: stloc.s V_6 + IL_001d: stloc.s V_8 + IL_001f: ldloc.s V_8 + IL_0021: ldloc.3 + IL_0022: ldloc.s V_4 IL_0024: add - IL_0025: stloc.2 - IL_0026: ldloc.1 - IL_0027: ldc.i4.1 - IL_0028: conv.i8 - IL_0029: add - IL_002a: stloc.1 - IL_002b: ldloc.1 - IL_002c: ldc.i4.s 10 - IL_002e: conv.i8 - IL_002f: blt.un.s IL_0007 + IL_0025: ldloc.s V_6 + IL_0027: add + IL_0028: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_002d: nop + IL_002e: ldloc.2 + IL_002f: ldc.i4.1 + IL_0030: add + IL_0031: stloc.2 + IL_0032: ldloc.1 + IL_0033: ldc.i4.1 + IL_0034: conv.i8 + IL_0035: add + IL_0036: stloc.1 + IL_0037: ldloc.1 + IL_0038: ldc.i4.s 10 + IL_003a: conv.i8 + IL_003b: blt.un.s IL_0007 - IL_0031: ldloca.s V_0 - IL_0033: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0038: ret + IL_003d: ldloca.s V_0 + IL_003f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0044: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f0000000000(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 g) cil managed @@ -817,45 +873,54 @@ .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, uint64 V_1, int32 V_2, - int32 V_3) + int32 V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_6) IL_0000: ldc.i4.0 IL_0001: conv.i8 IL_0002: stloc.1 IL_0003: ldc.i4.1 IL_0004: stloc.2 - IL_0005: br.s IL_002b + IL_0005: br.s IL_0037 IL_0007: ldloca.s V_0 IL_0009: ldloc.2 IL_000a: stloc.3 - IL_000b: ldarg.0 - IL_000c: ldnull - IL_000d: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0012: pop - IL_0013: ldarg.1 - IL_0014: ldnull - IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001a: pop - IL_001b: ldloc.3 - IL_001c: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0021: nop - IL_0022: ldloc.2 - IL_0023: ldc.i4.1 - IL_0024: add - IL_0025: stloc.2 - IL_0026: ldloc.1 - IL_0027: ldc.i4.1 - IL_0028: conv.i8 - IL_0029: add - IL_002a: stloc.1 - IL_002b: ldloc.1 - IL_002c: ldc.i4.s 10 - IL_002e: conv.i8 - IL_002f: blt.un.s IL_0007 + IL_000b: stloc.s V_4 + IL_000d: ldloc.s V_4 + IL_000f: ldarg.0 + IL_0010: ldnull + IL_0011: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0016: pop + IL_0017: stloc.s V_5 + IL_0019: ldloc.s V_5 + IL_001b: ldarg.1 + IL_001c: ldnull + IL_001d: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0022: pop + IL_0023: stloc.s V_6 + IL_0025: ldloc.s V_6 + IL_0027: ldloc.3 + IL_0028: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_002d: nop + IL_002e: ldloc.2 + IL_002f: ldc.i4.1 + IL_0030: add + IL_0031: stloc.2 + IL_0032: ldloc.1 + IL_0033: ldc.i4.1 + IL_0034: conv.i8 + IL_0035: add + IL_0036: stloc.1 + IL_0037: ldloc.1 + IL_0038: ldc.i4.s 10 + IL_003a: conv.i8 + IL_003b: blt.un.s IL_0007 - IL_0031: ldloca.s V_0 - IL_0033: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0038: ret + IL_003d: ldloca.s V_0 + IL_003f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0044: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f00000000000(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 g) cil managed @@ -867,7 +932,10 @@ class [runtime]System.Collections.Generic.IEnumerator`1 V_1, class [runtime]System.Collections.Generic.IEnumerable`1 V_2, int32 V_3, - class [runtime]System.IDisposable V_4) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_6, + class [runtime]System.IDisposable V_7) IL_0000: nop IL_0001: ldc.i4.1 IL_0002: ldc.i4.1 @@ -879,54 +947,60 @@ IL_000f: stloc.1 .try { - IL_0010: br.s IL_0040 + IL_0010: br.s IL_004c IL_0012: ldloc.1 IL_0013: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() IL_0018: stloc.3 IL_0019: ldloca.s V_0 - IL_001b: ldarg.0 - IL_001c: ldnull - IL_001d: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0022: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0027: nop - IL_0028: ldloca.s V_0 - IL_002a: ldarg.1 - IL_002b: ldnull - IL_002c: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0031: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0036: nop - IL_0037: ldloca.s V_0 - IL_0039: ldloc.3 - IL_003a: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_003f: nop - IL_0040: ldloc.1 - IL_0041: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0046: brtrue.s IL_0012 - - IL_0048: ldnull - IL_0049: stloc.2 - IL_004a: leave.s IL_0061 + IL_001b: stloc.s V_4 + IL_001d: ldloc.s V_4 + IL_001f: ldarg.0 + IL_0020: ldnull + IL_0021: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0026: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_002b: nop + IL_002c: ldloca.s V_0 + IL_002e: stloc.s V_5 + IL_0030: ldloc.s V_5 + IL_0032: ldarg.1 + IL_0033: ldnull + IL_0034: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0039: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_003e: nop + IL_003f: ldloca.s V_0 + IL_0041: stloc.s V_6 + IL_0043: ldloc.s V_6 + IL_0045: ldloc.3 + IL_0046: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_004b: nop + IL_004c: ldloc.1 + IL_004d: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0052: brtrue.s IL_0012 + + IL_0054: ldnull + IL_0055: stloc.2 + IL_0056: leave.s IL_006d } finally { - IL_004c: ldloc.1 - IL_004d: isinst [runtime]System.IDisposable - IL_0052: stloc.s V_4 - IL_0054: ldloc.s V_4 - IL_0056: brfalse.s IL_0060 - - IL_0058: ldloc.s V_4 - IL_005a: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_005f: endfinally - IL_0060: endfinally + IL_0058: ldloc.1 + IL_0059: isinst [runtime]System.IDisposable + IL_005e: stloc.s V_7 + IL_0060: ldloc.s V_7 + IL_0062: brfalse.s IL_006c + + IL_0064: ldloc.s V_7 + IL_0066: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_006b: endfinally + IL_006c: endfinally } - IL_0061: ldloc.2 - IL_0062: pop - IL_0063: ldloca.s V_0 - IL_0065: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_006a: ret + IL_006d: ldloc.2 + IL_006e: pop + IL_006f: ldloca.s V_0 + IL_0071: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0076: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f1() cil managed @@ -936,37 +1010,40 @@ .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, uint64 V_1, int32 V_2, - int32 V_3) + int32 V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4) IL_0000: ldc.i4.0 IL_0001: conv.i8 IL_0002: stloc.1 IL_0003: ldc.i4.1 IL_0004: stloc.2 - IL_0005: br.s IL_001b + IL_0005: br.s IL_001f IL_0007: ldloca.s V_0 IL_0009: ldloc.2 IL_000a: stloc.3 - IL_000b: ldloc.3 - IL_000c: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0011: nop - IL_0012: ldloc.2 - IL_0013: ldc.i4.1 - IL_0014: add - IL_0015: stloc.2 - IL_0016: ldloc.1 + IL_000b: stloc.s V_4 + IL_000d: ldloc.s V_4 + IL_000f: ldloc.3 + IL_0010: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0015: nop + IL_0016: ldloc.2 IL_0017: ldc.i4.1 - IL_0018: conv.i8 - IL_0019: add - IL_001a: stloc.1 - IL_001b: ldloc.1 - IL_001c: ldc.i4.s 10 - IL_001e: conv.i8 - IL_001f: blt.un.s IL_0007 + IL_0018: add + IL_0019: stloc.2 + IL_001a: ldloc.1 + IL_001b: ldc.i4.1 + IL_001c: conv.i8 + IL_001d: add + IL_001e: stloc.1 + IL_001f: ldloc.1 + IL_0020: ldc.i4.s 10 + IL_0022: conv.i8 + IL_0023: blt.un.s IL_0007 - IL_0021: ldloca.s V_0 - IL_0023: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0028: ret + IL_0025: ldloca.s V_0 + IL_0027: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_002c: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f2() cil managed @@ -984,37 +1061,40 @@ .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, uint64 V_1, int32 V_2, - int32 V_3) + int32 V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4) IL_0000: ldc.i4.0 IL_0001: conv.i8 IL_0002: stloc.1 IL_0003: ldc.i4.1 IL_0004: stloc.2 - IL_0005: br.s IL_001b + IL_0005: br.s IL_001f IL_0007: ldloca.s V_0 IL_0009: ldloc.2 IL_000a: stloc.3 - IL_000b: ldloc.3 - IL_000c: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0011: nop - IL_0012: ldloc.2 - IL_0013: ldc.i4.1 - IL_0014: add - IL_0015: stloc.2 - IL_0016: ldloc.1 + IL_000b: stloc.s V_4 + IL_000d: ldloc.s V_4 + IL_000f: ldloc.3 + IL_0010: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0015: nop + IL_0016: ldloc.2 IL_0017: ldc.i4.1 - IL_0018: conv.i8 - IL_0019: add - IL_001a: stloc.1 - IL_001b: ldloc.1 - IL_001c: ldc.i4.s 10 - IL_001e: conv.i8 - IL_001f: blt.un.s IL_0007 + IL_0018: add + IL_0019: stloc.2 + IL_001a: ldloc.1 + IL_001b: ldc.i4.1 + IL_001c: conv.i8 + IL_001d: add + IL_001e: stloc.1 + IL_001f: ldloc.1 + IL_0020: ldc.i4.s 10 + IL_0022: conv.i8 + IL_0023: blt.un.s IL_0007 - IL_0021: ldloca.s V_0 - IL_0023: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0028: ret + IL_0025: ldloca.s V_0 + IL_0027: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_002c: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f4() cil managed @@ -1024,37 +1104,40 @@ .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, uint64 V_1, int32 V_2, - int32 V_3) + int32 V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4) IL_0000: ldc.i4.0 IL_0001: conv.i8 IL_0002: stloc.1 IL_0003: ldc.i4.1 IL_0004: stloc.2 - IL_0005: br.s IL_001b + IL_0005: br.s IL_001f IL_0007: ldloca.s V_0 IL_0009: ldloc.2 IL_000a: stloc.3 - IL_000b: ldloc.3 - IL_000c: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0011: nop - IL_0012: ldloc.2 - IL_0013: ldc.i4.2 - IL_0014: add - IL_0015: stloc.2 - IL_0016: ldloc.1 - IL_0017: ldc.i4.1 - IL_0018: conv.i8 - IL_0019: add - IL_001a: stloc.1 - IL_001b: ldloc.1 - IL_001c: ldc.i4.5 - IL_001d: conv.i8 - IL_001e: blt.un.s IL_0007 - - IL_0020: ldloca.s V_0 - IL_0022: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0027: ret + IL_000b: stloc.s V_4 + IL_000d: ldloc.s V_4 + IL_000f: ldloc.3 + IL_0010: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0015: nop + IL_0016: ldloc.2 + IL_0017: ldc.i4.2 + IL_0018: add + IL_0019: stloc.2 + IL_001a: ldloc.1 + IL_001b: ldc.i4.1 + IL_001c: conv.i8 + IL_001d: add + IL_001e: stloc.1 + IL_001f: ldloc.1 + IL_0020: ldc.i4.5 + IL_0021: conv.i8 + IL_0022: blt.un.s IL_0007 + + IL_0024: ldloca.s V_0 + IL_0026: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_002b: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f5() cil managed @@ -1080,37 +1163,40 @@ .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, uint64 V_1, int32 V_2, - int32 V_3) + int32 V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4) IL_0000: ldc.i4.0 IL_0001: conv.i8 IL_0002: stloc.1 IL_0003: ldc.i4.s 10 IL_0005: stloc.2 - IL_0006: br.s IL_001c + IL_0006: br.s IL_0020 IL_0008: ldloca.s V_0 IL_000a: ldloc.2 IL_000b: stloc.3 - IL_000c: ldloc.3 - IL_000d: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0012: nop - IL_0013: ldloc.2 - IL_0014: ldc.i4.m1 - IL_0015: add - IL_0016: stloc.2 - IL_0017: ldloc.1 - IL_0018: ldc.i4.1 - IL_0019: conv.i8 - IL_001a: add - IL_001b: stloc.1 - IL_001c: ldloc.1 - IL_001d: ldc.i4.s 10 - IL_001f: conv.i8 - IL_0020: blt.un.s IL_0008 + IL_000c: stloc.s V_4 + IL_000e: ldloc.s V_4 + IL_0010: ldloc.3 + IL_0011: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0016: nop + IL_0017: ldloc.2 + IL_0018: ldc.i4.m1 + IL_0019: add + IL_001a: stloc.2 + IL_001b: ldloc.1 + IL_001c: ldc.i4.1 + IL_001d: conv.i8 + IL_001e: add + IL_001f: stloc.1 + IL_0020: ldloc.1 + IL_0021: ldc.i4.s 10 + IL_0023: conv.i8 + IL_0024: blt.un.s IL_0008 - IL_0022: ldloca.s V_0 - IL_0024: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0029: ret + IL_0026: ldloca.s V_0 + IL_0028: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_002d: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f8() cil managed @@ -1120,37 +1206,40 @@ .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, uint64 V_1, int32 V_2, - int32 V_3) + int32 V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4) IL_0000: ldc.i4.0 IL_0001: conv.i8 IL_0002: stloc.1 IL_0003: ldc.i4.s 10 IL_0005: stloc.2 - IL_0006: br.s IL_001d + IL_0006: br.s IL_0021 IL_0008: ldloca.s V_0 IL_000a: ldloc.2 IL_000b: stloc.3 - IL_000c: ldloc.3 - IL_000d: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0012: nop - IL_0013: ldloc.2 - IL_0014: ldc.i4.s -2 - IL_0016: add - IL_0017: stloc.2 - IL_0018: ldloc.1 - IL_0019: ldc.i4.1 - IL_001a: conv.i8 - IL_001b: add - IL_001c: stloc.1 - IL_001d: ldloc.1 - IL_001e: ldc.i4.5 - IL_001f: conv.i8 - IL_0020: blt.un.s IL_0008 - - IL_0022: ldloca.s V_0 - IL_0024: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0029: ret + IL_000c: stloc.s V_4 + IL_000e: ldloc.s V_4 + IL_0010: ldloc.3 + IL_0011: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0016: nop + IL_0017: ldloc.2 + IL_0018: ldc.i4.s -2 + IL_001a: add + IL_001b: stloc.2 + IL_001c: ldloc.1 + IL_001d: ldc.i4.1 + IL_001e: conv.i8 + IL_001f: add + IL_0020: stloc.1 + IL_0021: ldloc.1 + IL_0022: ldc.i4.5 + IL_0023: conv.i8 + IL_0024: blt.un.s IL_0008 + + IL_0026: ldloca.s V_0 + IL_0028: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_002d: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f9(int32 start) cil managed @@ -1161,7 +1250,8 @@ valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_1, uint64 V_2, int32 V_3, - int32 V_4) + int32 V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5) IL_0000: nop IL_0001: ldc.i4.s 10 IL_0003: ldarg.0 @@ -1186,30 +1276,32 @@ IL_0017: stloc.2 IL_0018: ldarg.0 IL_0019: stloc.3 - IL_001a: br.s IL_0032 + IL_001a: br.s IL_0036 IL_001c: ldloca.s V_1 IL_001e: ldloc.3 IL_001f: stloc.s V_4 - IL_0021: ldloc.s V_4 - IL_0023: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0028: nop - IL_0029: ldloc.3 - IL_002a: ldc.i4.1 - IL_002b: add - IL_002c: stloc.3 - IL_002d: ldloc.2 + IL_0021: stloc.s V_5 + IL_0023: ldloc.s V_5 + IL_0025: ldloc.s V_4 + IL_0027: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_002c: nop + IL_002d: ldloc.3 IL_002e: ldc.i4.1 - IL_002f: conv.i8 - IL_0030: add - IL_0031: stloc.2 - IL_0032: ldloc.2 - IL_0033: ldloc.0 - IL_0034: blt.un.s IL_001c + IL_002f: add + IL_0030: stloc.3 + IL_0031: ldloc.2 + IL_0032: ldc.i4.1 + IL_0033: conv.i8 + IL_0034: add + IL_0035: stloc.2 + IL_0036: ldloc.2 + IL_0037: ldloc.0 + IL_0038: blt.un.s IL_001c - IL_0036: ldloca.s V_1 - IL_0038: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_003d: ret + IL_003a: ldloca.s V_1 + IL_003c: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0041: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f10(int32 finish) cil managed @@ -1220,7 +1312,8 @@ valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_1, uint64 V_2, int32 V_3, - int32 V_4) + int32 V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldc.i4.1 @@ -1245,30 +1338,32 @@ IL_0015: stloc.2 IL_0016: ldc.i4.1 IL_0017: stloc.3 - IL_0018: br.s IL_0030 + IL_0018: br.s IL_0034 IL_001a: ldloca.s V_1 IL_001c: ldloc.3 IL_001d: stloc.s V_4 - IL_001f: ldloc.s V_4 - IL_0021: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0026: nop - IL_0027: ldloc.3 - IL_0028: ldc.i4.1 - IL_0029: add - IL_002a: stloc.3 - IL_002b: ldloc.2 + IL_001f: stloc.s V_5 + IL_0021: ldloc.s V_5 + IL_0023: ldloc.s V_4 + IL_0025: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_002a: nop + IL_002b: ldloc.3 IL_002c: ldc.i4.1 - IL_002d: conv.i8 - IL_002e: add - IL_002f: stloc.2 - IL_0030: ldloc.2 - IL_0031: ldloc.0 - IL_0032: blt.un.s IL_001a - - IL_0034: ldloca.s V_1 - IL_0036: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_003b: ret + IL_002d: add + IL_002e: stloc.3 + IL_002f: ldloc.2 + IL_0030: ldc.i4.1 + IL_0031: conv.i8 + IL_0032: add + IL_0033: stloc.2 + IL_0034: ldloc.2 + IL_0035: ldloc.0 + IL_0036: blt.un.s IL_001a + + IL_0038: ldloca.s V_1 + IL_003a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_003f: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f11(int32 start, int32 finish) cil managed @@ -1280,7 +1375,8 @@ valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_1, uint64 V_2, int32 V_3, - int32 V_4) + int32 V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5) IL_0000: nop IL_0001: ldarg.1 IL_0002: ldarg.0 @@ -1305,30 +1401,32 @@ IL_0015: stloc.2 IL_0016: ldarg.0 IL_0017: stloc.3 - IL_0018: br.s IL_0030 + IL_0018: br.s IL_0034 IL_001a: ldloca.s V_1 IL_001c: ldloc.3 IL_001d: stloc.s V_4 - IL_001f: ldloc.s V_4 - IL_0021: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0026: nop - IL_0027: ldloc.3 - IL_0028: ldc.i4.1 - IL_0029: add - IL_002a: stloc.3 - IL_002b: ldloc.2 + IL_001f: stloc.s V_5 + IL_0021: ldloc.s V_5 + IL_0023: ldloc.s V_4 + IL_0025: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_002a: nop + IL_002b: ldloc.3 IL_002c: ldc.i4.1 - IL_002d: conv.i8 - IL_002e: add - IL_002f: stloc.2 - IL_0030: ldloc.2 - IL_0031: ldloc.0 - IL_0032: blt.un.s IL_001a - - IL_0034: ldloca.s V_1 - IL_0036: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_003b: ret + IL_002d: add + IL_002e: stloc.3 + IL_002f: ldloc.2 + IL_0030: ldc.i4.1 + IL_0031: conv.i8 + IL_0032: add + IL_0033: stloc.2 + IL_0034: ldloc.2 + IL_0035: ldloc.0 + IL_0036: blt.un.s IL_001a + + IL_0038: ldloca.s V_1 + IL_003a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_003f: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f12(int32 start) cil managed @@ -1339,7 +1437,8 @@ valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_1, uint64 V_2, int32 V_3, - int32 V_4) + int32 V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5) IL_0000: nop IL_0001: ldc.i4.s 10 IL_0003: ldarg.0 @@ -1364,30 +1463,32 @@ IL_0017: stloc.2 IL_0018: ldarg.0 IL_0019: stloc.3 - IL_001a: br.s IL_0032 + IL_001a: br.s IL_0036 IL_001c: ldloca.s V_1 IL_001e: ldloc.3 IL_001f: stloc.s V_4 - IL_0021: ldloc.s V_4 - IL_0023: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0028: nop - IL_0029: ldloc.3 - IL_002a: ldc.i4.1 - IL_002b: add - IL_002c: stloc.3 - IL_002d: ldloc.2 + IL_0021: stloc.s V_5 + IL_0023: ldloc.s V_5 + IL_0025: ldloc.s V_4 + IL_0027: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_002c: nop + IL_002d: ldloc.3 IL_002e: ldc.i4.1 - IL_002f: conv.i8 - IL_0030: add - IL_0031: stloc.2 - IL_0032: ldloc.2 - IL_0033: ldloc.0 - IL_0034: blt.un.s IL_001c + IL_002f: add + IL_0030: stloc.3 + IL_0031: ldloc.2 + IL_0032: ldc.i4.1 + IL_0033: conv.i8 + IL_0034: add + IL_0035: stloc.2 + IL_0036: ldloc.2 + IL_0037: ldloc.0 + IL_0038: blt.un.s IL_001c - IL_0036: ldloca.s V_1 - IL_0038: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_003d: ret + IL_003a: ldloca.s V_1 + IL_003c: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0041: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f13(int32 step) cil managed @@ -1398,7 +1499,8 @@ valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_1, uint64 V_2, int32 V_3, - int32 V_4) + int32 V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5) IL_0000: nop IL_0001: ldarg.0 IL_0002: brtrue.s IL_0011 @@ -1469,30 +1571,32 @@ IL_004a: stloc.2 IL_004b: ldc.i4.1 IL_004c: stloc.3 - IL_004d: br.s IL_0065 + IL_004d: br.s IL_0069 IL_004f: ldloca.s V_1 IL_0051: ldloc.3 IL_0052: stloc.s V_4 - IL_0054: ldloc.s V_4 - IL_0056: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_005b: nop - IL_005c: ldloc.3 - IL_005d: ldarg.0 - IL_005e: add - IL_005f: stloc.3 - IL_0060: ldloc.2 - IL_0061: ldc.i4.1 - IL_0062: conv.i8 - IL_0063: add - IL_0064: stloc.2 - IL_0065: ldloc.2 - IL_0066: ldloc.0 - IL_0067: blt.un.s IL_004f - - IL_0069: ldloca.s V_1 - IL_006b: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0070: ret + IL_0054: stloc.s V_5 + IL_0056: ldloc.s V_5 + IL_0058: ldloc.s V_4 + IL_005a: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_005f: nop + IL_0060: ldloc.3 + IL_0061: ldarg.0 + IL_0062: add + IL_0063: stloc.3 + IL_0064: ldloc.2 + IL_0065: ldc.i4.1 + IL_0066: conv.i8 + IL_0067: add + IL_0068: stloc.2 + IL_0069: ldloc.2 + IL_006a: ldloc.0 + IL_006b: blt.un.s IL_004f + + IL_006d: ldloca.s V_1 + IL_006f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0074: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f14(int32 finish) cil managed @@ -1503,7 +1607,8 @@ valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_1, uint64 V_2, int32 V_3, - int32 V_4) + int32 V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldc.i4.1 @@ -1528,30 +1633,32 @@ IL_0015: stloc.2 IL_0016: ldc.i4.1 IL_0017: stloc.3 - IL_0018: br.s IL_0030 + IL_0018: br.s IL_0034 IL_001a: ldloca.s V_1 IL_001c: ldloc.3 IL_001d: stloc.s V_4 - IL_001f: ldloc.s V_4 - IL_0021: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0026: nop - IL_0027: ldloc.3 - IL_0028: ldc.i4.1 - IL_0029: add - IL_002a: stloc.3 - IL_002b: ldloc.2 + IL_001f: stloc.s V_5 + IL_0021: ldloc.s V_5 + IL_0023: ldloc.s V_4 + IL_0025: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_002a: nop + IL_002b: ldloc.3 IL_002c: ldc.i4.1 - IL_002d: conv.i8 - IL_002e: add - IL_002f: stloc.2 - IL_0030: ldloc.2 - IL_0031: ldloc.0 - IL_0032: blt.un.s IL_001a - - IL_0034: ldloca.s V_1 - IL_0036: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_003b: ret + IL_002d: add + IL_002e: stloc.3 + IL_002f: ldloc.2 + IL_0030: ldc.i4.1 + IL_0031: conv.i8 + IL_0032: add + IL_0033: stloc.2 + IL_0034: ldloc.2 + IL_0035: ldloc.0 + IL_0036: blt.un.s IL_001a + + IL_0038: ldloca.s V_1 + IL_003a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_003f: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f15(int32 start, int32 step) cil managed @@ -1563,7 +1670,8 @@ valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_1, uint64 V_2, int32 V_3, - int32 V_4) + int32 V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5) IL_0000: nop IL_0001: ldarg.1 IL_0002: brtrue.s IL_0011 @@ -1634,30 +1742,32 @@ IL_004a: stloc.2 IL_004b: ldarg.0 IL_004c: stloc.3 - IL_004d: br.s IL_0065 + IL_004d: br.s IL_0069 IL_004f: ldloca.s V_1 IL_0051: ldloc.3 IL_0052: stloc.s V_4 - IL_0054: ldloc.s V_4 - IL_0056: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_005b: nop - IL_005c: ldloc.3 - IL_005d: ldarg.1 - IL_005e: add - IL_005f: stloc.3 - IL_0060: ldloc.2 - IL_0061: ldc.i4.1 - IL_0062: conv.i8 - IL_0063: add - IL_0064: stloc.2 - IL_0065: ldloc.2 - IL_0066: ldloc.0 - IL_0067: blt.un.s IL_004f - - IL_0069: ldloca.s V_1 - IL_006b: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0070: ret + IL_0054: stloc.s V_5 + IL_0056: ldloc.s V_5 + IL_0058: ldloc.s V_4 + IL_005a: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_005f: nop + IL_0060: ldloc.3 + IL_0061: ldarg.1 + IL_0062: add + IL_0063: stloc.3 + IL_0064: ldloc.2 + IL_0065: ldc.i4.1 + IL_0066: conv.i8 + IL_0067: add + IL_0068: stloc.2 + IL_0069: ldloc.2 + IL_006a: ldloc.0 + IL_006b: blt.un.s IL_004f + + IL_006d: ldloca.s V_1 + IL_006f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0074: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f16(int32 start, int32 finish) cil managed @@ -1669,7 +1779,8 @@ valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_1, uint64 V_2, int32 V_3, - int32 V_4) + int32 V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5) IL_0000: nop IL_0001: ldarg.1 IL_0002: ldarg.0 @@ -1694,30 +1805,32 @@ IL_0015: stloc.2 IL_0016: ldarg.0 IL_0017: stloc.3 - IL_0018: br.s IL_0030 + IL_0018: br.s IL_0034 IL_001a: ldloca.s V_1 IL_001c: ldloc.3 IL_001d: stloc.s V_4 - IL_001f: ldloc.s V_4 - IL_0021: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0026: nop - IL_0027: ldloc.3 - IL_0028: ldc.i4.1 - IL_0029: add - IL_002a: stloc.3 - IL_002b: ldloc.2 + IL_001f: stloc.s V_5 + IL_0021: ldloc.s V_5 + IL_0023: ldloc.s V_4 + IL_0025: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_002a: nop + IL_002b: ldloc.3 IL_002c: ldc.i4.1 - IL_002d: conv.i8 - IL_002e: add - IL_002f: stloc.2 - IL_0030: ldloc.2 - IL_0031: ldloc.0 - IL_0032: blt.un.s IL_001a - - IL_0034: ldloca.s V_1 - IL_0036: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_003b: ret + IL_002d: add + IL_002e: stloc.3 + IL_002f: ldloc.2 + IL_0030: ldc.i4.1 + IL_0031: conv.i8 + IL_0032: add + IL_0033: stloc.2 + IL_0034: ldloc.2 + IL_0035: ldloc.0 + IL_0036: blt.un.s IL_001a + + IL_0038: ldloca.s V_1 + IL_003a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_003f: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f17(int32 step, int32 finish) cil managed @@ -1729,7 +1842,8 @@ valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_1, uint64 V_2, int32 V_3, - int32 V_4) + int32 V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5) IL_0000: nop IL_0001: ldarg.0 IL_0002: brtrue.s IL_0010 @@ -1800,30 +1914,32 @@ IL_0045: stloc.2 IL_0046: ldc.i4.1 IL_0047: stloc.3 - IL_0048: br.s IL_0060 + IL_0048: br.s IL_0064 + + IL_004a: ldloca.s V_1 + IL_004c: ldloc.3 + IL_004d: stloc.s V_4 + IL_004f: stloc.s V_5 + IL_0051: ldloc.s V_5 + IL_0053: ldloc.s V_4 + IL_0055: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_005a: nop + IL_005b: ldloc.3 + IL_005c: ldarg.0 + IL_005d: add + IL_005e: stloc.3 + IL_005f: ldloc.2 + IL_0060: ldc.i4.1 + IL_0061: conv.i8 + IL_0062: add + IL_0063: stloc.2 + IL_0064: ldloc.2 + IL_0065: ldloc.0 + IL_0066: blt.un.s IL_004a - IL_004a: ldloca.s V_1 - IL_004c: ldloc.3 - IL_004d: stloc.s V_4 - IL_004f: ldloc.s V_4 - IL_0051: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0056: nop - IL_0057: ldloc.3 - IL_0058: ldarg.0 - IL_0059: add - IL_005a: stloc.3 - IL_005b: ldloc.2 - IL_005c: ldc.i4.1 - IL_005d: conv.i8 - IL_005e: add - IL_005f: stloc.2 - IL_0060: ldloc.2 - IL_0061: ldloc.0 - IL_0062: blt.un.s IL_004a - - IL_0064: ldloca.s V_1 - IL_0066: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_006b: ret + IL_0068: ldloca.s V_1 + IL_006a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_006f: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -1839,7 +1955,8 @@ valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_1, uint64 V_2, int32 V_3, - int32 V_4) + int32 V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5) IL_0000: nop IL_0001: ldarg.1 IL_0002: brtrue.s IL_0010 @@ -1910,30 +2027,32 @@ IL_0045: stloc.2 IL_0046: ldarg.0 IL_0047: stloc.3 - IL_0048: br.s IL_0060 + IL_0048: br.s IL_0064 IL_004a: ldloca.s V_1 IL_004c: ldloc.3 IL_004d: stloc.s V_4 - IL_004f: ldloc.s V_4 - IL_0051: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0056: nop - IL_0057: ldloc.3 - IL_0058: ldarg.1 - IL_0059: add - IL_005a: stloc.3 - IL_005b: ldloc.2 - IL_005c: ldc.i4.1 - IL_005d: conv.i8 - IL_005e: add - IL_005f: stloc.2 - IL_0060: ldloc.2 - IL_0061: ldloc.0 - IL_0062: blt.un.s IL_004a - - IL_0064: ldloca.s V_1 - IL_0066: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_006b: ret + IL_004f: stloc.s V_5 + IL_0051: ldloc.s V_5 + IL_0053: ldloc.s V_4 + IL_0055: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_005a: nop + IL_005b: ldloc.3 + IL_005c: ldarg.1 + IL_005d: add + IL_005e: stloc.3 + IL_005f: ldloc.2 + IL_0060: ldc.i4.1 + IL_0061: conv.i8 + IL_0062: add + IL_0063: stloc.2 + IL_0064: ldloc.2 + IL_0065: ldloc.0 + IL_0066: blt.un.s IL_004a + + IL_0068: ldloca.s V_1 + IL_006a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_006f: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f19(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed @@ -1945,7 +2064,8 @@ valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_2, uint64 V_3, int32 V_4, - int32 V_5) + int32 V_5, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_6) IL_0000: ldarg.0 IL_0001: ldnull IL_0002: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) @@ -1973,30 +2093,32 @@ IL_001e: stloc.3 IL_001f: ldloc.0 IL_0020: stloc.s V_4 - IL_0022: br.s IL_003d + IL_0022: br.s IL_0041 IL_0024: ldloca.s V_2 IL_0026: ldloc.s V_4 IL_0028: stloc.s V_5 - IL_002a: ldloc.s V_5 - IL_002c: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0031: nop - IL_0032: ldloc.s V_4 - IL_0034: ldc.i4.1 - IL_0035: add - IL_0036: stloc.s V_4 - IL_0038: ldloc.3 - IL_0039: ldc.i4.1 - IL_003a: conv.i8 - IL_003b: add - IL_003c: stloc.3 - IL_003d: ldloc.3 - IL_003e: ldloc.1 - IL_003f: blt.un.s IL_0024 - - IL_0041: ldloca.s V_2 - IL_0043: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0048: ret + IL_002a: stloc.s V_6 + IL_002c: ldloc.s V_6 + IL_002e: ldloc.s V_5 + IL_0030: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0035: nop + IL_0036: ldloc.s V_4 + IL_0038: ldc.i4.1 + IL_0039: add + IL_003a: stloc.s V_4 + IL_003c: ldloc.3 + IL_003d: ldc.i4.1 + IL_003e: conv.i8 + IL_003f: add + IL_0040: stloc.3 + IL_0041: ldloc.3 + IL_0042: ldloc.1 + IL_0043: blt.un.s IL_0024 + + IL_0045: ldloca.s V_2 + IL_0047: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_004c: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f20(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed @@ -2008,7 +2130,8 @@ valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_2, uint64 V_3, int32 V_4, - int32 V_5) + int32 V_5, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_6) IL_0000: ldarg.0 IL_0001: ldnull IL_0002: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) @@ -2036,30 +2159,32 @@ IL_001c: stloc.3 IL_001d: ldc.i4.1 IL_001e: stloc.s V_4 - IL_0020: br.s IL_003b + IL_0020: br.s IL_003f IL_0022: ldloca.s V_2 IL_0024: ldloc.s V_4 IL_0026: stloc.s V_5 - IL_0028: ldloc.s V_5 - IL_002a: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_002f: nop - IL_0030: ldloc.s V_4 - IL_0032: ldc.i4.1 - IL_0033: add - IL_0034: stloc.s V_4 - IL_0036: ldloc.3 - IL_0037: ldc.i4.1 - IL_0038: conv.i8 - IL_0039: add - IL_003a: stloc.3 - IL_003b: ldloc.3 - IL_003c: ldloc.1 - IL_003d: blt.un.s IL_0022 - - IL_003f: ldloca.s V_2 - IL_0041: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0046: ret + IL_0028: stloc.s V_6 + IL_002a: ldloc.s V_6 + IL_002c: ldloc.s V_5 + IL_002e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0033: nop + IL_0034: ldloc.s V_4 + IL_0036: ldc.i4.1 + IL_0037: add + IL_0038: stloc.s V_4 + IL_003a: ldloc.3 + IL_003b: ldc.i4.1 + IL_003c: conv.i8 + IL_003d: add + IL_003e: stloc.3 + IL_003f: ldloc.3 + IL_0040: ldloc.1 + IL_0041: blt.un.s IL_0022 + + IL_0043: ldloca.s V_2 + IL_0045: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_004a: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f21(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 g) cil managed @@ -2073,7 +2198,8 @@ valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_3, uint64 V_4, int32 V_5, - int32 V_6) + int32 V_6, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_7) IL_0000: ldarg.0 IL_0001: ldnull IL_0002: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) @@ -2105,30 +2231,32 @@ IL_0024: stloc.s V_4 IL_0026: ldloc.0 IL_0027: stloc.s V_5 - IL_0029: br.s IL_0046 + IL_0029: br.s IL_004a IL_002b: ldloca.s V_3 IL_002d: ldloc.s V_5 IL_002f: stloc.s V_6 - IL_0031: ldloc.s V_6 - IL_0033: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0038: nop - IL_0039: ldloc.s V_5 - IL_003b: ldc.i4.1 - IL_003c: add - IL_003d: stloc.s V_5 - IL_003f: ldloc.s V_4 - IL_0041: ldc.i4.1 - IL_0042: conv.i8 - IL_0043: add - IL_0044: stloc.s V_4 - IL_0046: ldloc.s V_4 - IL_0048: ldloc.2 - IL_0049: blt.un.s IL_002b - - IL_004b: ldloca.s V_3 - IL_004d: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0052: ret + IL_0031: stloc.s V_7 + IL_0033: ldloc.s V_7 + IL_0035: ldloc.s V_6 + IL_0037: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_003c: nop + IL_003d: ldloc.s V_5 + IL_003f: ldc.i4.1 + IL_0040: add + IL_0041: stloc.s V_5 + IL_0043: ldloc.s V_4 + IL_0045: ldc.i4.1 + IL_0046: conv.i8 + IL_0047: add + IL_0048: stloc.s V_4 + IL_004a: ldloc.s V_4 + IL_004c: ldloc.2 + IL_004d: blt.un.s IL_002b + + IL_004f: ldloca.s V_3 + IL_0051: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0056: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f22(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed @@ -2140,7 +2268,8 @@ valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_2, uint64 V_3, int32 V_4, - int32 V_5) + int32 V_5, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_6) IL_0000: ldarg.0 IL_0001: ldnull IL_0002: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) @@ -2168,30 +2297,32 @@ IL_001e: stloc.3 IL_001f: ldloc.0 IL_0020: stloc.s V_4 - IL_0022: br.s IL_003d + IL_0022: br.s IL_0041 IL_0024: ldloca.s V_2 IL_0026: ldloc.s V_4 IL_0028: stloc.s V_5 - IL_002a: ldloc.s V_5 - IL_002c: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0031: nop - IL_0032: ldloc.s V_4 - IL_0034: ldc.i4.1 - IL_0035: add - IL_0036: stloc.s V_4 - IL_0038: ldloc.3 - IL_0039: ldc.i4.1 - IL_003a: conv.i8 - IL_003b: add - IL_003c: stloc.3 - IL_003d: ldloc.3 - IL_003e: ldloc.1 - IL_003f: blt.un.s IL_0024 - - IL_0041: ldloca.s V_2 - IL_0043: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0048: ret + IL_002a: stloc.s V_6 + IL_002c: ldloc.s V_6 + IL_002e: ldloc.s V_5 + IL_0030: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0035: nop + IL_0036: ldloc.s V_4 + IL_0038: ldc.i4.1 + IL_0039: add + IL_003a: stloc.s V_4 + IL_003c: ldloc.3 + IL_003d: ldc.i4.1 + IL_003e: conv.i8 + IL_003f: add + IL_0040: stloc.3 + IL_0041: ldloc.3 + IL_0042: ldloc.1 + IL_0043: blt.un.s IL_0024 + + IL_0045: ldloca.s V_2 + IL_0047: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_004c: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f23(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed @@ -2203,7 +2334,8 @@ valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_2, uint64 V_3, int32 V_4, - int32 V_5) + int32 V_5, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_6) IL_0000: ldarg.0 IL_0001: ldnull IL_0002: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) @@ -2277,30 +2409,32 @@ IL_0051: stloc.3 IL_0052: ldc.i4.1 IL_0053: stloc.s V_4 - IL_0055: br.s IL_0070 + IL_0055: br.s IL_0074 IL_0057: ldloca.s V_2 IL_0059: ldloc.s V_4 IL_005b: stloc.s V_5 - IL_005d: ldloc.s V_5 - IL_005f: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0064: nop - IL_0065: ldloc.s V_4 - IL_0067: ldloc.0 - IL_0068: add - IL_0069: stloc.s V_4 - IL_006b: ldloc.3 - IL_006c: ldc.i4.1 - IL_006d: conv.i8 - IL_006e: add - IL_006f: stloc.3 - IL_0070: ldloc.3 - IL_0071: ldloc.1 - IL_0072: blt.un.s IL_0057 - - IL_0074: ldloca.s V_2 - IL_0076: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_007b: ret + IL_005d: stloc.s V_6 + IL_005f: ldloc.s V_6 + IL_0061: ldloc.s V_5 + IL_0063: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0068: nop + IL_0069: ldloc.s V_4 + IL_006b: ldloc.0 + IL_006c: add + IL_006d: stloc.s V_4 + IL_006f: ldloc.3 + IL_0070: ldc.i4.1 + IL_0071: conv.i8 + IL_0072: add + IL_0073: stloc.3 + IL_0074: ldloc.3 + IL_0075: ldloc.1 + IL_0076: blt.un.s IL_0057 + + IL_0078: ldloca.s V_2 + IL_007a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_007f: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f24(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) cil managed @@ -2312,7 +2446,8 @@ valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_2, uint64 V_3, int32 V_4, - int32 V_5) + int32 V_5, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_6) IL_0000: ldarg.0 IL_0001: ldnull IL_0002: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) @@ -2340,30 +2475,32 @@ IL_001c: stloc.3 IL_001d: ldc.i4.1 IL_001e: stloc.s V_4 - IL_0020: br.s IL_003b + IL_0020: br.s IL_003f IL_0022: ldloca.s V_2 IL_0024: ldloc.s V_4 IL_0026: stloc.s V_5 - IL_0028: ldloc.s V_5 - IL_002a: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_002f: nop - IL_0030: ldloc.s V_4 - IL_0032: ldc.i4.1 - IL_0033: add - IL_0034: stloc.s V_4 - IL_0036: ldloc.3 - IL_0037: ldc.i4.1 - IL_0038: conv.i8 - IL_0039: add - IL_003a: stloc.3 - IL_003b: ldloc.3 - IL_003c: ldloc.1 - IL_003d: blt.un.s IL_0022 - - IL_003f: ldloca.s V_2 - IL_0041: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0046: ret + IL_0028: stloc.s V_6 + IL_002a: ldloc.s V_6 + IL_002c: ldloc.s V_5 + IL_002e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0033: nop + IL_0034: ldloc.s V_4 + IL_0036: ldc.i4.1 + IL_0037: add + IL_0038: stloc.s V_4 + IL_003a: ldloc.3 + IL_003b: ldc.i4.1 + IL_003c: conv.i8 + IL_003d: add + IL_003e: stloc.3 + IL_003f: ldloc.3 + IL_0040: ldloc.1 + IL_0041: blt.un.s IL_0022 + + IL_0043: ldloca.s V_2 + IL_0045: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_004a: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -2382,7 +2519,8 @@ valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_4, uint64 V_5, int32 V_6, - int32 V_7) + int32 V_7, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_8) IL_0000: ldarg.0 IL_0001: ldnull IL_0002: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) @@ -2464,30 +2602,32 @@ IL_005c: stloc.s V_5 IL_005e: ldloc.0 IL_005f: stloc.s V_6 - IL_0061: br.s IL_007e + IL_0061: br.s IL_0082 IL_0063: ldloca.s V_4 IL_0065: ldloc.s V_6 IL_0067: stloc.s V_7 - IL_0069: ldloc.s V_7 - IL_006b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0070: nop - IL_0071: ldloc.s V_6 - IL_0073: ldloc.1 - IL_0074: add - IL_0075: stloc.s V_6 - IL_0077: ldloc.s V_5 - IL_0079: ldc.i4.1 - IL_007a: conv.i8 - IL_007b: add - IL_007c: stloc.s V_5 - IL_007e: ldloc.s V_5 - IL_0080: ldloc.3 - IL_0081: blt.un.s IL_0063 - - IL_0083: ldloca.s V_4 - IL_0085: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_008a: ret + IL_0069: stloc.s V_8 + IL_006b: ldloc.s V_8 + IL_006d: ldloc.s V_7 + IL_006f: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0074: nop + IL_0075: ldloc.s V_6 + IL_0077: ldloc.1 + IL_0078: add + IL_0079: stloc.s V_6 + IL_007b: ldloc.s V_5 + IL_007d: ldc.i4.1 + IL_007e: conv.i8 + IL_007f: add + IL_0080: stloc.s V_5 + IL_0082: ldloc.s V_5 + IL_0084: ldloc.3 + IL_0085: blt.un.s IL_0063 + + IL_0087: ldloca.s V_4 + IL_0089: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_008e: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> @@ -2503,7 +2643,8 @@ valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1> V_1, uint64 V_2, int32 V_3, - int32 V_4) + int32 V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1>& V_5) IL_0000: nop IL_0001: ldarg.1 IL_0002: brtrue.s IL_0010 @@ -2574,34 +2715,36 @@ IL_0045: stloc.2 IL_0046: ldarg.0 IL_0047: stloc.3 - IL_0048: br.s IL_0068 + IL_0048: br.s IL_006c IL_004a: ldloca.s V_1 IL_004c: ldloc.3 IL_004d: stloc.s V_4 - IL_004f: ldloc.s V_4 - IL_0051: ldloc.s V_4 - IL_0053: conv.r8 - IL_0054: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + IL_004f: stloc.s V_5 + IL_0051: ldloc.s V_5 + IL_0053: ldloc.s V_4 + IL_0055: ldloc.s V_4 + IL_0057: conv.r8 + IL_0058: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, !1) - IL_0059: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1>::Add(!0) - IL_005e: nop - IL_005f: ldloc.3 - IL_0060: ldarg.1 - IL_0061: add - IL_0062: stloc.3 - IL_0063: ldloc.2 - IL_0064: ldc.i4.1 - IL_0065: conv.i8 - IL_0066: add - IL_0067: stloc.2 - IL_0068: ldloc.2 - IL_0069: ldloc.0 - IL_006a: blt.un.s IL_004a - - IL_006c: ldloca.s V_1 - IL_006e: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1>::Close() - IL_0073: ret + IL_005d: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1>::Add(!0) + IL_0062: nop + IL_0063: ldloc.3 + IL_0064: ldarg.1 + IL_0065: add + IL_0066: stloc.3 + IL_0067: ldloc.2 + IL_0068: ldc.i4.1 + IL_0069: conv.i8 + IL_006a: add + IL_006b: stloc.2 + IL_006c: ldloc.2 + IL_006d: ldloc.0 + IL_006e: blt.un.s IL_004a + + IL_0070: ldloca.s V_1 + IL_0072: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1>::Close() + IL_0077: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> @@ -2617,7 +2760,8 @@ valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1> V_1, uint64 V_2, int32 V_3, - int32 V_4) + int32 V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1>& V_5) IL_0000: nop IL_0001: ldarg.1 IL_0002: brtrue.s IL_0010 @@ -2688,34 +2832,36 @@ IL_0045: stloc.2 IL_0046: ldarg.0 IL_0047: stloc.3 - IL_0048: br.s IL_0068 + IL_0048: br.s IL_006c IL_004a: ldloca.s V_1 IL_004c: ldloc.3 IL_004d: stloc.s V_4 - IL_004f: ldloc.s V_4 - IL_0051: ldloc.s V_4 - IL_0053: conv.r8 - IL_0054: newobj instance void valuetype [runtime]System.ValueTuple`2::.ctor(!0, + IL_004f: stloc.s V_5 + IL_0051: ldloc.s V_5 + IL_0053: ldloc.s V_4 + IL_0055: ldloc.s V_4 + IL_0057: conv.r8 + IL_0058: newobj instance void valuetype [runtime]System.ValueTuple`2::.ctor(!0, !1) - IL_0059: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1>::Add(!0) - IL_005e: nop - IL_005f: ldloc.3 - IL_0060: ldarg.1 - IL_0061: add - IL_0062: stloc.3 - IL_0063: ldloc.2 - IL_0064: ldc.i4.1 - IL_0065: conv.i8 - IL_0066: add - IL_0067: stloc.2 - IL_0068: ldloc.2 - IL_0069: ldloc.0 - IL_006a: blt.un.s IL_004a - - IL_006c: ldloca.s V_1 - IL_006e: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1>::Close() - IL_0073: ret + IL_005d: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1>::Add(!0) + IL_0062: nop + IL_0063: ldloc.3 + IL_0064: ldarg.1 + IL_0065: add + IL_0066: stloc.3 + IL_0067: ldloc.2 + IL_0068: ldc.i4.1 + IL_0069: conv.i8 + IL_006a: add + IL_006b: stloc.2 + IL_006c: ldloc.2 + IL_006d: ldloc.0 + IL_006e: blt.un.s IL_004a + + IL_0070: ldloca.s V_1 + IL_0072: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1>::Close() + IL_0077: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -2731,7 +2877,9 @@ valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_1, uint64 V_2, int32 V_3, - int32 V_4) + int32 V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_6) IL_0000: nop IL_0001: ldarg.1 IL_0002: brtrue.s IL_0010 @@ -2802,33 +2950,36 @@ IL_0045: stloc.2 IL_0046: ldarg.0 IL_0047: stloc.3 - IL_0048: br.s IL_0064 + IL_0048: br.s IL_006b IL_004a: ldloca.s V_1 IL_004c: ldloc.3 IL_004d: stloc.s V_4 - IL_004f: nop - IL_0050: ldloc.s V_4 - IL_0052: ldloc.s V_4 - IL_0054: mul - IL_0055: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_005a: nop - IL_005b: ldloc.3 - IL_005c: ldarg.1 - IL_005d: add - IL_005e: stloc.3 - IL_005f: ldloc.2 - IL_0060: ldc.i4.1 - IL_0061: conv.i8 - IL_0062: add - IL_0063: stloc.2 - IL_0064: ldloc.2 - IL_0065: ldloc.0 - IL_0066: blt.un.s IL_004a - - IL_0068: ldloca.s V_1 - IL_006a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_006f: ret + IL_004f: stloc.s V_5 + IL_0051: ldloc.s V_5 + IL_0053: stloc.s V_6 + IL_0055: ldloc.s V_6 + IL_0057: ldloc.s V_4 + IL_0059: ldloc.s V_4 + IL_005b: mul + IL_005c: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0061: nop + IL_0062: ldloc.3 + IL_0063: ldarg.1 + IL_0064: add + IL_0065: stloc.3 + IL_0066: ldloc.2 + IL_0067: ldc.i4.1 + IL_0068: conv.i8 + IL_0069: add + IL_006a: stloc.2 + IL_006b: ldloc.2 + IL_006c: ldloc.0 + IL_006d: blt.un.s IL_004a + + IL_006f: ldloca.s V_1 + IL_0071: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0076: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f29(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 g) cil managed @@ -2841,7 +2992,8 @@ valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_2, uint64 V_3, int32 V_4, - int32 V_5) + int32 V_5, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_6) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldnull @@ -2856,35 +3008,37 @@ IL_0013: stloc.3 IL_0014: ldc.i4.1 IL_0015: stloc.s V_4 - IL_0017: br.s IL_0036 + IL_0017: br.s IL_003a IL_0019: ldloca.s V_2 IL_001b: ldloc.s V_4 IL_001d: stloc.s V_5 - IL_001f: ldloc.s V_5 - IL_0021: ldloc.0 - IL_0022: add - IL_0023: ldloc.1 - IL_0024: add - IL_0025: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_002a: nop - IL_002b: ldloc.s V_4 - IL_002d: ldc.i4.2 - IL_002e: add - IL_002f: stloc.s V_4 - IL_0031: ldloc.3 - IL_0032: ldc.i4.1 - IL_0033: conv.i8 - IL_0034: add - IL_0035: stloc.3 - IL_0036: ldloc.3 - IL_0037: ldc.i4.5 - IL_0038: conv.i8 - IL_0039: blt.un.s IL_0019 - - IL_003b: ldloca.s V_2 - IL_003d: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0042: ret + IL_001f: stloc.s V_6 + IL_0021: ldloc.s V_6 + IL_0023: ldloc.s V_5 + IL_0025: ldloc.0 + IL_0026: add + IL_0027: ldloc.1 + IL_0028: add + IL_0029: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_002e: nop + IL_002f: ldloc.s V_4 + IL_0031: ldc.i4.2 + IL_0032: add + IL_0033: stloc.s V_4 + IL_0035: ldloc.3 + IL_0036: ldc.i4.1 + IL_0037: conv.i8 + IL_0038: add + IL_0039: stloc.3 + IL_003a: ldloc.3 + IL_003b: ldc.i4.5 + IL_003c: conv.i8 + IL_003d: blt.un.s IL_0019 + + IL_003f: ldloca.s V_2 + IL_0041: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0046: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f30(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 g) cil managed @@ -2896,7 +3050,8 @@ valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_1, uint64 V_2, int32 V_3, - int32 V_4) + int32 V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldnull @@ -2911,33 +3066,35 @@ IL_0013: stloc.2 IL_0014: ldc.i4.1 IL_0015: stloc.3 - IL_0016: br.s IL_0030 + IL_0016: br.s IL_0034 IL_0018: ldloca.s V_1 IL_001a: ldloc.3 IL_001b: stloc.s V_4 - IL_001d: ldloc.s V_4 - IL_001f: ldloc.0 - IL_0020: add - IL_0021: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0026: nop - IL_0027: ldloc.3 - IL_0028: ldc.i4.2 - IL_0029: add - IL_002a: stloc.3 - IL_002b: ldloc.2 - IL_002c: ldc.i4.1 - IL_002d: conv.i8 - IL_002e: add - IL_002f: stloc.2 - IL_0030: ldloc.2 - IL_0031: ldc.i4.5 - IL_0032: conv.i8 - IL_0033: blt.un.s IL_0018 - - IL_0035: ldloca.s V_1 - IL_0037: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_003c: ret + IL_001d: stloc.s V_5 + IL_001f: ldloc.s V_5 + IL_0021: ldloc.s V_4 + IL_0023: ldloc.0 + IL_0024: add + IL_0025: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_002a: nop + IL_002b: ldloc.3 + IL_002c: ldc.i4.2 + IL_002d: add + IL_002e: stloc.3 + IL_002f: ldloc.2 + IL_0030: ldc.i4.1 + IL_0031: conv.i8 + IL_0032: add + IL_0033: stloc.2 + IL_0034: ldloc.2 + IL_0035: ldc.i4.5 + IL_0036: conv.i8 + IL_0037: blt.un.s IL_0018 + + IL_0039: ldloca.s V_1 + IL_003b: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0040: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f31(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 g) cil managed @@ -2948,7 +3105,8 @@ .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, uint64 V_1, int32 V_2, - int32 V_3) + int32 V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldnull @@ -2963,31 +3121,33 @@ IL_0013: stloc.1 IL_0014: ldc.i4.1 IL_0015: stloc.2 - IL_0016: br.s IL_002c + IL_0016: br.s IL_0030 IL_0018: ldloca.s V_0 IL_001a: ldloc.2 IL_001b: stloc.3 - IL_001c: ldloc.3 - IL_001d: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0022: nop - IL_0023: ldloc.2 - IL_0024: ldc.i4.2 - IL_0025: add - IL_0026: stloc.2 - IL_0027: ldloc.1 - IL_0028: ldc.i4.1 - IL_0029: conv.i8 - IL_002a: add - IL_002b: stloc.1 - IL_002c: ldloc.1 - IL_002d: ldc.i4.5 - IL_002e: conv.i8 - IL_002f: blt.un.s IL_0018 + IL_001c: stloc.s V_4 + IL_001e: ldloc.s V_4 + IL_0020: ldloc.3 + IL_0021: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0026: nop + IL_0027: ldloc.2 + IL_0028: ldc.i4.2 + IL_0029: add + IL_002a: stloc.2 + IL_002b: ldloc.1 + IL_002c: ldc.i4.1 + IL_002d: conv.i8 + IL_002e: add + IL_002f: stloc.1 + IL_0030: ldloc.1 + IL_0031: ldc.i4.5 + IL_0032: conv.i8 + IL_0033: blt.un.s IL_0018 - IL_0031: ldloca.s V_0 - IL_0033: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0038: ret + IL_0035: ldloca.s V_0 + IL_0037: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_003c: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f32(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 g) cil managed @@ -2999,7 +3159,8 @@ valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_1, uint64 V_2, int32 V_3, - int32 V_4) + int32 V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldnull @@ -3014,33 +3175,35 @@ IL_0013: stloc.2 IL_0014: ldc.i4.1 IL_0015: stloc.3 - IL_0016: br.s IL_0030 + IL_0016: br.s IL_0034 IL_0018: ldloca.s V_1 IL_001a: ldloc.3 IL_001b: stloc.s V_4 - IL_001d: ldloc.s V_4 - IL_001f: ldloc.0 - IL_0020: add - IL_0021: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0026: nop - IL_0027: ldloc.3 - IL_0028: ldc.i4.2 - IL_0029: add - IL_002a: stloc.3 - IL_002b: ldloc.2 - IL_002c: ldc.i4.1 - IL_002d: conv.i8 - IL_002e: add - IL_002f: stloc.2 - IL_0030: ldloc.2 - IL_0031: ldc.i4.5 - IL_0032: conv.i8 - IL_0033: blt.un.s IL_0018 - - IL_0035: ldloca.s V_1 - IL_0037: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_003c: ret + IL_001d: stloc.s V_5 + IL_001f: ldloc.s V_5 + IL_0021: ldloc.s V_4 + IL_0023: ldloc.0 + IL_0024: add + IL_0025: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_002a: nop + IL_002b: ldloc.3 + IL_002c: ldc.i4.2 + IL_002d: add + IL_002e: stloc.3 + IL_002f: ldloc.2 + IL_0030: ldc.i4.1 + IL_0031: conv.i8 + IL_0032: add + IL_0033: stloc.2 + IL_0034: ldloc.2 + IL_0035: ldc.i4.5 + IL_0036: conv.i8 + IL_0037: blt.un.s IL_0018 + + IL_0039: ldloca.s V_1 + IL_003b: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0040: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -3056,7 +3219,8 @@ valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_1, uint64 V_2, int32 V_3, - int32 V_4) + int32 V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5) IL_0000: nop IL_0001: ldarg.1 IL_0002: ldarg.0 @@ -3081,35 +3245,37 @@ IL_0015: stloc.2 IL_0016: ldarg.0 IL_0017: stloc.3 - IL_0018: br.s IL_003e + IL_0018: br.s IL_0042 IL_001a: ldloca.s V_1 IL_001c: ldloc.3 IL_001d: stloc.s V_4 - IL_001f: ldsfld class assembly/f33@47 assembly/f33@47::@_instance - IL_0024: ldsfld class assembly/'f33@47-1' assembly/'f33@47-1'::@_instance - IL_0029: ldnull - IL_002a: call !!0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::InvokeFast(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, + IL_001f: stloc.s V_5 + IL_0021: ldloc.s V_5 + IL_0023: ldsfld class assembly/f33@47 assembly/f33@47::@_instance + IL_0028: ldsfld class assembly/'f33@47-1' assembly/'f33@47-1'::@_instance + IL_002d: ldnull + IL_002e: call !!0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::InvokeFast(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, !0, !1) - IL_002f: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0034: nop - IL_0035: ldloc.3 - IL_0036: ldc.i4.1 - IL_0037: add - IL_0038: stloc.3 - IL_0039: ldloc.2 + IL_0033: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0038: nop + IL_0039: ldloc.3 IL_003a: ldc.i4.1 - IL_003b: conv.i8 - IL_003c: add - IL_003d: stloc.2 - IL_003e: ldloc.2 - IL_003f: ldloc.0 - IL_0040: blt.un.s IL_001a - - IL_0042: ldloca.s V_1 - IL_0044: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0049: ret + IL_003b: add + IL_003c: stloc.3 + IL_003d: ldloc.2 + IL_003e: ldc.i4.1 + IL_003f: conv.i8 + IL_0040: add + IL_0041: stloc.2 + IL_0042: ldloc.2 + IL_0043: ldloc.0 + IL_0044: blt.un.s IL_001a + + IL_0046: ldloca.s V_1 + IL_0048: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_004d: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -3128,7 +3294,9 @@ uint64 V_4, int64 V_5, int64 V_6, - uint64 V_7) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_7, + uint64 V_8, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_9) IL_0000: nop IL_0001: ldarg.1 IL_0002: ldarg.0 @@ -3150,7 +3318,7 @@ IL_0012: ceq IL_0014: stloc.1 IL_0015: ldloc.1 - IL_0016: brfalse.s IL_005a + IL_0016: brfalse.s IL_005e IL_0018: ldc.i4.1 IL_0019: stloc.3 @@ -3159,93 +3327,97 @@ IL_001c: stloc.s V_4 IL_001e: ldarg.0 IL_001f: stloc.s V_5 - IL_0021: br.s IL_0054 + IL_0021: br.s IL_0058 IL_0023: ldloca.s V_2 IL_0025: ldloc.s V_5 IL_0027: stloc.s V_6 - IL_0029: ldsfld class assembly/f34@48 assembly/f34@48::@_instance - IL_002e: ldsfld class assembly/'f34@48-1' assembly/'f34@48-1'::@_instance - IL_0033: ldnull - IL_0034: call !!0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::InvokeFast(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, + IL_0029: stloc.s V_7 + IL_002b: ldloc.s V_7 + IL_002d: ldsfld class assembly/f34@48 assembly/f34@48::@_instance + IL_0032: ldsfld class assembly/'f34@48-1' assembly/'f34@48-1'::@_instance + IL_0037: ldnull + IL_0038: call !!0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::InvokeFast(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, !0, !1) - IL_0039: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_003e: nop - IL_003f: ldloc.s V_5 - IL_0041: ldc.i4.1 - IL_0042: conv.i8 - IL_0043: add - IL_0044: stloc.s V_5 - IL_0046: ldloc.s V_4 - IL_0048: ldc.i4.1 - IL_0049: conv.i8 - IL_004a: add - IL_004b: stloc.s V_4 - IL_004d: ldloc.s V_4 - IL_004f: ldc.i4.0 - IL_0050: conv.i8 - IL_0051: cgt.un - IL_0053: stloc.3 - IL_0054: ldloc.3 - IL_0055: brtrue.s IL_0023 - - IL_0057: nop - IL_0058: br.s IL_00a6 + IL_003d: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0042: nop + IL_0043: ldloc.s V_5 + IL_0045: ldc.i4.1 + IL_0046: conv.i8 + IL_0047: add + IL_0048: stloc.s V_5 + IL_004a: ldloc.s V_4 + IL_004c: ldc.i4.1 + IL_004d: conv.i8 + IL_004e: add + IL_004f: stloc.s V_4 + IL_0051: ldloc.s V_4 + IL_0053: ldc.i4.0 + IL_0054: conv.i8 + IL_0055: cgt.un + IL_0057: stloc.3 + IL_0058: ldloc.3 + IL_0059: brtrue.s IL_0023 - IL_005a: ldarg.1 - IL_005b: ldarg.0 - IL_005c: bge.s IL_0063 + IL_005b: nop + IL_005c: br.s IL_00ae - IL_005e: ldc.i4.0 - IL_005f: conv.i8 - IL_0060: nop - IL_0061: br.s IL_006a + IL_005e: ldarg.1 + IL_005f: ldarg.0 + IL_0060: bge.s IL_0067 - IL_0063: ldarg.1 - IL_0064: ldarg.0 - IL_0065: sub - IL_0066: ldc.i4.1 - IL_0067: conv.i8 - IL_0068: add.ovf.un - IL_0069: nop - IL_006a: stloc.s V_4 - IL_006c: ldc.i4.0 - IL_006d: conv.i8 - IL_006e: stloc.s V_7 - IL_0070: ldarg.0 - IL_0071: stloc.s V_5 - IL_0073: br.s IL_009f - - IL_0075: ldloca.s V_2 - IL_0077: ldloc.s V_5 - IL_0079: stloc.s V_6 - IL_007b: ldsfld class assembly/'f34@48-2' assembly/'f34@48-2'::@_instance - IL_0080: ldsfld class assembly/'f34@48-3' assembly/'f34@48-3'::@_instance - IL_0085: ldnull - IL_0086: call !!0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::InvokeFast(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, + IL_0062: ldc.i4.0 + IL_0063: conv.i8 + IL_0064: nop + IL_0065: br.s IL_006e + + IL_0067: ldarg.1 + IL_0068: ldarg.0 + IL_0069: sub + IL_006a: ldc.i4.1 + IL_006b: conv.i8 + IL_006c: add.ovf.un + IL_006d: nop + IL_006e: stloc.s V_4 + IL_0070: ldc.i4.0 + IL_0071: conv.i8 + IL_0072: stloc.s V_8 + IL_0074: ldarg.0 + IL_0075: stloc.s V_5 + IL_0077: br.s IL_00a7 + + IL_0079: ldloca.s V_2 + IL_007b: ldloc.s V_5 + IL_007d: stloc.s V_6 + IL_007f: stloc.s V_9 + IL_0081: ldloc.s V_9 + IL_0083: ldsfld class assembly/'f34@48-2' assembly/'f34@48-2'::@_instance + IL_0088: ldsfld class assembly/'f34@48-3' assembly/'f34@48-3'::@_instance + IL_008d: ldnull + IL_008e: call !!0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::InvokeFast(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, !0, !1) - IL_008b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0090: nop - IL_0091: ldloc.s V_5 - IL_0093: ldc.i4.1 - IL_0094: conv.i8 - IL_0095: add - IL_0096: stloc.s V_5 - IL_0098: ldloc.s V_7 - IL_009a: ldc.i4.1 - IL_009b: conv.i8 - IL_009c: add - IL_009d: stloc.s V_7 - IL_009f: ldloc.s V_7 - IL_00a1: ldloc.s V_4 - IL_00a3: blt.un.s IL_0075 - - IL_00a5: nop - IL_00a6: ldloca.s V_2 - IL_00a8: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_00ad: ret + IL_0093: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0098: nop + IL_0099: ldloc.s V_5 + IL_009b: ldc.i4.1 + IL_009c: conv.i8 + IL_009d: add + IL_009e: stloc.s V_5 + IL_00a0: ldloc.s V_8 + IL_00a2: ldc.i4.1 + IL_00a3: conv.i8 + IL_00a4: add + IL_00a5: stloc.s V_8 + IL_00a7: ldloc.s V_8 + IL_00a9: ldloc.s V_4 + IL_00ab: blt.un.s IL_0079 + + IL_00ad: nop + IL_00ae: ldloca.s V_2 + IL_00b0: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_00b5: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -3264,7 +3436,9 @@ uint64 V_4, uint64 V_5, uint64 V_6, - uint64 V_7) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_7, + uint64 V_8, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_9) IL_0000: nop IL_0001: ldarg.1 IL_0002: ldarg.0 @@ -3286,7 +3460,7 @@ IL_0012: ceq IL_0014: stloc.1 IL_0015: ldloc.1 - IL_0016: brfalse.s IL_005a + IL_0016: brfalse.s IL_005e IL_0018: ldc.i4.1 IL_0019: stloc.3 @@ -3295,93 +3469,97 @@ IL_001c: stloc.s V_4 IL_001e: ldarg.0 IL_001f: stloc.s V_5 - IL_0021: br.s IL_0054 + IL_0021: br.s IL_0058 IL_0023: ldloca.s V_2 IL_0025: ldloc.s V_5 IL_0027: stloc.s V_6 - IL_0029: ldsfld class assembly/f35@49 assembly/f35@49::@_instance - IL_002e: ldsfld class assembly/'f35@49-1' assembly/'f35@49-1'::@_instance - IL_0033: ldnull - IL_0034: call !!0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::InvokeFast(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, + IL_0029: stloc.s V_7 + IL_002b: ldloc.s V_7 + IL_002d: ldsfld class assembly/f35@49 assembly/f35@49::@_instance + IL_0032: ldsfld class assembly/'f35@49-1' assembly/'f35@49-1'::@_instance + IL_0037: ldnull + IL_0038: call !!0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::InvokeFast(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, !0, !1) - IL_0039: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_003e: nop - IL_003f: ldloc.s V_5 - IL_0041: ldc.i4.1 - IL_0042: conv.i8 - IL_0043: add - IL_0044: stloc.s V_5 - IL_0046: ldloc.s V_4 - IL_0048: ldc.i4.1 - IL_0049: conv.i8 - IL_004a: add - IL_004b: stloc.s V_4 - IL_004d: ldloc.s V_4 - IL_004f: ldc.i4.0 - IL_0050: conv.i8 - IL_0051: cgt.un - IL_0053: stloc.3 - IL_0054: ldloc.3 - IL_0055: brtrue.s IL_0023 - - IL_0057: nop - IL_0058: br.s IL_00a6 + IL_003d: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0042: nop + IL_0043: ldloc.s V_5 + IL_0045: ldc.i4.1 + IL_0046: conv.i8 + IL_0047: add + IL_0048: stloc.s V_5 + IL_004a: ldloc.s V_4 + IL_004c: ldc.i4.1 + IL_004d: conv.i8 + IL_004e: add + IL_004f: stloc.s V_4 + IL_0051: ldloc.s V_4 + IL_0053: ldc.i4.0 + IL_0054: conv.i8 + IL_0055: cgt.un + IL_0057: stloc.3 + IL_0058: ldloc.3 + IL_0059: brtrue.s IL_0023 - IL_005a: ldarg.1 - IL_005b: ldarg.0 - IL_005c: bge.un.s IL_0063 + IL_005b: nop + IL_005c: br.s IL_00ae - IL_005e: ldc.i4.0 - IL_005f: conv.i8 - IL_0060: nop - IL_0061: br.s IL_006a + IL_005e: ldarg.1 + IL_005f: ldarg.0 + IL_0060: bge.un.s IL_0067 - IL_0063: ldarg.1 - IL_0064: ldarg.0 - IL_0065: sub - IL_0066: ldc.i4.1 - IL_0067: conv.i8 - IL_0068: add.ovf.un - IL_0069: nop - IL_006a: stloc.s V_4 - IL_006c: ldc.i4.0 - IL_006d: conv.i8 - IL_006e: stloc.s V_5 - IL_0070: ldarg.0 - IL_0071: stloc.s V_6 - IL_0073: br.s IL_009f - - IL_0075: ldloca.s V_2 - IL_0077: ldloc.s V_6 - IL_0079: stloc.s V_7 - IL_007b: ldsfld class assembly/'f35@49-2' assembly/'f35@49-2'::@_instance - IL_0080: ldsfld class assembly/'f35@49-3' assembly/'f35@49-3'::@_instance - IL_0085: ldnull - IL_0086: call !!0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::InvokeFast(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, + IL_0062: ldc.i4.0 + IL_0063: conv.i8 + IL_0064: nop + IL_0065: br.s IL_006e + + IL_0067: ldarg.1 + IL_0068: ldarg.0 + IL_0069: sub + IL_006a: ldc.i4.1 + IL_006b: conv.i8 + IL_006c: add.ovf.un + IL_006d: nop + IL_006e: stloc.s V_4 + IL_0070: ldc.i4.0 + IL_0071: conv.i8 + IL_0072: stloc.s V_5 + IL_0074: ldarg.0 + IL_0075: stloc.s V_6 + IL_0077: br.s IL_00a7 + + IL_0079: ldloca.s V_2 + IL_007b: ldloc.s V_6 + IL_007d: stloc.s V_8 + IL_007f: stloc.s V_9 + IL_0081: ldloc.s V_9 + IL_0083: ldsfld class assembly/'f35@49-2' assembly/'f35@49-2'::@_instance + IL_0088: ldsfld class assembly/'f35@49-3' assembly/'f35@49-3'::@_instance + IL_008d: ldnull + IL_008e: call !!0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::InvokeFast(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, !0, !1) - IL_008b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0090: nop - IL_0091: ldloc.s V_6 - IL_0093: ldc.i4.1 - IL_0094: conv.i8 - IL_0095: add - IL_0096: stloc.s V_6 - IL_0098: ldloc.s V_5 - IL_009a: ldc.i4.1 - IL_009b: conv.i8 - IL_009c: add - IL_009d: stloc.s V_5 - IL_009f: ldloc.s V_5 - IL_00a1: ldloc.s V_4 - IL_00a3: blt.un.s IL_0075 - - IL_00a5: nop - IL_00a6: ldloca.s V_2 - IL_00a8: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_00ad: ret + IL_0093: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0098: nop + IL_0099: ldloc.s V_6 + IL_009b: ldc.i4.1 + IL_009c: conv.i8 + IL_009d: add + IL_009e: stloc.s V_6 + IL_00a0: ldloc.s V_5 + IL_00a2: ldc.i4.1 + IL_00a3: conv.i8 + IL_00a4: add + IL_00a5: stloc.s V_5 + IL_00a7: ldloc.s V_5 + IL_00a9: ldloc.s V_4 + IL_00ab: blt.un.s IL_0079 + + IL_00ad: nop + IL_00ae: ldloca.s V_2 + IL_00b0: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_00b5: ret } } @@ -3403,4 +3581,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInArray_ToArray.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInArray_ToArray.fs.il.bsl index 3c9ea5dce3d..6b454cf88db 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInArray_ToArray.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInArray_ToArray.fs.il.bsl @@ -210,7 +210,9 @@ .locals init (int32[] V_0, int32[] V_1, int32 V_2, - int32 V_3) + int32 V_3, + int32 V_4, + int32[] V_5) IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 @@ -220,7 +222,7 @@ IL_000a: stloc.1 IL_000b: ldc.i4.0 IL_000c: stloc.2 - IL_000d: br.s IL_001b + IL_000d: br.s IL_0023 IL_000f: ldloc.1 IL_0010: ldloc.2 @@ -228,20 +230,24 @@ IL_0012: ldloc.2 IL_0013: ldelem.i4 IL_0014: stloc.3 - IL_0015: ldloc.3 - IL_0016: stelem.i4 - IL_0017: ldloc.2 - IL_0018: ldc.i4.1 - IL_0019: add - IL_001a: stloc.2 - IL_001b: ldloc.2 - IL_001c: ldloc.1 - IL_001d: ldlen - IL_001e: conv.i4 - IL_001f: blt.s IL_000f - - IL_0021: ldloc.1 - IL_0022: ret + IL_0015: stloc.s V_4 + IL_0017: stloc.s V_5 + IL_0019: ldloc.s V_5 + IL_001b: ldloc.s V_4 + IL_001d: ldloc.3 + IL_001e: stelem.i4 + IL_001f: ldloc.2 + IL_0020: ldc.i4.1 + IL_0021: add + IL_0022: stloc.2 + IL_0023: ldloc.2 + IL_0024: ldloc.1 + IL_0025: ldlen + IL_0026: conv.i4 + IL_0027: blt.s IL_000f + + IL_0029: ldloc.1 + IL_002a: ret } .method public static int32[] f00(int32[] 'array') cil managed @@ -251,7 +257,9 @@ .locals init (int32[] V_0, int32[] V_1, int32 V_2, - int32 V_3) + int32 V_3, + int32 V_4, + int32[] V_5) IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 @@ -261,7 +269,7 @@ IL_000a: stloc.1 IL_000b: ldc.i4.0 IL_000c: stloc.2 - IL_000d: br.s IL_001b + IL_000d: br.s IL_0023 IL_000f: ldloc.1 IL_0010: ldloc.2 @@ -269,20 +277,24 @@ IL_0012: ldloc.2 IL_0013: ldelem.i4 IL_0014: stloc.3 - IL_0015: ldloc.3 - IL_0016: stelem.i4 - IL_0017: ldloc.2 - IL_0018: ldc.i4.1 - IL_0019: add - IL_001a: stloc.2 - IL_001b: ldloc.2 - IL_001c: ldloc.1 - IL_001d: ldlen - IL_001e: conv.i4 - IL_001f: blt.s IL_000f - - IL_0021: ldloc.1 - IL_0022: ret + IL_0015: stloc.s V_4 + IL_0017: stloc.s V_5 + IL_0019: ldloc.s V_5 + IL_001b: ldloc.s V_4 + IL_001d: ldloc.3 + IL_001e: stelem.i4 + IL_001f: ldloc.2 + IL_0020: ldc.i4.1 + IL_0021: add + IL_0022: stloc.2 + IL_0023: ldloc.2 + IL_0024: ldloc.1 + IL_0025: ldlen + IL_0026: conv.i4 + IL_0027: blt.s IL_000f + + IL_0029: ldloc.1 + IL_002a: ret } .method public static int32[] f000(int32[] 'array') cil managed @@ -292,7 +304,11 @@ .locals init (int32[] V_0, int32[] V_1, int32 V_2, - int32 V_3) + int32 V_3, + int32 V_4, + int32[] V_5, + int32 V_6, + int32[] V_7) IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 @@ -302,7 +318,7 @@ IL_000a: stloc.1 IL_000b: ldc.i4.0 IL_000c: stloc.2 - IL_000d: br.s IL_001c + IL_000d: br.s IL_002b IL_000f: ldloc.1 IL_0010: ldloc.2 @@ -310,21 +326,28 @@ IL_0012: ldloc.2 IL_0013: ldelem.i4 IL_0014: stloc.3 - IL_0015: nop - IL_0016: ldloc.3 - IL_0017: stelem.i4 - IL_0018: ldloc.2 - IL_0019: ldc.i4.1 - IL_001a: add - IL_001b: stloc.2 - IL_001c: ldloc.2 - IL_001d: ldloc.1 - IL_001e: ldlen - IL_001f: conv.i4 - IL_0020: blt.s IL_000f + IL_0015: stloc.s V_4 + IL_0017: stloc.s V_5 + IL_0019: ldloc.s V_5 + IL_001b: ldloc.s V_4 + IL_001d: stloc.s V_6 + IL_001f: stloc.s V_7 + IL_0021: ldloc.s V_7 + IL_0023: ldloc.s V_6 + IL_0025: ldloc.3 + IL_0026: stelem.i4 + IL_0027: ldloc.2 + IL_0028: ldc.i4.1 + IL_0029: add + IL_002a: stloc.2 + IL_002b: ldloc.2 + IL_002c: ldloc.1 + IL_002d: ldlen + IL_002e: conv.i4 + IL_002f: blt.s IL_000f - IL_0022: ldloc.1 - IL_0023: ret + IL_0031: ldloc.1 + IL_0032: ret } .method public static int32[] f0000(int32[] 'array') cil managed @@ -334,7 +357,11 @@ .locals init (int32[] V_0, int32[] V_1, int32 V_2, - int32 V_3) + int32 V_3, + int32 V_4, + int32[] V_5, + int32 V_6, + int32[] V_7) IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 @@ -344,7 +371,7 @@ IL_000a: stloc.1 IL_000b: ldc.i4.0 IL_000c: stloc.2 - IL_000d: br.s IL_001c + IL_000d: br.s IL_002b IL_000f: ldloc.1 IL_0010: ldloc.2 @@ -352,21 +379,28 @@ IL_0012: ldloc.2 IL_0013: ldelem.i4 IL_0014: stloc.3 - IL_0015: nop - IL_0016: ldloc.3 - IL_0017: stelem.i4 - IL_0018: ldloc.2 - IL_0019: ldc.i4.1 - IL_001a: add - IL_001b: stloc.2 - IL_001c: ldloc.2 - IL_001d: ldloc.1 - IL_001e: ldlen - IL_001f: conv.i4 - IL_0020: blt.s IL_000f + IL_0015: stloc.s V_4 + IL_0017: stloc.s V_5 + IL_0019: ldloc.s V_5 + IL_001b: ldloc.s V_4 + IL_001d: stloc.s V_6 + IL_001f: stloc.s V_7 + IL_0021: ldloc.s V_7 + IL_0023: ldloc.s V_6 + IL_0025: ldloc.3 + IL_0026: stelem.i4 + IL_0027: ldloc.2 + IL_0028: ldc.i4.1 + IL_0029: add + IL_002a: stloc.2 + IL_002b: ldloc.2 + IL_002c: ldloc.1 + IL_002d: ldlen + IL_002e: conv.i4 + IL_002f: blt.s IL_000f - IL_0022: ldloc.1 - IL_0023: ret + IL_0031: ldloc.1 + IL_0032: ret } .method public static int32[] f00000(int32[] 'array', @@ -382,7 +416,12 @@ int32 V_2, int32 V_3, int32 V_4, - int32 V_5) + int32 V_5, + int32[] V_6, + int32 V_7, + int32[] V_8, + int32 V_9, + int32[] V_10) IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 @@ -392,7 +431,7 @@ IL_000a: stloc.1 IL_000b: ldc.i4.0 IL_000c: stloc.2 - IL_000d: br.s IL_002b + IL_000d: br.s IL_0043 IL_000f: ldloc.1 IL_0010: ldloc.2 @@ -400,32 +439,44 @@ IL_0012: ldloc.2 IL_0013: ldelem.i4 IL_0014: stloc.3 - IL_0015: ldloc.3 - IL_0016: ldarg.1 - IL_0017: add - IL_0018: stloc.s V_4 - IL_001a: ldloc.3 - IL_001b: ldarg.2 - IL_001c: add - IL_001d: stloc.s V_5 - IL_001f: ldloc.3 - IL_0020: ldloc.s V_4 - IL_0022: add - IL_0023: ldloc.s V_5 - IL_0025: add - IL_0026: stelem.i4 - IL_0027: ldloc.2 - IL_0028: ldc.i4.1 - IL_0029: add - IL_002a: stloc.2 - IL_002b: ldloc.2 - IL_002c: ldloc.1 - IL_002d: ldlen - IL_002e: conv.i4 - IL_002f: blt.s IL_000f - - IL_0031: ldloc.1 - IL_0032: ret + IL_0015: stloc.s V_5 + IL_0017: stloc.s V_6 + IL_0019: ldloc.s V_6 + IL_001b: ldloc.s V_5 + IL_001d: ldloc.3 + IL_001e: ldarg.1 + IL_001f: add + IL_0020: stloc.s V_4 + IL_0022: stloc.s V_7 + IL_0024: stloc.s V_8 + IL_0026: ldloc.s V_8 + IL_0028: ldloc.s V_7 + IL_002a: ldloc.3 + IL_002b: ldarg.2 + IL_002c: add + IL_002d: stloc.s V_5 + IL_002f: stloc.s V_9 + IL_0031: stloc.s V_10 + IL_0033: ldloc.s V_10 + IL_0035: ldloc.s V_9 + IL_0037: ldloc.3 + IL_0038: ldloc.s V_4 + IL_003a: add + IL_003b: ldloc.s V_5 + IL_003d: add + IL_003e: stelem.i4 + IL_003f: ldloc.2 + IL_0040: ldc.i4.1 + IL_0041: add + IL_0042: stloc.2 + IL_0043: ldloc.2 + IL_0044: ldloc.1 + IL_0045: ldlen + IL_0046: conv.i4 + IL_0047: blt.s IL_000f + + IL_0049: ldloc.1 + IL_004a: ret } .method public static int32[] f000000(int32[] 'array', @@ -441,7 +492,12 @@ int32 V_2, int32 V_3, int32 V_4, - int32 V_5) + int32 V_5, + int32[] V_6, + int32 V_7, + int32[] V_8, + int32 V_9, + int32[] V_10) IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 @@ -451,7 +507,7 @@ IL_000a: stloc.1 IL_000b: ldc.i4.0 IL_000c: stloc.2 - IL_000d: br.s IL_002b + IL_000d: br.s IL_0043 IL_000f: ldloc.1 IL_0010: ldloc.2 @@ -459,32 +515,44 @@ IL_0012: ldloc.2 IL_0013: ldelem.i4 IL_0014: stloc.3 - IL_0015: ldloc.3 - IL_0016: ldarg.1 - IL_0017: add - IL_0018: stloc.s V_4 - IL_001a: ldloc.3 - IL_001b: ldarg.2 - IL_001c: add - IL_001d: stloc.s V_5 - IL_001f: ldloc.3 - IL_0020: ldloc.s V_4 - IL_0022: add - IL_0023: ldloc.s V_5 - IL_0025: add - IL_0026: stelem.i4 - IL_0027: ldloc.2 - IL_0028: ldc.i4.1 - IL_0029: add - IL_002a: stloc.2 - IL_002b: ldloc.2 - IL_002c: ldloc.1 - IL_002d: ldlen - IL_002e: conv.i4 - IL_002f: blt.s IL_000f - - IL_0031: ldloc.1 - IL_0032: ret + IL_0015: stloc.s V_5 + IL_0017: stloc.s V_6 + IL_0019: ldloc.s V_6 + IL_001b: ldloc.s V_5 + IL_001d: ldloc.3 + IL_001e: ldarg.1 + IL_001f: add + IL_0020: stloc.s V_4 + IL_0022: stloc.s V_7 + IL_0024: stloc.s V_8 + IL_0026: ldloc.s V_8 + IL_0028: ldloc.s V_7 + IL_002a: ldloc.3 + IL_002b: ldarg.2 + IL_002c: add + IL_002d: stloc.s V_5 + IL_002f: stloc.s V_9 + IL_0031: stloc.s V_10 + IL_0033: ldloc.s V_10 + IL_0035: ldloc.s V_9 + IL_0037: ldloc.3 + IL_0038: ldloc.s V_4 + IL_003a: add + IL_003b: ldloc.s V_5 + IL_003d: add + IL_003e: stelem.i4 + IL_003f: ldloc.2 + IL_0040: ldc.i4.1 + IL_0041: add + IL_0042: stloc.2 + IL_0043: ldloc.2 + IL_0044: ldloc.1 + IL_0045: ldlen + IL_0046: conv.i4 + IL_0047: blt.s IL_000f + + IL_0049: ldloc.1 + IL_004a: ret } .method public static int32[] f0000000(int32[] 'array', @@ -501,7 +569,13 @@ int32 V_2, int32 V_3, int32 V_4, - int32 V_5) + int32[] V_5, + int32 V_6, + int32[] V_7, + int32 V_8, + int32[] V_9, + int32 V_10, + int32[] V_11) IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 @@ -511,7 +585,7 @@ IL_000a: stloc.1 IL_000b: ldc.i4.0 IL_000c: stloc.2 - IL_000d: br.s IL_0033 + IL_000d: br.s IL_0053 IL_000f: ldloc.1 IL_0010: ldloc.2 @@ -519,36 +593,52 @@ IL_0012: ldloc.2 IL_0013: ldelem.i4 IL_0014: stloc.3 - IL_0015: ldarg.1 - IL_0016: ldnull - IL_0017: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001c: pop - IL_001d: ldloc.3 - IL_001e: ldarg.2 - IL_001f: add - IL_0020: stloc.s V_4 - IL_0022: ldloc.3 - IL_0023: ldarg.3 - IL_0024: add - IL_0025: stloc.s V_5 - IL_0027: ldloc.3 - IL_0028: ldloc.s V_4 - IL_002a: add - IL_002b: ldloc.s V_5 - IL_002d: add - IL_002e: stelem.i4 - IL_002f: ldloc.2 - IL_0030: ldc.i4.1 - IL_0031: add - IL_0032: stloc.2 - IL_0033: ldloc.2 - IL_0034: ldloc.1 - IL_0035: ldlen - IL_0036: conv.i4 - IL_0037: blt.s IL_000f - - IL_0039: ldloc.1 - IL_003a: ret + IL_0015: stloc.s V_4 + IL_0017: stloc.s V_5 + IL_0019: ldloc.s V_5 + IL_001b: ldloc.s V_4 + IL_001d: ldarg.1 + IL_001e: ldnull + IL_001f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0024: pop + IL_0025: stloc.s V_6 + IL_0027: stloc.s V_7 + IL_0029: ldloc.s V_7 + IL_002b: ldloc.s V_6 + IL_002d: ldloc.3 + IL_002e: ldarg.2 + IL_002f: add + IL_0030: stloc.s V_4 + IL_0032: stloc.s V_8 + IL_0034: stloc.s V_9 + IL_0036: ldloc.s V_9 + IL_0038: ldloc.s V_8 + IL_003a: ldloc.3 + IL_003b: ldarg.3 + IL_003c: add + IL_003d: stloc.s V_6 + IL_003f: stloc.s V_10 + IL_0041: stloc.s V_11 + IL_0043: ldloc.s V_11 + IL_0045: ldloc.s V_10 + IL_0047: ldloc.3 + IL_0048: ldloc.s V_4 + IL_004a: add + IL_004b: ldloc.s V_6 + IL_004d: add + IL_004e: stelem.i4 + IL_004f: ldloc.2 + IL_0050: ldc.i4.1 + IL_0051: add + IL_0052: stloc.2 + IL_0053: ldloc.2 + IL_0054: ldloc.1 + IL_0055: ldlen + IL_0056: conv.i4 + IL_0057: blt.s IL_000f + + IL_0059: ldloc.1 + IL_005a: ret } .method public static int32[] f00000000(int32[] 'array', @@ -565,7 +655,14 @@ int32 V_2, int32 V_3, int32 V_4, - int32 V_5) + int32 V_5, + int32[] V_6, + int32 V_7, + int32[] V_8, + int32 V_9, + int32[] V_10, + int32 V_11, + int32[] V_12) IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 @@ -575,7 +672,7 @@ IL_000a: stloc.1 IL_000b: ldc.i4.0 IL_000c: stloc.2 - IL_000d: br.s IL_0033 + IL_000d: br.s IL_0053 IL_000f: ldloc.1 IL_0010: ldloc.2 @@ -583,36 +680,52 @@ IL_0012: ldloc.2 IL_0013: ldelem.i4 IL_0014: stloc.3 - IL_0015: ldloc.3 - IL_0016: ldarg.2 - IL_0017: add - IL_0018: stloc.s V_4 - IL_001a: ldarg.1 - IL_001b: ldnull - IL_001c: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0021: pop - IL_0022: ldloc.3 - IL_0023: ldarg.3 - IL_0024: add - IL_0025: stloc.s V_5 - IL_0027: ldloc.3 - IL_0028: ldloc.s V_4 - IL_002a: add - IL_002b: ldloc.s V_5 - IL_002d: add - IL_002e: stelem.i4 - IL_002f: ldloc.2 - IL_0030: ldc.i4.1 - IL_0031: add - IL_0032: stloc.2 - IL_0033: ldloc.2 - IL_0034: ldloc.1 - IL_0035: ldlen - IL_0036: conv.i4 - IL_0037: blt.s IL_000f - - IL_0039: ldloc.1 - IL_003a: ret + IL_0015: stloc.s V_5 + IL_0017: stloc.s V_6 + IL_0019: ldloc.s V_6 + IL_001b: ldloc.s V_5 + IL_001d: ldloc.3 + IL_001e: ldarg.2 + IL_001f: add + IL_0020: stloc.s V_4 + IL_0022: stloc.s V_7 + IL_0024: stloc.s V_8 + IL_0026: ldloc.s V_8 + IL_0028: ldloc.s V_7 + IL_002a: ldarg.1 + IL_002b: ldnull + IL_002c: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0031: pop + IL_0032: stloc.s V_9 + IL_0034: stloc.s V_10 + IL_0036: ldloc.s V_10 + IL_0038: ldloc.s V_9 + IL_003a: ldloc.3 + IL_003b: ldarg.3 + IL_003c: add + IL_003d: stloc.s V_5 + IL_003f: stloc.s V_11 + IL_0041: stloc.s V_12 + IL_0043: ldloc.s V_12 + IL_0045: ldloc.s V_11 + IL_0047: ldloc.3 + IL_0048: ldloc.s V_4 + IL_004a: add + IL_004b: ldloc.s V_5 + IL_004d: add + IL_004e: stelem.i4 + IL_004f: ldloc.2 + IL_0050: ldc.i4.1 + IL_0051: add + IL_0052: stloc.2 + IL_0053: ldloc.2 + IL_0054: ldloc.1 + IL_0055: ldlen + IL_0056: conv.i4 + IL_0057: blt.s IL_000f + + IL_0059: ldloc.1 + IL_005a: ret } .method public static int32[] f000000000(int32[] 'array', @@ -629,7 +742,14 @@ int32 V_2, int32 V_3, int32 V_4, - int32 V_5) + int32 V_5, + int32[] V_6, + int32 V_7, + int32[] V_8, + int32 V_9, + int32[] V_10, + int32 V_11, + int32[] V_12) IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 @@ -639,7 +759,7 @@ IL_000a: stloc.1 IL_000b: ldc.i4.0 IL_000c: stloc.2 - IL_000d: br.s IL_0033 + IL_000d: br.s IL_0053 IL_000f: ldloc.1 IL_0010: ldloc.2 @@ -647,36 +767,52 @@ IL_0012: ldloc.2 IL_0013: ldelem.i4 IL_0014: stloc.3 - IL_0015: ldloc.3 - IL_0016: ldarg.2 - IL_0017: add - IL_0018: stloc.s V_4 - IL_001a: ldloc.3 - IL_001b: ldarg.3 - IL_001c: add - IL_001d: stloc.s V_5 - IL_001f: ldarg.1 - IL_0020: ldnull - IL_0021: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0026: pop - IL_0027: ldloc.3 - IL_0028: ldloc.s V_4 - IL_002a: add - IL_002b: ldloc.s V_5 - IL_002d: add - IL_002e: stelem.i4 - IL_002f: ldloc.2 - IL_0030: ldc.i4.1 - IL_0031: add - IL_0032: stloc.2 - IL_0033: ldloc.2 - IL_0034: ldloc.1 - IL_0035: ldlen - IL_0036: conv.i4 - IL_0037: blt.s IL_000f - - IL_0039: ldloc.1 - IL_003a: ret + IL_0015: stloc.s V_5 + IL_0017: stloc.s V_6 + IL_0019: ldloc.s V_6 + IL_001b: ldloc.s V_5 + IL_001d: ldloc.3 + IL_001e: ldarg.2 + IL_001f: add + IL_0020: stloc.s V_4 + IL_0022: stloc.s V_7 + IL_0024: stloc.s V_8 + IL_0026: ldloc.s V_8 + IL_0028: ldloc.s V_7 + IL_002a: ldloc.3 + IL_002b: ldarg.3 + IL_002c: add + IL_002d: stloc.s V_5 + IL_002f: stloc.s V_9 + IL_0031: stloc.s V_10 + IL_0033: ldloc.s V_10 + IL_0035: ldloc.s V_9 + IL_0037: ldarg.1 + IL_0038: ldnull + IL_0039: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_003e: pop + IL_003f: stloc.s V_11 + IL_0041: stloc.s V_12 + IL_0043: ldloc.s V_12 + IL_0045: ldloc.s V_11 + IL_0047: ldloc.3 + IL_0048: ldloc.s V_4 + IL_004a: add + IL_004b: ldloc.s V_5 + IL_004d: add + IL_004e: stelem.i4 + IL_004f: ldloc.2 + IL_0050: ldc.i4.1 + IL_0051: add + IL_0052: stloc.2 + IL_0053: ldloc.2 + IL_0054: ldloc.1 + IL_0055: ldlen + IL_0056: conv.i4 + IL_0057: blt.s IL_000f + + IL_0059: ldloc.1 + IL_005a: ret } .method public static int32[] f0000000000(int32[] 'array', @@ -694,14 +830,16 @@ int32 V_3, int32 V_4, int32 V_5, - class [runtime]System.IDisposable V_6) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_6, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_7, + class [runtime]System.IDisposable V_8) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_0039 + IL_0008: br.s IL_0041 IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() @@ -715,46 +853,50 @@ IL_0018: add IL_0019: stloc.s V_5 IL_001b: ldloca.s V_0 - IL_001d: ldarg.1 - IL_001e: ldnull - IL_001f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0024: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_0029: nop - IL_002a: ldloca.s V_0 - IL_002c: ldloc.3 - IL_002d: ldloc.s V_4 - IL_002f: add - IL_0030: ldloc.s V_5 - IL_0032: add - IL_0033: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_0038: nop - IL_0039: ldloc.1 - IL_003a: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_003f: brtrue.s IL_000a - - IL_0041: ldnull - IL_0042: stloc.2 - IL_0043: leave.s IL_005a + IL_001d: stloc.s V_6 + IL_001f: ldloc.s V_6 + IL_0021: ldarg.1 + IL_0022: ldnull + IL_0023: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0028: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_002d: nop + IL_002e: ldloca.s V_0 + IL_0030: stloc.s V_7 + IL_0032: ldloc.s V_7 + IL_0034: ldloc.3 + IL_0035: ldloc.s V_4 + IL_0037: add + IL_0038: ldloc.s V_5 + IL_003a: add + IL_003b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_0040: nop + IL_0041: ldloc.1 + IL_0042: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0047: brtrue.s IL_000a + + IL_0049: ldnull + IL_004a: stloc.2 + IL_004b: leave.s IL_0062 } finally { - IL_0045: ldloc.1 - IL_0046: isinst [runtime]System.IDisposable - IL_004b: stloc.s V_6 - IL_004d: ldloc.s V_6 - IL_004f: brfalse.s IL_0059 - - IL_0051: ldloc.s V_6 - IL_0053: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0058: endfinally - IL_0059: endfinally + IL_004d: ldloc.1 + IL_004e: isinst [runtime]System.IDisposable + IL_0053: stloc.s V_8 + IL_0055: ldloc.s V_8 + IL_0057: brfalse.s IL_0061 + + IL_0059: ldloc.s V_8 + IL_005b: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0060: endfinally + IL_0061: endfinally } - IL_005a: ldloc.2 - IL_005b: pop - IL_005c: ldloca.s V_0 - IL_005e: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0063: ret + IL_0062: ldloc.2 + IL_0063: pop + IL_0064: ldloca.s V_0 + IL_0066: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_006b: ret } .method public static int32[] f1(int32[] 'array') cil managed @@ -764,7 +906,9 @@ .locals init (int32[] V_0, int32[] V_1, int32 V_2, - int32 V_3) + int32 V_3, + int32 V_4, + int32[] V_5) IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 @@ -774,7 +918,7 @@ IL_000a: stloc.1 IL_000b: ldc.i4.0 IL_000c: stloc.2 - IL_000d: br.s IL_001b + IL_000d: br.s IL_0023 IL_000f: ldloc.1 IL_0010: ldloc.2 @@ -782,20 +926,24 @@ IL_0012: ldloc.2 IL_0013: ldelem.i4 IL_0014: stloc.3 - IL_0015: ldloc.3 - IL_0016: stelem.i4 - IL_0017: ldloc.2 - IL_0018: ldc.i4.1 - IL_0019: add - IL_001a: stloc.2 - IL_001b: ldloc.2 - IL_001c: ldloc.1 - IL_001d: ldlen - IL_001e: conv.i4 - IL_001f: blt.s IL_000f - - IL_0021: ldloc.1 - IL_0022: ret + IL_0015: stloc.s V_4 + IL_0017: stloc.s V_5 + IL_0019: ldloc.s V_5 + IL_001b: ldloc.s V_4 + IL_001d: ldloc.3 + IL_001e: stelem.i4 + IL_001f: ldloc.2 + IL_0020: ldc.i4.1 + IL_0021: add + IL_0022: stloc.2 + IL_0023: ldloc.2 + IL_0024: ldloc.1 + IL_0025: ldlen + IL_0026: conv.i4 + IL_0027: blt.s IL_000f + + IL_0029: ldloc.1 + IL_002a: ret } .method public static !!a[] f2(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -807,7 +955,9 @@ .locals init (int32[] V_0, !!a[] V_1, int32 V_2, - int32 V_3) + int32 V_3, + int32 V_4, + !!a[] V_5) IL_0000: ldarg.1 IL_0001: stloc.0 IL_0002: ldloc.0 @@ -817,7 +967,7 @@ IL_000a: stloc.1 IL_000b: ldc.i4.0 IL_000c: stloc.2 - IL_000d: br.s IL_0025 + IL_000d: br.s IL_002d IL_000f: ldloc.1 IL_0010: ldloc.2 @@ -825,22 +975,26 @@ IL_0012: ldloc.2 IL_0013: ldelem.i4 IL_0014: stloc.3 - IL_0015: ldarg.0 - IL_0016: ldloc.3 - IL_0017: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001c: stelem !!a - IL_0021: ldloc.2 - IL_0022: ldc.i4.1 - IL_0023: add - IL_0024: stloc.2 - IL_0025: ldloc.2 - IL_0026: ldloc.1 - IL_0027: ldlen - IL_0028: conv.i4 - IL_0029: blt.s IL_000f - - IL_002b: ldloc.1 - IL_002c: ret + IL_0015: stloc.s V_4 + IL_0017: stloc.s V_5 + IL_0019: ldloc.s V_5 + IL_001b: ldloc.s V_4 + IL_001d: ldarg.0 + IL_001e: ldloc.3 + IL_001f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0024: stelem !!a + IL_0029: ldloc.2 + IL_002a: ldc.i4.1 + IL_002b: add + IL_002c: stloc.2 + IL_002d: ldloc.2 + IL_002e: ldloc.1 + IL_002f: ldlen + IL_0030: conv.i4 + IL_0031: blt.s IL_000f + + IL_0033: ldloc.1 + IL_0034: ret } .method public static int32[] f3(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -852,7 +1006,11 @@ .locals init (int32[] V_0, int32[] V_1, int32 V_2, - int32 V_3) + int32 V_3, + int32 V_4, + int32[] V_5, + int32 V_6, + int32[] V_7) IL_0000: ldarg.1 IL_0001: stloc.0 IL_0002: ldloc.0 @@ -862,7 +1020,7 @@ IL_000a: stloc.1 IL_000b: ldc.i4.0 IL_000c: stloc.2 - IL_000d: br.s IL_0023 + IL_000d: br.s IL_0033 IL_000f: ldloc.1 IL_0010: ldloc.2 @@ -870,24 +1028,32 @@ IL_0012: ldloc.2 IL_0013: ldelem.i4 IL_0014: stloc.3 - IL_0015: ldarg.0 - IL_0016: ldnull - IL_0017: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001c: pop - IL_001d: ldloc.3 - IL_001e: stelem.i4 - IL_001f: ldloc.2 - IL_0020: ldc.i4.1 - IL_0021: add - IL_0022: stloc.2 - IL_0023: ldloc.2 - IL_0024: ldloc.1 - IL_0025: ldlen - IL_0026: conv.i4 - IL_0027: blt.s IL_000f + IL_0015: stloc.s V_4 + IL_0017: stloc.s V_5 + IL_0019: ldloc.s V_5 + IL_001b: ldloc.s V_4 + IL_001d: ldarg.0 + IL_001e: ldnull + IL_001f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0024: pop + IL_0025: stloc.s V_6 + IL_0027: stloc.s V_7 + IL_0029: ldloc.s V_7 + IL_002b: ldloc.s V_6 + IL_002d: ldloc.3 + IL_002e: stelem.i4 + IL_002f: ldloc.2 + IL_0030: ldc.i4.1 + IL_0031: add + IL_0032: stloc.2 + IL_0033: ldloc.2 + IL_0034: ldloc.1 + IL_0035: ldlen + IL_0036: conv.i4 + IL_0037: blt.s IL_000f - IL_0029: ldloc.1 - IL_002a: ret + IL_0039: ldloc.1 + IL_003a: ret } .method public static int32[] f4(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -901,7 +1067,13 @@ .locals init (int32[] V_0, int32[] V_1, int32 V_2, - int32 V_3) + int32 V_3, + int32 V_4, + int32[] V_5, + int32 V_6, + int32[] V_7, + int32 V_8, + int32[] V_9) IL_0000: ldarg.2 IL_0001: stloc.0 IL_0002: ldloc.0 @@ -911,7 +1083,7 @@ IL_000a: stloc.1 IL_000b: ldc.i4.0 IL_000c: stloc.2 - IL_000d: br.s IL_002b + IL_000d: br.s IL_0043 IL_000f: ldloc.1 IL_0010: ldloc.2 @@ -919,29 +1091,41 @@ IL_0012: ldloc.2 IL_0013: ldelem.i4 IL_0014: stloc.3 - IL_0015: ldarg.0 - IL_0016: ldnull - IL_0017: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001c: pop - IL_001d: ldarg.1 + IL_0015: stloc.s V_4 + IL_0017: stloc.s V_5 + IL_0019: ldloc.s V_5 + IL_001b: ldloc.s V_4 + IL_001d: ldarg.0 IL_001e: ldnull IL_001f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) IL_0024: pop - IL_0025: ldloc.3 - IL_0026: stelem.i4 - IL_0027: ldloc.2 - IL_0028: ldc.i4.1 - IL_0029: add - IL_002a: stloc.2 - IL_002b: ldloc.2 - IL_002c: ldloc.1 - IL_002d: ldlen - IL_002e: conv.i4 - IL_002f: blt.s IL_000f - - IL_0031: ldloc.1 - IL_0032: ret - } + IL_0025: stloc.s V_6 + IL_0027: stloc.s V_7 + IL_0029: ldloc.s V_7 + IL_002b: ldloc.s V_6 + IL_002d: ldarg.1 + IL_002e: ldnull + IL_002f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0034: pop + IL_0035: stloc.s V_8 + IL_0037: stloc.s V_9 + IL_0039: ldloc.s V_9 + IL_003b: ldloc.s V_8 + IL_003d: ldloc.3 + IL_003e: stelem.i4 + IL_003f: ldloc.2 + IL_0040: ldc.i4.1 + IL_0041: add + IL_0042: stloc.2 + IL_0043: ldloc.2 + IL_0044: ldloc.1 + IL_0045: ldlen + IL_0046: conv.i4 + IL_0047: blt.s IL_000f + + IL_0049: ldloc.1 + IL_004a: ret + } .method public static int32[] f5(int32[] 'array') cil managed { @@ -950,7 +1134,9 @@ .locals init (int32[] V_0, int32[] V_1, int32 V_2, - int32 V_3) + int32 V_3, + int32 V_4, + int32[] V_5) IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 @@ -960,7 +1146,7 @@ IL_000a: stloc.1 IL_000b: ldc.i4.0 IL_000c: stloc.2 - IL_000d: br.s IL_001b + IL_000d: br.s IL_0023 IL_000f: ldloc.1 IL_0010: ldloc.2 @@ -968,20 +1154,24 @@ IL_0012: ldloc.2 IL_0013: ldelem.i4 IL_0014: stloc.3 - IL_0015: ldloc.3 - IL_0016: stelem.i4 - IL_0017: ldloc.2 - IL_0018: ldc.i4.1 - IL_0019: add - IL_001a: stloc.2 - IL_001b: ldloc.2 - IL_001c: ldloc.1 - IL_001d: ldlen - IL_001e: conv.i4 - IL_001f: blt.s IL_000f - - IL_0021: ldloc.1 - IL_0022: ret + IL_0015: stloc.s V_4 + IL_0017: stloc.s V_5 + IL_0019: ldloc.s V_5 + IL_001b: ldloc.s V_4 + IL_001d: ldloc.3 + IL_001e: stelem.i4 + IL_001f: ldloc.2 + IL_0020: ldc.i4.1 + IL_0021: add + IL_0022: stloc.2 + IL_0023: ldloc.2 + IL_0024: ldloc.1 + IL_0025: ldlen + IL_0026: conv.i4 + IL_0027: blt.s IL_000f + + IL_0029: ldloc.1 + IL_002a: ret } .method public static int32[] f6(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -993,7 +1183,11 @@ .locals init (int32[] V_0, int32[] V_1, int32 V_2, - int32 V_3) + int32 V_3, + int32 V_4, + int32[] V_5, + int32 V_6, + int32[] V_7) IL_0000: ldarg.1 IL_0001: stloc.0 IL_0002: ldloc.0 @@ -1003,7 +1197,7 @@ IL_000a: stloc.1 IL_000b: ldc.i4.0 IL_000c: stloc.2 - IL_000d: br.s IL_0023 + IL_000d: br.s IL_0033 IL_000f: ldloc.1 IL_0010: ldloc.2 @@ -1011,24 +1205,32 @@ IL_0012: ldloc.2 IL_0013: ldelem.i4 IL_0014: stloc.3 - IL_0015: ldarg.0 - IL_0016: ldnull - IL_0017: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001c: pop - IL_001d: ldloc.3 - IL_001e: stelem.i4 - IL_001f: ldloc.2 - IL_0020: ldc.i4.1 - IL_0021: add - IL_0022: stloc.2 - IL_0023: ldloc.2 - IL_0024: ldloc.1 - IL_0025: ldlen - IL_0026: conv.i4 - IL_0027: blt.s IL_000f + IL_0015: stloc.s V_4 + IL_0017: stloc.s V_5 + IL_0019: ldloc.s V_5 + IL_001b: ldloc.s V_4 + IL_001d: ldarg.0 + IL_001e: ldnull + IL_001f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0024: pop + IL_0025: stloc.s V_6 + IL_0027: stloc.s V_7 + IL_0029: ldloc.s V_7 + IL_002b: ldloc.s V_6 + IL_002d: ldloc.3 + IL_002e: stelem.i4 + IL_002f: ldloc.2 + IL_0030: ldc.i4.1 + IL_0031: add + IL_0032: stloc.2 + IL_0033: ldloc.2 + IL_0034: ldloc.1 + IL_0035: ldlen + IL_0036: conv.i4 + IL_0037: blt.s IL_000f - IL_0029: ldloc.1 - IL_002a: ret + IL_0039: ldloc.1 + IL_003a: ret } .method public static int32[] f7(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -1042,7 +1244,13 @@ .locals init (int32[] V_0, int32[] V_1, int32 V_2, - int32 V_3) + int32 V_3, + int32 V_4, + int32[] V_5, + int32 V_6, + int32[] V_7, + int32 V_8, + int32[] V_9) IL_0000: ldarg.2 IL_0001: stloc.0 IL_0002: ldloc.0 @@ -1052,7 +1260,7 @@ IL_000a: stloc.1 IL_000b: ldc.i4.0 IL_000c: stloc.2 - IL_000d: br.s IL_002b + IL_000d: br.s IL_0043 IL_000f: ldloc.1 IL_0010: ldloc.2 @@ -1060,28 +1268,40 @@ IL_0012: ldloc.2 IL_0013: ldelem.i4 IL_0014: stloc.3 - IL_0015: ldarg.0 - IL_0016: ldnull - IL_0017: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001c: pop - IL_001d: ldarg.1 + IL_0015: stloc.s V_4 + IL_0017: stloc.s V_5 + IL_0019: ldloc.s V_5 + IL_001b: ldloc.s V_4 + IL_001d: ldarg.0 IL_001e: ldnull IL_001f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) IL_0024: pop - IL_0025: ldloc.3 - IL_0026: stelem.i4 - IL_0027: ldloc.2 - IL_0028: ldc.i4.1 - IL_0029: add - IL_002a: stloc.2 - IL_002b: ldloc.2 - IL_002c: ldloc.1 - IL_002d: ldlen - IL_002e: conv.i4 - IL_002f: blt.s IL_000f - - IL_0031: ldloc.1 - IL_0032: ret + IL_0025: stloc.s V_6 + IL_0027: stloc.s V_7 + IL_0029: ldloc.s V_7 + IL_002b: ldloc.s V_6 + IL_002d: ldarg.1 + IL_002e: ldnull + IL_002f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0034: pop + IL_0035: stloc.s V_8 + IL_0037: stloc.s V_9 + IL_0039: ldloc.s V_9 + IL_003b: ldloc.s V_8 + IL_003d: ldloc.3 + IL_003e: stelem.i4 + IL_003f: ldloc.2 + IL_0040: ldc.i4.1 + IL_0041: add + IL_0042: stloc.2 + IL_0043: ldloc.2 + IL_0044: ldloc.1 + IL_0045: ldlen + IL_0046: conv.i4 + IL_0047: blt.s IL_000f + + IL_0049: ldloc.1 + IL_004a: ret } .method public static int32[] f8(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -1097,7 +1317,9 @@ int32[] V_2, int32[] V_3, int32 V_4, - int32 V_5) + int32 V_5, + int32 V_6, + int32[] V_7) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldnull @@ -1116,7 +1338,7 @@ IL_001b: stloc.3 IL_001c: ldc.i4.0 IL_001d: stloc.s V_4 - IL_001f: br.s IL_0037 + IL_001f: br.s IL_003f IL_0021: ldloc.3 IL_0022: ldloc.s V_4 @@ -1124,24 +1346,28 @@ IL_0025: ldloc.s V_4 IL_0027: ldelem.i4 IL_0028: stloc.s V_5 - IL_002a: ldloc.s V_5 - IL_002c: ldloc.0 - IL_002d: add - IL_002e: ldloc.1 - IL_002f: add - IL_0030: stelem.i4 - IL_0031: ldloc.s V_4 - IL_0033: ldc.i4.1 - IL_0034: add - IL_0035: stloc.s V_4 - IL_0037: ldloc.s V_4 - IL_0039: ldloc.3 - IL_003a: ldlen - IL_003b: conv.i4 - IL_003c: blt.s IL_0021 - - IL_003e: ldloc.3 - IL_003f: ret + IL_002a: stloc.s V_6 + IL_002c: stloc.s V_7 + IL_002e: ldloc.s V_7 + IL_0030: ldloc.s V_6 + IL_0032: ldloc.s V_5 + IL_0034: ldloc.0 + IL_0035: add + IL_0036: ldloc.1 + IL_0037: add + IL_0038: stelem.i4 + IL_0039: ldloc.s V_4 + IL_003b: ldc.i4.1 + IL_003c: add + IL_003d: stloc.s V_4 + IL_003f: ldloc.s V_4 + IL_0041: ldloc.3 + IL_0042: ldlen + IL_0043: conv.i4 + IL_0044: blt.s IL_0021 + + IL_0046: ldloc.3 + IL_0047: ret } .method public static int32[] f9(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -1156,7 +1382,9 @@ int32[] V_1, int32[] V_2, int32 V_3, - int32 V_4) + int32 V_4, + int32 V_5, + int32[] V_6) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldnull @@ -1175,7 +1403,7 @@ IL_001b: stloc.2 IL_001c: ldc.i4.0 IL_001d: stloc.3 - IL_001e: br.s IL_0030 + IL_001e: br.s IL_0038 IL_0020: ldloc.2 IL_0021: ldloc.3 @@ -1183,22 +1411,26 @@ IL_0023: ldloc.3 IL_0024: ldelem.i4 IL_0025: stloc.s V_4 - IL_0027: ldloc.s V_4 - IL_0029: ldloc.0 - IL_002a: add - IL_002b: stelem.i4 - IL_002c: ldloc.3 - IL_002d: ldc.i4.1 - IL_002e: add - IL_002f: stloc.3 - IL_0030: ldloc.3 - IL_0031: ldloc.2 - IL_0032: ldlen - IL_0033: conv.i4 - IL_0034: blt.s IL_0020 - - IL_0036: ldloc.2 - IL_0037: ret + IL_0027: stloc.s V_5 + IL_0029: stloc.s V_6 + IL_002b: ldloc.s V_6 + IL_002d: ldloc.s V_5 + IL_002f: ldloc.s V_4 + IL_0031: ldloc.0 + IL_0032: add + IL_0033: stelem.i4 + IL_0034: ldloc.3 + IL_0035: ldc.i4.1 + IL_0036: add + IL_0037: stloc.3 + IL_0038: ldloc.3 + IL_0039: ldloc.2 + IL_003a: ldlen + IL_003b: conv.i4 + IL_003c: blt.s IL_0020 + + IL_003e: ldloc.2 + IL_003f: ret } .method public static int32[] f10(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -1212,7 +1444,9 @@ .locals init (int32[] V_0, int32[] V_1, int32 V_2, - int32 V_3) + int32 V_3, + int32 V_4, + int32[] V_5) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldnull @@ -1231,7 +1465,7 @@ IL_001b: stloc.1 IL_001c: ldc.i4.0 IL_001d: stloc.2 - IL_001e: br.s IL_002c + IL_001e: br.s IL_0034 IL_0020: ldloc.1 IL_0021: ldloc.2 @@ -1239,20 +1473,24 @@ IL_0023: ldloc.2 IL_0024: ldelem.i4 IL_0025: stloc.3 - IL_0026: ldloc.3 - IL_0027: stelem.i4 - IL_0028: ldloc.2 - IL_0029: ldc.i4.1 - IL_002a: add - IL_002b: stloc.2 - IL_002c: ldloc.2 - IL_002d: ldloc.1 - IL_002e: ldlen - IL_002f: conv.i4 - IL_0030: blt.s IL_0020 - - IL_0032: ldloc.1 - IL_0033: ret + IL_0026: stloc.s V_4 + IL_0028: stloc.s V_5 + IL_002a: ldloc.s V_5 + IL_002c: ldloc.s V_4 + IL_002e: ldloc.3 + IL_002f: stelem.i4 + IL_0030: ldloc.2 + IL_0031: ldc.i4.1 + IL_0032: add + IL_0033: stloc.2 + IL_0034: ldloc.2 + IL_0035: ldloc.1 + IL_0036: ldlen + IL_0037: conv.i4 + IL_0038: blt.s IL_0020 + + IL_003a: ldloc.1 + IL_003b: ret } .method public static int32[] f11(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -1267,7 +1505,9 @@ int32[] V_1, int32[] V_2, int32 V_3, - int32 V_4) + int32 V_4, + int32 V_5, + int32[] V_6) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldnull @@ -1286,7 +1526,7 @@ IL_001b: stloc.2 IL_001c: ldc.i4.0 IL_001d: stloc.3 - IL_001e: br.s IL_0030 + IL_001e: br.s IL_0038 IL_0020: ldloc.2 IL_0021: ldloc.3 @@ -1294,22 +1534,26 @@ IL_0023: ldloc.3 IL_0024: ldelem.i4 IL_0025: stloc.s V_4 - IL_0027: ldloc.s V_4 - IL_0029: ldloc.0 - IL_002a: add - IL_002b: stelem.i4 - IL_002c: ldloc.3 - IL_002d: ldc.i4.1 - IL_002e: add - IL_002f: stloc.3 - IL_0030: ldloc.3 - IL_0031: ldloc.2 - IL_0032: ldlen - IL_0033: conv.i4 - IL_0034: blt.s IL_0020 - - IL_0036: ldloc.2 - IL_0037: ret + IL_0027: stloc.s V_5 + IL_0029: stloc.s V_6 + IL_002b: ldloc.s V_6 + IL_002d: ldloc.s V_5 + IL_002f: ldloc.s V_4 + IL_0031: ldloc.0 + IL_0032: add + IL_0033: stelem.i4 + IL_0034: ldloc.3 + IL_0035: ldc.i4.1 + IL_0036: add + IL_0037: stloc.3 + IL_0038: ldloc.3 + IL_0039: ldloc.2 + IL_003a: ldlen + IL_003b: conv.i4 + IL_003c: blt.s IL_0020 + + IL_003e: ldloc.2 + IL_003f: ret } .method public static int32[] f12(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -1321,7 +1565,9 @@ .locals init (int32[] V_0, int32[] V_1, int32 V_2, - int32 V_3) + int32 V_3, + int32 V_4, + int32[] V_5) IL_0000: ldarg.0 IL_0001: ldnull IL_0002: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) @@ -1333,7 +1579,7 @@ IL_0010: stloc.1 IL_0011: ldc.i4.0 IL_0012: stloc.2 - IL_0013: br.s IL_0023 + IL_0013: br.s IL_002b IL_0015: ldloc.1 IL_0016: ldloc.2 @@ -1341,22 +1587,26 @@ IL_0018: ldloc.2 IL_0019: ldelem.i4 IL_001a: stloc.3 - IL_001b: ldloc.3 - IL_001c: ldarg.1 - IL_001d: add - IL_001e: stelem.i4 - IL_001f: ldloc.2 - IL_0020: ldc.i4.1 - IL_0021: add - IL_0022: stloc.2 - IL_0023: ldloc.2 - IL_0024: ldloc.1 - IL_0025: ldlen - IL_0026: conv.i4 - IL_0027: blt.s IL_0015 + IL_001b: stloc.s V_4 + IL_001d: stloc.s V_5 + IL_001f: ldloc.s V_5 + IL_0021: ldloc.s V_4 + IL_0023: ldloc.3 + IL_0024: ldarg.1 + IL_0025: add + IL_0026: stelem.i4 + IL_0027: ldloc.2 + IL_0028: ldc.i4.1 + IL_0029: add + IL_002a: stloc.2 + IL_002b: ldloc.2 + IL_002c: ldloc.1 + IL_002d: ldlen + IL_002e: conv.i4 + IL_002f: blt.s IL_0015 - IL_0029: ldloc.1 - IL_002a: ret + IL_0031: ldloc.1 + IL_0032: ret } .method public static int32[] 'for _ in Array.groupBy id [||] do ...'() cil managed @@ -1365,7 +1615,9 @@ .maxstack 5 .locals init (class [runtime]System.Tuple`2[] V_0, int32[] V_1, - int32 V_2) + int32 V_2, + int32 V_3, + int32[] V_4) IL_0000: ldsfld class assembly/'for _ in Array-groupBy id -||- do ---@28' assembly/'for _ in Array-groupBy id -||- do ---@28'::@_instance IL_0005: call !!0[] [runtime]System.Array::Empty() IL_000a: call class [runtime]System.Tuple`2[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::GroupBy(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, @@ -1378,24 +1630,28 @@ IL_0018: stloc.1 IL_0019: ldc.i4.0 IL_001a: stloc.2 - IL_001b: br.s IL_0025 + IL_001b: br.s IL_002b IL_001d: ldloc.1 IL_001e: ldloc.2 - IL_001f: ldc.i4.0 - IL_0020: stelem.i4 - IL_0021: ldloc.2 - IL_0022: ldc.i4.1 - IL_0023: add - IL_0024: stloc.2 - IL_0025: ldloc.2 - IL_0026: ldloc.1 - IL_0027: ldlen - IL_0028: conv.i4 - IL_0029: blt.s IL_001d - - IL_002b: ldloc.1 - IL_002c: ret + IL_001f: stloc.3 + IL_0020: stloc.s V_4 + IL_0022: ldloc.s V_4 + IL_0024: ldloc.3 + IL_0025: ldc.i4.0 + IL_0026: stelem.i4 + IL_0027: ldloc.2 + IL_0028: ldc.i4.1 + IL_0029: add + IL_002a: stloc.2 + IL_002b: ldloc.2 + IL_002c: ldloc.1 + IL_002d: ldlen + IL_002e: conv.i4 + IL_002f: blt.s IL_001d + + IL_0031: ldloc.1 + IL_0032: ret } .method public static int32[] 'for _ | _ in Array.groupBy id [||] do ...'() cil managed @@ -1404,7 +1660,9 @@ .maxstack 5 .locals init (class [runtime]System.Tuple`2[] V_0, int32[] V_1, - int32 V_2) + int32 V_2, + int32 V_3, + int32[] V_4) IL_0000: ldsfld class assembly/'for _ | _ in Array-groupBy id -||- do ---@29' assembly/'for _ | _ in Array-groupBy id -||- do ---@29'::@_instance IL_0005: call !!0[] [runtime]System.Array::Empty() IL_000a: call class [runtime]System.Tuple`2[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::GroupBy(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, @@ -1417,24 +1675,28 @@ IL_0018: stloc.1 IL_0019: ldc.i4.0 IL_001a: stloc.2 - IL_001b: br.s IL_0025 + IL_001b: br.s IL_002b IL_001d: ldloc.1 IL_001e: ldloc.2 - IL_001f: ldc.i4.0 - IL_0020: stelem.i4 - IL_0021: ldloc.2 - IL_0022: ldc.i4.1 - IL_0023: add - IL_0024: stloc.2 - IL_0025: ldloc.2 - IL_0026: ldloc.1 - IL_0027: ldlen - IL_0028: conv.i4 - IL_0029: blt.s IL_001d - - IL_002b: ldloc.1 - IL_002c: ret + IL_001f: stloc.3 + IL_0020: stloc.s V_4 + IL_0022: ldloc.s V_4 + IL_0024: ldloc.3 + IL_0025: ldc.i4.0 + IL_0026: stelem.i4 + IL_0027: ldloc.2 + IL_0028: ldc.i4.1 + IL_0029: add + IL_002a: stloc.2 + IL_002b: ldloc.2 + IL_002c: ldloc.1 + IL_002d: ldlen + IL_002e: conv.i4 + IL_002f: blt.s IL_001d + + IL_0031: ldloc.1 + IL_0032: ret } .method public static int32[] 'for _ & _ in Array.groupBy id [||] do ...'() cil managed @@ -1443,7 +1705,9 @@ .maxstack 5 .locals init (class [runtime]System.Tuple`2[] V_0, int32[] V_1, - int32 V_2) + int32 V_2, + int32 V_3, + int32[] V_4) IL_0000: ldsfld class assembly/'for _ - _ in Array-groupBy id -||- do ---@30' assembly/'for _ - _ in Array-groupBy id -||- do ---@30'::@_instance IL_0005: call !!0[] [runtime]System.Array::Empty() IL_000a: call class [runtime]System.Tuple`2[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::GroupBy(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, @@ -1456,24 +1720,28 @@ IL_0018: stloc.1 IL_0019: ldc.i4.0 IL_001a: stloc.2 - IL_001b: br.s IL_0025 + IL_001b: br.s IL_002b IL_001d: ldloc.1 IL_001e: ldloc.2 - IL_001f: ldc.i4.0 - IL_0020: stelem.i4 - IL_0021: ldloc.2 - IL_0022: ldc.i4.1 - IL_0023: add - IL_0024: stloc.2 - IL_0025: ldloc.2 - IL_0026: ldloc.1 - IL_0027: ldlen - IL_0028: conv.i4 - IL_0029: blt.s IL_001d - - IL_002b: ldloc.1 - IL_002c: ret + IL_001f: stloc.3 + IL_0020: stloc.s V_4 + IL_0022: ldloc.s V_4 + IL_0024: ldloc.3 + IL_0025: ldc.i4.0 + IL_0026: stelem.i4 + IL_0027: ldloc.2 + IL_0028: ldc.i4.1 + IL_0029: add + IL_002a: stloc.2 + IL_002b: ldloc.2 + IL_002c: ldloc.1 + IL_002d: ldlen + IL_002e: conv.i4 + IL_002f: blt.s IL_001d + + IL_0031: ldloc.1 + IL_0032: ret } .method public static int32[] 'for _, _group in Array.groupBy id [||] do ...'() cil managed @@ -1482,7 +1750,9 @@ .maxstack 5 .locals init (class [runtime]System.Tuple`2[] V_0, int32[] V_1, - int32 V_2) + int32 V_2, + int32 V_3, + int32[] V_4) IL_0000: ldsfld class assembly/'for _, _group in Array-groupBy id -||- do ---@31' assembly/'for _, _group in Array-groupBy id -||- do ---@31'::@_instance IL_0005: call !!0[] [runtime]System.Array::Empty() IL_000a: call class [runtime]System.Tuple`2[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::GroupBy(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, @@ -1495,24 +1765,28 @@ IL_0018: stloc.1 IL_0019: ldc.i4.0 IL_001a: stloc.2 - IL_001b: br.s IL_0025 + IL_001b: br.s IL_002b IL_001d: ldloc.1 IL_001e: ldloc.2 - IL_001f: ldc.i4.0 - IL_0020: stelem.i4 - IL_0021: ldloc.2 - IL_0022: ldc.i4.1 - IL_0023: add - IL_0024: stloc.2 - IL_0025: ldloc.2 - IL_0026: ldloc.1 - IL_0027: ldlen - IL_0028: conv.i4 - IL_0029: blt.s IL_001d - - IL_002b: ldloc.1 - IL_002c: ret + IL_001f: stloc.3 + IL_0020: stloc.s V_4 + IL_0022: ldloc.s V_4 + IL_0024: ldloc.3 + IL_0025: ldc.i4.0 + IL_0026: stelem.i4 + IL_0027: ldloc.2 + IL_0028: ldc.i4.1 + IL_0029: add + IL_002a: stloc.2 + IL_002b: ldloc.2 + IL_002c: ldloc.1 + IL_002d: ldlen + IL_002e: conv.i4 + IL_002f: blt.s IL_001d + + IL_0031: ldloc.1 + IL_0032: ret } .method public static int32[] 'for _, group in Array.groupBy id [||] do ...'() cil managed @@ -1523,7 +1797,9 @@ int32[] V_1, int32 V_2, class [runtime]System.Tuple`2 V_3, - object[] V_4) + object[] V_4, + int32 V_5, + int32[] V_6) IL_0000: ldsfld class assembly/'for _, group in Array-groupBy id -||- do ---@32' assembly/'for _, group in Array-groupBy id -||- do ---@32'::@_instance IL_0005: call !!0[] [runtime]System.Array::Empty() IL_000a: call class [runtime]System.Tuple`2[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::GroupBy(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, @@ -1536,7 +1812,7 @@ IL_0018: stloc.1 IL_0019: ldc.i4.0 IL_001a: stloc.2 - IL_001b: br.s IL_0038 + IL_001b: br.s IL_0040 IL_001d: ldloc.1 IL_001e: ldloc.2 @@ -1547,22 +1823,26 @@ IL_0027: ldloc.3 IL_0028: call instance !1 class [runtime]System.Tuple`2::get_Item2() IL_002d: stloc.s V_4 - IL_002f: ldloc.s V_4 - IL_0031: ldlen - IL_0032: conv.i4 - IL_0033: stelem.i4 - IL_0034: ldloc.2 - IL_0035: ldc.i4.1 - IL_0036: add - IL_0037: stloc.2 - IL_0038: ldloc.2 - IL_0039: ldloc.1 - IL_003a: ldlen - IL_003b: conv.i4 - IL_003c: blt.s IL_001d - - IL_003e: ldloc.1 - IL_003f: ret + IL_002f: stloc.s V_5 + IL_0031: stloc.s V_6 + IL_0033: ldloc.s V_6 + IL_0035: ldloc.s V_5 + IL_0037: ldloc.s V_4 + IL_0039: ldlen + IL_003a: conv.i4 + IL_003b: stelem.i4 + IL_003c: ldloc.2 + IL_003d: ldc.i4.1 + IL_003e: add + IL_003f: stloc.2 + IL_0040: ldloc.2 + IL_0041: ldloc.1 + IL_0042: ldlen + IL_0043: conv.i4 + IL_0044: blt.s IL_001d + + IL_0046: ldloc.1 + IL_0047: ret } .method public static int32[] 'for 1 | 2 | _ in ...'() cil managed @@ -1572,7 +1852,9 @@ .locals init (int32[] V_0, int32[] V_1, int32 V_2, - int32 V_3) + int32 V_3, + int32 V_4, + int32[] V_5) IL_0000: call !!0[] [runtime]System.Array::Empty() IL_0005: stloc.0 IL_0006: ldloc.0 @@ -1582,7 +1864,7 @@ IL_000e: stloc.1 IL_000f: ldc.i4.0 IL_0010: stloc.2 - IL_0011: br.s IL_0030 + IL_0011: br.s IL_0038 IL_0013: ldloc.1 IL_0014: ldloc.2 @@ -1596,21 +1878,25 @@ IL_001c: switch ( IL_0029, IL_0029) - IL_0029: ldc.i4.0 - IL_002a: nop - IL_002b: stelem.i4 - IL_002c: ldloc.2 - IL_002d: ldc.i4.1 - IL_002e: add - IL_002f: stloc.2 - IL_0030: ldloc.2 - IL_0031: ldloc.1 - IL_0032: ldlen - IL_0033: conv.i4 - IL_0034: blt.s IL_0013 + IL_0029: stloc.s V_4 + IL_002b: stloc.s V_5 + IL_002d: ldloc.s V_5 + IL_002f: ldloc.s V_4 + IL_0031: ldc.i4.0 + IL_0032: nop + IL_0033: stelem.i4 + IL_0034: ldloc.2 + IL_0035: ldc.i4.1 + IL_0036: add + IL_0037: stloc.2 + IL_0038: ldloc.2 + IL_0039: ldloc.1 + IL_003a: ldlen + IL_003b: conv.i4 + IL_003c: blt.s IL_0013 - IL_0036: ldloc.1 - IL_0037: ret + IL_003e: ldloc.1 + IL_003f: ret } .method public static int32[] 'for Failure _ | _ in ...'() cil managed @@ -1621,7 +1907,9 @@ int32[] V_1, int32 V_2, class [runtime]System.Exception V_3, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 V_4) + class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 V_4, + int32 V_5, + int32[] V_6) IL_0000: call !!0[] [runtime]System.Array::Empty() IL_0005: stloc.0 IL_0006: ldloc.0 @@ -1631,7 +1919,7 @@ IL_000e: stloc.1 IL_000f: ldc.i4.0 IL_0010: stloc.2 - IL_0011: br.s IL_0030 + IL_0011: br.s IL_0038 IL_0013: ldloc.1 IL_0014: ldloc.2 @@ -1645,21 +1933,25 @@ IL_0025: ldloc.s V_4 IL_0027: brfalse.s IL_0029 - IL_0029: ldc.i4.0 - IL_002a: nop - IL_002b: stelem.i4 - IL_002c: ldloc.2 - IL_002d: ldc.i4.1 - IL_002e: add - IL_002f: stloc.2 - IL_0030: ldloc.2 - IL_0031: ldloc.1 - IL_0032: ldlen - IL_0033: conv.i4 - IL_0034: blt.s IL_0013 + IL_0029: stloc.s V_5 + IL_002b: stloc.s V_6 + IL_002d: ldloc.s V_6 + IL_002f: ldloc.s V_5 + IL_0031: ldc.i4.0 + IL_0032: nop + IL_0033: stelem.i4 + IL_0034: ldloc.2 + IL_0035: ldc.i4.1 + IL_0036: add + IL_0037: stloc.2 + IL_0038: ldloc.2 + IL_0039: ldloc.1 + IL_003a: ldlen + IL_003b: conv.i4 + IL_003c: blt.s IL_0013 - IL_0036: ldloc.1 - IL_0037: ret + IL_003e: ldloc.1 + IL_003f: ret } .method public static int32[] 'for true | false in ...'() cil managed @@ -1669,7 +1961,9 @@ .locals init (bool[] V_0, int32[] V_1, int32 V_2, - bool V_3) + bool V_3, + int32 V_4, + int32[] V_5) IL_0000: call !!0[] [runtime]System.Array::Empty() IL_0005: stloc.0 IL_0006: ldloc.0 @@ -1679,7 +1973,7 @@ IL_000e: stloc.1 IL_000f: ldc.i4.0 IL_0010: stloc.2 - IL_0011: br.s IL_0023 + IL_0011: br.s IL_002b IL_0013: ldloc.1 IL_0014: ldloc.2 @@ -1690,21 +1984,25 @@ IL_0019: ldloc.3 IL_001a: brfalse.s IL_001c - IL_001c: ldc.i4.0 - IL_001d: nop - IL_001e: stelem.i4 - IL_001f: ldloc.2 - IL_0020: ldc.i4.1 - IL_0021: add - IL_0022: stloc.2 - IL_0023: ldloc.2 - IL_0024: ldloc.1 - IL_0025: ldlen - IL_0026: conv.i4 - IL_0027: blt.s IL_0013 + IL_001c: stloc.s V_4 + IL_001e: stloc.s V_5 + IL_0020: ldloc.s V_5 + IL_0022: ldloc.s V_4 + IL_0024: ldc.i4.0 + IL_0025: nop + IL_0026: stelem.i4 + IL_0027: ldloc.2 + IL_0028: ldc.i4.1 + IL_0029: add + IL_002a: stloc.2 + IL_002b: ldloc.2 + IL_002c: ldloc.1 + IL_002d: ldlen + IL_002e: conv.i4 + IL_002f: blt.s IL_0013 - IL_0029: ldloc.1 - IL_002a: ret + IL_0031: ldloc.1 + IL_0032: ret } .method public static int32[] 'for true | _ in ...'() cil managed @@ -1714,7 +2012,9 @@ .locals init (bool[] V_0, int32[] V_1, int32 V_2, - bool V_3) + bool V_3, + int32 V_4, + int32[] V_5) IL_0000: call !!0[] [runtime]System.Array::Empty() IL_0005: stloc.0 IL_0006: ldloc.0 @@ -1724,7 +2024,7 @@ IL_000e: stloc.1 IL_000f: ldc.i4.0 IL_0010: stloc.2 - IL_0011: br.s IL_0023 + IL_0011: br.s IL_002b IL_0013: ldloc.1 IL_0014: ldloc.2 @@ -1735,21 +2035,25 @@ IL_0019: ldloc.3 IL_001a: brfalse.s IL_001c - IL_001c: ldc.i4.0 - IL_001d: nop - IL_001e: stelem.i4 - IL_001f: ldloc.2 - IL_0020: ldc.i4.1 - IL_0021: add - IL_0022: stloc.2 - IL_0023: ldloc.2 - IL_0024: ldloc.1 - IL_0025: ldlen - IL_0026: conv.i4 - IL_0027: blt.s IL_0013 + IL_001c: stloc.s V_4 + IL_001e: stloc.s V_5 + IL_0020: ldloc.s V_5 + IL_0022: ldloc.s V_4 + IL_0024: ldc.i4.0 + IL_0025: nop + IL_0026: stelem.i4 + IL_0027: ldloc.2 + IL_0028: ldc.i4.1 + IL_0029: add + IL_002a: stloc.2 + IL_002b: ldloc.2 + IL_002c: ldloc.1 + IL_002d: ldlen + IL_002e: conv.i4 + IL_002f: blt.s IL_0013 - IL_0029: ldloc.1 - IL_002a: ret + IL_0031: ldloc.1 + IL_0032: ret } .method public static int32[] 'for _ | true in ...'() cil managed @@ -1758,7 +2062,9 @@ .maxstack 5 .locals init (bool[] V_0, int32[] V_1, - int32 V_2) + int32 V_2, + int32 V_3, + int32[] V_4) IL_0000: call !!0[] [runtime]System.Array::Empty() IL_0005: stloc.0 IL_0006: ldloc.0 @@ -1768,24 +2074,28 @@ IL_000e: stloc.1 IL_000f: ldc.i4.0 IL_0010: stloc.2 - IL_0011: br.s IL_001b + IL_0011: br.s IL_0021 IL_0013: ldloc.1 IL_0014: ldloc.2 - IL_0015: ldc.i4.0 - IL_0016: stelem.i4 - IL_0017: ldloc.2 - IL_0018: ldc.i4.1 - IL_0019: add - IL_001a: stloc.2 - IL_001b: ldloc.2 - IL_001c: ldloc.1 - IL_001d: ldlen - IL_001e: conv.i4 - IL_001f: blt.s IL_0013 - - IL_0021: ldloc.1 - IL_0022: ret + IL_0015: stloc.3 + IL_0016: stloc.s V_4 + IL_0018: ldloc.s V_4 + IL_001a: ldloc.3 + IL_001b: ldc.i4.0 + IL_001c: stelem.i4 + IL_001d: ldloc.2 + IL_001e: ldc.i4.1 + IL_001f: add + IL_0020: stloc.2 + IL_0021: ldloc.2 + IL_0022: ldloc.1 + IL_0023: ldlen + IL_0024: conv.i4 + IL_0025: blt.s IL_0013 + + IL_0027: ldloc.1 + IL_0028: ret } .method public static int8[] '[|for x in sbyteArray -> x|]'(int8[] xs) cil managed @@ -1795,7 +2105,9 @@ .locals init (int8[] V_0, int8[] V_1, int32 V_2, - int8 V_3) + int8 V_3, + int32 V_4, + int8[] V_5) IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 @@ -1805,7 +2117,7 @@ IL_000a: stloc.1 IL_000b: ldc.i4.0 IL_000c: stloc.2 - IL_000d: br.s IL_001b + IL_000d: br.s IL_0023 IL_000f: ldloc.1 IL_0010: ldloc.2 @@ -1813,20 +2125,24 @@ IL_0012: ldloc.2 IL_0013: ldelem.i1 IL_0014: stloc.3 - IL_0015: ldloc.3 - IL_0016: stelem.i1 - IL_0017: ldloc.2 - IL_0018: ldc.i4.1 - IL_0019: add - IL_001a: stloc.2 - IL_001b: ldloc.2 - IL_001c: ldloc.1 - IL_001d: ldlen - IL_001e: conv.i4 - IL_001f: blt.s IL_000f - - IL_0021: ldloc.1 - IL_0022: ret + IL_0015: stloc.s V_4 + IL_0017: stloc.s V_5 + IL_0019: ldloc.s V_5 + IL_001b: ldloc.s V_4 + IL_001d: ldloc.3 + IL_001e: stelem.i1 + IL_001f: ldloc.2 + IL_0020: ldc.i4.1 + IL_0021: add + IL_0022: stloc.2 + IL_0023: ldloc.2 + IL_0024: ldloc.1 + IL_0025: ldlen + IL_0026: conv.i4 + IL_0027: blt.s IL_000f + + IL_0029: ldloc.1 + IL_002a: ret } .method public static uint8[] '[|for x in byteArray -> x|]'(uint8[] xs) cil managed @@ -1836,7 +2152,9 @@ .locals init (uint8[] V_0, uint8[] V_1, int32 V_2, - uint8 V_3) + uint8 V_3, + int32 V_4, + uint8[] V_5) IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 @@ -1846,7 +2164,7 @@ IL_000a: stloc.1 IL_000b: ldc.i4.0 IL_000c: stloc.2 - IL_000d: br.s IL_001b + IL_000d: br.s IL_0023 IL_000f: ldloc.1 IL_0010: ldloc.2 @@ -1854,20 +2172,24 @@ IL_0012: ldloc.2 IL_0013: ldelem.u1 IL_0014: stloc.3 - IL_0015: ldloc.3 - IL_0016: stelem.i1 - IL_0017: ldloc.2 - IL_0018: ldc.i4.1 - IL_0019: add - IL_001a: stloc.2 - IL_001b: ldloc.2 - IL_001c: ldloc.1 - IL_001d: ldlen - IL_001e: conv.i4 - IL_001f: blt.s IL_000f - - IL_0021: ldloc.1 - IL_0022: ret + IL_0015: stloc.s V_4 + IL_0017: stloc.s V_5 + IL_0019: ldloc.s V_5 + IL_001b: ldloc.s V_4 + IL_001d: ldloc.3 + IL_001e: stelem.i1 + IL_001f: ldloc.2 + IL_0020: ldc.i4.1 + IL_0021: add + IL_0022: stloc.2 + IL_0023: ldloc.2 + IL_0024: ldloc.1 + IL_0025: ldlen + IL_0026: conv.i4 + IL_0027: blt.s IL_000f + + IL_0029: ldloc.1 + IL_002a: ret } .method public static int16[] '[|for x in int16Array -> x|]'(int16[] xs) cil managed @@ -1877,7 +2199,9 @@ .locals init (int16[] V_0, int16[] V_1, int32 V_2, - int16 V_3) + int16 V_3, + int32 V_4, + int16[] V_5) IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 @@ -1887,7 +2211,7 @@ IL_000a: stloc.1 IL_000b: ldc.i4.0 IL_000c: stloc.2 - IL_000d: br.s IL_001b + IL_000d: br.s IL_0023 IL_000f: ldloc.1 IL_0010: ldloc.2 @@ -1895,20 +2219,24 @@ IL_0012: ldloc.2 IL_0013: ldelem.i2 IL_0014: stloc.3 - IL_0015: ldloc.3 - IL_0016: stelem.i2 - IL_0017: ldloc.2 - IL_0018: ldc.i4.1 - IL_0019: add - IL_001a: stloc.2 - IL_001b: ldloc.2 - IL_001c: ldloc.1 - IL_001d: ldlen - IL_001e: conv.i4 - IL_001f: blt.s IL_000f - - IL_0021: ldloc.1 - IL_0022: ret + IL_0015: stloc.s V_4 + IL_0017: stloc.s V_5 + IL_0019: ldloc.s V_5 + IL_001b: ldloc.s V_4 + IL_001d: ldloc.3 + IL_001e: stelem.i2 + IL_001f: ldloc.2 + IL_0020: ldc.i4.1 + IL_0021: add + IL_0022: stloc.2 + IL_0023: ldloc.2 + IL_0024: ldloc.1 + IL_0025: ldlen + IL_0026: conv.i4 + IL_0027: blt.s IL_000f + + IL_0029: ldloc.1 + IL_002a: ret } .method public static uint16[] '[|for x in uint16Array -> x|]'(uint16[] xs) cil managed @@ -1918,7 +2246,9 @@ .locals init (uint16[] V_0, uint16[] V_1, int32 V_2, - uint16 V_3) + uint16 V_3, + int32 V_4, + uint16[] V_5) IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 @@ -1928,7 +2258,7 @@ IL_000a: stloc.1 IL_000b: ldc.i4.0 IL_000c: stloc.2 - IL_000d: br.s IL_001b + IL_000d: br.s IL_0023 IL_000f: ldloc.1 IL_0010: ldloc.2 @@ -1936,20 +2266,24 @@ IL_0012: ldloc.2 IL_0013: ldelem.u2 IL_0014: stloc.3 - IL_0015: ldloc.3 - IL_0016: stelem.i2 - IL_0017: ldloc.2 - IL_0018: ldc.i4.1 - IL_0019: add - IL_001a: stloc.2 - IL_001b: ldloc.2 - IL_001c: ldloc.1 - IL_001d: ldlen - IL_001e: conv.i4 - IL_001f: blt.s IL_000f - - IL_0021: ldloc.1 - IL_0022: ret + IL_0015: stloc.s V_4 + IL_0017: stloc.s V_5 + IL_0019: ldloc.s V_5 + IL_001b: ldloc.s V_4 + IL_001d: ldloc.3 + IL_001e: stelem.i2 + IL_001f: ldloc.2 + IL_0020: ldc.i4.1 + IL_0021: add + IL_0022: stloc.2 + IL_0023: ldloc.2 + IL_0024: ldloc.1 + IL_0025: ldlen + IL_0026: conv.i4 + IL_0027: blt.s IL_000f + + IL_0029: ldloc.1 + IL_002a: ret } .method public static char[] '[|for x in charArray -> x|]'(char[] xs) cil managed @@ -1959,7 +2293,9 @@ .locals init (char[] V_0, char[] V_1, int32 V_2, - char V_3) + char V_3, + int32 V_4, + char[] V_5) IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 @@ -1969,7 +2305,7 @@ IL_000a: stloc.1 IL_000b: ldc.i4.0 IL_000c: stloc.2 - IL_000d: br.s IL_001b + IL_000d: br.s IL_0023 IL_000f: ldloc.1 IL_0010: ldloc.2 @@ -1977,20 +2313,24 @@ IL_0012: ldloc.2 IL_0013: ldelem.u2 IL_0014: stloc.3 - IL_0015: ldloc.3 - IL_0016: stelem.i2 - IL_0017: ldloc.2 - IL_0018: ldc.i4.1 - IL_0019: add - IL_001a: stloc.2 - IL_001b: ldloc.2 - IL_001c: ldloc.1 - IL_001d: ldlen - IL_001e: conv.i4 - IL_001f: blt.s IL_000f - - IL_0021: ldloc.1 - IL_0022: ret + IL_0015: stloc.s V_4 + IL_0017: stloc.s V_5 + IL_0019: ldloc.s V_5 + IL_001b: ldloc.s V_4 + IL_001d: ldloc.3 + IL_001e: stelem.i2 + IL_001f: ldloc.2 + IL_0020: ldc.i4.1 + IL_0021: add + IL_0022: stloc.2 + IL_0023: ldloc.2 + IL_0024: ldloc.1 + IL_0025: ldlen + IL_0026: conv.i4 + IL_0027: blt.s IL_000f + + IL_0029: ldloc.1 + IL_002a: ret } .method public static int32[] '[|for x in intArray -> x|]'(int32[] xs) cil managed @@ -2000,7 +2340,9 @@ .locals init (int32[] V_0, int32[] V_1, int32 V_2, - int32 V_3) + int32 V_3, + int32 V_4, + int32[] V_5) IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 @@ -2010,7 +2352,7 @@ IL_000a: stloc.1 IL_000b: ldc.i4.0 IL_000c: stloc.2 - IL_000d: br.s IL_001b + IL_000d: br.s IL_0023 IL_000f: ldloc.1 IL_0010: ldloc.2 @@ -2018,20 +2360,24 @@ IL_0012: ldloc.2 IL_0013: ldelem.i4 IL_0014: stloc.3 - IL_0015: ldloc.3 - IL_0016: stelem.i4 - IL_0017: ldloc.2 - IL_0018: ldc.i4.1 - IL_0019: add - IL_001a: stloc.2 - IL_001b: ldloc.2 - IL_001c: ldloc.1 - IL_001d: ldlen - IL_001e: conv.i4 - IL_001f: blt.s IL_000f - - IL_0021: ldloc.1 - IL_0022: ret + IL_0015: stloc.s V_4 + IL_0017: stloc.s V_5 + IL_0019: ldloc.s V_5 + IL_001b: ldloc.s V_4 + IL_001d: ldloc.3 + IL_001e: stelem.i4 + IL_001f: ldloc.2 + IL_0020: ldc.i4.1 + IL_0021: add + IL_0022: stloc.2 + IL_0023: ldloc.2 + IL_0024: ldloc.1 + IL_0025: ldlen + IL_0026: conv.i4 + IL_0027: blt.s IL_000f + + IL_0029: ldloc.1 + IL_002a: ret } .method public static uint32[] '[|for x in uintArray -> x|]'(uint32[] xs) cil managed @@ -2041,7 +2387,9 @@ .locals init (uint32[] V_0, uint32[] V_1, int32 V_2, - uint32 V_3) + uint32 V_3, + int32 V_4, + uint32[] V_5) IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 @@ -2051,7 +2399,7 @@ IL_000a: stloc.1 IL_000b: ldc.i4.0 IL_000c: stloc.2 - IL_000d: br.s IL_001b + IL_000d: br.s IL_0023 IL_000f: ldloc.1 IL_0010: ldloc.2 @@ -2059,20 +2407,24 @@ IL_0012: ldloc.2 IL_0013: ldelem.u4 IL_0014: stloc.3 - IL_0015: ldloc.3 - IL_0016: stelem.i4 - IL_0017: ldloc.2 - IL_0018: ldc.i4.1 - IL_0019: add - IL_001a: stloc.2 - IL_001b: ldloc.2 - IL_001c: ldloc.1 - IL_001d: ldlen - IL_001e: conv.i4 - IL_001f: blt.s IL_000f - - IL_0021: ldloc.1 - IL_0022: ret + IL_0015: stloc.s V_4 + IL_0017: stloc.s V_5 + IL_0019: ldloc.s V_5 + IL_001b: ldloc.s V_4 + IL_001d: ldloc.3 + IL_001e: stelem.i4 + IL_001f: ldloc.2 + IL_0020: ldc.i4.1 + IL_0021: add + IL_0022: stloc.2 + IL_0023: ldloc.2 + IL_0024: ldloc.1 + IL_0025: ldlen + IL_0026: conv.i4 + IL_0027: blt.s IL_000f + + IL_0029: ldloc.1 + IL_002a: ret } .method public static int64[] '[|for x in int64Array -> x|]'(int64[] xs) cil managed @@ -2082,7 +2434,9 @@ .locals init (int64[] V_0, int64[] V_1, int32 V_2, - int64 V_3) + int64 V_3, + int32 V_4, + int64[] V_5) IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 @@ -2092,7 +2446,7 @@ IL_000a: stloc.1 IL_000b: ldc.i4.0 IL_000c: stloc.2 - IL_000d: br.s IL_001b + IL_000d: br.s IL_0023 IL_000f: ldloc.1 IL_0010: ldloc.2 @@ -2100,20 +2454,24 @@ IL_0012: ldloc.2 IL_0013: ldelem.i8 IL_0014: stloc.3 - IL_0015: ldloc.3 - IL_0016: stelem.i8 - IL_0017: ldloc.2 - IL_0018: ldc.i4.1 - IL_0019: add - IL_001a: stloc.2 - IL_001b: ldloc.2 - IL_001c: ldloc.1 - IL_001d: ldlen - IL_001e: conv.i4 - IL_001f: blt.s IL_000f - - IL_0021: ldloc.1 - IL_0022: ret + IL_0015: stloc.s V_4 + IL_0017: stloc.s V_5 + IL_0019: ldloc.s V_5 + IL_001b: ldloc.s V_4 + IL_001d: ldloc.3 + IL_001e: stelem.i8 + IL_001f: ldloc.2 + IL_0020: ldc.i4.1 + IL_0021: add + IL_0022: stloc.2 + IL_0023: ldloc.2 + IL_0024: ldloc.1 + IL_0025: ldlen + IL_0026: conv.i4 + IL_0027: blt.s IL_000f + + IL_0029: ldloc.1 + IL_002a: ret } .method public static uint64[] '[|for x in uint64Array -> x|]'(uint64[] xs) cil managed @@ -2123,7 +2481,9 @@ .locals init (uint64[] V_0, uint64[] V_1, int32 V_2, - uint64 V_3) + uint64 V_3, + int32 V_4, + uint64[] V_5) IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 @@ -2133,7 +2493,7 @@ IL_000a: stloc.1 IL_000b: ldc.i4.0 IL_000c: stloc.2 - IL_000d: br.s IL_001b + IL_000d: br.s IL_0023 IL_000f: ldloc.1 IL_0010: ldloc.2 @@ -2141,20 +2501,24 @@ IL_0012: ldloc.2 IL_0013: ldelem.i8 IL_0014: stloc.3 - IL_0015: ldloc.3 - IL_0016: stelem.i8 - IL_0017: ldloc.2 - IL_0018: ldc.i4.1 - IL_0019: add - IL_001a: stloc.2 - IL_001b: ldloc.2 - IL_001c: ldloc.1 - IL_001d: ldlen - IL_001e: conv.i4 - IL_001f: blt.s IL_000f - - IL_0021: ldloc.1 - IL_0022: ret + IL_0015: stloc.s V_4 + IL_0017: stloc.s V_5 + IL_0019: ldloc.s V_5 + IL_001b: ldloc.s V_4 + IL_001d: ldloc.3 + IL_001e: stelem.i8 + IL_001f: ldloc.2 + IL_0020: ldc.i4.1 + IL_0021: add + IL_0022: stloc.2 + IL_0023: ldloc.2 + IL_0024: ldloc.1 + IL_0025: ldlen + IL_0026: conv.i4 + IL_0027: blt.s IL_000f + + IL_0029: ldloc.1 + IL_002a: ret } .method public static native int[] '[|for x in nativeintArray -> x|]'(native int[] xs) cil managed @@ -2164,7 +2528,9 @@ .locals init (native int[] V_0, native int[] V_1, int32 V_2, - native int V_3) + native int V_3, + int32 V_4, + native int[] V_5) IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 @@ -2174,7 +2540,7 @@ IL_000a: stloc.1 IL_000b: ldc.i4.0 IL_000c: stloc.2 - IL_000d: br.s IL_001b + IL_000d: br.s IL_0023 IL_000f: ldloc.1 IL_0010: ldloc.2 @@ -2182,20 +2548,24 @@ IL_0012: ldloc.2 IL_0013: ldelem.i IL_0014: stloc.3 - IL_0015: ldloc.3 - IL_0016: stelem.i - IL_0017: ldloc.2 - IL_0018: ldc.i4.1 - IL_0019: add - IL_001a: stloc.2 - IL_001b: ldloc.2 - IL_001c: ldloc.1 - IL_001d: ldlen - IL_001e: conv.i4 - IL_001f: blt.s IL_000f - - IL_0021: ldloc.1 - IL_0022: ret + IL_0015: stloc.s V_4 + IL_0017: stloc.s V_5 + IL_0019: ldloc.s V_5 + IL_001b: ldloc.s V_4 + IL_001d: ldloc.3 + IL_001e: stelem.i + IL_001f: ldloc.2 + IL_0020: ldc.i4.1 + IL_0021: add + IL_0022: stloc.2 + IL_0023: ldloc.2 + IL_0024: ldloc.1 + IL_0025: ldlen + IL_0026: conv.i4 + IL_0027: blt.s IL_000f + + IL_0029: ldloc.1 + IL_002a: ret } .method public static native uint[] '[|for x in unativeintArray -> x|]'(native uint[] xs) cil managed @@ -2205,7 +2575,9 @@ .locals init (native uint[] V_0, native uint[] V_1, int32 V_2, - native uint V_3) + native uint V_3, + int32 V_4, + native uint[] V_5) IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 @@ -2215,7 +2587,7 @@ IL_000a: stloc.1 IL_000b: ldc.i4.0 IL_000c: stloc.2 - IL_000d: br.s IL_001b + IL_000d: br.s IL_0023 IL_000f: ldloc.1 IL_0010: ldloc.2 @@ -2223,20 +2595,24 @@ IL_0012: ldloc.2 IL_0013: ldelem.i IL_0014: stloc.3 - IL_0015: ldloc.3 - IL_0016: stelem.i - IL_0017: ldloc.2 - IL_0018: ldc.i4.1 - IL_0019: add - IL_001a: stloc.2 - IL_001b: ldloc.2 - IL_001c: ldloc.1 - IL_001d: ldlen - IL_001e: conv.i4 - IL_001f: blt.s IL_000f - - IL_0021: ldloc.1 - IL_0022: ret + IL_0015: stloc.s V_4 + IL_0017: stloc.s V_5 + IL_0019: ldloc.s V_5 + IL_001b: ldloc.s V_4 + IL_001d: ldloc.3 + IL_001e: stelem.i + IL_001f: ldloc.2 + IL_0020: ldc.i4.1 + IL_0021: add + IL_0022: stloc.2 + IL_0023: ldloc.2 + IL_0024: ldloc.1 + IL_0025: ldlen + IL_0026: conv.i4 + IL_0027: blt.s IL_000f + + IL_0029: ldloc.1 + IL_002a: ret } .method public static float64[] '[|for x in floatArray -> x|]'(float64[] xs) cil managed @@ -2246,7 +2622,9 @@ .locals init (float64[] V_0, float64[] V_1, int32 V_2, - float64 V_3) + float64 V_3, + int32 V_4, + float64[] V_5) IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 @@ -2256,7 +2634,7 @@ IL_000a: stloc.1 IL_000b: ldc.i4.0 IL_000c: stloc.2 - IL_000d: br.s IL_001b + IL_000d: br.s IL_0023 IL_000f: ldloc.1 IL_0010: ldloc.2 @@ -2264,20 +2642,24 @@ IL_0012: ldloc.2 IL_0013: ldelem.r8 IL_0014: stloc.3 - IL_0015: ldloc.3 - IL_0016: stelem.r8 - IL_0017: ldloc.2 - IL_0018: ldc.i4.1 - IL_0019: add - IL_001a: stloc.2 - IL_001b: ldloc.2 - IL_001c: ldloc.1 - IL_001d: ldlen - IL_001e: conv.i4 - IL_001f: blt.s IL_000f - - IL_0021: ldloc.1 - IL_0022: ret + IL_0015: stloc.s V_4 + IL_0017: stloc.s V_5 + IL_0019: ldloc.s V_5 + IL_001b: ldloc.s V_4 + IL_001d: ldloc.3 + IL_001e: stelem.r8 + IL_001f: ldloc.2 + IL_0020: ldc.i4.1 + IL_0021: add + IL_0022: stloc.2 + IL_0023: ldloc.2 + IL_0024: ldloc.1 + IL_0025: ldlen + IL_0026: conv.i4 + IL_0027: blt.s IL_000f + + IL_0029: ldloc.1 + IL_002a: ret } .method public static float32[] '[|for x in float32Array -> x|]'(float32[] xs) cil managed @@ -2287,7 +2669,9 @@ .locals init (float32[] V_0, float32[] V_1, int32 V_2, - float32 V_3) + float32 V_3, + int32 V_4, + float32[] V_5) IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 @@ -2297,7 +2681,7 @@ IL_000a: stloc.1 IL_000b: ldc.i4.0 IL_000c: stloc.2 - IL_000d: br.s IL_001b + IL_000d: br.s IL_0023 IL_000f: ldloc.1 IL_0010: ldloc.2 @@ -2305,20 +2689,24 @@ IL_0012: ldloc.2 IL_0013: ldelem.r4 IL_0014: stloc.3 - IL_0015: ldloc.3 - IL_0016: stelem.r4 - IL_0017: ldloc.2 - IL_0018: ldc.i4.1 - IL_0019: add - IL_001a: stloc.2 - IL_001b: ldloc.2 - IL_001c: ldloc.1 - IL_001d: ldlen - IL_001e: conv.i4 - IL_001f: blt.s IL_000f - - IL_0021: ldloc.1 - IL_0022: ret + IL_0015: stloc.s V_4 + IL_0017: stloc.s V_5 + IL_0019: ldloc.s V_5 + IL_001b: ldloc.s V_4 + IL_001d: ldloc.3 + IL_001e: stelem.r4 + IL_001f: ldloc.2 + IL_0020: ldc.i4.1 + IL_0021: add + IL_0022: stloc.2 + IL_0023: ldloc.2 + IL_0024: ldloc.1 + IL_0025: ldlen + IL_0026: conv.i4 + IL_0027: blt.s IL_000f + + IL_0029: ldloc.1 + IL_002a: ret } } @@ -2340,4 +2728,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInArray_ToList.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInArray_ToList.fs.il.bsl index a5cb15a2903..b2f43a24f6f 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInArray_ToList.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInArray_ToList.fs.il.bsl @@ -41,49 +41,52 @@ class [runtime]System.Collections.Generic.IEnumerator`1 V_1, class [runtime]System.Collections.Generic.IEnumerable`1 V_2, int32 V_3, - class [runtime]System.IDisposable V_4) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, + class [runtime]System.IDisposable V_5) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_001a + IL_0008: br.s IL_001e IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() IL_0010: stloc.3 IL_0011: ldloca.s V_0 - IL_0013: ldloc.3 - IL_0014: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0019: nop - IL_001a: ldloc.1 - IL_001b: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0020: brtrue.s IL_000a - - IL_0022: ldnull - IL_0023: stloc.2 - IL_0024: leave.s IL_003b + IL_0013: stloc.s V_4 + IL_0015: ldloc.s V_4 + IL_0017: ldloc.3 + IL_0018: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_001d: nop + IL_001e: ldloc.1 + IL_001f: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0024: brtrue.s IL_000a + + IL_0026: ldnull + IL_0027: stloc.2 + IL_0028: leave.s IL_003f } finally { - IL_0026: ldloc.1 - IL_0027: isinst [runtime]System.IDisposable - IL_002c: stloc.s V_4 - IL_002e: ldloc.s V_4 - IL_0030: brfalse.s IL_003a - - IL_0032: ldloc.s V_4 - IL_0034: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0039: endfinally - IL_003a: endfinally + IL_002a: ldloc.1 + IL_002b: isinst [runtime]System.IDisposable + IL_0030: stloc.s V_5 + IL_0032: ldloc.s V_5 + IL_0034: brfalse.s IL_003e + + IL_0036: ldloc.s V_5 + IL_0038: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_003d: endfinally + IL_003e: endfinally } - IL_003b: ldloc.2 - IL_003c: pop - IL_003d: ldloca.s V_0 - IL_003f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0044: ret + IL_003f: ldloc.2 + IL_0040: pop + IL_0041: ldloca.s V_0 + IL_0043: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0048: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f00(int32[] 'array') cil managed @@ -94,49 +97,52 @@ class [runtime]System.Collections.Generic.IEnumerator`1 V_1, class [runtime]System.Collections.Generic.IEnumerable`1 V_2, int32 V_3, - class [runtime]System.IDisposable V_4) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, + class [runtime]System.IDisposable V_5) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_001a + IL_0008: br.s IL_001e IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() IL_0010: stloc.3 IL_0011: ldloca.s V_0 - IL_0013: ldloc.3 - IL_0014: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0019: nop - IL_001a: ldloc.1 - IL_001b: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0020: brtrue.s IL_000a - - IL_0022: ldnull - IL_0023: stloc.2 - IL_0024: leave.s IL_003b + IL_0013: stloc.s V_4 + IL_0015: ldloc.s V_4 + IL_0017: ldloc.3 + IL_0018: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_001d: nop + IL_001e: ldloc.1 + IL_001f: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0024: brtrue.s IL_000a + + IL_0026: ldnull + IL_0027: stloc.2 + IL_0028: leave.s IL_003f } finally { - IL_0026: ldloc.1 - IL_0027: isinst [runtime]System.IDisposable - IL_002c: stloc.s V_4 - IL_002e: ldloc.s V_4 - IL_0030: brfalse.s IL_003a - - IL_0032: ldloc.s V_4 - IL_0034: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0039: endfinally - IL_003a: endfinally + IL_002a: ldloc.1 + IL_002b: isinst [runtime]System.IDisposable + IL_0030: stloc.s V_5 + IL_0032: ldloc.s V_5 + IL_0034: brfalse.s IL_003e + + IL_0036: ldloc.s V_5 + IL_0038: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_003d: endfinally + IL_003e: endfinally } - IL_003b: ldloc.2 - IL_003c: pop - IL_003d: ldloca.s V_0 - IL_003f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0044: ret + IL_003f: ldloc.2 + IL_0040: pop + IL_0041: ldloca.s V_0 + IL_0043: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0048: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f000(int32[] 'array') cil managed @@ -201,49 +207,52 @@ class [runtime]System.Collections.Generic.IEnumerator`1 V_1, class [runtime]System.Collections.Generic.IEnumerable`1 V_2, int32 V_3, - class [runtime]System.IDisposable V_4) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, + class [runtime]System.IDisposable V_5) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_001a + IL_0008: br.s IL_001e IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() IL_0010: stloc.3 IL_0011: ldloca.s V_0 - IL_0013: ldloc.3 - IL_0014: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0019: nop - IL_001a: ldloc.1 - IL_001b: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0020: brtrue.s IL_000a - - IL_0022: ldnull - IL_0023: stloc.2 - IL_0024: leave.s IL_003b + IL_0013: stloc.s V_4 + IL_0015: ldloc.s V_4 + IL_0017: ldloc.3 + IL_0018: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_001d: nop + IL_001e: ldloc.1 + IL_001f: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0024: brtrue.s IL_000a + + IL_0026: ldnull + IL_0027: stloc.2 + IL_0028: leave.s IL_003f } finally { - IL_0026: ldloc.1 - IL_0027: isinst [runtime]System.IDisposable - IL_002c: stloc.s V_4 - IL_002e: ldloc.s V_4 - IL_0030: brfalse.s IL_003a - - IL_0032: ldloc.s V_4 - IL_0034: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0039: endfinally - IL_003a: endfinally + IL_002a: ldloc.1 + IL_002b: isinst [runtime]System.IDisposable + IL_0030: stloc.s V_5 + IL_0032: ldloc.s V_5 + IL_0034: brfalse.s IL_003e + + IL_0036: ldloc.s V_5 + IL_0038: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_003d: endfinally + IL_003e: endfinally } - IL_003b: ldloc.2 - IL_003c: pop - IL_003d: ldloca.s V_0 - IL_003f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0044: ret + IL_003f: ldloc.2 + IL_0040: pop + IL_0041: ldloca.s V_0 + IL_0043: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0048: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -333,14 +342,15 @@ int32 V_3, int32 V_4, int32 V_5, - class [runtime]System.IDisposable V_6) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_6, + class [runtime]System.IDisposable V_7) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_002a + IL_0008: br.s IL_002e IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() @@ -354,40 +364,42 @@ IL_0018: add IL_0019: stloc.s V_5 IL_001b: ldloca.s V_0 - IL_001d: ldloc.3 - IL_001e: ldloc.s V_4 - IL_0020: add - IL_0021: ldloc.s V_5 - IL_0023: add - IL_0024: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0029: nop - IL_002a: ldloc.1 - IL_002b: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0030: brtrue.s IL_000a + IL_001d: stloc.s V_6 + IL_001f: ldloc.s V_6 + IL_0021: ldloc.3 + IL_0022: ldloc.s V_4 + IL_0024: add + IL_0025: ldloc.s V_5 + IL_0027: add + IL_0028: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_002d: nop + IL_002e: ldloc.1 + IL_002f: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0034: brtrue.s IL_000a - IL_0032: ldnull - IL_0033: stloc.2 - IL_0034: leave.s IL_004b + IL_0036: ldnull + IL_0037: stloc.2 + IL_0038: leave.s IL_004f } finally { - IL_0036: ldloc.1 - IL_0037: isinst [runtime]System.IDisposable - IL_003c: stloc.s V_6 - IL_003e: ldloc.s V_6 - IL_0040: brfalse.s IL_004a - - IL_0042: ldloc.s V_6 - IL_0044: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0049: endfinally - IL_004a: endfinally + IL_003a: ldloc.1 + IL_003b: isinst [runtime]System.IDisposable + IL_0040: stloc.s V_7 + IL_0042: ldloc.s V_7 + IL_0044: brfalse.s IL_004e + + IL_0046: ldloc.s V_7 + IL_0048: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_004d: endfinally + IL_004e: endfinally } - IL_004b: ldloc.2 - IL_004c: pop - IL_004d: ldloca.s V_0 - IL_004f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0054: ret + IL_004f: ldloc.2 + IL_0050: pop + IL_0051: ldloca.s V_0 + IL_0053: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0058: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -406,14 +418,15 @@ int32 V_3, int32 V_4, int32 V_5, - class [runtime]System.IDisposable V_6) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_6, + class [runtime]System.IDisposable V_7) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_0032 + IL_0008: br.s IL_0036 IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() @@ -431,40 +444,42 @@ IL_0020: add IL_0021: stloc.s V_5 IL_0023: ldloca.s V_0 - IL_0025: ldloc.3 - IL_0026: ldloc.s V_4 - IL_0028: add - IL_0029: ldloc.s V_5 - IL_002b: add - IL_002c: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0031: nop - IL_0032: ldloc.1 - IL_0033: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0038: brtrue.s IL_000a + IL_0025: stloc.s V_6 + IL_0027: ldloc.s V_6 + IL_0029: ldloc.3 + IL_002a: ldloc.s V_4 + IL_002c: add + IL_002d: ldloc.s V_5 + IL_002f: add + IL_0030: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0035: nop + IL_0036: ldloc.1 + IL_0037: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_003c: brtrue.s IL_000a - IL_003a: ldnull - IL_003b: stloc.2 - IL_003c: leave.s IL_0053 + IL_003e: ldnull + IL_003f: stloc.2 + IL_0040: leave.s IL_0057 } finally { - IL_003e: ldloc.1 - IL_003f: isinst [runtime]System.IDisposable - IL_0044: stloc.s V_6 - IL_0046: ldloc.s V_6 - IL_0048: brfalse.s IL_0052 - - IL_004a: ldloc.s V_6 - IL_004c: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0051: endfinally - IL_0052: endfinally + IL_0042: ldloc.1 + IL_0043: isinst [runtime]System.IDisposable + IL_0048: stloc.s V_7 + IL_004a: ldloc.s V_7 + IL_004c: brfalse.s IL_0056 + + IL_004e: ldloc.s V_7 + IL_0050: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0055: endfinally + IL_0056: endfinally } - IL_0053: ldloc.2 - IL_0054: pop - IL_0055: ldloca.s V_0 - IL_0057: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_005c: ret + IL_0057: ldloc.2 + IL_0058: pop + IL_0059: ldloca.s V_0 + IL_005b: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0060: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -483,14 +498,15 @@ int32 V_3, int32 V_4, int32 V_5, - class [runtime]System.IDisposable V_6) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_6, + class [runtime]System.IDisposable V_7) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_0032 + IL_0008: br.s IL_0036 IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() @@ -508,40 +524,42 @@ IL_0020: add IL_0021: stloc.s V_5 IL_0023: ldloca.s V_0 - IL_0025: ldloc.3 - IL_0026: ldloc.s V_4 - IL_0028: add - IL_0029: ldloc.s V_5 - IL_002b: add - IL_002c: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0031: nop - IL_0032: ldloc.1 - IL_0033: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0038: brtrue.s IL_000a + IL_0025: stloc.s V_6 + IL_0027: ldloc.s V_6 + IL_0029: ldloc.3 + IL_002a: ldloc.s V_4 + IL_002c: add + IL_002d: ldloc.s V_5 + IL_002f: add + IL_0030: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0035: nop + IL_0036: ldloc.1 + IL_0037: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_003c: brtrue.s IL_000a - IL_003a: ldnull - IL_003b: stloc.2 - IL_003c: leave.s IL_0053 + IL_003e: ldnull + IL_003f: stloc.2 + IL_0040: leave.s IL_0057 } finally { - IL_003e: ldloc.1 - IL_003f: isinst [runtime]System.IDisposable - IL_0044: stloc.s V_6 - IL_0046: ldloc.s V_6 - IL_0048: brfalse.s IL_0052 - - IL_004a: ldloc.s V_6 - IL_004c: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0051: endfinally - IL_0052: endfinally + IL_0042: ldloc.1 + IL_0043: isinst [runtime]System.IDisposable + IL_0048: stloc.s V_7 + IL_004a: ldloc.s V_7 + IL_004c: brfalse.s IL_0056 + + IL_004e: ldloc.s V_7 + IL_0050: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0055: endfinally + IL_0056: endfinally } - IL_0053: ldloc.2 - IL_0054: pop - IL_0055: ldloca.s V_0 - IL_0057: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_005c: ret + IL_0057: ldloc.2 + IL_0058: pop + IL_0059: ldloca.s V_0 + IL_005b: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0060: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -560,14 +578,15 @@ int32 V_3, int32 V_4, int32 V_5, - class [runtime]System.IDisposable V_6) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_6, + class [runtime]System.IDisposable V_7) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_0032 + IL_0008: br.s IL_0036 IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() @@ -585,40 +604,42 @@ IL_001d: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) IL_0022: pop IL_0023: ldloca.s V_0 - IL_0025: ldloc.3 - IL_0026: ldloc.s V_4 - IL_0028: add - IL_0029: ldloc.s V_5 - IL_002b: add - IL_002c: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0031: nop - IL_0032: ldloc.1 - IL_0033: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0038: brtrue.s IL_000a + IL_0025: stloc.s V_6 + IL_0027: ldloc.s V_6 + IL_0029: ldloc.3 + IL_002a: ldloc.s V_4 + IL_002c: add + IL_002d: ldloc.s V_5 + IL_002f: add + IL_0030: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0035: nop + IL_0036: ldloc.1 + IL_0037: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_003c: brtrue.s IL_000a - IL_003a: ldnull - IL_003b: stloc.2 - IL_003c: leave.s IL_0053 + IL_003e: ldnull + IL_003f: stloc.2 + IL_0040: leave.s IL_0057 } finally { - IL_003e: ldloc.1 - IL_003f: isinst [runtime]System.IDisposable - IL_0044: stloc.s V_6 - IL_0046: ldloc.s V_6 - IL_0048: brfalse.s IL_0052 - - IL_004a: ldloc.s V_6 - IL_004c: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0051: endfinally - IL_0052: endfinally + IL_0042: ldloc.1 + IL_0043: isinst [runtime]System.IDisposable + IL_0048: stloc.s V_7 + IL_004a: ldloc.s V_7 + IL_004c: brfalse.s IL_0056 + + IL_004e: ldloc.s V_7 + IL_0050: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0055: endfinally + IL_0056: endfinally } - IL_0053: ldloc.2 - IL_0054: pop - IL_0055: ldloca.s V_0 - IL_0057: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_005c: ret + IL_0057: ldloc.2 + IL_0058: pop + IL_0059: ldloca.s V_0 + IL_005b: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0060: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -637,14 +658,16 @@ int32 V_3, int32 V_4, int32 V_5, - class [runtime]System.IDisposable V_6) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_6, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_7, + class [runtime]System.IDisposable V_8) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_0039 + IL_0008: br.s IL_0041 IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() @@ -658,46 +681,50 @@ IL_0018: add IL_0019: stloc.s V_5 IL_001b: ldloca.s V_0 - IL_001d: ldarg.1 - IL_001e: ldnull - IL_001f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0024: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0029: nop - IL_002a: ldloca.s V_0 - IL_002c: ldloc.3 - IL_002d: ldloc.s V_4 - IL_002f: add - IL_0030: ldloc.s V_5 - IL_0032: add - IL_0033: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0038: nop - IL_0039: ldloc.1 - IL_003a: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_003f: brtrue.s IL_000a - - IL_0041: ldnull - IL_0042: stloc.2 - IL_0043: leave.s IL_005a + IL_001d: stloc.s V_6 + IL_001f: ldloc.s V_6 + IL_0021: ldarg.1 + IL_0022: ldnull + IL_0023: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0028: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_002d: nop + IL_002e: ldloca.s V_0 + IL_0030: stloc.s V_7 + IL_0032: ldloc.s V_7 + IL_0034: ldloc.3 + IL_0035: ldloc.s V_4 + IL_0037: add + IL_0038: ldloc.s V_5 + IL_003a: add + IL_003b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0040: nop + IL_0041: ldloc.1 + IL_0042: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0047: brtrue.s IL_000a + + IL_0049: ldnull + IL_004a: stloc.2 + IL_004b: leave.s IL_0062 } finally { - IL_0045: ldloc.1 - IL_0046: isinst [runtime]System.IDisposable - IL_004b: stloc.s V_6 - IL_004d: ldloc.s V_6 - IL_004f: brfalse.s IL_0059 - - IL_0051: ldloc.s V_6 - IL_0053: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0058: endfinally - IL_0059: endfinally + IL_004d: ldloc.1 + IL_004e: isinst [runtime]System.IDisposable + IL_0053: stloc.s V_8 + IL_0055: ldloc.s V_8 + IL_0057: brfalse.s IL_0061 + + IL_0059: ldloc.s V_8 + IL_005b: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0060: endfinally + IL_0061: endfinally } - IL_005a: ldloc.2 - IL_005b: pop - IL_005c: ldloca.s V_0 - IL_005e: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0063: ret + IL_0062: ldloc.2 + IL_0063: pop + IL_0064: ldloca.s V_0 + IL_0066: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_006b: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f1(int32[] 'array') cil managed @@ -708,49 +735,52 @@ class [runtime]System.Collections.Generic.IEnumerator`1 V_1, class [runtime]System.Collections.Generic.IEnumerable`1 V_2, int32 V_3, - class [runtime]System.IDisposable V_4) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, + class [runtime]System.IDisposable V_5) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_001a + IL_0008: br.s IL_001e IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() IL_0010: stloc.3 IL_0011: ldloca.s V_0 - IL_0013: ldloc.3 - IL_0014: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0019: nop - IL_001a: ldloc.1 - IL_001b: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0020: brtrue.s IL_000a - - IL_0022: ldnull - IL_0023: stloc.2 - IL_0024: leave.s IL_003b + IL_0013: stloc.s V_4 + IL_0015: ldloc.s V_4 + IL_0017: ldloc.3 + IL_0018: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_001d: nop + IL_001e: ldloc.1 + IL_001f: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0024: brtrue.s IL_000a + + IL_0026: ldnull + IL_0027: stloc.2 + IL_0028: leave.s IL_003f } finally { - IL_0026: ldloc.1 - IL_0027: isinst [runtime]System.IDisposable - IL_002c: stloc.s V_4 - IL_002e: ldloc.s V_4 - IL_0030: brfalse.s IL_003a - - IL_0032: ldloc.s V_4 - IL_0034: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0039: endfinally - IL_003a: endfinally + IL_002a: ldloc.1 + IL_002b: isinst [runtime]System.IDisposable + IL_0030: stloc.s V_5 + IL_0032: ldloc.s V_5 + IL_0034: brfalse.s IL_003e + + IL_0036: ldloc.s V_5 + IL_0038: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_003d: endfinally + IL_003e: endfinally } - IL_003b: ldloc.2 - IL_003c: pop - IL_003d: ldloca.s V_0 - IL_003f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0044: ret + IL_003f: ldloc.2 + IL_0040: pop + IL_0041: ldloca.s V_0 + IL_0043: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0048: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f2(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, int32[] 'array') cil managed @@ -762,51 +792,54 @@ class [runtime]System.Collections.Generic.IEnumerator`1 V_1, class [runtime]System.Collections.Generic.IEnumerable`1 V_2, int32 V_3, - class [runtime]System.IDisposable V_4) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, + class [runtime]System.IDisposable V_5) IL_0000: nop IL_0001: ldarg.1 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_0020 + IL_0008: br.s IL_0024 IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() IL_0010: stloc.3 IL_0011: ldloca.s V_0 - IL_0013: ldarg.0 - IL_0014: ldloc.3 - IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001a: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_001f: nop - IL_0020: ldloc.1 - IL_0021: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0026: brtrue.s IL_000a - - IL_0028: ldnull - IL_0029: stloc.2 - IL_002a: leave.s IL_0041 + IL_0013: stloc.s V_4 + IL_0015: ldloc.s V_4 + IL_0017: ldarg.0 + IL_0018: ldloc.3 + IL_0019: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0023: nop + IL_0024: ldloc.1 + IL_0025: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_002a: brtrue.s IL_000a + + IL_002c: ldnull + IL_002d: stloc.2 + IL_002e: leave.s IL_0045 } finally { - IL_002c: ldloc.1 - IL_002d: isinst [runtime]System.IDisposable - IL_0032: stloc.s V_4 - IL_0034: ldloc.s V_4 - IL_0036: brfalse.s IL_0040 - - IL_0038: ldloc.s V_4 - IL_003a: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_003f: endfinally - IL_0040: endfinally + IL_0030: ldloc.1 + IL_0031: isinst [runtime]System.IDisposable + IL_0036: stloc.s V_5 + IL_0038: ldloc.s V_5 + IL_003a: brfalse.s IL_0044 + + IL_003c: ldloc.s V_5 + IL_003e: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0043: endfinally + IL_0044: endfinally } - IL_0041: ldloc.2 - IL_0042: pop - IL_0043: ldloca.s V_0 - IL_0045: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_004a: ret + IL_0045: ldloc.2 + IL_0046: pop + IL_0047: ldloca.s V_0 + IL_0049: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_004e: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f3(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, int32[] 'array') cil managed @@ -818,53 +851,59 @@ class [runtime]System.Collections.Generic.IEnumerator`1 V_1, class [runtime]System.Collections.Generic.IEnumerable`1 V_2, int32 V_3, - class [runtime]System.IDisposable V_4) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5, + class [runtime]System.IDisposable V_6) IL_0000: nop IL_0001: ldarg.1 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_0022 + IL_0008: br.s IL_002a IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() IL_0010: stloc.3 IL_0011: ldloca.s V_0 - IL_0013: ldarg.0 - IL_0014: ldnull - IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001a: pop - IL_001b: ldloc.3 - IL_001c: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0021: nop - IL_0022: ldloc.1 - IL_0023: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0028: brtrue.s IL_000a + IL_0013: stloc.s V_4 + IL_0015: ldloc.s V_4 + IL_0017: ldarg.0 + IL_0018: ldnull + IL_0019: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001e: pop + IL_001f: stloc.s V_5 + IL_0021: ldloc.s V_5 + IL_0023: ldloc.3 + IL_0024: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0029: nop + IL_002a: ldloc.1 + IL_002b: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0030: brtrue.s IL_000a - IL_002a: ldnull - IL_002b: stloc.2 - IL_002c: leave.s IL_0043 + IL_0032: ldnull + IL_0033: stloc.2 + IL_0034: leave.s IL_004b } finally { - IL_002e: ldloc.1 - IL_002f: isinst [runtime]System.IDisposable - IL_0034: stloc.s V_4 - IL_0036: ldloc.s V_4 - IL_0038: brfalse.s IL_0042 + IL_0036: ldloc.1 + IL_0037: isinst [runtime]System.IDisposable + IL_003c: stloc.s V_6 + IL_003e: ldloc.s V_6 + IL_0040: brfalse.s IL_004a - IL_003a: ldloc.s V_4 - IL_003c: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0041: endfinally - IL_0042: endfinally + IL_0042: ldloc.s V_6 + IL_0044: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0049: endfinally + IL_004a: endfinally } - IL_0043: ldloc.2 - IL_0044: pop - IL_0045: ldloca.s V_0 - IL_0047: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_004c: ret + IL_004b: ldloc.2 + IL_004c: pop + IL_004d: ldloca.s V_0 + IL_004f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0054: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -880,57 +919,66 @@ class [runtime]System.Collections.Generic.IEnumerator`1 V_1, class [runtime]System.Collections.Generic.IEnumerable`1 V_2, int32 V_3, - class [runtime]System.IDisposable V_4) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_6, + class [runtime]System.IDisposable V_7) IL_0000: nop IL_0001: ldarg.2 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_002a + IL_0008: br.s IL_0036 IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() IL_0010: stloc.3 IL_0011: ldloca.s V_0 - IL_0013: ldarg.0 - IL_0014: ldnull - IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001a: pop - IL_001b: ldarg.1 - IL_001c: ldnull - IL_001d: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0022: pop - IL_0023: ldloc.3 - IL_0024: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0029: nop - IL_002a: ldloc.1 - IL_002b: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0030: brtrue.s IL_000a + IL_0013: stloc.s V_4 + IL_0015: ldloc.s V_4 + IL_0017: ldarg.0 + IL_0018: ldnull + IL_0019: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001e: pop + IL_001f: stloc.s V_5 + IL_0021: ldloc.s V_5 + IL_0023: ldarg.1 + IL_0024: ldnull + IL_0025: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_002a: pop + IL_002b: stloc.s V_6 + IL_002d: ldloc.s V_6 + IL_002f: ldloc.3 + IL_0030: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0035: nop + IL_0036: ldloc.1 + IL_0037: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_003c: brtrue.s IL_000a - IL_0032: ldnull - IL_0033: stloc.2 - IL_0034: leave.s IL_004b + IL_003e: ldnull + IL_003f: stloc.2 + IL_0040: leave.s IL_0057 } finally { - IL_0036: ldloc.1 - IL_0037: isinst [runtime]System.IDisposable - IL_003c: stloc.s V_4 - IL_003e: ldloc.s V_4 - IL_0040: brfalse.s IL_004a - - IL_0042: ldloc.s V_4 - IL_0044: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0049: endfinally - IL_004a: endfinally + IL_0042: ldloc.1 + IL_0043: isinst [runtime]System.IDisposable + IL_0048: stloc.s V_7 + IL_004a: ldloc.s V_7 + IL_004c: brfalse.s IL_0056 + + IL_004e: ldloc.s V_7 + IL_0050: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0055: endfinally + IL_0056: endfinally } - IL_004b: ldloc.2 - IL_004c: pop - IL_004d: ldloca.s V_0 - IL_004f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0054: ret + IL_0057: ldloc.2 + IL_0058: pop + IL_0059: ldloca.s V_0 + IL_005b: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0060: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f5(int32[] 'array') cil managed @@ -941,49 +989,52 @@ class [runtime]System.Collections.Generic.IEnumerator`1 V_1, class [runtime]System.Collections.Generic.IEnumerable`1 V_2, int32 V_3, - class [runtime]System.IDisposable V_4) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, + class [runtime]System.IDisposable V_5) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_001a + IL_0008: br.s IL_001e IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() IL_0010: stloc.3 IL_0011: ldloca.s V_0 - IL_0013: ldloc.3 - IL_0014: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0019: nop - IL_001a: ldloc.1 - IL_001b: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0020: brtrue.s IL_000a - - IL_0022: ldnull - IL_0023: stloc.2 - IL_0024: leave.s IL_003b + IL_0013: stloc.s V_4 + IL_0015: ldloc.s V_4 + IL_0017: ldloc.3 + IL_0018: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_001d: nop + IL_001e: ldloc.1 + IL_001f: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0024: brtrue.s IL_000a + + IL_0026: ldnull + IL_0027: stloc.2 + IL_0028: leave.s IL_003f } finally { - IL_0026: ldloc.1 - IL_0027: isinst [runtime]System.IDisposable - IL_002c: stloc.s V_4 - IL_002e: ldloc.s V_4 - IL_0030: brfalse.s IL_003a - - IL_0032: ldloc.s V_4 - IL_0034: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0039: endfinally - IL_003a: endfinally + IL_002a: ldloc.1 + IL_002b: isinst [runtime]System.IDisposable + IL_0030: stloc.s V_5 + IL_0032: ldloc.s V_5 + IL_0034: brfalse.s IL_003e + + IL_0036: ldloc.s V_5 + IL_0038: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_003d: endfinally + IL_003e: endfinally } - IL_003b: ldloc.2 - IL_003c: pop - IL_003d: ldloca.s V_0 - IL_003f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0044: ret + IL_003f: ldloc.2 + IL_0040: pop + IL_0041: ldloca.s V_0 + IL_0043: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0048: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f6(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, int32[] 'array') cil managed @@ -1125,7 +1176,8 @@ class [runtime]System.Collections.Generic.IEnumerator`1 V_3, class [runtime]System.Collections.Generic.IEnumerable`1 V_4, int32 V_5, - class [runtime]System.IDisposable V_6) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_6, + class [runtime]System.IDisposable V_7) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldnull @@ -1141,46 +1193,48 @@ IL_0018: stloc.3 .try { - IL_0019: br.s IL_0031 + IL_0019: br.s IL_0035 IL_001b: ldloc.3 IL_001c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() IL_0021: stloc.s V_5 IL_0023: ldloca.s V_0 - IL_0025: ldloc.s V_5 - IL_0027: ldloc.1 - IL_0028: add - IL_0029: ldloc.2 - IL_002a: add - IL_002b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0030: nop - IL_0031: ldloc.3 - IL_0032: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0037: brtrue.s IL_001b - - IL_0039: ldnull - IL_003a: stloc.s V_4 - IL_003c: leave.s IL_0053 + IL_0025: stloc.s V_6 + IL_0027: ldloc.s V_6 + IL_0029: ldloc.s V_5 + IL_002b: ldloc.1 + IL_002c: add + IL_002d: ldloc.2 + IL_002e: add + IL_002f: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0034: nop + IL_0035: ldloc.3 + IL_0036: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_003b: brtrue.s IL_001b + + IL_003d: ldnull + IL_003e: stloc.s V_4 + IL_0040: leave.s IL_0057 } finally { - IL_003e: ldloc.3 - IL_003f: isinst [runtime]System.IDisposable - IL_0044: stloc.s V_6 - IL_0046: ldloc.s V_6 - IL_0048: brfalse.s IL_0052 - - IL_004a: ldloc.s V_6 - IL_004c: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0051: endfinally - IL_0052: endfinally + IL_0042: ldloc.3 + IL_0043: isinst [runtime]System.IDisposable + IL_0048: stloc.s V_7 + IL_004a: ldloc.s V_7 + IL_004c: brfalse.s IL_0056 + + IL_004e: ldloc.s V_7 + IL_0050: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0055: endfinally + IL_0056: endfinally } - IL_0053: ldloc.s V_4 - IL_0055: pop - IL_0056: ldloca.s V_0 - IL_0058: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_005d: ret + IL_0057: ldloc.s V_4 + IL_0059: pop + IL_005a: ldloca.s V_0 + IL_005c: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0061: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -1197,7 +1251,8 @@ class [runtime]System.Collections.Generic.IEnumerator`1 V_2, class [runtime]System.Collections.Generic.IEnumerable`1 V_3, int32 V_4, - class [runtime]System.IDisposable V_5) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5, + class [runtime]System.IDisposable V_6) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldnull @@ -1213,44 +1268,46 @@ IL_0018: stloc.2 .try { - IL_0019: br.s IL_002f + IL_0019: br.s IL_0033 IL_001b: ldloc.2 IL_001c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() IL_0021: stloc.s V_4 IL_0023: ldloca.s V_0 - IL_0025: ldloc.s V_4 - IL_0027: ldloc.1 - IL_0028: add - IL_0029: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_002e: nop - IL_002f: ldloc.2 - IL_0030: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0035: brtrue.s IL_001b + IL_0025: stloc.s V_5 + IL_0027: ldloc.s V_5 + IL_0029: ldloc.s V_4 + IL_002b: ldloc.1 + IL_002c: add + IL_002d: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0032: nop + IL_0033: ldloc.2 + IL_0034: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0039: brtrue.s IL_001b - IL_0037: ldnull - IL_0038: stloc.3 - IL_0039: leave.s IL_0050 + IL_003b: ldnull + IL_003c: stloc.3 + IL_003d: leave.s IL_0054 } finally { - IL_003b: ldloc.2 - IL_003c: isinst [runtime]System.IDisposable - IL_0041: stloc.s V_5 - IL_0043: ldloc.s V_5 - IL_0045: brfalse.s IL_004f - - IL_0047: ldloc.s V_5 - IL_0049: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_004e: endfinally - IL_004f: endfinally + IL_003f: ldloc.2 + IL_0040: isinst [runtime]System.IDisposable + IL_0045: stloc.s V_6 + IL_0047: ldloc.s V_6 + IL_0049: brfalse.s IL_0053 + + IL_004b: ldloc.s V_6 + IL_004d: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0052: endfinally + IL_0053: endfinally } - IL_0050: ldloc.3 - IL_0051: pop - IL_0052: ldloca.s V_0 - IL_0054: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0059: ret + IL_0054: ldloc.3 + IL_0055: pop + IL_0056: ldloca.s V_0 + IL_0058: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_005d: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -1266,7 +1323,8 @@ class [runtime]System.Collections.Generic.IEnumerator`1 V_1, class [runtime]System.Collections.Generic.IEnumerable`1 V_2, int32 V_3, - class [runtime]System.IDisposable V_4) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, + class [runtime]System.IDisposable V_5) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldnull @@ -1282,42 +1340,44 @@ IL_0018: stloc.1 .try { - IL_0019: br.s IL_002b + IL_0019: br.s IL_002f IL_001b: ldloc.1 IL_001c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() IL_0021: stloc.3 IL_0022: ldloca.s V_0 - IL_0024: ldloc.3 - IL_0025: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_002a: nop - IL_002b: ldloc.1 - IL_002c: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0031: brtrue.s IL_001b + IL_0024: stloc.s V_4 + IL_0026: ldloc.s V_4 + IL_0028: ldloc.3 + IL_0029: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_002e: nop + IL_002f: ldloc.1 + IL_0030: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0035: brtrue.s IL_001b - IL_0033: ldnull - IL_0034: stloc.2 - IL_0035: leave.s IL_004c + IL_0037: ldnull + IL_0038: stloc.2 + IL_0039: leave.s IL_0050 } finally { - IL_0037: ldloc.1 - IL_0038: isinst [runtime]System.IDisposable - IL_003d: stloc.s V_4 - IL_003f: ldloc.s V_4 - IL_0041: brfalse.s IL_004b - - IL_0043: ldloc.s V_4 - IL_0045: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_004a: endfinally - IL_004b: endfinally + IL_003b: ldloc.1 + IL_003c: isinst [runtime]System.IDisposable + IL_0041: stloc.s V_5 + IL_0043: ldloc.s V_5 + IL_0045: brfalse.s IL_004f + + IL_0047: ldloc.s V_5 + IL_0049: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_004e: endfinally + IL_004f: endfinally } - IL_004c: ldloc.2 - IL_004d: pop - IL_004e: ldloca.s V_0 - IL_0050: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0055: ret + IL_0050: ldloc.2 + IL_0051: pop + IL_0052: ldloca.s V_0 + IL_0054: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0059: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -1334,7 +1394,8 @@ class [runtime]System.Collections.Generic.IEnumerator`1 V_2, class [runtime]System.Collections.Generic.IEnumerable`1 V_3, int32 V_4, - class [runtime]System.IDisposable V_5) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5, + class [runtime]System.IDisposable V_6) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldnull @@ -1350,44 +1411,46 @@ IL_0018: stloc.2 .try { - IL_0019: br.s IL_002f + IL_0019: br.s IL_0033 IL_001b: ldloc.2 IL_001c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() IL_0021: stloc.s V_4 IL_0023: ldloca.s V_0 - IL_0025: ldloc.s V_4 - IL_0027: ldloc.1 - IL_0028: add - IL_0029: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_002e: nop - IL_002f: ldloc.2 - IL_0030: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0035: brtrue.s IL_001b + IL_0025: stloc.s V_5 + IL_0027: ldloc.s V_5 + IL_0029: ldloc.s V_4 + IL_002b: ldloc.1 + IL_002c: add + IL_002d: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0032: nop + IL_0033: ldloc.2 + IL_0034: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0039: brtrue.s IL_001b - IL_0037: ldnull - IL_0038: stloc.3 - IL_0039: leave.s IL_0050 + IL_003b: ldnull + IL_003c: stloc.3 + IL_003d: leave.s IL_0054 } finally { - IL_003b: ldloc.2 - IL_003c: isinst [runtime]System.IDisposable - IL_0041: stloc.s V_5 - IL_0043: ldloc.s V_5 - IL_0045: brfalse.s IL_004f - - IL_0047: ldloc.s V_5 - IL_0049: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_004e: endfinally - IL_004f: endfinally + IL_003f: ldloc.2 + IL_0040: isinst [runtime]System.IDisposable + IL_0045: stloc.s V_6 + IL_0047: ldloc.s V_6 + IL_0049: brfalse.s IL_0053 + + IL_004b: ldloc.s V_6 + IL_004d: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0052: endfinally + IL_0053: endfinally } - IL_0050: ldloc.3 - IL_0051: pop - IL_0052: ldloca.s V_0 - IL_0054: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0059: ret + IL_0054: ldloc.3 + IL_0055: pop + IL_0056: ldloca.s V_0 + IL_0058: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_005d: ret } } @@ -1409,4 +1472,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInList_ToArray.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInList_ToArray.fs.il.bsl index e92765fef10..708696be7ba 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInList_ToArray.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInList_ToArray.fs.il.bsl @@ -41,49 +41,52 @@ class [runtime]System.Collections.Generic.IEnumerator`1 V_1, class [runtime]System.Collections.Generic.IEnumerable`1 V_2, int32 V_3, - class [runtime]System.IDisposable V_4) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_4, + class [runtime]System.IDisposable V_5) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_001a + IL_0008: br.s IL_001e IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() IL_0010: stloc.3 IL_0011: ldloca.s V_0 - IL_0013: ldloc.3 - IL_0014: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_0019: nop - IL_001a: ldloc.1 - IL_001b: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0020: brtrue.s IL_000a - - IL_0022: ldnull - IL_0023: stloc.2 - IL_0024: leave.s IL_003b + IL_0013: stloc.s V_4 + IL_0015: ldloc.s V_4 + IL_0017: ldloc.3 + IL_0018: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_001d: nop + IL_001e: ldloc.1 + IL_001f: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0024: brtrue.s IL_000a + + IL_0026: ldnull + IL_0027: stloc.2 + IL_0028: leave.s IL_003f } finally { - IL_0026: ldloc.1 - IL_0027: isinst [runtime]System.IDisposable - IL_002c: stloc.s V_4 - IL_002e: ldloc.s V_4 - IL_0030: brfalse.s IL_003a - - IL_0032: ldloc.s V_4 - IL_0034: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0039: endfinally - IL_003a: endfinally + IL_002a: ldloc.1 + IL_002b: isinst [runtime]System.IDisposable + IL_0030: stloc.s V_5 + IL_0032: ldloc.s V_5 + IL_0034: brfalse.s IL_003e + + IL_0036: ldloc.s V_5 + IL_0038: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_003d: endfinally + IL_003e: endfinally } - IL_003b: ldloc.2 - IL_003c: pop - IL_003d: ldloca.s V_0 - IL_003f: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0044: ret + IL_003f: ldloc.2 + IL_0040: pop + IL_0041: ldloca.s V_0 + IL_0043: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_0048: ret } .method public static int32[] f00(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed @@ -94,49 +97,52 @@ class [runtime]System.Collections.Generic.IEnumerator`1 V_1, class [runtime]System.Collections.Generic.IEnumerable`1 V_2, int32 V_3, - class [runtime]System.IDisposable V_4) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_4, + class [runtime]System.IDisposable V_5) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_001a + IL_0008: br.s IL_001e IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() IL_0010: stloc.3 IL_0011: ldloca.s V_0 - IL_0013: ldloc.3 - IL_0014: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_0019: nop - IL_001a: ldloc.1 - IL_001b: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0020: brtrue.s IL_000a - - IL_0022: ldnull - IL_0023: stloc.2 - IL_0024: leave.s IL_003b + IL_0013: stloc.s V_4 + IL_0015: ldloc.s V_4 + IL_0017: ldloc.3 + IL_0018: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_001d: nop + IL_001e: ldloc.1 + IL_001f: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0024: brtrue.s IL_000a + + IL_0026: ldnull + IL_0027: stloc.2 + IL_0028: leave.s IL_003f } finally { - IL_0026: ldloc.1 - IL_0027: isinst [runtime]System.IDisposable - IL_002c: stloc.s V_4 - IL_002e: ldloc.s V_4 - IL_0030: brfalse.s IL_003a - - IL_0032: ldloc.s V_4 - IL_0034: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0039: endfinally - IL_003a: endfinally + IL_002a: ldloc.1 + IL_002b: isinst [runtime]System.IDisposable + IL_0030: stloc.s V_5 + IL_0032: ldloc.s V_5 + IL_0034: brfalse.s IL_003e + + IL_0036: ldloc.s V_5 + IL_0038: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_003d: endfinally + IL_003e: endfinally } - IL_003b: ldloc.2 - IL_003c: pop - IL_003d: ldloca.s V_0 - IL_003f: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0044: ret + IL_003f: ldloc.2 + IL_0040: pop + IL_0041: ldloca.s V_0 + IL_0043: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_0048: ret } .method public static int32[] f000(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed @@ -201,49 +207,52 @@ class [runtime]System.Collections.Generic.IEnumerator`1 V_1, class [runtime]System.Collections.Generic.IEnumerable`1 V_2, int32 V_3, - class [runtime]System.IDisposable V_4) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_4, + class [runtime]System.IDisposable V_5) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_001a + IL_0008: br.s IL_001e IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() IL_0010: stloc.3 IL_0011: ldloca.s V_0 - IL_0013: ldloc.3 - IL_0014: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_0019: nop - IL_001a: ldloc.1 - IL_001b: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0020: brtrue.s IL_000a - - IL_0022: ldnull - IL_0023: stloc.2 - IL_0024: leave.s IL_003b + IL_0013: stloc.s V_4 + IL_0015: ldloc.s V_4 + IL_0017: ldloc.3 + IL_0018: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_001d: nop + IL_001e: ldloc.1 + IL_001f: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0024: brtrue.s IL_000a + + IL_0026: ldnull + IL_0027: stloc.2 + IL_0028: leave.s IL_003f } finally { - IL_0026: ldloc.1 - IL_0027: isinst [runtime]System.IDisposable - IL_002c: stloc.s V_4 - IL_002e: ldloc.s V_4 - IL_0030: brfalse.s IL_003a - - IL_0032: ldloc.s V_4 - IL_0034: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0039: endfinally - IL_003a: endfinally + IL_002a: ldloc.1 + IL_002b: isinst [runtime]System.IDisposable + IL_0030: stloc.s V_5 + IL_0032: ldloc.s V_5 + IL_0034: brfalse.s IL_003e + + IL_0036: ldloc.s V_5 + IL_0038: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_003d: endfinally + IL_003e: endfinally } - IL_003b: ldloc.2 - IL_003c: pop - IL_003d: ldloca.s V_0 - IL_003f: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0044: ret + IL_003f: ldloc.2 + IL_0040: pop + IL_0041: ldloca.s V_0 + IL_0043: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_0048: ret } .method public static int32[] f00000(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list, @@ -331,14 +340,15 @@ int32 V_3, int32 V_4, int32 V_5, - class [runtime]System.IDisposable V_6) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_6, + class [runtime]System.IDisposable V_7) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_002a + IL_0008: br.s IL_002e IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() @@ -352,40 +362,42 @@ IL_0018: add IL_0019: stloc.s V_5 IL_001b: ldloca.s V_0 - IL_001d: ldloc.3 - IL_001e: ldloc.s V_4 - IL_0020: add - IL_0021: ldloc.s V_5 - IL_0023: add - IL_0024: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_0029: nop - IL_002a: ldloc.1 - IL_002b: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0030: brtrue.s IL_000a + IL_001d: stloc.s V_6 + IL_001f: ldloc.s V_6 + IL_0021: ldloc.3 + IL_0022: ldloc.s V_4 + IL_0024: add + IL_0025: ldloc.s V_5 + IL_0027: add + IL_0028: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_002d: nop + IL_002e: ldloc.1 + IL_002f: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0034: brtrue.s IL_000a - IL_0032: ldnull - IL_0033: stloc.2 - IL_0034: leave.s IL_004b + IL_0036: ldnull + IL_0037: stloc.2 + IL_0038: leave.s IL_004f } finally { - IL_0036: ldloc.1 - IL_0037: isinst [runtime]System.IDisposable - IL_003c: stloc.s V_6 - IL_003e: ldloc.s V_6 - IL_0040: brfalse.s IL_004a - - IL_0042: ldloc.s V_6 - IL_0044: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0049: endfinally - IL_004a: endfinally + IL_003a: ldloc.1 + IL_003b: isinst [runtime]System.IDisposable + IL_0040: stloc.s V_7 + IL_0042: ldloc.s V_7 + IL_0044: brfalse.s IL_004e + + IL_0046: ldloc.s V_7 + IL_0048: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_004d: endfinally + IL_004e: endfinally } - IL_004b: ldloc.2 - IL_004c: pop - IL_004d: ldloca.s V_0 - IL_004f: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0054: ret + IL_004f: ldloc.2 + IL_0050: pop + IL_0051: ldloca.s V_0 + IL_0053: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_0058: ret } .method public static int32[] f0000000(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list, @@ -403,14 +415,15 @@ int32 V_3, int32 V_4, int32 V_5, - class [runtime]System.IDisposable V_6) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_6, + class [runtime]System.IDisposable V_7) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_0032 + IL_0008: br.s IL_0036 IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() @@ -428,40 +441,42 @@ IL_0020: add IL_0021: stloc.s V_5 IL_0023: ldloca.s V_0 - IL_0025: ldloc.3 - IL_0026: ldloc.s V_4 - IL_0028: add - IL_0029: ldloc.s V_5 - IL_002b: add - IL_002c: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_0031: nop - IL_0032: ldloc.1 - IL_0033: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0038: brtrue.s IL_000a + IL_0025: stloc.s V_6 + IL_0027: ldloc.s V_6 + IL_0029: ldloc.3 + IL_002a: ldloc.s V_4 + IL_002c: add + IL_002d: ldloc.s V_5 + IL_002f: add + IL_0030: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_0035: nop + IL_0036: ldloc.1 + IL_0037: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_003c: brtrue.s IL_000a - IL_003a: ldnull - IL_003b: stloc.2 - IL_003c: leave.s IL_0053 + IL_003e: ldnull + IL_003f: stloc.2 + IL_0040: leave.s IL_0057 } finally { - IL_003e: ldloc.1 - IL_003f: isinst [runtime]System.IDisposable - IL_0044: stloc.s V_6 - IL_0046: ldloc.s V_6 - IL_0048: brfalse.s IL_0052 - - IL_004a: ldloc.s V_6 - IL_004c: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0051: endfinally - IL_0052: endfinally + IL_0042: ldloc.1 + IL_0043: isinst [runtime]System.IDisposable + IL_0048: stloc.s V_7 + IL_004a: ldloc.s V_7 + IL_004c: brfalse.s IL_0056 + + IL_004e: ldloc.s V_7 + IL_0050: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0055: endfinally + IL_0056: endfinally } - IL_0053: ldloc.2 - IL_0054: pop - IL_0055: ldloca.s V_0 - IL_0057: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_005c: ret + IL_0057: ldloc.2 + IL_0058: pop + IL_0059: ldloca.s V_0 + IL_005b: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_0060: ret } .method public static int32[] f00000000(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list, @@ -479,14 +494,15 @@ int32 V_3, int32 V_4, int32 V_5, - class [runtime]System.IDisposable V_6) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_6, + class [runtime]System.IDisposable V_7) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_0032 + IL_0008: br.s IL_0036 IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() @@ -504,40 +520,42 @@ IL_0020: add IL_0021: stloc.s V_5 IL_0023: ldloca.s V_0 - IL_0025: ldloc.3 - IL_0026: ldloc.s V_4 - IL_0028: add - IL_0029: ldloc.s V_5 - IL_002b: add - IL_002c: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_0031: nop - IL_0032: ldloc.1 - IL_0033: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0038: brtrue.s IL_000a + IL_0025: stloc.s V_6 + IL_0027: ldloc.s V_6 + IL_0029: ldloc.3 + IL_002a: ldloc.s V_4 + IL_002c: add + IL_002d: ldloc.s V_5 + IL_002f: add + IL_0030: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_0035: nop + IL_0036: ldloc.1 + IL_0037: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_003c: brtrue.s IL_000a - IL_003a: ldnull - IL_003b: stloc.2 - IL_003c: leave.s IL_0053 + IL_003e: ldnull + IL_003f: stloc.2 + IL_0040: leave.s IL_0057 } finally { - IL_003e: ldloc.1 - IL_003f: isinst [runtime]System.IDisposable - IL_0044: stloc.s V_6 - IL_0046: ldloc.s V_6 - IL_0048: brfalse.s IL_0052 - - IL_004a: ldloc.s V_6 - IL_004c: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0051: endfinally - IL_0052: endfinally + IL_0042: ldloc.1 + IL_0043: isinst [runtime]System.IDisposable + IL_0048: stloc.s V_7 + IL_004a: ldloc.s V_7 + IL_004c: brfalse.s IL_0056 + + IL_004e: ldloc.s V_7 + IL_0050: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0055: endfinally + IL_0056: endfinally } - IL_0053: ldloc.2 - IL_0054: pop - IL_0055: ldloca.s V_0 - IL_0057: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_005c: ret + IL_0057: ldloc.2 + IL_0058: pop + IL_0059: ldloca.s V_0 + IL_005b: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_0060: ret } .method public static int32[] f000000000(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list, @@ -555,14 +573,15 @@ int32 V_3, int32 V_4, int32 V_5, - class [runtime]System.IDisposable V_6) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_6, + class [runtime]System.IDisposable V_7) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_0032 + IL_0008: br.s IL_0036 IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() @@ -580,40 +599,42 @@ IL_001d: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) IL_0022: pop IL_0023: ldloca.s V_0 - IL_0025: ldloc.3 - IL_0026: ldloc.s V_4 - IL_0028: add - IL_0029: ldloc.s V_5 - IL_002b: add - IL_002c: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_0031: nop - IL_0032: ldloc.1 - IL_0033: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0038: brtrue.s IL_000a + IL_0025: stloc.s V_6 + IL_0027: ldloc.s V_6 + IL_0029: ldloc.3 + IL_002a: ldloc.s V_4 + IL_002c: add + IL_002d: ldloc.s V_5 + IL_002f: add + IL_0030: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_0035: nop + IL_0036: ldloc.1 + IL_0037: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_003c: brtrue.s IL_000a - IL_003a: ldnull - IL_003b: stloc.2 - IL_003c: leave.s IL_0053 + IL_003e: ldnull + IL_003f: stloc.2 + IL_0040: leave.s IL_0057 } finally { - IL_003e: ldloc.1 - IL_003f: isinst [runtime]System.IDisposable - IL_0044: stloc.s V_6 - IL_0046: ldloc.s V_6 - IL_0048: brfalse.s IL_0052 - - IL_004a: ldloc.s V_6 - IL_004c: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0051: endfinally - IL_0052: endfinally + IL_0042: ldloc.1 + IL_0043: isinst [runtime]System.IDisposable + IL_0048: stloc.s V_7 + IL_004a: ldloc.s V_7 + IL_004c: brfalse.s IL_0056 + + IL_004e: ldloc.s V_7 + IL_0050: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0055: endfinally + IL_0056: endfinally } - IL_0053: ldloc.2 - IL_0054: pop - IL_0055: ldloca.s V_0 - IL_0057: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_005c: ret + IL_0057: ldloc.2 + IL_0058: pop + IL_0059: ldloca.s V_0 + IL_005b: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_0060: ret } .method public static int32[] f0000000000(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list, @@ -631,14 +652,16 @@ int32 V_3, int32 V_4, int32 V_5, - class [runtime]System.IDisposable V_6) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_6, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_7, + class [runtime]System.IDisposable V_8) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_0039 + IL_0008: br.s IL_0041 IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() @@ -652,46 +675,50 @@ IL_0018: add IL_0019: stloc.s V_5 IL_001b: ldloca.s V_0 - IL_001d: ldarg.1 - IL_001e: ldnull - IL_001f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0024: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_0029: nop - IL_002a: ldloca.s V_0 - IL_002c: ldloc.3 - IL_002d: ldloc.s V_4 - IL_002f: add - IL_0030: ldloc.s V_5 - IL_0032: add - IL_0033: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_0038: nop - IL_0039: ldloc.1 - IL_003a: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_003f: brtrue.s IL_000a - - IL_0041: ldnull - IL_0042: stloc.2 - IL_0043: leave.s IL_005a + IL_001d: stloc.s V_6 + IL_001f: ldloc.s V_6 + IL_0021: ldarg.1 + IL_0022: ldnull + IL_0023: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0028: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_002d: nop + IL_002e: ldloca.s V_0 + IL_0030: stloc.s V_7 + IL_0032: ldloc.s V_7 + IL_0034: ldloc.3 + IL_0035: ldloc.s V_4 + IL_0037: add + IL_0038: ldloc.s V_5 + IL_003a: add + IL_003b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_0040: nop + IL_0041: ldloc.1 + IL_0042: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0047: brtrue.s IL_000a + + IL_0049: ldnull + IL_004a: stloc.2 + IL_004b: leave.s IL_0062 } finally { - IL_0045: ldloc.1 - IL_0046: isinst [runtime]System.IDisposable - IL_004b: stloc.s V_6 - IL_004d: ldloc.s V_6 - IL_004f: brfalse.s IL_0059 - - IL_0051: ldloc.s V_6 - IL_0053: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0058: endfinally - IL_0059: endfinally + IL_004d: ldloc.1 + IL_004e: isinst [runtime]System.IDisposable + IL_0053: stloc.s V_8 + IL_0055: ldloc.s V_8 + IL_0057: brfalse.s IL_0061 + + IL_0059: ldloc.s V_8 + IL_005b: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0060: endfinally + IL_0061: endfinally } - IL_005a: ldloc.2 - IL_005b: pop - IL_005c: ldloca.s V_0 - IL_005e: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0063: ret + IL_0062: ldloc.2 + IL_0063: pop + IL_0064: ldloca.s V_0 + IL_0066: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_006b: ret } .method public static int32[] f1(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed @@ -702,49 +729,52 @@ class [runtime]System.Collections.Generic.IEnumerator`1 V_1, class [runtime]System.Collections.Generic.IEnumerable`1 V_2, int32 V_3, - class [runtime]System.IDisposable V_4) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_4, + class [runtime]System.IDisposable V_5) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_001a + IL_0008: br.s IL_001e IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() IL_0010: stloc.3 IL_0011: ldloca.s V_0 - IL_0013: ldloc.3 - IL_0014: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_0019: nop - IL_001a: ldloc.1 - IL_001b: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0020: brtrue.s IL_000a - - IL_0022: ldnull - IL_0023: stloc.2 - IL_0024: leave.s IL_003b + IL_0013: stloc.s V_4 + IL_0015: ldloc.s V_4 + IL_0017: ldloc.3 + IL_0018: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_001d: nop + IL_001e: ldloc.1 + IL_001f: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0024: brtrue.s IL_000a + + IL_0026: ldnull + IL_0027: stloc.2 + IL_0028: leave.s IL_003f } finally { - IL_0026: ldloc.1 - IL_0027: isinst [runtime]System.IDisposable - IL_002c: stloc.s V_4 - IL_002e: ldloc.s V_4 - IL_0030: brfalse.s IL_003a - - IL_0032: ldloc.s V_4 - IL_0034: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0039: endfinally - IL_003a: endfinally + IL_002a: ldloc.1 + IL_002b: isinst [runtime]System.IDisposable + IL_0030: stloc.s V_5 + IL_0032: ldloc.s V_5 + IL_0034: brfalse.s IL_003e + + IL_0036: ldloc.s V_5 + IL_0038: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_003d: endfinally + IL_003e: endfinally } - IL_003b: ldloc.2 - IL_003c: pop - IL_003d: ldloca.s V_0 - IL_003f: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0044: ret + IL_003f: ldloc.2 + IL_0040: pop + IL_0041: ldloca.s V_0 + IL_0043: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_0048: ret } .method public static !!a[] f2(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -757,51 +787,54 @@ class [runtime]System.Collections.Generic.IEnumerator`1 V_1, class [runtime]System.Collections.Generic.IEnumerable`1 V_2, int32 V_3, - class [runtime]System.IDisposable V_4) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_4, + class [runtime]System.IDisposable V_5) IL_0000: nop IL_0001: ldarg.1 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_0020 + IL_0008: br.s IL_0024 IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() IL_0010: stloc.3 IL_0011: ldloca.s V_0 - IL_0013: ldarg.0 - IL_0014: ldloc.3 - IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001a: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_001f: nop - IL_0020: ldloc.1 - IL_0021: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0026: brtrue.s IL_000a - - IL_0028: ldnull - IL_0029: stloc.2 - IL_002a: leave.s IL_0041 + IL_0013: stloc.s V_4 + IL_0015: ldloc.s V_4 + IL_0017: ldarg.0 + IL_0018: ldloc.3 + IL_0019: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_0023: nop + IL_0024: ldloc.1 + IL_0025: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_002a: brtrue.s IL_000a + + IL_002c: ldnull + IL_002d: stloc.2 + IL_002e: leave.s IL_0045 } finally { - IL_002c: ldloc.1 - IL_002d: isinst [runtime]System.IDisposable - IL_0032: stloc.s V_4 - IL_0034: ldloc.s V_4 - IL_0036: brfalse.s IL_0040 - - IL_0038: ldloc.s V_4 - IL_003a: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_003f: endfinally - IL_0040: endfinally + IL_0030: ldloc.1 + IL_0031: isinst [runtime]System.IDisposable + IL_0036: stloc.s V_5 + IL_0038: ldloc.s V_5 + IL_003a: brfalse.s IL_0044 + + IL_003c: ldloc.s V_5 + IL_003e: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0043: endfinally + IL_0044: endfinally } - IL_0041: ldloc.2 - IL_0042: pop - IL_0043: ldloca.s V_0 - IL_0045: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_004a: ret + IL_0045: ldloc.2 + IL_0046: pop + IL_0047: ldloca.s V_0 + IL_0049: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_004e: ret } .method public static int32[] f3(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -814,53 +847,59 @@ class [runtime]System.Collections.Generic.IEnumerator`1 V_1, class [runtime]System.Collections.Generic.IEnumerable`1 V_2, int32 V_3, - class [runtime]System.IDisposable V_4) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_5, + class [runtime]System.IDisposable V_6) IL_0000: nop IL_0001: ldarg.1 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_0022 + IL_0008: br.s IL_002a IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() IL_0010: stloc.3 IL_0011: ldloca.s V_0 - IL_0013: ldarg.0 - IL_0014: ldnull - IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001a: pop - IL_001b: ldloc.3 - IL_001c: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_0021: nop - IL_0022: ldloc.1 - IL_0023: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0028: brtrue.s IL_000a + IL_0013: stloc.s V_4 + IL_0015: ldloc.s V_4 + IL_0017: ldarg.0 + IL_0018: ldnull + IL_0019: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001e: pop + IL_001f: stloc.s V_5 + IL_0021: ldloc.s V_5 + IL_0023: ldloc.3 + IL_0024: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_0029: nop + IL_002a: ldloc.1 + IL_002b: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0030: brtrue.s IL_000a - IL_002a: ldnull - IL_002b: stloc.2 - IL_002c: leave.s IL_0043 + IL_0032: ldnull + IL_0033: stloc.2 + IL_0034: leave.s IL_004b } finally { - IL_002e: ldloc.1 - IL_002f: isinst [runtime]System.IDisposable - IL_0034: stloc.s V_4 - IL_0036: ldloc.s V_4 - IL_0038: brfalse.s IL_0042 + IL_0036: ldloc.1 + IL_0037: isinst [runtime]System.IDisposable + IL_003c: stloc.s V_6 + IL_003e: ldloc.s V_6 + IL_0040: brfalse.s IL_004a - IL_003a: ldloc.s V_4 - IL_003c: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0041: endfinally - IL_0042: endfinally + IL_0042: ldloc.s V_6 + IL_0044: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0049: endfinally + IL_004a: endfinally } - IL_0043: ldloc.2 - IL_0044: pop - IL_0045: ldloca.s V_0 - IL_0047: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_004c: ret + IL_004b: ldloc.2 + IL_004c: pop + IL_004d: ldloca.s V_0 + IL_004f: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_0054: ret } .method public static int32[] f4(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -875,57 +914,66 @@ class [runtime]System.Collections.Generic.IEnumerator`1 V_1, class [runtime]System.Collections.Generic.IEnumerable`1 V_2, int32 V_3, - class [runtime]System.IDisposable V_4) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_5, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_6, + class [runtime]System.IDisposable V_7) IL_0000: nop IL_0001: ldarg.2 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_002a + IL_0008: br.s IL_0036 IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() IL_0010: stloc.3 IL_0011: ldloca.s V_0 - IL_0013: ldarg.0 - IL_0014: ldnull - IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001a: pop - IL_001b: ldarg.1 - IL_001c: ldnull - IL_001d: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0022: pop - IL_0023: ldloc.3 - IL_0024: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_0029: nop - IL_002a: ldloc.1 - IL_002b: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0030: brtrue.s IL_000a + IL_0013: stloc.s V_4 + IL_0015: ldloc.s V_4 + IL_0017: ldarg.0 + IL_0018: ldnull + IL_0019: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001e: pop + IL_001f: stloc.s V_5 + IL_0021: ldloc.s V_5 + IL_0023: ldarg.1 + IL_0024: ldnull + IL_0025: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_002a: pop + IL_002b: stloc.s V_6 + IL_002d: ldloc.s V_6 + IL_002f: ldloc.3 + IL_0030: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_0035: nop + IL_0036: ldloc.1 + IL_0037: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_003c: brtrue.s IL_000a - IL_0032: ldnull - IL_0033: stloc.2 - IL_0034: leave.s IL_004b + IL_003e: ldnull + IL_003f: stloc.2 + IL_0040: leave.s IL_0057 } finally { - IL_0036: ldloc.1 - IL_0037: isinst [runtime]System.IDisposable - IL_003c: stloc.s V_4 - IL_003e: ldloc.s V_4 - IL_0040: brfalse.s IL_004a - - IL_0042: ldloc.s V_4 - IL_0044: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0049: endfinally - IL_004a: endfinally + IL_0042: ldloc.1 + IL_0043: isinst [runtime]System.IDisposable + IL_0048: stloc.s V_7 + IL_004a: ldloc.s V_7 + IL_004c: brfalse.s IL_0056 + + IL_004e: ldloc.s V_7 + IL_0050: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0055: endfinally + IL_0056: endfinally } - IL_004b: ldloc.2 - IL_004c: pop - IL_004d: ldloca.s V_0 - IL_004f: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0054: ret + IL_0057: ldloc.2 + IL_0058: pop + IL_0059: ldloca.s V_0 + IL_005b: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_0060: ret } .method public static int32[] f5(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed @@ -936,49 +984,52 @@ class [runtime]System.Collections.Generic.IEnumerator`1 V_1, class [runtime]System.Collections.Generic.IEnumerable`1 V_2, int32 V_3, - class [runtime]System.IDisposable V_4) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_4, + class [runtime]System.IDisposable V_5) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_001a + IL_0008: br.s IL_001e IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() IL_0010: stloc.3 IL_0011: ldloca.s V_0 - IL_0013: ldloc.3 - IL_0014: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_0019: nop - IL_001a: ldloc.1 - IL_001b: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0020: brtrue.s IL_000a - - IL_0022: ldnull - IL_0023: stloc.2 - IL_0024: leave.s IL_003b + IL_0013: stloc.s V_4 + IL_0015: ldloc.s V_4 + IL_0017: ldloc.3 + IL_0018: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_001d: nop + IL_001e: ldloc.1 + IL_001f: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0024: brtrue.s IL_000a + + IL_0026: ldnull + IL_0027: stloc.2 + IL_0028: leave.s IL_003f } finally { - IL_0026: ldloc.1 - IL_0027: isinst [runtime]System.IDisposable - IL_002c: stloc.s V_4 - IL_002e: ldloc.s V_4 - IL_0030: brfalse.s IL_003a - - IL_0032: ldloc.s V_4 - IL_0034: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0039: endfinally - IL_003a: endfinally + IL_002a: ldloc.1 + IL_002b: isinst [runtime]System.IDisposable + IL_0030: stloc.s V_5 + IL_0032: ldloc.s V_5 + IL_0034: brfalse.s IL_003e + + IL_0036: ldloc.s V_5 + IL_0038: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_003d: endfinally + IL_003e: endfinally } - IL_003b: ldloc.2 - IL_003c: pop - IL_003d: ldloca.s V_0 - IL_003f: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0044: ret + IL_003f: ldloc.2 + IL_0040: pop + IL_0041: ldloca.s V_0 + IL_0043: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_0048: ret } .method public static int32[] f6(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -1119,7 +1170,8 @@ class [runtime]System.Collections.Generic.IEnumerator`1 V_3, class [runtime]System.Collections.Generic.IEnumerable`1 V_4, int32 V_5, - class [runtime]System.IDisposable V_6) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_6, + class [runtime]System.IDisposable V_7) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldnull @@ -1135,46 +1187,48 @@ IL_0018: stloc.3 .try { - IL_0019: br.s IL_0031 + IL_0019: br.s IL_0035 IL_001b: ldloc.3 IL_001c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() IL_0021: stloc.s V_5 IL_0023: ldloca.s V_0 - IL_0025: ldloc.s V_5 - IL_0027: ldloc.1 - IL_0028: add - IL_0029: ldloc.2 - IL_002a: add - IL_002b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_0030: nop - IL_0031: ldloc.3 - IL_0032: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0037: brtrue.s IL_001b - - IL_0039: ldnull - IL_003a: stloc.s V_4 - IL_003c: leave.s IL_0053 + IL_0025: stloc.s V_6 + IL_0027: ldloc.s V_6 + IL_0029: ldloc.s V_5 + IL_002b: ldloc.1 + IL_002c: add + IL_002d: ldloc.2 + IL_002e: add + IL_002f: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_0034: nop + IL_0035: ldloc.3 + IL_0036: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_003b: brtrue.s IL_001b + + IL_003d: ldnull + IL_003e: stloc.s V_4 + IL_0040: leave.s IL_0057 } finally { - IL_003e: ldloc.3 - IL_003f: isinst [runtime]System.IDisposable - IL_0044: stloc.s V_6 - IL_0046: ldloc.s V_6 - IL_0048: brfalse.s IL_0052 - - IL_004a: ldloc.s V_6 - IL_004c: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0051: endfinally - IL_0052: endfinally + IL_0042: ldloc.3 + IL_0043: isinst [runtime]System.IDisposable + IL_0048: stloc.s V_7 + IL_004a: ldloc.s V_7 + IL_004c: brfalse.s IL_0056 + + IL_004e: ldloc.s V_7 + IL_0050: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0055: endfinally + IL_0056: endfinally } - IL_0053: ldloc.s V_4 - IL_0055: pop - IL_0056: ldloca.s V_0 - IL_0058: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_005d: ret + IL_0057: ldloc.s V_4 + IL_0059: pop + IL_005a: ldloca.s V_0 + IL_005c: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_0061: ret } .method public static int32[] f9(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -1190,7 +1244,8 @@ class [runtime]System.Collections.Generic.IEnumerator`1 V_2, class [runtime]System.Collections.Generic.IEnumerable`1 V_3, int32 V_4, - class [runtime]System.IDisposable V_5) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_5, + class [runtime]System.IDisposable V_6) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldnull @@ -1206,44 +1261,46 @@ IL_0018: stloc.2 .try { - IL_0019: br.s IL_002f + IL_0019: br.s IL_0033 IL_001b: ldloc.2 IL_001c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() IL_0021: stloc.s V_4 IL_0023: ldloca.s V_0 - IL_0025: ldloc.s V_4 - IL_0027: ldloc.1 - IL_0028: add - IL_0029: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_002e: nop - IL_002f: ldloc.2 - IL_0030: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0035: brtrue.s IL_001b + IL_0025: stloc.s V_5 + IL_0027: ldloc.s V_5 + IL_0029: ldloc.s V_4 + IL_002b: ldloc.1 + IL_002c: add + IL_002d: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_0032: nop + IL_0033: ldloc.2 + IL_0034: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0039: brtrue.s IL_001b - IL_0037: ldnull - IL_0038: stloc.3 - IL_0039: leave.s IL_0050 + IL_003b: ldnull + IL_003c: stloc.3 + IL_003d: leave.s IL_0054 } finally { - IL_003b: ldloc.2 - IL_003c: isinst [runtime]System.IDisposable - IL_0041: stloc.s V_5 - IL_0043: ldloc.s V_5 - IL_0045: brfalse.s IL_004f - - IL_0047: ldloc.s V_5 - IL_0049: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_004e: endfinally - IL_004f: endfinally + IL_003f: ldloc.2 + IL_0040: isinst [runtime]System.IDisposable + IL_0045: stloc.s V_6 + IL_0047: ldloc.s V_6 + IL_0049: brfalse.s IL_0053 + + IL_004b: ldloc.s V_6 + IL_004d: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0052: endfinally + IL_0053: endfinally } - IL_0050: ldloc.3 - IL_0051: pop - IL_0052: ldloca.s V_0 - IL_0054: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0059: ret + IL_0054: ldloc.3 + IL_0055: pop + IL_0056: ldloca.s V_0 + IL_0058: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_005d: ret } .method public static int32[] f10(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -1258,7 +1315,8 @@ class [runtime]System.Collections.Generic.IEnumerator`1 V_1, class [runtime]System.Collections.Generic.IEnumerable`1 V_2, int32 V_3, - class [runtime]System.IDisposable V_4) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_4, + class [runtime]System.IDisposable V_5) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldnull @@ -1274,42 +1332,44 @@ IL_0018: stloc.1 .try { - IL_0019: br.s IL_002b + IL_0019: br.s IL_002f IL_001b: ldloc.1 IL_001c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() IL_0021: stloc.3 IL_0022: ldloca.s V_0 - IL_0024: ldloc.3 - IL_0025: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_002a: nop - IL_002b: ldloc.1 - IL_002c: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0031: brtrue.s IL_001b + IL_0024: stloc.s V_4 + IL_0026: ldloc.s V_4 + IL_0028: ldloc.3 + IL_0029: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_002e: nop + IL_002f: ldloc.1 + IL_0030: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0035: brtrue.s IL_001b - IL_0033: ldnull - IL_0034: stloc.2 - IL_0035: leave.s IL_004c + IL_0037: ldnull + IL_0038: stloc.2 + IL_0039: leave.s IL_0050 } finally { - IL_0037: ldloc.1 - IL_0038: isinst [runtime]System.IDisposable - IL_003d: stloc.s V_4 - IL_003f: ldloc.s V_4 - IL_0041: brfalse.s IL_004b - - IL_0043: ldloc.s V_4 - IL_0045: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_004a: endfinally - IL_004b: endfinally + IL_003b: ldloc.1 + IL_003c: isinst [runtime]System.IDisposable + IL_0041: stloc.s V_5 + IL_0043: ldloc.s V_5 + IL_0045: brfalse.s IL_004f + + IL_0047: ldloc.s V_5 + IL_0049: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_004e: endfinally + IL_004f: endfinally } - IL_004c: ldloc.2 - IL_004d: pop - IL_004e: ldloca.s V_0 - IL_0050: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0055: ret + IL_0050: ldloc.2 + IL_0051: pop + IL_0052: ldloca.s V_0 + IL_0054: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_0059: ret } .method public static int32[] f11(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -1325,7 +1385,8 @@ class [runtime]System.Collections.Generic.IEnumerator`1 V_2, class [runtime]System.Collections.Generic.IEnumerable`1 V_3, int32 V_4, - class [runtime]System.IDisposable V_5) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_5, + class [runtime]System.IDisposable V_6) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldnull @@ -1341,44 +1402,46 @@ IL_0018: stloc.2 .try { - IL_0019: br.s IL_002f + IL_0019: br.s IL_0033 IL_001b: ldloc.2 IL_001c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() IL_0021: stloc.s V_4 IL_0023: ldloca.s V_0 - IL_0025: ldloc.s V_4 - IL_0027: ldloc.1 - IL_0028: add - IL_0029: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_002e: nop - IL_002f: ldloc.2 - IL_0030: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0035: brtrue.s IL_001b + IL_0025: stloc.s V_5 + IL_0027: ldloc.s V_5 + IL_0029: ldloc.s V_4 + IL_002b: ldloc.1 + IL_002c: add + IL_002d: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_0032: nop + IL_0033: ldloc.2 + IL_0034: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0039: brtrue.s IL_001b - IL_0037: ldnull - IL_0038: stloc.3 - IL_0039: leave.s IL_0050 + IL_003b: ldnull + IL_003c: stloc.3 + IL_003d: leave.s IL_0054 } finally { - IL_003b: ldloc.2 - IL_003c: isinst [runtime]System.IDisposable - IL_0041: stloc.s V_5 - IL_0043: ldloc.s V_5 - IL_0045: brfalse.s IL_004f - - IL_0047: ldloc.s V_5 - IL_0049: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_004e: endfinally - IL_004f: endfinally + IL_003f: ldloc.2 + IL_0040: isinst [runtime]System.IDisposable + IL_0045: stloc.s V_6 + IL_0047: ldloc.s V_6 + IL_0049: brfalse.s IL_0053 + + IL_004b: ldloc.s V_6 + IL_004d: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0052: endfinally + IL_0053: endfinally } - IL_0050: ldloc.3 - IL_0051: pop - IL_0052: ldloca.s V_0 - IL_0054: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0059: ret + IL_0054: ldloc.3 + IL_0055: pop + IL_0056: ldloca.s V_0 + IL_0058: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_005d: ret } } @@ -1400,4 +1463,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInList_ToList.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInList_ToList.fs.il.bsl index 614d86d0f56..ba4eb8a3c95 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInList_ToList.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInList_ToList.fs.il.bsl @@ -210,33 +210,36 @@ .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, - int32 V_3) + int32 V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4) IL_0000: nop IL_0001: ldarg.0 IL_0002: stloc.1 IL_0003: ldloc.1 IL_0004: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() IL_0009: stloc.2 - IL_000a: br.s IL_0025 + IL_000a: br.s IL_0029 IL_000c: ldloc.1 IL_000d: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() IL_0012: stloc.3 IL_0013: ldloca.s V_0 - IL_0015: ldloc.3 - IL_0016: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_001b: nop - IL_001c: ldloc.2 - IL_001d: stloc.1 - IL_001e: ldloc.1 - IL_001f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0024: stloc.2 - IL_0025: ldloc.2 - IL_0026: brtrue.s IL_000c - - IL_0028: ldloca.s V_0 - IL_002a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_002f: ret + IL_0015: stloc.s V_4 + IL_0017: ldloc.s V_4 + IL_0019: ldloc.3 + IL_001a: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_001f: nop + IL_0020: ldloc.2 + IL_0021: stloc.1 + IL_0022: ldloc.1 + IL_0023: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0028: stloc.2 + IL_0029: ldloc.2 + IL_002a: brtrue.s IL_000c + + IL_002c: ldloca.s V_0 + IL_002e: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0033: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f00(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed @@ -246,33 +249,36 @@ .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, - int32 V_3) + int32 V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4) IL_0000: nop IL_0001: ldarg.0 IL_0002: stloc.1 IL_0003: ldloc.1 IL_0004: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() IL_0009: stloc.2 - IL_000a: br.s IL_0025 + IL_000a: br.s IL_0029 IL_000c: ldloc.1 IL_000d: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() IL_0012: stloc.3 IL_0013: ldloca.s V_0 - IL_0015: ldloc.3 - IL_0016: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_001b: nop - IL_001c: ldloc.2 - IL_001d: stloc.1 - IL_001e: ldloc.1 - IL_001f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0024: stloc.2 - IL_0025: ldloc.2 - IL_0026: brtrue.s IL_000c - - IL_0028: ldloca.s V_0 - IL_002a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_002f: ret + IL_0015: stloc.s V_4 + IL_0017: ldloc.s V_4 + IL_0019: ldloc.3 + IL_001a: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_001f: nop + IL_0020: ldloc.2 + IL_0021: stloc.1 + IL_0022: ldloc.1 + IL_0023: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0028: stloc.2 + IL_0029: ldloc.2 + IL_002a: brtrue.s IL_000c + + IL_002c: ldloca.s V_0 + IL_002e: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0033: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f000(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed @@ -282,34 +288,39 @@ .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, - int32 V_3) + int32 V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5) IL_0000: nop IL_0001: ldarg.0 IL_0002: stloc.1 IL_0003: ldloc.1 IL_0004: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() IL_0009: stloc.2 - IL_000a: br.s IL_0026 + IL_000a: br.s IL_002d IL_000c: ldloc.1 IL_000d: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() IL_0012: stloc.3 IL_0013: ldloca.s V_0 - IL_0015: nop - IL_0016: ldloc.3 - IL_0017: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_001c: nop - IL_001d: ldloc.2 - IL_001e: stloc.1 - IL_001f: ldloc.1 - IL_0020: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0025: stloc.2 - IL_0026: ldloc.2 - IL_0027: brtrue.s IL_000c + IL_0015: stloc.s V_4 + IL_0017: ldloc.s V_4 + IL_0019: stloc.s V_5 + IL_001b: ldloc.s V_5 + IL_001d: ldloc.3 + IL_001e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0023: nop + IL_0024: ldloc.2 + IL_0025: stloc.1 + IL_0026: ldloc.1 + IL_0027: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_002c: stloc.2 + IL_002d: ldloc.2 + IL_002e: brtrue.s IL_000c - IL_0029: ldloca.s V_0 - IL_002b: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0030: ret + IL_0030: ldloca.s V_0 + IL_0032: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0037: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f0000(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed @@ -319,34 +330,39 @@ .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, - int32 V_3) + int32 V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5) IL_0000: nop IL_0001: ldarg.0 IL_0002: stloc.1 IL_0003: ldloc.1 IL_0004: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() IL_0009: stloc.2 - IL_000a: br.s IL_0026 + IL_000a: br.s IL_002d IL_000c: ldloc.1 IL_000d: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() IL_0012: stloc.3 IL_0013: ldloca.s V_0 - IL_0015: nop - IL_0016: ldloc.3 - IL_0017: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_001c: nop - IL_001d: ldloc.2 - IL_001e: stloc.1 - IL_001f: ldloc.1 - IL_0020: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0025: stloc.2 - IL_0026: ldloc.2 - IL_0027: brtrue.s IL_000c + IL_0015: stloc.s V_4 + IL_0017: ldloc.s V_4 + IL_0019: stloc.s V_5 + IL_001b: ldloc.s V_5 + IL_001d: ldloc.3 + IL_001e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0023: nop + IL_0024: ldloc.2 + IL_0025: stloc.1 + IL_0026: ldloc.1 + IL_0027: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_002c: stloc.2 + IL_002d: ldloc.2 + IL_002e: brtrue.s IL_000c - IL_0029: ldloca.s V_0 - IL_002b: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0030: ret + IL_0030: ldloca.s V_0 + IL_0032: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0037: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -363,14 +379,16 @@ class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, int32 V_3, int32 V_4, - int32 V_5) + int32 V_5, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_6, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_7) IL_0000: nop IL_0001: ldarg.0 IL_0002: stloc.1 IL_0003: ldloc.1 IL_0004: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() IL_0009: stloc.2 - IL_000a: br.s IL_0035 + IL_000a: br.s IL_003d IL_000c: ldloc.1 IL_000d: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() @@ -380,28 +398,32 @@ IL_0016: ldarg.1 IL_0017: add IL_0018: stloc.s V_4 - IL_001a: ldloc.3 - IL_001b: ldarg.2 - IL_001c: add - IL_001d: stloc.s V_5 - IL_001f: ldloc.3 - IL_0020: ldloc.s V_4 - IL_0022: add - IL_0023: ldloc.s V_5 - IL_0025: add - IL_0026: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_002b: nop - IL_002c: ldloc.2 - IL_002d: stloc.1 - IL_002e: ldloc.1 - IL_002f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0034: stloc.2 - IL_0035: ldloc.2 - IL_0036: brtrue.s IL_000c + IL_001a: stloc.s V_6 + IL_001c: ldloc.s V_6 + IL_001e: ldloc.3 + IL_001f: ldarg.2 + IL_0020: add + IL_0021: stloc.s V_5 + IL_0023: stloc.s V_7 + IL_0025: ldloc.s V_7 + IL_0027: ldloc.3 + IL_0028: ldloc.s V_4 + IL_002a: add + IL_002b: ldloc.s V_5 + IL_002d: add + IL_002e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0033: nop + IL_0034: ldloc.2 + IL_0035: stloc.1 + IL_0036: ldloc.1 + IL_0037: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_003c: stloc.2 + IL_003d: ldloc.2 + IL_003e: brtrue.s IL_000c - IL_0038: ldloca.s V_0 - IL_003a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_003f: ret + IL_0040: ldloca.s V_0 + IL_0042: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0047: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -418,14 +440,16 @@ class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, int32 V_3, int32 V_4, - int32 V_5) + int32 V_5, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_6, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_7) IL_0000: nop IL_0001: ldarg.0 IL_0002: stloc.1 IL_0003: ldloc.1 IL_0004: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() IL_0009: stloc.2 - IL_000a: br.s IL_0035 + IL_000a: br.s IL_003d IL_000c: ldloc.1 IL_000d: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() @@ -435,28 +459,32 @@ IL_0016: ldarg.1 IL_0017: add IL_0018: stloc.s V_4 - IL_001a: ldloc.3 - IL_001b: ldarg.2 - IL_001c: add - IL_001d: stloc.s V_5 - IL_001f: ldloc.3 - IL_0020: ldloc.s V_4 - IL_0022: add - IL_0023: ldloc.s V_5 - IL_0025: add - IL_0026: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_002b: nop - IL_002c: ldloc.2 - IL_002d: stloc.1 - IL_002e: ldloc.1 - IL_002f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0034: stloc.2 - IL_0035: ldloc.2 - IL_0036: brtrue.s IL_000c + IL_001a: stloc.s V_6 + IL_001c: ldloc.s V_6 + IL_001e: ldloc.3 + IL_001f: ldarg.2 + IL_0020: add + IL_0021: stloc.s V_5 + IL_0023: stloc.s V_7 + IL_0025: ldloc.s V_7 + IL_0027: ldloc.3 + IL_0028: ldloc.s V_4 + IL_002a: add + IL_002b: ldloc.s V_5 + IL_002d: add + IL_002e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0033: nop + IL_0034: ldloc.2 + IL_0035: stloc.1 + IL_0036: ldloc.1 + IL_0037: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_003c: stloc.2 + IL_003d: ldloc.2 + IL_003e: brtrue.s IL_000c - IL_0038: ldloca.s V_0 - IL_003a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_003f: ret + IL_0040: ldloca.s V_0 + IL_0042: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0047: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -473,50 +501,62 @@ class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, int32 V_3, - int32 V_4, - int32 V_5) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, + int32 V_5, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_6, + int32 V_7, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_8, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_9) IL_0000: nop IL_0001: ldarg.0 IL_0002: stloc.1 IL_0003: ldloc.1 IL_0004: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() IL_0009: stloc.2 - IL_000a: br.s IL_003d + IL_000a: br.s IL_004d IL_000c: ldloc.1 IL_000d: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() IL_0012: stloc.3 IL_0013: ldloca.s V_0 - IL_0015: ldarg.1 - IL_0016: ldnull - IL_0017: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001c: pop - IL_001d: ldloc.3 - IL_001e: ldarg.2 - IL_001f: add - IL_0020: stloc.s V_4 - IL_0022: ldloc.3 - IL_0023: ldarg.3 - IL_0024: add - IL_0025: stloc.s V_5 - IL_0027: ldloc.3 - IL_0028: ldloc.s V_4 - IL_002a: add - IL_002b: ldloc.s V_5 - IL_002d: add - IL_002e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0033: nop - IL_0034: ldloc.2 - IL_0035: stloc.1 - IL_0036: ldloc.1 - IL_0037: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_003c: stloc.2 - IL_003d: ldloc.2 - IL_003e: brtrue.s IL_000c - - IL_0040: ldloca.s V_0 - IL_0042: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0047: ret + IL_0015: stloc.s V_4 + IL_0017: ldloc.s V_4 + IL_0019: ldarg.1 + IL_001a: ldnull + IL_001b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0020: pop + IL_0021: stloc.s V_6 + IL_0023: ldloc.s V_6 + IL_0025: ldloc.3 + IL_0026: ldarg.2 + IL_0027: add + IL_0028: stloc.s V_5 + IL_002a: stloc.s V_8 + IL_002c: ldloc.s V_8 + IL_002e: ldloc.3 + IL_002f: ldarg.3 + IL_0030: add + IL_0031: stloc.s V_7 + IL_0033: stloc.s V_9 + IL_0035: ldloc.s V_9 + IL_0037: ldloc.3 + IL_0038: ldloc.s V_5 + IL_003a: add + IL_003b: ldloc.s V_7 + IL_003d: add + IL_003e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0043: nop + IL_0044: ldloc.2 + IL_0045: stloc.1 + IL_0046: ldloc.1 + IL_0047: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_004c: stloc.2 + IL_004d: ldloc.2 + IL_004e: brtrue.s IL_000c + + IL_0050: ldloca.s V_0 + IL_0052: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0057: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -534,14 +574,17 @@ class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, int32 V_3, int32 V_4, - int32 V_5) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5, + int32 V_6, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_7, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_8) IL_0000: nop IL_0001: ldarg.0 IL_0002: stloc.1 IL_0003: ldloc.1 IL_0004: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() IL_0009: stloc.2 - IL_000a: br.s IL_003d + IL_000a: br.s IL_0049 IL_000c: ldloc.1 IL_000d: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() @@ -551,32 +594,38 @@ IL_0016: ldarg.2 IL_0017: add IL_0018: stloc.s V_4 - IL_001a: ldarg.1 - IL_001b: ldnull - IL_001c: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0021: pop - IL_0022: ldloc.3 - IL_0023: ldarg.3 - IL_0024: add - IL_0025: stloc.s V_5 - IL_0027: ldloc.3 - IL_0028: ldloc.s V_4 - IL_002a: add - IL_002b: ldloc.s V_5 - IL_002d: add - IL_002e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0033: nop - IL_0034: ldloc.2 - IL_0035: stloc.1 - IL_0036: ldloc.1 - IL_0037: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_003c: stloc.2 - IL_003d: ldloc.2 - IL_003e: brtrue.s IL_000c - - IL_0040: ldloca.s V_0 - IL_0042: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0047: ret + IL_001a: stloc.s V_5 + IL_001c: ldloc.s V_5 + IL_001e: ldarg.1 + IL_001f: ldnull + IL_0020: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0025: pop + IL_0026: stloc.s V_7 + IL_0028: ldloc.s V_7 + IL_002a: ldloc.3 + IL_002b: ldarg.3 + IL_002c: add + IL_002d: stloc.s V_6 + IL_002f: stloc.s V_8 + IL_0031: ldloc.s V_8 + IL_0033: ldloc.3 + IL_0034: ldloc.s V_4 + IL_0036: add + IL_0037: ldloc.s V_6 + IL_0039: add + IL_003a: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_003f: nop + IL_0040: ldloc.2 + IL_0041: stloc.1 + IL_0042: ldloc.1 + IL_0043: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0048: stloc.2 + IL_0049: ldloc.2 + IL_004a: brtrue.s IL_000c + + IL_004c: ldloca.s V_0 + IL_004e: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0053: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -594,14 +643,17 @@ class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, int32 V_3, int32 V_4, - int32 V_5) + int32 V_5, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_6, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_7, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_8) IL_0000: nop IL_0001: ldarg.0 IL_0002: stloc.1 IL_0003: ldloc.1 IL_0004: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() IL_0009: stloc.2 - IL_000a: br.s IL_003d + IL_000a: br.s IL_0049 IL_000c: ldloc.1 IL_000d: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() @@ -611,32 +663,38 @@ IL_0016: ldarg.2 IL_0017: add IL_0018: stloc.s V_4 - IL_001a: ldloc.3 - IL_001b: ldarg.3 - IL_001c: add - IL_001d: stloc.s V_5 - IL_001f: ldarg.1 - IL_0020: ldnull - IL_0021: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0026: pop - IL_0027: ldloc.3 - IL_0028: ldloc.s V_4 - IL_002a: add - IL_002b: ldloc.s V_5 - IL_002d: add - IL_002e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0033: nop - IL_0034: ldloc.2 - IL_0035: stloc.1 - IL_0036: ldloc.1 - IL_0037: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_003c: stloc.2 - IL_003d: ldloc.2 - IL_003e: brtrue.s IL_000c - - IL_0040: ldloca.s V_0 - IL_0042: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0047: ret + IL_001a: stloc.s V_6 + IL_001c: ldloc.s V_6 + IL_001e: ldloc.3 + IL_001f: ldarg.3 + IL_0020: add + IL_0021: stloc.s V_5 + IL_0023: stloc.s V_7 + IL_0025: ldloc.s V_7 + IL_0027: ldarg.1 + IL_0028: ldnull + IL_0029: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_002e: pop + IL_002f: stloc.s V_8 + IL_0031: ldloc.s V_8 + IL_0033: ldloc.3 + IL_0034: ldloc.s V_4 + IL_0036: add + IL_0037: ldloc.s V_5 + IL_0039: add + IL_003a: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_003f: nop + IL_0040: ldloc.2 + IL_0041: stloc.1 + IL_0042: ldloc.1 + IL_0043: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0048: stloc.2 + IL_0049: ldloc.2 + IL_004a: brtrue.s IL_000c + + IL_004c: ldloca.s V_0 + IL_004e: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0053: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -655,14 +713,16 @@ int32 V_3, int32 V_4, int32 V_5, - class [runtime]System.IDisposable V_6) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_6, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_7, + class [runtime]System.IDisposable V_8) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_0039 + IL_0008: br.s IL_0041 IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() @@ -676,46 +736,50 @@ IL_0018: add IL_0019: stloc.s V_5 IL_001b: ldloca.s V_0 - IL_001d: ldarg.1 - IL_001e: ldnull - IL_001f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0024: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0029: nop - IL_002a: ldloca.s V_0 - IL_002c: ldloc.3 - IL_002d: ldloc.s V_4 - IL_002f: add - IL_0030: ldloc.s V_5 - IL_0032: add - IL_0033: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0038: nop - IL_0039: ldloc.1 - IL_003a: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_003f: brtrue.s IL_000a - - IL_0041: ldnull - IL_0042: stloc.2 - IL_0043: leave.s IL_005a + IL_001d: stloc.s V_6 + IL_001f: ldloc.s V_6 + IL_0021: ldarg.1 + IL_0022: ldnull + IL_0023: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0028: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_002d: nop + IL_002e: ldloca.s V_0 + IL_0030: stloc.s V_7 + IL_0032: ldloc.s V_7 + IL_0034: ldloc.3 + IL_0035: ldloc.s V_4 + IL_0037: add + IL_0038: ldloc.s V_5 + IL_003a: add + IL_003b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0040: nop + IL_0041: ldloc.1 + IL_0042: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0047: brtrue.s IL_000a + + IL_0049: ldnull + IL_004a: stloc.2 + IL_004b: leave.s IL_0062 } finally { - IL_0045: ldloc.1 - IL_0046: isinst [runtime]System.IDisposable - IL_004b: stloc.s V_6 - IL_004d: ldloc.s V_6 - IL_004f: brfalse.s IL_0059 - - IL_0051: ldloc.s V_6 - IL_0053: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0058: endfinally - IL_0059: endfinally + IL_004d: ldloc.1 + IL_004e: isinst [runtime]System.IDisposable + IL_0053: stloc.s V_8 + IL_0055: ldloc.s V_8 + IL_0057: brfalse.s IL_0061 + + IL_0059: ldloc.s V_8 + IL_005b: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0060: endfinally + IL_0061: endfinally } - IL_005a: ldloc.2 - IL_005b: pop - IL_005c: ldloca.s V_0 - IL_005e: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0063: ret + IL_0062: ldloc.2 + IL_0063: pop + IL_0064: ldloca.s V_0 + IL_0066: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_006b: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f1(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed @@ -725,33 +789,36 @@ .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, - int32 V_3) + int32 V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4) IL_0000: nop IL_0001: ldarg.0 IL_0002: stloc.1 IL_0003: ldloc.1 IL_0004: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() IL_0009: stloc.2 - IL_000a: br.s IL_0025 + IL_000a: br.s IL_0029 IL_000c: ldloc.1 IL_000d: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() IL_0012: stloc.3 IL_0013: ldloca.s V_0 - IL_0015: ldloc.3 - IL_0016: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_001b: nop - IL_001c: ldloc.2 - IL_001d: stloc.1 - IL_001e: ldloc.1 - IL_001f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0024: stloc.2 - IL_0025: ldloc.2 - IL_0026: brtrue.s IL_000c - - IL_0028: ldloca.s V_0 - IL_002a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_002f: ret + IL_0015: stloc.s V_4 + IL_0017: ldloc.s V_4 + IL_0019: ldloc.3 + IL_001a: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_001f: nop + IL_0020: ldloc.2 + IL_0021: stloc.1 + IL_0022: ldloc.1 + IL_0023: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0028: stloc.2 + IL_0029: ldloc.2 + IL_002a: brtrue.s IL_000c + + IL_002c: ldloca.s V_0 + IL_002e: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0033: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f2(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed @@ -762,35 +829,38 @@ .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, - int32 V_3) + int32 V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4) IL_0000: nop IL_0001: ldarg.1 IL_0002: stloc.1 IL_0003: ldloc.1 IL_0004: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() IL_0009: stloc.2 - IL_000a: br.s IL_002b + IL_000a: br.s IL_002f IL_000c: ldloc.1 IL_000d: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() IL_0012: stloc.3 IL_0013: ldloca.s V_0 - IL_0015: ldarg.0 - IL_0016: ldloc.3 - IL_0017: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001c: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0021: nop - IL_0022: ldloc.2 - IL_0023: stloc.1 - IL_0024: ldloc.1 - IL_0025: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_002a: stloc.2 - IL_002b: ldloc.2 - IL_002c: brtrue.s IL_000c - - IL_002e: ldloca.s V_0 - IL_0030: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0035: ret + IL_0015: stloc.s V_4 + IL_0017: ldloc.s V_4 + IL_0019: ldarg.0 + IL_001a: ldloc.3 + IL_001b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0020: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0025: nop + IL_0026: ldloc.2 + IL_0027: stloc.1 + IL_0028: ldloc.1 + IL_0029: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_002e: stloc.2 + IL_002f: ldloc.2 + IL_0030: brtrue.s IL_000c + + IL_0032: ldloca.s V_0 + IL_0034: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0039: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f3(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed @@ -801,37 +871,43 @@ .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, - int32 V_3) + int32 V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5) IL_0000: nop IL_0001: ldarg.1 IL_0002: stloc.1 IL_0003: ldloc.1 IL_0004: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() IL_0009: stloc.2 - IL_000a: br.s IL_002d + IL_000a: br.s IL_0035 IL_000c: ldloc.1 IL_000d: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() IL_0012: stloc.3 IL_0013: ldloca.s V_0 - IL_0015: ldarg.0 - IL_0016: ldnull - IL_0017: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001c: pop - IL_001d: ldloc.3 - IL_001e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0023: nop - IL_0024: ldloc.2 - IL_0025: stloc.1 - IL_0026: ldloc.1 - IL_0027: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_002c: stloc.2 - IL_002d: ldloc.2 - IL_002e: brtrue.s IL_000c + IL_0015: stloc.s V_4 + IL_0017: ldloc.s V_4 + IL_0019: ldarg.0 + IL_001a: ldnull + IL_001b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0020: pop + IL_0021: stloc.s V_5 + IL_0023: ldloc.s V_5 + IL_0025: ldloc.3 + IL_0026: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_002b: nop + IL_002c: ldloc.2 + IL_002d: stloc.1 + IL_002e: ldloc.1 + IL_002f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0034: stloc.2 + IL_0035: ldloc.2 + IL_0036: brtrue.s IL_000c - IL_0030: ldloca.s V_0 - IL_0032: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0037: ret + IL_0038: ldloca.s V_0 + IL_003a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_003f: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -846,41 +922,50 @@ .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, - int32 V_3) + int32 V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_6) IL_0000: nop IL_0001: ldarg.2 IL_0002: stloc.1 IL_0003: ldloc.1 IL_0004: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() IL_0009: stloc.2 - IL_000a: br.s IL_0035 + IL_000a: br.s IL_0041 IL_000c: ldloc.1 IL_000d: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() IL_0012: stloc.3 IL_0013: ldloca.s V_0 - IL_0015: ldarg.0 - IL_0016: ldnull - IL_0017: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001c: pop - IL_001d: ldarg.1 - IL_001e: ldnull - IL_001f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0024: pop - IL_0025: ldloc.3 - IL_0026: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_002b: nop - IL_002c: ldloc.2 - IL_002d: stloc.1 - IL_002e: ldloc.1 - IL_002f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0034: stloc.2 - IL_0035: ldloc.2 - IL_0036: brtrue.s IL_000c + IL_0015: stloc.s V_4 + IL_0017: ldloc.s V_4 + IL_0019: ldarg.0 + IL_001a: ldnull + IL_001b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0020: pop + IL_0021: stloc.s V_5 + IL_0023: ldloc.s V_5 + IL_0025: ldarg.1 + IL_0026: ldnull + IL_0027: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_002c: pop + IL_002d: stloc.s V_6 + IL_002f: ldloc.s V_6 + IL_0031: ldloc.3 + IL_0032: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0037: nop + IL_0038: ldloc.2 + IL_0039: stloc.1 + IL_003a: ldloc.1 + IL_003b: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0040: stloc.2 + IL_0041: ldloc.2 + IL_0042: brtrue.s IL_000c - IL_0038: ldloca.s V_0 - IL_003a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_003f: ret + IL_0044: ldloca.s V_0 + IL_0046: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_004b: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f5(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed @@ -890,33 +975,36 @@ .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, - int32 V_3) + int32 V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4) IL_0000: nop IL_0001: ldarg.0 IL_0002: stloc.1 IL_0003: ldloc.1 IL_0004: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() IL_0009: stloc.2 - IL_000a: br.s IL_0025 + IL_000a: br.s IL_0029 IL_000c: ldloc.1 IL_000d: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() IL_0012: stloc.3 IL_0013: ldloca.s V_0 - IL_0015: ldloc.3 - IL_0016: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_001b: nop - IL_001c: ldloc.2 - IL_001d: stloc.1 - IL_001e: ldloc.1 - IL_001f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0024: stloc.2 - IL_0025: ldloc.2 - IL_0026: brtrue.s IL_000c - - IL_0028: ldloca.s V_0 - IL_002a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_002f: ret + IL_0015: stloc.s V_4 + IL_0017: ldloc.s V_4 + IL_0019: ldloc.3 + IL_001a: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_001f: nop + IL_0020: ldloc.2 + IL_0021: stloc.1 + IL_0022: ldloc.1 + IL_0023: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0028: stloc.2 + IL_0029: ldloc.2 + IL_002a: brtrue.s IL_000c + + IL_002c: ldloca.s V_0 + IL_002e: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0033: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f6(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed @@ -927,37 +1015,43 @@ .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, - int32 V_3) + int32 V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5) IL_0000: nop IL_0001: ldarg.1 IL_0002: stloc.1 IL_0003: ldloc.1 IL_0004: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() IL_0009: stloc.2 - IL_000a: br.s IL_002d + IL_000a: br.s IL_0035 IL_000c: ldloc.1 IL_000d: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() IL_0012: stloc.3 IL_0013: ldloca.s V_0 - IL_0015: ldarg.0 - IL_0016: ldnull - IL_0017: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001c: pop - IL_001d: ldloc.3 - IL_001e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0023: nop - IL_0024: ldloc.2 - IL_0025: stloc.1 - IL_0026: ldloc.1 - IL_0027: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_002c: stloc.2 - IL_002d: ldloc.2 - IL_002e: brtrue.s IL_000c + IL_0015: stloc.s V_4 + IL_0017: ldloc.s V_4 + IL_0019: ldarg.0 + IL_001a: ldnull + IL_001b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0020: pop + IL_0021: stloc.s V_5 + IL_0023: ldloc.s V_5 + IL_0025: ldloc.3 + IL_0026: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_002b: nop + IL_002c: ldloc.2 + IL_002d: stloc.1 + IL_002e: ldloc.1 + IL_002f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0034: stloc.2 + IL_0035: ldloc.2 + IL_0036: brtrue.s IL_000c - IL_0030: ldloca.s V_0 - IL_0032: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0037: ret + IL_0038: ldloca.s V_0 + IL_003a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_003f: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -972,41 +1066,50 @@ .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, - int32 V_3) + int32 V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_6) IL_0000: nop IL_0001: ldarg.2 IL_0002: stloc.1 IL_0003: ldloc.1 IL_0004: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() IL_0009: stloc.2 - IL_000a: br.s IL_0035 + IL_000a: br.s IL_0041 IL_000c: ldloc.1 IL_000d: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() IL_0012: stloc.3 IL_0013: ldloca.s V_0 - IL_0015: ldarg.0 - IL_0016: ldnull - IL_0017: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001c: pop - IL_001d: ldarg.1 - IL_001e: ldnull - IL_001f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0024: pop - IL_0025: ldloc.3 - IL_0026: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_002b: nop - IL_002c: ldloc.2 - IL_002d: stloc.1 - IL_002e: ldloc.1 - IL_002f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0034: stloc.2 - IL_0035: ldloc.2 - IL_0036: brtrue.s IL_000c + IL_0015: stloc.s V_4 + IL_0017: ldloc.s V_4 + IL_0019: ldarg.0 + IL_001a: ldnull + IL_001b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0020: pop + IL_0021: stloc.s V_5 + IL_0023: ldloc.s V_5 + IL_0025: ldarg.1 + IL_0026: ldnull + IL_0027: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_002c: pop + IL_002d: stloc.s V_6 + IL_002f: ldloc.s V_6 + IL_0031: ldloc.3 + IL_0032: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0037: nop + IL_0038: ldloc.2 + IL_0039: stloc.1 + IL_003a: ldloc.1 + IL_003b: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0040: stloc.2 + IL_0041: ldloc.2 + IL_0042: brtrue.s IL_000c - IL_0038: ldloca.s V_0 - IL_003a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_003f: ret + IL_0044: ldloca.s V_0 + IL_0046: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_004b: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -1023,7 +1126,8 @@ valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_2, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_3, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_4, - int32 V_5) + int32 V_5, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_6) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldnull @@ -1039,30 +1143,32 @@ IL_0014: ldloc.3 IL_0015: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() IL_001a: stloc.s V_4 - IL_001c: br.s IL_003f + IL_001c: br.s IL_0043 IL_001e: ldloc.3 IL_001f: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() IL_0024: stloc.s V_5 IL_0026: ldloca.s V_2 - IL_0028: ldloc.s V_5 - IL_002a: ldloc.0 - IL_002b: add - IL_002c: ldloc.1 - IL_002d: add - IL_002e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0033: nop - IL_0034: ldloc.s V_4 - IL_0036: stloc.3 - IL_0037: ldloc.3 - IL_0038: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_003d: stloc.s V_4 - IL_003f: ldloc.s V_4 - IL_0041: brtrue.s IL_001e - - IL_0043: ldloca.s V_2 - IL_0045: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_004a: ret + IL_0028: stloc.s V_6 + IL_002a: ldloc.s V_6 + IL_002c: ldloc.s V_5 + IL_002e: ldloc.0 + IL_002f: add + IL_0030: ldloc.1 + IL_0031: add + IL_0032: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0037: nop + IL_0038: ldloc.s V_4 + IL_003a: stloc.3 + IL_003b: ldloc.3 + IL_003c: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0041: stloc.s V_4 + IL_0043: ldloc.s V_4 + IL_0045: brtrue.s IL_001e + + IL_0047: ldloca.s V_2 + IL_0049: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_004e: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -1078,7 +1184,8 @@ valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_1, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_3, - int32 V_4) + int32 V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldnull @@ -1094,28 +1201,30 @@ IL_0014: ldloc.2 IL_0015: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() IL_001a: stloc.3 - IL_001b: br.s IL_003a + IL_001b: br.s IL_003e IL_001d: ldloc.2 IL_001e: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() IL_0023: stloc.s V_4 IL_0025: ldloca.s V_1 - IL_0027: ldloc.s V_4 - IL_0029: ldloc.0 - IL_002a: add - IL_002b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0030: nop - IL_0031: ldloc.3 - IL_0032: stloc.2 - IL_0033: ldloc.2 - IL_0034: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0039: stloc.3 - IL_003a: ldloc.3 - IL_003b: brtrue.s IL_001d + IL_0027: stloc.s V_5 + IL_0029: ldloc.s V_5 + IL_002b: ldloc.s V_4 + IL_002d: ldloc.0 + IL_002e: add + IL_002f: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0034: nop + IL_0035: ldloc.3 + IL_0036: stloc.2 + IL_0037: ldloc.2 + IL_0038: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_003d: stloc.3 + IL_003e: ldloc.3 + IL_003f: brtrue.s IL_001d - IL_003d: ldloca.s V_1 - IL_003f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0044: ret + IL_0041: ldloca.s V_1 + IL_0043: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0048: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -1130,7 +1239,8 @@ .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, - int32 V_3) + int32 V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldnull @@ -1146,26 +1256,28 @@ IL_0014: ldloc.1 IL_0015: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() IL_001a: stloc.2 - IL_001b: br.s IL_0036 + IL_001b: br.s IL_003a IL_001d: ldloc.1 IL_001e: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() IL_0023: stloc.3 IL_0024: ldloca.s V_0 - IL_0026: ldloc.3 - IL_0027: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_002c: nop - IL_002d: ldloc.2 - IL_002e: stloc.1 - IL_002f: ldloc.1 - IL_0030: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0035: stloc.2 - IL_0036: ldloc.2 - IL_0037: brtrue.s IL_001d - - IL_0039: ldloca.s V_0 - IL_003b: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0040: ret + IL_0026: stloc.s V_4 + IL_0028: ldloc.s V_4 + IL_002a: ldloc.3 + IL_002b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0030: nop + IL_0031: ldloc.2 + IL_0032: stloc.1 + IL_0033: ldloc.1 + IL_0034: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0039: stloc.2 + IL_003a: ldloc.2 + IL_003b: brtrue.s IL_001d + + IL_003d: ldloca.s V_0 + IL_003f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0044: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -1181,7 +1293,8 @@ valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_1, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_3, - int32 V_4) + int32 V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldnull @@ -1197,28 +1310,30 @@ IL_0014: ldloc.2 IL_0015: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() IL_001a: stloc.3 - IL_001b: br.s IL_003a + IL_001b: br.s IL_003e IL_001d: ldloc.2 IL_001e: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() IL_0023: stloc.s V_4 IL_0025: ldloca.s V_1 - IL_0027: ldloc.s V_4 - IL_0029: ldloc.0 - IL_002a: add - IL_002b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0030: nop - IL_0031: ldloc.3 - IL_0032: stloc.2 - IL_0033: ldloc.2 - IL_0034: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0039: stloc.3 - IL_003a: ldloc.3 - IL_003b: brtrue.s IL_001d + IL_0027: stloc.s V_5 + IL_0029: ldloc.s V_5 + IL_002b: ldloc.s V_4 + IL_002d: ldloc.0 + IL_002e: add + IL_002f: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0034: nop + IL_0035: ldloc.3 + IL_0036: stloc.2 + IL_0037: ldloc.2 + IL_0038: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_003d: stloc.3 + IL_003e: ldloc.3 + IL_003f: brtrue.s IL_001d - IL_003d: ldloca.s V_1 - IL_003f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0044: ret + IL_0041: ldloca.s V_1 + IL_0043: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0048: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f12(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> f, int32 y) cil managed @@ -1229,7 +1344,8 @@ .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, - int32 V_3) + int32 V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldnull @@ -1238,28 +1354,30 @@ IL_0009: ldloc.1 IL_000a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() IL_000f: stloc.2 - IL_0010: br.s IL_002d + IL_0010: br.s IL_0031 IL_0012: ldloc.1 IL_0013: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() IL_0018: stloc.3 IL_0019: ldloca.s V_0 - IL_001b: ldloc.3 - IL_001c: ldarg.1 - IL_001d: add - IL_001e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0023: nop - IL_0024: ldloc.2 - IL_0025: stloc.1 - IL_0026: ldloc.1 - IL_0027: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_002c: stloc.2 - IL_002d: ldloc.2 - IL_002e: brtrue.s IL_0012 + IL_001b: stloc.s V_4 + IL_001d: ldloc.s V_4 + IL_001f: ldloc.3 + IL_0020: ldarg.1 + IL_0021: add + IL_0022: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0027: nop + IL_0028: ldloc.2 + IL_0029: stloc.1 + IL_002a: ldloc.1 + IL_002b: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0030: stloc.2 + IL_0031: ldloc.2 + IL_0032: brtrue.s IL_0012 - IL_0030: ldloca.s V_0 - IL_0032: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0037: ret + IL_0034: ldloca.s V_0 + IL_0036: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_003b: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'for _ in List.groupBy id [] do ...'() cil managed @@ -1269,7 +1387,8 @@ .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>> V_1, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>> V_2, - class [runtime]System.Tuple`2> V_3) + class [runtime]System.Tuple`2> V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4) IL_0000: nop IL_0001: ldsfld class assembly/'for _ in List-groupBy id -- do ---@28' assembly/'for _ in List-groupBy id -- do ---@28'::@_instance IL_0006: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() @@ -1279,26 +1398,28 @@ IL_0011: ldloc.1 IL_0012: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>>::get_TailOrNull() IL_0017: stloc.2 - IL_0018: br.s IL_0033 + IL_0018: br.s IL_0037 IL_001a: ldloc.1 IL_001b: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>>::get_HeadOrDefault() IL_0020: stloc.3 IL_0021: ldloca.s V_0 - IL_0023: ldc.i4.0 - IL_0024: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0029: nop - IL_002a: ldloc.2 - IL_002b: stloc.1 - IL_002c: ldloc.1 - IL_002d: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>>::get_TailOrNull() - IL_0032: stloc.2 - IL_0033: ldloc.2 - IL_0034: brtrue.s IL_001a - - IL_0036: ldloca.s V_0 - IL_0038: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_003d: ret + IL_0023: stloc.s V_4 + IL_0025: ldloc.s V_4 + IL_0027: ldc.i4.0 + IL_0028: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_002d: nop + IL_002e: ldloc.2 + IL_002f: stloc.1 + IL_0030: ldloc.1 + IL_0031: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>>::get_TailOrNull() + IL_0036: stloc.2 + IL_0037: ldloc.2 + IL_0038: brtrue.s IL_001a + + IL_003a: ldloca.s V_0 + IL_003c: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0041: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'for _ | _ in List.groupBy id [] do ...'() cil managed @@ -1308,7 +1429,8 @@ .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>> V_1, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>> V_2, - class [runtime]System.Tuple`2> V_3) + class [runtime]System.Tuple`2> V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4) IL_0000: nop IL_0001: ldsfld class assembly/'for _ | _ in List-groupBy id -- do ---@29' assembly/'for _ | _ in List-groupBy id -- do ---@29'::@_instance IL_0006: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() @@ -1318,26 +1440,28 @@ IL_0011: ldloc.1 IL_0012: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>>::get_TailOrNull() IL_0017: stloc.2 - IL_0018: br.s IL_0033 + IL_0018: br.s IL_0037 IL_001a: ldloc.1 IL_001b: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>>::get_HeadOrDefault() IL_0020: stloc.3 IL_0021: ldloca.s V_0 - IL_0023: ldc.i4.0 - IL_0024: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0029: nop - IL_002a: ldloc.2 - IL_002b: stloc.1 - IL_002c: ldloc.1 - IL_002d: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>>::get_TailOrNull() - IL_0032: stloc.2 - IL_0033: ldloc.2 - IL_0034: brtrue.s IL_001a - - IL_0036: ldloca.s V_0 - IL_0038: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_003d: ret + IL_0023: stloc.s V_4 + IL_0025: ldloc.s V_4 + IL_0027: ldc.i4.0 + IL_0028: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_002d: nop + IL_002e: ldloc.2 + IL_002f: stloc.1 + IL_0030: ldloc.1 + IL_0031: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>>::get_TailOrNull() + IL_0036: stloc.2 + IL_0037: ldloc.2 + IL_0038: brtrue.s IL_001a + + IL_003a: ldloca.s V_0 + IL_003c: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0041: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'for _ & _ in List.groupBy id [] do ...'() cil managed @@ -1347,7 +1471,8 @@ .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>> V_1, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>> V_2, - class [runtime]System.Tuple`2> V_3) + class [runtime]System.Tuple`2> V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4) IL_0000: nop IL_0001: ldsfld class assembly/'for _ - _ in List-groupBy id -- do ---@30' assembly/'for _ - _ in List-groupBy id -- do ---@30'::@_instance IL_0006: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() @@ -1357,26 +1482,28 @@ IL_0011: ldloc.1 IL_0012: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>>::get_TailOrNull() IL_0017: stloc.2 - IL_0018: br.s IL_0033 + IL_0018: br.s IL_0037 IL_001a: ldloc.1 IL_001b: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>>::get_HeadOrDefault() IL_0020: stloc.3 IL_0021: ldloca.s V_0 - IL_0023: ldc.i4.0 - IL_0024: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0029: nop - IL_002a: ldloc.2 - IL_002b: stloc.1 - IL_002c: ldloc.1 - IL_002d: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>>::get_TailOrNull() - IL_0032: stloc.2 - IL_0033: ldloc.2 - IL_0034: brtrue.s IL_001a - - IL_0036: ldloca.s V_0 - IL_0038: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_003d: ret + IL_0023: stloc.s V_4 + IL_0025: ldloc.s V_4 + IL_0027: ldc.i4.0 + IL_0028: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_002d: nop + IL_002e: ldloc.2 + IL_002f: stloc.1 + IL_0030: ldloc.1 + IL_0031: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>>::get_TailOrNull() + IL_0036: stloc.2 + IL_0037: ldloc.2 + IL_0038: brtrue.s IL_001a + + IL_003a: ldloca.s V_0 + IL_003c: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0041: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'for _, _group in List.groupBy id [] do ...'() cil managed @@ -1386,7 +1513,8 @@ .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>> V_1, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>> V_2, - class [runtime]System.Tuple`2> V_3) + class [runtime]System.Tuple`2> V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4) IL_0000: nop IL_0001: ldsfld class assembly/'for _, _group in List-groupBy id -- do ---@31' assembly/'for _, _group in List-groupBy id -- do ---@31'::@_instance IL_0006: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() @@ -1396,26 +1524,28 @@ IL_0011: ldloc.1 IL_0012: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>>::get_TailOrNull() IL_0017: stloc.2 - IL_0018: br.s IL_0033 + IL_0018: br.s IL_0037 IL_001a: ldloc.1 IL_001b: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>>::get_HeadOrDefault() IL_0020: stloc.3 IL_0021: ldloca.s V_0 - IL_0023: ldc.i4.0 - IL_0024: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0029: nop - IL_002a: ldloc.2 - IL_002b: stloc.1 - IL_002c: ldloc.1 - IL_002d: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>>::get_TailOrNull() - IL_0032: stloc.2 - IL_0033: ldloc.2 - IL_0034: brtrue.s IL_001a - - IL_0036: ldloca.s V_0 - IL_0038: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_003d: ret + IL_0023: stloc.s V_4 + IL_0025: ldloc.s V_4 + IL_0027: ldc.i4.0 + IL_0028: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_002d: nop + IL_002e: ldloc.2 + IL_002f: stloc.1 + IL_0030: ldloc.1 + IL_0031: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>>::get_TailOrNull() + IL_0036: stloc.2 + IL_0037: ldloc.2 + IL_0038: brtrue.s IL_001a + + IL_003a: ldloca.s V_0 + IL_003c: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0041: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'for _, group in List.groupBy id [] do ...'() cil managed @@ -1426,7 +1556,8 @@ class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>> V_1, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>> V_2, class [runtime]System.Tuple`2> V_3, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_4) + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5) IL_0000: nop IL_0001: ldsfld class assembly/'for _, group in List-groupBy id -- do ---@32' assembly/'for _, group in List-groupBy id -- do ---@32'::@_instance IL_0006: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() @@ -1436,7 +1567,7 @@ IL_0011: ldloc.1 IL_0012: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>>::get_TailOrNull() IL_0017: stloc.2 - IL_0018: br.s IL_0041 + IL_0018: br.s IL_0045 IL_001a: ldloc.1 IL_001b: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>>::get_HeadOrDefault() @@ -1445,21 +1576,23 @@ IL_0023: ldloc.3 IL_0024: call instance !1 class [runtime]System.Tuple`2>::get_Item2() IL_0029: stloc.s V_4 - IL_002b: ldloc.s V_4 - IL_002d: callvirt instance int32 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Length() - IL_0032: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0037: nop - IL_0038: ldloc.2 - IL_0039: stloc.1 - IL_003a: ldloc.1 - IL_003b: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>>::get_TailOrNull() - IL_0040: stloc.2 - IL_0041: ldloc.2 - IL_0042: brtrue.s IL_001a - - IL_0044: ldloca.s V_0 - IL_0046: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_004b: ret + IL_002b: stloc.s V_5 + IL_002d: ldloc.s V_5 + IL_002f: ldloc.s V_4 + IL_0031: callvirt instance int32 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Length() + IL_0036: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_003b: nop + IL_003c: ldloc.2 + IL_003d: stloc.1 + IL_003e: ldloc.1 + IL_003f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>>::get_TailOrNull() + IL_0044: stloc.2 + IL_0045: ldloc.2 + IL_0046: brtrue.s IL_001a + + IL_0048: ldloca.s V_0 + IL_004a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_004f: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'for 1 | 2 | _ in ...'() cil managed @@ -1469,14 +1602,15 @@ .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, - int32 V_3) + int32 V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4) IL_0000: nop IL_0001: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() IL_0006: stloc.1 IL_0007: ldloc.1 IL_0008: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() IL_000d: stloc.2 - IL_000e: br.s IL_003a + IL_000e: br.s IL_003e IL_0010: ldloc.1 IL_0011: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() @@ -1488,21 +1622,23 @@ IL_001c: switch ( IL_0029, IL_0029) - IL_0029: ldc.i4.0 - IL_002a: nop - IL_002b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0030: nop - IL_0031: ldloc.2 - IL_0032: stloc.1 - IL_0033: ldloc.1 - IL_0034: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0039: stloc.2 - IL_003a: ldloc.2 - IL_003b: brtrue.s IL_0010 + IL_0029: stloc.s V_4 + IL_002b: ldloc.s V_4 + IL_002d: ldc.i4.0 + IL_002e: nop + IL_002f: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0034: nop + IL_0035: ldloc.2 + IL_0036: stloc.1 + IL_0037: ldloc.1 + IL_0038: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_003d: stloc.2 + IL_003e: ldloc.2 + IL_003f: brtrue.s IL_0010 - IL_003d: ldloca.s V_0 - IL_003f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0044: ret + IL_0041: ldloca.s V_0 + IL_0043: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0048: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'for Failure _ | _ in ...'() cil managed @@ -1513,14 +1649,15 @@ class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, class [runtime]System.Exception V_3, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 V_4) + class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5) IL_0000: nop IL_0001: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() IL_0006: stloc.1 IL_0007: ldloc.1 IL_0008: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() IL_000d: stloc.2 - IL_000e: br.s IL_0036 + IL_000e: br.s IL_003a IL_0010: ldloc.1 IL_0011: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() @@ -1532,21 +1669,23 @@ IL_0021: ldloc.s V_4 IL_0023: brfalse.s IL_0025 - IL_0025: ldc.i4.0 - IL_0026: nop - IL_0027: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_002c: nop - IL_002d: ldloc.2 - IL_002e: stloc.1 - IL_002f: ldloc.1 - IL_0030: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0035: stloc.2 - IL_0036: ldloc.2 - IL_0037: brtrue.s IL_0010 - - IL_0039: ldloca.s V_0 - IL_003b: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0040: ret + IL_0025: stloc.s V_5 + IL_0027: ldloc.s V_5 + IL_0029: ldc.i4.0 + IL_002a: nop + IL_002b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0030: nop + IL_0031: ldloc.2 + IL_0032: stloc.1 + IL_0033: ldloc.1 + IL_0034: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0039: stloc.2 + IL_003a: ldloc.2 + IL_003b: brtrue.s IL_0010 + + IL_003d: ldloca.s V_0 + IL_003f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0044: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'for true | false in ...'() cil managed @@ -1556,14 +1695,15 @@ .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, - bool V_3) + bool V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4) IL_0000: nop IL_0001: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() IL_0006: stloc.1 IL_0007: ldloc.1 IL_0008: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() IL_000d: stloc.2 - IL_000e: br.s IL_002d + IL_000e: br.s IL_0031 IL_0010: ldloc.1 IL_0011: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() @@ -1572,21 +1712,23 @@ IL_0019: ldloc.3 IL_001a: brfalse.s IL_001c - IL_001c: ldc.i4.0 - IL_001d: nop - IL_001e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0023: nop - IL_0024: ldloc.2 - IL_0025: stloc.1 - IL_0026: ldloc.1 - IL_0027: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_002c: stloc.2 - IL_002d: ldloc.2 - IL_002e: brtrue.s IL_0010 + IL_001c: stloc.s V_4 + IL_001e: ldloc.s V_4 + IL_0020: ldc.i4.0 + IL_0021: nop + IL_0022: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0027: nop + IL_0028: ldloc.2 + IL_0029: stloc.1 + IL_002a: ldloc.1 + IL_002b: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0030: stloc.2 + IL_0031: ldloc.2 + IL_0032: brtrue.s IL_0010 - IL_0030: ldloca.s V_0 - IL_0032: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0037: ret + IL_0034: ldloca.s V_0 + IL_0036: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_003b: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'for true | _ in ...'() cil managed @@ -1596,14 +1738,15 @@ .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, - bool V_3) + bool V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4) IL_0000: nop IL_0001: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() IL_0006: stloc.1 IL_0007: ldloc.1 IL_0008: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() IL_000d: stloc.2 - IL_000e: br.s IL_002d + IL_000e: br.s IL_0031 IL_0010: ldloc.1 IL_0011: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() @@ -1612,21 +1755,23 @@ IL_0019: ldloc.3 IL_001a: brfalse.s IL_001c - IL_001c: ldc.i4.0 - IL_001d: nop - IL_001e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0023: nop - IL_0024: ldloc.2 - IL_0025: stloc.1 - IL_0026: ldloc.1 - IL_0027: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_002c: stloc.2 - IL_002d: ldloc.2 - IL_002e: brtrue.s IL_0010 + IL_001c: stloc.s V_4 + IL_001e: ldloc.s V_4 + IL_0020: ldc.i4.0 + IL_0021: nop + IL_0022: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0027: nop + IL_0028: ldloc.2 + IL_0029: stloc.1 + IL_002a: ldloc.1 + IL_002b: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0030: stloc.2 + IL_0031: ldloc.2 + IL_0032: brtrue.s IL_0010 - IL_0030: ldloca.s V_0 - IL_0032: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0037: ret + IL_0034: ldloca.s V_0 + IL_0036: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_003b: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'for _ | true in ...'() cil managed @@ -1636,33 +1781,36 @@ .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, - bool V_3) + bool V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4) IL_0000: nop IL_0001: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() IL_0006: stloc.1 IL_0007: ldloc.1 IL_0008: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() IL_000d: stloc.2 - IL_000e: br.s IL_0029 + IL_000e: br.s IL_002d IL_0010: ldloc.1 IL_0011: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() IL_0016: stloc.3 IL_0017: ldloca.s V_0 - IL_0019: ldc.i4.0 - IL_001a: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_001f: nop - IL_0020: ldloc.2 - IL_0021: stloc.1 - IL_0022: ldloc.1 - IL_0023: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0028: stloc.2 - IL_0029: ldloc.2 - IL_002a: brtrue.s IL_0010 + IL_0019: stloc.s V_4 + IL_001b: ldloc.s V_4 + IL_001d: ldc.i4.0 + IL_001e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0023: nop + IL_0024: ldloc.2 + IL_0025: stloc.1 + IL_0026: ldloc.1 + IL_0027: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_002c: stloc.2 + IL_002d: ldloc.2 + IL_002e: brtrue.s IL_0010 - IL_002c: ldloca.s V_0 - IL_002e: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0033: ret + IL_0030: ldloca.s V_0 + IL_0032: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0037: ret } } @@ -1684,4 +1832,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInSeq_ToArray.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInSeq_ToArray.fs.il.bsl index bd09b7df4a0..fecbdcdcacd 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInSeq_ToArray.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInSeq_ToArray.fs.il.bsl @@ -41,49 +41,52 @@ class [runtime]System.Collections.Generic.IEnumerator`1 V_1, class [runtime]System.Collections.Generic.IEnumerable`1 V_2, int32 V_3, - class [runtime]System.IDisposable V_4) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_4, + class [runtime]System.IDisposable V_5) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_001a + IL_0008: br.s IL_001e IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() IL_0010: stloc.3 IL_0011: ldloca.s V_0 - IL_0013: ldloc.3 - IL_0014: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_0019: nop - IL_001a: ldloc.1 - IL_001b: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0020: brtrue.s IL_000a - - IL_0022: ldnull - IL_0023: stloc.2 - IL_0024: leave.s IL_003b + IL_0013: stloc.s V_4 + IL_0015: ldloc.s V_4 + IL_0017: ldloc.3 + IL_0018: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_001d: nop + IL_001e: ldloc.1 + IL_001f: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0024: brtrue.s IL_000a + + IL_0026: ldnull + IL_0027: stloc.2 + IL_0028: leave.s IL_003f } finally { - IL_0026: ldloc.1 - IL_0027: isinst [runtime]System.IDisposable - IL_002c: stloc.s V_4 - IL_002e: ldloc.s V_4 - IL_0030: brfalse.s IL_003a - - IL_0032: ldloc.s V_4 - IL_0034: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0039: endfinally - IL_003a: endfinally + IL_002a: ldloc.1 + IL_002b: isinst [runtime]System.IDisposable + IL_0030: stloc.s V_5 + IL_0032: ldloc.s V_5 + IL_0034: brfalse.s IL_003e + + IL_0036: ldloc.s V_5 + IL_0038: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_003d: endfinally + IL_003e: endfinally } - IL_003b: ldloc.2 - IL_003c: pop - IL_003d: ldloca.s V_0 - IL_003f: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0044: ret + IL_003f: ldloc.2 + IL_0040: pop + IL_0041: ldloca.s V_0 + IL_0043: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_0048: ret } .method public static int32[] f00(class [runtime]System.Collections.Generic.IEnumerable`1 seq) cil managed @@ -94,49 +97,52 @@ class [runtime]System.Collections.Generic.IEnumerator`1 V_1, class [runtime]System.Collections.Generic.IEnumerable`1 V_2, int32 V_3, - class [runtime]System.IDisposable V_4) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_4, + class [runtime]System.IDisposable V_5) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_001a + IL_0008: br.s IL_001e IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() IL_0010: stloc.3 IL_0011: ldloca.s V_0 - IL_0013: ldloc.3 - IL_0014: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_0019: nop - IL_001a: ldloc.1 - IL_001b: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0020: brtrue.s IL_000a - - IL_0022: ldnull - IL_0023: stloc.2 - IL_0024: leave.s IL_003b + IL_0013: stloc.s V_4 + IL_0015: ldloc.s V_4 + IL_0017: ldloc.3 + IL_0018: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_001d: nop + IL_001e: ldloc.1 + IL_001f: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0024: brtrue.s IL_000a + + IL_0026: ldnull + IL_0027: stloc.2 + IL_0028: leave.s IL_003f } finally { - IL_0026: ldloc.1 - IL_0027: isinst [runtime]System.IDisposable - IL_002c: stloc.s V_4 - IL_002e: ldloc.s V_4 - IL_0030: brfalse.s IL_003a - - IL_0032: ldloc.s V_4 - IL_0034: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0039: endfinally - IL_003a: endfinally + IL_002a: ldloc.1 + IL_002b: isinst [runtime]System.IDisposable + IL_0030: stloc.s V_5 + IL_0032: ldloc.s V_5 + IL_0034: brfalse.s IL_003e + + IL_0036: ldloc.s V_5 + IL_0038: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_003d: endfinally + IL_003e: endfinally } - IL_003b: ldloc.2 - IL_003c: pop - IL_003d: ldloca.s V_0 - IL_003f: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0044: ret + IL_003f: ldloc.2 + IL_0040: pop + IL_0041: ldloca.s V_0 + IL_0043: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_0048: ret } .method public static int32[] f000(class [runtime]System.Collections.Generic.IEnumerable`1 seq) cil managed @@ -201,49 +207,52 @@ class [runtime]System.Collections.Generic.IEnumerator`1 V_1, class [runtime]System.Collections.Generic.IEnumerable`1 V_2, int32 V_3, - class [runtime]System.IDisposable V_4) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_4, + class [runtime]System.IDisposable V_5) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_001a + IL_0008: br.s IL_001e IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() IL_0010: stloc.3 IL_0011: ldloca.s V_0 - IL_0013: ldloc.3 - IL_0014: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_0019: nop - IL_001a: ldloc.1 - IL_001b: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0020: brtrue.s IL_000a - - IL_0022: ldnull - IL_0023: stloc.2 - IL_0024: leave.s IL_003b + IL_0013: stloc.s V_4 + IL_0015: ldloc.s V_4 + IL_0017: ldloc.3 + IL_0018: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_001d: nop + IL_001e: ldloc.1 + IL_001f: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0024: brtrue.s IL_000a + + IL_0026: ldnull + IL_0027: stloc.2 + IL_0028: leave.s IL_003f } finally { - IL_0026: ldloc.1 - IL_0027: isinst [runtime]System.IDisposable - IL_002c: stloc.s V_4 - IL_002e: ldloc.s V_4 - IL_0030: brfalse.s IL_003a - - IL_0032: ldloc.s V_4 - IL_0034: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0039: endfinally - IL_003a: endfinally + IL_002a: ldloc.1 + IL_002b: isinst [runtime]System.IDisposable + IL_0030: stloc.s V_5 + IL_0032: ldloc.s V_5 + IL_0034: brfalse.s IL_003e + + IL_0036: ldloc.s V_5 + IL_0038: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_003d: endfinally + IL_003e: endfinally } - IL_003b: ldloc.2 - IL_003c: pop - IL_003d: ldloca.s V_0 - IL_003f: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0044: ret + IL_003f: ldloc.2 + IL_0040: pop + IL_0041: ldloca.s V_0 + IL_0043: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_0048: ret } .method public static int32[] f00000(class [runtime]System.Collections.Generic.IEnumerable`1 seq, @@ -331,14 +340,15 @@ int32 V_3, int32 V_4, int32 V_5, - class [runtime]System.IDisposable V_6) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_6, + class [runtime]System.IDisposable V_7) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_002a + IL_0008: br.s IL_002e IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() @@ -352,40 +362,42 @@ IL_0018: add IL_0019: stloc.s V_5 IL_001b: ldloca.s V_0 - IL_001d: ldloc.3 - IL_001e: ldloc.s V_4 - IL_0020: add - IL_0021: ldloc.s V_5 - IL_0023: add - IL_0024: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_0029: nop - IL_002a: ldloc.1 - IL_002b: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0030: brtrue.s IL_000a + IL_001d: stloc.s V_6 + IL_001f: ldloc.s V_6 + IL_0021: ldloc.3 + IL_0022: ldloc.s V_4 + IL_0024: add + IL_0025: ldloc.s V_5 + IL_0027: add + IL_0028: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_002d: nop + IL_002e: ldloc.1 + IL_002f: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0034: brtrue.s IL_000a - IL_0032: ldnull - IL_0033: stloc.2 - IL_0034: leave.s IL_004b + IL_0036: ldnull + IL_0037: stloc.2 + IL_0038: leave.s IL_004f } finally { - IL_0036: ldloc.1 - IL_0037: isinst [runtime]System.IDisposable - IL_003c: stloc.s V_6 - IL_003e: ldloc.s V_6 - IL_0040: brfalse.s IL_004a - - IL_0042: ldloc.s V_6 - IL_0044: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0049: endfinally - IL_004a: endfinally + IL_003a: ldloc.1 + IL_003b: isinst [runtime]System.IDisposable + IL_0040: stloc.s V_7 + IL_0042: ldloc.s V_7 + IL_0044: brfalse.s IL_004e + + IL_0046: ldloc.s V_7 + IL_0048: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_004d: endfinally + IL_004e: endfinally } - IL_004b: ldloc.2 - IL_004c: pop - IL_004d: ldloca.s V_0 - IL_004f: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0054: ret + IL_004f: ldloc.2 + IL_0050: pop + IL_0051: ldloca.s V_0 + IL_0053: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_0058: ret } .method public static int32[] f0000000(class [runtime]System.Collections.Generic.IEnumerable`1 seq, @@ -403,14 +415,15 @@ int32 V_3, int32 V_4, int32 V_5, - class [runtime]System.IDisposable V_6) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_6, + class [runtime]System.IDisposable V_7) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_0032 + IL_0008: br.s IL_0036 IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() @@ -428,40 +441,42 @@ IL_0020: add IL_0021: stloc.s V_5 IL_0023: ldloca.s V_0 - IL_0025: ldloc.3 - IL_0026: ldloc.s V_4 - IL_0028: add - IL_0029: ldloc.s V_5 - IL_002b: add - IL_002c: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_0031: nop - IL_0032: ldloc.1 - IL_0033: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0038: brtrue.s IL_000a + IL_0025: stloc.s V_6 + IL_0027: ldloc.s V_6 + IL_0029: ldloc.3 + IL_002a: ldloc.s V_4 + IL_002c: add + IL_002d: ldloc.s V_5 + IL_002f: add + IL_0030: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_0035: nop + IL_0036: ldloc.1 + IL_0037: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_003c: brtrue.s IL_000a - IL_003a: ldnull - IL_003b: stloc.2 - IL_003c: leave.s IL_0053 + IL_003e: ldnull + IL_003f: stloc.2 + IL_0040: leave.s IL_0057 } finally { - IL_003e: ldloc.1 - IL_003f: isinst [runtime]System.IDisposable - IL_0044: stloc.s V_6 - IL_0046: ldloc.s V_6 - IL_0048: brfalse.s IL_0052 - - IL_004a: ldloc.s V_6 - IL_004c: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0051: endfinally - IL_0052: endfinally + IL_0042: ldloc.1 + IL_0043: isinst [runtime]System.IDisposable + IL_0048: stloc.s V_7 + IL_004a: ldloc.s V_7 + IL_004c: brfalse.s IL_0056 + + IL_004e: ldloc.s V_7 + IL_0050: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0055: endfinally + IL_0056: endfinally } - IL_0053: ldloc.2 - IL_0054: pop - IL_0055: ldloca.s V_0 - IL_0057: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_005c: ret + IL_0057: ldloc.2 + IL_0058: pop + IL_0059: ldloca.s V_0 + IL_005b: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_0060: ret } .method public static int32[] f00000000(class [runtime]System.Collections.Generic.IEnumerable`1 seq, @@ -479,14 +494,15 @@ int32 V_3, int32 V_4, int32 V_5, - class [runtime]System.IDisposable V_6) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_6, + class [runtime]System.IDisposable V_7) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_0032 + IL_0008: br.s IL_0036 IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() @@ -504,40 +520,42 @@ IL_0020: add IL_0021: stloc.s V_5 IL_0023: ldloca.s V_0 - IL_0025: ldloc.3 - IL_0026: ldloc.s V_4 - IL_0028: add - IL_0029: ldloc.s V_5 - IL_002b: add - IL_002c: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_0031: nop - IL_0032: ldloc.1 - IL_0033: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0038: brtrue.s IL_000a + IL_0025: stloc.s V_6 + IL_0027: ldloc.s V_6 + IL_0029: ldloc.3 + IL_002a: ldloc.s V_4 + IL_002c: add + IL_002d: ldloc.s V_5 + IL_002f: add + IL_0030: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_0035: nop + IL_0036: ldloc.1 + IL_0037: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_003c: brtrue.s IL_000a - IL_003a: ldnull - IL_003b: stloc.2 - IL_003c: leave.s IL_0053 + IL_003e: ldnull + IL_003f: stloc.2 + IL_0040: leave.s IL_0057 } finally { - IL_003e: ldloc.1 - IL_003f: isinst [runtime]System.IDisposable - IL_0044: stloc.s V_6 - IL_0046: ldloc.s V_6 - IL_0048: brfalse.s IL_0052 - - IL_004a: ldloc.s V_6 - IL_004c: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0051: endfinally - IL_0052: endfinally + IL_0042: ldloc.1 + IL_0043: isinst [runtime]System.IDisposable + IL_0048: stloc.s V_7 + IL_004a: ldloc.s V_7 + IL_004c: brfalse.s IL_0056 + + IL_004e: ldloc.s V_7 + IL_0050: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0055: endfinally + IL_0056: endfinally } - IL_0053: ldloc.2 - IL_0054: pop - IL_0055: ldloca.s V_0 - IL_0057: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_005c: ret + IL_0057: ldloc.2 + IL_0058: pop + IL_0059: ldloca.s V_0 + IL_005b: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_0060: ret } .method public static int32[] f000000000(class [runtime]System.Collections.Generic.IEnumerable`1 seq, @@ -555,14 +573,15 @@ int32 V_3, int32 V_4, int32 V_5, - class [runtime]System.IDisposable V_6) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_6, + class [runtime]System.IDisposable V_7) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_0032 + IL_0008: br.s IL_0036 IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() @@ -580,40 +599,42 @@ IL_001d: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) IL_0022: pop IL_0023: ldloca.s V_0 - IL_0025: ldloc.3 - IL_0026: ldloc.s V_4 - IL_0028: add - IL_0029: ldloc.s V_5 - IL_002b: add - IL_002c: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_0031: nop - IL_0032: ldloc.1 - IL_0033: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0038: brtrue.s IL_000a + IL_0025: stloc.s V_6 + IL_0027: ldloc.s V_6 + IL_0029: ldloc.3 + IL_002a: ldloc.s V_4 + IL_002c: add + IL_002d: ldloc.s V_5 + IL_002f: add + IL_0030: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_0035: nop + IL_0036: ldloc.1 + IL_0037: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_003c: brtrue.s IL_000a - IL_003a: ldnull - IL_003b: stloc.2 - IL_003c: leave.s IL_0053 + IL_003e: ldnull + IL_003f: stloc.2 + IL_0040: leave.s IL_0057 } finally { - IL_003e: ldloc.1 - IL_003f: isinst [runtime]System.IDisposable - IL_0044: stloc.s V_6 - IL_0046: ldloc.s V_6 - IL_0048: brfalse.s IL_0052 - - IL_004a: ldloc.s V_6 - IL_004c: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0051: endfinally - IL_0052: endfinally + IL_0042: ldloc.1 + IL_0043: isinst [runtime]System.IDisposable + IL_0048: stloc.s V_7 + IL_004a: ldloc.s V_7 + IL_004c: brfalse.s IL_0056 + + IL_004e: ldloc.s V_7 + IL_0050: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0055: endfinally + IL_0056: endfinally } - IL_0053: ldloc.2 - IL_0054: pop - IL_0055: ldloca.s V_0 - IL_0057: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_005c: ret + IL_0057: ldloc.2 + IL_0058: pop + IL_0059: ldloca.s V_0 + IL_005b: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_0060: ret } .method public static int32[] f0000000000(class [runtime]System.Collections.Generic.IEnumerable`1 seq, @@ -631,14 +652,16 @@ int32 V_3, int32 V_4, int32 V_5, - class [runtime]System.IDisposable V_6) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_6, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_7, + class [runtime]System.IDisposable V_8) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_0039 + IL_0008: br.s IL_0041 IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() @@ -652,46 +675,50 @@ IL_0018: add IL_0019: stloc.s V_5 IL_001b: ldloca.s V_0 - IL_001d: ldarg.1 - IL_001e: ldnull - IL_001f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0024: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_0029: nop - IL_002a: ldloca.s V_0 - IL_002c: ldloc.3 - IL_002d: ldloc.s V_4 - IL_002f: add - IL_0030: ldloc.s V_5 - IL_0032: add - IL_0033: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_0038: nop - IL_0039: ldloc.1 - IL_003a: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_003f: brtrue.s IL_000a - - IL_0041: ldnull - IL_0042: stloc.2 - IL_0043: leave.s IL_005a + IL_001d: stloc.s V_6 + IL_001f: ldloc.s V_6 + IL_0021: ldarg.1 + IL_0022: ldnull + IL_0023: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0028: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_002d: nop + IL_002e: ldloca.s V_0 + IL_0030: stloc.s V_7 + IL_0032: ldloc.s V_7 + IL_0034: ldloc.3 + IL_0035: ldloc.s V_4 + IL_0037: add + IL_0038: ldloc.s V_5 + IL_003a: add + IL_003b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_0040: nop + IL_0041: ldloc.1 + IL_0042: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0047: brtrue.s IL_000a + + IL_0049: ldnull + IL_004a: stloc.2 + IL_004b: leave.s IL_0062 } finally { - IL_0045: ldloc.1 - IL_0046: isinst [runtime]System.IDisposable - IL_004b: stloc.s V_6 - IL_004d: ldloc.s V_6 - IL_004f: brfalse.s IL_0059 - - IL_0051: ldloc.s V_6 - IL_0053: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0058: endfinally - IL_0059: endfinally + IL_004d: ldloc.1 + IL_004e: isinst [runtime]System.IDisposable + IL_0053: stloc.s V_8 + IL_0055: ldloc.s V_8 + IL_0057: brfalse.s IL_0061 + + IL_0059: ldloc.s V_8 + IL_005b: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0060: endfinally + IL_0061: endfinally } - IL_005a: ldloc.2 - IL_005b: pop - IL_005c: ldloca.s V_0 - IL_005e: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0063: ret + IL_0062: ldloc.2 + IL_0063: pop + IL_0064: ldloca.s V_0 + IL_0066: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_006b: ret } .method public static int32[] f1(class [runtime]System.Collections.Generic.IEnumerable`1 seq) cil managed @@ -702,49 +729,52 @@ class [runtime]System.Collections.Generic.IEnumerator`1 V_1, class [runtime]System.Collections.Generic.IEnumerable`1 V_2, int32 V_3, - class [runtime]System.IDisposable V_4) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_4, + class [runtime]System.IDisposable V_5) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_001a + IL_0008: br.s IL_001e IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() IL_0010: stloc.3 IL_0011: ldloca.s V_0 - IL_0013: ldloc.3 - IL_0014: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_0019: nop - IL_001a: ldloc.1 - IL_001b: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0020: brtrue.s IL_000a - - IL_0022: ldnull - IL_0023: stloc.2 - IL_0024: leave.s IL_003b + IL_0013: stloc.s V_4 + IL_0015: ldloc.s V_4 + IL_0017: ldloc.3 + IL_0018: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_001d: nop + IL_001e: ldloc.1 + IL_001f: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0024: brtrue.s IL_000a + + IL_0026: ldnull + IL_0027: stloc.2 + IL_0028: leave.s IL_003f } finally { - IL_0026: ldloc.1 - IL_0027: isinst [runtime]System.IDisposable - IL_002c: stloc.s V_4 - IL_002e: ldloc.s V_4 - IL_0030: brfalse.s IL_003a - - IL_0032: ldloc.s V_4 - IL_0034: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0039: endfinally - IL_003a: endfinally + IL_002a: ldloc.1 + IL_002b: isinst [runtime]System.IDisposable + IL_0030: stloc.s V_5 + IL_0032: ldloc.s V_5 + IL_0034: brfalse.s IL_003e + + IL_0036: ldloc.s V_5 + IL_0038: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_003d: endfinally + IL_003e: endfinally } - IL_003b: ldloc.2 - IL_003c: pop - IL_003d: ldloca.s V_0 - IL_003f: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0044: ret + IL_003f: ldloc.2 + IL_0040: pop + IL_0041: ldloca.s V_0 + IL_0043: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_0048: ret } .method public static !!a[] f2(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -757,51 +787,54 @@ class [runtime]System.Collections.Generic.IEnumerator`1 V_1, class [runtime]System.Collections.Generic.IEnumerable`1 V_2, int32 V_3, - class [runtime]System.IDisposable V_4) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_4, + class [runtime]System.IDisposable V_5) IL_0000: nop IL_0001: ldarg.1 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_0020 + IL_0008: br.s IL_0024 IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() IL_0010: stloc.3 IL_0011: ldloca.s V_0 - IL_0013: ldarg.0 - IL_0014: ldloc.3 - IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001a: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_001f: nop - IL_0020: ldloc.1 - IL_0021: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0026: brtrue.s IL_000a - - IL_0028: ldnull - IL_0029: stloc.2 - IL_002a: leave.s IL_0041 + IL_0013: stloc.s V_4 + IL_0015: ldloc.s V_4 + IL_0017: ldarg.0 + IL_0018: ldloc.3 + IL_0019: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_0023: nop + IL_0024: ldloc.1 + IL_0025: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_002a: brtrue.s IL_000a + + IL_002c: ldnull + IL_002d: stloc.2 + IL_002e: leave.s IL_0045 } finally { - IL_002c: ldloc.1 - IL_002d: isinst [runtime]System.IDisposable - IL_0032: stloc.s V_4 - IL_0034: ldloc.s V_4 - IL_0036: brfalse.s IL_0040 - - IL_0038: ldloc.s V_4 - IL_003a: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_003f: endfinally - IL_0040: endfinally + IL_0030: ldloc.1 + IL_0031: isinst [runtime]System.IDisposable + IL_0036: stloc.s V_5 + IL_0038: ldloc.s V_5 + IL_003a: brfalse.s IL_0044 + + IL_003c: ldloc.s V_5 + IL_003e: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0043: endfinally + IL_0044: endfinally } - IL_0041: ldloc.2 - IL_0042: pop - IL_0043: ldloca.s V_0 - IL_0045: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_004a: ret + IL_0045: ldloc.2 + IL_0046: pop + IL_0047: ldloca.s V_0 + IL_0049: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_004e: ret } .method public static int32[] f3(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -814,53 +847,59 @@ class [runtime]System.Collections.Generic.IEnumerator`1 V_1, class [runtime]System.Collections.Generic.IEnumerable`1 V_2, int32 V_3, - class [runtime]System.IDisposable V_4) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_5, + class [runtime]System.IDisposable V_6) IL_0000: nop IL_0001: ldarg.1 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_0022 + IL_0008: br.s IL_002a IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() IL_0010: stloc.3 IL_0011: ldloca.s V_0 - IL_0013: ldarg.0 - IL_0014: ldnull - IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001a: pop - IL_001b: ldloc.3 - IL_001c: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_0021: nop - IL_0022: ldloc.1 - IL_0023: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0028: brtrue.s IL_000a + IL_0013: stloc.s V_4 + IL_0015: ldloc.s V_4 + IL_0017: ldarg.0 + IL_0018: ldnull + IL_0019: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001e: pop + IL_001f: stloc.s V_5 + IL_0021: ldloc.s V_5 + IL_0023: ldloc.3 + IL_0024: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_0029: nop + IL_002a: ldloc.1 + IL_002b: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0030: brtrue.s IL_000a - IL_002a: ldnull - IL_002b: stloc.2 - IL_002c: leave.s IL_0043 + IL_0032: ldnull + IL_0033: stloc.2 + IL_0034: leave.s IL_004b } finally { - IL_002e: ldloc.1 - IL_002f: isinst [runtime]System.IDisposable - IL_0034: stloc.s V_4 - IL_0036: ldloc.s V_4 - IL_0038: brfalse.s IL_0042 + IL_0036: ldloc.1 + IL_0037: isinst [runtime]System.IDisposable + IL_003c: stloc.s V_6 + IL_003e: ldloc.s V_6 + IL_0040: brfalse.s IL_004a - IL_003a: ldloc.s V_4 - IL_003c: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0041: endfinally - IL_0042: endfinally + IL_0042: ldloc.s V_6 + IL_0044: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0049: endfinally + IL_004a: endfinally } - IL_0043: ldloc.2 - IL_0044: pop - IL_0045: ldloca.s V_0 - IL_0047: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_004c: ret + IL_004b: ldloc.2 + IL_004c: pop + IL_004d: ldloca.s V_0 + IL_004f: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_0054: ret } .method public static int32[] f4(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -875,57 +914,66 @@ class [runtime]System.Collections.Generic.IEnumerator`1 V_1, class [runtime]System.Collections.Generic.IEnumerable`1 V_2, int32 V_3, - class [runtime]System.IDisposable V_4) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_5, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_6, + class [runtime]System.IDisposable V_7) IL_0000: nop IL_0001: ldarg.2 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_002a + IL_0008: br.s IL_0036 IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() IL_0010: stloc.3 IL_0011: ldloca.s V_0 - IL_0013: ldarg.0 - IL_0014: ldnull - IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001a: pop - IL_001b: ldarg.1 - IL_001c: ldnull - IL_001d: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0022: pop - IL_0023: ldloc.3 - IL_0024: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_0029: nop - IL_002a: ldloc.1 - IL_002b: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0030: brtrue.s IL_000a + IL_0013: stloc.s V_4 + IL_0015: ldloc.s V_4 + IL_0017: ldarg.0 + IL_0018: ldnull + IL_0019: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001e: pop + IL_001f: stloc.s V_5 + IL_0021: ldloc.s V_5 + IL_0023: ldarg.1 + IL_0024: ldnull + IL_0025: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_002a: pop + IL_002b: stloc.s V_6 + IL_002d: ldloc.s V_6 + IL_002f: ldloc.3 + IL_0030: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_0035: nop + IL_0036: ldloc.1 + IL_0037: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_003c: brtrue.s IL_000a - IL_0032: ldnull - IL_0033: stloc.2 - IL_0034: leave.s IL_004b + IL_003e: ldnull + IL_003f: stloc.2 + IL_0040: leave.s IL_0057 } finally { - IL_0036: ldloc.1 - IL_0037: isinst [runtime]System.IDisposable - IL_003c: stloc.s V_4 - IL_003e: ldloc.s V_4 - IL_0040: brfalse.s IL_004a - - IL_0042: ldloc.s V_4 - IL_0044: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0049: endfinally - IL_004a: endfinally + IL_0042: ldloc.1 + IL_0043: isinst [runtime]System.IDisposable + IL_0048: stloc.s V_7 + IL_004a: ldloc.s V_7 + IL_004c: brfalse.s IL_0056 + + IL_004e: ldloc.s V_7 + IL_0050: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0055: endfinally + IL_0056: endfinally } - IL_004b: ldloc.2 - IL_004c: pop - IL_004d: ldloca.s V_0 - IL_004f: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0054: ret + IL_0057: ldloc.2 + IL_0058: pop + IL_0059: ldloca.s V_0 + IL_005b: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_0060: ret } .method public static int32[] f5(class [runtime]System.Collections.Generic.IEnumerable`1 seq) cil managed @@ -936,49 +984,52 @@ class [runtime]System.Collections.Generic.IEnumerator`1 V_1, class [runtime]System.Collections.Generic.IEnumerable`1 V_2, int32 V_3, - class [runtime]System.IDisposable V_4) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_4, + class [runtime]System.IDisposable V_5) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_001a + IL_0008: br.s IL_001e IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() IL_0010: stloc.3 IL_0011: ldloca.s V_0 - IL_0013: ldloc.3 - IL_0014: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_0019: nop - IL_001a: ldloc.1 - IL_001b: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0020: brtrue.s IL_000a - - IL_0022: ldnull - IL_0023: stloc.2 - IL_0024: leave.s IL_003b + IL_0013: stloc.s V_4 + IL_0015: ldloc.s V_4 + IL_0017: ldloc.3 + IL_0018: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_001d: nop + IL_001e: ldloc.1 + IL_001f: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0024: brtrue.s IL_000a + + IL_0026: ldnull + IL_0027: stloc.2 + IL_0028: leave.s IL_003f } finally { - IL_0026: ldloc.1 - IL_0027: isinst [runtime]System.IDisposable - IL_002c: stloc.s V_4 - IL_002e: ldloc.s V_4 - IL_0030: brfalse.s IL_003a - - IL_0032: ldloc.s V_4 - IL_0034: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0039: endfinally - IL_003a: endfinally + IL_002a: ldloc.1 + IL_002b: isinst [runtime]System.IDisposable + IL_0030: stloc.s V_5 + IL_0032: ldloc.s V_5 + IL_0034: brfalse.s IL_003e + + IL_0036: ldloc.s V_5 + IL_0038: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_003d: endfinally + IL_003e: endfinally } - IL_003b: ldloc.2 - IL_003c: pop - IL_003d: ldloca.s V_0 - IL_003f: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0044: ret + IL_003f: ldloc.2 + IL_0040: pop + IL_0041: ldloca.s V_0 + IL_0043: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_0048: ret } .method public static int32[] f6(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -1119,7 +1170,8 @@ class [runtime]System.Collections.Generic.IEnumerator`1 V_3, class [runtime]System.Collections.Generic.IEnumerable`1 V_4, int32 V_5, - class [runtime]System.IDisposable V_6) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_6, + class [runtime]System.IDisposable V_7) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldnull @@ -1135,46 +1187,48 @@ IL_0018: stloc.3 .try { - IL_0019: br.s IL_0031 + IL_0019: br.s IL_0035 IL_001b: ldloc.3 IL_001c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() IL_0021: stloc.s V_5 IL_0023: ldloca.s V_0 - IL_0025: ldloc.s V_5 - IL_0027: ldloc.1 - IL_0028: add - IL_0029: ldloc.2 - IL_002a: add - IL_002b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_0030: nop - IL_0031: ldloc.3 - IL_0032: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0037: brtrue.s IL_001b - - IL_0039: ldnull - IL_003a: stloc.s V_4 - IL_003c: leave.s IL_0053 + IL_0025: stloc.s V_6 + IL_0027: ldloc.s V_6 + IL_0029: ldloc.s V_5 + IL_002b: ldloc.1 + IL_002c: add + IL_002d: ldloc.2 + IL_002e: add + IL_002f: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_0034: nop + IL_0035: ldloc.3 + IL_0036: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_003b: brtrue.s IL_001b + + IL_003d: ldnull + IL_003e: stloc.s V_4 + IL_0040: leave.s IL_0057 } finally { - IL_003e: ldloc.3 - IL_003f: isinst [runtime]System.IDisposable - IL_0044: stloc.s V_6 - IL_0046: ldloc.s V_6 - IL_0048: brfalse.s IL_0052 - - IL_004a: ldloc.s V_6 - IL_004c: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0051: endfinally - IL_0052: endfinally + IL_0042: ldloc.3 + IL_0043: isinst [runtime]System.IDisposable + IL_0048: stloc.s V_7 + IL_004a: ldloc.s V_7 + IL_004c: brfalse.s IL_0056 + + IL_004e: ldloc.s V_7 + IL_0050: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0055: endfinally + IL_0056: endfinally } - IL_0053: ldloc.s V_4 - IL_0055: pop - IL_0056: ldloca.s V_0 - IL_0058: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_005d: ret + IL_0057: ldloc.s V_4 + IL_0059: pop + IL_005a: ldloca.s V_0 + IL_005c: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_0061: ret } .method public static int32[] f9(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -1190,7 +1244,8 @@ class [runtime]System.Collections.Generic.IEnumerator`1 V_2, class [runtime]System.Collections.Generic.IEnumerable`1 V_3, int32 V_4, - class [runtime]System.IDisposable V_5) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_5, + class [runtime]System.IDisposable V_6) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldnull @@ -1206,44 +1261,46 @@ IL_0018: stloc.2 .try { - IL_0019: br.s IL_002f + IL_0019: br.s IL_0033 IL_001b: ldloc.2 IL_001c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() IL_0021: stloc.s V_4 IL_0023: ldloca.s V_0 - IL_0025: ldloc.s V_4 - IL_0027: ldloc.1 - IL_0028: add - IL_0029: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_002e: nop - IL_002f: ldloc.2 - IL_0030: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0035: brtrue.s IL_001b + IL_0025: stloc.s V_5 + IL_0027: ldloc.s V_5 + IL_0029: ldloc.s V_4 + IL_002b: ldloc.1 + IL_002c: add + IL_002d: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_0032: nop + IL_0033: ldloc.2 + IL_0034: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0039: brtrue.s IL_001b - IL_0037: ldnull - IL_0038: stloc.3 - IL_0039: leave.s IL_0050 + IL_003b: ldnull + IL_003c: stloc.3 + IL_003d: leave.s IL_0054 } finally { - IL_003b: ldloc.2 - IL_003c: isinst [runtime]System.IDisposable - IL_0041: stloc.s V_5 - IL_0043: ldloc.s V_5 - IL_0045: brfalse.s IL_004f - - IL_0047: ldloc.s V_5 - IL_0049: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_004e: endfinally - IL_004f: endfinally + IL_003f: ldloc.2 + IL_0040: isinst [runtime]System.IDisposable + IL_0045: stloc.s V_6 + IL_0047: ldloc.s V_6 + IL_0049: brfalse.s IL_0053 + + IL_004b: ldloc.s V_6 + IL_004d: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0052: endfinally + IL_0053: endfinally } - IL_0050: ldloc.3 - IL_0051: pop - IL_0052: ldloca.s V_0 - IL_0054: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0059: ret + IL_0054: ldloc.3 + IL_0055: pop + IL_0056: ldloca.s V_0 + IL_0058: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_005d: ret } .method public static int32[] f10(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -1258,7 +1315,8 @@ class [runtime]System.Collections.Generic.IEnumerator`1 V_1, class [runtime]System.Collections.Generic.IEnumerable`1 V_2, int32 V_3, - class [runtime]System.IDisposable V_4) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_4, + class [runtime]System.IDisposable V_5) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldnull @@ -1274,42 +1332,44 @@ IL_0018: stloc.1 .try { - IL_0019: br.s IL_002b + IL_0019: br.s IL_002f IL_001b: ldloc.1 IL_001c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() IL_0021: stloc.3 IL_0022: ldloca.s V_0 - IL_0024: ldloc.3 - IL_0025: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_002a: nop - IL_002b: ldloc.1 - IL_002c: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0031: brtrue.s IL_001b + IL_0024: stloc.s V_4 + IL_0026: ldloc.s V_4 + IL_0028: ldloc.3 + IL_0029: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_002e: nop + IL_002f: ldloc.1 + IL_0030: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0035: brtrue.s IL_001b - IL_0033: ldnull - IL_0034: stloc.2 - IL_0035: leave.s IL_004c + IL_0037: ldnull + IL_0038: stloc.2 + IL_0039: leave.s IL_0050 } finally { - IL_0037: ldloc.1 - IL_0038: isinst [runtime]System.IDisposable - IL_003d: stloc.s V_4 - IL_003f: ldloc.s V_4 - IL_0041: brfalse.s IL_004b - - IL_0043: ldloc.s V_4 - IL_0045: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_004a: endfinally - IL_004b: endfinally + IL_003b: ldloc.1 + IL_003c: isinst [runtime]System.IDisposable + IL_0041: stloc.s V_5 + IL_0043: ldloc.s V_5 + IL_0045: brfalse.s IL_004f + + IL_0047: ldloc.s V_5 + IL_0049: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_004e: endfinally + IL_004f: endfinally } - IL_004c: ldloc.2 - IL_004d: pop - IL_004e: ldloca.s V_0 - IL_0050: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0055: ret + IL_0050: ldloc.2 + IL_0051: pop + IL_0052: ldloca.s V_0 + IL_0054: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_0059: ret } .method public static int32[] f11(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, @@ -1325,7 +1385,8 @@ class [runtime]System.Collections.Generic.IEnumerator`1 V_2, class [runtime]System.Collections.Generic.IEnumerable`1 V_3, int32 V_4, - class [runtime]System.IDisposable V_5) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1& V_5, + class [runtime]System.IDisposable V_6) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldnull @@ -1341,44 +1402,46 @@ IL_0018: stloc.2 .try { - IL_0019: br.s IL_002f + IL_0019: br.s IL_0033 IL_001b: ldloc.2 IL_001c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() IL_0021: stloc.s V_4 IL_0023: ldloca.s V_0 - IL_0025: ldloc.s V_4 - IL_0027: ldloc.1 - IL_0028: add - IL_0029: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) - IL_002e: nop - IL_002f: ldloc.2 - IL_0030: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0035: brtrue.s IL_001b + IL_0025: stloc.s V_5 + IL_0027: ldloc.s V_5 + IL_0029: ldloc.s V_4 + IL_002b: ldloc.1 + IL_002c: add + IL_002d: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Add(!0) + IL_0032: nop + IL_0033: ldloc.2 + IL_0034: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0039: brtrue.s IL_001b - IL_0037: ldnull - IL_0038: stloc.3 - IL_0039: leave.s IL_0050 + IL_003b: ldnull + IL_003c: stloc.3 + IL_003d: leave.s IL_0054 } finally { - IL_003b: ldloc.2 - IL_003c: isinst [runtime]System.IDisposable - IL_0041: stloc.s V_5 - IL_0043: ldloc.s V_5 - IL_0045: brfalse.s IL_004f - - IL_0047: ldloc.s V_5 - IL_0049: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_004e: endfinally - IL_004f: endfinally + IL_003f: ldloc.2 + IL_0040: isinst [runtime]System.IDisposable + IL_0045: stloc.s V_6 + IL_0047: ldloc.s V_6 + IL_0049: brfalse.s IL_0053 + + IL_004b: ldloc.s V_6 + IL_004d: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0052: endfinally + IL_0053: endfinally } - IL_0050: ldloc.3 - IL_0051: pop - IL_0052: ldloca.s V_0 - IL_0054: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() - IL_0059: ret + IL_0054: ldloc.3 + IL_0055: pop + IL_0056: ldloca.s V_0 + IL_0058: call instance !0[] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ArrayCollector`1::Close() + IL_005d: ret } } @@ -1400,4 +1463,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInSeq_ToList.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInSeq_ToList.fs.il.bsl index 09c25aba616..e71d241c1bc 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInSeq_ToList.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInSeq_ToList.fs.il.bsl @@ -41,49 +41,52 @@ class [runtime]System.Collections.Generic.IEnumerator`1 V_1, class [runtime]System.Collections.Generic.IEnumerable`1 V_2, int32 V_3, - class [runtime]System.IDisposable V_4) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, + class [runtime]System.IDisposable V_5) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_001a + IL_0008: br.s IL_001e IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() IL_0010: stloc.3 IL_0011: ldloca.s V_0 - IL_0013: ldloc.3 - IL_0014: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0019: nop - IL_001a: ldloc.1 - IL_001b: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0020: brtrue.s IL_000a - - IL_0022: ldnull - IL_0023: stloc.2 - IL_0024: leave.s IL_003b + IL_0013: stloc.s V_4 + IL_0015: ldloc.s V_4 + IL_0017: ldloc.3 + IL_0018: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_001d: nop + IL_001e: ldloc.1 + IL_001f: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0024: brtrue.s IL_000a + + IL_0026: ldnull + IL_0027: stloc.2 + IL_0028: leave.s IL_003f } finally { - IL_0026: ldloc.1 - IL_0027: isinst [runtime]System.IDisposable - IL_002c: stloc.s V_4 - IL_002e: ldloc.s V_4 - IL_0030: brfalse.s IL_003a - - IL_0032: ldloc.s V_4 - IL_0034: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0039: endfinally - IL_003a: endfinally + IL_002a: ldloc.1 + IL_002b: isinst [runtime]System.IDisposable + IL_0030: stloc.s V_5 + IL_0032: ldloc.s V_5 + IL_0034: brfalse.s IL_003e + + IL_0036: ldloc.s V_5 + IL_0038: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_003d: endfinally + IL_003e: endfinally } - IL_003b: ldloc.2 - IL_003c: pop - IL_003d: ldloca.s V_0 - IL_003f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0044: ret + IL_003f: ldloc.2 + IL_0040: pop + IL_0041: ldloca.s V_0 + IL_0043: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0048: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f00(class [runtime]System.Collections.Generic.IEnumerable`1 seq) cil managed @@ -94,49 +97,52 @@ class [runtime]System.Collections.Generic.IEnumerator`1 V_1, class [runtime]System.Collections.Generic.IEnumerable`1 V_2, int32 V_3, - class [runtime]System.IDisposable V_4) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, + class [runtime]System.IDisposable V_5) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_001a + IL_0008: br.s IL_001e IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() IL_0010: stloc.3 IL_0011: ldloca.s V_0 - IL_0013: ldloc.3 - IL_0014: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0019: nop - IL_001a: ldloc.1 - IL_001b: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0020: brtrue.s IL_000a - - IL_0022: ldnull - IL_0023: stloc.2 - IL_0024: leave.s IL_003b + IL_0013: stloc.s V_4 + IL_0015: ldloc.s V_4 + IL_0017: ldloc.3 + IL_0018: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_001d: nop + IL_001e: ldloc.1 + IL_001f: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0024: brtrue.s IL_000a + + IL_0026: ldnull + IL_0027: stloc.2 + IL_0028: leave.s IL_003f } finally { - IL_0026: ldloc.1 - IL_0027: isinst [runtime]System.IDisposable - IL_002c: stloc.s V_4 - IL_002e: ldloc.s V_4 - IL_0030: brfalse.s IL_003a - - IL_0032: ldloc.s V_4 - IL_0034: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0039: endfinally - IL_003a: endfinally + IL_002a: ldloc.1 + IL_002b: isinst [runtime]System.IDisposable + IL_0030: stloc.s V_5 + IL_0032: ldloc.s V_5 + IL_0034: brfalse.s IL_003e + + IL_0036: ldloc.s V_5 + IL_0038: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_003d: endfinally + IL_003e: endfinally } - IL_003b: ldloc.2 - IL_003c: pop - IL_003d: ldloca.s V_0 - IL_003f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0044: ret + IL_003f: ldloc.2 + IL_0040: pop + IL_0041: ldloca.s V_0 + IL_0043: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0048: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f000(class [runtime]System.Collections.Generic.IEnumerable`1 seq) cil managed @@ -201,49 +207,52 @@ class [runtime]System.Collections.Generic.IEnumerator`1 V_1, class [runtime]System.Collections.Generic.IEnumerable`1 V_2, int32 V_3, - class [runtime]System.IDisposable V_4) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, + class [runtime]System.IDisposable V_5) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_001a + IL_0008: br.s IL_001e IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() IL_0010: stloc.3 IL_0011: ldloca.s V_0 - IL_0013: ldloc.3 - IL_0014: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0019: nop - IL_001a: ldloc.1 - IL_001b: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0020: brtrue.s IL_000a - - IL_0022: ldnull - IL_0023: stloc.2 - IL_0024: leave.s IL_003b + IL_0013: stloc.s V_4 + IL_0015: ldloc.s V_4 + IL_0017: ldloc.3 + IL_0018: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_001d: nop + IL_001e: ldloc.1 + IL_001f: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0024: brtrue.s IL_000a + + IL_0026: ldnull + IL_0027: stloc.2 + IL_0028: leave.s IL_003f } finally { - IL_0026: ldloc.1 - IL_0027: isinst [runtime]System.IDisposable - IL_002c: stloc.s V_4 - IL_002e: ldloc.s V_4 - IL_0030: brfalse.s IL_003a - - IL_0032: ldloc.s V_4 - IL_0034: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0039: endfinally - IL_003a: endfinally + IL_002a: ldloc.1 + IL_002b: isinst [runtime]System.IDisposable + IL_0030: stloc.s V_5 + IL_0032: ldloc.s V_5 + IL_0034: brfalse.s IL_003e + + IL_0036: ldloc.s V_5 + IL_0038: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_003d: endfinally + IL_003e: endfinally } - IL_003b: ldloc.2 - IL_003c: pop - IL_003d: ldloca.s V_0 - IL_003f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0044: ret + IL_003f: ldloc.2 + IL_0040: pop + IL_0041: ldloca.s V_0 + IL_0043: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0048: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -333,14 +342,15 @@ int32 V_3, int32 V_4, int32 V_5, - class [runtime]System.IDisposable V_6) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_6, + class [runtime]System.IDisposable V_7) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_002a + IL_0008: br.s IL_002e IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() @@ -354,40 +364,42 @@ IL_0018: add IL_0019: stloc.s V_5 IL_001b: ldloca.s V_0 - IL_001d: ldloc.3 - IL_001e: ldloc.s V_4 - IL_0020: add - IL_0021: ldloc.s V_5 - IL_0023: add - IL_0024: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0029: nop - IL_002a: ldloc.1 - IL_002b: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0030: brtrue.s IL_000a + IL_001d: stloc.s V_6 + IL_001f: ldloc.s V_6 + IL_0021: ldloc.3 + IL_0022: ldloc.s V_4 + IL_0024: add + IL_0025: ldloc.s V_5 + IL_0027: add + IL_0028: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_002d: nop + IL_002e: ldloc.1 + IL_002f: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0034: brtrue.s IL_000a - IL_0032: ldnull - IL_0033: stloc.2 - IL_0034: leave.s IL_004b + IL_0036: ldnull + IL_0037: stloc.2 + IL_0038: leave.s IL_004f } finally { - IL_0036: ldloc.1 - IL_0037: isinst [runtime]System.IDisposable - IL_003c: stloc.s V_6 - IL_003e: ldloc.s V_6 - IL_0040: brfalse.s IL_004a - - IL_0042: ldloc.s V_6 - IL_0044: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0049: endfinally - IL_004a: endfinally + IL_003a: ldloc.1 + IL_003b: isinst [runtime]System.IDisposable + IL_0040: stloc.s V_7 + IL_0042: ldloc.s V_7 + IL_0044: brfalse.s IL_004e + + IL_0046: ldloc.s V_7 + IL_0048: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_004d: endfinally + IL_004e: endfinally } - IL_004b: ldloc.2 - IL_004c: pop - IL_004d: ldloca.s V_0 - IL_004f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0054: ret + IL_004f: ldloc.2 + IL_0050: pop + IL_0051: ldloca.s V_0 + IL_0053: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0058: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -406,14 +418,15 @@ int32 V_3, int32 V_4, int32 V_5, - class [runtime]System.IDisposable V_6) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_6, + class [runtime]System.IDisposable V_7) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_0032 + IL_0008: br.s IL_0036 IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() @@ -431,40 +444,42 @@ IL_0020: add IL_0021: stloc.s V_5 IL_0023: ldloca.s V_0 - IL_0025: ldloc.3 - IL_0026: ldloc.s V_4 - IL_0028: add - IL_0029: ldloc.s V_5 - IL_002b: add - IL_002c: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0031: nop - IL_0032: ldloc.1 - IL_0033: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0038: brtrue.s IL_000a + IL_0025: stloc.s V_6 + IL_0027: ldloc.s V_6 + IL_0029: ldloc.3 + IL_002a: ldloc.s V_4 + IL_002c: add + IL_002d: ldloc.s V_5 + IL_002f: add + IL_0030: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0035: nop + IL_0036: ldloc.1 + IL_0037: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_003c: brtrue.s IL_000a - IL_003a: ldnull - IL_003b: stloc.2 - IL_003c: leave.s IL_0053 + IL_003e: ldnull + IL_003f: stloc.2 + IL_0040: leave.s IL_0057 } finally { - IL_003e: ldloc.1 - IL_003f: isinst [runtime]System.IDisposable - IL_0044: stloc.s V_6 - IL_0046: ldloc.s V_6 - IL_0048: brfalse.s IL_0052 - - IL_004a: ldloc.s V_6 - IL_004c: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0051: endfinally - IL_0052: endfinally + IL_0042: ldloc.1 + IL_0043: isinst [runtime]System.IDisposable + IL_0048: stloc.s V_7 + IL_004a: ldloc.s V_7 + IL_004c: brfalse.s IL_0056 + + IL_004e: ldloc.s V_7 + IL_0050: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0055: endfinally + IL_0056: endfinally } - IL_0053: ldloc.2 - IL_0054: pop - IL_0055: ldloca.s V_0 - IL_0057: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_005c: ret + IL_0057: ldloc.2 + IL_0058: pop + IL_0059: ldloca.s V_0 + IL_005b: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0060: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -483,14 +498,15 @@ int32 V_3, int32 V_4, int32 V_5, - class [runtime]System.IDisposable V_6) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_6, + class [runtime]System.IDisposable V_7) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_0032 + IL_0008: br.s IL_0036 IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() @@ -508,40 +524,42 @@ IL_0020: add IL_0021: stloc.s V_5 IL_0023: ldloca.s V_0 - IL_0025: ldloc.3 - IL_0026: ldloc.s V_4 - IL_0028: add - IL_0029: ldloc.s V_5 - IL_002b: add - IL_002c: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0031: nop - IL_0032: ldloc.1 - IL_0033: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0038: brtrue.s IL_000a + IL_0025: stloc.s V_6 + IL_0027: ldloc.s V_6 + IL_0029: ldloc.3 + IL_002a: ldloc.s V_4 + IL_002c: add + IL_002d: ldloc.s V_5 + IL_002f: add + IL_0030: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0035: nop + IL_0036: ldloc.1 + IL_0037: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_003c: brtrue.s IL_000a - IL_003a: ldnull - IL_003b: stloc.2 - IL_003c: leave.s IL_0053 + IL_003e: ldnull + IL_003f: stloc.2 + IL_0040: leave.s IL_0057 } finally { - IL_003e: ldloc.1 - IL_003f: isinst [runtime]System.IDisposable - IL_0044: stloc.s V_6 - IL_0046: ldloc.s V_6 - IL_0048: brfalse.s IL_0052 - - IL_004a: ldloc.s V_6 - IL_004c: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0051: endfinally - IL_0052: endfinally + IL_0042: ldloc.1 + IL_0043: isinst [runtime]System.IDisposable + IL_0048: stloc.s V_7 + IL_004a: ldloc.s V_7 + IL_004c: brfalse.s IL_0056 + + IL_004e: ldloc.s V_7 + IL_0050: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0055: endfinally + IL_0056: endfinally } - IL_0053: ldloc.2 - IL_0054: pop - IL_0055: ldloca.s V_0 - IL_0057: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_005c: ret + IL_0057: ldloc.2 + IL_0058: pop + IL_0059: ldloca.s V_0 + IL_005b: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0060: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -560,14 +578,15 @@ int32 V_3, int32 V_4, int32 V_5, - class [runtime]System.IDisposable V_6) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_6, + class [runtime]System.IDisposable V_7) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_0032 + IL_0008: br.s IL_0036 IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() @@ -585,40 +604,42 @@ IL_001d: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) IL_0022: pop IL_0023: ldloca.s V_0 - IL_0025: ldloc.3 - IL_0026: ldloc.s V_4 - IL_0028: add - IL_0029: ldloc.s V_5 - IL_002b: add - IL_002c: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0031: nop - IL_0032: ldloc.1 - IL_0033: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0038: brtrue.s IL_000a + IL_0025: stloc.s V_6 + IL_0027: ldloc.s V_6 + IL_0029: ldloc.3 + IL_002a: ldloc.s V_4 + IL_002c: add + IL_002d: ldloc.s V_5 + IL_002f: add + IL_0030: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0035: nop + IL_0036: ldloc.1 + IL_0037: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_003c: brtrue.s IL_000a - IL_003a: ldnull - IL_003b: stloc.2 - IL_003c: leave.s IL_0053 + IL_003e: ldnull + IL_003f: stloc.2 + IL_0040: leave.s IL_0057 } finally { - IL_003e: ldloc.1 - IL_003f: isinst [runtime]System.IDisposable - IL_0044: stloc.s V_6 - IL_0046: ldloc.s V_6 - IL_0048: brfalse.s IL_0052 - - IL_004a: ldloc.s V_6 - IL_004c: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0051: endfinally - IL_0052: endfinally + IL_0042: ldloc.1 + IL_0043: isinst [runtime]System.IDisposable + IL_0048: stloc.s V_7 + IL_004a: ldloc.s V_7 + IL_004c: brfalse.s IL_0056 + + IL_004e: ldloc.s V_7 + IL_0050: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0055: endfinally + IL_0056: endfinally } - IL_0053: ldloc.2 - IL_0054: pop - IL_0055: ldloca.s V_0 - IL_0057: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_005c: ret + IL_0057: ldloc.2 + IL_0058: pop + IL_0059: ldloca.s V_0 + IL_005b: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0060: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -637,14 +658,16 @@ int32 V_3, int32 V_4, int32 V_5, - class [runtime]System.IDisposable V_6) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_6, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_7, + class [runtime]System.IDisposable V_8) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_0039 + IL_0008: br.s IL_0041 IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() @@ -658,46 +681,50 @@ IL_0018: add IL_0019: stloc.s V_5 IL_001b: ldloca.s V_0 - IL_001d: ldarg.1 - IL_001e: ldnull - IL_001f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0024: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0029: nop - IL_002a: ldloca.s V_0 - IL_002c: ldloc.3 - IL_002d: ldloc.s V_4 - IL_002f: add - IL_0030: ldloc.s V_5 - IL_0032: add - IL_0033: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0038: nop - IL_0039: ldloc.1 - IL_003a: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_003f: brtrue.s IL_000a - - IL_0041: ldnull - IL_0042: stloc.2 - IL_0043: leave.s IL_005a + IL_001d: stloc.s V_6 + IL_001f: ldloc.s V_6 + IL_0021: ldarg.1 + IL_0022: ldnull + IL_0023: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0028: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_002d: nop + IL_002e: ldloca.s V_0 + IL_0030: stloc.s V_7 + IL_0032: ldloc.s V_7 + IL_0034: ldloc.3 + IL_0035: ldloc.s V_4 + IL_0037: add + IL_0038: ldloc.s V_5 + IL_003a: add + IL_003b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0040: nop + IL_0041: ldloc.1 + IL_0042: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0047: brtrue.s IL_000a + + IL_0049: ldnull + IL_004a: stloc.2 + IL_004b: leave.s IL_0062 } finally { - IL_0045: ldloc.1 - IL_0046: isinst [runtime]System.IDisposable - IL_004b: stloc.s V_6 - IL_004d: ldloc.s V_6 - IL_004f: brfalse.s IL_0059 - - IL_0051: ldloc.s V_6 - IL_0053: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0058: endfinally - IL_0059: endfinally + IL_004d: ldloc.1 + IL_004e: isinst [runtime]System.IDisposable + IL_0053: stloc.s V_8 + IL_0055: ldloc.s V_8 + IL_0057: brfalse.s IL_0061 + + IL_0059: ldloc.s V_8 + IL_005b: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0060: endfinally + IL_0061: endfinally } - IL_005a: ldloc.2 - IL_005b: pop - IL_005c: ldloca.s V_0 - IL_005e: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0063: ret + IL_0062: ldloc.2 + IL_0063: pop + IL_0064: ldloca.s V_0 + IL_0066: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_006b: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f1(class [runtime]System.Collections.Generic.IEnumerable`1 seq) cil managed @@ -708,49 +735,52 @@ class [runtime]System.Collections.Generic.IEnumerator`1 V_1, class [runtime]System.Collections.Generic.IEnumerable`1 V_2, int32 V_3, - class [runtime]System.IDisposable V_4) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, + class [runtime]System.IDisposable V_5) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_001a + IL_0008: br.s IL_001e IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() IL_0010: stloc.3 IL_0011: ldloca.s V_0 - IL_0013: ldloc.3 - IL_0014: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0019: nop - IL_001a: ldloc.1 - IL_001b: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0020: brtrue.s IL_000a - - IL_0022: ldnull - IL_0023: stloc.2 - IL_0024: leave.s IL_003b + IL_0013: stloc.s V_4 + IL_0015: ldloc.s V_4 + IL_0017: ldloc.3 + IL_0018: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_001d: nop + IL_001e: ldloc.1 + IL_001f: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0024: brtrue.s IL_000a + + IL_0026: ldnull + IL_0027: stloc.2 + IL_0028: leave.s IL_003f } finally { - IL_0026: ldloc.1 - IL_0027: isinst [runtime]System.IDisposable - IL_002c: stloc.s V_4 - IL_002e: ldloc.s V_4 - IL_0030: brfalse.s IL_003a - - IL_0032: ldloc.s V_4 - IL_0034: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0039: endfinally - IL_003a: endfinally + IL_002a: ldloc.1 + IL_002b: isinst [runtime]System.IDisposable + IL_0030: stloc.s V_5 + IL_0032: ldloc.s V_5 + IL_0034: brfalse.s IL_003e + + IL_0036: ldloc.s V_5 + IL_0038: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_003d: endfinally + IL_003e: endfinally } - IL_003b: ldloc.2 - IL_003c: pop - IL_003d: ldloca.s V_0 - IL_003f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0044: ret + IL_003f: ldloc.2 + IL_0040: pop + IL_0041: ldloca.s V_0 + IL_0043: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0048: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f2(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, class [runtime]System.Collections.Generic.IEnumerable`1 seq) cil managed @@ -762,51 +792,54 @@ class [runtime]System.Collections.Generic.IEnumerator`1 V_1, class [runtime]System.Collections.Generic.IEnumerable`1 V_2, int32 V_3, - class [runtime]System.IDisposable V_4) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, + class [runtime]System.IDisposable V_5) IL_0000: nop IL_0001: ldarg.1 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_0020 + IL_0008: br.s IL_0024 IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() IL_0010: stloc.3 IL_0011: ldloca.s V_0 - IL_0013: ldarg.0 - IL_0014: ldloc.3 - IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001a: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_001f: nop - IL_0020: ldloc.1 - IL_0021: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0026: brtrue.s IL_000a - - IL_0028: ldnull - IL_0029: stloc.2 - IL_002a: leave.s IL_0041 + IL_0013: stloc.s V_4 + IL_0015: ldloc.s V_4 + IL_0017: ldarg.0 + IL_0018: ldloc.3 + IL_0019: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0023: nop + IL_0024: ldloc.1 + IL_0025: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_002a: brtrue.s IL_000a + + IL_002c: ldnull + IL_002d: stloc.2 + IL_002e: leave.s IL_0045 } finally { - IL_002c: ldloc.1 - IL_002d: isinst [runtime]System.IDisposable - IL_0032: stloc.s V_4 - IL_0034: ldloc.s V_4 - IL_0036: brfalse.s IL_0040 - - IL_0038: ldloc.s V_4 - IL_003a: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_003f: endfinally - IL_0040: endfinally + IL_0030: ldloc.1 + IL_0031: isinst [runtime]System.IDisposable + IL_0036: stloc.s V_5 + IL_0038: ldloc.s V_5 + IL_003a: brfalse.s IL_0044 + + IL_003c: ldloc.s V_5 + IL_003e: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0043: endfinally + IL_0044: endfinally } - IL_0041: ldloc.2 - IL_0042: pop - IL_0043: ldloca.s V_0 - IL_0045: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_004a: ret + IL_0045: ldloc.2 + IL_0046: pop + IL_0047: ldloca.s V_0 + IL_0049: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_004e: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f3(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, class [runtime]System.Collections.Generic.IEnumerable`1 seq) cil managed @@ -818,53 +851,59 @@ class [runtime]System.Collections.Generic.IEnumerator`1 V_1, class [runtime]System.Collections.Generic.IEnumerable`1 V_2, int32 V_3, - class [runtime]System.IDisposable V_4) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5, + class [runtime]System.IDisposable V_6) IL_0000: nop IL_0001: ldarg.1 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_0022 + IL_0008: br.s IL_002a IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() IL_0010: stloc.3 IL_0011: ldloca.s V_0 - IL_0013: ldarg.0 - IL_0014: ldnull - IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001a: pop - IL_001b: ldloc.3 - IL_001c: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0021: nop - IL_0022: ldloc.1 - IL_0023: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0028: brtrue.s IL_000a + IL_0013: stloc.s V_4 + IL_0015: ldloc.s V_4 + IL_0017: ldarg.0 + IL_0018: ldnull + IL_0019: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001e: pop + IL_001f: stloc.s V_5 + IL_0021: ldloc.s V_5 + IL_0023: ldloc.3 + IL_0024: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0029: nop + IL_002a: ldloc.1 + IL_002b: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0030: brtrue.s IL_000a - IL_002a: ldnull - IL_002b: stloc.2 - IL_002c: leave.s IL_0043 + IL_0032: ldnull + IL_0033: stloc.2 + IL_0034: leave.s IL_004b } finally { - IL_002e: ldloc.1 - IL_002f: isinst [runtime]System.IDisposable - IL_0034: stloc.s V_4 - IL_0036: ldloc.s V_4 - IL_0038: brfalse.s IL_0042 + IL_0036: ldloc.1 + IL_0037: isinst [runtime]System.IDisposable + IL_003c: stloc.s V_6 + IL_003e: ldloc.s V_6 + IL_0040: brfalse.s IL_004a - IL_003a: ldloc.s V_4 - IL_003c: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0041: endfinally - IL_0042: endfinally + IL_0042: ldloc.s V_6 + IL_0044: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0049: endfinally + IL_004a: endfinally } - IL_0043: ldloc.2 - IL_0044: pop - IL_0045: ldloca.s V_0 - IL_0047: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_004c: ret + IL_004b: ldloc.2 + IL_004c: pop + IL_004d: ldloca.s V_0 + IL_004f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0054: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -880,57 +919,66 @@ class [runtime]System.Collections.Generic.IEnumerator`1 V_1, class [runtime]System.Collections.Generic.IEnumerable`1 V_2, int32 V_3, - class [runtime]System.IDisposable V_4) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_6, + class [runtime]System.IDisposable V_7) IL_0000: nop IL_0001: ldarg.2 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_002a + IL_0008: br.s IL_0036 IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() IL_0010: stloc.3 IL_0011: ldloca.s V_0 - IL_0013: ldarg.0 - IL_0014: ldnull - IL_0015: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001a: pop - IL_001b: ldarg.1 - IL_001c: ldnull - IL_001d: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0022: pop - IL_0023: ldloc.3 - IL_0024: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0029: nop - IL_002a: ldloc.1 - IL_002b: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0030: brtrue.s IL_000a + IL_0013: stloc.s V_4 + IL_0015: ldloc.s V_4 + IL_0017: ldarg.0 + IL_0018: ldnull + IL_0019: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_001e: pop + IL_001f: stloc.s V_5 + IL_0021: ldloc.s V_5 + IL_0023: ldarg.1 + IL_0024: ldnull + IL_0025: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_002a: pop + IL_002b: stloc.s V_6 + IL_002d: ldloc.s V_6 + IL_002f: ldloc.3 + IL_0030: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0035: nop + IL_0036: ldloc.1 + IL_0037: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_003c: brtrue.s IL_000a - IL_0032: ldnull - IL_0033: stloc.2 - IL_0034: leave.s IL_004b + IL_003e: ldnull + IL_003f: stloc.2 + IL_0040: leave.s IL_0057 } finally { - IL_0036: ldloc.1 - IL_0037: isinst [runtime]System.IDisposable - IL_003c: stloc.s V_4 - IL_003e: ldloc.s V_4 - IL_0040: brfalse.s IL_004a - - IL_0042: ldloc.s V_4 - IL_0044: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0049: endfinally - IL_004a: endfinally + IL_0042: ldloc.1 + IL_0043: isinst [runtime]System.IDisposable + IL_0048: stloc.s V_7 + IL_004a: ldloc.s V_7 + IL_004c: brfalse.s IL_0056 + + IL_004e: ldloc.s V_7 + IL_0050: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0055: endfinally + IL_0056: endfinally } - IL_004b: ldloc.2 - IL_004c: pop - IL_004d: ldloca.s V_0 - IL_004f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0054: ret + IL_0057: ldloc.2 + IL_0058: pop + IL_0059: ldloca.s V_0 + IL_005b: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0060: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f5(class [runtime]System.Collections.Generic.IEnumerable`1 seq) cil managed @@ -941,49 +989,52 @@ class [runtime]System.Collections.Generic.IEnumerator`1 V_1, class [runtime]System.Collections.Generic.IEnumerable`1 V_2, int32 V_3, - class [runtime]System.IDisposable V_4) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, + class [runtime]System.IDisposable V_5) IL_0000: nop IL_0001: ldarg.0 IL_0002: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0007: stloc.1 .try { - IL_0008: br.s IL_001a + IL_0008: br.s IL_001e IL_000a: ldloc.1 IL_000b: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() IL_0010: stloc.3 IL_0011: ldloca.s V_0 - IL_0013: ldloc.3 - IL_0014: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0019: nop - IL_001a: ldloc.1 - IL_001b: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0020: brtrue.s IL_000a - - IL_0022: ldnull - IL_0023: stloc.2 - IL_0024: leave.s IL_003b + IL_0013: stloc.s V_4 + IL_0015: ldloc.s V_4 + IL_0017: ldloc.3 + IL_0018: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_001d: nop + IL_001e: ldloc.1 + IL_001f: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0024: brtrue.s IL_000a + + IL_0026: ldnull + IL_0027: stloc.2 + IL_0028: leave.s IL_003f } finally { - IL_0026: ldloc.1 - IL_0027: isinst [runtime]System.IDisposable - IL_002c: stloc.s V_4 - IL_002e: ldloc.s V_4 - IL_0030: brfalse.s IL_003a - - IL_0032: ldloc.s V_4 - IL_0034: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0039: endfinally - IL_003a: endfinally + IL_002a: ldloc.1 + IL_002b: isinst [runtime]System.IDisposable + IL_0030: stloc.s V_5 + IL_0032: ldloc.s V_5 + IL_0034: brfalse.s IL_003e + + IL_0036: ldloc.s V_5 + IL_0038: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_003d: endfinally + IL_003e: endfinally } - IL_003b: ldloc.2 - IL_003c: pop - IL_003d: ldloca.s V_0 - IL_003f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0044: ret + IL_003f: ldloc.2 + IL_0040: pop + IL_0041: ldloca.s V_0 + IL_0043: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0048: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f6(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f, class [runtime]System.Collections.Generic.IEnumerable`1 seq) cil managed @@ -1125,7 +1176,8 @@ class [runtime]System.Collections.Generic.IEnumerator`1 V_3, class [runtime]System.Collections.Generic.IEnumerable`1 V_4, int32 V_5, - class [runtime]System.IDisposable V_6) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_6, + class [runtime]System.IDisposable V_7) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldnull @@ -1141,46 +1193,48 @@ IL_0018: stloc.3 .try { - IL_0019: br.s IL_0031 + IL_0019: br.s IL_0035 IL_001b: ldloc.3 IL_001c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() IL_0021: stloc.s V_5 IL_0023: ldloca.s V_0 - IL_0025: ldloc.s V_5 - IL_0027: ldloc.1 - IL_0028: add - IL_0029: ldloc.2 - IL_002a: add - IL_002b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0030: nop - IL_0031: ldloc.3 - IL_0032: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0037: brtrue.s IL_001b - - IL_0039: ldnull - IL_003a: stloc.s V_4 - IL_003c: leave.s IL_0053 + IL_0025: stloc.s V_6 + IL_0027: ldloc.s V_6 + IL_0029: ldloc.s V_5 + IL_002b: ldloc.1 + IL_002c: add + IL_002d: ldloc.2 + IL_002e: add + IL_002f: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0034: nop + IL_0035: ldloc.3 + IL_0036: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_003b: brtrue.s IL_001b + + IL_003d: ldnull + IL_003e: stloc.s V_4 + IL_0040: leave.s IL_0057 } finally { - IL_003e: ldloc.3 - IL_003f: isinst [runtime]System.IDisposable - IL_0044: stloc.s V_6 - IL_0046: ldloc.s V_6 - IL_0048: brfalse.s IL_0052 - - IL_004a: ldloc.s V_6 - IL_004c: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0051: endfinally - IL_0052: endfinally + IL_0042: ldloc.3 + IL_0043: isinst [runtime]System.IDisposable + IL_0048: stloc.s V_7 + IL_004a: ldloc.s V_7 + IL_004c: brfalse.s IL_0056 + + IL_004e: ldloc.s V_7 + IL_0050: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0055: endfinally + IL_0056: endfinally } - IL_0053: ldloc.s V_4 - IL_0055: pop - IL_0056: ldloca.s V_0 - IL_0058: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_005d: ret + IL_0057: ldloc.s V_4 + IL_0059: pop + IL_005a: ldloca.s V_0 + IL_005c: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0061: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -1197,7 +1251,8 @@ class [runtime]System.Collections.Generic.IEnumerator`1 V_2, class [runtime]System.Collections.Generic.IEnumerable`1 V_3, int32 V_4, - class [runtime]System.IDisposable V_5) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5, + class [runtime]System.IDisposable V_6) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldnull @@ -1213,44 +1268,46 @@ IL_0018: stloc.2 .try { - IL_0019: br.s IL_002f + IL_0019: br.s IL_0033 IL_001b: ldloc.2 IL_001c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() IL_0021: stloc.s V_4 IL_0023: ldloca.s V_0 - IL_0025: ldloc.s V_4 - IL_0027: ldloc.1 - IL_0028: add - IL_0029: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_002e: nop - IL_002f: ldloc.2 - IL_0030: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0035: brtrue.s IL_001b + IL_0025: stloc.s V_5 + IL_0027: ldloc.s V_5 + IL_0029: ldloc.s V_4 + IL_002b: ldloc.1 + IL_002c: add + IL_002d: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0032: nop + IL_0033: ldloc.2 + IL_0034: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0039: brtrue.s IL_001b - IL_0037: ldnull - IL_0038: stloc.3 - IL_0039: leave.s IL_0050 + IL_003b: ldnull + IL_003c: stloc.3 + IL_003d: leave.s IL_0054 } finally { - IL_003b: ldloc.2 - IL_003c: isinst [runtime]System.IDisposable - IL_0041: stloc.s V_5 - IL_0043: ldloc.s V_5 - IL_0045: brfalse.s IL_004f - - IL_0047: ldloc.s V_5 - IL_0049: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_004e: endfinally - IL_004f: endfinally + IL_003f: ldloc.2 + IL_0040: isinst [runtime]System.IDisposable + IL_0045: stloc.s V_6 + IL_0047: ldloc.s V_6 + IL_0049: brfalse.s IL_0053 + + IL_004b: ldloc.s V_6 + IL_004d: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0052: endfinally + IL_0053: endfinally } - IL_0050: ldloc.3 - IL_0051: pop - IL_0052: ldloca.s V_0 - IL_0054: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0059: ret + IL_0054: ldloc.3 + IL_0055: pop + IL_0056: ldloca.s V_0 + IL_0058: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_005d: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -1266,7 +1323,8 @@ class [runtime]System.Collections.Generic.IEnumerator`1 V_1, class [runtime]System.Collections.Generic.IEnumerable`1 V_2, int32 V_3, - class [runtime]System.IDisposable V_4) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, + class [runtime]System.IDisposable V_5) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldnull @@ -1282,42 +1340,44 @@ IL_0018: stloc.1 .try { - IL_0019: br.s IL_002b + IL_0019: br.s IL_002f IL_001b: ldloc.1 IL_001c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() IL_0021: stloc.3 IL_0022: ldloca.s V_0 - IL_0024: ldloc.3 - IL_0025: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_002a: nop - IL_002b: ldloc.1 - IL_002c: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0031: brtrue.s IL_001b + IL_0024: stloc.s V_4 + IL_0026: ldloc.s V_4 + IL_0028: ldloc.3 + IL_0029: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_002e: nop + IL_002f: ldloc.1 + IL_0030: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0035: brtrue.s IL_001b - IL_0033: ldnull - IL_0034: stloc.2 - IL_0035: leave.s IL_004c + IL_0037: ldnull + IL_0038: stloc.2 + IL_0039: leave.s IL_0050 } finally { - IL_0037: ldloc.1 - IL_0038: isinst [runtime]System.IDisposable - IL_003d: stloc.s V_4 - IL_003f: ldloc.s V_4 - IL_0041: brfalse.s IL_004b - - IL_0043: ldloc.s V_4 - IL_0045: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_004a: endfinally - IL_004b: endfinally + IL_003b: ldloc.1 + IL_003c: isinst [runtime]System.IDisposable + IL_0041: stloc.s V_5 + IL_0043: ldloc.s V_5 + IL_0045: brfalse.s IL_004f + + IL_0047: ldloc.s V_5 + IL_0049: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_004e: endfinally + IL_004f: endfinally } - IL_004c: ldloc.2 - IL_004d: pop - IL_004e: ldloca.s V_0 - IL_0050: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0055: ret + IL_0050: ldloc.2 + IL_0051: pop + IL_0052: ldloca.s V_0 + IL_0054: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0059: ret } .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -1334,7 +1394,8 @@ class [runtime]System.Collections.Generic.IEnumerator`1 V_2, class [runtime]System.Collections.Generic.IEnumerable`1 V_3, int32 V_4, - class [runtime]System.IDisposable V_5) + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5, + class [runtime]System.IDisposable V_6) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldnull @@ -1350,44 +1411,46 @@ IL_0018: stloc.2 .try { - IL_0019: br.s IL_002f + IL_0019: br.s IL_0033 IL_001b: ldloc.2 IL_001c: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() IL_0021: stloc.s V_4 IL_0023: ldloca.s V_0 - IL_0025: ldloc.s V_4 - IL_0027: ldloc.1 - IL_0028: add - IL_0029: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_002e: nop - IL_002f: ldloc.2 - IL_0030: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0035: brtrue.s IL_001b + IL_0025: stloc.s V_5 + IL_0027: ldloc.s V_5 + IL_0029: ldloc.s V_4 + IL_002b: ldloc.1 + IL_002c: add + IL_002d: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0032: nop + IL_0033: ldloc.2 + IL_0034: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0039: brtrue.s IL_001b - IL_0037: ldnull - IL_0038: stloc.3 - IL_0039: leave.s IL_0050 + IL_003b: ldnull + IL_003c: stloc.3 + IL_003d: leave.s IL_0054 } finally { - IL_003b: ldloc.2 - IL_003c: isinst [runtime]System.IDisposable - IL_0041: stloc.s V_5 - IL_0043: ldloc.s V_5 - IL_0045: brfalse.s IL_004f - - IL_0047: ldloc.s V_5 - IL_0049: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_004e: endfinally - IL_004f: endfinally + IL_003f: ldloc.2 + IL_0040: isinst [runtime]System.IDisposable + IL_0045: stloc.s V_6 + IL_0047: ldloc.s V_6 + IL_0049: brfalse.s IL_0053 + + IL_004b: ldloc.s V_6 + IL_004d: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0052: endfinally + IL_0053: endfinally } - IL_0050: ldloc.3 - IL_0051: pop - IL_0052: ldloca.s V_0 - IL_0054: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0059: ret + IL_0054: ldloc.3 + IL_0055: pop + IL_0056: ldloca.s V_0 + IL_0058: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_005d: ret } } @@ -1409,4 +1472,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugPointsOnStack/DebugPointInOperandPosition.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugPointsOnStack/DebugPointInOperandPosition.fs new file mode 100644 index 00000000000..ba49db99aea --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugPointsOnStack/DebugPointInOperandPosition.fs @@ -0,0 +1,4 @@ +module DebugPointInOperandPosition + +let test (x: int) = + x + (System.Console.WriteLine(); x) diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugPointsOnStack/DebugPointInOperandPosition.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugPointsOnStack/DebugPointInOperandPosition.fs.il.bsl new file mode 100644 index 00000000000..a150005cb4c --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugPointsOnStack/DebugPointInOperandPosition.fs.il.bsl @@ -0,0 +1,64 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly extern runtime { } +.assembly assembly +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + + + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module assembly.dll + +.imagebase {value} +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 +.corflags 0x00000001 + + + + + +.class public abstract auto ansi sealed assembly + extends [runtime]System.Object +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .method public static int32 test(int32 x) cil managed + { + + .maxstack 4 + .locals init (int32 V_0, + int32 V_1) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: call void [runtime]System.Console::WriteLine() + IL_0008: stloc.1 + IL_0009: ldloc.1 + IL_000a: ldarg.0 + IL_000b: add + IL_000c: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ +} + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugPointsOnStack/DebugPointInOperandPosition.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugPointsOnStack/DebugPointInOperandPosition.fs.il.net472.bsl new file mode 100644 index 00000000000..79cc7ca659e --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugPointsOnStack/DebugPointInOperandPosition.fs.il.net472.bsl @@ -0,0 +1,63 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly assembly +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + + + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module assembly.dll + +.imagebase {value} +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 +.corflags 0x00000001 + + + + + +.class public abstract auto ansi sealed assembly + extends [runtime]System.Object +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .method public static int32 test(int32 x) cil managed + { + + .maxstack 4 + .locals init (int32 V_0, + int32 V_1) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: call void [runtime]System.Console::WriteLine() + IL_0008: stloc.1 + IL_0009: ldloc.1 + IL_000a: ldarg.0 + IL_000b: add + IL_000c: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ +} + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugPointsOnStack/DebugPointsOnStack.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugPointsOnStack/DebugPointsOnStack.fs new file mode 100644 index 00000000000..1d260ad2ca2 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugPointsOnStack/DebugPointsOnStack.fs @@ -0,0 +1,19 @@ +namespace EmittedIL + +open Xunit +open FSharp.Test +open FSharp.Test.Compiler + +module DebugPointsOnStack = + + // A debug point must be emitted at an empty evaluation stack so a debugger can bind a breakpoint to it. + // The baseline shows the operand pending across 'System.Console.WriteLine()' spilled to a local for that. + [] + let ``DebugPointInOperandPosition_fs`` compilation = + compilation + |> getCompilation + |> withNoOptimize + |> withEmbeddedPdb + |> ignoreWarnings + |> compile + |> verifyILBaseline diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter01.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter01.fs.il.bsl index 7287e8ae08a..de7d051766d 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter01.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter01.fs.il.bsl @@ -40,39 +40,42 @@ .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, uint64 V_1, int32 V_2, - int32 V_3) + int32 V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4) IL_0000: ldc.i4.0 IL_0001: conv.i8 IL_0002: stloc.1 IL_0003: ldc.i4.0 IL_0004: stloc.2 - IL_0005: br.s IL_001d + IL_0005: br.s IL_0021 IL_0007: ldloca.s V_0 IL_0009: ldloc.2 IL_000a: stloc.3 - IL_000b: ldloc.3 - IL_000c: ldloc.3 - IL_000d: mul - IL_000e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0013: nop - IL_0014: ldloc.2 - IL_0015: ldc.i4.1 - IL_0016: add - IL_0017: stloc.2 - IL_0018: ldloc.1 + IL_000b: stloc.s V_4 + IL_000d: ldloc.s V_4 + IL_000f: ldloc.3 + IL_0010: ldloc.3 + IL_0011: mul + IL_0012: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0017: nop + IL_0018: ldloc.2 IL_0019: ldc.i4.1 - IL_001a: conv.i8 - IL_001b: add - IL_001c: stloc.1 - IL_001d: ldloc.1 - IL_001e: ldc.i4.3 - IL_001f: conv.i8 - IL_0020: blt.un.s IL_0007 - - IL_0022: ldloca.s V_0 - IL_0024: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0029: ret + IL_001a: add + IL_001b: stloc.2 + IL_001c: ldloc.1 + IL_001d: ldc.i4.1 + IL_001e: conv.i8 + IL_001f: add + IL_0020: stloc.1 + IL_0021: ldloc.1 + IL_0022: ldc.i4.3 + IL_0023: conv.i8 + IL_0024: blt.un.s IL_0007 + + IL_0026: ldloca.s V_0 + IL_0028: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_002d: ret } } @@ -94,4 +97,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter02.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter02.fs.il.bsl index 863e7b50451..ea4cf922b2a 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter02.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter02.fs.il.bsl @@ -40,43 +40,49 @@ .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, uint64 V_1, int32 V_2, - int32 V_3) + int32 V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5) IL_0000: ldc.i4.0 IL_0001: conv.i8 IL_0002: stloc.1 IL_0003: ldc.i4.0 IL_0004: stloc.2 - IL_0005: br.s IL_002d + IL_0005: br.s IL_0035 IL_0007: ldloca.s V_0 IL_0009: ldloc.2 IL_000a: stloc.3 - IL_000b: ldstr "hello" - IL_0010: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_0015: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_001a: pop - IL_001b: ldloc.3 - IL_001c: ldloc.3 - IL_001d: mul - IL_001e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0023: nop - IL_0024: ldloc.2 - IL_0025: ldc.i4.1 - IL_0026: add - IL_0027: stloc.2 - IL_0028: ldloc.1 - IL_0029: ldc.i4.1 - IL_002a: conv.i8 - IL_002b: add - IL_002c: stloc.1 - IL_002d: ldloc.1 - IL_002e: ldc.i4.3 - IL_002f: conv.i8 - IL_0030: blt.un.s IL_0007 - - IL_0032: ldloca.s V_0 - IL_0034: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0039: ret + IL_000b: stloc.s V_4 + IL_000d: ldloc.s V_4 + IL_000f: ldstr "hello" + IL_0014: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0019: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_001e: pop + IL_001f: stloc.s V_5 + IL_0021: ldloc.s V_5 + IL_0023: ldloc.3 + IL_0024: ldloc.3 + IL_0025: mul + IL_0026: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_002b: nop + IL_002c: ldloc.2 + IL_002d: ldc.i4.1 + IL_002e: add + IL_002f: stloc.2 + IL_0030: ldloc.1 + IL_0031: ldc.i4.1 + IL_0032: conv.i8 + IL_0033: add + IL_0034: stloc.1 + IL_0035: ldloc.1 + IL_0036: ldc.i4.3 + IL_0037: conv.i8 + IL_0038: blt.un.s IL_0007 + + IL_003a: ldloca.s V_0 + IL_003c: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0041: ret } } @@ -98,4 +104,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter03.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter03.fs.il.bsl index 62d8df01d3e..e90b8cc491f 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter03.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter03.fs.il.bsl @@ -40,39 +40,42 @@ .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, uint64 V_1, int32 V_2, - int32 V_3) + int32 V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4) IL_0000: ldc.i4.0 IL_0001: conv.i8 IL_0002: stloc.1 IL_0003: ldc.i4.0 IL_0004: stloc.2 - IL_0005: br.s IL_001d + IL_0005: br.s IL_0021 IL_0007: ldloca.s V_0 IL_0009: ldloc.2 IL_000a: stloc.3 - IL_000b: ldloc.3 - IL_000c: ldloc.3 - IL_000d: mul - IL_000e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0013: nop - IL_0014: ldloc.2 - IL_0015: ldc.i4.1 - IL_0016: add - IL_0017: stloc.2 - IL_0018: ldloc.1 + IL_000b: stloc.s V_4 + IL_000d: ldloc.s V_4 + IL_000f: ldloc.3 + IL_0010: ldloc.3 + IL_0011: mul + IL_0012: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0017: nop + IL_0018: ldloc.2 IL_0019: ldc.i4.1 - IL_001a: conv.i8 - IL_001b: add - IL_001c: stloc.1 - IL_001d: ldloc.1 - IL_001e: ldc.i4.s 11 - IL_0020: conv.i8 - IL_0021: blt.un.s IL_0007 - - IL_0023: ldloca.s V_0 - IL_0025: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_002a: ret + IL_001a: add + IL_001b: stloc.2 + IL_001c: ldloc.1 + IL_001d: ldc.i4.1 + IL_001e: conv.i8 + IL_001f: add + IL_0020: stloc.1 + IL_0021: ldloc.1 + IL_0022: ldc.i4.s 11 + IL_0024: conv.i8 + IL_0025: blt.un.s IL_0007 + + IL_0027: ldloca.s V_0 + IL_0029: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_002e: ret } } @@ -94,4 +97,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter04.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter04.fs.RealInternalSignatureOff.il.bsl index c629077ef01..bd94ed1bd69 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter04.fs.RealInternalSignatureOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter04.fs.RealInternalSignatureOff.il.bsl @@ -67,42 +67,45 @@ valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_1, uint64 V_2, int32 V_3, - int32 V_4) + int32 V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5) IL_0000: ldc.i4.0 IL_0001: conv.i8 IL_0002: stloc.2 IL_0003: ldc.i4.0 IL_0004: stloc.3 - IL_0005: br.s IL_0020 + IL_0005: br.s IL_0024 IL_0007: ldloca.s V_1 IL_0009: ldloc.3 IL_000a: stloc.s V_4 - IL_000c: ldloc.s V_4 - IL_000e: ldloc.s V_4 - IL_0010: mul - IL_0011: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0016: nop - IL_0017: ldloc.3 - IL_0018: ldc.i4.1 - IL_0019: add - IL_001a: stloc.3 - IL_001b: ldloc.2 + IL_000c: stloc.s V_5 + IL_000e: ldloc.s V_5 + IL_0010: ldloc.s V_4 + IL_0012: ldloc.s V_4 + IL_0014: mul + IL_0015: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_001a: nop + IL_001b: ldloc.3 IL_001c: ldc.i4.1 - IL_001d: conv.i8 - IL_001e: add - IL_001f: stloc.2 - IL_0020: ldloc.2 - IL_0021: ldc.i4.s 11 - IL_0023: conv.i8 - IL_0024: blt.un.s IL_0007 - - IL_0026: ldloca.s V_1 - IL_0028: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_002d: dup - IL_002e: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::squaresOfOneToTenD@4 - IL_0033: stloc.0 - IL_0034: ret + IL_001d: add + IL_001e: stloc.3 + IL_001f: ldloc.2 + IL_0020: ldc.i4.1 + IL_0021: conv.i8 + IL_0022: add + IL_0023: stloc.2 + IL_0024: ldloc.2 + IL_0025: ldc.i4.s 11 + IL_0027: conv.i8 + IL_0028: blt.un.s IL_0007 + + IL_002a: ldloca.s V_1 + IL_002c: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0031: dup + IL_0032: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::squaresOfOneToTenD@4 + IL_0037: stloc.0 + IL_0038: ret } } @@ -111,4 +114,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter04.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter04.fs.RealInternalSignatureOn.il.bsl index c9ea26cfff9..572d9c93770 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter04.fs.RealInternalSignatureOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter04.fs.RealInternalSignatureOn.il.bsl @@ -61,40 +61,43 @@ .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, uint64 V_1, int32 V_2, - int32 V_3) + int32 V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4) IL_0000: ldc.i4.0 IL_0001: conv.i8 IL_0002: stloc.1 IL_0003: ldc.i4.0 IL_0004: stloc.2 - IL_0005: br.s IL_001d + IL_0005: br.s IL_0021 IL_0007: ldloca.s V_0 IL_0009: ldloc.2 IL_000a: stloc.3 - IL_000b: ldloc.3 - IL_000c: ldloc.3 - IL_000d: mul - IL_000e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0013: nop - IL_0014: ldloc.2 - IL_0015: ldc.i4.1 - IL_0016: add - IL_0017: stloc.2 - IL_0018: ldloc.1 + IL_000b: stloc.s V_4 + IL_000d: ldloc.s V_4 + IL_000f: ldloc.3 + IL_0010: ldloc.3 + IL_0011: mul + IL_0012: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0017: nop + IL_0018: ldloc.2 IL_0019: ldc.i4.1 - IL_001a: conv.i8 - IL_001b: add - IL_001c: stloc.1 - IL_001d: ldloc.1 - IL_001e: ldc.i4.s 11 - IL_0020: conv.i8 - IL_0021: blt.un.s IL_0007 - - IL_0023: ldloca.s V_0 - IL_0025: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_002a: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::squaresOfOneToTenD@4 - IL_002f: ret + IL_001a: add + IL_001b: stloc.2 + IL_001c: ldloc.1 + IL_001d: ldc.i4.1 + IL_001e: conv.i8 + IL_001f: add + IL_0020: stloc.1 + IL_0021: ldloc.1 + IL_0022: ldc.i4.s 11 + IL_0024: conv.i8 + IL_0025: blt.un.s IL_0007 + + IL_0027: ldloca.s V_0 + IL_0029: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_002e: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::squaresOfOneToTenD@4 + IL_0033: ret } .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -127,4 +130,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/LetIfThenElse01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/LetIfThenElse01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl index 411c8ad8f79..83be9e49788 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/LetIfThenElse01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/LetIfThenElse01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl @@ -38,9 +38,27 @@ .maxstack 7 .locals init (valuetype [runtime]System.DateTime V_0, - valuetype [runtime]System.DateTime V_1, + int32 V_1, valuetype [runtime]System.DateTime V_2, - valuetype [runtime]System.DateTime V_3) + int32 V_3, + int32 V_4, + int32 V_5, + int32 V_6, + valuetype [runtime]System.DateTime V_7, + int32 V_8, + int32 V_9, + int32 V_10, + int32 V_11, + int32 V_12, + int32 V_13, + int32 V_14, + valuetype [runtime]System.DateTime V_15, + int32 V_16, + int32 V_17, + int32 V_18, + int32 V_19, + int32 V_20, + int32 V_21) IL_0000: nop IL_0001: nop IL_0002: call valuetype [runtime]System.DateTime [runtime]System.DateTime::get_Now() @@ -56,53 +74,86 @@ IL_001a: ldc.i4.2 IL_001b: nop - IL_001c: nop - IL_001d: call valuetype [runtime]System.DateTime [runtime]System.DateTime::get_Now() - IL_0022: stloc.1 - IL_0023: ldloca.s V_1 - IL_0025: call instance int32 [runtime]System.DateTime::get_Year() - IL_002a: ldc.i4 0x7d0 - IL_002f: ble.s IL_0035 - - IL_0031: ldc.i4.1 - IL_0032: nop - IL_0033: br.s IL_0037 - - IL_0035: ldc.i4.2 - IL_0036: nop - IL_0037: nop - IL_0038: call valuetype [runtime]System.DateTime [runtime]System.DateTime::get_Now() - IL_003d: stloc.2 - IL_003e: ldloca.s V_2 - IL_0040: call instance int32 [runtime]System.DateTime::get_Year() - IL_0045: ldc.i4 0x7d0 - IL_004a: bge.s IL_0050 - - IL_004c: ldc.i4.1 - IL_004d: nop - IL_004e: br.s IL_0052 - - IL_0050: ldc.i4.2 - IL_0051: nop - IL_0052: nop - IL_0053: call valuetype [runtime]System.DateTime [runtime]System.DateTime::get_Now() - IL_0058: stloc.3 - IL_0059: ldloca.s V_3 - IL_005b: call instance int32 [runtime]System.DateTime::get_Year() - IL_0060: ldc.i4 0x7d0 - IL_0065: bge.s IL_006b - - IL_0067: ldc.i4.1 - IL_0068: nop - IL_0069: br.s IL_006d - - IL_006b: ldc.i4.2 - IL_006c: nop - IL_006d: newobj instance void class [runtime]System.Tuple`4::.ctor(!0, + IL_001c: stloc.1 + IL_001d: ldloc.1 + IL_001e: call valuetype [runtime]System.DateTime [runtime]System.DateTime::get_Now() + IL_0023: stloc.2 + IL_0024: ldloca.s V_2 + IL_0026: call instance int32 [runtime]System.DateTime::get_Year() + IL_002b: ldc.i4 0x7d0 + IL_0030: ble.s IL_0038 + + IL_0032: stloc.3 + IL_0033: ldloc.3 + IL_0034: ldc.i4.1 + IL_0035: nop + IL_0036: br.s IL_003e + + IL_0038: stloc.s V_4 + IL_003a: ldloc.s V_4 + IL_003c: ldc.i4.2 + IL_003d: nop + IL_003e: stloc.s V_5 + IL_0040: stloc.s V_6 + IL_0042: ldloc.s V_6 + IL_0044: ldloc.s V_5 + IL_0046: call valuetype [runtime]System.DateTime [runtime]System.DateTime::get_Now() + IL_004b: stloc.s V_7 + IL_004d: ldloca.s V_7 + IL_004f: call instance int32 [runtime]System.DateTime::get_Year() + IL_0054: ldc.i4 0x7d0 + IL_0059: bge.s IL_0067 + + IL_005b: stloc.s V_8 + IL_005d: stloc.s V_9 + IL_005f: ldloc.s V_9 + IL_0061: ldloc.s V_8 + IL_0063: ldc.i4.1 + IL_0064: nop + IL_0065: br.s IL_0071 + + IL_0067: stloc.s V_10 + IL_0069: stloc.s V_11 + IL_006b: ldloc.s V_11 + IL_006d: ldloc.s V_10 + IL_006f: ldc.i4.2 + IL_0070: nop + IL_0071: stloc.s V_12 + IL_0073: stloc.s V_13 + IL_0075: stloc.s V_14 + IL_0077: ldloc.s V_14 + IL_0079: ldloc.s V_13 + IL_007b: ldloc.s V_12 + IL_007d: call valuetype [runtime]System.DateTime [runtime]System.DateTime::get_Now() + IL_0082: stloc.s V_15 + IL_0084: ldloca.s V_15 + IL_0086: call instance int32 [runtime]System.DateTime::get_Year() + IL_008b: ldc.i4 0x7d0 + IL_0090: bge.s IL_00a2 + + IL_0092: stloc.s V_16 + IL_0094: stloc.s V_17 + IL_0096: stloc.s V_18 + IL_0098: ldloc.s V_18 + IL_009a: ldloc.s V_17 + IL_009c: ldloc.s V_16 + IL_009e: ldc.i4.1 + IL_009f: nop + IL_00a0: br.s IL_00b0 + + IL_00a2: stloc.s V_19 + IL_00a4: stloc.s V_20 + IL_00a6: stloc.s V_21 + IL_00a8: ldloc.s V_21 + IL_00aa: ldloc.s V_20 + IL_00ac: ldloc.s V_19 + IL_00ae: ldc.i4.2 + IL_00af: nop + IL_00b0: newobj instance void class [runtime]System.Tuple`4::.ctor(!0, !1, !2, !3) - IL_0072: ret + IL_00b5: ret } .method assembly specialname static class [runtime]System.Tuple`4 get_arg@1() cil managed diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/LetIfThenElse01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/LetIfThenElse01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl index db7fe273e88..5139e7470eb 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/LetIfThenElse01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/LetIfThenElse01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl @@ -40,9 +40,27 @@ .maxstack 7 .locals init (valuetype [runtime]System.DateTime V_0, - valuetype [runtime]System.DateTime V_1, + int32 V_1, valuetype [runtime]System.DateTime V_2, - valuetype [runtime]System.DateTime V_3) + int32 V_3, + int32 V_4, + int32 V_5, + int32 V_6, + valuetype [runtime]System.DateTime V_7, + int32 V_8, + int32 V_9, + int32 V_10, + int32 V_11, + int32 V_12, + int32 V_13, + int32 V_14, + valuetype [runtime]System.DateTime V_15, + int32 V_16, + int32 V_17, + int32 V_18, + int32 V_19, + int32 V_20, + int32 V_21) IL_0000: nop IL_0001: nop IL_0002: call valuetype [runtime]System.DateTime [runtime]System.DateTime::get_Now() @@ -58,53 +76,86 @@ IL_001a: ldc.i4.2 IL_001b: nop - IL_001c: nop - IL_001d: call valuetype [runtime]System.DateTime [runtime]System.DateTime::get_Now() - IL_0022: stloc.1 - IL_0023: ldloca.s V_1 - IL_0025: call instance int32 [runtime]System.DateTime::get_Year() - IL_002a: ldc.i4 0x7d0 - IL_002f: ble.s IL_0035 - - IL_0031: ldc.i4.1 - IL_0032: nop - IL_0033: br.s IL_0037 - - IL_0035: ldc.i4.2 - IL_0036: nop - IL_0037: nop - IL_0038: call valuetype [runtime]System.DateTime [runtime]System.DateTime::get_Now() - IL_003d: stloc.2 - IL_003e: ldloca.s V_2 - IL_0040: call instance int32 [runtime]System.DateTime::get_Year() - IL_0045: ldc.i4 0x7d0 - IL_004a: bge.s IL_0050 - - IL_004c: ldc.i4.1 - IL_004d: nop - IL_004e: br.s IL_0052 - - IL_0050: ldc.i4.2 - IL_0051: nop - IL_0052: nop - IL_0053: call valuetype [runtime]System.DateTime [runtime]System.DateTime::get_Now() - IL_0058: stloc.3 - IL_0059: ldloca.s V_3 - IL_005b: call instance int32 [runtime]System.DateTime::get_Year() - IL_0060: ldc.i4 0x7d0 - IL_0065: bge.s IL_006b - - IL_0067: ldc.i4.1 - IL_0068: nop - IL_0069: br.s IL_006d - - IL_006b: ldc.i4.2 - IL_006c: nop - IL_006d: newobj instance void class [runtime]System.Tuple`4::.ctor(!0, + IL_001c: stloc.1 + IL_001d: ldloc.1 + IL_001e: call valuetype [runtime]System.DateTime [runtime]System.DateTime::get_Now() + IL_0023: stloc.2 + IL_0024: ldloca.s V_2 + IL_0026: call instance int32 [runtime]System.DateTime::get_Year() + IL_002b: ldc.i4 0x7d0 + IL_0030: ble.s IL_0038 + + IL_0032: stloc.3 + IL_0033: ldloc.3 + IL_0034: ldc.i4.1 + IL_0035: nop + IL_0036: br.s IL_003e + + IL_0038: stloc.s V_4 + IL_003a: ldloc.s V_4 + IL_003c: ldc.i4.2 + IL_003d: nop + IL_003e: stloc.s V_5 + IL_0040: stloc.s V_6 + IL_0042: ldloc.s V_6 + IL_0044: ldloc.s V_5 + IL_0046: call valuetype [runtime]System.DateTime [runtime]System.DateTime::get_Now() + IL_004b: stloc.s V_7 + IL_004d: ldloca.s V_7 + IL_004f: call instance int32 [runtime]System.DateTime::get_Year() + IL_0054: ldc.i4 0x7d0 + IL_0059: bge.s IL_0067 + + IL_005b: stloc.s V_8 + IL_005d: stloc.s V_9 + IL_005f: ldloc.s V_9 + IL_0061: ldloc.s V_8 + IL_0063: ldc.i4.1 + IL_0064: nop + IL_0065: br.s IL_0071 + + IL_0067: stloc.s V_10 + IL_0069: stloc.s V_11 + IL_006b: ldloc.s V_11 + IL_006d: ldloc.s V_10 + IL_006f: ldc.i4.2 + IL_0070: nop + IL_0071: stloc.s V_12 + IL_0073: stloc.s V_13 + IL_0075: stloc.s V_14 + IL_0077: ldloc.s V_14 + IL_0079: ldloc.s V_13 + IL_007b: ldloc.s V_12 + IL_007d: call valuetype [runtime]System.DateTime [runtime]System.DateTime::get_Now() + IL_0082: stloc.s V_15 + IL_0084: ldloca.s V_15 + IL_0086: call instance int32 [runtime]System.DateTime::get_Year() + IL_008b: ldc.i4 0x7d0 + IL_0090: bge.s IL_00a2 + + IL_0092: stloc.s V_16 + IL_0094: stloc.s V_17 + IL_0096: stloc.s V_18 + IL_0098: ldloc.s V_18 + IL_009a: ldloc.s V_17 + IL_009c: ldloc.s V_16 + IL_009e: ldc.i4.1 + IL_009f: nop + IL_00a0: br.s IL_00b0 + + IL_00a2: stloc.s V_19 + IL_00a4: stloc.s V_20 + IL_00a6: stloc.s V_21 + IL_00a8: ldloc.s V_21 + IL_00aa: ldloc.s V_20 + IL_00ac: ldloc.s V_19 + IL_00ae: ldc.i4.2 + IL_00af: nop + IL_00b0: newobj instance void class [runtime]System.Tuple`4::.ctor(!0, !1, !2, !3) - IL_0072: ret + IL_00b5: ret } .method assembly specialname static class [runtime]System.Tuple`4 get_arg@1() cil managed diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Misc.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Misc.fs index 91bf1fca820..6e0cdd780d6 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Misc.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Misc.fs @@ -177,6 +177,15 @@ module Misc = |>asNetStandard20 |>verifyCompilation + // Regression test: a debug point landing while a value-type constructor's 'this' pointer + // is on the stack must spill it as a managed pointer (byref), not as the value type. + [] + let ``StructCtorDebugPoints_fs`` compilation = + compilation + |> getCompilation + |> asLibrary + |> verifyCompilation + // SOURCE=Marshal.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Marshal.exe" # Marshal.fs [] let ``Marshal_fs`` compilation = diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/StructCtorDebugPoints.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/StructCtorDebugPoints.fs new file mode 100644 index 00000000000..c4a6262306f --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/StructCtorDebugPoints.fs @@ -0,0 +1,15 @@ +module StructCtorDebugPoints + +// Regression test: a debug point that lands while the 'this' pointer of a value-type +// (struct) constructor is on the IL stack must spill it as a managed pointer (byref), +// not as the value type. Otherwise EmitDebugPoint emits a 'stloc' of an address into a +// value-typed local, producing invalid IL (ILVerify: "found address ... expected value"). +[] +type Flags = + val bits: int64 + new (bits: int64) = { bits = bits } + new (a: bool, b: bool, c: bool) = + Flags((if a then 1L else 0L) ||| + (if b then 2L else 0L) ||| + (if c then 4L else 0L)) + member x.Bits = x.bits diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/StructCtorDebugPoints.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/StructCtorDebugPoints.fs.il.bsl new file mode 100644 index 00000000000..38da1c0bb74 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/StructCtorDebugPoints.fs.il.bsl @@ -0,0 +1,379 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly assembly +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + + + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module assembly.dll + +.imagebase {value} +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 +.corflags 0x00000001 + + + + + +.class public abstract auto ansi sealed assembly + extends [runtime]System.Object +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .class sequential ansi serializable sealed nested public Flags + extends [runtime]System.ValueType + implements class [runtime]System.IEquatable`1, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IComparable`1, + [runtime]System.IComparable, + [runtime]System.Collections.IStructuralComparable + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.StructAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) + .field assembly int64 bits@ + .method public hidebysig specialname instance int64 get_bits() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.IsReadOnlyAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int64 assembly/Flags::bits@ + IL_0006: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(valuetype assembly/Flags obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class [runtime]System.Collections.IComparer V_0, + int64 V_1, + int64 V_2) + IL_0000: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0005: stloc.0 + IL_0006: ldarg.0 + IL_0007: ldfld int64 assembly/Flags::bits@ + IL_000c: stloc.1 + IL_000d: ldarga.s obj + IL_000f: ldfld int64 assembly/Flags::bits@ + IL_0014: stloc.2 + IL_0015: ldloc.1 + IL_0016: ldloc.2 + IL_0017: cgt + IL_0019: ldloc.1 + IL_001a: ldloc.2 + IL_001b: clt + IL_001d: sub + IL_001e: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any assembly/Flags + IL_0007: call instance int32 assembly/Flags::CompareTo(valuetype assembly/Flags) + IL_000c: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (valuetype assembly/Flags V_0, + int64 V_1, + int64 V_2) + IL_0000: ldarg.1 + IL_0001: unbox.any assembly/Flags + IL_0006: stloc.0 + IL_0007: ldarg.0 + IL_0008: ldfld int64 assembly/Flags::bits@ + IL_000d: stloc.1 + IL_000e: ldloca.s V_0 + IL_0010: ldfld int64 assembly/Flags::bits@ + IL_0015: stloc.2 + IL_0016: ldloc.1 + IL_0017: ldloc.2 + IL_0018: cgt + IL_001a: ldloc.1 + IL_001b: ldloc.2 + IL_001c: clt + IL_001e: sub + IL_001f: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 7 + .locals init (int32 V_0, + int64 V_1) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: ldc.i4 0x9e3779b9 + IL_0007: ldarg.0 + IL_0008: ldfld int64 assembly/Flags::bits@ + IL_000d: stloc.1 + IL_000e: ldloc.1 + IL_000f: conv.i4 + IL_0010: ldloc.1 + IL_0011: ldc.i4.s 32 + IL_0013: shr + IL_0014: conv.i4 + IL_0015: xor + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldloc.0 + IL_0021: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: call instance int32 assembly/Flags::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000b: ret + } + + .method public hidebysig instance bool Equals(valuetype assembly/Flags obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int64 assembly/Flags::bits@ + IL_0006: ldarga.s obj + IL_0008: ldfld int64 assembly/Flags::bits@ + IL_000d: ceq + IL_000f: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (valuetype assembly/Flags V_0) + IL_0000: ldarg.1 + IL_0001: isinst assembly/Flags + IL_0006: brfalse.s IL_001f + + IL_0008: ldarg.1 + IL_0009: unbox.any assembly/Flags + IL_000e: stloc.0 + IL_000f: ldarg.0 + IL_0010: ldfld int64 assembly/Flags::bits@ + IL_0015: ldloca.s V_0 + IL_0017: ldfld int64 assembly/Flags::bits@ + IL_001c: ceq + IL_001e: ret + + IL_001f: ldc.i4.0 + IL_0020: ret + } + + .method public specialname rtspecialname instance void .ctor(int64 bits) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld int64 assembly/Flags::bits@ + IL_0007: ret + } + + .method public specialname rtspecialname + instance void .ctor(bool a, + bool b, + bool c) cil managed + { + + .maxstack 5 + .locals init (valuetype assembly/Flags& V_0, + valuetype assembly/Flags& V_1, + valuetype assembly/Flags& V_2, + int64 V_3, + valuetype assembly/Flags& V_4, + int64 V_5, + valuetype assembly/Flags& V_6, + int64 V_7, + valuetype assembly/Flags& V_8, + int64 V_9, + valuetype assembly/Flags& V_10, + int64 V_11, + valuetype assembly/Flags& V_12, + int64 V_13, + valuetype assembly/Flags& V_14) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_000d + + IL_0006: stloc.1 + IL_0007: ldloc.1 + IL_0008: ldc.i4.1 + IL_0009: conv.i8 + IL_000a: nop + IL_000b: br.s IL_0012 + + IL_000d: stloc.2 + IL_000e: ldloc.2 + IL_000f: ldc.i4.0 + IL_0010: conv.i8 + IL_0011: nop + IL_0012: stloc.3 + IL_0013: stloc.s V_4 + IL_0015: ldloc.s V_4 + IL_0017: ldloc.3 + IL_0018: ldarg.2 + IL_0019: brfalse.s IL_0028 + + IL_001b: stloc.s V_5 + IL_001d: stloc.s V_6 + IL_001f: ldloc.s V_6 + IL_0021: ldloc.s V_5 + IL_0023: ldc.i4.2 + IL_0024: conv.i8 + IL_0025: nop + IL_0026: br.s IL_0033 + + IL_0028: stloc.s V_7 + IL_002a: stloc.s V_8 + IL_002c: ldloc.s V_8 + IL_002e: ldloc.s V_7 + IL_0030: ldc.i4.0 + IL_0031: conv.i8 + IL_0032: nop + IL_0033: or + IL_0034: stloc.s V_9 + IL_0036: stloc.s V_10 + IL_0038: ldloc.s V_10 + IL_003a: ldloc.s V_9 + IL_003c: ldarg.3 + IL_003d: brfalse.s IL_004c + + IL_003f: stloc.s V_11 + IL_0041: stloc.s V_12 + IL_0043: ldloc.s V_12 + IL_0045: ldloc.s V_11 + IL_0047: ldc.i4.4 + IL_0048: conv.i8 + IL_0049: nop + IL_004a: br.s IL_0057 + + IL_004c: stloc.s V_13 + IL_004e: stloc.s V_14 + IL_0050: ldloc.s V_14 + IL_0052: ldloc.s V_13 + IL_0054: ldc.i4.0 + IL_0055: conv.i8 + IL_0056: nop + IL_0057: or + IL_0058: call instance void assembly/Flags::.ctor(int64) + IL_005d: ret + } + + .method public hidebysig specialname instance int64 get_Bits() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int64 assembly/Flags::bits@ + IL_0006: ret + } + + .method public hidebysig virtual final instance bool Equals(valuetype assembly/Flags obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int64 assembly/Flags::bits@ + IL_0006: ldarga.s obj + IL_0008: ldfld int64 assembly/Flags::bits@ + IL_000d: ceq + IL_000f: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (valuetype assembly/Flags V_0, + valuetype assembly/Flags V_1) + IL_0000: ldarg.1 + IL_0001: isinst assembly/Flags + IL_0006: brfalse.s IL_0021 + + IL_0008: ldarg.1 + IL_0009: unbox.any assembly/Flags + IL_000e: stloc.0 + IL_000f: ldloc.0 + IL_0010: stloc.1 + IL_0011: ldarg.0 + IL_0012: ldfld int64 assembly/Flags::bits@ + IL_0017: ldloca.s V_1 + IL_0019: ldfld int64 assembly/Flags::bits@ + IL_001e: ceq + IL_0020: ret + + IL_0021: ldc.i4.0 + IL_0022: ret + } + + .property instance int64 bits() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance int64 assembly/Flags::get_bits() + } + .property instance int64 Bits() + { + .get instance int64 assembly/Flags::get_Bits() + } + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ +} + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Structs02.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Structs02.fs.il.bsl index 305038e7bdc..5b45827f8a3 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Structs02.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Structs02.fs.il.bsl @@ -201,39 +201,44 @@ .locals init (int32 V_0, valuetype Experiment.Test/Repro& V_1, int32 V_2, - int32 V_3) + int32 V_3, + valuetype Experiment.Test/Repro& V_4) IL_0000: ldarg.0 - IL_0001: ldc.i4.0 - IL_0002: stloc.0 - IL_0003: stloc.1 - IL_0004: ldc.i4.0 - IL_0005: stloc.3 - IL_0006: ldarg.1 - IL_0007: ldc.i4.1 - IL_0008: sub - IL_0009: stloc.2 - IL_000a: ldloc.2 - IL_000b: ldloc.3 - IL_000c: blt.s IL_001d - - IL_000e: ldc.i4.s 26 - IL_0010: ldloc.0 - IL_0011: mul - IL_0012: stloc.0 - IL_0013: ldloc.3 - IL_0014: ldc.i4.1 - IL_0015: add - IL_0016: stloc.3 - IL_0017: ldloc.3 - IL_0018: ldloc.2 - IL_0019: ldc.i4.1 - IL_001a: add - IL_001b: bne.un.s IL_000e - - IL_001d: ldloc.1 - IL_001e: ldloc.0 - IL_001f: stfld int32 Experiment.Test/Repro::hash@ - IL_0024: ret + IL_0001: stloc.1 + IL_0002: ldloc.1 + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: stloc.1 + IL_0006: ldc.i4.0 + IL_0007: stloc.3 + IL_0008: ldarg.1 + IL_0009: ldc.i4.1 + IL_000a: sub + IL_000b: stloc.2 + IL_000c: ldloc.2 + IL_000d: ldloc.3 + IL_000e: blt.s IL_001f + + IL_0010: ldc.i4.s 26 + IL_0012: ldloc.0 + IL_0013: mul + IL_0014: stloc.0 + IL_0015: ldloc.3 + IL_0016: ldc.i4.1 + IL_0017: add + IL_0018: stloc.3 + IL_0019: ldloc.3 + IL_001a: ldloc.2 + IL_001b: ldc.i4.1 + IL_001c: add + IL_001d: bne.un.s IL_0010 + + IL_001f: ldloc.1 + IL_0020: stloc.s V_4 + IL_0022: ldloc.s V_4 + IL_0024: ldloc.0 + IL_0025: stfld int32 Experiment.Test/Repro::hash@ + IL_002a: ret } .method public hidebysig virtual final instance bool Equals(valuetype Experiment.Test/Repro obj) cil managed diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Structs02_asNetStandard20.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Structs02_asNetStandard20.fs.il.bsl index 21883f425e4..cff67da6c44 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Structs02_asNetStandard20.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Structs02_asNetStandard20.fs.il.bsl @@ -206,39 +206,44 @@ .locals init (int32 V_0, valuetype Experiment.Test/Repro& V_1, int32 V_2, - int32 V_3) + int32 V_3, + valuetype Experiment.Test/Repro& V_4) IL_0000: ldarg.0 - IL_0001: ldc.i4.0 - IL_0002: stloc.0 - IL_0003: stloc.1 - IL_0004: ldc.i4.0 - IL_0005: stloc.3 - IL_0006: ldarg.1 - IL_0007: ldc.i4.1 - IL_0008: sub - IL_0009: stloc.2 - IL_000a: ldloc.2 - IL_000b: ldloc.3 - IL_000c: blt.s IL_001d - - IL_000e: ldc.i4.s 26 - IL_0010: ldloc.0 - IL_0011: mul - IL_0012: stloc.0 - IL_0013: ldloc.3 - IL_0014: ldc.i4.1 - IL_0015: add - IL_0016: stloc.3 - IL_0017: ldloc.3 - IL_0018: ldloc.2 - IL_0019: ldc.i4.1 - IL_001a: add - IL_001b: bne.un.s IL_000e - - IL_001d: ldloc.1 - IL_001e: ldloc.0 - IL_001f: stfld int32 Experiment.Test/Repro::hash@ - IL_0024: ret + IL_0001: stloc.1 + IL_0002: ldloc.1 + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: stloc.1 + IL_0006: ldc.i4.0 + IL_0007: stloc.3 + IL_0008: ldarg.1 + IL_0009: ldc.i4.1 + IL_000a: sub + IL_000b: stloc.2 + IL_000c: ldloc.2 + IL_000d: ldloc.3 + IL_000e: blt.s IL_001f + + IL_0010: ldc.i4.s 26 + IL_0012: ldloc.0 + IL_0013: mul + IL_0014: stloc.0 + IL_0015: ldloc.3 + IL_0016: ldc.i4.1 + IL_0017: add + IL_0018: stloc.3 + IL_0019: ldloc.3 + IL_001a: ldloc.2 + IL_001b: ldc.i4.1 + IL_001c: add + IL_001d: bne.un.s IL_0010 + + IL_001f: ldloc.1 + IL_0020: stloc.s V_4 + IL_0022: ldloc.s V_4 + IL_0024: ldloc.0 + IL_0025: stfld int32 Experiment.Test/Repro::hash@ + IL_002a: ret } .method public hidebysig virtual final instance bool Equals(valuetype Experiment.Test/Repro obj) cil managed diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest06.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest06.fs.RealInternalSignatureOff.il.bsl index d06351206d3..0af1fadae60 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest06.fs.RealInternalSignatureOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest06.fs.RealInternalSignatureOff.il.bsl @@ -86,8 +86,10 @@ { .maxstack 6 - .locals init (int32 V_0, - int32 V_1) + .locals init (class SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6 V_0, + int32 V_1, + class SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6 V_2, + int32 V_3) IL_0000: ldarg.0 IL_0001: ldfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc IL_0006: ldc.i4.1 @@ -101,113 +103,117 @@ IL_0021: br.s IL_003b IL_0023: nop - IL_0024: br.s IL_0090 + IL_0024: br.s IL_0092 IL_0026: nop - IL_0027: br.s IL_0083 + IL_0027: br.s IL_0085 IL_0029: nop - IL_002a: br IL_00fc + IL_002a: br IL_0100 IL_002f: nop - IL_0030: br IL_00ef + IL_0030: br IL_00f3 IL_0035: nop - IL_0036: br IL_011d + IL_0036: br IL_0121 IL_003b: nop IL_003c: br.s IL_003e IL_003e: ldarg.0 - IL_003f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6::get_es() - IL_0044: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0049: stfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' - IL_004e: ldarg.0 - IL_004f: ldc.i4.1 - IL_0050: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc - IL_0055: br.s IL_0083 - - IL_0057: ldarg.0 - IL_0058: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' - IL_005d: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0062: stloc.0 - IL_0063: ldstr "hello" - IL_0068: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_006d: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0072: pop - IL_0073: ldarg.0 - IL_0074: ldc.i4.2 - IL_0075: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc - IL_007a: ldarg.0 - IL_007b: ldloc.0 - IL_007c: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::current - IL_0081: ldc.i4.1 - IL_0082: ret - - IL_0083: ldarg.0 - IL_0084: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' - IL_0089: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_008e: brtrue.s IL_0057 - - IL_0090: ldarg.0 - IL_0091: ldc.i4.5 - IL_0092: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc - IL_0097: ldarg.0 - IL_0098: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' - IL_009d: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_00a2: nop - IL_00a3: ldarg.0 - IL_00a4: ldnull - IL_00a5: stfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' - IL_00aa: ldarg.0 - IL_00ab: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6::get_es() - IL_00b0: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_00b5: stfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 - IL_00ba: ldarg.0 - IL_00bb: ldc.i4.3 - IL_00bc: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc - IL_00c1: br.s IL_00ef - - IL_00c3: ldarg.0 - IL_00c4: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 - IL_00c9: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_00ce: stloc.1 - IL_00cf: ldstr "goodbye" - IL_00d4: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_00d9: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_00de: pop - IL_00df: ldarg.0 - IL_00e0: ldc.i4.4 - IL_00e1: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc - IL_00e6: ldarg.0 - IL_00e7: ldloc.1 - IL_00e8: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::current - IL_00ed: ldc.i4.1 - IL_00ee: ret - - IL_00ef: ldarg.0 - IL_00f0: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 - IL_00f5: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_00fa: brtrue.s IL_00c3 - - IL_00fc: ldarg.0 - IL_00fd: ldc.i4.5 - IL_00fe: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc - IL_0103: ldarg.0 - IL_0104: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 - IL_0109: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_010e: nop - IL_010f: ldarg.0 - IL_0110: ldnull - IL_0111: stfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 - IL_0116: ldarg.0 - IL_0117: ldc.i4.5 - IL_0118: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc - IL_011d: ldarg.0 - IL_011e: ldc.i4.0 - IL_011f: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::current - IL_0124: ldc.i4.0 - IL_0125: ret + IL_003f: stloc.0 + IL_0040: ldloc.0 + IL_0041: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6::get_es() + IL_0046: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_004b: stfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' + IL_0050: ldarg.0 + IL_0051: ldc.i4.1 + IL_0052: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_0057: br.s IL_0085 + + IL_0059: ldarg.0 + IL_005a: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' + IL_005f: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0064: stloc.1 + IL_0065: ldstr "hello" + IL_006a: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_006f: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0074: pop + IL_0075: ldarg.0 + IL_0076: ldc.i4.2 + IL_0077: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_007c: ldarg.0 + IL_007d: ldloc.1 + IL_007e: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::current + IL_0083: ldc.i4.1 + IL_0084: ret + + IL_0085: ldarg.0 + IL_0086: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' + IL_008b: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0090: brtrue.s IL_0059 + + IL_0092: ldarg.0 + IL_0093: ldc.i4.5 + IL_0094: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_0099: ldarg.0 + IL_009a: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' + IL_009f: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_00a4: nop + IL_00a5: ldarg.0 + IL_00a6: ldnull + IL_00a7: stfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' + IL_00ac: ldarg.0 + IL_00ad: stloc.2 + IL_00ae: ldloc.2 + IL_00af: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6::get_es() + IL_00b4: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_00b9: stfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 + IL_00be: ldarg.0 + IL_00bf: ldc.i4.3 + IL_00c0: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_00c5: br.s IL_00f3 + + IL_00c7: ldarg.0 + IL_00c8: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 + IL_00cd: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() + IL_00d2: stloc.3 + IL_00d3: ldstr "goodbye" + IL_00d8: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_00dd: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_00e2: pop + IL_00e3: ldarg.0 + IL_00e4: ldc.i4.4 + IL_00e5: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_00ea: ldarg.0 + IL_00eb: ldloc.3 + IL_00ec: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::current + IL_00f1: ldc.i4.1 + IL_00f2: ret + + IL_00f3: ldarg.0 + IL_00f4: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 + IL_00f9: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_00fe: brtrue.s IL_00c7 + + IL_0100: ldarg.0 + IL_0101: ldc.i4.5 + IL_0102: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_0107: ldarg.0 + IL_0108: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 + IL_010d: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0112: nop + IL_0113: ldarg.0 + IL_0114: ldnull + IL_0115: stfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 + IL_011a: ldarg.0 + IL_011b: ldc.i4.5 + IL_011c: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_0121: ldarg.0 + IL_0122: ldc.i4.0 + IL_0123: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::current + IL_0128: ldc.i4.0 + IL_0129: ret } .method public strict virtual instance void Close() cil managed @@ -470,4 +476,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest06.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest06.fs.RealInternalSignatureOn.il.bsl index c712f97e6d9..b1eb89b93cc 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest06.fs.RealInternalSignatureOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest06.fs.RealInternalSignatureOn.il.bsl @@ -86,8 +86,10 @@ { .maxstack 6 - .locals init (int32 V_0, - int32 V_1) + .locals init (class SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6 V_0, + int32 V_1, + class SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6 V_2, + int32 V_3) IL_0000: ldarg.0 IL_0001: ldfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc IL_0006: ldc.i4.1 @@ -101,113 +103,117 @@ IL_0021: br.s IL_003b IL_0023: nop - IL_0024: br.s IL_0090 + IL_0024: br.s IL_0092 IL_0026: nop - IL_0027: br.s IL_0083 + IL_0027: br.s IL_0085 IL_0029: nop - IL_002a: br IL_00fc + IL_002a: br IL_0100 IL_002f: nop - IL_0030: br IL_00ef + IL_0030: br IL_00f3 IL_0035: nop - IL_0036: br IL_011d + IL_0036: br IL_0121 IL_003b: nop IL_003c: br.s IL_003e IL_003e: ldarg.0 - IL_003f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6::get_es() - IL_0044: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0049: stfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' - IL_004e: ldarg.0 - IL_004f: ldc.i4.1 - IL_0050: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc - IL_0055: br.s IL_0083 - - IL_0057: ldarg.0 - IL_0058: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' - IL_005d: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0062: stloc.0 - IL_0063: ldstr "hello" - IL_0068: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_006d: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0072: pop - IL_0073: ldarg.0 - IL_0074: ldc.i4.2 - IL_0075: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc - IL_007a: ldarg.0 - IL_007b: ldloc.0 - IL_007c: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::current - IL_0081: ldc.i4.1 - IL_0082: ret - - IL_0083: ldarg.0 - IL_0084: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' - IL_0089: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_008e: brtrue.s IL_0057 - - IL_0090: ldarg.0 - IL_0091: ldc.i4.5 - IL_0092: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc - IL_0097: ldarg.0 - IL_0098: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' - IL_009d: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_00a2: nop - IL_00a3: ldarg.0 - IL_00a4: ldnull - IL_00a5: stfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' - IL_00aa: ldarg.0 - IL_00ab: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6::get_es() - IL_00b0: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_00b5: stfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 - IL_00ba: ldarg.0 - IL_00bb: ldc.i4.3 - IL_00bc: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc - IL_00c1: br.s IL_00ef - - IL_00c3: ldarg.0 - IL_00c4: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 - IL_00c9: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_00ce: stloc.1 - IL_00cf: ldstr "goodbye" - IL_00d4: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_00d9: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_00de: pop - IL_00df: ldarg.0 - IL_00e0: ldc.i4.4 - IL_00e1: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc - IL_00e6: ldarg.0 - IL_00e7: ldloc.1 - IL_00e8: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::current - IL_00ed: ldc.i4.1 - IL_00ee: ret - - IL_00ef: ldarg.0 - IL_00f0: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 - IL_00f5: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_00fa: brtrue.s IL_00c3 - - IL_00fc: ldarg.0 - IL_00fd: ldc.i4.5 - IL_00fe: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc - IL_0103: ldarg.0 - IL_0104: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 - IL_0109: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_010e: nop - IL_010f: ldarg.0 - IL_0110: ldnull - IL_0111: stfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 - IL_0116: ldarg.0 - IL_0117: ldc.i4.5 - IL_0118: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc - IL_011d: ldarg.0 - IL_011e: ldc.i4.0 - IL_011f: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::current - IL_0124: ldc.i4.0 - IL_0125: ret + IL_003f: stloc.0 + IL_0040: ldloc.0 + IL_0041: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6::get_es() + IL_0046: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_004b: stfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' + IL_0050: ldarg.0 + IL_0051: ldc.i4.1 + IL_0052: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_0057: br.s IL_0085 + + IL_0059: ldarg.0 + IL_005a: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' + IL_005f: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0064: stloc.1 + IL_0065: ldstr "hello" + IL_006a: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_006f: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0074: pop + IL_0075: ldarg.0 + IL_0076: ldc.i4.2 + IL_0077: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_007c: ldarg.0 + IL_007d: ldloc.1 + IL_007e: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::current + IL_0083: ldc.i4.1 + IL_0084: ret + + IL_0085: ldarg.0 + IL_0086: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' + IL_008b: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0090: brtrue.s IL_0059 + + IL_0092: ldarg.0 + IL_0093: ldc.i4.5 + IL_0094: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_0099: ldarg.0 + IL_009a: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' + IL_009f: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_00a4: nop + IL_00a5: ldarg.0 + IL_00a6: ldnull + IL_00a7: stfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' + IL_00ac: ldarg.0 + IL_00ad: stloc.2 + IL_00ae: ldloc.2 + IL_00af: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6::get_es() + IL_00b4: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_00b9: stfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 + IL_00be: ldarg.0 + IL_00bf: ldc.i4.3 + IL_00c0: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_00c5: br.s IL_00f3 + + IL_00c7: ldarg.0 + IL_00c8: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 + IL_00cd: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() + IL_00d2: stloc.3 + IL_00d3: ldstr "goodbye" + IL_00d8: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_00dd: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_00e2: pop + IL_00e3: ldarg.0 + IL_00e4: ldc.i4.4 + IL_00e5: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_00ea: ldarg.0 + IL_00eb: ldloc.3 + IL_00ec: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::current + IL_00f1: ldc.i4.1 + IL_00f2: ret + + IL_00f3: ldarg.0 + IL_00f4: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 + IL_00f9: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_00fe: brtrue.s IL_00c7 + + IL_0100: ldarg.0 + IL_0101: ldc.i4.5 + IL_0102: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_0107: ldarg.0 + IL_0108: ldfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 + IL_010d: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0112: nop + IL_0113: ldarg.0 + IL_0114: ldnull + IL_0115: stfld class [runtime]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 + IL_011a: ldarg.0 + IL_011b: ldc.i4.5 + IL_011c: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_0121: ldarg.0 + IL_0122: ldc.i4.0 + IL_0123: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::current + IL_0128: ldc.i4.0 + IL_0129: ret } .method public strict virtual instance void Close() cil managed @@ -505,4 +511,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest07.fs.RealInternalSignatureOff.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest07.fs.RealInternalSignatureOff.il.netcore.bsl index 6e872f71373..57926705228 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest07.fs.RealInternalSignatureOff.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest07.fs.RealInternalSignatureOff.il.netcore.bsl @@ -677,41 +677,47 @@ .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, uint64 V_1, int32 V_2, - int32 V_3) + int32 V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5) IL_0000: ldc.i4.0 IL_0001: conv.i8 IL_0002: stloc.1 IL_0003: ldc.i4.1 IL_0004: stloc.2 - IL_0005: br.s IL_002b + IL_0005: br.s IL_0033 IL_0007: ldloca.s V_0 IL_0009: ldloc.2 IL_000a: stloc.3 - IL_000b: ldstr "hello" - IL_0010: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_0015: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_001a: pop - IL_001b: ldloc.3 - IL_001c: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0021: nop - IL_0022: ldloc.2 - IL_0023: ldc.i4.1 - IL_0024: add - IL_0025: stloc.2 - IL_0026: ldloc.1 - IL_0027: ldc.i4.1 - IL_0028: conv.i8 - IL_0029: add - IL_002a: stloc.1 - IL_002b: ldloc.1 - IL_002c: ldc.i4.4 - IL_002d: conv.i8 - IL_002e: blt.un.s IL_0007 - - IL_0030: ldloca.s V_0 - IL_0032: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0037: ret + IL_000b: stloc.s V_4 + IL_000d: ldloc.s V_4 + IL_000f: ldstr "hello" + IL_0014: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0019: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_001e: pop + IL_001f: stloc.s V_5 + IL_0021: ldloc.s V_5 + IL_0023: ldloc.3 + IL_0024: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0029: nop + IL_002a: ldloc.2 + IL_002b: ldc.i4.1 + IL_002c: add + IL_002d: stloc.2 + IL_002e: ldloc.1 + IL_002f: ldc.i4.1 + IL_0030: conv.i8 + IL_0031: add + IL_0032: stloc.1 + IL_0033: ldloc.1 + IL_0034: ldc.i4.4 + IL_0035: conv.i8 + IL_0036: blt.un.s IL_0007 + + IL_0038: ldloca.s V_0 + IL_003a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_003f: ret } .property int32 r() @@ -737,51 +743,54 @@ .maxstack 4 .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit> V_0, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, - class [runtime]System.Exception V_2, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 V_3) + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit> V_1, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, + class [runtime]System.Exception V_3, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 V_4) IL_0000: ldc.i4.0 IL_0001: stsfld int32 ''.$SeqExpressionSteppingTest7::r@4 IL_0006: ldstr "res = %A" IL_000b: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::.ctor(string) IL_0010: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) IL_0015: stloc.0 + IL_0016: ldloc.0 + IL_0017: stloc.1 .try { - IL_0016: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 SeqExpressionSteppingTest7::f() - IL_001b: stloc.1 - IL_001c: leave.s IL_004b + IL_0018: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 SeqExpressionSteppingTest7::f() + IL_001d: stloc.2 + IL_001e: leave.s IL_004f } catch [runtime]System.Object { - IL_001e: castclass [runtime]System.Exception - IL_0023: stloc.2 - IL_0024: ldloc.2 - IL_0025: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::FailurePattern(class [runtime]System.Exception) - IL_002a: stloc.3 - IL_002b: ldloc.3 - IL_002c: brfalse.s IL_0040 - - IL_002e: call int32 SeqExpressionSteppingTest7::get_r() - IL_0033: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_0038: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0020: castclass [runtime]System.Exception + IL_0025: stloc.3 + IL_0026: ldloc.3 + IL_0027: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::FailurePattern(class [runtime]System.Exception) + IL_002c: stloc.s V_4 + IL_002e: ldloc.s V_4 + IL_0030: brfalse.s IL_0044 + + IL_0032: call int32 SeqExpressionSteppingTest7::get_r() + IL_0037: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_003c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_003d: stloc.1 - IL_003e: leave.s IL_004b + IL_0041: stloc.2 + IL_0042: leave.s IL_004f - IL_0040: rethrow - IL_0042: ldnull - IL_0043: unbox.any class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - IL_0048: stloc.1 - IL_0049: leave.s IL_004b + IL_0044: rethrow + IL_0046: ldnull + IL_0047: unbox.any class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + IL_004c: stloc.2 + IL_004d: leave.s IL_004f } - IL_004b: ldloc.0 - IL_004c: ldloc.1 - IL_004d: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Invoke(!0) - IL_0052: pop - IL_0053: ret + IL_004f: ldloc.1 + IL_0050: ldloc.2 + IL_0051: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Invoke(!0) + IL_0056: pop + IL_0057: ret } } @@ -790,4 +799,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest07.fs.RealInternalSignatureOn.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest07.fs.RealInternalSignatureOn.il.netcore.bsl index d4aa7a0a7c5..0048320b577 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest07.fs.RealInternalSignatureOn.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest07.fs.RealInternalSignatureOn.il.netcore.bsl @@ -679,41 +679,47 @@ .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, uint64 V_1, int32 V_2, - int32 V_3) + int32 V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5) IL_0000: ldc.i4.0 IL_0001: conv.i8 IL_0002: stloc.1 IL_0003: ldc.i4.1 IL_0004: stloc.2 - IL_0005: br.s IL_002b + IL_0005: br.s IL_0033 IL_0007: ldloca.s V_0 IL_0009: ldloc.2 IL_000a: stloc.3 - IL_000b: ldstr "hello" - IL_0010: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_0015: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_001a: pop - IL_001b: ldloc.3 - IL_001c: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0021: nop - IL_0022: ldloc.2 - IL_0023: ldc.i4.1 - IL_0024: add - IL_0025: stloc.2 - IL_0026: ldloc.1 - IL_0027: ldc.i4.1 - IL_0028: conv.i8 - IL_0029: add - IL_002a: stloc.1 - IL_002b: ldloc.1 - IL_002c: ldc.i4.4 - IL_002d: conv.i8 - IL_002e: blt.un.s IL_0007 - - IL_0030: ldloca.s V_0 - IL_0032: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0037: ret + IL_000b: stloc.s V_4 + IL_000d: ldloc.s V_4 + IL_000f: ldstr "hello" + IL_0014: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0019: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_001e: pop + IL_001f: stloc.s V_5 + IL_0021: ldloc.s V_5 + IL_0023: ldloc.3 + IL_0024: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0029: nop + IL_002a: ldloc.2 + IL_002b: ldc.i4.1 + IL_002c: add + IL_002d: stloc.2 + IL_002e: ldloc.1 + IL_002f: ldc.i4.1 + IL_0030: conv.i8 + IL_0031: add + IL_0032: stloc.1 + IL_0033: ldloc.1 + IL_0034: ldc.i4.4 + IL_0035: conv.i8 + IL_0036: blt.un.s IL_0007 + + IL_0038: ldloca.s V_0 + IL_003a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_003f: ret } .method private specialname rtspecialname static void .cctor() cil managed @@ -732,51 +738,54 @@ .maxstack 4 .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit> V_0, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, - class [runtime]System.Exception V_2, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 V_3) + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit> V_1, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, + class [runtime]System.Exception V_3, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 V_4) IL_0000: ldc.i4.0 IL_0001: stsfld int32 SeqExpressionSteppingTest7::r@4 IL_0006: ldstr "res = %A" IL_000b: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::.ctor(string) IL_0010: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) IL_0015: stloc.0 + IL_0016: ldloc.0 + IL_0017: stloc.1 .try { - IL_0016: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 SeqExpressionSteppingTest7::f() - IL_001b: stloc.1 - IL_001c: leave.s IL_004b + IL_0018: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 SeqExpressionSteppingTest7::f() + IL_001d: stloc.2 + IL_001e: leave.s IL_004f } catch [runtime]System.Object { - IL_001e: castclass [runtime]System.Exception - IL_0023: stloc.2 - IL_0024: ldloc.2 - IL_0025: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::FailurePattern(class [runtime]System.Exception) - IL_002a: stloc.3 - IL_002b: ldloc.3 - IL_002c: brfalse.s IL_0040 - - IL_002e: call int32 SeqExpressionSteppingTest7::get_r() - IL_0033: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_0038: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0020: castclass [runtime]System.Exception + IL_0025: stloc.3 + IL_0026: ldloc.3 + IL_0027: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::FailurePattern(class [runtime]System.Exception) + IL_002c: stloc.s V_4 + IL_002e: ldloc.s V_4 + IL_0030: brfalse.s IL_0044 + + IL_0032: call int32 SeqExpressionSteppingTest7::get_r() + IL_0037: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_003c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_003d: stloc.1 - IL_003e: leave.s IL_004b + IL_0041: stloc.2 + IL_0042: leave.s IL_004f - IL_0040: rethrow - IL_0042: ldnull - IL_0043: unbox.any class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - IL_0048: stloc.1 - IL_0049: leave.s IL_004b + IL_0044: rethrow + IL_0046: ldnull + IL_0047: unbox.any class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + IL_004c: stloc.2 + IL_004d: leave.s IL_004f } - IL_004b: ldloc.0 - IL_004c: ldloc.1 - IL_004d: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Invoke(!0) - IL_0052: pop - IL_0053: ret + IL_004f: ldloc.1 + IL_0050: ldloc.2 + IL_0051: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Invoke(!0) + IL_0056: pop + IL_0057: ret } .property int32 r() @@ -809,4 +818,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj index acfeca79f35..3550b60c13e 100644 --- a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj +++ b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj @@ -229,6 +229,7 @@ + diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_net10.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_net10.0.bsl index a6da08a4f24..17229b60667 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_net10.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_net10.0.bsl @@ -6,7 +6,7 @@ [IL]: Error [ReturnPtrToStack]: : Internal.Utilities.Text.Lexing.LexBuffer`1::get_LexemeView()][offset 0x00000017] Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. [IL]: Error [ReturnPtrToStack]: : FSharp.Compiler.CodeAnalysis.ItemKeyStore::ReadKeyString([System.Reflection.Metadata]System.Reflection.Metadata.BlobReader&)][offset 0x00000023] Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. [IL]: Error [ReturnPtrToStack]: : FSharp.Compiler.CodeAnalysis.ItemKeyStore::ReadFirstKeyString()][offset 0x00000064] Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.ItemKeyStoreBuilder::writeRange([FSharp.Compiler.Service]FSharp.Compiler.Text.Range)][offset 0x00000017][found address of '[FSharp.Compiler.Service]FSharp.Compiler.Text.Range'][expected Native Int] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.ItemKeyStoreBuilder::writeRange([FSharp.Compiler.Service]FSharp.Compiler.Text.Range)][offset 0x00000019][found address of '[FSharp.Compiler.Service]FSharp.Compiler.Text.Range'][expected Native Int] Unexpected type on the stack. [IL]: Error [ExpectedNumericType]: : FSharp.Compiler.EditorServices.SemanticClassificationKeyStoreBuilder::WriteAll([FSharp.Compiler.Service]FSharp.Compiler.EditorServices.SemanticClassificationItem[])][offset 0x0000001C][found address of '[FSharp.Compiler.Service]FSharp.Compiler.EditorServices.SemanticClassificationItem'] Expected numeric type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.IlxGen::HashRangeSorted([S.P.CoreLib]System.Collections.Generic.IDictionary`2>)][offset 0x00000011][found ref '[FSharp.Compiler.Service]FSharp.Compiler.IlxGen+HashRangeSorted'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,int32>'] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.IlxGen::HashRangeSorted([S.P.CoreLib]System.Collections.Generic.IDictionary`2>)][offset 0x00000012][found ref '[FSharp.Compiler.Service]FSharp.Compiler.IlxGen+HashRangeSorted'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,T0>'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.IlxGen::HashRangeSorted([S.P.CoreLib]System.Collections.Generic.IDictionary`2>)][offset 0x0000000A][found ref '[FSharp.Compiler.Service]FSharp.Compiler.IlxGen+HashRangeSorted'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,int32>'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.IlxGen::HashRangeSorted([S.P.CoreLib]System.Collections.Generic.IDictionary`2>)][offset 0x0000000B][found ref '[FSharp.Compiler.Service]FSharp.Compiler.IlxGen+HashRangeSorted'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,T0>'] Unexpected type on the stack. diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl index a6da08a4f24..17229b60667 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl @@ -6,7 +6,7 @@ [IL]: Error [ReturnPtrToStack]: : Internal.Utilities.Text.Lexing.LexBuffer`1::get_LexemeView()][offset 0x00000017] Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. [IL]: Error [ReturnPtrToStack]: : FSharp.Compiler.CodeAnalysis.ItemKeyStore::ReadKeyString([System.Reflection.Metadata]System.Reflection.Metadata.BlobReader&)][offset 0x00000023] Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. [IL]: Error [ReturnPtrToStack]: : FSharp.Compiler.CodeAnalysis.ItemKeyStore::ReadFirstKeyString()][offset 0x00000064] Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.ItemKeyStoreBuilder::writeRange([FSharp.Compiler.Service]FSharp.Compiler.Text.Range)][offset 0x00000017][found address of '[FSharp.Compiler.Service]FSharp.Compiler.Text.Range'][expected Native Int] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.ItemKeyStoreBuilder::writeRange([FSharp.Compiler.Service]FSharp.Compiler.Text.Range)][offset 0x00000019][found address of '[FSharp.Compiler.Service]FSharp.Compiler.Text.Range'][expected Native Int] Unexpected type on the stack. [IL]: Error [ExpectedNumericType]: : FSharp.Compiler.EditorServices.SemanticClassificationKeyStoreBuilder::WriteAll([FSharp.Compiler.Service]FSharp.Compiler.EditorServices.SemanticClassificationItem[])][offset 0x0000001C][found address of '[FSharp.Compiler.Service]FSharp.Compiler.EditorServices.SemanticClassificationItem'] Expected numeric type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.IlxGen::HashRangeSorted([S.P.CoreLib]System.Collections.Generic.IDictionary`2>)][offset 0x00000011][found ref '[FSharp.Compiler.Service]FSharp.Compiler.IlxGen+HashRangeSorted'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,int32>'] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.IlxGen::HashRangeSorted([S.P.CoreLib]System.Collections.Generic.IDictionary`2>)][offset 0x00000012][found ref '[FSharp.Compiler.Service]FSharp.Compiler.IlxGen+HashRangeSorted'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,T0>'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.IlxGen::HashRangeSorted([S.P.CoreLib]System.Collections.Generic.IDictionary`2>)][offset 0x0000000A][found ref '[FSharp.Compiler.Service]FSharp.Compiler.IlxGen+HashRangeSorted'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,int32>'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.IlxGen::HashRangeSorted([S.P.CoreLib]System.Collections.Generic.IDictionary`2>)][offset 0x0000000B][found ref '[FSharp.Compiler.Service]FSharp.Compiler.IlxGen+HashRangeSorted'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,T0>'] Unexpected type on the stack. diff --git a/tests/fsharp/Compiler/CodeGen/EmittedIL/ComputedListExpressions.fs b/tests/fsharp/Compiler/CodeGen/EmittedIL/ComputedListExpressions.fs index d32c0c9d630..6a092d222e6 100644 --- a/tests/fsharp/Compiler/CodeGen/EmittedIL/ComputedListExpressions.fs +++ b/tests/fsharp/Compiler/CodeGen/EmittedIL/ComputedListExpressions.fs @@ -235,41 +235,47 @@ let ListExpressionSteppingTest5 () = .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, uint64 V_1, int32 V_2, - int32 V_3) + int32 V_3, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_4, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1& V_5) IL_0000: ldc.i4.0 IL_0001: conv.i8 IL_0002: stloc.1 IL_0003: ldc.i4.1 IL_0004: stloc.2 - IL_0005: br.s IL_002b + IL_0005: br.s IL_0033 IL_0007: ldloca.s V_0 IL_0009: ldloc.2 IL_000a: stloc.3 - IL_000b: ldstr "hello" - IL_0010: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_0015: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_001a: pop - IL_001b: ldloc.3 - IL_001c: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0021: nop - IL_0022: ldloc.2 - IL_0023: ldc.i4.1 - IL_0024: add - IL_0025: stloc.2 - IL_0026: ldloc.1 - IL_0027: ldc.i4.1 - IL_0028: conv.i8 - IL_0029: add - IL_002a: stloc.1 - IL_002b: ldloc.1 - IL_002c: ldc.i4.4 - IL_002d: conv.i8 - IL_002e: blt.un.s IL_0007 + IL_000b: stloc.s V_4 + IL_000d: ldloc.s V_4 + IL_000f: ldstr "hello" + IL_0014: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0019: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_001e: pop + IL_001f: stloc.s V_5 + IL_0021: ldloc.s V_5 + IL_0023: ldloc.3 + IL_0024: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0029: nop + IL_002a: ldloc.2 + IL_002b: ldc.i4.1 + IL_002c: add + IL_002d: stloc.2 + IL_002e: ldloc.1 + IL_002f: ldc.i4.1 + IL_0030: conv.i8 + IL_0031: add + IL_0032: stloc.1 + IL_0033: ldloc.1 + IL_0034: ldc.i4.4 + IL_0035: conv.i8 + IL_0036: blt.un.s IL_0007 - IL_0030: ldloca.s V_0 - IL_0032: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0037: ret + IL_0038: ldloca.s V_0 + IL_003a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_003f: ret } } From f7be8d05a7e22ba1209e62363ee639d100df2488 Mon Sep 17 00:00:00 2001 From: Eugene Auduchinok Date: Fri, 5 Jun 2026 10:51:17 +0200 Subject: [PATCH 57/72] Unify baseline checking behind a single checkBaseline helper (#19888) Introduce checkBaseline/checkBaselineWith in the Compiler test module and route the syntax-tree tests, surface-area verification, and the .err.bsl / .il.bsl / .vsbsl component-test baselines through it, replacing each site's own shouldUpdateBaselines check and ad-hoc file writes. The helper reads the baseline file, compares via a pluggable comparer (default exact equality; surface area and error baselines pass a set-based comparer, IL passes an ILChecker-based one), and on mismatch writes the produced content to an output file or updates the baseline when TEST_UPDATE_BSL is set. The output file extension is replaced for .bsl (foo.bsl -> foo.out) and appended otherwise (neg78.vsbsl -> neg78.vsbsl.out) so the .bsl/.vsbsl baselines a single test can have no longer collide. Removes the now-redundant updateBaseLineIfEnvironmentSaysSo, createBaselineErrors, convenienceBaselineInstructions, and assertBaseline, and drops the unused BaselineFile.FilePath field. This also fixes the IL baseline update path, which previously copied the previous run's IL to the baseline because the copy ran before the fresh actual was written. The SyntaxTree-local .gitignore (*.actual) is removed since those tests now write .out, covered by the global *.out rule. Co-authored-by: Claude Opus 4.8 (1M context) --- .../SurfaceArea.fs | 3 +- .../SyntaxTreeTests.fs | 20 +-- tests/FSharp.Core.UnitTests/SurfaceArea.fs | 3 +- tests/FSharp.Test.Utilities/Compiler.fs | 121 ++++++++---------- tests/FSharp.Test.Utilities/SurfaceArea.fs | 38 ++---- tests/service/data/SyntaxTree/.gitignore | 1 - 6 files changed, 64 insertions(+), 122 deletions(-) delete mode 100644 tests/service/data/SyntaxTree/.gitignore diff --git a/tests/FSharp.Compiler.Service.Tests/SurfaceArea.fs b/tests/FSharp.Compiler.Service.Tests/SurfaceArea.fs index 2a8e963796e..1656e11a1a7 100644 --- a/tests/FSharp.Compiler.Service.Tests/SurfaceArea.fs +++ b/tests/FSharp.Compiler.Service.Tests/SurfaceArea.fs @@ -28,5 +28,4 @@ type SurfaceAreaTest() = Assembly.LoadFrom path let baseline = Path.Combine(__SOURCE_DIRECTORY__, $"FSharp.Compiler.Service.SurfaceArea.{platform}.bsl") - let outFileName = Path.Combine(__SOURCE_DIRECTORY__, $"FSharp.Compiler.Service.SurfaceArea.{platform}.out") - FSharp.Test.SurfaceArea.verify assembly baseline outFileName + FSharp.Test.SurfaceArea.verify assembly baseline diff --git a/tests/FSharp.Compiler.Service.Tests/SyntaxTreeTests.fs b/tests/FSharp.Compiler.Service.Tests/SyntaxTreeTests.fs index 30885e7661c..9c7559e90a3 100644 --- a/tests/FSharp.Compiler.Service.Tests/SyntaxTreeTests.fs +++ b/tests/FSharp.Compiler.Service.Tests/SyntaxTreeTests.fs @@ -178,25 +178,7 @@ let ParseFile fileName = |> normalize |> sprintf "%s\n" - let bslPath = $"{fullPath}.bsl" - let actualPath = $"{fullPath}.actual" - - let expected = - if File.Exists bslPath then - File.ReadAllText bslPath |> normalize - else - "No baseline was found" - - if expected = actual then - File.Delete(actualPath) - else - if shouldUpdateBaselines then - File.Delete(actualPath) - File.WriteAllText(bslPath, actual) - else - File.WriteAllText(actualPath, actual) - - Assert.Equal(expected, actual) + checkBaseline actual $"{fullPath}.bsl" // Run type checker to assert that it doesn't fail with the tree produced by the parser CompilerAssert.ParseAndTypeCheck([|"--langversion:preview"|], fileName, contents) |> ignore diff --git a/tests/FSharp.Core.UnitTests/SurfaceArea.fs b/tests/FSharp.Core.UnitTests/SurfaceArea.fs index 869a3bd0ab7..8adf6e5f512 100644 --- a/tests/FSharp.Core.UnitTests/SurfaceArea.fs +++ b/tests/FSharp.Core.UnitTests/SurfaceArea.fs @@ -38,5 +38,4 @@ type SurfaceAreaTest() = #endif let assembly = typeof.Assembly let baseline = Path.Combine(__SOURCE_DIRECTORY__, $"FSharp.Core.SurfaceArea.{platform}.{flavor}.bsl") - let outFileName = Path.Combine(Path.GetDirectoryName(assembly.Location), $"FSharp.Core.SurfaceArea.{platform}.{flavor}.out") - SurfaceArea.verify assembly baseline outFileName + SurfaceArea.verify assembly baseline diff --git a/tests/FSharp.Test.Utilities/Compiler.fs b/tests/FSharp.Test.Utilities/Compiler.fs index 914741559a2..d5ae4a34a27 100644 --- a/tests/FSharp.Test.Utilities/Compiler.fs +++ b/tests/FSharp.Test.Utilities/Compiler.fs @@ -30,13 +30,54 @@ module rec Compiler = let shouldUpdateBaselines = Environment.GetEnvironmentVariable("TEST_UPDATE_BSL") <> null + let private baselineFailureMessage (expectedFile: string) (outFile: string) (diff: string) = + $"""Baseline mismatch for {expectedFile} +to update the baseline: +$ cp {outFile} {expectedFile} +to compare: +$ code --diff {outFile} {expectedFile} +(or set TEST_UPDATE_BSL=1 and re-run to update the baseline automatically) +{diff}""" + + let private baselineOutputFile (expectedFile: string) = + if Path.GetExtension(expectedFile) = ".bsl" then + Path.ChangeExtension(expectedFile, ".out") + else + expectedFile + ".out" + + let checkBaselineWith (compare: string -> string -> string option) (expected: string) (expectedFile: string) = + let outFile = baselineOutputFile expectedFile + let baselineContent = + if FileSystem.FileExistsShim expectedFile then File.ReadAllText expectedFile else "" + let diff = compare baselineContent expected + + match diff with + | None -> + if FileSystem.FileExistsShim outFile then + FileSystem.FileDeleteShim outFile + | Some diff -> + if shouldUpdateBaselines then + if FileSystem.FileExistsShim outFile then + FileSystem.FileDeleteShim outFile + File.WriteAllText(expectedFile, expected) + else + File.WriteAllText(outFile, expected) + + Assert.True(false, baselineFailureMessage expectedFile outFile diff) + + let checkBaseline (expected: string) (expectedFile: string) = + let compare fileContent produced = + let e = normalizeNewlines fileContent + let a = normalizeNewlines produced + if e = a then None else Some $"Expected:\n{e}\nActual:\n{a}" + checkBaselineWith compare expected expectedFile + [] type SourceUtilities () = static member getCurrentMethodName([] memberName: string) = memberName type BaselineFile = { - FilePath: string BslSource: string Content: string option } @@ -251,8 +292,6 @@ module rec Compiler = | Some s -> s | None -> sourceFilePath + sourceBaselineSuffix + ".il.bsl" - let fsOutFilePath = normalizePathSeparator (Path.ChangeExtension(outputDirectoryPath ++ filename, ".err")) - let ilOutFilePath = normalizePathSeparator (Path.ChangeExtension(outputDirectoryPath ++ filename, ".il")) let fsBslSource = readFileOrDefault fsBslFilePath let ilBslSource = readFileOrDefault ilBslFilePath @@ -262,8 +301,8 @@ module rec Compiler = Some { SourceFilename = Some sourceFilePath - FSBaseline = { FilePath = fsOutFilePath; BslSource = fsBslFilePath; Content = fsBslSource } - ILBaseline = { FilePath = ilOutFilePath; BslSource = ilBslFilePath; Content = ilBslSource } + FSBaseline = { BslSource = fsBslFilePath; Content = fsBslSource } + ILBaseline = { BslSource = ilBslFilePath; Content = ilBslSource } } Options = Compiler.defaultOptions OutputType = Library @@ -1220,36 +1259,6 @@ module rec Compiler = | _ -> failwith "FSI running only supports F#." - let convenienceBaselineInstructions baseline expected actual = - $"""to update baseline: -$ cp {baseline.FilePath} {baseline.BslSource} -to compare baseline: -$ code --diff {baseline.FilePath} {baseline.BslSource} -Expected: -{expected} -Actual: -{actual}""" - let updateBaseLineIfEnvironmentSaysSo baseline = - if shouldUpdateBaselines then - if FileSystem.FileExistsShim baseline.FilePath then - FileSystem.CopyShim(baseline.FilePath, baseline.BslSource, true) - - let assertBaseline expected actual baseline fOnFail = - if expected <> actual then - fOnFail() - updateBaseLineIfEnvironmentSaysSo baseline - createBaselineErrors baseline actual - Assert.True((expected = actual), convenienceBaselineInstructions baseline expected actual) - elif FileSystem.FileExistsShim baseline.FilePath then - FileSystem.FileDeleteShim baseline.FilePath - - - let private createBaselineErrors (baselineFile: BaselineFile) (actualErrors: string) : unit = - printfn $"creating baseline error file for convenience: {baselineFile.FilePath}, expected: {baselineFile.BslSource}" - let file = FileSystem.OpenFileForWriteShim(baselineFile.FilePath) - file.SetLength(0) - file.WriteAllText(actualErrors) - /// Turn our ErrorInfo back into a genuine FSharpDiagnostic let private toFSharpDiagnostic (ei: ErrorInfo) : FSharpDiagnostic = @@ -1309,19 +1318,8 @@ Actual: match o.Compilation with | FS fs -> fs | _ -> failwith "verifyBaseline only supports F#" - let expected = - fsSource.Baseline.Value.FSBaseline.Content - |> Option.defaultValue "" - |> normalizeNewlines - // 4) Compare or update - if expected <> formattedActual then - // same update mechanism you already have: - fsSource.CreateOutputDirectory() - createBaselineErrors fsSource.Baseline.Value.FSBaseline formattedActual - updateBaseLineIfEnvironmentSaysSo fsSource.Baseline.Value.FSBaseline - let msg = convenienceBaselineInstructions fsSource.Baseline.Value.FSBaseline expected formattedActual - Assert.True(false, msg) + checkBaseline formattedActual fsSource.Baseline.Value.FSBaseline.BslSource // 5) Return the original result for fluent chaining cResult @@ -1387,14 +1385,8 @@ Actual: | None -> String.Empty let success, errorMsg, actualIL = ILChecker.verifyILAndReturnActual [] p [expectedIL] - if not success then - // Failed try update baselines if required - // If we are here then the il file has been produced we can write it back to the baseline location - // if the environment variable TEST_UPDATE_BSL has been set - updateBaseLineIfEnvironmentSaysSo baseline.ILBaseline - createBaselineErrors baseline.ILBaseline actualIL - let errorMsg = (convenienceBaselineInstructions baseline.ILBaseline expectedIL actualIL) + errorMsg - Assert.Fail(errorMsg) + let compare _ _ = if success then None else Some errorMsg + checkBaselineWith compare actualIL baseline.ILBaseline.BslSource let verifyILBaseline (compilationResult: CompilationResult) : CompilationResult = match compilationResult with @@ -2011,22 +2003,9 @@ Actual: |> String.Concat let withResultsMatchingFile (path:string) (result:CompilationResult) = - let expectedContent = File.ReadAllText(path) |> normalizeNewLines - let actualErrors = renderToString result - - match Assert.shouldBeSameMultilineStringSets expectedContent actualErrors with - | None -> () - | Some diff -> - if shouldUpdateBaselines then - File.WriteAllText(path, actualErrors) - - printfn $"{Path.GetFullPath path} \n {diff}" - printfn "==========================EXPECTED===========================" - printfn "%s" expectedContent - printfn "===========================ACTUAL============================" - printfn "%s" actualErrors - Assert.True(String.IsNullOrEmpty(diff), path) - + let compare fileContent produced = + Assert.shouldBeSameMultilineStringSets (normalizeNewLines fileContent) produced + checkBaselineWith compare (renderToString result) path result let checkCodes (expected: int list) (selector: CompilationOutput -> ErrorInfo list) (result: CompilationResult) : CompilationResult = diff --git a/tests/FSharp.Test.Utilities/SurfaceArea.fs b/tests/FSharp.Test.Utilities/SurfaceArea.fs index 99b7838507b..7e60103175b 100644 --- a/tests/FSharp.Test.Utilities/SurfaceArea.fs +++ b/tests/FSharp.Test.Utilities/SurfaceArea.fs @@ -42,42 +42,26 @@ module FSharp.Test.SurfaceArea |] assembly, actual - let private appendNewLine str = str + System.Environment.NewLine - // verify public surface area matches expected, handles baseline update when TEST_UPDATE_BSL is set - let verify assembly baselinePath outFilePath : unit = - let expected = - File.ReadAllLines(baselinePath) - |> String.concat System.Environment.NewLine - |> appendNewLine - + let verify assembly baselinePath : unit = let normalize (s:string) = Regex.Replace(s, "(\\r\\n|\\n|\\r)+", Environment.NewLine).Trim() let asm, actualNotNormalized = getSurfaceAreaForAssembly (assembly) - let actual = - actualNotNormalized - |> Seq.map normalize + let actual = + actualNotNormalized + |> Seq.map normalize |> Seq.filter (String.IsNullOrWhiteSpace >> not) |> Seq.sort |> String.concat Environment.NewLine - let expected = normalize expected - - match Assert.shouldBeSameMultilineStringSets expected actual with - | None -> - File.Delete(outFilePath) - - | Some diff -> - if shouldUpdateBaselines then - File.Delete(outFilePath) - File.WriteAllText(baselinePath, actual) - else - File.WriteAllText(outFilePath, actual) - - let msg = $"""Assembly: %A{asm} + let compare fileContent produced = + match Assert.shouldBeSameMultilineStringSets (normalize fileContent) produced with + | None -> None + | Some diff -> + Some $"""Assembly: %A{asm} Expected and actual surface area don't match. To see the delta, run: - windiff {baselinePath} {outFilePath} + windiff {baselinePath} {Path.ChangeExtension(baselinePath, ".out")} {diff}""" - failwith msg + checkBaselineWith compare actual baselinePath diff --git a/tests/service/data/SyntaxTree/.gitignore b/tests/service/data/SyntaxTree/.gitignore deleted file mode 100644 index 5842cb6df9b..00000000000 --- a/tests/service/data/SyntaxTree/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.actual From c854edd183affd8decade226f8e3519aeaea7f25 Mon Sep 17 00:00:00 2001 From: Adam Boniecki <20281641+abonie@users.noreply.github.com> Date: Fri, 5 Jun 2026 21:35:10 +0200 Subject: [PATCH 58/72] Remove unused variable group (#19899) --- azure-pipelines.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 19ed86c2d3f..9b730e2f3f0 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -124,7 +124,6 @@ extends: zipSources: false variables: - - group: DotNet-Symbol-Server-Pats - group: DotNet-DevDiv-Insertion-Workflow-Variables - name: _SignType value: Real From b858ef445d071780113da0d31e0110099ae469bd Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Mon, 8 Jun 2026 05:04:19 +0000 Subject: [PATCH 59/72] Update dependencies from https://github.com/dotnet/arcade build 20260607.1 On relative base path root Microsoft.DotNet.Arcade.Sdk From Version 11.0.0-beta.26279.5 -> To Version 11.0.0-beta.26307.1 --- eng/Version.Details.props | 2 +- eng/Version.Details.xml | 4 +- .../core-templates/job/helix-job-monitor.yml | 2 +- eng/common/core-templates/job/job.yml | 6 + .../steps/enable-internal-sources.yml | 24 ++++ eng/common/cross/build-rootfs.sh | 2 +- .../native/LocateNativeCompiler.targets | 27 ++++ eng/common/native/install-dependencies.sh | 8 +- eng/common/templates/job/job.yml | 5 - eng/common/templates/vmr-build-pr.yml | 2 +- eng/common/tools.ps1 | 135 ++++++------------ eng/common/tools.sh | 44 ++---- global.json | 2 +- 13 files changed, 118 insertions(+), 145 deletions(-) create mode 100644 eng/common/native/LocateNativeCompiler.targets diff --git a/eng/Version.Details.props b/eng/Version.Details.props index 62573189560..50a7067a2ac 100644 --- a/eng/Version.Details.props +++ b/eng/Version.Details.props @@ -6,7 +6,7 @@ This file should be imported by eng/Versions.props - 11.0.0-beta.26279.5 + 11.0.0-beta.26307.1 18.8.0-preview-26265-07 18.8.0-preview-26265-07 diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 95949610884..a7c67436b54 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -82,9 +82,9 @@ - + https://github.com/dotnet/arcade - 2bc908b1bdb34e2c42982eb511679bb458ddac2c + 76ee16fe3a80a4bf55c7d31dbdef2804e555cce0 https://dev.azure.com/dnceng/internal/_git/dotnet-optimization diff --git a/eng/common/core-templates/job/helix-job-monitor.yml b/eng/common/core-templates/job/helix-job-monitor.yml index 767450da2fc..a8162c51166 100644 --- a/eng/common/core-templates/job/helix-job-monitor.yml +++ b/eng/common/core-templates/job/helix-job-monitor.yml @@ -170,7 +170,7 @@ jobs: toolArgs=( --helix-base-uri '${{ parameters.helixBaseUri }}' --polling-interval-seconds '${{ parameters.pollingIntervalSeconds }}' - --max-wait-minutes "$((${{ parameters.timeoutInMinutes }} - 2))" # Set the tool's timeout slightly lower than the Azure DevOps job timeout to allow it to exit gracefully. + --max-wait-minutes "$((${{ parameters.timeoutInMinutes }} - 5))" # Set the tool's timeout slightly lower than the Azure DevOps job timeout to allow it to exit gracefully. --stage-name '$(System.StageName)' ) diff --git a/eng/common/core-templates/job/job.yml b/eng/common/core-templates/job/job.yml index 66c7988f222..cb60f529784 100644 --- a/eng/common/core-templates/job/job.yml +++ b/eng/common/core-templates/job/job.yml @@ -75,6 +75,12 @@ jobs: variables: - name: AllowPtrToDetectTestRunRetryFiles value: true + # Component Governance detection and CodeQL are not run in the public project + - ${{ if eq(variables['System.TeamProject'], 'public') }}: + - name: skipComponentGovernanceDetection + value: true + - name: Codeql.SkipTaskAutoInjection + value: true - ${{ if ne(parameters.enableTelemetry, 'false') }}: - name: DOTNET_CLI_TELEMETRY_PROFILE value: '$(Build.Repository.Uri)' diff --git a/eng/common/core-templates/steps/enable-internal-sources.yml b/eng/common/core-templates/steps/enable-internal-sources.yml index 4085512b690..51af9a01709 100644 --- a/eng/common/core-templates/steps/enable-internal-sources.yml +++ b/eng/common/core-templates/steps/enable-internal-sources.yml @@ -15,32 +15,56 @@ steps: - ${{ if ne(variables['System.TeamProject'], 'public') }}: - ${{ if ne(parameters.legacyCredential, '') }}: - task: PowerShell@2 + condition: and(succeeded(), eq(variables['Agent.Os'], 'Windows_NT')) displayName: Setup Internal Feeds inputs: filePath: $(System.DefaultWorkingDirectory)/eng/common/SetupNugetSources.ps1 arguments: -ConfigFile $(System.DefaultWorkingDirectory)/NuGet.config -Password $Env:Token env: Token: ${{ parameters.legacyCredential }} + - task: Bash@3 + condition: and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT')) + displayName: Setup Internal Feeds + inputs: + targetType: inline + script: | + "$(System.DefaultWorkingDirectory)/eng/common/SetupNugetSources.sh" "$(System.DefaultWorkingDirectory)/NuGet.config" "$Token" + env: + Token: ${{ parameters.legacyCredential }} # If running on dnceng (internal project), just use the default behavior for NuGetAuthenticate. # If running on DevDiv, NuGetAuthenticate is not really an option. It's scoped to a single feed, and we have many feeds that # may be added. Instead, we'll use the traditional approach (add cred to nuget.config), but use an account token. - ${{ else }}: - ${{ if eq(variables['System.TeamProject'], 'internal') }}: - task: PowerShell@2 + condition: and(succeeded(), eq(variables['Agent.Os'], 'Windows_NT')) displayName: Setup Internal Feeds inputs: filePath: $(System.DefaultWorkingDirectory)/eng/common/SetupNugetSources.ps1 arguments: -ConfigFile $(System.DefaultWorkingDirectory)/NuGet.config + - task: Bash@3 + condition: and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT')) + displayName: Setup Internal Feeds + inputs: + filePath: $(System.DefaultWorkingDirectory)/eng/common/SetupNugetSources.sh + arguments: $(System.DefaultWorkingDirectory)/NuGet.config - ${{ else }}: - template: /eng/common/templates/steps/get-federated-access-token.yml parameters: federatedServiceConnection: ${{ parameters.nugetFederatedServiceConnection }} outputVariableName: 'dnceng-artifacts-feeds-read-access-token' - task: PowerShell@2 + condition: and(succeeded(), eq(variables['Agent.Os'], 'Windows_NT')) displayName: Setup Internal Feeds inputs: filePath: $(System.DefaultWorkingDirectory)/eng/common/SetupNugetSources.ps1 arguments: -ConfigFile $(System.DefaultWorkingDirectory)/NuGet.config -Password $(dnceng-artifacts-feeds-read-access-token) + - task: Bash@3 + condition: and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT')) + displayName: Setup Internal Feeds + inputs: + filePath: $(System.DefaultWorkingDirectory)/eng/common/SetupNugetSources.sh + arguments: $(System.DefaultWorkingDirectory)/NuGet.config $(dnceng-artifacts-feeds-read-access-token) # This is required in certain scenarios to install the ADO credential provider. # It installed by default in some msbuild invocations (e.g. VS msbuild), but needs to be installed for others # (e.g. dotnet msbuild). diff --git a/eng/common/cross/build-rootfs.sh b/eng/common/cross/build-rootfs.sh index f06854ccc18..d6c13508668 100755 --- a/eng/common/cross/build-rootfs.sh +++ b/eng/common/cross/build-rootfs.sh @@ -626,7 +626,7 @@ elif [[ "$__CodeName" == "openbsd" ]]; then echo "Creating versionless symlinks for shared libraries..." # Find all versioned .so files and create the base .so symlink - for lib in "$__RootfsDir/usr/lib/libc++.so."* "$__RootfsDir/usr/lib/libc++abi.so."* "$__RootfsDir/usr/lib/libpthread.so."*; do + for lib in "$__RootfsDir"/usr/lib/lib*.so.*; do if [ -f "$lib" ]; then # Extract the filename (e.g., libc++.so.12.0) VERSIONED_NAME=$(basename "$lib") diff --git a/eng/common/native/LocateNativeCompiler.targets b/eng/common/native/LocateNativeCompiler.targets new file mode 100644 index 00000000000..028b33d9444 --- /dev/null +++ b/eng/common/native/LocateNativeCompiler.targets @@ -0,0 +1,27 @@ + + + + + clang + $(ROOTFS_DIR) + + + + + + + + $(_CC_LDFLAGS.SubString(0, $(_CC_LDFLAGS.IndexOf(';')))) + <_LDFLAGS>$(_CC_LDFLAGS.SubString($([MSBuild]::Add($(_CC_LDFLAGS.IndexOf(';')), 1)))) + lld + + + diff --git a/eng/common/native/install-dependencies.sh b/eng/common/native/install-dependencies.sh index 4742177a768..aff839fa097 100644 --- a/eng/common/native/install-dependencies.sh +++ b/eng/common/native/install-dependencies.sh @@ -24,16 +24,16 @@ case "$os" in apt update apt install -y build-essential gettext locales cmake llvm clang lld lldb liblldb-dev libunwind8-dev libicu-dev liblttng-ust-dev \ - libssl-dev libkrb5-dev pigz cpio ninja-build + libssl-dev libkrb5-dev pigz cpio ninja-build file localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 elif [ "$ID" = "fedora" ] || [ "$ID" = "rhel" ] || [ "$ID" = "azurelinux" ] || [ "$ID" = "centos" ]; then pkg_mgr="$(command -v tdnf 2>/dev/null || command -v dnf)" - $pkg_mgr install -y cmake llvm lld lldb clang python curl libicu-devel openssl-devel krb5-devel lttng-ust-devel pigz cpio ninja-build + $pkg_mgr install -y cmake llvm lld lldb clang python curl libicu-devel openssl-devel krb5-devel lttng-ust-devel pigz cpio ninja-build file elif [ "$ID" = "amzn" ]; then - dnf install -y cmake llvm lld lldb clang python libicu-devel openssl-devel krb5-devel lttng-ust-devel pigz cpio ninja-build + dnf install -y cmake llvm lld lldb clang python libicu-devel openssl-devel krb5-devel lttng-ust-devel pigz cpio ninja-build file elif [ "$ID" = "alpine" ]; then - apk add build-base cmake bash curl clang llvm llvm-dev lld lldb-dev krb5-dev lttng-ust-dev icu-dev openssl-dev pigz cpio ninja + apk add build-base cmake bash curl clang llvm llvm-dev lld lldb-dev krb5-dev lttng-ust-dev icu-dev openssl-dev pigz cpio ninja file else echo "Unsupported distro. distro: $ID" exit 1 diff --git a/eng/common/templates/job/job.yml b/eng/common/templates/job/job.yml index 5e261f34db4..85501406a54 100644 --- a/eng/common/templates/job/job.yml +++ b/eng/common/templates/job/job.yml @@ -21,11 +21,6 @@ jobs: - ${{ each step in parameters.steps }}: - ${{ step }} - # we don't run CG in public - - ${{ if eq(variables['System.TeamProject'], 'public') }}: - - script: echo "##vso[task.setvariable variable=skipComponentGovernanceDetection]true" - displayName: Set skipComponentGovernanceDetection variable - artifactPublishSteps: - ${{ if ne(parameters.artifacts.publish, '') }}: - ${{ if and(ne(parameters.artifacts.publish.artifacts, 'false'), ne(parameters.artifacts.publish.artifacts, '')) }}: diff --git a/eng/common/templates/vmr-build-pr.yml b/eng/common/templates/vmr-build-pr.yml index 2f3694fa132..d24de935248 100644 --- a/eng/common/templates/vmr-build-pr.yml +++ b/eng/common/templates/vmr-build-pr.yml @@ -33,7 +33,7 @@ resources: - repository: vmr type: github name: dotnet/dotnet - endpoint: dotnet + endpoint: public ref: refs/heads/main # Set to whatever VMR branch the PR build should insert into stages: diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index 2dd64758ee6..fc72fe63049 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -162,12 +162,6 @@ function InitializeDotNetCli([bool]$install, [bool]$createSdkLocationFile) { $env:DOTNET_CLI_TELEMETRY_OPTOUT=1 } - # Keep repo builds isolated from machine-installed SDK state and workload advertising. - # This avoids preview SDK builds picking up mismatched workloads on CI images. - $env:DOTNET_MULTILEVEL_LOOKUP = '0' - $env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE = '1' - $env:DOTNET_CLI_WORKLOAD_UPDATE_NOTIFY_DISABLE = '1' - # Find the first path on %PATH% that contains the dotnet.exe if ($useInstalledDotNetCli -and (-not $globalJsonHasRuntimes) -and ($env:DOTNET_INSTALL_DIR -eq $null)) { $dotnetExecutable = GetExecutableFileName 'dotnet' @@ -230,9 +224,6 @@ function InitializeDotNetCli([bool]$install, [bool]$createSdkLocationFile) { Write-PipelinePrependPath -Path $dotnetRoot Write-PipelineSetVariable -Name 'DOTNET_NOLOGO' -Value '1' - Write-PipelineSetVariable -Name 'DOTNET_MULTILEVEL_LOOKUP' -Value '0' - Write-PipelineSetVariable -Name 'DOTNET_SKIP_FIRST_TIME_EXPERIENCE' -Value '1' - Write-PipelineSetVariable -Name 'DOTNET_CLI_WORKLOAD_UPDATE_NOTIFY_DISABLE' -Value '1' return $global:_DotNetInstallDir = $dotnetRoot } @@ -599,16 +590,16 @@ function GetDefaultMSBuildEngine() { ExitWithExitCode 1 } -function GetNuGetPackageCachePath() { +function InitializeNuGetPackageCachePath() { if ($env:NUGET_PACKAGES -eq $null) { # Use local cache on CI to ensure deterministic build. - # Avoid using the http cache as workaround for https://github.com/NuGet/Home/issues/3116 # use global cache in dev builds to avoid cost of downloading packages. # For directory normalization, see also: https://github.com/NuGet/Home/issues/7968 if ($useGlobalNuGetCache) { - $env:NUGET_PACKAGES = Join-Path $env:UserProfile '.nuget\packages\' + $userProfile = if (IsWindowsPlatform) { $env:UserProfile } else { $env:HOME } + $env:NUGET_PACKAGES = [IO.Path]::Combine($userProfile, '.nuget', 'packages') + [IO.Path]::DirectorySeparatorChar } else { - $env:NUGET_PACKAGES = Join-Path $RepoRoot '.packages\' + $env:NUGET_PACKAGES = [IO.Path]::Combine($RepoRoot, '.packages') + [IO.Path]::DirectorySeparatorChar } } @@ -657,8 +648,6 @@ function InitializeToolset() { return $global:_InitializeToolset } - $nugetCache = GetNuGetPackageCachePath - $toolsetVersion = Read-ArcadeSdkVersion $toolsetToolsDir = Join-Path $ToolsetDir $toolsetVersion @@ -679,7 +668,7 @@ function InitializeToolset() { ExitWithExitCode 1 } - $downloadArgs = @("package", "download", "Microsoft.DotNet.Arcade.Sdk@$toolsetVersion", "--verbosity", "minimal", "--prerelease", "--output", "$nugetCache") + $downloadArgs = @("package", "download", "Microsoft.DotNet.Arcade.Sdk@$toolsetVersion", "--verbosity", "minimal", "--prerelease", "--output", "$nugetPackageCachePath") $nugetConfig = $env:NUGET_CONFIG if (-not $nugetConfig) { # Search for any variation of nuget.config in the RepoRoot @@ -696,7 +685,7 @@ function InitializeToolset() { } DotNet @downloadArgs - $packageDir = Join-Path $nugetCache (Join-Path 'microsoft.dotnet.arcade.sdk' $toolsetVersion) + $packageDir = Join-Path $nugetPackageCachePath (Join-Path 'microsoft.dotnet.arcade.sdk' $toolsetVersion) $packageToolsetDir = Join-Path $packageDir 'toolset' if (!(Test-Path $packageToolsetDir)) { @@ -747,60 +736,6 @@ function Stop-Processes() { # Terminates the script if the build fails. # function MSBuild() { - if ($ci) { - InitializeToolset | Out-Null - - $env:NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS = 20 - $env:NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS = 20 - Write-PipelineSetVariable -Name 'NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS' -Value '20' - Write-PipelineSetVariable -Name 'NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS' -Value '20' - - Enable-Nuget-EnhancedRetry - } - - MSBuild-Core @args -} - -# -# Executes a dotnet command with arguments passed to the function. -# Terminates the script if the command fails. -# -function DotNet() { - $dotnetRoot = InitializeDotNetCli -install:$restore - $dotnetPath = Join-Path $dotnetRoot (GetExecutableFileName 'dotnet') - - $cmdArgs = "" - foreach ($arg in $args) { - if ($null -ne $arg -and $arg.Trim() -ne "") { - if ($arg.EndsWith('\')) { - $arg = $arg + "\" - } - $cmdArgs += " `"$arg`"" - } - } - - $env:ARCADE_BUILD_TOOL_COMMAND = "`"$dotnetPath`" $cmdArgs" - - $exitCode = Exec-Process $dotnetPath $cmdArgs - - if ($exitCode -ne 0) { - Write-Host "dotnet command failed with exit code $exitCode. Check errors above." -ForegroundColor Red - - if ($ci -and $env:SYSTEM_TEAMPROJECT -ne $null -and !$fromVMR) { - Write-PipelineSetResult -Result "Failed" -Message "dotnet command execution failed." - ExitWithExitCode 0 - } else { - ExitWithExitCode $exitCode - } - } -} - -# -# Executes msbuild (or 'dotnet msbuild') with arguments passed to the function. -# The arguments are automatically quoted. -# Terminates the script if the build fails. -# -function MSBuild-Core() { if ($ci) { if (!$binaryLog -and !$excludeCIBinarylog) { Write-PipelineTelemetryError -Category 'Build' -Message 'Binary log must be enabled in CI build, or explicitly opted-out from with the -excludeCIBinarylog switch.' @@ -813,16 +748,10 @@ function MSBuild-Core() { } } - Enable-Nuget-EnhancedRetry - $buildTool = InitializeBuildTool $cmdArgs = "$($buildTool.Command) /m /nologo /clp:Summary /v:$verbosity /nr:$nodeReuse /p:ContinuousIntegrationBuild=$ci" - if ($ci -and $buildTool.Tool -eq 'dotnet') { - $cmdArgs += ' /p:MSBuildEnableWorkloadResolver=false' - } - # Add -mt flag for MSBuild multithreaded mode if enabled via environment variable if ($env:MSBUILD_MT_ENABLED -eq "1") { $cmdArgs += ' -mt' @@ -876,6 +805,40 @@ function MSBuild-Core() { } } +# +# Executes a dotnet command with arguments passed to the function. +# Terminates the script if the command fails. +# +function DotNet() { + $dotnetRoot = InitializeDotNetCli -install:$restore + $dotnetPath = Join-Path $dotnetRoot (GetExecutableFileName 'dotnet') + + $cmdArgs = "" + foreach ($arg in $args) { + if ($null -ne $arg -and $arg.Trim() -ne "") { + if ($arg.EndsWith('\')) { + $arg = $arg + "\" + } + $cmdArgs += " `"$arg`"" + } + } + + $env:ARCADE_BUILD_TOOL_COMMAND = "`"$dotnetPath`" $cmdArgs" + + $exitCode = Exec-Process $dotnetPath $cmdArgs + + if ($exitCode -ne 0) { + Write-Host "dotnet command failed with exit code $exitCode. Check errors above." -ForegroundColor Red + + if ($ci -and $env:SYSTEM_TEAMPROJECT -ne $null -and !$fromVMR) { + Write-PipelineSetResult -Result "Failed" -Message "dotnet command execution failed." + ExitWithExitCode 0 + } else { + ExitWithExitCode $exitCode + } + } +} + function GetMSBuildBinaryLogCommandLineArgument($arguments) { foreach ($argument in $arguments) { if ($argument -ne $null) { @@ -960,19 +923,5 @@ if (!$disableConfigureToolsetImport) { } } -# -# If $ci flag is set, turn on (and log that we did) special environment variables for improved Nuget client retry logic. -# -function Enable-Nuget-EnhancedRetry() { - if ($ci) { - Write-Host "Setting NUGET enhanced retry environment variables" - $env:NUGET_ENABLE_ENHANCED_HTTP_RETRY = 'true' - $env:NUGET_ENHANCED_MAX_NETWORK_TRY_COUNT = 6 - $env:NUGET_ENHANCED_NETWORK_RETRY_DELAY_MILLISECONDS = 1000 - $env:NUGET_RETRY_HTTP_429 = 'true' - Write-PipelineSetVariable -Name 'NUGET_ENABLE_ENHANCED_HTTP_RETRY' -Value 'true' - Write-PipelineSetVariable -Name 'NUGET_ENHANCED_MAX_NETWORK_TRY_COUNT' -Value '6' - Write-PipelineSetVariable -Name 'NUGET_ENHANCED_NETWORK_RETRY_DELAY_MILLISECONDS' -Value '1000' - Write-PipelineSetVariable -Name 'NUGET_RETRY_HTTP_429' -Value 'true' - } -} +# Initialize the nuget package cache vars +$nugetPackageCachePath = InitializeNuGetPackageCachePath diff --git a/eng/common/tools.sh b/eng/common/tools.sh index 2a587f1184a..48cab70ebf4 100755 --- a/eng/common/tools.sh +++ b/eng/common/tools.sh @@ -116,12 +116,6 @@ function InitializeDotNetCli { export DOTNET_CLI_TELEMETRY_OPTOUT=1 fi - # Keep repo builds isolated from machine-installed SDK state and workload advertising. - # This avoids preview SDK builds picking up mismatched workloads on CI images. - export DOTNET_MULTILEVEL_LOOKUP=0 - export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 - export DOTNET_CLI_WORKLOAD_UPDATE_NOTIFY_DISABLE=1 - # LTTNG is the logging infrastructure used by Core CLR. Need this variable set # so it doesn't output warnings to the console. export LTTNG_HOME="$HOME" @@ -167,9 +161,6 @@ function InitializeDotNetCli { Write-PipelinePrependPath -path "$dotnet_root" Write-PipelineSetVariable -name "DOTNET_NOLOGO" -value "1" - Write-PipelineSetVariable -name "DOTNET_MULTILEVEL_LOOKUP" -value "0" - Write-PipelineSetVariable -name "DOTNET_SKIP_FIRST_TIME_EXPERIENCE" -value "1" - Write-PipelineSetVariable -name "DOTNET_CLI_WORKLOAD_UPDATE_NOTIFY_DISABLE" -value "1" # return value _InitializeDotNetCli="$dotnet_root" @@ -373,7 +364,7 @@ function InitializeBuildTool { _InitializeBuildToolCommand="msbuild" } -function GetNuGetPackageCachePath { +function InitializeNuGetPackageCachePath { if [[ -z ${NUGET_PACKAGES:-} ]]; then if [[ "$use_global_nuget_cache" == true ]]; then export NUGET_PACKAGES="$HOME/.nuget/packages/" @@ -383,7 +374,7 @@ function GetNuGetPackageCachePath { fi # return value - _GetNuGetPackageCachePath=$NUGET_PACKAGES + _InitializeNuGetPackageCachePath=$NUGET_PACKAGES } function InitializeNativeTools() { @@ -405,8 +396,6 @@ function InitializeToolset { return fi - GetNuGetPackageCachePath - ReadGlobalVersion "Microsoft.DotNet.Arcade.Sdk" local toolset_version=$_ReadGlobalVersion @@ -429,7 +418,7 @@ function InitializeToolset { ExitWithExitCode 2 fi - local download_args=("package" "download" "Microsoft.DotNet.Arcade.Sdk@$toolset_version" "--verbosity" "minimal" "--prerelease" "--output" "$_GetNuGetPackageCachePath") + local download_args=("package" "download" "Microsoft.DotNet.Arcade.Sdk@$toolset_version" "--verbosity" "minimal" "--prerelease" "--output" "$_InitializeNuGetPackageCachePath") local nuget_config="${NUGET_CONFIG:-}" if [[ -z "$nuget_config" ]]; then # Search for any variation of nuget.config in the RepoRoot @@ -446,7 +435,7 @@ function InitializeToolset { fi DotNet "${download_args[@]}" - local package_dir="$_GetNuGetPackageCachePath/microsoft.dotnet.arcade.sdk/$toolset_version" + local package_dir="$_InitializeNuGetPackageCachePath/microsoft.dotnet.arcade.sdk/$toolset_version" if [[ ! -d "$package_dir/toolset" ]]; then Write-PipelineTelemetryError -category 'InitializeToolset' "Arcade SDK package does not contain a toolset folder: $package_dir" @@ -502,21 +491,6 @@ function DotNet { } function MSBuild { - local args=( "$@" ) - - if [[ "$ci" == true ]]; then - InitializeToolset - - export NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS=20 - export NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS=20 - Write-PipelineSetVariable -name "NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS" -value "20" - Write-PipelineSetVariable -name "NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS" -value "20" - fi - - MSBuild-Core "${args[@]}" -} - -function MSBuild-Core { if [[ "$ci" == true ]]; then if [[ "$binary_log" != true && "$exclude_ci_binary_log" != true ]]; then Write-PipelineTelemetryError -category 'Build' "Binary log must be enabled in CI build, or explicitly opted-out from with the -noBinaryLog switch." @@ -569,12 +543,7 @@ function MSBuild-Core { warnnotaserror_switch="/warnnotaserror:$warn_not_as_error /p:AdditionalWarningsNotAsErrors=$warn_not_as_error" fi - local workload_resolver_switch="" - if [[ "$ci" == true && -n "${_InitializeBuildToolCommand:-}" ]]; then - workload_resolver_switch="/p:MSBuildEnableWorkloadResolver=false" - fi - - RunBuildTool "$_InitializeBuildToolCommand" /m /nologo /clp:Summary /v:$verbosity /nr:$node_reuse $warnaserror_switch $mt_switch $warnnotaserror_switch $workload_resolver_switch /p:TreatWarningsAsErrors=$warn_as_error /p:ContinuousIntegrationBuild=$ci "$@" + RunBuildTool "$_InitializeBuildToolCommand" /m /nologo /clp:Summary /v:$verbosity /nr:$node_reuse $warnaserror_switch $mt_switch $warnnotaserror_switch /p:TreatWarningsAsErrors=$warn_as_error /p:ContinuousIntegrationBuild=$ci "$@" } function GetDarc { @@ -665,3 +634,6 @@ fi if [[ -n "${useInstalledDotNetCli:-}" ]]; then use_installed_dotnet_cli="$useInstalledDotNetCli" fi + +# Initialize the nuget package cache vars +InitializeNuGetPackageCachePath diff --git a/global.json b/global.json index 7082a305cdc..c200251a1a2 100644 --- a/global.json +++ b/global.json @@ -22,7 +22,7 @@ "xcopy-msbuild": "18.0.0" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "11.0.0-beta.26279.5", + "Microsoft.DotNet.Arcade.Sdk": "11.0.0-beta.26307.1", "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.23255.2" } } From abd099bbfd5dcda18f7d4440abbe69d78aa52712 Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Mon, 8 Jun 2026 11:33:16 +0200 Subject: [PATCH 60/72] Restore github.dev editor link in release-notes check comment (#19898) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/check_release_notes.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/check_release_notes.yml b/.github/workflows/check_release_notes.yml index da343532c64..1681a57f399 100644 --- a/.github/workflows/check_release_notes.yml +++ b/.github/workflows/check_release_notes.yml @@ -174,9 +174,6 @@ jobs: RELEASE_NOTES_MESSAGE_DETAILS+=$'**If you believe that release notes are not necessary for this PR, please add NO_RELEASE_NOTES label to the pull request.**' RELEASE_NOTES_MESSAGE_DETAILS+=$'\n' RELEASE_NOTES_MESSAGE_DETAILS+=$'\n' - RELEASE_NOTES_MESSAGE_DETAILS+=$"**You can open this PR in browser to add release notes: [open in github.dev](https://github.dev/dotnet/fsharp/pull/${PR_NUMBER})**" - RELEASE_NOTES_MESSAGE_DETAILS+=$'\n' - RELEASE_NOTES_MESSAGE_DETAILS+=$'\n' RELEASE_NOTES_MESSAGE_DETAILS+='| Change path | Release notes path | Description |' RELEASE_NOTES_MESSAGE_DETAILS+=$'\n' RELEASE_NOTES_MESSAGE_DETAILS+='| ---------------- | ------------------ | ----------- |' @@ -218,6 +215,8 @@ jobs: RELEASE_NOTES_MESSAGE+=$'## :white_check_mark: No release notes required\n\n' else RELEASE_NOTES_MESSAGE+=$'## :heavy_exclamation_mark: Release notes required\n\n' + RELEASE_NOTES_MESSAGE+=$"**You can open this PR in browser to add release notes: [open in github.dev](https://github.dev/dotnet/fsharp/pull/${PR_NUMBER})**" + RELEASE_NOTES_MESSAGE+=$'\n\n' RELEASE_NOTES_MESSAGE+=$RELEASE_NOTES_MESSAGE_DETAILS fi From e9b7dad950d1aff44254eec3562ece008e4e129b Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Mon, 8 Jun 2026 11:45:43 +0200 Subject: [PATCH 61/72] Add pr-description skill for short GitHub write-ups (#19891) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/skills/pr-description/SKILL.md | 98 ++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 .github/skills/pr-description/SKILL.md diff --git a/.github/skills/pr-description/SKILL.md b/.github/skills/pr-description/SKILL.md new file mode 100644 index 00000000000..9cd0918015e --- /dev/null +++ b/.github/skills/pr-description/SKILL.md @@ -0,0 +1,98 @@ +--- +name: pr-description +description: Use when drafting, proposing, creating, or editing prose for a dotnet/fsharp GitHub PR or issue — body, title, comment, review summary, edits — including bare asks like "open a PR", "ship this", "write up what I did", "summarise the change", "reply on the PR", "edit the issue body", "gh pr create", "gh pr comment", "gh pr edit --body", "gh issue comment", "gh pr review --body". Primary use case is PR descriptions; same rules apply to PR/issue comments and review summaries. Not for labels, reviewers, merging, or code-review findings (just the prose write-up of them). +--- + +# Authoring GitHub Prose for dotnet/fsharp + +Reviewers can already see the Files tab, the commit log, and the issue thread. Say what behavior changed and why, in as few words as possible. + +## Rules + +Rules 1, 2, 4, 5 are defaults; if the user insists, push back once then comply. Rule 3 is non-negotiable — `-b "..."` ships broken markdown (see PR #19866). + +1. **No change inventory.** No file/module/method/test lists. No `## Changes`/`## Implementation` section. Mention an identifier only when it *is* the user-visible behavior. Whatever the reader already has (Files tab for PRs, commit log for follow-up comments, issue history for issue edits) — don't re-list it. +2. **No LLM slop, no justification scaffolding.** No emoji headers, no "TL;DR" above a 3-line body, no Motivation/Background/Approach/Testing sections, no re-stating the title or the comment you're replying to. No "matching the X norm", no "preventing the Y failure (PR #ZZZZ)", no stats, no links to past PRs as proof. The diff is the proof. +3. **Body via `--body-file`, built without shell expansion.** Write the file with your file-creation/edit tool (it writes bytes verbatim — no `$`/backtick evaluation, no delimiter collisions, OS-agnostic). Never `-b "..."` / `--body "..."` — backticks and `$` get shell-evaluated and the render breaks. If you build the file in a shell, use a pwsh verbatim here-string `@'...'@` (cross-platform; single-quoted is mandatory). Applies to `gh pr create/edit/comment/review`, `gh issue create/edit/comment`. +4. **`Fixes #N` to close issues.** Use only when the PR actually closes #N (auto-closes on merge). It is the highest-value line in most PR bodies — never omit it when valid. No "Related to" / speculative links. Preserve existing trailers (`Co-authored-by:`, `Signed-off-by:`, `Reverts #N`); don't invent them. +5. **Title:** imperative, ≤72 chars, no trailing period, no `fix:`/`feat:` prefix. Name the behavior, not the file. A specific title lets the body shrink to `Fixes #N` + one sentence. + +## PR-body shapes (pick the smallest that carries the signal) + +**One-liner** for bumps / mechanical fixes: +~~~ +Update .NET SDK from 10.0.202 to 10.0.204. +~~~ + +**Title carries the construct + issue link** — preferred when the title is specific: +~~~ +Fixes #18009 + +Wrong colorization when a qualified type name with generic parameters +is used in a static member access expression. +~~~ + +**Issue link + 1-sentence why** — the most common non-trivial shape: +~~~ +Fixes #19751 + +`--refout` MVIDs were unstable because hashing relied on per-process +string randomization. Switched to a deterministic hash. +~~~ + +**Before/After code block** — when prose loses information; ≤15 lines, language tag: +~~~markdown +Fixes #15803 + +```fsharp +let f (x: int) = x <- 1 +// before: FS0027 suggested `let mutable x = expression` (illegal for parameters) +// after: FS0027 suggests `let mutable x = x` shadow or `byref<_>` +``` +~~~ + +**Behavior-changes bullet list** — for genuinely multi-behavior PRs. 3–5 bullets naming *behaviors*, never files/modules; if bullets map 1:1 to files, collapse to prose or split the PR: +~~~ +Fixes #19710 +Fixes #19720 + +- `match x with null` now preserves type aliases. +- FS0027 on parameters suggests `let mutable x = x` shadow / `byref<_>`. +- `let _ = &expr` compiles like `let x = &expr`. +~~~ + +Prefer inline backticks for short identifiers over a fenced block. Fenced blocks are the exception — use only when prose loses information. + +**Comments / review summaries:** same rules, no title. Usually 1–3 sentences. Quote-reply only the line you're responding to; don't restate it. + +## Workflow + +Show the title + body (or comment text) in chat first. **Do not run `gh` until the user approves.** Then: + +1. **Write the body to a file** with your file-creation tool (bytes verbatim, OS-agnostic, avoids every shell-quoting trap). Or in pwsh: + + ```powershell + @' + Fix false-positive FS3261 when nullness narrowing leaks across iterations + of seq/list/array comprehensions. + + Fixes #19644 + '@ | Set-Content -NoNewline pr-body.md + ``` + +2. **Post** with exactly one: + + ``` + gh pr create --title "" --body-file pr-body.md + gh pr edit --body-file pr-body.md # REPLACES body — read first if extending + gh pr comment --body-file pr-body.md + gh pr review --body-file pr-body.md --comment # or --approve / --request-changes + gh issue create --title "" --body-file pr-body.md + gh issue edit --body-file pr-body.md + gh issue comment --body-file pr-body.md + ``` + + To extend without losing the existing body: + `gh pr view --json body -q .body > pr-body.md` → edit → `gh pr edit --body-file pr-body.md`. + +3. **Verify** the live render — fetch the body and compare to the file with your view/diff tool. Fail loudly if `gh` fetch errors (a piped failure prints an "all-deleted" diff that misreads as "GitHub mangled it"). From d0e593f67117a8ce97233f62b3d1b984b23c8e49 Mon Sep 17 00:00:00 2001 From: Eugene Auduchinok Date: Mon, 8 Jun 2026 13:11:23 +0200 Subject: [PATCH 62/72] Debug: rework `for` expressions stepping (#19894) * Sequence points: rework `for` stepping Step a for-each loop in source order: stop on the enumerable, then the element binding (covering `for `), then the body; "getting the next element" is hidden. Add a sequence-point baseline test helper. Co-Authored-By: Claude Opus 4.8 (1M context) * Release notes * Update baselines --------- Co-authored-by: Claude Opus 4.8 (1M context) --- .../.FSharp.Compiler.Service/11.0.100.md | 1 + .../Checking/Expressions/CheckExpressions.fs | 18 +- .../Expressions/CheckSequenceExpressions.fs | 4 +- src/Compiler/CodeGen/IlxGen.fs | 13 +- .../Optimize/LowerComputedCollections.fs | 23 +- src/Compiler/Optimize/Optimizer.fs | 13 +- .../TypedTree/TypedTreeOps.Transforms.fs | 34 +- src/Compiler/pars.fsy | 2 +- .../Debugger/CEDebugPoints.fs | 2 +- .../Debugger/ForArrowDebugPoints.fs | 2 +- .../ForNInRangeArrays.fs.il.bsl | 430 ++++++++-------- .../ForNInRangeLists.fs.il.bsl | 262 +++++----- .../GeneratedIterators/GenIter01.fs.il.bsl | 6 +- .../GeneratedIterators/GenIter02.fs.il.bsl | 6 +- .../GeneratedIterators/GenIter03.fs.il.bsl | 6 +- ...nIter04.fs.RealInternalSignatureOff.il.bsl | 6 +- ...enIter04.fs.RealInternalSignatureOn.il.bsl | 6 +- .../Misc/NoBoxingOnDispose01.fs.il.net472.bsl | 35 +- .../NoBoxingOnDispose01.fs.il.netcore.bsl | 35 +- ...fs.RealInternalSignatureOff.il.netcore.bsl | 6 +- ....fs.RealInternalSignatureOn.il.netcore.bsl | 6 +- .../Array - Body - MultipleStatements 01.bsl | 37 ++ .../Array - Body - SingleStatement 01.bsl | 31 ++ ...ay - Comprehensions - ActivePattern 01.bsl | 58 +++ .../Array - Comprehensions - Arrow 01.bsl | 50 ++ .../Array - Comprehensions - Tuple 01.bsl | 50 ++ .../Array - Comprehensions - Tuple 02.bsl | 54 ++ .../Array - Comprehensions - Value 01.bsl | 54 ++ .../Array - Comprehensions - Value 02.bsl | 50 ++ .../Array - Pattern - ActivePattern 01.bsl | 40 ++ .../ForEach/Array - Pattern - Tuple 01.bsl | 36 ++ .../ForEach/Array - Simple 01.bsl | 30 ++ .../ForEach/List - Body - LetUnit 01.bsl | 31 ++ .../List - Body - MultipleStatements 01.bsl | 35 ++ .../ForEach/List - Body - ParenUnit 01.bsl | 28 ++ .../List - Body - SequentialUnits 01.bsl | 31 ++ .../List - Body - SingleStatement 01.bsl | 29 ++ ...st - Comprehensions - ActivePattern 01.bsl | 44 ++ .../List - Comprehensions - Arrow 01.bsl | 34 ++ .../List - Comprehensions - Tuple 01.bsl | 34 ++ .../List - Comprehensions - Tuple 02.bsl | 40 ++ .../List - Comprehensions - Value 01.bsl | 47 ++ .../List - Comprehensions - Value 02.bsl | 34 ++ .../List - Pattern - ActivePattern 01.bsl | 38 ++ .../ForEach/List - Pattern - Tuple 01.bsl | 34 ++ .../ForEach/List - Simple 01.bsl | 28 ++ .../Seq - Body - MultipleStatements 01.bsl | 47 ++ .../Seq - Body - SingleStatement 01.bsl | 41 ++ ...eq - Comprehensions - ActivePattern 01.bsl | 211 ++++++++ .../Seq - Comprehensions - Arrow 01.bsl | 203 ++++++++ .../Seq - Comprehensions - Tuple 01.bsl | 203 ++++++++ .../Seq - Comprehensions - Tuple 02.bsl | 207 ++++++++ .../Seq - Comprehensions - Value 01.bsl | 213 ++++++++ .../Seq - Comprehensions - Value 02.bsl | 203 ++++++++ .../Seq - Pattern - ActivePattern 01.bsl | 50 ++ .../ForEach/Seq - Pattern - Tuple 01.bsl | 46 ++ .../ForEach/Seq - Simple 01.bsl | 40 ++ .../String - Body - SingleStatement 01.bsl | 38 ++ .../Function/Body - LetThenValue 01.bsl | 8 + .../Function/Body - SequentialUnits 01.bsl | 6 + .../Function/Body - Unit 01.bsl | 3 + .../SequencePoints/SequencePointsTests.fs | 472 ++++++++++++++++++ .../SteppingMatch/SteppingMatch08.fs.il.bsl | 4 +- .../FSharp.Compiler.ComponentTests.fsproj | 1 + .../ExprTests.fs | 2 +- .../StructureTests.fs | 2 +- tests/FSharp.Test.Utilities/Compiler.fs | 134 ++++- .../EmittedIL/ComputedListExpressions.fs | 6 +- .../Expression/List - Comprehension 01.fs.bsl | 2 +- .../Expression/List - Comprehension 02.fs.bsl | 2 +- 70 files changed, 3560 insertions(+), 477 deletions(-) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Body - MultipleStatements 01.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Body - SingleStatement 01.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - ActivePattern 01.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - Arrow 01.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - Tuple 01.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - Tuple 02.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - Value 01.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - Value 02.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Pattern - ActivePattern 01.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Pattern - Tuple 01.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Simple 01.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - LetUnit 01.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - MultipleStatements 01.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - ParenUnit 01.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - SequentialUnits 01.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - SingleStatement 01.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Comprehensions - ActivePattern 01.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Comprehensions - Arrow 01.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Comprehensions - Tuple 01.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Comprehensions - Tuple 02.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Comprehensions - Value 01.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Comprehensions - Value 02.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Pattern - ActivePattern 01.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Pattern - Tuple 01.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Simple 01.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Body - MultipleStatements 01.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Body - SingleStatement 01.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - ActivePattern 01.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Arrow 01.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Tuple 01.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Tuple 02.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Value 01.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Value 02.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Pattern - ActivePattern 01.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Pattern - Tuple 01.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Simple 01.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/String - Body - SingleStatement 01.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - LetThenValue 01.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - SequentialUnits 01.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - Unit 01.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/SequencePointsTests.fs diff --git a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md index 9509ac72a3a..965957dbc0c 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md +++ b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md @@ -81,6 +81,7 @@ * Added warning FS3884 when a function or delegate value is used as an interpolated string argument. ([PR #19289](https://github.com/dotnet/fsharp/pull/19289)) * Symbols: add ObsoleteDiagnosticInfo ([PR #19359](https://github.com/dotnet/fsharp/pull/19359)) * Add `#version;;` directive to F# Interactive to display version and environment information. ([Issue #13307](https://github.com/dotnet/fsharp/issues/13307), [PR #19332](https://github.com/dotnet/fsharp/pull/19332)) +* Debug: rework for expressions stepping ([PR #19894](https://github.com/dotnet/fsharp/pull/19894)) ### Changed diff --git a/src/Compiler/Checking/Expressions/CheckExpressions.fs b/src/Compiler/Checking/Expressions/CheckExpressions.fs index f6e0a61663f..4932830a352 100644 --- a/src/Compiler/Checking/Expressions/CheckExpressions.fs +++ b/src/Compiler/Checking/Expressions/CheckExpressions.fs @@ -8270,8 +8270,8 @@ and TcForEachExpr cenv overallTy env tpenv (seqExprOnly, isFromSource, synPat, s let mEnumExpr = synEnumExpr.Range let mFor = match spFor with DebugPointAtFor.Yes mStart -> mStart | DebugPointAtFor.No -> mEnumExpr let mIn = match spIn with DebugPointAtInOrTo.Yes mStart -> mStart | DebugPointAtInOrTo.No -> mBodyExpr - let spEnumExpr = DebugPointAtBinding.Yes mEnumExpr - let spForBind = match spFor with DebugPointAtFor.Yes m -> DebugPointAtBinding.Yes m | DebugPointAtFor.No -> DebugPointAtBinding.NoneAtSticky + let spEnumExpr = match spFor with DebugPointAtFor.Yes _ -> DebugPointAtBinding.Yes mEnumExpr | DebugPointAtFor.No -> DebugPointAtBinding.NoneAtSticky + let spForBind = match spFor with DebugPointAtFor.Yes _ -> DebugPointAtBinding.Yes(unionRanges mFor mPat) | DebugPointAtFor.No -> DebugPointAtBinding.NoneAtInvisible let spInAsWhile = match spIn with DebugPointAtInOrTo.Yes m -> DebugPointAtWhile.Yes m | DebugPointAtInOrTo.No -> DebugPointAtWhile.No // Check the expression being enumerated @@ -8295,10 +8295,10 @@ and TcForEachExpr cenv overallTy env tpenv (seqExprOnly, isFromSource, synPat, s let elemTy = destArrayTy g enumExprTy // Evaluate the array index lookup - let bodyExprFixup elemVar bodyExpr = mkInvisibleLet mIn elemVar (mkLdelem g mIn elemTy arrExpr idxExpr) bodyExpr + let bodyExprFixup elemVar bodyExpr = mkLet spForBind mFor elemVar (mkLdelem g mIn elemTy arrExpr idxExpr) bodyExpr // Evaluate the array expression once and put it in arrVar - let overallExprFixup overallExpr = mkLet spForBind mFor arrVar enumExpr overallExpr + let overallExprFixup overallExpr = mkLet spEnumExpr mEnumExpr arrVar enumExpr overallExpr // Ask for a loop over integers for the given range (elemTy, bodyExprFixup, overallExprFixup, Choice2Of3 (idxVar, mkZero g mFor, mkDecr g mFor (mkLdlen g mFor arrExpr))) @@ -8316,12 +8316,12 @@ and TcForEachExpr cenv overallTy env tpenv (seqExprOnly, isFromSource, synPat, s // Evaluate the span index lookup let bodyExprFixup elemVar bodyExpr = let elemAddrVar, _ = mkCompGenLocal mIn "addr" elemAddrTy - let e = mkInvisibleLet mIn elemVar (mkAddrGet mIn (mkLocalValRef elemAddrVar)) bodyExpr + let e = mkLet spForBind mFor elemVar (mkAddrGet mIn (mkLocalValRef elemAddrVar)) bodyExpr let getItemCallExpr, _ = BuildMethodCall tcVal g cenv.amap PossiblyMutates mWholeExpr true getItemMethInfo ValUseFlag.NormalValUse [] [ spanExpr ] [ idxExpr ] None mkInvisibleLet mIn elemAddrVar getItemCallExpr e // Evaluate the span expression once and put it in spanVar - let overallExprFixup overallExpr = mkLet spForBind mFor spanVar enumExpr overallExpr + let overallExprFixup overallExpr = mkLet spEnumExpr mEnumExpr spanVar enumExpr overallExpr let getLengthCallExpr, _ = BuildMethodCall tcVal g cenv.amap PossiblyMutates mWholeExpr true getLengthMethInfo ValUseFlag.NormalValUse [] [ spanExpr ] [] None @@ -8410,13 +8410,13 @@ and TcForEachExpr cenv overallTy env tpenv (seqExprOnly, isFromSource, synPat, s | Choice3Of3(enumerableVar, enumeratorVar, _, getEnumExpr, _, guardExpr, currentExpr) -> // This compiled for must be matched EXACTLY by CompiledForEachExpr - mkLet spForBind mFor enumerableVar enumExpr - (mkLet spEnumExpr mFor enumeratorVar getEnumExpr + mkLet spEnumExpr mEnumExpr enumerableVar enumExpr + (mkInvisibleLet mFor enumeratorVar getEnumExpr (mkTryFinally g (mkWhile g (spInAsWhile, WhileLoopForCompiledForEachExprMarker, guardExpr, - mkInvisibleLet mIn elemVar currentExpr bodyExpr, + mkLet spForBind mIn elemVar currentExpr bodyExpr, mFor), BuildDisposableCleanup cenv env mWholeExpr enumeratorVar, mFor, g.unit_ty, DebugPointAtTry.No, DebugPointAtFinally.No))) diff --git a/src/Compiler/Checking/Expressions/CheckSequenceExpressions.fs b/src/Compiler/Checking/Expressions/CheckSequenceExpressions.fs index 86bf635d58a..a43b234fd90 100644 --- a/src/Compiler/Checking/Expressions/CheckSequenceExpressions.fs +++ b/src/Compiler/Checking/Expressions/CheckSequenceExpressions.fs @@ -387,7 +387,7 @@ let TcSequenceExpression (cenv: TcFileState) env tpenv comp (overallTy: OverallT Some(resultExpr, tpenv) - | SynExpr.YieldOrReturn(flags = (isYield, _); expr = synYieldExpr; trivia = { YieldOrReturnKeyword = m }) -> + | SynExpr.YieldOrReturn(flags = (isYield, _); expr = synYieldExpr; range = m) -> let env = { env with eIsControlFlow = false } let genResultTy = NewInferenceType g @@ -404,7 +404,7 @@ let TcSequenceExpression (cenv: TcFileState) env tpenv comp (overallTy: OverallT if IsControlFlowExpression synYieldExpr then resultExpr else - mkDebugPoint synYieldExpr.Range resultExpr + mkDebugPoint m resultExpr Some(resultExpr, tpenv) diff --git a/src/Compiler/CodeGen/IlxGen.fs b/src/Compiler/CodeGen/IlxGen.fs index 46b0726fc61..46959e56b22 100644 --- a/src/Compiler/CodeGen/IlxGen.fs +++ b/src/Compiler/CodeGen/IlxGen.fs @@ -3172,7 +3172,11 @@ and GenExprAux (cenv: cenv) (cgbuf: CodeGenBuffer) eenv expr (sequel: sequel) = | Expr.Match _ -> GenLinearExpr cenv cgbuf eenv expr sequel false id |> ignore | Expr.DebugPoint(DebugPointAtLeafExpr.Yes m, innerExpr) -> - CG.EmitDebugPoint cgbuf m + if equals m range0 then + cgbuf.EmitStartOfHiddenCode() + else + CG.EmitDebugPoint cgbuf m + GenExpr cenv cgbuf eenv innerExpr sequel | Expr.Const(c, m, ty) -> GenConstant cenv cgbuf eenv (c, m, ty) sequel @@ -3733,7 +3737,11 @@ and GenLinearExpr cenv cgbuf eenv expr sequel preSteps (contf: FakeUnit -> FakeU Fake)) | Expr.DebugPoint(DebugPointAtLeafExpr.Yes m, innerExpr) -> - CG.EmitDebugPoint cgbuf m + if equals m range0 then + cgbuf.EmitStartOfHiddenCode() + else + CG.EmitDebugPoint cgbuf m + GenLinearExpr cenv cgbuf eenv innerExpr sequel true contf | LinearOpExpr(TOp.UnionCase c, tyargs, argsFront, argLast, m) -> @@ -5280,6 +5288,7 @@ and GenIntegerForLoop cenv cgbuf eenv (spFor, spTo, v, e1, dir, e2, loopBody, m) GenExpr cenv cgbuf eenvinner loopBody discard // v++ or v-- + cgbuf.EmitStartOfHiddenCode() GenGetLocalVal cenv cgbuf eenvinner e2.Range v None CG.EmitInstr cgbuf (pop 0) (Push [ g.ilg.typ_Int32 ]) (mkLdcInt32 1) diff --git a/src/Compiler/Optimize/LowerComputedCollections.fs b/src/Compiler/Optimize/LowerComputedCollections.fs index fa162fae7ca..896540b0ae6 100644 --- a/src/Compiler/Optimize/LowerComputedCollections.fs +++ b/src/Compiler/Optimize/LowerComputedCollections.fs @@ -339,12 +339,12 @@ module List = let loop = mkLoop (fun _idxVar loopVar -> - let body = - body - |> Option.map (fun (loopVal, body) -> mkInvisibleLet m loopVal loopVar body) - |> Option.defaultValue loopVar - - mkCallCollectorAdd tcVal g reader mBody collector body) + match body with + | Some (loopVal, body) -> + mkInvisibleLet m loopVal loopVar + (Expr.DebugPoint (DebugPointAtLeafExpr.Yes mFor, mkCallCollectorAdd tcVal g reader mBody collector body)) + | None -> + mkCallCollectorAdd tcVal g reader mBody collector loopVar) let close = mkCallCollectorClose tcVal g reader mBody collector mkSequential m loop close @@ -504,12 +504,13 @@ module Array = mkCompGenLetIn mFor "array" arrayTy (mkNewArray count) (fun (_, array) -> let loop = mkLoop (fun idxVar loopVar -> - let body = - body - |> Option.map (fun (loopVal, body) -> mkInvisibleLet mBody loopVal loopVar body) - |> Option.defaultValue loopVar + let mkStore elem = mkAsmExpr ([stelem], [], [array; convToNativeInt NoCheckOvf idxVar; elem], [], mBody) - mkAsmExpr ([stelem], [], [array; convToNativeInt NoCheckOvf idxVar; body], [], mBody)) + match body with + | Some (loopVal, body) -> + mkInvisibleLet mBody loopVal loopVar (Expr.DebugPoint (DebugPointAtLeafExpr.Yes mFor, mkStore body)) + | None -> + mkStore loopVar) mkSequential m loop array) diff --git a/src/Compiler/Optimize/Optimizer.fs b/src/Compiler/Optimize/Optimizer.fs index 3cbb574598c..a6fa90d1e3a 100644 --- a/src/Compiler/Optimize/Optimizer.fs +++ b/src/Compiler/Optimize/Optimizer.fs @@ -2873,11 +2873,14 @@ and OptimizeLinearExpr cenv env expr contf = let e1R, e1info = OptimizeExpr cenv env e1 OptimizeLinearExpr cenv env e2 (contf << (fun (e2R, e2info) -> - if (flag = NormalSeq) && - // Always eliminate '(); expr' sequences, even in debug code, to ensure that - // conditional method calls don't leave a dangling breakpoint (see FSharp 1.0 bug 6034) - (cenv.settings.EliminateSequential || (match stripDebugPoints e1R with Expr.Const (Const.Unit, _, _) -> true | _ -> false)) && - not e1info.HasEffect then + if (flag = NormalSeq) && + // Drop bare (compiler-generated) units always; keep a debug-pointed unit in debug code so + // it stays steppable (a unit without one must go, else a dangling breakpoint - FSharp 1.0 bug 6034). + (cenv.settings.EliminateSequential || + (match e1R with + | Expr.DebugPoint(DebugPointAtLeafExpr.Yes _, _) -> false + | _ -> match stripDebugPoints e1R with Expr.Const (Const.Unit, _, _) -> true | _ -> false)) && + not e1info.HasEffect then e2R, e2info else Expr.Sequential (e1R, e2R, flag, m), diff --git a/src/Compiler/TypedTree/TypedTreeOps.Transforms.fs b/src/Compiler/TypedTree/TypedTreeOps.Transforms.fs index d9503800020..a676cc3e6dd 100644 --- a/src/Compiler/TypedTree/TypedTreeOps.Transforms.fs +++ b/src/Compiler/TypedTree/TypedTreeOps.Transforms.fs @@ -1254,7 +1254,7 @@ module internal TupleCompilation = Let(enumeratorVar, GetEnumeratorCall enumerableVar2, _enumeratorBind, - TryFinally(WhileLoopForCompiledForEachExpr(spInWhile, _, (Let(elemVar, _, _, bodyExpr) as elemLet), _), _))) when + TryFinally(WhileLoopForCompiledForEachExpr(spInWhile, _, (Let(elemVar, _, spElem, bodyExpr) as elemLet), _), _))) when // Apply correctness conditions to ensure this really is a compiled for-each expression. valRefEq g (mkLocalValRef enumerableVar) enumerableVar2 && enumerableVar.IsCompilerGenerated @@ -1271,7 +1271,7 @@ module internal TupleCompilation = let mIn = elemLet.Range let mFor = - match spFor with + match spElem with | DebugPointAtBinding.Yes mFor -> mFor | _ -> enumerableExpr.Range @@ -1287,7 +1287,7 @@ module internal TupleCompilation = let enumerableTy = tyOfExpr g enumerableExpr - ValueSome(enumerableTy, enumerableExpr, elemVar, bodyExpr, (mBody, spFor, spIn, mFor, mIn, spInWhile, mWholeExpr)) + ValueSome(enumerableTy, enumerableExpr, elemVar, bodyExpr, (mBody, spFor, spElem, spIn, mFor, mIn, spInWhile, mWholeExpr)) | _ -> ValueNone [] @@ -2147,7 +2147,7 @@ module internal TupleCompilation = match option, expr with | _, CompiledInt32RangeForEachExpr g (startExpr, (1 | -1 as step), finishExpr, elemVar, bodyExpr, ranges) -> - let _mBody, spFor, spIn, _mFor, _mIn, _spInWhile, mWholeExpr = ranges + let _mBody, spFor, _spElem, spIn, _mFor, _mIn, _spInWhile, mWholeExpr = ranges let spFor = match spFor with @@ -2164,13 +2164,13 @@ module internal TupleCompilation = ValueNone) with | ValueSome(rangeTy, (start, step, finish)) -> - let mBody, _spFor, _spIn, mFor, mIn, spInWhile, _mWhole = ranges + let mBody, _spFor, _spElem, _spIn, mFor, mIn, spInWhile, _mWhole = ranges mkOptimizedRangeLoop g (mBody, mFor, mIn, spInWhile) (rangeTy, enumerableExpr) (start, step, finish) (fun _count mkLoop -> mkLoop (fun _idxVar loopVar -> mkInvisibleLet elemVar.Range elemVar loopVar bodyExpr)) | ValueNone -> - let mBody, spFor, spIn, mFor, mIn, spInWhile, mWholeExpr = ranges + let mBody, spFor, spElem, spIn, mFor, mIn, spInWhile, mWholeExpr = ranges if isStringTy g enumerableTy then // type is string, optimize for expression as: @@ -2189,7 +2189,7 @@ module internal TupleCompilation = let finishExpr = mkDecr g mFor lengthExpr // for compat reasons, loop item over string is sometimes object, not char let loopItemExpr = mkCoerceIfNeeded g elemVar.Type g.char_ty charExpr - let bodyExpr = mkInvisibleLet mIn elemVar loopItemExpr bodyExpr + let bodyExpr = mkLet spElem mFor elemVar loopItemExpr bodyExpr let forExpr = mkFastForLoop g (DebugPointAtFor.No, spIn, mWholeExpr, idxVar, startExpr, true, finishExpr, bodyExpr) @@ -2223,18 +2223,16 @@ module internal TupleCompilation = let tailOrNullExpr = mkUnionCaseFieldGetUnprovenViaExprAddr (currentExpr, g.cons_ucref, [ elemTy ], IndexTail, mIn) - let bodyExpr = - mkInvisibleLet + let loopStep = + mkSequential mIn - elemVar - headOrDefaultExpr - (mkSequential - mIn - bodyExpr - (mkSequential - mIn - (mkValSet mIn (mkLocalValRef currentVar) nextExpr) - (mkValSet mIn (mkLocalValRef nextVar) tailOrNullExpr))) + (mkValSet mIn (mkLocalValRef currentVar) nextExpr) + (mkValSet mIn (mkLocalValRef nextVar) tailOrNullExpr) + + let bodyAndStep = + mkSequential mIn bodyExpr (Expr.DebugPoint(DebugPointAtLeafExpr.Yes range0, loopStep)) + + let bodyExpr = mkLet spElem mFor elemVar headOrDefaultExpr bodyAndStep let expr = // let mutable current = enumerableExpr diff --git a/src/Compiler/pars.fsy b/src/Compiler/pars.fsy index bfeb413d3ca..01120123a36 100644 --- a/src/Compiler/pars.fsy +++ b/src/Compiler/pars.fsy @@ -5708,7 +5708,7 @@ arrowThenExprR: { let mArrow = rhs parseState 1 let expr = $2 mArrow let trivia: SynExprYieldOrReturnTrivia = { YieldOrReturnKeyword = mArrow } - SynExpr.YieldOrReturn((true, false), expr, (unionRanges mArrow expr.Range), trivia) } + SynExpr.YieldOrReturn((true, false), expr, expr.Range, trivia) } forLoopBinder: | parenPattern IN declExpr diff --git a/tests/FSharp.Compiler.ComponentTests/Debugger/CEDebugPoints.fs b/tests/FSharp.Compiler.ComponentTests/Debugger/CEDebugPoints.fs index 7c11ae49e20..a444c0dfc80 100644 --- a/tests/FSharp.Compiler.ComponentTests/Debugger/CEDebugPoints.fs +++ b/tests/FSharp.Compiler.ComponentTests/Debugger/CEDebugPoints.fs @@ -30,7 +30,7 @@ let a = seq { yield 42 } - """ "GenerateNext" [ (Line 6, Col 15, Line 6, Col 17) ] + """ "GenerateNext" [ (Line 6, Col 9, Line 6, Col 17) ] [] let ``ReturnFrom in async CE - debug point covers full expression`` () = diff --git a/tests/FSharp.Compiler.ComponentTests/Debugger/ForArrowDebugPoints.fs b/tests/FSharp.Compiler.ComponentTests/Debugger/ForArrowDebugPoints.fs index 08eabb2e9eb..455d974c6fa 100644 --- a/tests/FSharp.Compiler.ComponentTests/Debugger/ForArrowDebugPoints.fs +++ b/tests/FSharp.Compiler.ComponentTests/Debugger/ForArrowDebugPoints.fs @@ -56,7 +56,7 @@ let squares = [ (Line 4, Col 1, Line 7, Col 6) (Line 5, Col 5, Line 5, Col 8) (Line 5, Col 11, Line 5, Col 13) - (Line 6, Col 15, Line 6, Col 20) + (Line 6, Col 9, Line 6, Col 20) (Line 16707566, Col 0, Line 16707566, Col 0) ] diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForNInRangeArrays.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForNInRangeArrays.fs.il.bsl index f89e175d24e..89c764be9d5 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForNInRangeArrays.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForNInRangeArrays.fs.il.bsl @@ -407,11 +407,11 @@ IL_000e: stloc.2 IL_000f: br.s IL_0039 - IL_0011: ldloc.0 - IL_0012: ldloc.1 - IL_0013: conv.i - IL_0014: ldloc.2 - IL_0015: stloc.3 + IL_0011: ldloc.2 + IL_0012: stloc.3 + IL_0013: ldloc.0 + IL_0014: ldloc.1 + IL_0015: conv.i IL_0016: stloc.s V_4 IL_0018: stloc.s V_5 IL_001a: ldloc.s V_5 @@ -472,11 +472,11 @@ IL_000e: stloc.2 IL_000f: br.s IL_0049 - IL_0011: ldloc.0 - IL_0012: ldloc.1 - IL_0013: conv.i - IL_0014: ldloc.2 - IL_0015: stloc.3 + IL_0011: ldloc.2 + IL_0012: stloc.3 + IL_0013: ldloc.0 + IL_0014: ldloc.1 + IL_0015: conv.i IL_0016: stloc.s V_4 IL_0018: stloc.s V_5 IL_001a: ldloc.s V_5 @@ -607,11 +607,11 @@ IL_000e: stloc.2 IL_000f: br.s IL_0029 - IL_0011: ldloc.0 - IL_0012: ldloc.1 - IL_0013: conv.i - IL_0014: ldloc.2 - IL_0015: stloc.3 + IL_0011: ldloc.2 + IL_0012: stloc.3 + IL_0013: ldloc.0 + IL_0014: ldloc.1 + IL_0015: conv.i IL_0016: stloc.s V_4 IL_0018: stloc.s V_5 IL_001a: ldloc.s V_5 @@ -658,11 +658,11 @@ IL_000e: stloc.2 IL_000f: br.s IL_0029 - IL_0011: ldloc.0 - IL_0012: ldloc.1 - IL_0013: conv.i - IL_0014: ldloc.2 - IL_0015: stloc.3 + IL_0011: ldloc.2 + IL_0012: stloc.3 + IL_0013: ldloc.0 + IL_0014: ldloc.1 + IL_0015: conv.i IL_0016: stloc.s V_4 IL_0018: stloc.s V_5 IL_001a: ldloc.s V_5 @@ -711,11 +711,11 @@ IL_000e: stloc.2 IL_000f: br.s IL_0031 - IL_0011: ldloc.0 - IL_0012: ldloc.1 - IL_0013: conv.i - IL_0014: ldloc.2 - IL_0015: stloc.3 + IL_0011: ldloc.2 + IL_0012: stloc.3 + IL_0013: ldloc.0 + IL_0014: ldloc.1 + IL_0015: conv.i IL_0016: stloc.s V_4 IL_0018: stloc.s V_5 IL_001a: ldloc.s V_5 @@ -768,11 +768,11 @@ IL_000e: stloc.2 IL_000f: br.s IL_0031 - IL_0011: ldloc.0 - IL_0012: ldloc.1 - IL_0013: conv.i - IL_0014: ldloc.2 - IL_0015: stloc.3 + IL_0011: ldloc.2 + IL_0012: stloc.3 + IL_0013: ldloc.0 + IL_0014: ldloc.1 + IL_0015: conv.i IL_0016: stloc.s V_4 IL_0018: stloc.s V_5 IL_001a: ldloc.s V_5 @@ -827,11 +827,11 @@ IL_000e: stloc.2 IL_000f: br.s IL_0039 - IL_0011: ldloc.0 - IL_0012: ldloc.1 - IL_0013: conv.i - IL_0014: ldloc.2 - IL_0015: stloc.3 + IL_0011: ldloc.2 + IL_0012: stloc.3 + IL_0013: ldloc.0 + IL_0014: ldloc.1 + IL_0015: conv.i IL_0016: stloc.s V_4 IL_0018: stloc.s V_5 IL_001a: ldloc.s V_5 @@ -894,11 +894,11 @@ IL_000e: stloc.2 IL_000f: br.s IL_0049 - IL_0011: ldloc.0 - IL_0012: ldloc.1 - IL_0013: conv.i - IL_0014: ldloc.2 - IL_0015: stloc.3 + IL_0011: ldloc.2 + IL_0012: stloc.3 + IL_0013: ldloc.0 + IL_0014: ldloc.1 + IL_0015: conv.i IL_0016: stloc.s V_5 IL_0018: stloc.s V_6 IL_001a: ldloc.s V_6 @@ -971,11 +971,11 @@ IL_000e: stloc.2 IL_000f: br.s IL_0049 - IL_0011: ldloc.0 - IL_0012: ldloc.1 - IL_0013: conv.i - IL_0014: ldloc.2 - IL_0015: stloc.3 + IL_0011: ldloc.2 + IL_0012: stloc.3 + IL_0013: ldloc.0 + IL_0014: ldloc.1 + IL_0015: conv.i IL_0016: stloc.s V_4 IL_0018: stloc.s V_5 IL_001a: ldloc.s V_5 @@ -1119,11 +1119,11 @@ IL_000e: stloc.2 IL_000f: br.s IL_0029 - IL_0011: ldloc.0 - IL_0012: ldloc.1 - IL_0013: conv.i - IL_0014: ldloc.2 - IL_0015: stloc.3 + IL_0011: ldloc.2 + IL_0012: stloc.3 + IL_0013: ldloc.0 + IL_0014: ldloc.1 + IL_0015: conv.i IL_0016: stloc.s V_4 IL_0018: stloc.s V_5 IL_001a: ldloc.s V_5 @@ -1178,11 +1178,11 @@ IL_000e: stloc.2 IL_000f: br.s IL_0029 - IL_0011: ldloc.0 - IL_0012: ldloc.1 - IL_0013: conv.i - IL_0014: ldloc.2 - IL_0015: stloc.3 + IL_0011: ldloc.2 + IL_0012: stloc.3 + IL_0013: ldloc.0 + IL_0014: ldloc.1 + IL_0015: conv.i IL_0016: stloc.s V_4 IL_0018: stloc.s V_5 IL_001a: ldloc.s V_5 @@ -1229,11 +1229,11 @@ IL_000d: stloc.2 IL_000e: br.s IL_0028 - IL_0010: ldloc.0 - IL_0011: ldloc.1 - IL_0012: conv.i - IL_0013: ldloc.2 - IL_0014: stloc.3 + IL_0010: ldloc.2 + IL_0011: stloc.3 + IL_0012: ldloc.0 + IL_0013: ldloc.1 + IL_0014: conv.i IL_0015: stloc.s V_4 IL_0017: stloc.s V_5 IL_0019: ldloc.s V_5 @@ -1296,11 +1296,11 @@ IL_000f: stloc.2 IL_0010: br.s IL_002a - IL_0012: ldloc.0 - IL_0013: ldloc.1 - IL_0014: conv.i - IL_0015: ldloc.2 - IL_0016: stloc.3 + IL_0012: ldloc.2 + IL_0013: stloc.3 + IL_0014: ldloc.0 + IL_0015: ldloc.1 + IL_0016: conv.i IL_0017: stloc.s V_4 IL_0019: stloc.s V_5 IL_001b: ldloc.s V_5 @@ -1347,11 +1347,11 @@ IL_000e: stloc.2 IL_000f: br.s IL_002a - IL_0011: ldloc.0 - IL_0012: ldloc.1 - IL_0013: conv.i - IL_0014: ldloc.2 - IL_0015: stloc.3 + IL_0011: ldloc.2 + IL_0012: stloc.3 + IL_0013: ldloc.0 + IL_0014: ldloc.1 + IL_0015: conv.i IL_0016: stloc.s V_4 IL_0018: stloc.s V_5 IL_001a: ldloc.s V_5 @@ -1426,11 +1426,11 @@ IL_002c: stloc.s V_4 IL_002e: br.s IL_004d - IL_0030: ldloc.2 - IL_0031: ldloc.3 - IL_0032: conv.i - IL_0033: ldloc.s V_4 - IL_0035: stloc.s V_5 + IL_0030: ldloc.s V_4 + IL_0032: stloc.s V_5 + IL_0034: ldloc.2 + IL_0035: ldloc.3 + IL_0036: conv.i IL_0037: stloc.s V_6 IL_0039: stloc.s V_7 IL_003b: ldloc.s V_7 @@ -1504,11 +1504,11 @@ IL_002a: stloc.s V_4 IL_002c: br.s IL_004b - IL_002e: ldloc.2 - IL_002f: ldloc.3 - IL_0030: conv.i - IL_0031: ldloc.s V_4 - IL_0033: stloc.s V_5 + IL_002e: ldloc.s V_4 + IL_0030: stloc.s V_5 + IL_0032: ldloc.2 + IL_0033: ldloc.3 + IL_0034: conv.i IL_0035: stloc.s V_6 IL_0037: stloc.s V_7 IL_0039: ldloc.s V_7 @@ -1584,11 +1584,11 @@ IL_002a: stloc.s V_4 IL_002c: br.s IL_004b - IL_002e: ldloc.2 - IL_002f: ldloc.3 - IL_0030: conv.i - IL_0031: ldloc.s V_4 - IL_0033: stloc.s V_5 + IL_002e: ldloc.s V_4 + IL_0030: stloc.s V_5 + IL_0032: ldloc.2 + IL_0033: ldloc.3 + IL_0034: conv.i IL_0035: stloc.s V_6 IL_0037: stloc.s V_7 IL_0039: ldloc.s V_7 @@ -1662,11 +1662,11 @@ IL_002c: stloc.s V_4 IL_002e: br.s IL_004d - IL_0030: ldloc.2 - IL_0031: ldloc.3 - IL_0032: conv.i - IL_0033: ldloc.s V_4 - IL_0035: stloc.s V_5 + IL_0030: ldloc.s V_4 + IL_0032: stloc.s V_5 + IL_0034: ldloc.2 + IL_0035: ldloc.3 + IL_0036: conv.i IL_0037: stloc.s V_6 IL_0039: stloc.s V_7 IL_003b: ldloc.s V_7 @@ -1786,11 +1786,11 @@ IL_005f: stloc.s V_4 IL_0061: br.s IL_0080 - IL_0063: ldloc.2 - IL_0064: ldloc.3 - IL_0065: conv.i - IL_0066: ldloc.s V_4 - IL_0068: stloc.s V_5 + IL_0063: ldloc.s V_4 + IL_0065: stloc.s V_5 + IL_0067: ldloc.2 + IL_0068: ldloc.3 + IL_0069: conv.i IL_006a: stloc.s V_6 IL_006c: stloc.s V_7 IL_006e: ldloc.s V_7 @@ -1864,11 +1864,11 @@ IL_002a: stloc.s V_4 IL_002c: br.s IL_004b - IL_002e: ldloc.2 - IL_002f: ldloc.3 - IL_0030: conv.i - IL_0031: ldloc.s V_4 - IL_0033: stloc.s V_5 + IL_002e: ldloc.s V_4 + IL_0030: stloc.s V_5 + IL_0032: ldloc.2 + IL_0033: ldloc.3 + IL_0034: conv.i IL_0035: stloc.s V_6 IL_0037: stloc.s V_7 IL_0039: ldloc.s V_7 @@ -1990,11 +1990,11 @@ IL_005f: stloc.s V_4 IL_0061: br.s IL_0080 - IL_0063: ldloc.2 - IL_0064: ldloc.3 - IL_0065: conv.i - IL_0066: ldloc.s V_4 - IL_0068: stloc.s V_5 + IL_0063: ldloc.s V_4 + IL_0065: stloc.s V_5 + IL_0067: ldloc.2 + IL_0068: ldloc.3 + IL_0069: conv.i IL_006a: stloc.s V_6 IL_006c: stloc.s V_7 IL_006e: ldloc.s V_7 @@ -2070,11 +2070,11 @@ IL_002a: stloc.s V_4 IL_002c: br.s IL_004b - IL_002e: ldloc.2 - IL_002f: ldloc.3 - IL_0030: conv.i - IL_0031: ldloc.s V_4 - IL_0033: stloc.s V_5 + IL_002e: ldloc.s V_4 + IL_0030: stloc.s V_5 + IL_0032: ldloc.2 + IL_0033: ldloc.3 + IL_0034: conv.i IL_0035: stloc.s V_6 IL_0037: stloc.s V_7 IL_0039: ldloc.s V_7 @@ -2196,11 +2196,11 @@ IL_005a: stloc.s V_4 IL_005c: br.s IL_007b - IL_005e: ldloc.2 - IL_005f: ldloc.3 - IL_0060: conv.i - IL_0061: ldloc.s V_4 - IL_0063: stloc.s V_5 + IL_005e: ldloc.s V_4 + IL_0060: stloc.s V_5 + IL_0062: ldloc.2 + IL_0063: ldloc.3 + IL_0064: conv.i IL_0065: stloc.s V_6 IL_0067: stloc.s V_7 IL_0069: ldloc.s V_7 @@ -2324,11 +2324,11 @@ IL_005a: stloc.s V_4 IL_005c: br.s IL_007b - IL_005e: ldloc.2 - IL_005f: ldloc.3 - IL_0060: conv.i - IL_0061: ldloc.s V_4 - IL_0063: stloc.s V_5 + IL_005e: ldloc.s V_4 + IL_0060: stloc.s V_5 + IL_0062: ldloc.2 + IL_0063: ldloc.3 + IL_0064: conv.i IL_0065: stloc.s V_6 IL_0067: stloc.s V_7 IL_0069: ldloc.s V_7 @@ -2406,11 +2406,11 @@ IL_0034: stloc.s V_5 IL_0036: br.s IL_0058 - IL_0038: ldloc.3 - IL_0039: ldloc.s V_4 - IL_003b: conv.i - IL_003c: ldloc.s V_5 - IL_003e: stloc.s V_6 + IL_0038: ldloc.s V_5 + IL_003a: stloc.s V_6 + IL_003c: ldloc.3 + IL_003d: ldloc.s V_4 + IL_003f: conv.i IL_0040: stloc.s V_7 IL_0042: stloc.s V_8 IL_0044: ldloc.s V_8 @@ -2488,11 +2488,11 @@ IL_0032: stloc.s V_5 IL_0034: br.s IL_0056 - IL_0036: ldloc.3 - IL_0037: ldloc.s V_4 - IL_0039: conv.i - IL_003a: ldloc.s V_5 - IL_003c: stloc.s V_6 + IL_0036: ldloc.s V_5 + IL_0038: stloc.s V_6 + IL_003a: ldloc.3 + IL_003b: ldloc.s V_4 + IL_003d: conv.i IL_003e: stloc.s V_7 IL_0040: stloc.s V_8 IL_0042: ldloc.s V_8 @@ -2577,11 +2577,11 @@ IL_003b: stloc.s V_6 IL_003d: br.s IL_0060 - IL_003f: ldloc.s V_4 - IL_0041: ldloc.s V_5 - IL_0043: conv.i - IL_0044: ldloc.s V_6 - IL_0046: stloc.s V_7 + IL_003f: ldloc.s V_6 + IL_0041: stloc.s V_7 + IL_0043: ldloc.s V_4 + IL_0045: ldloc.s V_5 + IL_0047: conv.i IL_0048: stloc.s V_8 IL_004a: stloc.s V_9 IL_004c: ldloc.s V_9 @@ -2659,11 +2659,11 @@ IL_0034: stloc.s V_5 IL_0036: br.s IL_0058 - IL_0038: ldloc.3 - IL_0039: ldloc.s V_4 - IL_003b: conv.i - IL_003c: ldloc.s V_5 - IL_003e: stloc.s V_6 + IL_0038: ldloc.s V_5 + IL_003a: stloc.s V_6 + IL_003c: ldloc.3 + IL_003d: ldloc.s V_4 + IL_003f: conv.i IL_0040: stloc.s V_7 IL_0042: stloc.s V_8 IL_0044: ldloc.s V_8 @@ -2787,11 +2787,11 @@ IL_0067: stloc.s V_5 IL_0069: br.s IL_008b - IL_006b: ldloc.3 - IL_006c: ldloc.s V_4 - IL_006e: conv.i - IL_006f: ldloc.s V_5 - IL_0071: stloc.s V_6 + IL_006b: ldloc.s V_5 + IL_006d: stloc.s V_6 + IL_006f: ldloc.3 + IL_0070: ldloc.s V_4 + IL_0072: conv.i IL_0073: stloc.s V_7 IL_0075: stloc.s V_8 IL_0077: ldloc.s V_8 @@ -2869,11 +2869,11 @@ IL_0032: stloc.s V_5 IL_0034: br.s IL_0056 - IL_0036: ldloc.3 - IL_0037: ldloc.s V_4 - IL_0039: conv.i - IL_003a: ldloc.s V_5 - IL_003c: stloc.s V_6 + IL_0036: ldloc.s V_5 + IL_0038: stloc.s V_6 + IL_003a: ldloc.3 + IL_003b: ldloc.s V_4 + IL_003d: conv.i IL_003e: stloc.s V_7 IL_0040: stloc.s V_8 IL_0042: ldloc.s V_8 @@ -3011,11 +3011,11 @@ IL_0076: stloc.s V_7 IL_0078: br.s IL_009b - IL_007a: ldloc.s V_5 - IL_007c: ldloc.s V_6 - IL_007e: conv.i - IL_007f: ldloc.s V_7 - IL_0081: stloc.s V_8 + IL_007a: ldloc.s V_7 + IL_007c: stloc.s V_8 + IL_007e: ldloc.s V_5 + IL_0080: ldloc.s V_6 + IL_0082: conv.i IL_0083: stloc.s V_9 IL_0085: stloc.s V_10 IL_0087: ldloc.s V_10 @@ -3140,11 +3140,11 @@ IL_005a: stloc.s V_4 IL_005c: br.s IL_0087 - IL_005e: ldloc.2 - IL_005f: ldloc.3 - IL_0060: conv.i - IL_0061: ldloc.s V_4 - IL_0063: stloc.s V_5 + IL_005e: ldloc.s V_4 + IL_0060: stloc.s V_5 + IL_0062: ldloc.2 + IL_0063: ldloc.3 + IL_0064: conv.i IL_0065: stloc.s V_6 IL_0067: stloc.s V_7 IL_0069: ldloc.s V_7 @@ -3273,11 +3273,11 @@ IL_005a: stloc.s V_4 IL_005c: br.s IL_0087 - IL_005e: ldloc.2 - IL_005f: ldloc.3 - IL_0060: conv.i - IL_0061: ldloc.s V_4 - IL_0063: stloc.s V_5 + IL_005e: ldloc.s V_4 + IL_0060: stloc.s V_5 + IL_0062: ldloc.2 + IL_0063: ldloc.3 + IL_0064: conv.i IL_0065: stloc.s V_6 IL_0067: stloc.s V_7 IL_0069: ldloc.s V_7 @@ -3407,11 +3407,11 @@ IL_005a: stloc.s V_4 IL_005c: br.s IL_0086 - IL_005e: ldloc.2 - IL_005f: ldloc.3 - IL_0060: conv.i - IL_0061: ldloc.s V_4 - IL_0063: stloc.s V_5 + IL_005e: ldloc.s V_4 + IL_0060: stloc.s V_5 + IL_0062: ldloc.2 + IL_0063: ldloc.3 + IL_0064: conv.i IL_0065: stloc.s V_6 IL_0067: stloc.s V_7 IL_0069: ldloc.s V_7 @@ -3476,11 +3476,11 @@ IL_001e: stloc.s V_4 IL_0020: br.s IL_0043 - IL_0022: ldloc.2 - IL_0023: ldloc.3 - IL_0024: conv.i - IL_0025: ldloc.s V_4 - IL_0027: stloc.s V_5 + IL_0022: ldloc.s V_4 + IL_0024: stloc.s V_5 + IL_0026: ldloc.2 + IL_0027: ldloc.3 + IL_0028: conv.i IL_0029: stloc.s V_6 IL_002b: stloc.s V_7 IL_002d: ldloc.s V_7 @@ -3543,11 +3543,11 @@ IL_001e: stloc.3 IL_001f: br.s IL_003d - IL_0021: ldloc.1 - IL_0022: ldloc.2 - IL_0023: conv.i - IL_0024: ldloc.3 - IL_0025: stloc.s V_4 + IL_0021: ldloc.3 + IL_0022: stloc.s V_4 + IL_0024: ldloc.1 + IL_0025: ldloc.2 + IL_0026: conv.i IL_0027: stloc.s V_5 IL_0029: stloc.s V_6 IL_002b: ldloc.s V_6 @@ -3607,11 +3607,11 @@ IL_001e: stloc.2 IL_001f: br.s IL_0039 - IL_0021: ldloc.0 - IL_0022: ldloc.1 - IL_0023: conv.i - IL_0024: ldloc.2 - IL_0025: stloc.3 + IL_0021: ldloc.2 + IL_0022: stloc.3 + IL_0023: ldloc.0 + IL_0024: ldloc.1 + IL_0025: conv.i IL_0026: stloc.s V_4 IL_0028: stloc.s V_5 IL_002a: ldloc.s V_5 @@ -3670,11 +3670,11 @@ IL_001e: stloc.3 IL_001f: br.s IL_003d - IL_0021: ldloc.1 - IL_0022: ldloc.2 - IL_0023: conv.i - IL_0024: ldloc.3 - IL_0025: stloc.s V_4 + IL_0021: ldloc.3 + IL_0022: stloc.s V_4 + IL_0024: ldloc.1 + IL_0025: ldloc.2 + IL_0026: conv.i IL_0027: stloc.s V_5 IL_0029: stloc.s V_6 IL_002b: ldloc.s V_6 @@ -3756,11 +3756,11 @@ IL_002a: stloc.s V_4 IL_002c: br.s IL_005d - IL_002e: ldloc.2 - IL_002f: ldloc.3 - IL_0030: conv.i - IL_0031: ldloc.s V_4 - IL_0033: stloc.s V_5 + IL_002e: ldloc.s V_4 + IL_0030: stloc.s V_5 + IL_0032: ldloc.2 + IL_0033: ldloc.3 + IL_0034: conv.i IL_0035: stloc.s V_6 IL_0037: stloc.s V_7 IL_0039: ldloc.s V_7 @@ -3870,11 +3870,11 @@ IL_0042: stloc.s V_6 IL_0044: br.s IL_0081 - IL_0046: ldloc.3 - IL_0047: ldloc.s V_5 - IL_0049: conv.i - IL_004a: ldloc.s V_6 - IL_004c: stloc.s V_7 + IL_0046: ldloc.s V_6 + IL_0048: stloc.s V_7 + IL_004a: ldloc.3 + IL_004b: ldloc.s V_5 + IL_004d: conv.i IL_004e: stloc.s V_8 IL_0050: stloc.s V_9 IL_0052: ldloc.s V_9 @@ -3931,11 +3931,11 @@ IL_009f: stloc.s V_6 IL_00a1: br.s IL_00d6 - IL_00a3: ldloc.3 - IL_00a4: ldloc.s V_10 - IL_00a6: conv.i - IL_00a7: ldloc.s V_6 - IL_00a9: stloc.s V_7 + IL_00a3: ldloc.s V_6 + IL_00a5: stloc.s V_7 + IL_00a7: ldloc.3 + IL_00a8: ldloc.s V_10 + IL_00aa: conv.i IL_00ab: stloc.s V_11 IL_00ad: stloc.s V_12 IL_00af: ldloc.s V_12 @@ -4047,11 +4047,11 @@ IL_0042: stloc.s V_6 IL_0044: br.s IL_0081 - IL_0046: ldloc.3 - IL_0047: ldloc.s V_5 - IL_0049: conv.i - IL_004a: ldloc.s V_6 - IL_004c: stloc.s V_7 + IL_0046: ldloc.s V_6 + IL_0048: stloc.s V_7 + IL_004a: ldloc.3 + IL_004b: ldloc.s V_5 + IL_004d: conv.i IL_004e: stloc.s V_8 IL_0050: stloc.s V_9 IL_0052: ldloc.s V_9 @@ -4108,11 +4108,11 @@ IL_009f: stloc.s V_7 IL_00a1: br.s IL_00d6 - IL_00a3: ldloc.3 - IL_00a4: ldloc.s V_6 - IL_00a6: conv.i - IL_00a7: ldloc.s V_7 - IL_00a9: stloc.s V_10 + IL_00a3: ldloc.s V_7 + IL_00a5: stloc.s V_10 + IL_00a7: ldloc.3 + IL_00a8: ldloc.s V_6 + IL_00aa: conv.i IL_00ab: stloc.s V_11 IL_00ad: stloc.s V_12 IL_00af: ldloc.s V_12 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForNInRangeLists.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForNInRangeLists.fs.il.bsl index 842035cf524..4f629775f5f 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForNInRangeLists.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForNInRangeLists.fs.il.bsl @@ -400,9 +400,9 @@ IL_0004: stloc.2 IL_0005: br.s IL_002b - IL_0007: ldloca.s V_0 - IL_0009: ldloc.2 - IL_000a: stloc.3 + IL_0007: ldloc.2 + IL_0008: stloc.3 + IL_0009: ldloca.s V_0 IL_000b: stloc.s V_4 IL_000d: ldloc.s V_4 IL_000f: ldarg.0 @@ -461,11 +461,11 @@ IL_000e: stloc.2 IL_000f: br.s IL_0049 - IL_0011: ldloc.0 - IL_0012: ldloc.1 - IL_0013: conv.i - IL_0014: ldloc.2 - IL_0015: stloc.3 + IL_0011: ldloc.2 + IL_0012: stloc.3 + IL_0013: ldloc.0 + IL_0014: ldloc.1 + IL_0015: conv.i IL_0016: stloc.s V_4 IL_0018: stloc.s V_5 IL_001a: ldloc.s V_5 @@ -590,9 +590,9 @@ IL_0004: stloc.2 IL_0005: br.s IL_001f - IL_0007: ldloca.s V_0 - IL_0009: ldloc.2 - IL_000a: stloc.3 + IL_0007: ldloc.2 + IL_0008: stloc.3 + IL_0009: ldloca.s V_0 IL_000b: stloc.s V_4 IL_000d: ldloc.s V_4 IL_000f: ldloc.3 @@ -633,9 +633,9 @@ IL_0004: stloc.2 IL_0005: br.s IL_001f - IL_0007: ldloca.s V_0 - IL_0009: ldloc.2 - IL_000a: stloc.3 + IL_0007: ldloc.2 + IL_0008: stloc.3 + IL_0009: ldloca.s V_0 IL_000b: stloc.s V_4 IL_000d: ldloc.s V_4 IL_000f: ldloc.3 @@ -677,9 +677,9 @@ IL_0004: stloc.2 IL_0005: br.s IL_0023 - IL_0007: ldloca.s V_0 - IL_0009: ldloc.2 - IL_000a: stloc.3 + IL_0007: ldloc.2 + IL_0008: stloc.3 + IL_0009: ldloca.s V_0 IL_000b: stloc.s V_4 IL_000d: ldloc.s V_4 IL_000f: stloc.s V_5 @@ -723,9 +723,9 @@ IL_0004: stloc.2 IL_0005: br.s IL_0023 - IL_0007: ldloca.s V_0 - IL_0009: ldloc.2 - IL_000a: stloc.3 + IL_0007: ldloc.2 + IL_0008: stloc.3 + IL_0009: ldloca.s V_0 IL_000b: stloc.s V_4 IL_000d: ldloc.s V_4 IL_000f: stloc.s V_5 @@ -770,9 +770,9 @@ IL_0004: stloc.2 IL_0005: br.s IL_0027 - IL_0007: ldloca.s V_0 - IL_0009: ldloc.2 - IL_000a: stloc.3 + IL_0007: ldloc.2 + IL_0008: stloc.3 + IL_0009: ldloca.s V_0 IL_000b: stloc.s V_4 IL_000d: ldloc.s V_4 IL_000f: stloc.s V_5 @@ -822,9 +822,9 @@ IL_0004: stloc.2 IL_0005: br.s IL_0037 - IL_0007: ldloca.s V_0 - IL_0009: ldloc.2 - IL_000a: stloc.3 + IL_0007: ldloc.2 + IL_0008: stloc.3 + IL_0009: ldloca.s V_0 IL_000b: stloc.s V_5 IL_000d: ldloc.s V_5 IL_000f: ldloc.3 @@ -884,9 +884,9 @@ IL_0004: stloc.2 IL_0005: br.s IL_0037 - IL_0007: ldloca.s V_0 - IL_0009: ldloc.2 - IL_000a: stloc.3 + IL_0007: ldloc.2 + IL_0008: stloc.3 + IL_0009: ldloca.s V_0 IL_000b: stloc.s V_4 IL_000d: ldloc.s V_4 IL_000f: ldarg.0 @@ -1019,9 +1019,9 @@ IL_0004: stloc.2 IL_0005: br.s IL_001f - IL_0007: ldloca.s V_0 - IL_0009: ldloc.2 - IL_000a: stloc.3 + IL_0007: ldloc.2 + IL_0008: stloc.3 + IL_0009: ldloca.s V_0 IL_000b: stloc.s V_4 IL_000d: ldloc.s V_4 IL_000f: ldloc.3 @@ -1070,9 +1070,9 @@ IL_0004: stloc.2 IL_0005: br.s IL_001f - IL_0007: ldloca.s V_0 - IL_0009: ldloc.2 - IL_000a: stloc.3 + IL_0007: ldloc.2 + IL_0008: stloc.3 + IL_0009: ldloca.s V_0 IL_000b: stloc.s V_4 IL_000d: ldloc.s V_4 IL_000f: ldloc.3 @@ -1113,9 +1113,9 @@ IL_0004: stloc.2 IL_0005: br.s IL_001f - IL_0007: ldloca.s V_0 - IL_0009: ldloc.2 - IL_000a: stloc.3 + IL_0007: ldloc.2 + IL_0008: stloc.3 + IL_0009: ldloca.s V_0 IL_000b: stloc.s V_4 IL_000d: ldloc.s V_4 IL_000f: ldloc.3 @@ -1172,9 +1172,9 @@ IL_0005: stloc.2 IL_0006: br.s IL_0020 - IL_0008: ldloca.s V_0 - IL_000a: ldloc.2 - IL_000b: stloc.3 + IL_0008: ldloc.2 + IL_0009: stloc.3 + IL_000a: ldloca.s V_0 IL_000c: stloc.s V_4 IL_000e: ldloc.s V_4 IL_0010: ldloc.3 @@ -1215,9 +1215,9 @@ IL_0005: stloc.2 IL_0006: br.s IL_0021 - IL_0008: ldloca.s V_0 - IL_000a: ldloc.2 - IL_000b: stloc.3 + IL_0008: ldloc.2 + IL_0009: stloc.3 + IL_000a: ldloca.s V_0 IL_000c: stloc.s V_4 IL_000e: ldloc.s V_4 IL_0010: ldloc.3 @@ -1278,9 +1278,9 @@ IL_0019: stloc.3 IL_001a: br.s IL_0036 - IL_001c: ldloca.s V_1 - IL_001e: ldloc.3 - IL_001f: stloc.s V_4 + IL_001c: ldloc.3 + IL_001d: stloc.s V_4 + IL_001f: ldloca.s V_1 IL_0021: stloc.s V_5 IL_0023: ldloc.s V_5 IL_0025: ldloc.s V_4 @@ -1340,9 +1340,9 @@ IL_0017: stloc.3 IL_0018: br.s IL_0034 - IL_001a: ldloca.s V_1 - IL_001c: ldloc.3 - IL_001d: stloc.s V_4 + IL_001a: ldloc.3 + IL_001b: stloc.s V_4 + IL_001d: ldloca.s V_1 IL_001f: stloc.s V_5 IL_0021: ldloc.s V_5 IL_0023: ldloc.s V_4 @@ -1403,9 +1403,9 @@ IL_0017: stloc.3 IL_0018: br.s IL_0034 - IL_001a: ldloca.s V_1 - IL_001c: ldloc.3 - IL_001d: stloc.s V_4 + IL_001a: ldloc.3 + IL_001b: stloc.s V_4 + IL_001d: ldloca.s V_1 IL_001f: stloc.s V_5 IL_0021: ldloc.s V_5 IL_0023: ldloc.s V_4 @@ -1465,9 +1465,9 @@ IL_0019: stloc.3 IL_001a: br.s IL_0036 - IL_001c: ldloca.s V_1 - IL_001e: ldloc.3 - IL_001f: stloc.s V_4 + IL_001c: ldloc.3 + IL_001d: stloc.s V_4 + IL_001f: ldloca.s V_1 IL_0021: stloc.s V_5 IL_0023: ldloc.s V_5 IL_0025: ldloc.s V_4 @@ -1573,9 +1573,9 @@ IL_004c: stloc.3 IL_004d: br.s IL_0069 - IL_004f: ldloca.s V_1 - IL_0051: ldloc.3 - IL_0052: stloc.s V_4 + IL_004f: ldloc.3 + IL_0050: stloc.s V_4 + IL_0052: ldloca.s V_1 IL_0054: stloc.s V_5 IL_0056: ldloc.s V_5 IL_0058: ldloc.s V_4 @@ -1635,9 +1635,9 @@ IL_0017: stloc.3 IL_0018: br.s IL_0034 - IL_001a: ldloca.s V_1 - IL_001c: ldloc.3 - IL_001d: stloc.s V_4 + IL_001a: ldloc.3 + IL_001b: stloc.s V_4 + IL_001d: ldloca.s V_1 IL_001f: stloc.s V_5 IL_0021: ldloc.s V_5 IL_0023: ldloc.s V_4 @@ -1744,9 +1744,9 @@ IL_004c: stloc.3 IL_004d: br.s IL_0069 - IL_004f: ldloca.s V_1 - IL_0051: ldloc.3 - IL_0052: stloc.s V_4 + IL_004f: ldloc.3 + IL_0050: stloc.s V_4 + IL_0052: ldloca.s V_1 IL_0054: stloc.s V_5 IL_0056: ldloc.s V_5 IL_0058: ldloc.s V_4 @@ -1807,9 +1807,9 @@ IL_0017: stloc.3 IL_0018: br.s IL_0034 - IL_001a: ldloca.s V_1 - IL_001c: ldloc.3 - IL_001d: stloc.s V_4 + IL_001a: ldloc.3 + IL_001b: stloc.s V_4 + IL_001d: ldloca.s V_1 IL_001f: stloc.s V_5 IL_0021: ldloc.s V_5 IL_0023: ldloc.s V_4 @@ -1916,9 +1916,9 @@ IL_0047: stloc.3 IL_0048: br.s IL_0064 - IL_004a: ldloca.s V_1 - IL_004c: ldloc.3 - IL_004d: stloc.s V_4 + IL_004a: ldloc.3 + IL_004b: stloc.s V_4 + IL_004d: ldloca.s V_1 IL_004f: stloc.s V_5 IL_0051: ldloc.s V_5 IL_0053: ldloc.s V_4 @@ -2029,9 +2029,9 @@ IL_0047: stloc.3 IL_0048: br.s IL_0064 - IL_004a: ldloca.s V_1 - IL_004c: ldloc.3 - IL_004d: stloc.s V_4 + IL_004a: ldloc.3 + IL_004b: stloc.s V_4 + IL_004d: ldloca.s V_1 IL_004f: stloc.s V_5 IL_0051: ldloc.s V_5 IL_0053: ldloc.s V_4 @@ -2095,9 +2095,9 @@ IL_0020: stloc.s V_4 IL_0022: br.s IL_0041 - IL_0024: ldloca.s V_2 - IL_0026: ldloc.s V_4 - IL_0028: stloc.s V_5 + IL_0024: ldloc.s V_4 + IL_0026: stloc.s V_5 + IL_0028: ldloca.s V_2 IL_002a: stloc.s V_6 IL_002c: ldloc.s V_6 IL_002e: ldloc.s V_5 @@ -2161,9 +2161,9 @@ IL_001e: stloc.s V_4 IL_0020: br.s IL_003f - IL_0022: ldloca.s V_2 - IL_0024: ldloc.s V_4 - IL_0026: stloc.s V_5 + IL_0022: ldloc.s V_4 + IL_0024: stloc.s V_5 + IL_0026: ldloca.s V_2 IL_0028: stloc.s V_6 IL_002a: ldloc.s V_6 IL_002c: ldloc.s V_5 @@ -2233,9 +2233,9 @@ IL_0027: stloc.s V_5 IL_0029: br.s IL_004a - IL_002b: ldloca.s V_3 - IL_002d: ldloc.s V_5 - IL_002f: stloc.s V_6 + IL_002b: ldloc.s V_5 + IL_002d: stloc.s V_6 + IL_002f: ldloca.s V_3 IL_0031: stloc.s V_7 IL_0033: ldloc.s V_7 IL_0035: ldloc.s V_6 @@ -2299,9 +2299,9 @@ IL_0020: stloc.s V_4 IL_0022: br.s IL_0041 - IL_0024: ldloca.s V_2 - IL_0026: ldloc.s V_4 - IL_0028: stloc.s V_5 + IL_0024: ldloc.s V_4 + IL_0026: stloc.s V_5 + IL_0028: ldloca.s V_2 IL_002a: stloc.s V_6 IL_002c: ldloc.s V_6 IL_002e: ldloc.s V_5 @@ -2411,9 +2411,9 @@ IL_0053: stloc.s V_4 IL_0055: br.s IL_0074 - IL_0057: ldloca.s V_2 - IL_0059: ldloc.s V_4 - IL_005b: stloc.s V_5 + IL_0057: ldloc.s V_4 + IL_0059: stloc.s V_5 + IL_005b: ldloca.s V_2 IL_005d: stloc.s V_6 IL_005f: ldloc.s V_6 IL_0061: ldloc.s V_5 @@ -2477,9 +2477,9 @@ IL_001e: stloc.s V_4 IL_0020: br.s IL_003f - IL_0022: ldloca.s V_2 - IL_0024: ldloc.s V_4 - IL_0026: stloc.s V_5 + IL_0022: ldloc.s V_4 + IL_0024: stloc.s V_5 + IL_0026: ldloca.s V_2 IL_0028: stloc.s V_6 IL_002a: ldloc.s V_6 IL_002c: ldloc.s V_5 @@ -2604,9 +2604,9 @@ IL_005f: stloc.s V_6 IL_0061: br.s IL_0082 - IL_0063: ldloca.s V_4 - IL_0065: ldloc.s V_6 - IL_0067: stloc.s V_7 + IL_0063: ldloc.s V_6 + IL_0065: stloc.s V_7 + IL_0067: ldloca.s V_4 IL_0069: stloc.s V_8 IL_006b: ldloc.s V_8 IL_006d: ldloc.s V_7 @@ -2717,9 +2717,9 @@ IL_0047: stloc.3 IL_0048: br.s IL_006c - IL_004a: ldloca.s V_1 - IL_004c: ldloc.3 - IL_004d: stloc.s V_4 + IL_004a: ldloc.3 + IL_004b: stloc.s V_4 + IL_004d: ldloca.s V_1 IL_004f: stloc.s V_5 IL_0051: ldloc.s V_5 IL_0053: ldloc.s V_4 @@ -2834,9 +2834,9 @@ IL_0047: stloc.3 IL_0048: br.s IL_006c - IL_004a: ldloca.s V_1 - IL_004c: ldloc.3 - IL_004d: stloc.s V_4 + IL_004a: ldloc.3 + IL_004b: stloc.s V_4 + IL_004d: ldloca.s V_1 IL_004f: stloc.s V_5 IL_0051: ldloc.s V_5 IL_0053: ldloc.s V_4 @@ -2952,9 +2952,9 @@ IL_0047: stloc.3 IL_0048: br.s IL_006b - IL_004a: ldloca.s V_1 - IL_004c: ldloc.3 - IL_004d: stloc.s V_4 + IL_004a: ldloc.3 + IL_004b: stloc.s V_4 + IL_004d: ldloca.s V_1 IL_004f: stloc.s V_5 IL_0051: ldloc.s V_5 IL_0053: stloc.s V_6 @@ -3010,9 +3010,9 @@ IL_0015: stloc.s V_4 IL_0017: br.s IL_003a - IL_0019: ldloca.s V_2 - IL_001b: ldloc.s V_4 - IL_001d: stloc.s V_5 + IL_0019: ldloc.s V_4 + IL_001b: stloc.s V_5 + IL_001d: ldloca.s V_2 IL_001f: stloc.s V_6 IL_0021: ldloc.s V_6 IL_0023: ldloc.s V_5 @@ -3068,9 +3068,9 @@ IL_0015: stloc.3 IL_0016: br.s IL_0034 - IL_0018: ldloca.s V_1 - IL_001a: ldloc.3 - IL_001b: stloc.s V_4 + IL_0018: ldloc.3 + IL_0019: stloc.s V_4 + IL_001b: ldloca.s V_1 IL_001d: stloc.s V_5 IL_001f: ldloc.s V_5 IL_0021: ldloc.s V_4 @@ -3123,9 +3123,9 @@ IL_0015: stloc.2 IL_0016: br.s IL_0030 - IL_0018: ldloca.s V_0 - IL_001a: ldloc.2 - IL_001b: stloc.3 + IL_0018: ldloc.2 + IL_0019: stloc.3 + IL_001a: ldloca.s V_0 IL_001c: stloc.s V_4 IL_001e: ldloc.s V_4 IL_0020: ldloc.3 @@ -3177,9 +3177,9 @@ IL_0015: stloc.3 IL_0016: br.s IL_0034 - IL_0018: ldloca.s V_1 - IL_001a: ldloc.3 - IL_001b: stloc.s V_4 + IL_0018: ldloc.3 + IL_0019: stloc.s V_4 + IL_001b: ldloca.s V_1 IL_001d: stloc.s V_5 IL_001f: ldloc.s V_5 IL_0021: ldloc.s V_4 @@ -3247,9 +3247,9 @@ IL_0017: stloc.3 IL_0018: br.s IL_0042 - IL_001a: ldloca.s V_1 - IL_001c: ldloc.3 - IL_001d: stloc.s V_4 + IL_001a: ldloc.3 + IL_001b: stloc.s V_4 + IL_001d: ldloca.s V_1 IL_001f: stloc.s V_5 IL_0021: ldloc.s V_5 IL_0023: ldsfld class assembly/f33@47 assembly/f33@47::@_instance @@ -3329,9 +3329,9 @@ IL_001f: stloc.s V_5 IL_0021: br.s IL_0058 - IL_0023: ldloca.s V_2 - IL_0025: ldloc.s V_5 - IL_0027: stloc.s V_6 + IL_0023: ldloc.s V_5 + IL_0025: stloc.s V_6 + IL_0027: ldloca.s V_2 IL_0029: stloc.s V_7 IL_002b: ldloc.s V_7 IL_002d: ldsfld class assembly/f34@48 assembly/f34@48::@_instance @@ -3387,9 +3387,9 @@ IL_0075: stloc.s V_5 IL_0077: br.s IL_00a7 - IL_0079: ldloca.s V_2 - IL_007b: ldloc.s V_5 - IL_007d: stloc.s V_6 + IL_0079: ldloc.s V_5 + IL_007b: stloc.s V_6 + IL_007d: ldloca.s V_2 IL_007f: stloc.s V_9 IL_0081: ldloc.s V_9 IL_0083: ldsfld class assembly/'f34@48-2' assembly/'f34@48-2'::@_instance @@ -3471,9 +3471,9 @@ IL_001f: stloc.s V_5 IL_0021: br.s IL_0058 - IL_0023: ldloca.s V_2 - IL_0025: ldloc.s V_5 - IL_0027: stloc.s V_6 + IL_0023: ldloc.s V_5 + IL_0025: stloc.s V_6 + IL_0027: ldloca.s V_2 IL_0029: stloc.s V_7 IL_002b: ldloc.s V_7 IL_002d: ldsfld class assembly/f35@49 assembly/f35@49::@_instance @@ -3529,9 +3529,9 @@ IL_0075: stloc.s V_6 IL_0077: br.s IL_00a7 - IL_0079: ldloca.s V_2 - IL_007b: ldloc.s V_6 - IL_007d: stloc.s V_8 + IL_0079: ldloc.s V_6 + IL_007b: stloc.s V_8 + IL_007d: ldloca.s V_2 IL_007f: stloc.s V_9 IL_0081: ldloc.s V_9 IL_0083: ldsfld class assembly/'f35@49-2' assembly/'f35@49-2'::@_instance diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter01.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter01.fs.il.bsl index de7d051766d..a3bb0385a6d 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter01.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter01.fs.il.bsl @@ -49,9 +49,9 @@ IL_0004: stloc.2 IL_0005: br.s IL_0021 - IL_0007: ldloca.s V_0 - IL_0009: ldloc.2 - IL_000a: stloc.3 + IL_0007: ldloc.2 + IL_0008: stloc.3 + IL_0009: ldloca.s V_0 IL_000b: stloc.s V_4 IL_000d: ldloc.s V_4 IL_000f: ldloc.3 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter02.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter02.fs.il.bsl index ea4cf922b2a..b460d793280 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter02.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter02.fs.il.bsl @@ -50,9 +50,9 @@ IL_0004: stloc.2 IL_0005: br.s IL_0035 - IL_0007: ldloca.s V_0 - IL_0009: ldloc.2 - IL_000a: stloc.3 + IL_0007: ldloc.2 + IL_0008: stloc.3 + IL_0009: ldloca.s V_0 IL_000b: stloc.s V_4 IL_000d: ldloc.s V_4 IL_000f: ldstr "hello" diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter03.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter03.fs.il.bsl index e90b8cc491f..beeb8301a51 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter03.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter03.fs.il.bsl @@ -49,9 +49,9 @@ IL_0004: stloc.2 IL_0005: br.s IL_0021 - IL_0007: ldloca.s V_0 - IL_0009: ldloc.2 - IL_000a: stloc.3 + IL_0007: ldloc.2 + IL_0008: stloc.3 + IL_0009: ldloca.s V_0 IL_000b: stloc.s V_4 IL_000d: ldloc.s V_4 IL_000f: ldloc.3 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter04.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter04.fs.RealInternalSignatureOff.il.bsl index bd94ed1bd69..498cd175ff4 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter04.fs.RealInternalSignatureOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter04.fs.RealInternalSignatureOff.il.bsl @@ -76,9 +76,9 @@ IL_0004: stloc.3 IL_0005: br.s IL_0024 - IL_0007: ldloca.s V_1 - IL_0009: ldloc.3 - IL_000a: stloc.s V_4 + IL_0007: ldloc.3 + IL_0008: stloc.s V_4 + IL_000a: ldloca.s V_1 IL_000c: stloc.s V_5 IL_000e: ldloc.s V_5 IL_0010: ldloc.s V_4 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter04.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter04.fs.RealInternalSignatureOn.il.bsl index 572d9c93770..927c1956b20 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter04.fs.RealInternalSignatureOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter04.fs.RealInternalSignatureOn.il.bsl @@ -70,9 +70,9 @@ IL_0004: stloc.2 IL_0005: br.s IL_0021 - IL_0007: ldloca.s V_0 - IL_0009: ldloc.2 - IL_000a: stloc.3 + IL_0007: ldloc.2 + IL_0008: stloc.3 + IL_0009: ldloca.s V_0 IL_000b: stloc.s V_4 IL_000d: ldloc.s V_4 IL_000f: ldloc.3 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/NoBoxingOnDispose01.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/NoBoxingOnDispose01.fs.il.net472.bsl index 6cc68854c66..ee8bc9d10c3 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/NoBoxingOnDispose01.fs.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/NoBoxingOnDispose01.fs.il.net472.bsl @@ -49,33 +49,32 @@ .maxstack 3 .locals init (valuetype [runtime]System.Collections.Generic.List`1/Enumerator V_0, !!T V_1) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: callvirt instance valuetype [runtime]System.Collections.Generic.List`1/Enumerator class [runtime]System.Collections.Generic.List`1::GetEnumerator() - IL_0007: stloc.0 + IL_0000: ldarg.0 + IL_0001: callvirt instance valuetype [runtime]System.Collections.Generic.List`1/Enumerator class [runtime]System.Collections.Generic.List`1::GetEnumerator() + IL_0006: stloc.0 .try { - IL_0008: br.s IL_0013 + IL_0007: br.s IL_0012 - IL_000a: ldloca.s V_0 - IL_000c: call instance !0 valuetype [runtime]System.Collections.Generic.List`1/Enumerator::get_Current() - IL_0011: stloc.1 - IL_0012: nop - IL_0013: ldloca.s V_0 - IL_0015: call instance bool valuetype [runtime]System.Collections.Generic.List`1/Enumerator::MoveNext() - IL_001a: brtrue.s IL_000a + IL_0009: ldloca.s V_0 + IL_000b: call instance !0 valuetype [runtime]System.Collections.Generic.List`1/Enumerator::get_Current() + IL_0010: stloc.1 + IL_0011: nop + IL_0012: ldloca.s V_0 + IL_0014: call instance bool valuetype [runtime]System.Collections.Generic.List`1/Enumerator::MoveNext() + IL_0019: brtrue.s IL_0009 - IL_001c: leave.s IL_002c + IL_001b: leave.s IL_002b } finally { - IL_001e: ldloca.s V_0 - IL_0020: constrained. valuetype [runtime]System.Collections.Generic.List`1/Enumerator - IL_0026: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_002b: endfinally + IL_001d: ldloca.s V_0 + IL_001f: constrained. valuetype [runtime]System.Collections.Generic.List`1/Enumerator + IL_0025: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_002a: endfinally } - IL_002c: ret + IL_002b: ret } } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/NoBoxingOnDispose01.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/NoBoxingOnDispose01.fs.il.netcore.bsl index 59e2f445fe0..0d5ece49577 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/NoBoxingOnDispose01.fs.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/NoBoxingOnDispose01.fs.il.netcore.bsl @@ -39,33 +39,32 @@ .maxstack 3 .locals init (valuetype [runtime]System.Collections.Generic.List`1/Enumerator V_0, !!T V_1) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: callvirt instance valuetype [runtime]System.Collections.Generic.List`1/Enumerator class [runtime]System.Collections.Generic.List`1::GetEnumerator() - IL_0007: stloc.0 + IL_0000: ldarg.0 + IL_0001: callvirt instance valuetype [runtime]System.Collections.Generic.List`1/Enumerator class [runtime]System.Collections.Generic.List`1::GetEnumerator() + IL_0006: stloc.0 .try { - IL_0008: br.s IL_0013 + IL_0007: br.s IL_0012 - IL_000a: ldloca.s V_0 - IL_000c: call instance !0 valuetype [runtime]System.Collections.Generic.List`1/Enumerator::get_Current() - IL_0011: stloc.1 - IL_0012: nop - IL_0013: ldloca.s V_0 - IL_0015: call instance bool valuetype [runtime]System.Collections.Generic.List`1/Enumerator::MoveNext() - IL_001a: brtrue.s IL_000a + IL_0009: ldloca.s V_0 + IL_000b: call instance !0 valuetype [runtime]System.Collections.Generic.List`1/Enumerator::get_Current() + IL_0010: stloc.1 + IL_0011: nop + IL_0012: ldloca.s V_0 + IL_0014: call instance bool valuetype [runtime]System.Collections.Generic.List`1/Enumerator::MoveNext() + IL_0019: brtrue.s IL_0009 - IL_001c: leave.s IL_002c + IL_001b: leave.s IL_002b } finally { - IL_001e: ldloca.s V_0 - IL_0020: constrained. valuetype [runtime]System.Collections.Generic.List`1/Enumerator - IL_0026: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_002b: endfinally + IL_001d: ldloca.s V_0 + IL_001f: constrained. valuetype [runtime]System.Collections.Generic.List`1/Enumerator + IL_0025: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_002a: endfinally } - IL_002c: ret + IL_002b: ret } } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest07.fs.RealInternalSignatureOff.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest07.fs.RealInternalSignatureOff.il.netcore.bsl index 57926705228..0456f3caab1 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest07.fs.RealInternalSignatureOff.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest07.fs.RealInternalSignatureOff.il.netcore.bsl @@ -687,9 +687,9 @@ IL_0004: stloc.2 IL_0005: br.s IL_0033 - IL_0007: ldloca.s V_0 - IL_0009: ldloc.2 - IL_000a: stloc.3 + IL_0007: ldloc.2 + IL_0008: stloc.3 + IL_0009: ldloca.s V_0 IL_000b: stloc.s V_4 IL_000d: ldloc.s V_4 IL_000f: ldstr "hello" diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest07.fs.RealInternalSignatureOn.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest07.fs.RealInternalSignatureOn.il.netcore.bsl index 0048320b577..36d7b5fc66a 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest07.fs.RealInternalSignatureOn.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest07.fs.RealInternalSignatureOn.il.netcore.bsl @@ -689,9 +689,9 @@ IL_0004: stloc.2 IL_0005: br.s IL_0033 - IL_0007: ldloca.s V_0 - IL_0009: ldloc.2 - IL_000a: stloc.3 + IL_0007: ldloc.2 + IL_0008: stloc.3 + IL_0009: ldloca.s V_0 IL_000b: stloc.s V_4 IL_000d: ldloc.s V_4 IL_000f: ldstr "hello" diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Body - MultipleStatements 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Body - MultipleStatements 01.bsl new file mode 100644 index 00000000000..beb451d8511 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Body - MultipleStatements 01.bsl @@ -0,0 +1,37 @@ +Module::f + (5,14-5,15) l + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldc.i4.0 + IL_0003: stloc.1 + IL_0004: br.s IL_001c + + (5,5-5,10) for i + IL_0006: ldloc.0 + IL_0007: ldloc.1 + IL_0008: ldelem.i4 + IL_0009: stloc.2 + + (6,9-6,35) System.Console.WriteLine i + IL_000a: ldloc.2 + IL_000b: call WriteLine + + (7,9-7,40) System.Console.WriteLine(i + 1) + IL_0010: ldloc.2 + IL_0011: ldc.i4.1 + IL_0012: add + IL_0013: call WriteLine + + + IL_0018: ldloc.1 + IL_0019: ldc.i4.1 + IL_001a: add + IL_001b: stloc.1 + + (5,11-5,13) in + IL_001c: ldloc.1 + IL_001d: ldloc.0 + IL_001e: ldlen + IL_001f: conv.i4 + IL_0020: blt.s IL_0006 + IL_0022: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Body - SingleStatement 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Body - SingleStatement 01.bsl new file mode 100644 index 00000000000..022d36579ed --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Body - SingleStatement 01.bsl @@ -0,0 +1,31 @@ +Module::f + (5,14-5,15) l + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldc.i4.0 + IL_0003: stloc.1 + IL_0004: br.s IL_0014 + + (5,5-5,10) for i + IL_0006: ldloc.0 + IL_0007: ldloc.1 + IL_0008: ldelem.i4 + IL_0009: stloc.2 + + (6,9-6,35) System.Console.WriteLine i + IL_000a: ldloc.2 + IL_000b: call WriteLine + + + IL_0010: ldloc.1 + IL_0011: ldc.i4.1 + IL_0012: add + IL_0013: stloc.1 + + (5,11-5,13) in + IL_0014: ldloc.1 + IL_0015: ldloc.0 + IL_0016: ldlen + IL_0017: conv.i4 + IL_0018: blt.s IL_0006 + IL_001a: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - ActivePattern 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - ActivePattern 01.bsl new file mode 100644 index 00000000000..a2dd006417a --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - ActivePattern 01.bsl @@ -0,0 +1,58 @@ +Module::|Id| + (4,23-4,24) x + IL_0000: ldarg.0 + IL_0001: ret + +Module::f + (7,5-10,7) [| for Id i in l do yield i |] + IL_0000: nop + + (8,9-8,12) for + IL_0001: ldarg.0 + IL_0002: callvirt GetEnumerator + IL_0007: stloc.1 + IL_0008: br.s IL_0027 + IL_000a: ldloc.1 + IL_000b: callvirt get_Current + IL_0010: stloc.3 + IL_0011: ldloc.3 + IL_0012: call |Id| + IL_0017: stloc.s 4 + IL_0019: ldloc.s 4 + IL_001b: stloc.s 5 + + (9,13-9,20) yield i + IL_001d: ldloca.s 0 + IL_001f: ldloc.s 5 + IL_0021: call Add + IL_0026: nop + + (8,18-8,20) in + IL_0027: ldloc.1 + IL_0028: callvirt MoveNext + IL_002d: brtrue.s IL_000a + IL_002f: ldnull + IL_0030: stloc.2 + IL_0031: leave.s IL_0048 + IL_0033: ldloc.1 + IL_0034: isinst IDisposable + IL_0039: stloc.s 6 + + + IL_003b: ldloc.s 6 + IL_003d: brfalse.s IL_0047 + + + IL_003f: ldloc.s 6 + IL_0041: callvirt Dispose + IL_0046: endfinally + + + IL_0047: endfinally + + + IL_0048: ldloc.2 + IL_0049: pop + IL_004a: ldloca.s 0 + IL_004c: call Close + IL_0051: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - Arrow 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - Arrow 01.bsl new file mode 100644 index 00000000000..048c51b972b --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - Arrow 01.bsl @@ -0,0 +1,50 @@ +Module::f + (5,5-7,7) [| for n in l -> n |] + IL_0000: nop + + (6,9-6,12) for + IL_0001: ldarg.0 + IL_0002: callvirt GetEnumerator + IL_0007: stloc.1 + IL_0008: br.s IL_001e + IL_000a: ldloc.1 + IL_000b: callvirt get_Current + IL_0010: stloc.3 + IL_0011: ldloca.s 0 + IL_0013: stloc.s 4 + + (6,23-6,24) n + IL_0015: ldloc.s 4 + IL_0017: ldloc.3 + IL_0018: call Add + IL_001d: nop + + (6,15-6,17) in + IL_001e: ldloc.1 + IL_001f: callvirt MoveNext + IL_0024: brtrue.s IL_000a + IL_0026: ldnull + IL_0027: stloc.2 + IL_0028: leave.s IL_003f + IL_002a: ldloc.1 + IL_002b: isinst IDisposable + IL_0030: stloc.s 5 + + + IL_0032: ldloc.s 5 + IL_0034: brfalse.s IL_003e + + + IL_0036: ldloc.s 5 + IL_0038: callvirt Dispose + IL_003d: endfinally + + + IL_003e: endfinally + + + IL_003f: ldloc.2 + IL_0040: pop + IL_0041: ldloca.s 0 + IL_0043: call Close + IL_0048: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - Tuple 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - Tuple 01.bsl new file mode 100644 index 00000000000..234b112f656 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - Tuple 01.bsl @@ -0,0 +1,50 @@ +Module::f + (5,5-8,7) [| for n in l do yield n |] + IL_0000: nop + + (6,9-6,12) for + IL_0001: ldarg.0 + IL_0002: callvirt GetEnumerator + IL_0007: stloc.1 + IL_0008: br.s IL_001e + IL_000a: ldloc.1 + IL_000b: callvirt get_Current + IL_0010: stloc.3 + IL_0011: ldloca.s 0 + IL_0013: stloc.s 4 + + (7,13-7,20) yield n + IL_0015: ldloc.s 4 + IL_0017: ldloc.3 + IL_0018: call Add + IL_001d: nop + + (6,15-6,17) in + IL_001e: ldloc.1 + IL_001f: callvirt MoveNext + IL_0024: brtrue.s IL_000a + IL_0026: ldnull + IL_0027: stloc.2 + IL_0028: leave.s IL_003f + IL_002a: ldloc.1 + IL_002b: isinst IDisposable + IL_0030: stloc.s 5 + + + IL_0032: ldloc.s 5 + IL_0034: brfalse.s IL_003e + + + IL_0036: ldloc.s 5 + IL_0038: callvirt Dispose + IL_003d: endfinally + + + IL_003e: endfinally + + + IL_003f: ldloc.2 + IL_0040: pop + IL_0041: ldloca.s 0 + IL_0043: call Close + IL_0048: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - Tuple 02.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - Tuple 02.bsl new file mode 100644 index 00000000000..d9b3362ac39 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - Tuple 02.bsl @@ -0,0 +1,54 @@ +Module::f + (5,5-8,7) [| for i, i1 in l do yield i |] + IL_0000: nop + + (6,9-6,12) for + IL_0001: ldarg.0 + IL_0002: callvirt GetEnumerator + IL_0007: stloc.1 + IL_0008: br.s IL_002b + IL_000a: ldloc.1 + IL_000b: callvirt get_Current + IL_0010: stloc.3 + IL_0011: ldloc.3 + IL_0012: call get_Item2 + IL_0017: stloc.s 4 + IL_0019: ldloc.3 + IL_001a: call get_Item1 + IL_001f: stloc.s 5 + + (7,13-7,20) yield i + IL_0021: ldloca.s 0 + IL_0023: ldloc.s 5 + IL_0025: call Add + IL_002a: nop + + (6,19-6,21) in + IL_002b: ldloc.1 + IL_002c: callvirt MoveNext + IL_0031: brtrue.s IL_000a + IL_0033: ldnull + IL_0034: stloc.2 + IL_0035: leave.s IL_004c + IL_0037: ldloc.1 + IL_0038: isinst IDisposable + IL_003d: stloc.s 6 + + + IL_003f: ldloc.s 6 + IL_0041: brfalse.s IL_004b + + + IL_0043: ldloc.s 6 + IL_0045: callvirt Dispose + IL_004a: endfinally + + + IL_004b: endfinally + + + IL_004c: ldloc.2 + IL_004d: pop + IL_004e: ldloca.s 0 + IL_0050: call Close + IL_0055: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - Value 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - Value 01.bsl new file mode 100644 index 00000000000..0e9884491ae --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - Value 01.bsl @@ -0,0 +1,54 @@ +Module::.cctor + + IL_0000: ldc.i4.0 + IL_0001: stsfld init@ + IL_0006: ldsfld init@ + IL_000b: pop + IL_000c: ret + +Module::staticInitialization@ + (4,1-8,7) let a = [| for n in 1..10 do yield n |] + IL_0000: ldc.i4.s 10 + IL_0002: conv.i8 + IL_0003: conv.ovf.i.un + IL_0004: newarr Int32 + IL_0009: stloc.0 + IL_000a: ldc.i4.0 + IL_000b: conv.i8 + IL_000c: stloc.1 + IL_000d: ldc.i4.1 + IL_000e: stloc.2 + IL_000f: br.s IL_0029 + IL_0011: ldloc.2 + IL_0012: stloc.3 + + (6,9-6,12) for + IL_0013: ldloc.0 + IL_0014: ldloc.1 + IL_0015: conv.i + IL_0016: stloc.s 4 + IL_0018: stloc.s 5 + + (7,13-7,20) yield n + IL_001a: ldloc.s 5 + IL_001c: ldloc.s 4 + IL_001e: ldloc.3 + IL_001f: stelem.i4 + IL_0020: ldloc.2 + IL_0021: ldc.i4.1 + IL_0022: add + IL_0023: stloc.2 + IL_0024: ldloc.1 + IL_0025: ldc.i4.1 + IL_0026: conv.i8 + IL_0027: add + IL_0028: stloc.1 + + (6,15-6,17) in + IL_0029: ldloc.1 + IL_002a: ldc.i4.s 10 + IL_002c: conv.i8 + IL_002d: blt.un.s IL_0011 + IL_002f: ldloc.0 + IL_0030: stsfld a@4 + IL_0035: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - Value 02.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - Value 02.bsl new file mode 100644 index 00000000000..234b112f656 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Comprehensions - Value 02.bsl @@ -0,0 +1,50 @@ +Module::f + (5,5-8,7) [| for n in l do yield n |] + IL_0000: nop + + (6,9-6,12) for + IL_0001: ldarg.0 + IL_0002: callvirt GetEnumerator + IL_0007: stloc.1 + IL_0008: br.s IL_001e + IL_000a: ldloc.1 + IL_000b: callvirt get_Current + IL_0010: stloc.3 + IL_0011: ldloca.s 0 + IL_0013: stloc.s 4 + + (7,13-7,20) yield n + IL_0015: ldloc.s 4 + IL_0017: ldloc.3 + IL_0018: call Add + IL_001d: nop + + (6,15-6,17) in + IL_001e: ldloc.1 + IL_001f: callvirt MoveNext + IL_0024: brtrue.s IL_000a + IL_0026: ldnull + IL_0027: stloc.2 + IL_0028: leave.s IL_003f + IL_002a: ldloc.1 + IL_002b: isinst IDisposable + IL_0030: stloc.s 5 + + + IL_0032: ldloc.s 5 + IL_0034: brfalse.s IL_003e + + + IL_0036: ldloc.s 5 + IL_0038: callvirt Dispose + IL_003d: endfinally + + + IL_003e: endfinally + + + IL_003f: ldloc.2 + IL_0040: pop + IL_0041: ldloca.s 0 + IL_0043: call Close + IL_0048: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Pattern - ActivePattern 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Pattern - ActivePattern 01.bsl new file mode 100644 index 00000000000..735b64ef291 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Pattern - ActivePattern 01.bsl @@ -0,0 +1,40 @@ +Module::|Id| + (4,23-4,24) x + IL_0000: ldarg.0 + IL_0001: ret + +Module::f + (7,17-7,18) l + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldc.i4.0 + IL_0003: stloc.1 + IL_0004: br.s IL_0019 + + (7,5-7,13) for Id i + IL_0006: ldloc.0 + IL_0007: ldloc.1 + IL_0008: ldelem.i4 + IL_0009: stloc.2 + IL_000a: ldloc.2 + IL_000b: call |Id| + IL_0010: stloc.3 + IL_0011: ldloc.3 + IL_0012: stloc.s 4 + + (8,9-8,11) () + IL_0014: nop + + + IL_0015: ldloc.1 + IL_0016: ldc.i4.1 + IL_0017: add + IL_0018: stloc.1 + + (7,14-7,16) in + IL_0019: ldloc.1 + IL_001a: ldloc.0 + IL_001b: ldlen + IL_001c: conv.i4 + IL_001d: blt.s IL_0006 + IL_001f: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Pattern - Tuple 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Pattern - Tuple 01.bsl new file mode 100644 index 00000000000..117072dd130 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Pattern - Tuple 01.bsl @@ -0,0 +1,36 @@ +Module::f + (5,19-5,20) l + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldc.i4.0 + IL_0003: stloc.1 + IL_0004: br.s IL_0022 + + (5,5-5,15) for i1, i2 + IL_0006: ldloc.0 + IL_0007: ldloc.1 + IL_0008: ldelem 0x1b000001 + IL_000d: stloc.2 + IL_000e: ldloc.2 + IL_000f: call get_Item2 + IL_0014: stloc.3 + IL_0015: ldloc.2 + IL_0016: call get_Item1 + IL_001b: stloc.s 4 + + (6,9-6,11) () + IL_001d: nop + + + IL_001e: ldloc.1 + IL_001f: ldc.i4.1 + IL_0020: add + IL_0021: stloc.1 + + (5,16-5,18) in + IL_0022: ldloc.1 + IL_0023: ldloc.0 + IL_0024: ldlen + IL_0025: conv.i4 + IL_0026: blt.s IL_0006 + IL_0028: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Simple 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Simple 01.bsl new file mode 100644 index 00000000000..ad1455f0b35 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Array - Simple 01.bsl @@ -0,0 +1,30 @@ +Module::f + (5,14-5,15) l + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldc.i4.0 + IL_0003: stloc.1 + IL_0004: br.s IL_000f + + (5,5-5,10) for i + IL_0006: ldloc.0 + IL_0007: ldloc.1 + IL_0008: ldelem.i4 + IL_0009: stloc.2 + + (6,9-6,11) () + IL_000a: nop + + + IL_000b: ldloc.1 + IL_000c: ldc.i4.1 + IL_000d: add + IL_000e: stloc.1 + + (5,11-5,13) in + IL_000f: ldloc.1 + IL_0010: ldloc.0 + IL_0011: ldlen + IL_0012: conv.i4 + IL_0013: blt.s IL_0006 + IL_0015: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - LetUnit 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - LetUnit 01.bsl new file mode 100644 index 00000000000..5eec9beaeb0 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - LetUnit 01.bsl @@ -0,0 +1,31 @@ +Module::f + (5,14-5,15) l + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: call get_TailOrNull + IL_0008: stloc.1 + IL_0009: br.s IL_001d + + (5,5-5,10) for i + IL_000b: ldloc.0 + IL_000c: call get_HeadOrDefault + IL_0011: stloc.2 + + (6,17-6,19) () + IL_0012: nop + + (7,9-7,11) () + IL_0013: nop + + + IL_0014: ldloc.1 + IL_0015: stloc.0 + IL_0016: ldloc.0 + IL_0017: call get_TailOrNull + IL_001c: stloc.1 + + (5,11-5,13) in + IL_001d: ldloc.1 + IL_001e: brtrue.s IL_000b + IL_0020: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - MultipleStatements 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - MultipleStatements 01.bsl new file mode 100644 index 00000000000..cabffb41911 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - MultipleStatements 01.bsl @@ -0,0 +1,35 @@ +Module::f + (5,14-5,15) l + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: call get_TailOrNull + IL_0008: stloc.1 + IL_0009: br.s IL_0029 + + (5,5-5,10) for i + IL_000b: ldloc.0 + IL_000c: call get_HeadOrDefault + IL_0011: stloc.2 + + (6,9-6,35) System.Console.WriteLine i + IL_0012: ldloc.2 + IL_0013: call WriteLine + + (7,9-7,40) System.Console.WriteLine(i + 1) + IL_0018: ldloc.2 + IL_0019: ldc.i4.1 + IL_001a: add + IL_001b: call WriteLine + + + IL_0020: ldloc.1 + IL_0021: stloc.0 + IL_0022: ldloc.0 + IL_0023: call get_TailOrNull + IL_0028: stloc.1 + + (5,11-5,13) in + IL_0029: ldloc.1 + IL_002a: brtrue.s IL_000b + IL_002c: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - ParenUnit 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - ParenUnit 01.bsl new file mode 100644 index 00000000000..401652494b3 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - ParenUnit 01.bsl @@ -0,0 +1,28 @@ +Module::f + (5,14-5,15) l + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: call get_TailOrNull + IL_0008: stloc.1 + IL_0009: br.s IL_001c + + (5,5-5,10) for i + IL_000b: ldloc.0 + IL_000c: call get_HeadOrDefault + IL_0011: stloc.2 + + (6,10-6,12) () + IL_0012: nop + + + IL_0013: ldloc.1 + IL_0014: stloc.0 + IL_0015: ldloc.0 + IL_0016: call get_TailOrNull + IL_001b: stloc.1 + + (5,11-5,13) in + IL_001c: ldloc.1 + IL_001d: brtrue.s IL_000b + IL_001f: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - SequentialUnits 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - SequentialUnits 01.bsl new file mode 100644 index 00000000000..c3c76afe5aa --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - SequentialUnits 01.bsl @@ -0,0 +1,31 @@ +Module::f + (5,14-5,15) l + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: call get_TailOrNull + IL_0008: stloc.1 + IL_0009: br.s IL_001d + + (5,5-5,10) for i + IL_000b: ldloc.0 + IL_000c: call get_HeadOrDefault + IL_0011: stloc.2 + + (6,9-6,11) () + IL_0012: nop + + (7,9-7,11) () + IL_0013: nop + + + IL_0014: ldloc.1 + IL_0015: stloc.0 + IL_0016: ldloc.0 + IL_0017: call get_TailOrNull + IL_001c: stloc.1 + + (5,11-5,13) in + IL_001d: ldloc.1 + IL_001e: brtrue.s IL_000b + IL_0020: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - SingleStatement 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - SingleStatement 01.bsl new file mode 100644 index 00000000000..9dc76f432cc --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Body - SingleStatement 01.bsl @@ -0,0 +1,29 @@ +Module::f + (5,14-5,15) l + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: call get_TailOrNull + IL_0008: stloc.1 + IL_0009: br.s IL_0021 + + (5,5-5,10) for i + IL_000b: ldloc.0 + IL_000c: call get_HeadOrDefault + IL_0011: stloc.2 + + (6,9-6,35) System.Console.WriteLine i + IL_0012: ldloc.2 + IL_0013: call WriteLine + + + IL_0018: ldloc.1 + IL_0019: stloc.0 + IL_001a: ldloc.0 + IL_001b: call get_TailOrNull + IL_0020: stloc.1 + + (5,11-5,13) in + IL_0021: ldloc.1 + IL_0022: brtrue.s IL_000b + IL_0024: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Comprehensions - ActivePattern 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Comprehensions - ActivePattern 01.bsl new file mode 100644 index 00000000000..08615e86be6 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Comprehensions - ActivePattern 01.bsl @@ -0,0 +1,44 @@ +Module::|Id| + (4,23-4,24) x + IL_0000: ldarg.0 + IL_0001: ret + +Module::f + (7,5-10,6) [ for Id i in l do yield i ] + IL_0000: nop + + (8,9-8,12) for + IL_0001: ldarg.0 + IL_0002: stloc.1 + IL_0003: ldloc.1 + IL_0004: call get_TailOrNull + IL_0009: stloc.2 + IL_000a: br.s IL_0036 + IL_000c: ldloc.1 + IL_000d: call get_HeadOrDefault + IL_0012: stloc.3 + IL_0013: ldloca.s 0 + IL_0015: ldloc.3 + IL_0016: call |Id| + IL_001b: stloc.s 4 + IL_001d: ldloc.s 4 + IL_001f: stloc.s 5 + IL_0021: stloc.s 6 + + (9,13-9,20) yield i + IL_0023: ldloc.s 6 + IL_0025: ldloc.s 5 + IL_0027: call Add + IL_002c: nop + IL_002d: ldloc.2 + IL_002e: stloc.1 + IL_002f: ldloc.1 + IL_0030: call get_TailOrNull + IL_0035: stloc.2 + + (8,18-8,20) in + IL_0036: ldloc.2 + IL_0037: brtrue.s IL_000c + IL_0039: ldloca.s 0 + IL_003b: call Close + IL_0040: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Comprehensions - Arrow 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Comprehensions - Arrow 01.bsl new file mode 100644 index 00000000000..108c8700c6f --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Comprehensions - Arrow 01.bsl @@ -0,0 +1,34 @@ +Module::f + (5,5-7,6) [ for n in l -> n ] + IL_0000: nop + + (6,9-6,12) for + IL_0001: ldarg.0 + IL_0002: stloc.1 + IL_0003: ldloc.1 + IL_0004: call get_TailOrNull + IL_0009: stloc.2 + IL_000a: br.s IL_0029 + IL_000c: ldloc.1 + IL_000d: call get_HeadOrDefault + IL_0012: stloc.3 + IL_0013: ldloca.s 0 + IL_0015: stloc.s 4 + + (6,23-6,24) n + IL_0017: ldloc.s 4 + IL_0019: ldloc.3 + IL_001a: call Add + IL_001f: nop + IL_0020: ldloc.2 + IL_0021: stloc.1 + IL_0022: ldloc.1 + IL_0023: call get_TailOrNull + IL_0028: stloc.2 + + (6,15-6,17) in + IL_0029: ldloc.2 + IL_002a: brtrue.s IL_000c + IL_002c: ldloca.s 0 + IL_002e: call Close + IL_0033: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Comprehensions - Tuple 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Comprehensions - Tuple 01.bsl new file mode 100644 index 00000000000..3a82bf3d6bf --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Comprehensions - Tuple 01.bsl @@ -0,0 +1,34 @@ +Module::f + (5,5-8,6) [ for n in l do yield n ] + IL_0000: nop + + (6,9-6,12) for + IL_0001: ldarg.0 + IL_0002: stloc.1 + IL_0003: ldloc.1 + IL_0004: call get_TailOrNull + IL_0009: stloc.2 + IL_000a: br.s IL_0029 + IL_000c: ldloc.1 + IL_000d: call get_HeadOrDefault + IL_0012: stloc.3 + IL_0013: ldloca.s 0 + IL_0015: stloc.s 4 + + (7,13-7,20) yield n + IL_0017: ldloc.s 4 + IL_0019: ldloc.3 + IL_001a: call Add + IL_001f: nop + IL_0020: ldloc.2 + IL_0021: stloc.1 + IL_0022: ldloc.1 + IL_0023: call get_TailOrNull + IL_0028: stloc.2 + + (6,15-6,17) in + IL_0029: ldloc.2 + IL_002a: brtrue.s IL_000c + IL_002c: ldloca.s 0 + IL_002e: call Close + IL_0033: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Comprehensions - Tuple 02.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Comprehensions - Tuple 02.bsl new file mode 100644 index 00000000000..d308682b1cc --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Comprehensions - Tuple 02.bsl @@ -0,0 +1,40 @@ +Module::f + (5,5-8,6) [ for i, i1 in l do yield i ] + IL_0000: nop + + (6,9-6,12) for + IL_0001: ldarg.0 + IL_0002: stloc.1 + IL_0003: ldloc.1 + IL_0004: call get_TailOrNull + IL_0009: stloc.2 + IL_000a: br.s IL_003a + IL_000c: ldloc.1 + IL_000d: call get_HeadOrDefault + IL_0012: stloc.3 + IL_0013: ldloca.s 0 + IL_0015: ldloc.3 + IL_0016: call get_Item2 + IL_001b: stloc.s 4 + IL_001d: ldloc.3 + IL_001e: call get_Item1 + IL_0023: stloc.s 5 + IL_0025: stloc.s 6 + + (7,13-7,20) yield i + IL_0027: ldloc.s 6 + IL_0029: ldloc.s 5 + IL_002b: call Add + IL_0030: nop + IL_0031: ldloc.2 + IL_0032: stloc.1 + IL_0033: ldloc.1 + IL_0034: call get_TailOrNull + IL_0039: stloc.2 + + (6,19-6,21) in + IL_003a: ldloc.2 + IL_003b: brtrue.s IL_000c + IL_003d: ldloca.s 0 + IL_003f: call Close + IL_0044: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Comprehensions - Value 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Comprehensions - Value 01.bsl new file mode 100644 index 00000000000..5e0accf23b8 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Comprehensions - Value 01.bsl @@ -0,0 +1,47 @@ +Module::.cctor + + IL_0000: ldc.i4.0 + IL_0001: stsfld init@ + IL_0006: ldsfld init@ + IL_000b: pop + IL_000c: ret + +Module::staticInitialization@ + (4,1-8,6) let a = [ for n in 1..10 do yield n ] + IL_0000: ldc.i4.0 + IL_0001: conv.i8 + IL_0002: stloc.1 + IL_0003: ldc.i4.1 + IL_0004: stloc.2 + IL_0005: br.s IL_001f + IL_0007: ldloc.2 + IL_0008: stloc.3 + + (6,9-6,12) for + IL_0009: ldloca.s 0 + IL_000b: stloc.s 4 + + (7,13-7,20) yield n + IL_000d: ldloc.s 4 + IL_000f: ldloc.3 + IL_0010: call Add + IL_0015: nop + IL_0016: ldloc.2 + IL_0017: ldc.i4.1 + IL_0018: add + IL_0019: stloc.2 + IL_001a: ldloc.1 + IL_001b: ldc.i4.1 + IL_001c: conv.i8 + IL_001d: add + IL_001e: stloc.1 + + (6,15-6,17) in + IL_001f: ldloc.1 + IL_0020: ldc.i4.s 10 + IL_0022: conv.i8 + IL_0023: blt.un.s IL_0007 + IL_0025: ldloca.s 0 + IL_0027: call Close + IL_002c: stsfld a@4 + IL_0031: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Comprehensions - Value 02.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Comprehensions - Value 02.bsl new file mode 100644 index 00000000000..3a82bf3d6bf --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Comprehensions - Value 02.bsl @@ -0,0 +1,34 @@ +Module::f + (5,5-8,6) [ for n in l do yield n ] + IL_0000: nop + + (6,9-6,12) for + IL_0001: ldarg.0 + IL_0002: stloc.1 + IL_0003: ldloc.1 + IL_0004: call get_TailOrNull + IL_0009: stloc.2 + IL_000a: br.s IL_0029 + IL_000c: ldloc.1 + IL_000d: call get_HeadOrDefault + IL_0012: stloc.3 + IL_0013: ldloca.s 0 + IL_0015: stloc.s 4 + + (7,13-7,20) yield n + IL_0017: ldloc.s 4 + IL_0019: ldloc.3 + IL_001a: call Add + IL_001f: nop + IL_0020: ldloc.2 + IL_0021: stloc.1 + IL_0022: ldloc.1 + IL_0023: call get_TailOrNull + IL_0028: stloc.2 + + (6,15-6,17) in + IL_0029: ldloc.2 + IL_002a: brtrue.s IL_000c + IL_002c: ldloca.s 0 + IL_002e: call Close + IL_0033: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Pattern - ActivePattern 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Pattern - ActivePattern 01.bsl new file mode 100644 index 00000000000..04c4ef9351d --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Pattern - ActivePattern 01.bsl @@ -0,0 +1,38 @@ +Module::|Id| + (4,23-4,24) x + IL_0000: ldarg.0 + IL_0001: ret + +Module::f + (7,17-7,18) l + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: call get_TailOrNull + IL_0008: stloc.1 + IL_0009: br.s IL_0026 + + (7,5-7,13) for Id i + IL_000b: ldloc.0 + IL_000c: call get_HeadOrDefault + IL_0011: stloc.2 + IL_0012: ldloc.2 + IL_0013: call |Id| + IL_0018: stloc.3 + IL_0019: ldloc.3 + IL_001a: stloc.s 4 + + (8,9-8,11) () + IL_001c: nop + + + IL_001d: ldloc.1 + IL_001e: stloc.0 + IL_001f: ldloc.0 + IL_0020: call get_TailOrNull + IL_0025: stloc.1 + + (7,14-7,16) in + IL_0026: ldloc.1 + IL_0027: brtrue.s IL_000b + IL_0029: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Pattern - Tuple 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Pattern - Tuple 01.bsl new file mode 100644 index 00000000000..afdc8ca112c --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Pattern - Tuple 01.bsl @@ -0,0 +1,34 @@ +Module::f + (5,19-5,20) l + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: call get_TailOrNull + IL_0008: stloc.1 + IL_0009: br.s IL_002b + + (5,5-5,15) for i1, i2 + IL_000b: ldloc.0 + IL_000c: call get_HeadOrDefault + IL_0011: stloc.2 + IL_0012: ldloc.2 + IL_0013: call get_Item2 + IL_0018: stloc.3 + IL_0019: ldloc.2 + IL_001a: call get_Item1 + IL_001f: stloc.s 4 + + (6,9-6,11) () + IL_0021: nop + + + IL_0022: ldloc.1 + IL_0023: stloc.0 + IL_0024: ldloc.0 + IL_0025: call get_TailOrNull + IL_002a: stloc.1 + + (5,16-5,18) in + IL_002b: ldloc.1 + IL_002c: brtrue.s IL_000b + IL_002e: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Simple 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Simple 01.bsl new file mode 100644 index 00000000000..e0cc6be0c47 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/List - Simple 01.bsl @@ -0,0 +1,28 @@ +Module::f + (5,14-5,15) l + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: call get_TailOrNull + IL_0008: stloc.1 + IL_0009: br.s IL_001c + + (5,5-5,10) for i + IL_000b: ldloc.0 + IL_000c: call get_HeadOrDefault + IL_0011: stloc.2 + + (6,9-6,11) () + IL_0012: nop + + + IL_0013: ldloc.1 + IL_0014: stloc.0 + IL_0015: ldloc.0 + IL_0016: call get_TailOrNull + IL_001b: stloc.1 + + (5,11-5,13) in + IL_001c: ldloc.1 + IL_001d: brtrue.s IL_000b + IL_001f: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Body - MultipleStatements 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Body - MultipleStatements 01.bsl new file mode 100644 index 00000000000..0e16ad2c8e2 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Body - MultipleStatements 01.bsl @@ -0,0 +1,47 @@ +Module::f + (5,14-5,15) l + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: callvirt GetEnumerator + IL_0008: stloc.1 + IL_0009: br.s IL_0020 + + (5,5-5,10) for i + IL_000b: ldloc.1 + IL_000c: callvirt get_Current + IL_0011: stloc.2 + + (6,9-6,35) System.Console.WriteLine i + IL_0012: ldloc.2 + IL_0013: call WriteLine + + (7,9-7,40) System.Console.WriteLine(i + 1) + IL_0018: ldloc.2 + IL_0019: ldc.i4.1 + IL_001a: add + IL_001b: call WriteLine + + (5,11-5,13) in + IL_0020: ldloc.1 + IL_0021: callvirt MoveNext + IL_0026: brtrue.s IL_000b + IL_0028: leave.s IL_003c + IL_002a: ldloc.1 + IL_002b: isinst IDisposable + IL_0030: stloc.3 + + + IL_0031: ldloc.3 + IL_0032: brfalse.s IL_003b + + + IL_0034: ldloc.3 + IL_0035: callvirt Dispose + IL_003a: endfinally + + + IL_003b: endfinally + + + IL_003c: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Body - SingleStatement 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Body - SingleStatement 01.bsl new file mode 100644 index 00000000000..b6d13c7e7ab --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Body - SingleStatement 01.bsl @@ -0,0 +1,41 @@ +Module::f + (5,14-5,15) l + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: callvirt GetEnumerator + IL_0008: stloc.1 + IL_0009: br.s IL_0018 + + (5,5-5,10) for i + IL_000b: ldloc.1 + IL_000c: callvirt get_Current + IL_0011: stloc.2 + + (6,9-6,35) System.Console.WriteLine i + IL_0012: ldloc.2 + IL_0013: call WriteLine + + (5,11-5,13) in + IL_0018: ldloc.1 + IL_0019: callvirt MoveNext + IL_001e: brtrue.s IL_000b + IL_0020: leave.s IL_0034 + IL_0022: ldloc.1 + IL_0023: isinst IDisposable + IL_0028: stloc.3 + + + IL_0029: ldloc.3 + IL_002a: brfalse.s IL_0033 + + + IL_002c: ldloc.3 + IL_002d: callvirt Dispose + IL_0032: endfinally + + + IL_0033: endfinally + + + IL_0034: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - ActivePattern 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - ActivePattern 01.bsl new file mode 100644 index 00000000000..a1d4ee342ca --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - ActivePattern 01.bsl @@ -0,0 +1,211 @@ +Module::|Id| + (4,23-4,24) x + IL_0000: ldarg.0 + IL_0001: ret + +Module::f + (7,5-10,6) seq { for Id i in l do yield i } + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: ldc.i4.0 + IL_0003: ldc.i4.0 + IL_0004: newobj .ctor + IL_0009: ret + +f@8::GenerateNext + + IL_0000: ldarg.0 + IL_0001: ldfld pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch (3 targets) + IL_0019: br.s IL_0024 + + + IL_001b: nop + IL_001c: br.s IL_0073 + + + IL_001e: nop + IL_001f: br.s IL_0066 + + + IL_0021: nop + IL_0022: br.s IL_0094 + + + IL_0024: nop + IL_0025: br.s IL_0027 + + (8,9-8,12) for + IL_0027: ldarg.0 + IL_0028: ldarg.0 + IL_0029: ldfld l + IL_002e: callvirt GetEnumerator + IL_0033: stfld enum + IL_0038: ldarg.0 + IL_0039: ldc.i4.1 + IL_003a: stfld pc + IL_003f: br.s IL_0066 + IL_0041: ldarg.0 + IL_0042: ldfld enum + IL_0047: callvirt get_Current + IL_004c: stloc.0 + IL_004d: ldloc.0 + IL_004e: call |Id| + IL_0053: stloc.1 + IL_0054: ldloc.1 + IL_0055: stloc.2 + + (9,13-9,20) yield i + IL_0056: ldarg.0 + IL_0057: ldc.i4.2 + IL_0058: stfld pc + IL_005d: ldarg.0 + IL_005e: ldloc.2 + IL_005f: stfld current + IL_0064: ldc.i4.1 + IL_0065: ret + + (8,18-8,20) in + IL_0066: ldarg.0 + IL_0067: ldfld enum + IL_006c: callvirt MoveNext + IL_0071: brtrue.s IL_0041 + IL_0073: ldarg.0 + IL_0074: ldc.i4.3 + IL_0075: stfld pc + IL_007a: ldarg.0 + IL_007b: ldfld enum + IL_0080: call Dispose + IL_0085: nop + IL_0086: ldarg.0 + IL_0087: ldnull + IL_0088: stfld enum + IL_008d: ldarg.0 + IL_008e: ldc.i4.3 + IL_008f: stfld pc + IL_0094: ldarg.0 + IL_0095: ldc.i4.0 + IL_0096: stfld current + IL_009b: ldc.i4.0 + IL_009c: ret + +f@8::Close + + IL_0000: ldarg.0 + IL_0001: ldfld pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch (1 targets) + IL_0011: br.s IL_0016 + + + IL_0013: nop + IL_0014: br.s IL_0078 + + + IL_0016: nop + + + IL_0017: ldarg.0 + IL_0018: ldfld pc + IL_001d: switch (4 targets) + IL_0032: br.s IL_0040 + + + IL_0034: nop + IL_0035: br.s IL_0058 + + + IL_0037: nop + IL_0038: br.s IL_0044 + + + IL_003a: nop + IL_003b: br.s IL_0043 + + + IL_003d: nop + IL_003e: br.s IL_0058 + + + IL_0040: nop + IL_0041: br.s IL_0043 + + + IL_0043: nop + IL_0044: ldarg.0 + IL_0045: ldc.i4.3 + IL_0046: stfld pc + IL_004b: ldarg.0 + IL_004c: ldfld enum + IL_0051: call Dispose + IL_0056: nop + + + IL_0057: nop + IL_0058: ldarg.0 + IL_0059: ldc.i4.3 + IL_005a: stfld pc + IL_005f: ldarg.0 + IL_0060: ldc.i4.0 + IL_0061: stfld current + IL_0066: leave.s IL_0072 + IL_0068: castclass Exception + IL_006d: stloc.1 + IL_006e: ldloc.1 + IL_006f: stloc.0 + IL_0070: leave.s IL_0072 + + + IL_0072: nop + IL_0073: br IL_0000 + + + IL_0078: ldloc.0 + IL_0079: brfalse.s IL_007d + + + IL_007b: ldloc.0 + IL_007c: throw + + + IL_007d: ret + + + +f@8::get_CheckClose + + IL_0000: ldarg.0 + IL_0001: ldfld pc + IL_0006: switch (4 targets) + IL_001b: br.s IL_0029 + + + IL_001d: nop + IL_001e: br.s IL_0030 + + + IL_0020: nop + IL_0021: br.s IL_002e + + + IL_0023: nop + IL_0024: br.s IL_002c + + + IL_0026: nop + IL_0027: br.s IL_0030 + + + IL_0029: nop + IL_002a: br.s IL_002c + + + IL_002c: ldc.i4.1 + IL_002d: ret + IL_002e: ldc.i4.1 + IL_002f: ret + IL_0030: ldc.i4.0 + IL_0031: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Arrow 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Arrow 01.bsl new file mode 100644 index 00000000000..c22c1947a13 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Arrow 01.bsl @@ -0,0 +1,203 @@ +Module::f + (5,5-7,6) seq { for n in l -> n } + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: ldc.i4.0 + IL_0003: ldc.i4.0 + IL_0004: newobj .ctor + IL_0009: ret + +f@6::GenerateNext + + IL_0000: ldarg.0 + IL_0001: ldfld pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch (3 targets) + IL_0019: br.s IL_0024 + + + IL_001b: nop + IL_001c: br.s IL_006c + + + IL_001e: nop + IL_001f: br.s IL_005f + + + IL_0021: nop + IL_0022: br.s IL_008d + + + IL_0024: nop + IL_0025: br.s IL_0027 + + (6,9-6,12) for + IL_0027: ldarg.0 + IL_0028: ldarg.0 + IL_0029: ldfld l + IL_002e: callvirt GetEnumerator + IL_0033: stfld enum + IL_0038: ldarg.0 + IL_0039: ldc.i4.1 + IL_003a: stfld pc + IL_003f: br.s IL_005f + IL_0041: ldarg.0 + IL_0042: ldfld enum + IL_0047: callvirt get_Current + IL_004c: stloc.0 + IL_004d: ldarg.0 + IL_004e: ldc.i4.2 + IL_004f: stfld pc + IL_0054: ldarg.0 + IL_0055: stloc.1 + + (6,23-6,24) n + IL_0056: ldloc.1 + IL_0057: ldloc.0 + IL_0058: stfld current + IL_005d: ldc.i4.1 + IL_005e: ret + + (6,15-6,17) in + IL_005f: ldarg.0 + IL_0060: ldfld enum + IL_0065: callvirt MoveNext + IL_006a: brtrue.s IL_0041 + IL_006c: ldarg.0 + IL_006d: ldc.i4.3 + IL_006e: stfld pc + IL_0073: ldarg.0 + IL_0074: ldfld enum + IL_0079: call Dispose + IL_007e: nop + IL_007f: ldarg.0 + IL_0080: ldnull + IL_0081: stfld enum + IL_0086: ldarg.0 + IL_0087: ldc.i4.3 + IL_0088: stfld pc + IL_008d: ldarg.0 + IL_008e: ldc.i4.0 + IL_008f: stfld current + IL_0094: ldc.i4.0 + IL_0095: ret + +f@6::Close + + IL_0000: ldarg.0 + IL_0001: ldfld pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch (1 targets) + IL_0011: br.s IL_0016 + + + IL_0013: nop + IL_0014: br.s IL_0078 + + + IL_0016: nop + + + IL_0017: ldarg.0 + IL_0018: ldfld pc + IL_001d: switch (4 targets) + IL_0032: br.s IL_0040 + + + IL_0034: nop + IL_0035: br.s IL_0058 + + + IL_0037: nop + IL_0038: br.s IL_0044 + + + IL_003a: nop + IL_003b: br.s IL_0043 + + + IL_003d: nop + IL_003e: br.s IL_0058 + + + IL_0040: nop + IL_0041: br.s IL_0043 + + + IL_0043: nop + IL_0044: ldarg.0 + IL_0045: ldc.i4.3 + IL_0046: stfld pc + IL_004b: ldarg.0 + IL_004c: ldfld enum + IL_0051: call Dispose + IL_0056: nop + + + IL_0057: nop + IL_0058: ldarg.0 + IL_0059: ldc.i4.3 + IL_005a: stfld pc + IL_005f: ldarg.0 + IL_0060: ldc.i4.0 + IL_0061: stfld current + IL_0066: leave.s IL_0072 + IL_0068: castclass Exception + IL_006d: stloc.1 + IL_006e: ldloc.1 + IL_006f: stloc.0 + IL_0070: leave.s IL_0072 + + + IL_0072: nop + IL_0073: br IL_0000 + + + IL_0078: ldloc.0 + IL_0079: brfalse.s IL_007d + + + IL_007b: ldloc.0 + IL_007c: throw + + + IL_007d: ret + + + +f@6::get_CheckClose + + IL_0000: ldarg.0 + IL_0001: ldfld pc + IL_0006: switch (4 targets) + IL_001b: br.s IL_0029 + + + IL_001d: nop + IL_001e: br.s IL_0030 + + + IL_0020: nop + IL_0021: br.s IL_002e + + + IL_0023: nop + IL_0024: br.s IL_002c + + + IL_0026: nop + IL_0027: br.s IL_0030 + + + IL_0029: nop + IL_002a: br.s IL_002c + + + IL_002c: ldc.i4.1 + IL_002d: ret + IL_002e: ldc.i4.1 + IL_002f: ret + IL_0030: ldc.i4.0 + IL_0031: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Tuple 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Tuple 01.bsl new file mode 100644 index 00000000000..c87c15661e4 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Tuple 01.bsl @@ -0,0 +1,203 @@ +Module::f + (5,5-8,6) seq { for n in l do yield n } + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: ldc.i4.0 + IL_0003: ldnull + IL_0004: newobj .ctor + IL_0009: ret + +f@6::GenerateNext + + IL_0000: ldarg.0 + IL_0001: ldfld pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch (3 targets) + IL_0019: br.s IL_0024 + + + IL_001b: nop + IL_001c: br.s IL_006c + + + IL_001e: nop + IL_001f: br.s IL_005f + + + IL_0021: nop + IL_0022: br.s IL_008d + + + IL_0024: nop + IL_0025: br.s IL_0027 + + (6,9-6,12) for + IL_0027: ldarg.0 + IL_0028: ldarg.0 + IL_0029: ldfld l + IL_002e: callvirt GetEnumerator + IL_0033: stfld enum + IL_0038: ldarg.0 + IL_0039: ldc.i4.1 + IL_003a: stfld pc + IL_003f: br.s IL_005f + IL_0041: ldarg.0 + IL_0042: ldfld enum + IL_0047: callvirt get_Current + IL_004c: stloc.0 + IL_004d: ldarg.0 + IL_004e: ldc.i4.2 + IL_004f: stfld pc + IL_0054: ldarg.0 + IL_0055: stloc.1 + + (7,13-7,20) yield n + IL_0056: ldloc.1 + IL_0057: ldloc.0 + IL_0058: stfld current + IL_005d: ldc.i4.1 + IL_005e: ret + + (6,15-6,17) in + IL_005f: ldarg.0 + IL_0060: ldfld enum + IL_0065: callvirt MoveNext + IL_006a: brtrue.s IL_0041 + IL_006c: ldarg.0 + IL_006d: ldc.i4.3 + IL_006e: stfld pc + IL_0073: ldarg.0 + IL_0074: ldfld enum + IL_0079: call Dispose + IL_007e: nop + IL_007f: ldarg.0 + IL_0080: ldnull + IL_0081: stfld enum + IL_0086: ldarg.0 + IL_0087: ldc.i4.3 + IL_0088: stfld pc + IL_008d: ldarg.0 + IL_008e: ldnull + IL_008f: stfld current + IL_0094: ldc.i4.0 + IL_0095: ret + +f@6::Close + + IL_0000: ldarg.0 + IL_0001: ldfld pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch (1 targets) + IL_0011: br.s IL_0016 + + + IL_0013: nop + IL_0014: br.s IL_0078 + + + IL_0016: nop + + + IL_0017: ldarg.0 + IL_0018: ldfld pc + IL_001d: switch (4 targets) + IL_0032: br.s IL_0040 + + + IL_0034: nop + IL_0035: br.s IL_0058 + + + IL_0037: nop + IL_0038: br.s IL_0044 + + + IL_003a: nop + IL_003b: br.s IL_0043 + + + IL_003d: nop + IL_003e: br.s IL_0058 + + + IL_0040: nop + IL_0041: br.s IL_0043 + + + IL_0043: nop + IL_0044: ldarg.0 + IL_0045: ldc.i4.3 + IL_0046: stfld pc + IL_004b: ldarg.0 + IL_004c: ldfld enum + IL_0051: call Dispose + IL_0056: nop + + + IL_0057: nop + IL_0058: ldarg.0 + IL_0059: ldc.i4.3 + IL_005a: stfld pc + IL_005f: ldarg.0 + IL_0060: ldnull + IL_0061: stfld current + IL_0066: leave.s IL_0072 + IL_0068: castclass Exception + IL_006d: stloc.1 + IL_006e: ldloc.1 + IL_006f: stloc.0 + IL_0070: leave.s IL_0072 + + + IL_0072: nop + IL_0073: br IL_0000 + + + IL_0078: ldloc.0 + IL_0079: brfalse.s IL_007d + + + IL_007b: ldloc.0 + IL_007c: throw + + + IL_007d: ret + + + +f@6::get_CheckClose + + IL_0000: ldarg.0 + IL_0001: ldfld pc + IL_0006: switch (4 targets) + IL_001b: br.s IL_0029 + + + IL_001d: nop + IL_001e: br.s IL_0030 + + + IL_0020: nop + IL_0021: br.s IL_002e + + + IL_0023: nop + IL_0024: br.s IL_002c + + + IL_0026: nop + IL_0027: br.s IL_0030 + + + IL_0029: nop + IL_002a: br.s IL_002c + + + IL_002c: ldc.i4.1 + IL_002d: ret + IL_002e: ldc.i4.1 + IL_002f: ret + IL_0030: ldc.i4.0 + IL_0031: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Tuple 02.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Tuple 02.bsl new file mode 100644 index 00000000000..563e2b0a3f0 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Tuple 02.bsl @@ -0,0 +1,207 @@ +Module::f + (5,5-8,6) seq { for i, i1 in l do yield i } + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: ldc.i4.0 + IL_0003: ldc.i4.0 + IL_0004: newobj .ctor + IL_0009: ret + +f@6::GenerateNext + + IL_0000: ldarg.0 + IL_0001: ldfld pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch (3 targets) + IL_0019: br.s IL_0024 + + + IL_001b: nop + IL_001c: br.s IL_0078 + + + IL_001e: nop + IL_001f: br.s IL_006b + + + IL_0021: nop + IL_0022: br.s IL_0099 + + + IL_0024: nop + IL_0025: br.s IL_0027 + + (6,9-6,12) for + IL_0027: ldarg.0 + IL_0028: ldarg.0 + IL_0029: ldfld l + IL_002e: callvirt GetEnumerator + IL_0033: stfld enum + IL_0038: ldarg.0 + IL_0039: ldc.i4.1 + IL_003a: stfld pc + IL_003f: br.s IL_006b + IL_0041: ldarg.0 + IL_0042: ldfld enum + IL_0047: callvirt get_Current + IL_004c: stloc.0 + IL_004d: ldloc.0 + IL_004e: call get_Item2 + IL_0053: stloc.1 + IL_0054: ldloc.0 + IL_0055: call get_Item1 + IL_005a: stloc.2 + + (7,13-7,20) yield i + IL_005b: ldarg.0 + IL_005c: ldc.i4.2 + IL_005d: stfld pc + IL_0062: ldarg.0 + IL_0063: ldloc.2 + IL_0064: stfld current + IL_0069: ldc.i4.1 + IL_006a: ret + + (6,19-6,21) in + IL_006b: ldarg.0 + IL_006c: ldfld enum + IL_0071: callvirt MoveNext + IL_0076: brtrue.s IL_0041 + IL_0078: ldarg.0 + IL_0079: ldc.i4.3 + IL_007a: stfld pc + IL_007f: ldarg.0 + IL_0080: ldfld enum + IL_0085: call Dispose + IL_008a: nop + IL_008b: ldarg.0 + IL_008c: ldnull + IL_008d: stfld enum + IL_0092: ldarg.0 + IL_0093: ldc.i4.3 + IL_0094: stfld pc + IL_0099: ldarg.0 + IL_009a: ldc.i4.0 + IL_009b: stfld current + IL_00a0: ldc.i4.0 + IL_00a1: ret + +f@6::Close + + IL_0000: ldarg.0 + IL_0001: ldfld pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch (1 targets) + IL_0011: br.s IL_0016 + + + IL_0013: nop + IL_0014: br.s IL_0078 + + + IL_0016: nop + + + IL_0017: ldarg.0 + IL_0018: ldfld pc + IL_001d: switch (4 targets) + IL_0032: br.s IL_0040 + + + IL_0034: nop + IL_0035: br.s IL_0058 + + + IL_0037: nop + IL_0038: br.s IL_0044 + + + IL_003a: nop + IL_003b: br.s IL_0043 + + + IL_003d: nop + IL_003e: br.s IL_0058 + + + IL_0040: nop + IL_0041: br.s IL_0043 + + + IL_0043: nop + IL_0044: ldarg.0 + IL_0045: ldc.i4.3 + IL_0046: stfld pc + IL_004b: ldarg.0 + IL_004c: ldfld enum + IL_0051: call Dispose + IL_0056: nop + + + IL_0057: nop + IL_0058: ldarg.0 + IL_0059: ldc.i4.3 + IL_005a: stfld pc + IL_005f: ldarg.0 + IL_0060: ldc.i4.0 + IL_0061: stfld current + IL_0066: leave.s IL_0072 + IL_0068: castclass Exception + IL_006d: stloc.1 + IL_006e: ldloc.1 + IL_006f: stloc.0 + IL_0070: leave.s IL_0072 + + + IL_0072: nop + IL_0073: br IL_0000 + + + IL_0078: ldloc.0 + IL_0079: brfalse.s IL_007d + + + IL_007b: ldloc.0 + IL_007c: throw + + + IL_007d: ret + + + +f@6::get_CheckClose + + IL_0000: ldarg.0 + IL_0001: ldfld pc + IL_0006: switch (4 targets) + IL_001b: br.s IL_0029 + + + IL_001d: nop + IL_001e: br.s IL_0030 + + + IL_0020: nop + IL_0021: br.s IL_002e + + + IL_0023: nop + IL_0024: br.s IL_002c + + + IL_0026: nop + IL_0027: br.s IL_0030 + + + IL_0029: nop + IL_002a: br.s IL_002c + + + IL_002c: ldc.i4.1 + IL_002d: ret + IL_002e: ldc.i4.1 + IL_002f: ret + IL_0030: ldc.i4.0 + IL_0031: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Value 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Value 01.bsl new file mode 100644 index 00000000000..6e703a4a985 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Value 01.bsl @@ -0,0 +1,213 @@ +Module::.cctor + + IL_0000: ldc.i4.0 + IL_0001: stsfld init@ + IL_0006: ldsfld init@ + IL_000b: pop + IL_000c: ret + +Module::staticInitialization@ + (5,5-8,6) seq { for n in 1..10 do yield n } + IL_0000: ldnull + IL_0001: ldc.i4.0 + IL_0002: ldc.i4.0 + IL_0003: newobj .ctor + IL_0008: stsfld a@4 + IL_000d: ret + +a@6::GenerateNext + + IL_0000: ldarg.0 + IL_0001: ldfld pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch (3 targets) + IL_0019: br.s IL_0024 + + + IL_001b: nop + IL_001c: br.s IL_006f + + + IL_001e: nop + IL_001f: br.s IL_0062 + + + IL_0021: nop + IL_0022: br.s IL_0090 + + + IL_0024: nop + IL_0025: br.s IL_0027 + + (6,9-6,12) for + IL_0027: ldarg.0 + IL_0028: ldc.i4.1 + IL_0029: ldc.i4.1 + IL_002a: ldc.i4.s 10 + IL_002c: call RangeInt32 + IL_0031: callvirt GetEnumerator + IL_0036: stfld enum + IL_003b: ldarg.0 + IL_003c: ldc.i4.1 + IL_003d: stfld pc + IL_0042: br.s IL_0062 + IL_0044: ldarg.0 + IL_0045: ldfld enum + IL_004a: callvirt get_Current + IL_004f: stloc.0 + IL_0050: ldarg.0 + IL_0051: ldc.i4.2 + IL_0052: stfld pc + IL_0057: ldarg.0 + IL_0058: stloc.1 + + (7,13-7,20) yield n + IL_0059: ldloc.1 + IL_005a: ldloc.0 + IL_005b: stfld current + IL_0060: ldc.i4.1 + IL_0061: ret + + (6,15-6,17) in + IL_0062: ldarg.0 + IL_0063: ldfld enum + IL_0068: callvirt MoveNext + IL_006d: brtrue.s IL_0044 + IL_006f: ldarg.0 + IL_0070: ldc.i4.3 + IL_0071: stfld pc + IL_0076: ldarg.0 + IL_0077: ldfld enum + IL_007c: call Dispose + IL_0081: nop + IL_0082: ldarg.0 + IL_0083: ldnull + IL_0084: stfld enum + IL_0089: ldarg.0 + IL_008a: ldc.i4.3 + IL_008b: stfld pc + IL_0090: ldarg.0 + IL_0091: ldc.i4.0 + IL_0092: stfld current + IL_0097: ldc.i4.0 + IL_0098: ret + +a@6::Close + + IL_0000: ldarg.0 + IL_0001: ldfld pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch (1 targets) + IL_0011: br.s IL_0016 + + + IL_0013: nop + IL_0014: br.s IL_0078 + + + IL_0016: nop + + + IL_0017: ldarg.0 + IL_0018: ldfld pc + IL_001d: switch (4 targets) + IL_0032: br.s IL_0040 + + + IL_0034: nop + IL_0035: br.s IL_0058 + + + IL_0037: nop + IL_0038: br.s IL_0044 + + + IL_003a: nop + IL_003b: br.s IL_0043 + + + IL_003d: nop + IL_003e: br.s IL_0058 + + + IL_0040: nop + IL_0041: br.s IL_0043 + + + IL_0043: nop + IL_0044: ldarg.0 + IL_0045: ldc.i4.3 + IL_0046: stfld pc + IL_004b: ldarg.0 + IL_004c: ldfld enum + IL_0051: call Dispose + IL_0056: nop + + + IL_0057: nop + IL_0058: ldarg.0 + IL_0059: ldc.i4.3 + IL_005a: stfld pc + IL_005f: ldarg.0 + IL_0060: ldc.i4.0 + IL_0061: stfld current + IL_0066: leave.s IL_0072 + IL_0068: castclass Exception + IL_006d: stloc.1 + IL_006e: ldloc.1 + IL_006f: stloc.0 + IL_0070: leave.s IL_0072 + + + IL_0072: nop + IL_0073: br IL_0000 + + + IL_0078: ldloc.0 + IL_0079: brfalse.s IL_007d + + + IL_007b: ldloc.0 + IL_007c: throw + + + IL_007d: ret + + + +a@6::get_CheckClose + + IL_0000: ldarg.0 + IL_0001: ldfld pc + IL_0006: switch (4 targets) + IL_001b: br.s IL_0029 + + + IL_001d: nop + IL_001e: br.s IL_0030 + + + IL_0020: nop + IL_0021: br.s IL_002e + + + IL_0023: nop + IL_0024: br.s IL_002c + + + IL_0026: nop + IL_0027: br.s IL_0030 + + + IL_0029: nop + IL_002a: br.s IL_002c + + + IL_002c: ldc.i4.1 + IL_002d: ret + IL_002e: ldc.i4.1 + IL_002f: ret + IL_0030: ldc.i4.0 + IL_0031: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Value 02.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Value 02.bsl new file mode 100644 index 00000000000..93ea36c1411 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Value 02.bsl @@ -0,0 +1,203 @@ +Module::f + (5,5-8,6) seq { for n in l do yield n } + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: ldc.i4.0 + IL_0003: ldc.i4.0 + IL_0004: newobj .ctor + IL_0009: ret + +f@6::GenerateNext + + IL_0000: ldarg.0 + IL_0001: ldfld pc + IL_0006: ldc.i4.1 + IL_0007: sub + IL_0008: switch (3 targets) + IL_0019: br.s IL_0024 + + + IL_001b: nop + IL_001c: br.s IL_006c + + + IL_001e: nop + IL_001f: br.s IL_005f + + + IL_0021: nop + IL_0022: br.s IL_008d + + + IL_0024: nop + IL_0025: br.s IL_0027 + + (6,9-6,12) for + IL_0027: ldarg.0 + IL_0028: ldarg.0 + IL_0029: ldfld l + IL_002e: callvirt GetEnumerator + IL_0033: stfld enum + IL_0038: ldarg.0 + IL_0039: ldc.i4.1 + IL_003a: stfld pc + IL_003f: br.s IL_005f + IL_0041: ldarg.0 + IL_0042: ldfld enum + IL_0047: callvirt get_Current + IL_004c: stloc.0 + IL_004d: ldarg.0 + IL_004e: ldc.i4.2 + IL_004f: stfld pc + IL_0054: ldarg.0 + IL_0055: stloc.1 + + (7,13-7,20) yield n + IL_0056: ldloc.1 + IL_0057: ldloc.0 + IL_0058: stfld current + IL_005d: ldc.i4.1 + IL_005e: ret + + (6,15-6,17) in + IL_005f: ldarg.0 + IL_0060: ldfld enum + IL_0065: callvirt MoveNext + IL_006a: brtrue.s IL_0041 + IL_006c: ldarg.0 + IL_006d: ldc.i4.3 + IL_006e: stfld pc + IL_0073: ldarg.0 + IL_0074: ldfld enum + IL_0079: call Dispose + IL_007e: nop + IL_007f: ldarg.0 + IL_0080: ldnull + IL_0081: stfld enum + IL_0086: ldarg.0 + IL_0087: ldc.i4.3 + IL_0088: stfld pc + IL_008d: ldarg.0 + IL_008e: ldc.i4.0 + IL_008f: stfld current + IL_0094: ldc.i4.0 + IL_0095: ret + +f@6::Close + + IL_0000: ldarg.0 + IL_0001: ldfld pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch (1 targets) + IL_0011: br.s IL_0016 + + + IL_0013: nop + IL_0014: br.s IL_0078 + + + IL_0016: nop + + + IL_0017: ldarg.0 + IL_0018: ldfld pc + IL_001d: switch (4 targets) + IL_0032: br.s IL_0040 + + + IL_0034: nop + IL_0035: br.s IL_0058 + + + IL_0037: nop + IL_0038: br.s IL_0044 + + + IL_003a: nop + IL_003b: br.s IL_0043 + + + IL_003d: nop + IL_003e: br.s IL_0058 + + + IL_0040: nop + IL_0041: br.s IL_0043 + + + IL_0043: nop + IL_0044: ldarg.0 + IL_0045: ldc.i4.3 + IL_0046: stfld pc + IL_004b: ldarg.0 + IL_004c: ldfld enum + IL_0051: call Dispose + IL_0056: nop + + + IL_0057: nop + IL_0058: ldarg.0 + IL_0059: ldc.i4.3 + IL_005a: stfld pc + IL_005f: ldarg.0 + IL_0060: ldc.i4.0 + IL_0061: stfld current + IL_0066: leave.s IL_0072 + IL_0068: castclass Exception + IL_006d: stloc.1 + IL_006e: ldloc.1 + IL_006f: stloc.0 + IL_0070: leave.s IL_0072 + + + IL_0072: nop + IL_0073: br IL_0000 + + + IL_0078: ldloc.0 + IL_0079: brfalse.s IL_007d + + + IL_007b: ldloc.0 + IL_007c: throw + + + IL_007d: ret + + + +f@6::get_CheckClose + + IL_0000: ldarg.0 + IL_0001: ldfld pc + IL_0006: switch (4 targets) + IL_001b: br.s IL_0029 + + + IL_001d: nop + IL_001e: br.s IL_0030 + + + IL_0020: nop + IL_0021: br.s IL_002e + + + IL_0023: nop + IL_0024: br.s IL_002c + + + IL_0026: nop + IL_0027: br.s IL_0030 + + + IL_0029: nop + IL_002a: br.s IL_002c + + + IL_002c: ldc.i4.1 + IL_002d: ret + IL_002e: ldc.i4.1 + IL_002f: ret + IL_0030: ldc.i4.0 + IL_0031: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Pattern - ActivePattern 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Pattern - ActivePattern 01.bsl new file mode 100644 index 00000000000..b367716fac3 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Pattern - ActivePattern 01.bsl @@ -0,0 +1,50 @@ +Module::|Id| + (4,23-4,24) x + IL_0000: ldarg.0 + IL_0001: ret + +Module::f + (7,17-7,18) l + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: callvirt GetEnumerator + IL_0008: stloc.1 + IL_0009: br.s IL_001d + + (7,5-7,13) for Id i + IL_000b: ldloc.1 + IL_000c: callvirt get_Current + IL_0011: stloc.2 + IL_0012: ldloc.2 + IL_0013: call |Id| + IL_0018: stloc.3 + IL_0019: ldloc.3 + IL_001a: stloc.s 4 + + (8,9-8,11) () + IL_001c: nop + + (7,14-7,16) in + IL_001d: ldloc.1 + IL_001e: callvirt MoveNext + IL_0023: brtrue.s IL_000b + IL_0025: leave.s IL_003c + IL_0027: ldloc.1 + IL_0028: isinst IDisposable + IL_002d: stloc.s 5 + + + IL_002f: ldloc.s 5 + IL_0031: brfalse.s IL_003b + + + IL_0033: ldloc.s 5 + IL_0035: callvirt Dispose + IL_003a: endfinally + + + IL_003b: endfinally + + + IL_003c: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Pattern - Tuple 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Pattern - Tuple 01.bsl new file mode 100644 index 00000000000..1d789aafae2 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Pattern - Tuple 01.bsl @@ -0,0 +1,46 @@ +Module::f + (5,19-5,20) l + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: callvirt GetEnumerator + IL_0008: stloc.1 + IL_0009: br.s IL_0022 + + (5,5-5,15) for i1, i2 + IL_000b: ldloc.1 + IL_000c: callvirt get_Current + IL_0011: stloc.2 + IL_0012: ldloc.2 + IL_0013: call get_Item2 + IL_0018: stloc.3 + IL_0019: ldloc.2 + IL_001a: call get_Item1 + IL_001f: stloc.s 4 + + (6,9-6,11) () + IL_0021: nop + + (5,16-5,18) in + IL_0022: ldloc.1 + IL_0023: callvirt MoveNext + IL_0028: brtrue.s IL_000b + IL_002a: leave.s IL_0041 + IL_002c: ldloc.1 + IL_002d: isinst IDisposable + IL_0032: stloc.s 5 + + + IL_0034: ldloc.s 5 + IL_0036: brfalse.s IL_0040 + + + IL_0038: ldloc.s 5 + IL_003a: callvirt Dispose + IL_003f: endfinally + + + IL_0040: endfinally + + + IL_0041: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Simple 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Simple 01.bsl new file mode 100644 index 00000000000..cf20ed793cc --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Simple 01.bsl @@ -0,0 +1,40 @@ +Module::f + (5,14-5,15) l + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: callvirt GetEnumerator + IL_0008: stloc.1 + IL_0009: br.s IL_0013 + + (5,5-5,10) for i + IL_000b: ldloc.1 + IL_000c: callvirt get_Current + IL_0011: stloc.2 + + (6,9-6,11) () + IL_0012: nop + + (5,11-5,13) in + IL_0013: ldloc.1 + IL_0014: callvirt MoveNext + IL_0019: brtrue.s IL_000b + IL_001b: leave.s IL_002f + IL_001d: ldloc.1 + IL_001e: isinst IDisposable + IL_0023: stloc.3 + + + IL_0024: ldloc.3 + IL_0025: brfalse.s IL_002e + + + IL_0027: ldloc.3 + IL_0028: callvirt Dispose + IL_002d: endfinally + + + IL_002e: endfinally + + + IL_002f: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/String - Body - SingleStatement 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/String - Body - SingleStatement 01.bsl new file mode 100644 index 00000000000..571e8a5476a --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/String - Body - SingleStatement 01.bsl @@ -0,0 +1,38 @@ +Module::f + (5,14-5,15) l + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldc.i4.0 + IL_0003: stloc.2 + IL_0004: ldloc.0 + IL_0005: callvirt get_Length + IL_000a: ldc.i4.1 + IL_000b: sub + IL_000c: stloc.1 + IL_000d: ldloc.1 + IL_000e: ldloc.2 + IL_000f: blt.s IL_0029 + + (5,5-5,10) for c + IL_0011: ldloc.0 + IL_0012: ldloc.2 + IL_0013: callvirt get_Chars + IL_0018: stloc.3 + + (6,9-6,35) System.Console.WriteLine c + IL_0019: ldloc.3 + IL_001a: call WriteLine + + + IL_001f: ldloc.2 + IL_0020: ldc.i4.1 + IL_0021: add + IL_0022: stloc.2 + + (5,11-5,13) in + IL_0023: ldloc.2 + IL_0024: ldloc.1 + IL_0025: ldc.i4.1 + IL_0026: add + IL_0027: bne.un.s IL_0011 + IL_0029: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - LetThenValue 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - LetThenValue 01.bsl new file mode 100644 index 00000000000..7d3acc1e66a --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - LetThenValue 01.bsl @@ -0,0 +1,8 @@ +Module::f + (5,5-5,14) let i = 1 + IL_0000: ldc.i4.1 + IL_0001: stloc.0 + + (6,5-6,6) 1 + IL_0002: ldc.i4.1 + IL_0003: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - SequentialUnits 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - SequentialUnits 01.bsl new file mode 100644 index 00000000000..61f9775be11 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - SequentialUnits 01.bsl @@ -0,0 +1,6 @@ +Module::f + (5,5-5,7) () + IL_0000: nop + + (6,5-6,7) () + IL_0001: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - Unit 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - Unit 01.bsl new file mode 100644 index 00000000000..f3a13298d7a --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/Function/Body - Unit 01.bsl @@ -0,0 +1,3 @@ +Module::f + (5,5-5,7) () + IL_0000: ret diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/SequencePointsTests.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/SequencePointsTests.fs new file mode 100644 index 00000000000..3d373e0921f --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/SequencePointsTests.fs @@ -0,0 +1,472 @@ +module EmittedIL.SequencePointsTests + +open System.Diagnostics +open System.IO +open System.Runtime.CompilerServices +open System.Runtime.InteropServices +open Xunit +open FSharp.Test.Compiler + +[] +type private Baseline = + static member verify(source, [] name: string) = + let moduleName = StackTrace().GetFrame(1).GetMethod().DeclaringType.Name + FSharp source + |> asLibrary + |> withPortablePdb + |> withNoOptimize + |> compile + |> shouldSucceed + |> verifySequencePointsBaseline source (Path.Combine(__SOURCE_DIRECTORY__, moduleName, name + ".bsl")) + |> ignore + +module Function = + [] + let ``Body - Unit 01`` () = + Baseline.verify """ +module Module + +let f () = + () +""" + + [] + let ``Body - LetThenValue 01`` () = + Baseline.verify """ +module Module + +let f () = + let i = 1 + 1 +""" + + [] + let ``Body - SequentialUnits 01`` () = + Baseline.verify """ +module Module + +let f () = + () + () +""" + +module ForEach = + [] + let ``List - Simple 01`` () = + Baseline.verify """ +module Module + +let f (l: int list) = + for i in l do + () +""" + + [] + let ``List - Body - SingleStatement 01`` () = + Baseline.verify """ +module Module + +let f (l: int list) = + for i in l do + System.Console.WriteLine i +""" + + [] + let ``List - Body - MultipleStatements 01`` () = + Baseline.verify """ +module Module + +let f (l: int list) = + for i in l do + System.Console.WriteLine i + System.Console.WriteLine(i + 1) +""" + + [] + let ``List - Body - ParenUnit 01`` () = + Baseline.verify """ +module Module + +let f (l: int list) = + for i in l do + (()) +""" + + [] + let ``List - Body - SequentialUnits 01`` () = + Baseline.verify """ +module Module + +let f (l: int list) = + for i in l do + () + () +""" + + [] + let ``List - Body - LetUnit 01`` () = + Baseline.verify """ +module Module + +let f (l: int list) = + for i in l do + let _ = () + () +""" + + [] + let ``List - Pattern - Tuple 01`` () = + Baseline.verify """ +module Module + +let f (l: (int * int) list) = + for i1, i2 in l do + () +""" + + [] + let ``List - Pattern - ActivePattern 01`` () = + Baseline.verify """ +module Module + +let (|Id|) (x: int) = x + +let f (l: int list) = + for Id i in l do + () +""" + + [] + let ``List - Comprehensions - Value 01`` () = + Baseline.verify """ +module Module + +let a = + [ + for n in 1..10 do + yield n + ] +""" + + [] + let ``List - Comprehensions - Value 02`` () = + Baseline.verify """ +module Module + +let f (l: int list) = + [ + for n in l do + yield n + ] +""" + + [] + let ``List - Comprehensions - Tuple 01`` () = + Baseline.verify """ +module Module + +let f (l: (int * int) list) = + [ + for n in l do + yield n + ] +""" + + [] + let ``List - Comprehensions - Tuple 02`` () = + Baseline.verify """ +module Module + +let f (l: (int * int) list) = + [ + for i, i1 in l do + yield i + ] +""" + + [] + let ``List - Comprehensions - Arrow 01`` () = + Baseline.verify """ +module Module + +let f (l: int list) = + [ + for n in l -> n + ] +""" + + [] + let ``List - Comprehensions - ActivePattern 01`` () = + Baseline.verify """ +module Module + +let (|Id|) (x: int) = x + +let f (l: int list) = + [ + for Id i in l do + yield i + ] +""" + + [] + let ``Array - Simple 01`` () = + Baseline.verify """ +module Module + +let f (l: int[]) = + for i in l do + () +""" + + [] + let ``Array - Body - SingleStatement 01`` () = + Baseline.verify """ +module Module + +let f (l: int[]) = + for i in l do + System.Console.WriteLine i +""" + + [] + let ``Array - Body - MultipleStatements 01`` () = + Baseline.verify """ +module Module + +let f (l: int[]) = + for i in l do + System.Console.WriteLine i + System.Console.WriteLine(i + 1) +""" + + [] + let ``Array - Pattern - Tuple 01`` () = + Baseline.verify """ +module Module + +let f (l: (int * int)[]) = + for i1, i2 in l do + () +""" + + [] + let ``Array - Pattern - ActivePattern 01`` () = + Baseline.verify """ +module Module + +let (|Id|) (x: int) = x + +let f (l: int[]) = + for Id i in l do + () +""" + + [] + let ``Array - Comprehensions - Value 01`` () = + Baseline.verify """ +module Module + +let a = + [| + for n in 1..10 do + yield n + |] +""" + + [] + let ``Array - Comprehensions - Value 02`` () = + Baseline.verify """ +module Module + +let f (l: int list) = + [| + for n in l do + yield n + |] +""" + + [] + let ``Array - Comprehensions - Tuple 01`` () = + Baseline.verify """ +module Module + +let f (l: (int * int) list) = + [| + for n in l do + yield n + |] +""" + + [] + let ``Array - Comprehensions - Tuple 02`` () = + Baseline.verify """ +module Module + +let f (l: (int * int) list) = + [| + for i, i1 in l do + yield i + |] +""" + + [] + let ``Array - Comprehensions - Arrow 01`` () = + Baseline.verify """ +module Module + +let f (l: int list) = + [| + for n in l -> n + |] +""" + + [] + let ``Array - Comprehensions - ActivePattern 01`` () = + Baseline.verify """ +module Module + +let (|Id|) (x: int) = x + +let f (l: int list) = + [| + for Id i in l do + yield i + |] +""" + + [] + let ``Seq - Simple 01`` () = + Baseline.verify """ +module Module + +let f (l: int seq) = + for i in l do + () +""" + + [] + let ``Seq - Body - SingleStatement 01`` () = + Baseline.verify """ +module Module + +let f (l: int seq) = + for i in l do + System.Console.WriteLine i +""" + + [] + let ``Seq - Body - MultipleStatements 01`` () = + Baseline.verify """ +module Module + +let f (l: int seq) = + for i in l do + System.Console.WriteLine i + System.Console.WriteLine(i + 1) +""" + + [] + let ``Seq - Pattern - Tuple 01`` () = + Baseline.verify """ +module Module + +let f (l: (int * int) seq) = + for i1, i2 in l do + () +""" + + [] + let ``Seq - Pattern - ActivePattern 01`` () = + Baseline.verify """ +module Module + +let (|Id|) (x: int) = x + +let f (l: int seq) = + for Id i in l do + () +""" + + [] + let ``Seq - Comprehensions - Value 01`` () = + Baseline.verify """ +module Module + +let a = + seq { + for n in 1..10 do + yield n + } +""" + + [] + let ``Seq - Comprehensions - Value 02`` () = + Baseline.verify """ +module Module + +let f (l: int list) = + seq { + for n in l do + yield n + } +""" + + [] + let ``Seq - Comprehensions - Tuple 01`` () = + Baseline.verify """ +module Module + +let f (l: (int * int) list) = + seq { + for n in l do + yield n + } +""" + + [] + let ``Seq - Comprehensions - Tuple 02`` () = + Baseline.verify """ +module Module + +let f (l: (int * int) list) = + seq { + for i, i1 in l do + yield i + } +""" + + [] + let ``Seq - Comprehensions - Arrow 01`` () = + Baseline.verify """ +module Module + +let f (l: int list) = + seq { + for n in l -> n + } +""" + + [] + let ``Seq - Comprehensions - ActivePattern 01`` () = + Baseline.verify """ +module Module + +let (|Id|) (x: int) = x + +let f (l: int list) = + seq { + for Id i in l do + yield i + } +""" + + [] + let ``String - Body - SingleStatement 01`` () = + Baseline.verify """ +module Module + +let f (l: string) = + for c in l do + System.Console.WriteLine c +""" diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SteppingMatch/SteppingMatch08.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SteppingMatch/SteppingMatch08.fs.il.bsl index 4dde7ff829b..e038bd5a127 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SteppingMatch/SteppingMatch08.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SteppingMatch/SteppingMatch08.fs.il.bsl @@ -51,7 +51,8 @@ IL_0011: ldc.i4.0 IL_0012: nop IL_0013: stloc.0 - IL_0014: ret + IL_0014: nop + IL_0015: ret } } @@ -73,4 +74,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj index 3550b60c13e..954c02b8aca 100644 --- a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj +++ b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj @@ -226,6 +226,7 @@ + diff --git a/tests/FSharp.Compiler.Service.Tests/ExprTests.fs b/tests/FSharp.Compiler.Service.Tests/ExprTests.fs index e2cb6787ebd..2aab772a121 100644 --- a/tests/FSharp.Compiler.Service.Tests/ExprTests.fs +++ b/tests/FSharp.Compiler.Service.Tests/ExprTests.fs @@ -900,7 +900,7 @@ let ``Test Optimized Declarations Project1`` () = "let test11(s) = let Pipe #1 input at line 238: Microsoft.FSharp.Core.string = s in M.last2 (Pipe #1 input at line 238) @ (238,4--238,14)"; "let badLoop = badLoop@240.Force Microsoft.FSharp.Core.int>(()) @ (240,8--240,15)"; "type LetLambda"; - "let f = fun a -> fun b -> Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),a,b) @ (247,8--247,24)"; + "let f = ((); fun a -> fun b -> Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),a,b)) @ (246,8--247,24)"; "let letLambdaRes = let Pipe #1 input at line 249: (Microsoft.FSharp.Core.int * Microsoft.FSharp.Core.int) Microsoft.FSharp.Collections.list = Cons((1,2),Empty()) in ListModule.Map (fun tupledArg -> let a: Microsoft.FSharp.Core.int = tupledArg.Item0 in let b: Microsoft.FSharp.Core.int = tupledArg.Item1 in (LetLambda.f () a) b,Pipe #1 input at line 249) @ (249,19--249,71)"; "let anonRecd = {X = 1; Y = 2} @ (251,15--251,33)"; "let anonRecdGet = (M.anonRecd ().X,M.anonRecd ().Y) @ (252,19--252,41)"] diff --git a/tests/FSharp.Compiler.Service.Tests/StructureTests.fs b/tests/FSharp.Compiler.Service.Tests/StructureTests.fs index 22ff8845e3a..13ea9af5e58 100644 --- a/tests/FSharp.Compiler.Service.Tests/StructureTests.fs +++ b/tests/FSharp.Compiler.Service.Tests/StructureTests.fs @@ -453,7 +453,7 @@ for x in 0 .. 100 -> () """ => [ (2, 0, 4, 14), (2, 0, 4, 14) - (2, 18, 4, 14), (2, 18, 4, 14) ] + (3, 12, 4, 14), (3, 12, 4, 14) ] [] let ``tuple``() = diff --git a/tests/FSharp.Test.Utilities/Compiler.fs b/tests/FSharp.Test.Utilities/Compiler.fs index d5ae4a34a27..86f760a3bee 100644 --- a/tests/FSharp.Test.Utilities/Compiler.fs +++ b/tests/FSharp.Test.Utilities/Compiler.fs @@ -17,7 +17,9 @@ open System.IO open System.Text open System.Text.RegularExpressions open System.Reflection +open System.Reflection.Emit open System.Reflection.Metadata +open System.Reflection.Metadata.Ecma335 open System.Reflection.PortableExecutable open FSharp.Test.CompilerAssertHelpers @@ -1535,27 +1537,29 @@ $ code --diff {outFile} {expectedFile} if expectedScope <> imports then failwith $"Expected imports are different from PDB.\nExpected:\n%A{expectedScope}\nActual:%A{imports}" + let private getMethodDebugInfos (assemblyReader: MetadataReader) (pdbReader: MetadataReader) = + [ for typeDefHandle in assemblyReader.TypeDefinitions do + let td = assemblyReader.GetTypeDefinition typeDefHandle + let typeName = assemblyReader.GetString td.Name + for methodHandle in td.GetMethods() do + let md = assemblyReader.GetMethodDefinition methodHandle + let methodName = assemblyReader.GetString md.Name + let rowNumber = System.Reflection.Metadata.Ecma335.MetadataTokens.GetRowNumber methodHandle + let debugInfoHandle = System.Reflection.Metadata.Ecma335.MetadataTokens.MethodDebugInformationHandle rowNumber + let debugInfo = pdbReader.GetMethodDebugInformation debugInfoHandle + yield typeName, methodName, methodHandle, debugInfo ] + let private getMethodSequencePoints (assemblyPath: string) (pdbReader: MetadataReader) (methodName: string) = use peStream = File.OpenRead(assemblyPath) use peReader = new PEReader(peStream) - let assemblyReader = peReader.GetMetadataReader() - - let methodHandles = - [ for typeDef in assemblyReader.TypeDefinitions do - let td = assemblyReader.GetTypeDefinition(typeDef) - for methodHandle in td.GetMethods() do - let md = assemblyReader.GetMethodDefinition(methodHandle) - let name = assemblyReader.GetString(md.Name) - if name = methodName then - yield methodHandle ] + let methods = + getMethodDebugInfos (peReader.GetMetadataReader()) pdbReader + |> List.filter (fun (_, name, _, _) -> name = methodName) - if methodHandles.IsEmpty then + if methods.IsEmpty then failwith (sprintf "Method '%s' not found in assembly '%s'" methodName assemblyPath) - [ for methodHandle in methodHandles do - let rowNumber = System.Reflection.Metadata.Ecma335.MetadataTokens.GetRowNumber(methodHandle) - let debugInfoHandle = System.Reflection.Metadata.Ecma335.MetadataTokens.MethodDebugInformationHandle(rowNumber) - let debugInfo = pdbReader.GetMethodDebugInformation(debugInfoHandle) + [ for _, _, _, debugInfo in methods do yield! debugInfo.GetSequencePoints() |> Seq.filter (fun sp -> not sp.IsHidden) @@ -1750,6 +1754,106 @@ $ code --diff {outFile} {expectedFile} verifyNoDebuggerHiddenOnMethodWithLine (optOutputPath |> Option.defaultValue "") reader line | _ -> failwith $"Unknown verification option: {option.ToString()}" + module private Il = + // Keyed by the encoded opcode value: one-byte ops as 0x00-0xFF, two-byte (0xFE-prefixed) as 0xFExx. + let private opsByValue = + dict [ for f in typeof.GetFields(BindingFlags.Public ||| BindingFlags.Static) do + match f.GetValue null with + | :? OpCode as op -> yield (int op.Value &&& 0xffff), op + | _ -> () ] + + let rec private tokenName (mdReader: MetadataReader) (token: int) = + let handle = MetadataTokens.EntityHandle token + let row = MetadataTokens.GetRowNumber handle + match handle.Kind with + | HandleKind.MethodDefinition -> mdReader.GetString (mdReader.GetMethodDefinition(MetadataTokens.MethodDefinitionHandle row)).Name + | HandleKind.MemberReference -> mdReader.GetString (mdReader.GetMemberReference(MetadataTokens.MemberReferenceHandle row)).Name + | HandleKind.FieldDefinition -> mdReader.GetString (mdReader.GetFieldDefinition(MetadataTokens.FieldDefinitionHandle row)).Name + | HandleKind.TypeReference -> mdReader.GetString (mdReader.GetTypeReference(MetadataTokens.TypeReferenceHandle row)).Name + | HandleKind.TypeDefinition -> mdReader.GetString (mdReader.GetTypeDefinition(MetadataTokens.TypeDefinitionHandle row)).Name + | HandleKind.MethodSpecification -> tokenName mdReader (MetadataTokens.GetToken (mdReader.GetMethodSpecification(MetadataTokens.MethodSpecificationHandle row)).Method) + | _ -> sprintf "0x%08x" token + + let decodeMethodIL (mdReader: MetadataReader) (bytes: byte[]) = + [ let mutable pos = 0 + while pos < bytes.Length do + let offset = pos + let b0 = int bytes.[pos] + pos <- pos + 1 + let key = if b0 = 0xFE then (let b1 = int bytes.[pos] in pos <- pos + 1; 0xFE00 ||| b1) else b0 + let op = opsByValue.[key] + let operand = pos + let next size = pos <- operand + size + let text = + match op.OperandType with + | OperandType.InlineNone -> next 0; "" + | OperandType.ShortInlineBrTarget -> next 1; sprintf " IL_%04x" (operand + 1 + int (sbyte bytes.[operand])) + | OperandType.InlineBrTarget -> next 4; sprintf " IL_%04x" (operand + 4 + BitConverter.ToInt32(bytes, operand)) + | OperandType.ShortInlineI -> next 1; sprintf " %d" (sbyte bytes.[operand]) + | OperandType.InlineI -> next 4; sprintf " %d" (BitConverter.ToInt32(bytes, operand)) + | OperandType.InlineI8 -> next 8; sprintf " %d" (BitConverter.ToInt64(bytes, operand)) + | OperandType.ShortInlineR -> next 4; sprintf " %f" (BitConverter.ToSingle(bytes, operand)) + | OperandType.InlineR -> next 8; sprintf " %f" (BitConverter.ToDouble(bytes, operand)) + | OperandType.ShortInlineVar -> next 1; sprintf " %d" (int bytes.[operand]) + | OperandType.InlineVar -> next 2; sprintf " %d" (int (BitConverter.ToUInt16(bytes, operand))) + | OperandType.InlineString -> next 4; sprintf " \"%s\"" (mdReader.GetUserString(MetadataTokens.UserStringHandle(BitConverter.ToInt32(bytes, operand)))) + | OperandType.InlineSwitch -> next (4 + 4 * BitConverter.ToInt32(bytes, operand)); sprintf " (%d targets)" (BitConverter.ToInt32(bytes, operand)) + | _ -> next 4; " " + tokenName mdReader (BitConverter.ToInt32(bytes, operand)) + yield offset, op.Name + text ] + + let private formatSequencePoints (source: string) (assemblyPath: string) (pdbReader: MetadataReader) = + let lines = source.Replace("\r\n", "\n").Replace("\r", "\n").Split('\n') + + let textOf (sp: SequencePoint) = + let sb = StringBuilder() + for lineNo in sp.StartLine .. sp.EndLine do + if lineNo >= 1 && lineNo <= lines.Length then + let line = lines.[lineNo - 1] + let startCol = if lineNo = sp.StartLine then sp.StartColumn - 1 else 0 + let endCol = if lineNo = sp.EndLine then sp.EndColumn - 1 else line.Length + let startCol = max 0 (min startCol line.Length) + let endCol = max startCol (min endCol line.Length) + sb.Append(line.Substring(startCol, endCol - startCol)).Append(' ') |> ignore + Regex.Replace(sb.ToString().Trim(), @"\s+", " ") + + use peStream = File.OpenRead assemblyPath + use peReader = new PEReader(peStream) + let mdReader = peReader.GetMetadataReader() + + let sb = StringBuilder() + for typeName, methodName, methodHandle, debugInfo in getMethodDebugInfos mdReader pdbReader do + let points = debugInfo.GetSequencePoints() |> Seq.sortBy (fun sp -> sp.Offset) |> Seq.toList + if not points.IsEmpty then + let md = mdReader.GetMethodDefinition methodHandle + let instructions = + if md.RelativeVirtualAddress = 0 then [] + else Il.decodeMethodIL mdReader ((peReader.GetMethodBody md.RelativeVirtualAddress).GetILBytes()) + + sb.AppendLine($"{typeName}::{methodName}") |> ignore + points |> List.iteri (fun i sp -> + let nextOffset = if i + 1 < points.Length then points.[i + 1].Offset else Int32.MaxValue + if sp.IsHidden then + sb.AppendLine(" ") |> ignore + else + sb.AppendLine(sprintf " (%d,%d-%d,%d) %s" sp.StartLine sp.StartColumn sp.EndLine sp.EndColumn (textOf sp)) |> ignore + for offset, text in instructions do + if offset >= sp.Offset && offset < nextOffset then + sb.AppendLine(sprintf " IL_%04x: %s" offset text) |> ignore + sb.AppendLine() |> ignore) + sb.ToString().Trim() + "\n" + + let verifySequencePointsBaseline (source: string) (baselineFilePath: string) (result: CompilationResult) : CompilationResult = + match result with + | CompilationResult.Success r -> + match r.OutputPath with + | Some assemblyPath -> + use fileStream = File.OpenRead(Path.ChangeExtension(assemblyPath, ".pdb")) + use provider = MetadataReaderProvider.FromPortablePdbStream fileStream + checkBaseline (formatSequencePoints source assemblyPath (provider.GetMetadataReader())) baselineFilePath + result + | None -> failwith "Operation didn't produce any output!" + | CompilationResult.Failure f -> failwith $"Compilation failed: {f}" + let private verifyPortablePdb (result: CompilationOutput) options : unit = match result.OutputPath with | Some assemblyPath -> diff --git a/tests/fsharp/Compiler/CodeGen/EmittedIL/ComputedListExpressions.fs b/tests/fsharp/Compiler/CodeGen/EmittedIL/ComputedListExpressions.fs index 6a092d222e6..52be7c610ce 100644 --- a/tests/fsharp/Compiler/CodeGen/EmittedIL/ComputedListExpressions.fs +++ b/tests/fsharp/Compiler/CodeGen/EmittedIL/ComputedListExpressions.fs @@ -245,9 +245,9 @@ let ListExpressionSteppingTest5 () = IL_0004: stloc.2 IL_0005: br.s IL_0033 - IL_0007: ldloca.s V_0 - IL_0009: ldloc.2 - IL_000a: stloc.3 + IL_0007: ldloc.2 + IL_0008: stloc.3 + IL_0009: ldloca.s V_0 IL_000b: stloc.s V_4 IL_000d: ldloc.s V_4 IL_000f: ldstr "hello" diff --git a/tests/service/data/SyntaxTree/Expression/List - Comprehension 01.fs.bsl b/tests/service/data/SyntaxTree/Expression/List - Comprehension 01.fs.bsl index a80d19b37bd..46d9378e1cd 100644 --- a/tests/service/data/SyntaxTree/Expression/List - Comprehension 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/List - Comprehension 01.fs.bsl @@ -12,7 +12,7 @@ ImplFile Named (SynIdent (x, None), false, None, (3,6--3,7)), ArrayOrList (false, [], (3,11--3,13)), YieldOrReturn - ((true, false), Const (Unit, (3,17--3,19)), (3,14--3,19), + ((true, false), Const (Unit, (3,17--3,19)), (3,17--3,19), { YieldOrReturnKeyword = (3,14--3,16) }), (3,2--3,19)), (3,0--3,21)), (3,0--3,21))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, diff --git a/tests/service/data/SyntaxTree/Expression/List - Comprehension 02.fs.bsl b/tests/service/data/SyntaxTree/Expression/List - Comprehension 02.fs.bsl index 84d19bf27f3..d06d6769a08 100644 --- a/tests/service/data/SyntaxTree/Expression/List - Comprehension 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/List - Comprehension 02.fs.bsl @@ -15,7 +15,7 @@ ImplFile ((true, false), ArbitraryAfterError ("typedSequentialExprBlockR1", (3,16--3,16)), - (3,14--3,16), { YieldOrReturnKeyword = (3,14--3,16) }), + (3,16--3,16), { YieldOrReturnKeyword = (3,14--3,16) }), (3,2--3,16)), (3,0--3,18)), (3,0--3,18))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,18), { LeadingKeyword = Module (1,0--1,6) })], (true, true), From b8b40f5f24915a2eb02ed78b1190d8fce9c9d84d Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Wed, 10 Jun 2026 17:49:00 +0200 Subject: [PATCH 63/72] Warn on inconsistent [] across extension overloads (#19737) * Detect inconsistent [] across extension overloads (#19604) --- .../CompiledNameAttribute.fs | 12 ++ .../CompiledNameAttribute06.fs | 21 ++++ .../CompiledNameAttribute06.fs.err.bsl | 0 .../CompiledNameAttribute06.fs.il.bsl | 114 ++++++++++++++++++ .../CompiledNameAttribute07.fs | 14 +++ .../CompiledNameAttribute07.fs.err.bsl | 0 .../CompiledNameAttribute07.fs.il.bsl | 111 +++++++++++++++++ 7 files changed, 272 insertions(+) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute06.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute06.fs.err.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute06.fs.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute07.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute07.fs.err.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute07.fs.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute.fs index 8bab5b4ebf6..e11f8108c00 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute.fs @@ -56,3 +56,15 @@ module CompiledNameAttribute = |> compile |> shouldSucceed |> ignore + + [] + let ``CompiledNameAttribute06_fs`` compilation = + compilation + |> getCompilation + |> verifyCompilation + + [] + let ``CompiledNameAttribute07_fs`` compilation = + compilation + |> getCompilation + |> verifyCompilation diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute06.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute06.fs new file mode 100644 index 00000000000..99c4dbc451c --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute06.fs @@ -0,0 +1,21 @@ +// #NoMono #NoMT #CodeGen #EmittedIL #Attributes +// Regression test for https://github.com/dotnet/fsharp/issues/19604 +// EXPECTED: [] applied to one overload renames only that overload in IL. +// The unannotated overload keeps its original logical name. +module Program + +open System +open System.Runtime.CompilerServices +open System.Runtime.InteropServices + +type Builder() = + member _.X = 1 + +[] +module Ext = + type Builder with + [] + member builder.UseCosmosDb ([] storeScopesAndAppsInMemory : bool) = () + + [] + member builder.UseCosmosDb (configuration : Action) = () diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute06.fs.err.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute06.fs.err.bsl new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute06.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute06.fs.il.bsl new file mode 100644 index 00000000000..3827e0c166e --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute06.fs.il.bsl @@ -0,0 +1,114 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly assembly +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + + + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module assembly.exe + +.imagebase {value} +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 +.corflags 0x00000001 + + + + + +.class public abstract auto ansi sealed Program + extends [runtime]System.Object +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .class auto ansi serializable nested public Builder + extends [runtime]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) + .method public specialname rtspecialname instance void .ctor() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: callvirt instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ret + } + + .method public hidebysig specialname instance int32 get_X() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.1 + IL_0001: ret + } + + .property instance int32 X() + { + .get instance int32 Program/Builder::get_X() + } + } + + .class abstract auto ansi sealed nested public Ext + extends [runtime]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.AutoOpenAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .method public static void UseCosmosDb(class Program/Builder builder, + [opt] bool storeScopesAndAppsInMemory) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationSourceNameAttribute::.ctor(string) = ( 01 00 0B 55 73 65 43 6F 73 6D 6F 73 44 62 00 00 ) + .param [2] = bool(false) + + .maxstack 8 + IL_0000: ret + } + + .method public static void Builder.UseCosmosDb(class Program/Builder builder, + class [runtime]System.Action`1 configuration) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + + .maxstack 8 + IL_0000: ret + } + + } + +} + +.class private abstract auto ansi sealed ''.$Program + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute07.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute07.fs new file mode 100644 index 00000000000..9c90889006d --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute07.fs @@ -0,0 +1,14 @@ +// #NoMono #NoMT #CodeGen #EmittedIL #Attributes +// Regression test for https://github.com/dotnet/fsharp/issues/19604 +// EXPECTED: [] with a different value on one overload renames only that overload. +module Program + +type Builder() = + member _.X = 1 + +module Ext = + type Builder with + [] + member builder.UseDb (i: int) = i + + member builder.UseDb (s: string) = s diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute07.fs.err.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute07.fs.err.bsl new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute07.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute07.fs.il.bsl new file mode 100644 index 00000000000..6f9307db070 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute07.fs.il.bsl @@ -0,0 +1,111 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly assembly +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + + + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module assembly.exe + +.imagebase {value} +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 +.corflags 0x00000001 + + + + + +.class public abstract auto ansi sealed Program + extends [runtime]System.Object +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .class auto ansi serializable nested public Builder + extends [runtime]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) + .method public specialname rtspecialname instance void .ctor() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: callvirt instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ret + } + + .method public hidebysig specialname instance int32 get_X() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.1 + IL_0001: ret + } + + .property instance int32 X() + { + .get instance int32 Program/Builder::get_X() + } + } + + .class abstract auto ansi sealed nested public Ext + extends [runtime]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .method public static int32 Renamed(class Program/Builder builder, + int32 i) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationSourceNameAttribute::.ctor(string) = ( 01 00 05 55 73 65 44 62 00 00 ) + + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ret + } + + .method public static string Builder.UseDb(class Program/Builder builder, + string s) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ret + } + + } + +} + +.class private abstract auto ansi sealed ''.$Program + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + From ee4793e5f21c6ad3b003c75a42bbe4aa68349c58 Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Fri, 12 Jun 2026 12:00:17 +0200 Subject: [PATCH 64/72] Fix quotations leaking empty-string match lowering into AST (#19873) (#19923) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Move empty-string match optimization to Optimizer so quotations stay clean The empty-string lowering added in #19189 produced `if x <> null then x.Length = 0 else false` inside `BuildSwitch`, which leaked through pattern-match compilation into captured quotations (#19873). Move the rewrite to `OptimizeExprOp`, which already skips `Expr.Quote` bodies. `match s with "" -> _` keeps the same IL and quotations now see `op_Equality(s, "")`. As a side effect, `if s = "" then _` gets the same null-safe length-check IL — improvement, not regression. Also adds a generic `verifyOutputAgainstBaseline` helper in `Compiler.fs` and a `.bsl`-driven quotation rendering test suite under `Conformance/Expressions/ ExpressionQuotations/QuotationRendering/` to catch future leaks of pattern-match lowerings into quotation ASTs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Lock in IL trade-offs from rubber-duck review; tighten optimizer guard Adversarial reviews flagged two IL-quality concerns. Verified both by inspecting actual ildasm output, accepted both, and added IL tests locking the current behavior in so future changes are conscious: 1. --optimize- (debug) builds no longer get the null+Length fast path for `match s with "" -> _` because F#'s `(=)` is only inlined when LocalOptimizationsEnabled is true. The fallback `String.Equals(s,"")` call is still correct; JIT tiered compilation reaches the fast path. 2. `match s with null | "" -> _` emits one redundant `brfalse` on the empty-string branch because the optimizer cannot see the enclosing null-filtered context that BuildSwitch's `isNullFiltered` flag tracked. JIT trivially eliminates the redundant branch. Also tightens `IsILMethodRefSystemStringEquals` to require the call to be static (rejects hypothetical instance/user-defined `System.String` type with a 2-arg static `Equals`) and fixes a stale function-name comment in PatternMatchCompilation.fs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Polish quotation rendering test suite Driver: extract `printerProgram` helper using a triple-quoted F# string (no more `\"\"` escape hell); group tests into Regression / NoLeakReference / SideEffect / PreExistingError submodules. Baselines: drop the `Match` suffix (folder is already `QuotationRendering`), delete redundant `SparseIntMatch` (same code path as Consecutive), shrink all multi-case tests to the minimum that still demonstrates the point: - ConsecutiveInts: 1..10 → 1..3 (was 41 lines, now 7) - Chars, NonEmptyString: 3 → 2 cases - Int64, Float, Decimal: 3 → 1 case Result: 9 baselines totalling 37 lines, each fits on screen. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Tighten test comments; collapse no-leak quotation tests to Theory The empty-string regression tests and surrounding trade-off comments grew beyond what they need to convey. This trims prose to the causal mechanism only, flattens four banner-only sub-modules into one, collapses the five no-leak reference tests into a parametrised Theory, and corrects a stale docstring claim that Int64/Float/Decimal each take a distinct BuildSwitch arm (Int64 and Float share the mkILAsmCeq path, so Float.bsl was redundant with Int64.bsl and is removed). Release note shrinks from a paragraph to the one user-observable change. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Refactor quotation rendering tests to in-process literals after multi-architect review Three rounds of adversarial multi-model (gpt-5.5, opus-4.7-xhigh, opus-4.8) architect review converged on a cleaner design for the empty-string regression coverage: - Quotation literals now live directly in test method bodies (`<@ … @>`) instead of inside a generated FSI script. They are desugared at test-project compile time by the proto fsc, which converts a runtime baseline diff into a compile-time gate: if #19873 ever regresses, the test source itself fails to compile with FS0452. - Removes the shared-FSI session, the no-op `RunTestCasesInSequence` cargo cult, the string-templated printer with its triple-quote escape guard, and the unused `verifyOutputAgainstBaseline` helper this PR briefly introduced. - Baselines carry a `// ` provenance header so a `.bsl` opened in isolation identifies itself in PR diffs. - Adds an orphan-guard `[]` that fails when `*.bsl` on disk drifts from the test method set (skipped during `TEST_UPDATE_BSL=1` to avoid racing with writes). - Adds a structural Expr walker as belt-and-suspenders alongside the baseline for the two known leaked-lowering shapes (`String.Length`, `String.Equals`). - Adds a convergence assertion that the `match x with ""` and `if x = ""` quotations desugar to byte-identical Exprs, using shared module-level let bindings so the proof and the baselines cannot drift apart. - Splits the FS0452 array-pattern diagnostic test into its own file since it uses a different harness (`FSharp |> typecheck |> shouldFail`, not a `.bsl` snapshot). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Use tname_* constants instead of magic strings in IL method-ref matchers `tname_String`, `tname_Bool`, `tname_Type` already exist in `src/Compiler/AbstractIL/il.fs` as `[]` constants alongside ~20 other type-name literals, but they were not exposed via `il.fsi` so callers in `Optimize/Optimizer.fs` and `Symbols/Exprs.fs` had been duplicating the magic strings (`"System.String"`, `"System.Boolean"`, `"System.Type"`). Exposes the three names actually referenced outside `il.fs` via `il.fsi` and switches the four affected `IL{TypeRef,MethodRef}.Name` comparisons to use them. No behavior change. The fix applies to the empty-string-equals matcher this PR added plus the pre-existing `String.Concat` / `String.GetHashCode` / `Type.GetTypeFromHandle` matchers. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Trim bloated comments in QuotationRenderingTests.fs 5-line walker docstring, 3-line section-divider blocks, 6-line bullet list above the no-leak reference Facts, and a 12-line "Design notes" header were rationalising self-evident code or restating test names. Trimmed to the essentials: top-of-file purpose + bootstrap caveat, one-line note next to the shared `let` bindings, and the one genuinely-non-obvious comment (Int64 takes the mkILAsmCeq arm). Net effect: file shrinks from 156 to 100 lines, signal density up, tests unchanged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Remove orphan-baseline guard Fact It tested filesystem bookkeeping (does *.bsl on disk equal a hand-maintained expectedBaselines set), not the compiler. The drift it catches — a deleted test leaving its .bsl behind — is already visible in `git diff` and adds zero signal anyone would actually use to find a regression. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Cut surviving garbage after multi-agent adversarial scan Three garbage hunters (production / tests / prose) found redundancies that slipped through the earlier iterations: Production: - Merge two String.Equals(_, "")/("", _) optimizer arms into one or-pattern. - Drop the redundant CallingConv.IsStatic guard in IsILMethodRefSystemStringEquals (ArgCount=2 + both args String + return Bool already pin the static overload). - Inline single-use let bindings in MakeOptimizedStringEqualsEmptyCall. - Shrink 4-line docstring to 2 lines; shrink match-arm comment to one line. - Shrink il.fsi block comment and PatternMatchCompilation.fs trade-off comment. Tests: - Delete QuotationUnsupportedConstructsTests.fs (FS0452 array-pattern coverage already exists in Regressions/E_DecomposeArray01.fs — pure duplication). - Delete IfEqualEmpty.bsl + its test + the convergence Fact + the shared `let` bindings + assertNoEmptyStringLowering walker; all duplicated EmptyString.bsl coverage either as identical AST or as belt-and-suspenders restating the baseline diff. - Strip the `// ` provenance header from the printer and from all 7 remaining baselines — the test method name already identifies each baseline. - Trim trade-off comment tails in TypeTestsInPatternMatching.fs (drop the JIT-folds-the-duplicate / tiered-compilation trivia). Release notes: drop the implementation-detail bullet about `if s = ""` getting the same null-safe IL — implied by moving the rewrite to the optimizer. Net: -115/+30 across 16 files. 14 tests still pass; build clean. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Refactor String IL-method matchers via active pattern + InlineIfLambda Extracts a `(|StringTy|_|)` partial active pattern over `ILType` and a small `isILMethodRefOnSystemString` helper that bakes in `tname_String` as the declaring type and takes the per-arg-shape check as an `[]`. Each `IsILMethodRefSystem*` now reads as the literal shape it matches: `[StringTy; StringTy]` for Equals(string, string); the three overload arities of String.Concat as alternative list patterns; `[ILType.Array (shape, StringTy)]` for Concat(string[]). No `ArgCount` book-keeping or `List.forall` walks left. Behaviour unchanged: build clean, 14 quotation + IL tests still green. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Address PR review + fix CI: drop misplaced comment, run quotations via FSI - PatternMatchCompilation.fs: remove the misplaced `// Empty-string is rewritten…` comment on the (now-pristine) string arm (review feedback from @abonie). - QuotationRenderingTests.fs: replace literal `<@…@>` quotations with source-string evaluation through a shared FSI session. The bootstrap fsc that builds the test project still has the pre-fix desugar and rejects literal `match s with ""` quotations with FS0452 — the literals only become valid AFTER this PR is in the bootstrap. FSI uses the just-built FCS (with the fix), so source-as-string evaluation is bootstrap-immune. The .bsl baselines are unchanged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Adam Boniecki <20281641+abonie@users.noreply.github.com> --- .../.FSharp.Compiler.Service/11.0.100.md | 1 + src/Compiler/AbstractIL/il.fsi | 11 ++ .../Checking/PatternMatchCompilation.fs | 7 -- src/Compiler/Optimize/Optimizer.fs | 58 ++++++--- src/Compiler/Symbols/Exprs.fs | 4 +- .../QuotationRendering/Chars.bsl | 4 + .../QuotationRendering/ConsecutiveInts.bsl | 7 ++ .../QuotationRendering/Decimal.bsl | 6 + .../QuotationRendering/EmptyString.bsl | 3 + .../QuotationRendering/Int64.bsl | 3 + .../QuotationRendering/NonEmptyString.bsl | 4 + .../QuotationRendering/NullOrEmpty.bsl | 4 + .../QuotationRenderingTests.fs | 60 +++++++++ .../EmittedIL/TypeTestsInPatternMatching.fs | 115 ++++++++++++++++++ .../FSharp.Compiler.ComponentTests.fsproj | 1 + 15 files changed, 261 insertions(+), 27 deletions(-) create mode 100644 tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ExpressionQuotations/QuotationRendering/Chars.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ExpressionQuotations/QuotationRendering/ConsecutiveInts.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ExpressionQuotations/QuotationRendering/Decimal.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ExpressionQuotations/QuotationRendering/EmptyString.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ExpressionQuotations/QuotationRendering/Int64.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ExpressionQuotations/QuotationRendering/NonEmptyString.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ExpressionQuotations/QuotationRendering/NullOrEmpty.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ExpressionQuotations/QuotationRendering/QuotationRenderingTests.fs diff --git a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md index 965957dbc0c..6b7c8a4099c 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md +++ b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md @@ -75,6 +75,7 @@ ([PR #19724](https://github.com/dotnet/fsharp/pull/19724)) * Emit debug points at a stack-empty position ([PR #19877](https://github.com/dotnet/fsharp/pull/19877)) * Fix spurious XmlDoc warnings (unknown parameter / no documentation for parameter) under `--warnon:3390` when a get/set property documents the full parameter set across both accessors. ([Issue #13684](https://github.com/dotnet/fsharp/issues/13684), [PR #19884](https://github.com/dotnet/fsharp/pull/19884)) +* Quotations of `match s with "" -> _` no longer leak the `s <> null && s.Length = 0` lowering; the empty-string optimization moved from pattern-match compilation to the optimizer so quoted expressions keep `op_Equality(s, "")`. ([Issue #19873](https://github.com/dotnet/fsharp/issues/19873)) ### Added diff --git a/src/Compiler/AbstractIL/il.fsi b/src/Compiler/AbstractIL/il.fsi index 3539e235518..b543f0e19bd 100644 --- a/src/Compiler/AbstractIL/il.fsi +++ b/src/Compiler/AbstractIL/il.fsi @@ -2471,6 +2471,17 @@ val internal ecmaPublicKey: PublicKey /// Strips ILType.Modified from the ILType. val internal stripILModifiedFromTy: ILType -> ILType +// Built-in type names exposed for `mref.DeclaringTypeRef.Name = tname_X` matchers outside il.fs. + +[] +val internal tname_String: string = "System.String" + +[] +val internal tname_Type: string = "System.Type" + +[] +val internal tname_Bool: string = "System.Boolean" + /// Discriminating different important built-in types. val internal isILObjectTy: ILGlobals -> ILType -> bool val internal isILStringTy: ILGlobals -> ILType -> bool diff --git a/src/Compiler/Checking/PatternMatchCompilation.fs b/src/Compiler/Checking/PatternMatchCompilation.fs index 4128b8cf5f4..e5af41cb481 100644 --- a/src/Compiler/Checking/PatternMatchCompilation.fs +++ b/src/Compiler/Checking/PatternMatchCompilation.fs @@ -810,13 +810,6 @@ let rec BuildSwitch inpExprOpt g isNullFiltered expr edges dflt m = let test = mkILAsmCeq g m (mkLdlen g m vExpr) (mkInt g m n) let finalTest = if isNullFiltered then test else mkLazyAnd g m (mkNonNullTest g m vExpr) test mkLetBind m bind finalTest - | DecisionTreeTest.Const (Const.String "") -> - // Optimize empty string check to use null-safe length check - let _v, vExpr, bind = mkCompGenLocalAndInvisibleBind g "testExpr" m testexpr - let test = mkILAsmCeq g m (mkGetStringLength g m vExpr) (mkInt g m 0) - // Skip null check if we're in a null-filtered context - let finalTest = if isNullFiltered then test else mkLazyAnd g m (mkNonNullTest g m vExpr) test - mkLetBind m bind finalTest | DecisionTreeTest.Const (Const.String _ as c) -> mkCallEqualsOperator g m g.string_ty testexpr (Expr.Const (c, m, g.string_ty)) | DecisionTreeTest.Const (Const.Decimal _ as c) -> diff --git a/src/Compiler/Optimize/Optimizer.fs b/src/Compiler/Optimize/Optimizer.fs index a6fa90d1e3a..ffc7b92671b 100644 --- a/src/Compiler/Optimize/Optimizer.fs +++ b/src/Compiler/Optimize/Optimizer.fs @@ -2291,27 +2291,35 @@ let TryDetectQueryQuoteAndRun cenv (expr: Expr) = //printfn "Not eliminating because no Run found" None +let inline (|StringTy|_|) (ilTy: ILType) : bool = + ilTy.IsNominal && ilTy.TypeRef.Name = tname_String + +let inline private isILMethodRefOnSystemString + (methodName: string) + (returnTypeName: string) + ([] argsCheck: ILType list -> bool) + (mref: ILMethodRef) = + mref.Name = methodName && + mref.DeclaringTypeRef.Name = tname_String && + mref.ReturnType.IsNominal && mref.ReturnType.TypeRef.Name = returnTypeName && + argsCheck mref.ArgTypes + +let IsILMethodRefSystemStringEquals (mref: ILMethodRef) = + mref |> isILMethodRefOnSystemString "Equals" tname_Bool (function + | [StringTy; StringTy] -> true + | _ -> false) + let IsILMethodRefSystemStringConcat (mref: ILMethodRef) = - mref.Name = "Concat" && - mref.DeclaringTypeRef.Name = "System.String" && - (mref.ReturnType.IsNominal && mref.ReturnType.TypeRef.Name = "System.String") && - (mref.ArgCount >= 2 && mref.ArgCount <= 4 && - mref.ArgTypes - |> List.forall (fun ilTy -> - ilTy.IsNominal && ilTy.TypeRef.Name = "System.String")) + mref |> isILMethodRefOnSystemString "Concat" tname_String (function + | [StringTy; StringTy] + | [StringTy; StringTy; StringTy] + | [StringTy; StringTy; StringTy; StringTy] -> true + | _ -> false) let IsILMethodRefSystemStringConcatArray (mref: ILMethodRef) = - mref.Name = "Concat" && - mref.DeclaringTypeRef.Name = "System.String" && - (mref.ReturnType.IsNominal && mref.ReturnType.TypeRef.Name = "System.String") && - (mref.ArgCount = 1 && - mref.ArgTypes - |> List.forall (fun ilTy -> - match ilTy with - | ILType.Array (shape, ilTy) when shape = ILArrayShape.SingleDimensional && - ilTy.IsNominal && - ilTy.TypeRef.Name = "System.String" -> true - | _ -> false)) + mref |> isILMethodRefOnSystemString "Concat" tname_String (function + | [ILType.Array (shape, StringTy)] when shape = ILArrayShape.SingleDimensional -> true + | _ -> false) let rec IsDebugPipeRightExpr cenv expr = let g = cenv.g @@ -2540,6 +2548,14 @@ and MakeOptimizedSystemStringConcatCall cenv env m args = | _ -> OptimizeExpr cenv env expr +/// Rewrite `String.Equals(x, "")` to `x <> null && x.Length = 0` (issue #19873 — +/// done here so quotation bodies, which the optimizer skips, keep `op_Equality(_, "")`). +and MakeOptimizedStringEqualsEmptyCall cenv env m nonEmptyArg = + let g = cenv.g + let _, vExpr, bind = mkCompGenLocalAndInvisibleBind g "testExpr" m nonEmptyArg + let lengthIsZero = mkILAsmCeq g m (mkGetStringLength g m vExpr) (mkInt g m 0) + OptimizeExpr cenv env (mkLetBind m bind (mkLazyAnd g m (mkNonNullTest g m vExpr) lengthIsZero)) + /// Optimize/analyze an application of an intrinsic operator to arguments and OptimizeExprOp cenv env (op, tyargs, args, m) = @@ -2611,6 +2627,12 @@ and OptimizeExprOp cenv env (op, tyargs, args, m) = when IsILMethodRefSystemStringConcat ilMethRef -> MakeOptimizedSystemStringConcatCall cenv env m args + // See MakeOptimizedStringEqualsEmptyCall (issue #19873). `(=)` lowers to `String.Equals` post-inlining. + | TOp.ILCall(_, _, _, _, _, _, _, ilMethRef, _, _, _), _, + ([nonEmpty; Expr.Const(Const.String "", _, _)] | [Expr.Const(Const.String "", _, _); nonEmpty]) + when IsILMethodRefSystemStringEquals ilMethRef -> + MakeOptimizedStringEqualsEmptyCall cenv env m nonEmpty + | _ -> // Reductions OptimizeExprOpReductions cenv env (op, tyargs, args, m) diff --git a/src/Compiler/Symbols/Exprs.fs b/src/Compiler/Symbols/Exprs.fs index 4281393e5e8..0f494f402b9 100644 --- a/src/Compiler/Symbols/Exprs.fs +++ b/src/Compiler/Symbols/Exprs.fs @@ -759,14 +759,14 @@ module FSharpExprConvert = ConvExprPrim cenv env op | TOp.ILAsm ([ I_call (Normalcall, mspec, None) ], _), _, [arg] - when mspec.MethodRef.DeclaringTypeRef.Name = "System.String" && mspec.Name = "GetHashCode" -> + when mspec.MethodRef.DeclaringTypeRef.Name = tname_String && mspec.Name = "GetHashCode" -> let ty = tyOfExpr g arg let op = mkCallHash g m ty arg ConvExprPrim cenv env op | TOp.ILCall (_, _, _, _, _, _, _, ilMethRef, _, _, _), [], [Expr.Op (TOp.ILAsm ([ I_ldtoken (ILToken.ILType _) ], _), [ty], _, _)] - when ilMethRef.DeclaringTypeRef.Name = "System.Type" && ilMethRef.Name = "GetTypeFromHandle" -> + when ilMethRef.DeclaringTypeRef.Name = tname_Type && ilMethRef.Name = "GetTypeFromHandle" -> let op = mkCallTypeOf g m ty ConvExprPrim cenv env op diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ExpressionQuotations/QuotationRendering/Chars.bsl b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ExpressionQuotations/QuotationRendering/Chars.bsl new file mode 100644 index 00000000000..e75b7d6dbff --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ExpressionQuotations/QuotationRendering/Chars.bsl @@ -0,0 +1,4 @@ +Lambda (x, + IfThenElse (Call (None, op_Equality, [x, Value ('a')]), Value (1), + IfThenElse (Call (None, op_Equality, [x, Value ('b')]), + Value (2), Value (0)))) diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ExpressionQuotations/QuotationRendering/ConsecutiveInts.bsl b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ExpressionQuotations/QuotationRendering/ConsecutiveInts.bsl new file mode 100644 index 00000000000..49fd764e179 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ExpressionQuotations/QuotationRendering/ConsecutiveInts.bsl @@ -0,0 +1,7 @@ +Lambda (x, + IfThenElse (Call (None, op_Equality, [x, Value (1)]), Value ("a"), + IfThenElse (Call (None, op_Equality, [x, Value (2)]), + Value ("b"), + IfThenElse (Call (None, op_Equality, + [x, Value (3)]), Value ("c"), + Value ("z"))))) diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ExpressionQuotations/QuotationRendering/Decimal.bsl b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ExpressionQuotations/QuotationRendering/Decimal.bsl new file mode 100644 index 00000000000..2adbe271983 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ExpressionQuotations/QuotationRendering/Decimal.bsl @@ -0,0 +1,6 @@ +Lambda (x, + IfThenElse (Call (None, op_Equality, + [x, + Call (None, MakeDecimal, + [Value (1), Value (0), Value (0), Value (false), + Value (0uy)])]), Value ("a"), Value ("b"))) diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ExpressionQuotations/QuotationRendering/EmptyString.bsl b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ExpressionQuotations/QuotationRendering/EmptyString.bsl new file mode 100644 index 00000000000..848475282af --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ExpressionQuotations/QuotationRendering/EmptyString.bsl @@ -0,0 +1,3 @@ +Lambda (x, + IfThenElse (Call (None, op_Equality, [x, Value ("")]), Value (1), + Value (0))) diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ExpressionQuotations/QuotationRendering/Int64.bsl b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ExpressionQuotations/QuotationRendering/Int64.bsl new file mode 100644 index 00000000000..3ff3d872afa --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ExpressionQuotations/QuotationRendering/Int64.bsl @@ -0,0 +1,3 @@ +Lambda (x, + IfThenElse (Call (None, op_Equality, [x, Value (1L)]), Value ("a"), + Value ("b"))) diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ExpressionQuotations/QuotationRendering/NonEmptyString.bsl b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ExpressionQuotations/QuotationRendering/NonEmptyString.bsl new file mode 100644 index 00000000000..d948553e5f5 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ExpressionQuotations/QuotationRendering/NonEmptyString.bsl @@ -0,0 +1,4 @@ +Lambda (x, + IfThenElse (Call (None, op_Equality, [x, Value ("a")]), Value (1), + IfThenElse (Call (None, op_Equality, [x, Value ("b")]), + Value (2), Value (0)))) diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ExpressionQuotations/QuotationRendering/NullOrEmpty.bsl b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ExpressionQuotations/QuotationRendering/NullOrEmpty.bsl new file mode 100644 index 00000000000..408cccd7c53 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ExpressionQuotations/QuotationRendering/NullOrEmpty.bsl @@ -0,0 +1,4 @@ +Lambda (x, + IfThenElse (Call (None, op_Equality, [x, Value ()]), Value (1), + IfThenElse (Call (None, op_Equality, [x, Value ("")]), + Value (1), Value (0)))) diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ExpressionQuotations/QuotationRendering/QuotationRenderingTests.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ExpressionQuotations/QuotationRendering/QuotationRenderingTests.fs new file mode 100644 index 00000000000..de4ce676aff --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ExpressionQuotations/QuotationRendering/QuotationRenderingTests.fs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +// Quotation rendering snapshots — regression for https://github.com/dotnet/fsharp/issues/19873. +// Quotation literals are evaluated at test runtime via a shared FSI session that uses the +// just-built FSharp.Compiler.Service, so the desugar under test is the one this PR ships +// (the bootstrap fsc that builds this test project still has the pre-fix desugar and +// rejects literal `match s with ""` quotations with FS0452). + +namespace Conformance.Expressions.ExpressionQuotations + +open System.IO +open Xunit +open FSharp.Test.Compiler +open FSharp.Test.ScriptHelpers + +module QuotationRendering = + + let private baselineDir = __SOURCE_DIRECTORY__ + + let private fsiSession = getSessionForEval [||] LangVersion.Preview + + let private quoteShouldRender (name: string) (quoteExpr: string) = + let result = + Fsx (sprintf "printfn \"%%A\" %s" quoteExpr) + |> evalInSharedSession fsiSession + |> shouldSucceed + match result.RunOutput with + | Some (EvalOutput e) -> + checkBaseline (e.StdOut |> normalizeNewlines) (Path.Combine(baselineDir, name + ".bsl")) + | _ -> + failwith "Expected eval output from shared FSI session." + + [] + let EmptyString () = + quoteShouldRender "EmptyString" """<@ fun (x: string) -> match x with "" -> 1 | _ -> 0 @>""" + + [] + let NullOrEmpty () = + quoteShouldRender "NullOrEmpty" """<@ fun (x: string) -> match x with null | "" -> 1 | _ -> 0 @>""" + + [] + let NonEmptyString () = + quoteShouldRender "NonEmptyString" """<@ fun (x: string) -> match x with "a" -> 1 | "b" -> 2 | _ -> 0 @>""" + + [] + let ConsecutiveInts () = + quoteShouldRender "ConsecutiveInts" """<@ fun (x: int) -> match x with 1 -> "a" | 2 -> "b" | 3 -> "c" | _ -> "z" @>""" + + [] + let Chars () = + quoteShouldRender "Chars" """<@ fun (x: char) -> match x with 'a' -> 1 | 'b' -> 2 | _ -> 0 @>""" + + // Int64 takes the mkILAsmCeq arm + [AI_ceq] -> op_Equality recovery (distinct from the op_Equality-direct primitives). + [] + let Int64 () = + quoteShouldRender "Int64" """<@ fun (x: int64) -> match x with 1L -> "a" | _ -> "b" @>""" + + [] + let Decimal () = + quoteShouldRender "Decimal" """<@ fun (x: decimal) -> match x with 1m -> "a" | _ -> "b" @>""" diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TypeTestsInPatternMatching.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TypeTestsInPatternMatching.fs index 8dbdf763f4d..6e859a4baf1 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TypeTestsInPatternMatching.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TypeTestsInPatternMatching.fs @@ -346,5 +346,120 @@ let TestEmptyStringPattern(x: string) = IL_0011: ldstr "other" IL_0016: ret } +""" + ] + + // https://github.com/dotnet/fsharp/issues/19873 + // Side effect of moving the empty-string optimization to the Optimizer (was previously only + // applied for `match`): `if s = ""` now produces the same null-safe length-check IL. + [] + let ``Test codegen for if-then-else with literal empty-string equality``() = + FSharp """ +module Test +let TestEmptyStringEq(x: string) = + if x = "" then "empty" else "other" + """ + |> compile + |> shouldSucceed + |> verifyIL [ + """ + .method public static string TestEmptyStringEq(string x) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0011 + + IL_0003: ldarg.0 + IL_0004: callvirt instance int32 [runtime]System.String::get_Length() + IL_0009: brtrue.s IL_0011 + + IL_000b: ldstr "empty" + IL_0010: ret + + IL_0011: ldstr "other" + IL_0016: ret + } +""" + ] + + // #19873: under `--optimize-` `(=)` isn't inlined (only when LocalOptimizationsEnabled), + // so the call falls through to `String.Equals(s, "")` instead of the null+Length form. + [] + let ``Test codegen for empty string pattern under --optimize-``() = + FSharp """ +module Test +let TestEmptyStringPattern(x: string) = + match x with + | "" -> "empty" + | _ -> "other" + """ + |> withNoOptimize + |> compile + |> shouldSucceed + |> verifyIL [ + """ + .method public static string TestEmptyStringPattern(string x) cil managed + { + + .maxstack 4 + .locals init (string V_0) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: ldstr "" + IL_0008: call bool [netstandard]System.String::Equals(string, + string) + IL_000d: brfalse.s IL_0015 + + IL_000f: ldstr "empty" + IL_0014: ret + + IL_0015: ldstr "other" + IL_001a: ret + } +""" + ] + + // #19873: the optimizer doesn't see BuildSwitch's `isNullFiltered` flag, so the empty-string + // branch under `null | "" -> _` re-emits its own null check (two back-to-back `brfalse.s`). + [] + let ``Test codegen for null-or-empty-string pattern``() = + FSharp """ +module Test +let TestNullOrEmpty(x: string) = + match x with + | null | "" -> "empty" + | _ -> "other" + """ + |> compile + |> shouldSucceed + |> verifyIL [ + """ + .method public static string TestNullOrEmpty(string x) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0014 + + IL_0003: ldarg.0 + IL_0004: brfalse.s IL_0011 + + IL_0006: ldarg.0 + IL_0007: callvirt instance int32 [runtime]System.String::get_Length() + IL_000c: ldc.i4.0 + IL_000d: ceq + IL_000f: br.s IL_0012 + + IL_0011: ldc.i4.0 + IL_0012: brfalse.s IL_001a + + IL_0014: ldstr "empty" + IL_0019: ret + + IL_001a: ldstr "other" + IL_001f: ret + } """ ] \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj index 954c02b8aca..0ecc691ef57 100644 --- a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj +++ b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj @@ -113,6 +113,7 @@ + From b2070ab7464e539a3e88162fb932542757a0866a Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Fri, 12 Jun 2026 12:09:36 +0200 Subject: [PATCH 65/72] Fix degraded codegen for inner recursive functions under realsig (#19882) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix TLR under --realsig+ and closure constraint stripping Two codegen bugs fixed: 1. TLR (Top-Level Routing) was disabled under --realsig+ via a blanket short-circuit in InnerLambdasToTopLevelFuncs, causing inner recursive functions to be emitted as closure classes instead of static methods. This produced ~23× perf regression for struct mutual recursion (#17607). Fix: Remove the realsig band-aid. Instead, add a moduleCloc field to IlxGenEnv that always points to the enclosing non-generic module class. TLR-lifted vals (IsCompiledAsTopLevel && !IsMemberOrModuleBinding) are routed to moduleCloc, preventing them from inheriting class typars of a generic enclosing type. 2. Constrained inline generics, when inlined into closures, attached their constraints to the closure class's type params. The Specialize override (from FSharpTypeFunc) must be unconstrained to match its base signature. When constraints leaked, the JIT threw TypeLoadException (#14492). Fix: In EraseClosures CASE 1, strip constraints from both the Specialize override method-typars (CASE 1b) and the later closure class-typars (CASE 1a) at the CASE 1 head. Rewrite stripILGenericParamConstraints via mkILSimpleTypar to be future-proof (clears all constraint fields including CustomAttrsStored which carries IsUnmanagedAttribute). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix verifyILContains silent failure, add checkILPresent/checkILNotPresent HOF - verifyILContains now throws on mismatch instead of silently returning CompilationResult.Failure (which callers were ignoring with |> ignore). - Unify checkILPresent/checkILNotPresent via shared checkILFragments HOF. - Expose verifyILPresent in Compiler.fs (symmetric with verifyILNotPresent). - Fix TypeTests.fs assertions exposed by the silent-failure fix. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add tests and regenerate IL baselines for TLR/constraint fixes New test files: - Regression_TLR_MutualInnerRec_StructuralAssertions.fs: 20 tests covering TLR scenarios (generic class, nested module, three-way rec, quotation, value rec) and constraint stripping (IL shape, ILVerify, >5 params CASE 2a, combined TLR+constraint). All run under both realsig on/off. - Regression_Specialize_ConstraintVerification.fs: 14 tests exercising each ILGenericParameterDef field stripped by mkILSimpleTypar (struct, not struct, unmanaged, new(), interface, comparison, combined) via ILVerify + run. - 4 new IL-baseline source files (mutual rec, captured env, generic, Point2D) with Off/On .il.bsl pairs confirming realsig parity. Regenerated baselines: - TestFunction06, TestFunction23: closures replaced by static methods - Match01: clo@4 closure removed (TLR fires under realsig+) - Unmanaged: virtual DirectInvoke → static func@3 Note: Match01 and TestFunction23 .net472.bsl baselines need TEST_UPDATE_BSL=1 regeneration on Windows CI (macOS cannot target net472). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Release notes for TLR realsig fix (#17607) and constraint stripping fix (#14492) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add PR link to release notes and fix code formatting - Add PR #19882 link to both release note entries - Apply fantomas formatting to il.fs and IlxGen.fs Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix FS2014 duplicate-name when TLR routes namespace-level vals to moduleCloc When moduleCloc has empty Enclosing (namespace-level / types-only file), the previous routing fell through TypeRefForCompLoc to , a single per-assembly type. Multiple files each with an inner-rec function having the same compiler-generated name (e.g. capture@N in two FSharpEmbedResource-derived modules of FSharp.Build) all dumped into that shared bucket and collided in the IL method table, producing FS2014 `duplicate entry 'capture@83' in method table` at write-time during the bootstrap compilation of FSharp.Build and FSharp.DependencyManager.Nuget under --realsig+. Fix: when moduleCloc.Enclosing is empty, route through CompLocForInitClass instead. TypeNameForInitClass embeds TopImplQualifiedName (per-file) so the lifted val lands in .$FileName, matching the pre-realsig codegen layout and giving the per-file isolation that prevents collisions. The Container<'T>-style fix (moduleCloc with non-empty Enclosing) is preserved unchanged. Verified by rebuilding the compiler with -bootstrap -buildnorealsig:$false; both FSharp.Build.dll and FSharp.DependencyManager.Nuget.dll compile clean. Adds a regression test in Regression_TLR_MutualInnerRec_StructuralAssertions that fails on the previous version and passes after this fix. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Update stale IL baselines surfaced by CI after the moduleCloc routing fix Regenerated from build 1449384 actual IL output: - TestFunction23.fs.RealInternalSignatureOn.OptimizeOn.il.net472.bsl - Match01.fs.RealInternalSignatureOn.il.net472.bsl - Regression_TLR_MutualInnerRec_Point2D.fs.RealInternalSignatureOff.il.bsl - Regression_TLR_MutualInnerRec_Point2D.fs.RealInternalSignatureOn.il.bsl The first two were known stale per the PR description (net472 needs TEST_UPDATE_BSL on Windows CI). The Point2D baselines drift was caused by the duplicate-name fix changing the routing of TLR-lifted vals at namespace-level to the per-file init class. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Re-extract Point2D baselines from Linux CI log (use Entire actual: marker) Previous extraction grabbed only the first chunk of paginated Actual: output; the correct full IL appears after the "Entire actual:" sentinel. Linux's Point2D baselines are now consistent for both realsig settings. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Normalize ldc.r8 N vs ldc.r8 N. in ILChecker for shared .bsl files Windows ildasm 5.x prints whole-number float literals with a trailing dot (`ldc.r8 10.`), Linux ildasm strips the dot entirely (`ldc.r8 10`). Without normalization, any .bsl file with floats inevitably fails on one platform — observed on the new Point2D regression test. The new `unifyFloatLiterals` rule rewrites bare `ldc.r8 -?N` to the dotted form for both expected and actual, keeping comparisons platform- agnostic without forcing baselines to be regenerated per OS. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Address adversarial review feedback (opus 4.8, opus 4.7 xhigh, gpt 5.5) Comment trimming (all 3 reviewers flagged): - IlxGen.AllocValReprWithinExpr: 9-line block down to 2 lines - IlxGen.moduleCloc field doc + AddEnclosingToEnv: one-liners - EraseClosures CASE 1 unconstrainedGenParams: 3-line narrative down to 1 - Regression_TLR_MutualInnerRec_StructuralAssertions: closureWithConstraint header, namespace-collision test doc, and inline assertion comments - Regression_Specialize_ConstraintVerification module doc: 16 lines down to 3 - ILChecker.unifyFloatLiterals: 3-line comment + redundant (?!\.) regex lookahead Correctness / clarity: - AbstractIL.stripILGenericParamConstraints: keep explicit field-by-field clear with CustomAttrsStored reset, accurate doc — the previous mkILSimpleTypar rewrite silently dropped Variance/MetadataIndex semantics that the comment did not mention - InnerLambdasToTopLevelFuncs: collapse two adjacent Some(f, arity) branches into one predicate (atTopLevel || arity <> 0 || not (isNil tps)) - Combined TLR+constraint test: actually assert constraint stripping (Specialize5 params closure chain produces D-suffix and unconstrained Specialize` Specialize/T duplication — the dedicated test next to it already covers that path; this one keeps the D-suffix-only assertion. No production-code behaviour change beyond field-by-field stripping in stripILGenericParamConstraints; CI baselines unaffected. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Address production-grade reuse review (opus 4.8, opus 4.7 xhigh, gpt 5.5) Tests: - Extract shared `verifyPEAndRun` helper (GPT-5.5: duplicated PEFile + run tail across compileVerifyAndRun and both inline >5-params and Combined test bodies) - Combined test: drop `object Specialize<` positive assertion — the inlined constraint produces no Specialize<> for this closure shape, so the previous assertion broke Linux CI (build 1451155). Negative `Specialize * Address expert-review feedback (post-merge from origin/main) Refute and dismiss B1 ("debug-stepping clobber"): PR #19894 (d0e593f67) landed on origin/main on 2026-06-08 13:11, three days AFTER my last merge on 2026-06-05 11:35. None of my commits (775771769, e2ed10f45, f933f8308) touch the relevant IlxGen.fs lines. Merged origin/main now brings the fix in — verified `if equals m range0` is present at IlxGen.fs:3178 and :3743 in the working tree. Apply M3: Release notes now cite #19075 in the constraint-stripping entry (test `SRTP member constraint with IDisposable` explicitly targets that issue's CLR segfault). Soften M2: Drop the unverified "≈23x" specific number from release notes; the perf magnitude is documented in #17607 itself with the original repro. Apply L2: `unmanaged + equality` test now asserts no `Specialize * Collapse byte-identical Off/On TLR baselines into shared single .bsl The 4 new TLR regression tests (Regression_TLR_MutualInnerRec, _CapturedEnv, _Generic, _Point2D) emit byte-identical IL under --realsig+ and --realsig-, which was previously expressed as two duplicated .bsl files per test (_.RealInternalSignatureOff.il.bsl + _.RealInternalSignatureOn.il.bsl). Replace each pair with a single shared file: .fs.il.bsl. The bsl lookup chain in FileInlineDataAttribute.fs:94-106 already falls through to the bare .il.bsl after exhausting realsig-suffixed candidates, so both Realsig=Off and Realsig=On invocations now compare against the same file. Identity becomes a structural property of the test layout instead of a coincidence between two separately-maintained baselines. Reduces baseline byte count by ~50% for these tests and makes any future realsig divergence an immediate failure (the same .bsl can't match two different IL outputs). Note: these tests use no source-level `private` keyword, so they do not exercise realsig's tightened-visibility promise. A genuine `--realsig+` regression test exercising `private` data accessed by a TLR-lifted helper would legitimately produce divergent Off/On baselines and would need to revert to the split form. Left as a follow-up. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add Regression_TLR_RealsigPrivate.fs — 4 granular AV-class regressions Adds runtime smoke tests for the hypothetical access-check failure scenarios identified in the bsl-essence review of this PR. Each tests a distinct shape where this PR's new TLR routing (lifting inner-rec helpers to module/init-class statics under --realsig+) could in principle trip a MethodAccessException / FieldAccessException / TypeAccessException by landing the lifted helper in an IL container that no longer has access to the source-`private` data it touches. Tests, each [] for realsig parity, each in its own []-style `let` so failures localize: 1. Module-private value accessed from TLR-lifted inner-rec 2. Type-private static accessed from TLR-lifted inner-rec inside same type 3. Private DU structural compare via TLR-lifted continuation 4. Generic + private nested type captured by TLR-lifted inner-rec Verified locally with the modified compiler: all 8 invocations (4 tests x realsig on/off) compile and run successfully — no access exceptions surface. The tests are therefore positive regressions: they protect future routing / visibility changes from regressing into the hypothetical AV path. Note: the existing 4 `Regression_TLR_MutualInnerRec*.fs` tests use no source-`private` keyword and so do not exercise realsig's tightened visibility promise. This new file fills that gap with runtime evidence. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Bump ILVerify job timeout to 120 min (was AzDo default 60 min) ILVerify on this PR (build 1454404) hit the 60-min default timeout and was cancelled mid-Release-build. Investigation against recent main builds: Build 1449768 (pre-#19894) : ILVerify 21.1 min, succeeded Build 1451079 (pre-#19894) : ILVerify 21.2 min, succeeded Build 1453983 (#19894 `d0e593f67`) : ILVerify 36.5 min, succeeded Build 1454404 (this PR HEAD): ILVerify 60.4 min, CANCELLED Two compounding causes: 1. Upstream PR #19894 ("Debug: rework or expressions stepping") added ~14 min to ILVerify on main alone — verified across multiple post-#19894 main builds. ILVerify is the only leg using -bootstrap, so it pays the compiler-build cost x3 (bootstrap, proto, final). 2. This PR makes TLR actually fire under --realsig+ for the first time (the whole point of #17607's fix). The compiler self-build now lifts thousands of inner-rec functions across FCS itself that were previously left as closures. That extra TLR work, multiplied by the x3 bootstrap cycle, pushes ILVerify past 60 min. Neither is "flaky". The work is real and load-bearing. Bumping the per-job timeout to 120 min restores headroom for the bootstrap+proto+final cycle across both Debug and Release configurations. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Refuse TLR when body references private member under --realsig+ Wave 2 adversarial exploit (opus 4.8): a TLR-lifted helper emitted at module scope can lose access to source-private members of an enclosing type, throwing MethodAccessException at runtime under --realsig+. F# RecdFields always compile to IL assembly or better, so field access is safe; only val/method references need to be checked. Add SelectTLRVals predicate that walks the binding body and refuses TLR when a non-public val is referenced and realsig+ is on. Adds two regression tests covering the confirmed exploit shape (generic class + type-private static). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Tighten TLR private-ref guard to type-scoped members only Wave 3 (opus 4.7 perf agent) found the previous guard refused TLR for any inner-rec referencing a private val, which silently defeated the PR's perf wins for the very common F# idiom of module-private helpers (state machines, parsers, scanners, predicates). 8 realistic shapes showed 1.33×-3.23× regression vs the pre-fix PR. The MethodAccessException risk only exists when the referenced private val lives in a CLASS/STRUCT — IL 'private' is type-scoped. Module-private vals compile to methods on the same module IL class as the lifted helper, so they remain accessible. Refine SelectTLRVals predicate to refuse only when vref's TryDeclaringEntity is a class/struct (not IsModuleOrNamespace). Wave 2 exploit still fixed (verified locally: W2A20 exit 0; canonical 17607-style pipeline TLR fires, 25ms vs 71ms over-aggressive refusal). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot --- azure-pipelines-PR.yml | 1 + .../.FSharp.Compiler.Service/11.0.100.md | 4 + src/Compiler/AbstractIL/il.fs | 3 + src/Compiler/CodeGen/EraseClosures.fs | 10 +- src/Compiler/CodeGen/IlxGen.fs | 48 +- .../Optimize/InnerLambdasToTopLevelFuncs.fs | 37 +- .../Conformance/Constraints/Unmanaged.fs | 20 +- .../EmittedIL/Inlining/Inlining.fs | 24 + ...1.fs.RealInternalSignatureOn.il.net472.bsl | 3051 ++++++++--------- ....fs.RealInternalSignatureOn.il.netcore.bsl | 703 ++-- ...ssion_Specialize_ConstraintVerification.fs | 76 + .../Inlining/Regression_TLR_MutualInnerRec.fs | 15 + .../Regression_TLR_MutualInnerRec.fs.il.bsl | 141 + ...gression_TLR_MutualInnerRec_CapturedEnv.fs | 15 + ...n_TLR_MutualInnerRec_CapturedEnv.fs.il.bsl | 166 + .../Regression_TLR_MutualInnerRec_Generic.fs | 16 + ...ssion_TLR_MutualInnerRec_Generic.fs.il.bsl | 168 + .../Regression_TLR_MutualInnerRec_Point2D.fs | 23 + ...ssion_TLR_MutualInnerRec_Point2D.fs.il.bsl | 677 ++++ ...TLR_MutualInnerRec_StructuralAssertions.fs | 278 ++ .../Inlining/Regression_TLR_RealsigPrivate.fs | 121 + ....RealInternalSignatureOn.OptimizeOn.il.bsl | 88 +- ...ternalSignatureOn.OptimizeOn.il.net472.bsl | 242 +- ...ernalSignatureOn.OptimizeOn.il.netcore.bsl | 98 +- .../FSharp.Compiler.ComponentTests.fsproj | 3 + .../Signatures/TypeTests.fs | 11 +- tests/FSharp.Test.Utilities/Compiler.fs | 5 +- tests/FSharp.Test.Utilities/ILChecker.fs | 23 +- 28 files changed, 3785 insertions(+), 2282 deletions(-) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_Specialize_ConstraintVerification.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec.fs.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec_CapturedEnv.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec_CapturedEnv.fs.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec_Generic.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec_Generic.fs.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec_Point2D.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec_Point2D.fs.il.bsl create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec_StructuralAssertions.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_RealsigPrivate.fs diff --git a/azure-pipelines-PR.yml b/azure-pipelines-PR.yml index b627fab985c..57c290e1fc2 100644 --- a/azure-pipelines-PR.yml +++ b/azure-pipelines-PR.yml @@ -796,6 +796,7 @@ stages: continueOnError: true condition: always() - job: ILVerify + timeoutInMinutes: 120 pool: name: $(DncEngPublicBuildPool) demands: ImageOverride -equals $(_WindowsMachineQueueName) diff --git a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md index 6b7c8a4099c..75bbc9c7644 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md +++ b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md @@ -1,11 +1,15 @@ ### Fixed +* Fix inner mutually-recursive `let rec ... and ...` functions under `--realsig+` not being lifted to top-level static methods (TLR), causing `FSharpFunc` closure allocations and loss of `tail.` opcodes — the large struct-mutual-recursion perf regression reported in [Issue #17607](https://github.com/dotnet/fsharp/issues/17607). ([PR #19882](https://github.com/dotnet/fsharp/pull/19882)) +* Fix `TypeLoadException` ("Specialize tried to implicitly override a method with weaker type parameter constraints") and the related CLR crash with constrained inline calls by stripping constraints from closure-class typars in `EraseClosures.convIlxClosureDef`. ([Issue #14492](https://github.com/dotnet/fsharp/issues/14492), [Issue #19075](https://github.com/dotnet/fsharp/issues/19075), [PR #19882](https://github.com/dotnet/fsharp/pull/19882)) + * Suppress hover/symbol resolution for wildcard `_` patterns inside `member _.…` bodies that incorrectly showed `val _: T` tooltip. ([PR #19760](https://github.com/dotnet/fsharp/pull/19760)) * Deduplicate format specifier locations in computation expressions so editor tooling no longer reports duplicate entries for the same `%` specifier. ([Issue #16419](https://github.com/dotnet/fsharp/issues/16419), [PR #19791](https://github.com/dotnet/fsharp/pull/19791)) * Reject non-function bindings for single-case and partial active pattern names with FS1209, matching the existing multi-case behavior. ([PR #19763](https://github.com/dotnet/fsharp/pull/19763)) * Fix FS0421 "The address of the variable cannot be used at this point" incorrectly raised for the discard pattern `let _ = &expr` when `let x = &expr` compiles. ([Issue #18841](https://github.com/dotnet/fsharp/issues/18841), [PR #19811](https://github.com/dotnet/fsharp/pull/19811)) * Honor `--nowarn` and `--warnaserror` for warnings emitted during command-line option parsing ([Issue #19576](https://github.com/dotnet/fsharp/issues/19576), [PR #19776](https://github.com/dotnet/fsharp/pull/19776)) * Fix `[]` prefix attributes being silently dropped on class members, and fix false-positive `AllowMultiple=false` errors when `[]` and `[]` are applied to the same binding. ([Issue #17904](https://github.com/dotnet/fsharp/issues/17904), [Issue #19020](https://github.com/dotnet/fsharp/issues/19020), [PR #19738](https://github.com/dotnet/fsharp/pull/19738)) + * Preserve type abbreviations (`string`, user-defined aliases) in the refined type of bindings introduced after a `| null` pattern in a `match` expression. ([Issue #19646](https://github.com/dotnet/fsharp/issues/19646), [PR #19745](https://github.com/dotnet/fsharp/pull/19745)) * Fix attributes on return type of unparenthesized tuple methods being silently dropped from IL. ([Issue #462](https://github.com/dotnet/fsharp/issues/462), [PR #19714](https://github.com/dotnet/fsharp/pull/19714)) * Fix false-positive nullness warning (FS3261) when pattern matching narrows nullness inside seq/list/array comprehensions. ([Issue #19644](https://github.com/dotnet/fsharp/issues/19644), [PR #19743](https://github.com/dotnet/fsharp/pull/19743)) diff --git a/src/Compiler/AbstractIL/il.fs b/src/Compiler/AbstractIL/il.fs index 5a80b12fbdc..629a3d260bb 100644 --- a/src/Compiler/AbstractIL/il.fs +++ b/src/Compiler/AbstractIL/il.fs @@ -3375,6 +3375,8 @@ let mkILSimpleTypar nm = MetadataIndex = NoMetadataIdx } +/// Returns gp with all constraint state cleared. CustomAttrsStored is also reset because +/// some constraints (notably IsUnmanagedAttribute) are encoded there. let stripILGenericParamConstraints (gp: ILGenericParameterDef) = { gp with Constraints = [] @@ -3382,6 +3384,7 @@ let stripILGenericParamConstraints (gp: ILGenericParameterDef) = HasNotNullableValueTypeConstraint = false HasDefaultConstructorConstraint = false HasAllowsRefStruct = false + CustomAttrsStored = storeILCustomAttrs emptyILCustomAttrs } let genericParamOfGenericActual (_ga: ILType) = mkILSimpleTypar "T" diff --git a/src/Compiler/CodeGen/EraseClosures.fs b/src/Compiler/CodeGen/EraseClosures.fs index 6aef85d40b5..9aad82b0521 100644 --- a/src/Compiler/CodeGen/EraseClosures.fs +++ b/src/Compiler/CodeGen/EraseClosures.fs @@ -484,9 +484,11 @@ let rec convIlxClosureDef cenv encl (td: ILTypeDef) clo = match tyargsl, tmargsl, laterStruct with // CASE 1 - Type abstraction | _ :: _, [], _ -> - let addedGenParams = tyargsl let nowReturnTy = (mkTyOfLambdas cenv laterStruct) + // Both Specialize<> and the T-suffixed closure type must be unconstrained (#14492). + let unconstrainedGenParams = tyargsl |> List.map stripILGenericParamConstraints + // CASE 1a. Split a type abstraction. // Adjust all the argument and environment accesses // Actually that special to do here in the type abstraction case @@ -504,7 +506,7 @@ let rec convIlxClosureDef cenv encl (td: ILTypeDef) clo = let laterTypeName = td.Name + "T" let laterTypeRef = mkILNestedTyRef (ILScopeRef.Local, encl, laterTypeName) - let laterGenericParams = td.GenericParams @ addedGenParams + let laterGenericParams = td.GenericParams @ unconstrainedGenParams let selfFreeVar = let baseName = CompilerGeneratedName("self" + string nowFields.Length) @@ -564,14 +566,12 @@ let rec convIlxClosureDef cenv encl (td: ILTypeDef) clo = let convil = convILMethodBody (Some nowCloSpec, boxReturnTy) clo.cloCode.Value - let specializeGenParams = addedGenParams |> List.map stripILGenericParamConstraints - let nowApplyMethDef = mkILGenericVirtualMethod ( "Specialize", ILCallingConv.Instance, ILMemberAccess.Public, - specializeGenParams, + unconstrainedGenParams, [], mkILReturn cenv.ilg.typ_Object, MethodBody.IL(notlazy convil) diff --git a/src/Compiler/CodeGen/IlxGen.fs b/src/Compiler/CodeGen/IlxGen.fs index 46959e56b22..de0ff0c5c10 100644 --- a/src/Compiler/CodeGen/IlxGen.fs +++ b/src/Compiler/CodeGen/IlxGen.fs @@ -1207,6 +1207,9 @@ and IlxGenEnv = /// Indicates the default "place" for stuff we're currently generating cloc: CompileLocation + /// Non-generic enclosing module (never narrowed by AddEnclosingToEnv). Routing target for TLR lifts. + moduleCloc: CompileLocation + /// Indicates the default "place" for initialization stuff we're currently generating initClassCompLoc: CompileLocation option @@ -10336,7 +10339,22 @@ and AllocValReprWithinExpr cenv cgbuf endMark cloc v eenv = else NoShadowLocal, eenv - ComputeAndAddStorageForLocalValWithValReprInfo (cenv, eenv.intraAssemblyInfo, cenv.options.isInteractive, optShadowLocal) cloc v eenv + // TLR lifts avoid generic enclosing scopes (#17607); namespace-root lifts use the per-file + // init class to avoid generated-name collisions in the shared . + let effectiveCloc = + if v.IsCompiledAsTopLevel && not v.IsMemberOrModuleBinding then + if eenv.moduleCloc.Enclosing.IsEmpty then + CompLocForInitClass eenv.moduleCloc + else + eenv.moduleCloc + else + cloc + + ComputeAndAddStorageForLocalValWithValReprInfo + (cenv, eenv.intraAssemblyInfo, cenv.options.isInteractive, optShadowLocal) + effectiveCloc + v + eenv //-------------------------------------------------------------------------- // Generate stack save/restore and assertions - pulled into letrec by alloc* @@ -10759,9 +10777,12 @@ and GenModuleBinding cenv (cgbuf: CodeGenBuffer) (qname: QualifiedNameOfFile) la // Evaluate bindings for module let hidden = IsHiddenTycon eenv.sigToImplRemapInfo mspec + let moduleLoc = CompLocForFixedModule cenv.options.fragName qname.Text mspec + let eenvinner = { eenv with - cloc = CompLocForFixedModule cenv.options.fragName qname.Text mspec + cloc = moduleLoc + moduleCloc = moduleLoc initLocals = eenv.initLocals && not (EntityHasWellKnownAttribute cenv.g WellKnownEntityAttributes.SkipLocalsInitAttribute mspec) @@ -10827,13 +10848,16 @@ and GenImplFile cenv (mgbuf: AssemblyBuilder) mainInfoOpt eenv (implFile: Checke for anonInfo in anonRecdTypes.Values do mgbuf.GenerateAnonType((fun ilThisTy -> GenToStringMethod cenv eenv ilThisTy m), anonInfo) + let withQName (loc: CompileLocation) = + { loc with + TopImplQualifiedName = qname.Text + Range = m + } + let eenv = { eenv with - cloc = - { eenv.cloc with - TopImplQualifiedName = qname.Text - Range = m - } + cloc = withQName eenv.cloc + moduleCloc = withQName eenv.moduleCloc } cenv.optimizeDuringCodeGen <- optimizeDuringCodeGen @@ -12569,9 +12593,12 @@ let CodegenAssembly cenv eenv mgbuf implFiles = //------------------------------------------------------------------------- let GetEmptyIlxGenEnv (g: TcGlobals) ccu = + let ccuLoc = CompLocForCcu ccu + { tyenv = TypeReprEnv.Empty - cloc = CompLocForCcu ccu + cloc = ccuLoc + moduleCloc = ccuLoc initClassCompLoc = None initFieldName = CompilerGeneratedName "init" staticInitializationName = CompilerGeneratedName "staticInitialization" @@ -12654,8 +12681,11 @@ let GenerateCode (cenv, anonTypeTable, eenv, CheckedAssemblyAfterOptimization im let mgbuf = AssemblyBuilder(cenv, anonTypeTable) let eenv = + let fragLoc = CompLocForFragment cenv.options.fragName cenv.viewCcu + { eenv with - cloc = CompLocForFragment cenv.options.fragName cenv.viewCcu + cloc = fragLoc + moduleCloc = fragLoc delayCodeGen = cenv.options.parallelIlxGenEnabled } diff --git a/src/Compiler/Optimize/InnerLambdasToTopLevelFuncs.fs b/src/Compiler/Optimize/InnerLambdasToTopLevelFuncs.fs index 885917fee37..0e2d1ede692 100644 --- a/src/Compiler/Optimize/InnerLambdasToTopLevelFuncs.fs +++ b/src/Compiler/Optimize/InnerLambdasToTopLevelFuncs.fs @@ -157,6 +157,32 @@ let IsRefusedTLR g (f: Val) = let refuseTest = alreadyChosen || mutableVal || byrefVal || specialVal || dllImportStubOrOtherNeverInline || isResumableCode || isInlineIfLambda refuseTest +/// Under --realsig+, a TLR-lifted helper is emitted at module scope (outside its declaring +/// type when that type is a class). If the helper's body invokes a source-`private` member +/// of a class/struct, the CLR raises MethodAccessException at runtime because IL `private` +/// is type-scoped. +/// +/// Private members of MODULES are not at risk: the lifted helper lands in the same module +/// IL class as the private val. F# RecdFields always compile to IL `assembly` or wider, so +/// field access is safe; only val/method references whose declaring entity is a class need +/// to be checked. +let BodyReferencesTypeScopedPrivate e = + let mutable found = false + let folder = + { ExprFolder0 with + exprIntercept = fun _recurseF noInterceptF z expr -> + if found then z + else + match expr with + | Expr.Val (vref, _, _) when vref.Accessibility.IsPrivate -> + match vref.TryDeclaringEntity with + | Parent eref when not eref.IsModuleOrNamespace -> found <- true + | _ -> () + | _ -> () + noInterceptF z expr } + FoldExpr folder () e |> ignore + found + let IsMandatoryTopLevel (f: Val) = let specialVal = f.MemberInfo.IsSome let isModulBinding = f.IsMemberOrModuleBinding @@ -185,6 +211,11 @@ module Pass1_DetermineTLRAndArities = // Exclude values bound in a decision tree elif Zset.contains f xinfo.DecisionTreeBindings then None + + // Under --realsig+, lifting a helper out of its declaring type would lose access to + // any source-`private` members it references, producing MethodAccessException at runtime. + elif g.realsig && BodyReferencesTypeScopedPrivate e then + None else // Could the binding be TLR? with what arity? let atTopLevel = Zset.contains f xinfo.TopLevelBindings @@ -192,11 +223,7 @@ module Pass1_DetermineTLRAndArities = let nFormals = vss.Length let nMaxApplied = GetMaxNumArgsAtUses xinfo f let arity = min nFormals nMaxApplied - if atTopLevel then - Some (f, arity) - elif g.realsig then - None - else if arity<>0 || not (isNil tps) then + if atTopLevel || arity <> 0 || not (isNil tps) then Some (f, arity) else None diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Constraints/Unmanaged.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Constraints/Unmanaged.fs index 173f18537a5..712333340fa 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/Constraints/Unmanaged.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Constraints/Unmanaged.fs @@ -526,15 +526,17 @@ Main() |> compile |> shouldSucceed |> verifyIL [""" - .method assembly strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 DirectInvoke() cil managed - { - .param type T - .custom instance void [runtime]System.Runtime.CompilerServices.IsUnmanagedAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldsfld class Test/'func@3-1' class Test/'func@3-1'::@_instance - IL_0005: ret - } """] + .method assembly static class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + func@3() cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .param type T + .custom instance void [runtime]System.Runtime.CompilerServices.IsUnmanagedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldsfld class Test/'func@3-1' class Test/'func@3-1'::@_instance + IL_0005: ret + } """] [] diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Inlining.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Inlining.fs index 5bd346e2075..3358122f743 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Inlining.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Inlining.fs @@ -28,6 +28,30 @@ module Inlining = |> getCompilation |> verifyCompilation + [] + let ``Regression_TLR_MutualInnerRec_fs`` compilation = + compilation + |> getCompilation + |> verifyCompilation + + [] + let ``Regression_TLR_MutualInnerRec_Point2D_fs`` compilation = + compilation + |> getCompilation + |> verifyCompilation + + [] + let ``Regression_TLR_MutualInnerRec_Generic_fs`` compilation = + compilation + |> getCompilation + |> verifyCompilation + + [] + let ``Regression_TLR_MutualInnerRec_CapturedEnv_fs`` compilation = + compilation + |> getCompilation + |> verifyCompilation + // SOURCE=Match02.fs SCFLAGS="-a --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Match02.dll" # Match02.fs [] let ``Match02_fs`` compilation = diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOn.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOn.il.net472.bsl index 3553599f1e1..8ccc25d62ff 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOn.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOn.il.net472.bsl @@ -1,21 +1,16 @@ - - - - - .assembly extern runtime { } .assembly extern FSharp.Core { } .assembly assembly { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, - int32, - int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) +.custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, +int32, +int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + - - - .hash algorithm 0x00008004 - .ver 0:0:0:0 +.hash algorithm 0x00008004 +.ver 0:0:0:0 } .module assembly.exe @@ -29,1582 +24,1482 @@ -.class public abstract auto ansi sealed Match01 - extends [runtime]System.Object -{ - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) - .class abstract auto autochar serializable nested public beforefieldinit Test1 - extends [runtime]System.Object - implements class [runtime]System.IEquatable`1, - [runtime]System.Collections.IStructuralEquatable, - class [runtime]System.IComparable`1, - [runtime]System.IComparable, - [runtime]System.Collections.IStructuralComparable - { - .custom instance void [runtime]System.Diagnostics.DebuggerDisplayAttribute::.ctor(string) = ( 01 00 15 7B 5F 5F 44 65 62 75 67 44 69 73 70 6C - 61 79 28 29 2C 6E 71 7D 00 00 ) - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 01 00 00 00 00 00 ) - .class abstract auto ansi sealed nested public Tags - extends [runtime]System.Object - { - .field public static literal int32 X11 = int32(0x00000000) - .field public static literal int32 X12 = int32(0x00000001) - .field public static literal int32 X13 = int32(0x00000002) - .field public static literal int32 X14 = int32(0x00000003) - } - - .class auto ansi serializable nested public beforefieldinit specialname X11 - extends Match01/Test1 - { - .custom instance void [runtime]System.Diagnostics.DebuggerTypeProxyAttribute::.ctor(class [runtime]System.Type) = ( 01 00 20 4D 61 74 63 68 30 31 2B 54 65 73 74 31 - 2B 58 31 31 40 44 65 62 75 67 54 79 70 65 50 72 - 6F 78 79 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerDisplayAttribute::.ctor(string) = ( 01 00 15 7B 5F 5F 44 65 62 75 67 44 69 73 70 6C - 61 79 28 29 2C 6E 71 7D 00 00 ) - .field assembly initonly int32 item - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname instance void .ctor(int32 item) cil managed - { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 0D 4D 61 74 63 68 30 31 2B 54 - 65 73 74 31 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldc.i4.0 - IL_0002: call instance void Match01/Test1::.ctor(int32) - IL_0007: ldarg.0 - IL_0008: ldarg.1 - IL_0009: stfld int32 Match01/Test1/X11::item - IL_000e: ret - } - - .method public hidebysig instance int32 get_Item() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld int32 Match01/Test1/X11::item - IL_0006: ret - } - - .property instance int32 Item() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32, - int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .get instance int32 Match01/Test1/X11::get_Item() - } - } - - .class auto ansi serializable nested public beforefieldinit specialname X12 - extends Match01/Test1 - { - .custom instance void [runtime]System.Diagnostics.DebuggerTypeProxyAttribute::.ctor(class [runtime]System.Type) = ( 01 00 20 4D 61 74 63 68 30 31 2B 54 65 73 74 31 - 2B 58 31 32 40 44 65 62 75 67 54 79 70 65 50 72 - 6F 78 79 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerDisplayAttribute::.ctor(string) = ( 01 00 15 7B 5F 5F 44 65 62 75 67 44 69 73 70 6C - 61 79 28 29 2C 6E 71 7D 00 00 ) - .field assembly initonly int32 item - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname instance void .ctor(int32 item) cil managed - { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 0D 4D 61 74 63 68 30 31 2B 54 - 65 73 74 31 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldc.i4.1 - IL_0002: call instance void Match01/Test1::.ctor(int32) - IL_0007: ldarg.0 - IL_0008: ldarg.1 - IL_0009: stfld int32 Match01/Test1/X12::item - IL_000e: ret - } - - .method public hidebysig instance int32 get_Item() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld int32 Match01/Test1/X12::item - IL_0006: ret - } - - .property instance int32 Item() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32, - int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .get instance int32 Match01/Test1/X12::get_Item() - } - } - - .class auto ansi serializable nested public beforefieldinit specialname X13 - extends Match01/Test1 - { - .custom instance void [runtime]System.Diagnostics.DebuggerTypeProxyAttribute::.ctor(class [runtime]System.Type) = ( 01 00 20 4D 61 74 63 68 30 31 2B 54 65 73 74 31 - 2B 58 31 33 40 44 65 62 75 67 54 79 70 65 50 72 - 6F 78 79 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerDisplayAttribute::.ctor(string) = ( 01 00 15 7B 5F 5F 44 65 62 75 67 44 69 73 70 6C - 61 79 28 29 2C 6E 71 7D 00 00 ) - .field assembly initonly int32 item - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname instance void .ctor(int32 item) cil managed - { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 0D 4D 61 74 63 68 30 31 2B 54 - 65 73 74 31 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldc.i4.2 - IL_0002: call instance void Match01/Test1::.ctor(int32) - IL_0007: ldarg.0 - IL_0008: ldarg.1 - IL_0009: stfld int32 Match01/Test1/X13::item - IL_000e: ret - } - - .method public hidebysig instance int32 get_Item() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld int32 Match01/Test1/X13::item - IL_0006: ret - } - - .property instance int32 Item() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32, - int32) = ( 01 00 04 00 00 00 02 00 00 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .get instance int32 Match01/Test1/X13::get_Item() - } - } - - .class auto ansi serializable nested public beforefieldinit specialname X14 - extends Match01/Test1 - { - .custom instance void [runtime]System.Diagnostics.DebuggerTypeProxyAttribute::.ctor(class [runtime]System.Type) = ( 01 00 20 4D 61 74 63 68 30 31 2B 54 65 73 74 31 - 2B 58 31 34 40 44 65 62 75 67 54 79 70 65 50 72 - 6F 78 79 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerDisplayAttribute::.ctor(string) = ( 01 00 15 7B 5F 5F 44 65 62 75 67 44 69 73 70 6C - 61 79 28 29 2C 6E 71 7D 00 00 ) - .field assembly initonly int32 item - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname instance void .ctor(int32 item) cil managed - { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 0D 4D 61 74 63 68 30 31 2B 54 - 65 73 74 31 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldc.i4.3 - IL_0002: call instance void Match01/Test1::.ctor(int32) - IL_0007: ldarg.0 - IL_0008: ldarg.1 - IL_0009: stfld int32 Match01/Test1/X14::item - IL_000e: ret - } - - .method public hidebysig instance int32 get_Item() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld int32 Match01/Test1/X14::item - IL_0006: ret - } - - .property instance int32 Item() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32, - int32) = ( 01 00 04 00 00 00 03 00 00 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .get instance int32 Match01/Test1/X14::get_Item() - } - } - - .class auto ansi nested assembly beforefieldinit specialname X11@DebugTypeProxy - extends [runtime]System.Object - { - .field assembly class Match01/Test1/X11 _obj - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method public specialname rtspecialname instance void .ctor(class Match01/Test1/X11 obj) cil managed - { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 0D 4D 61 74 63 68 30 31 2B 54 - 65 73 74 31 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [runtime]System.Object::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class Match01/Test1/X11 Match01/Test1/X11@DebugTypeProxy::_obj - IL_000d: ret - } - - .method public hidebysig instance int32 get_Item() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld class Match01/Test1/X11 Match01/Test1/X11@DebugTypeProxy::_obj - IL_0006: ldfld int32 Match01/Test1/X11::item - IL_000b: ret - } - - .property instance int32 Item() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32, - int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .get instance int32 Match01/Test1/X11@DebugTypeProxy::get_Item() - } - } - - .class auto ansi nested assembly beforefieldinit specialname X12@DebugTypeProxy - extends [runtime]System.Object - { - .field assembly class Match01/Test1/X12 _obj - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method public specialname rtspecialname instance void .ctor(class Match01/Test1/X12 obj) cil managed - { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 0D 4D 61 74 63 68 30 31 2B 54 - 65 73 74 31 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [runtime]System.Object::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class Match01/Test1/X12 Match01/Test1/X12@DebugTypeProxy::_obj - IL_000d: ret - } - - .method public hidebysig instance int32 get_Item() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld class Match01/Test1/X12 Match01/Test1/X12@DebugTypeProxy::_obj - IL_0006: ldfld int32 Match01/Test1/X12::item - IL_000b: ret - } - - .property instance int32 Item() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32, - int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .get instance int32 Match01/Test1/X12@DebugTypeProxy::get_Item() - } - } - - .class auto ansi nested assembly beforefieldinit specialname X13@DebugTypeProxy - extends [runtime]System.Object - { - .field assembly class Match01/Test1/X13 _obj - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method public specialname rtspecialname instance void .ctor(class Match01/Test1/X13 obj) cil managed - { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 0D 4D 61 74 63 68 30 31 2B 54 - 65 73 74 31 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [runtime]System.Object::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class Match01/Test1/X13 Match01/Test1/X13@DebugTypeProxy::_obj - IL_000d: ret - } - - .method public hidebysig instance int32 get_Item() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld class Match01/Test1/X13 Match01/Test1/X13@DebugTypeProxy::_obj - IL_0006: ldfld int32 Match01/Test1/X13::item - IL_000b: ret - } - - .property instance int32 Item() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32, - int32) = ( 01 00 04 00 00 00 02 00 00 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .get instance int32 Match01/Test1/X13@DebugTypeProxy::get_Item() - } - } - - .class auto ansi nested assembly beforefieldinit specialname X14@DebugTypeProxy - extends [runtime]System.Object - { - .field assembly class Match01/Test1/X14 _obj - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method public specialname rtspecialname instance void .ctor(class Match01/Test1/X14 obj) cil managed - { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 60 06 00 00 0D 4D 61 74 63 68 30 31 2B 54 - 65 73 74 31 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [runtime]System.Object::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class Match01/Test1/X14 Match01/Test1/X14@DebugTypeProxy::_obj - IL_000d: ret - } - - .method public hidebysig instance int32 get_Item() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld class Match01/Test1/X14 Match01/Test1/X14@DebugTypeProxy::_obj - IL_0006: ldfld int32 Match01/Test1/X14::item - IL_000b: ret - } - - .property instance int32 Item() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32, - int32) = ( 01 00 04 00 00 00 03 00 00 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .get instance int32 Match01/Test1/X14@DebugTypeProxy::get_Item() - } - } - - .class auto ansi serializable sealed nested assembly beforefieldinit clo@4 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .field public class Match01/Test1 this - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .field public class Match01/Test1 obj - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname instance void .ctor(class Match01/Test1 this, class Match01/Test1 obj) cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class Match01/Test1 Match01/Test1/clo@4::this - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class Match01/Test1 Match01/Test1/clo@4::obj - IL_0014: ret - } - - .method public strict virtual instance int32 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed - { - - .maxstack 7 - .locals init (int32 V_0, - int32 V_1, - class Match01/Test1/X11 V_2, - class Match01/Test1/X11 V_3, - class [runtime]System.Collections.IComparer V_4, - int32 V_5, - int32 V_6, - class Match01/Test1/X12 V_7, - class Match01/Test1/X12 V_8, - class Match01/Test1/X13 V_9, - class Match01/Test1/X13 V_10, - class Match01/Test1/X14 V_11, - class Match01/Test1/X14 V_12) - IL_0000: ldarg.0 - IL_0001: ldfld class Match01/Test1 Match01/Test1/clo@4::this - IL_0006: ldfld int32 Match01/Test1::_tag - IL_000b: stloc.0 - IL_000c: ldarg.0 - IL_000d: ldfld class Match01/Test1 Match01/Test1/clo@4::obj - IL_0012: ldfld int32 Match01/Test1::_tag - IL_0017: stloc.1 - IL_0018: ldloc.0 - IL_0019: ldloc.1 - IL_001a: bne.un IL_013f - - IL_001f: ldarg.0 - IL_0020: ldfld class Match01/Test1 Match01/Test1/clo@4::this - IL_0025: call instance int32 Match01/Test1::get_Tag() - IL_002a: switch ( - IL_003f, - IL_007c, - IL_00bd, - IL_00fe) - IL_003f: ldarg.0 - IL_0040: ldfld class Match01/Test1 Match01/Test1/clo@4::this - IL_0045: castclass Match01/Test1/X11 - IL_004a: stloc.2 - IL_004b: ldarg.0 - IL_004c: ldfld class Match01/Test1 Match01/Test1/clo@4::obj - IL_0051: castclass Match01/Test1/X11 - IL_0056: stloc.3 - IL_0057: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_005c: stloc.s V_4 - IL_005e: ldloc.2 - IL_005f: ldfld int32 Match01/Test1/X11::item - IL_0064: stloc.s V_5 - IL_0066: ldloc.3 - IL_0067: ldfld int32 Match01/Test1/X11::item - IL_006c: stloc.s V_6 - IL_006e: ldloc.s V_5 - IL_0070: ldloc.s V_6 - IL_0072: cgt - IL_0074: ldloc.s V_5 - IL_0076: ldloc.s V_6 - IL_0078: clt - IL_007a: sub - IL_007b: ret - - IL_007c: ldarg.0 - IL_007d: ldfld class Match01/Test1 Match01/Test1/clo@4::this - IL_0082: castclass Match01/Test1/X12 - IL_0087: stloc.s V_7 - IL_0089: ldarg.0 - IL_008a: ldfld class Match01/Test1 Match01/Test1/clo@4::obj - IL_008f: castclass Match01/Test1/X12 - IL_0094: stloc.s V_8 - IL_0096: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_009b: stloc.s V_4 - IL_009d: ldloc.s V_7 - IL_009f: ldfld int32 Match01/Test1/X12::item - IL_00a4: stloc.s V_5 - IL_00a6: ldloc.s V_8 - IL_00a8: ldfld int32 Match01/Test1/X12::item - IL_00ad: stloc.s V_6 - IL_00af: ldloc.s V_5 - IL_00b1: ldloc.s V_6 - IL_00b3: cgt - IL_00b5: ldloc.s V_5 - IL_00b7: ldloc.s V_6 - IL_00b9: clt - IL_00bb: sub - IL_00bc: ret - - IL_00bd: ldarg.0 - IL_00be: ldfld class Match01/Test1 Match01/Test1/clo@4::this - IL_00c3: castclass Match01/Test1/X13 - IL_00c8: stloc.s V_9 - IL_00ca: ldarg.0 - IL_00cb: ldfld class Match01/Test1 Match01/Test1/clo@4::obj - IL_00d0: castclass Match01/Test1/X13 - IL_00d5: stloc.s V_10 - IL_00d7: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_00dc: stloc.s V_4 - IL_00de: ldloc.s V_9 - IL_00e0: ldfld int32 Match01/Test1/X13::item - IL_00e5: stloc.s V_5 - IL_00e7: ldloc.s V_10 - IL_00e9: ldfld int32 Match01/Test1/X13::item - IL_00ee: stloc.s V_6 - IL_00f0: ldloc.s V_5 - IL_00f2: ldloc.s V_6 - IL_00f4: cgt - IL_00f6: ldloc.s V_5 - IL_00f8: ldloc.s V_6 - IL_00fa: clt - IL_00fc: sub - IL_00fd: ret - - IL_00fe: ldarg.0 - IL_00ff: ldfld class Match01/Test1 Match01/Test1/clo@4::this - IL_0104: castclass Match01/Test1/X14 - IL_0109: stloc.s V_11 - IL_010b: ldarg.0 - IL_010c: ldfld class Match01/Test1 Match01/Test1/clo@4::obj - IL_0111: castclass Match01/Test1/X14 - IL_0116: stloc.s V_12 - IL_0118: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_011d: stloc.s V_4 - IL_011f: ldloc.s V_11 - IL_0121: ldfld int32 Match01/Test1/X14::item - IL_0126: stloc.s V_5 - IL_0128: ldloc.s V_12 - IL_012a: ldfld int32 Match01/Test1/X14::item - IL_012f: stloc.s V_6 - IL_0131: ldloc.s V_5 - IL_0133: ldloc.s V_6 - IL_0135: cgt - IL_0137: ldloc.s V_5 - IL_0139: ldloc.s V_6 - IL_013b: clt - IL_013d: sub - IL_013e: ret - - IL_013f: ldloc.0 - IL_0140: ldloc.1 - IL_0141: sub - IL_0142: ret - } - - } - - .class auto ansi serializable sealed nested assembly beforefieldinit 'clo@4-1' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .field public class Match01/Test1 this - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .field public object obj - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .field public class Match01/Test1 objTemp - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname - instance void .ctor(class Match01/Test1 this, - object obj, - class Match01/Test1 objTemp) cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class Match01/Test1 Match01/Test1/'clo@4-1'::this - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld object Match01/Test1/'clo@4-1'::obj - IL_0014: ldarg.0 - IL_0015: ldarg.3 - IL_0016: stfld class Match01/Test1 Match01/Test1/'clo@4-1'::objTemp - IL_001b: ret - } - - .method public strict virtual instance int32 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed - { - - .maxstack 7 - .locals init (int32 V_0, - int32 V_1, - class Match01/Test1/X11 V_2, - class Match01/Test1/X11 V_3, - int32 V_4, - int32 V_5, - class Match01/Test1/X12 V_6, - class Match01/Test1/X12 V_7, - class Match01/Test1/X13 V_8, - class Match01/Test1/X13 V_9, - class Match01/Test1/X14 V_10, - class Match01/Test1/X14 V_11) - IL_0000: ldarg.0 - IL_0001: ldfld object Match01/Test1/'clo@4-1'::obj - IL_0006: unbox.any Match01/Test1 - IL_000b: brfalse IL_0137 - - IL_0010: ldarg.0 - IL_0011: ldfld class Match01/Test1 Match01/Test1/'clo@4-1'::this - IL_0016: ldfld int32 Match01/Test1::_tag - IL_001b: stloc.0 - IL_001c: ldarg.0 - IL_001d: ldfld class Match01/Test1 Match01/Test1/'clo@4-1'::objTemp - IL_0022: ldfld int32 Match01/Test1::_tag - IL_0027: stloc.1 - IL_0028: ldloc.0 - IL_0029: ldloc.1 - IL_002a: bne.un IL_0133 - - IL_002f: ldarg.0 - IL_0030: ldfld class Match01/Test1 Match01/Test1/'clo@4-1'::this - IL_0035: call instance int32 Match01/Test1::get_Tag() - IL_003a: switch ( - IL_004f, - IL_0085, - IL_00bf, - IL_00f9) - IL_004f: ldarg.0 - IL_0050: ldfld class Match01/Test1 Match01/Test1/'clo@4-1'::this - IL_0055: castclass Match01/Test1/X11 - IL_005a: stloc.2 - IL_005b: ldarg.0 - IL_005c: ldfld class Match01/Test1 Match01/Test1/'clo@4-1'::objTemp - IL_0061: castclass Match01/Test1/X11 - IL_0066: stloc.3 - IL_0067: ldloc.2 - IL_0068: ldfld int32 Match01/Test1/X11::item - IL_006d: stloc.s V_4 - IL_006f: ldloc.3 - IL_0070: ldfld int32 Match01/Test1/X11::item - IL_0075: stloc.s V_5 - IL_0077: ldloc.s V_4 - IL_0079: ldloc.s V_5 - IL_007b: cgt - IL_007d: ldloc.s V_4 - IL_007f: ldloc.s V_5 - IL_0081: clt - IL_0083: sub - IL_0084: ret - - IL_0085: ldarg.0 - IL_0086: ldfld class Match01/Test1 Match01/Test1/'clo@4-1'::this - IL_008b: castclass Match01/Test1/X12 - IL_0090: stloc.s V_6 - IL_0092: ldarg.0 - IL_0093: ldfld class Match01/Test1 Match01/Test1/'clo@4-1'::objTemp - IL_0098: castclass Match01/Test1/X12 - IL_009d: stloc.s V_7 - IL_009f: ldloc.s V_6 - IL_00a1: ldfld int32 Match01/Test1/X12::item - IL_00a6: stloc.s V_4 - IL_00a8: ldloc.s V_7 - IL_00aa: ldfld int32 Match01/Test1/X12::item - IL_00af: stloc.s V_5 - IL_00b1: ldloc.s V_4 - IL_00b3: ldloc.s V_5 - IL_00b5: cgt - IL_00b7: ldloc.s V_4 - IL_00b9: ldloc.s V_5 - IL_00bb: clt - IL_00bd: sub - IL_00be: ret - - IL_00bf: ldarg.0 - IL_00c0: ldfld class Match01/Test1 Match01/Test1/'clo@4-1'::this - IL_00c5: castclass Match01/Test1/X13 - IL_00ca: stloc.s V_8 - IL_00cc: ldarg.0 - IL_00cd: ldfld class Match01/Test1 Match01/Test1/'clo@4-1'::objTemp - IL_00d2: castclass Match01/Test1/X13 - IL_00d7: stloc.s V_9 - IL_00d9: ldloc.s V_8 - IL_00db: ldfld int32 Match01/Test1/X13::item - IL_00e0: stloc.s V_4 - IL_00e2: ldloc.s V_9 - IL_00e4: ldfld int32 Match01/Test1/X13::item - IL_00e9: stloc.s V_5 - IL_00eb: ldloc.s V_4 - IL_00ed: ldloc.s V_5 - IL_00ef: cgt - IL_00f1: ldloc.s V_4 - IL_00f3: ldloc.s V_5 - IL_00f5: clt - IL_00f7: sub - IL_00f8: ret - - IL_00f9: ldarg.0 - IL_00fa: ldfld class Match01/Test1 Match01/Test1/'clo@4-1'::this - IL_00ff: castclass Match01/Test1/X14 - IL_0104: stloc.s V_10 - IL_0106: ldarg.0 - IL_0107: ldfld class Match01/Test1 Match01/Test1/'clo@4-1'::objTemp - IL_010c: castclass Match01/Test1/X14 - IL_0111: stloc.s V_11 - IL_0113: ldloc.s V_10 - IL_0115: ldfld int32 Match01/Test1/X14::item - IL_011a: stloc.s V_4 - IL_011c: ldloc.s V_11 - IL_011e: ldfld int32 Match01/Test1/X14::item - IL_0123: stloc.s V_5 - IL_0125: ldloc.s V_4 - IL_0127: ldloc.s V_5 - IL_0129: cgt - IL_012b: ldloc.s V_4 - IL_012d: ldloc.s V_5 - IL_012f: clt - IL_0131: sub - IL_0132: ret - - IL_0133: ldloc.0 - IL_0134: ldloc.1 - IL_0135: sub - IL_0136: ret - - IL_0137: ldc.i4.1 - IL_0138: ret - } - - } - - .field assembly initonly int32 _tag - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname instance void .ctor(int32 _tag) cil managed - { - .custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 E0 07 00 00 0D 4D 61 74 63 68 30 31 2B 54 - 65 73 74 31 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [runtime]System.Object::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld int32 Match01/Test1::_tag - IL_000d: ret - } - - .method public static class Match01/Test1 NewX11(int32 item) cil managed - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32) = ( 01 00 08 00 00 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: newobj instance void Match01/Test1/X11::.ctor(int32) - IL_0006: ret - } - - .method public hidebysig instance bool get_IsX11() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance int32 Match01/Test1::get_Tag() - IL_0006: ldc.i4.0 - IL_0007: ceq - IL_0009: ret - } - - .method public static class Match01/Test1 NewX12(int32 item) cil managed - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32) = ( 01 00 08 00 00 00 01 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: newobj instance void Match01/Test1/X12::.ctor(int32) - IL_0006: ret - } - - .method public hidebysig instance bool get_IsX12() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance int32 Match01/Test1::get_Tag() - IL_0006: ldc.i4.1 - IL_0007: ceq - IL_0009: ret - } - - .method public static class Match01/Test1 NewX13(int32 item) cil managed - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32) = ( 01 00 08 00 00 00 02 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: newobj instance void Match01/Test1/X13::.ctor(int32) - IL_0006: ret - } - - .method public hidebysig instance bool get_IsX13() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance int32 Match01/Test1::get_Tag() - IL_0006: ldc.i4.2 - IL_0007: ceq - IL_0009: ret - } - - .method public static class Match01/Test1 NewX14(int32 item) cil managed - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32) = ( 01 00 08 00 00 00 03 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: newobj instance void Match01/Test1/X14::.ctor(int32) - IL_0006: ret - } - - .method public hidebysig instance bool get_IsX14() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance int32 Match01/Test1::get_Tag() - IL_0006: ldc.i4.3 - IL_0007: ceq - IL_0009: ret - } - - .method public hidebysig instance int32 get_Tag() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld int32 Match01/Test1::_tag - IL_0006: ret - } - - .method assembly hidebysig specialname instance object __DebugDisplay() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldstr "%+0.8A" - IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,string>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0015: ret - } - - .method public strict virtual instance string ToString() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldstr "%+A" - IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class Match01/Test1>::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: ldarg.0 - IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0015: ret - } - - .method public hidebysig virtual final instance int32 CompareTo(class Match01/Test1 obj) cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 4 - .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_0) - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_001a - - IL_0003: ldarg.1 - IL_0004: brfalse.s IL_0018 - - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: newobj instance void Match01/Test1/clo@4::.ctor(class Match01/Test1, - class Match01/Test1) - IL_000d: stloc.0 - IL_000e: ldloc.0 - IL_000f: ldnull - IL_0010: tail. - IL_0012: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0017: ret - - IL_0018: ldc.i4.1 - IL_0019: ret - - IL_001a: ldarg.1 - IL_001b: brfalse.s IL_001f - - IL_001d: ldc.i4.m1 - IL_001e: ret - - IL_001f: ldc.i4.0 - IL_0020: ret - } - - .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: unbox.any Match01/Test1 - IL_0007: callvirt instance int32 Match01/Test1::CompareTo(class Match01/Test1) - IL_000c: ret - } - - .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 5 - .locals init (class Match01/Test1 V_0, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_1) - IL_0000: ldarg.1 - IL_0001: unbox.any Match01/Test1 - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: brfalse.s IL_001d - - IL_000a: ldarg.0 - IL_000b: ldarg.1 - IL_000c: ldloc.0 - IL_000d: newobj instance void Match01/Test1/'clo@4-1'::.ctor(class Match01/Test1, - object, - class Match01/Test1) - IL_0012: stloc.1 - IL_0013: ldloc.1 - IL_0014: ldnull - IL_0015: tail. - IL_0017: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001c: ret - - IL_001d: ldarg.1 - IL_001e: unbox.any Match01/Test1 - IL_0023: brfalse.s IL_0027 - - IL_0025: ldc.i4.m1 - IL_0026: ret - - IL_0027: ldc.i4.0 - IL_0028: ret - } - - .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 7 - .locals init (int32 V_0, - class Match01/Test1/X11 V_1, - class Match01/Test1/X12 V_2, - class Match01/Test1/X13 V_3, - class Match01/Test1/X14 V_4) - IL_0000: ldarg.0 - IL_0001: brfalse IL_00a5 - - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldarg.0 - IL_0009: call instance int32 Match01/Test1::get_Tag() - IL_000e: switch ( - IL_0023, - IL_0043, - IL_0063, - IL_0083) - IL_0023: ldarg.0 - IL_0024: castclass Match01/Test1/X11 - IL_0029: stloc.1 - IL_002a: ldc.i4.0 - IL_002b: stloc.0 - IL_002c: ldc.i4 0x9e3779b9 - IL_0031: ldloc.1 - IL_0032: ldfld int32 Match01/Test1/X11::item - IL_0037: ldloc.0 - IL_0038: ldc.i4.6 - IL_0039: shl - IL_003a: ldloc.0 - IL_003b: ldc.i4.2 - IL_003c: shr - IL_003d: add - IL_003e: add - IL_003f: add - IL_0040: stloc.0 - IL_0041: ldloc.0 - IL_0042: ret - - IL_0043: ldarg.0 - IL_0044: castclass Match01/Test1/X12 - IL_0049: stloc.2 - IL_004a: ldc.i4.1 - IL_004b: stloc.0 - IL_004c: ldc.i4 0x9e3779b9 - IL_0051: ldloc.2 - IL_0052: ldfld int32 Match01/Test1/X12::item - IL_0057: ldloc.0 - IL_0058: ldc.i4.6 - IL_0059: shl - IL_005a: ldloc.0 - IL_005b: ldc.i4.2 - IL_005c: shr - IL_005d: add - IL_005e: add - IL_005f: add - IL_0060: stloc.0 - IL_0061: ldloc.0 - IL_0062: ret - - IL_0063: ldarg.0 - IL_0064: castclass Match01/Test1/X13 - IL_0069: stloc.3 - IL_006a: ldc.i4.2 - IL_006b: stloc.0 - IL_006c: ldc.i4 0x9e3779b9 - IL_0071: ldloc.3 - IL_0072: ldfld int32 Match01/Test1/X13::item - IL_0077: ldloc.0 - IL_0078: ldc.i4.6 - IL_0079: shl - IL_007a: ldloc.0 - IL_007b: ldc.i4.2 - IL_007c: shr - IL_007d: add - IL_007e: add - IL_007f: add - IL_0080: stloc.0 - IL_0081: ldloc.0 - IL_0082: ret - - IL_0083: ldarg.0 - IL_0084: castclass Match01/Test1/X14 - IL_0089: stloc.s V_4 - IL_008b: ldc.i4.3 - IL_008c: stloc.0 - IL_008d: ldc.i4 0x9e3779b9 - IL_0092: ldloc.s V_4 - IL_0094: ldfld int32 Match01/Test1/X14::item - IL_0099: ldloc.0 - IL_009a: ldc.i4.6 - IL_009b: shl - IL_009c: ldloc.0 - IL_009d: ldc.i4.2 - IL_009e: shr - IL_009f: add - IL_00a0: add - IL_00a1: add - IL_00a2: stloc.0 - IL_00a3: ldloc.0 - IL_00a4: ret - - IL_00a5: ldc.i4.0 - IL_00a6: ret - } - - .method public hidebysig virtual final instance int32 GetHashCode() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() - IL_0006: callvirt instance int32 Match01/Test1::GetHashCode(class [runtime]System.Collections.IEqualityComparer) - IL_000b: ret - } - - .method public hidebysig instance bool Equals(class Match01/Test1 obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 4 - .locals init (int32 V_0, - int32 V_1, - class Match01/Test1/X11 V_2, - class Match01/Test1/X11 V_3, - class Match01/Test1/X12 V_4, - class Match01/Test1/X12 V_5, - class Match01/Test1/X13 V_6, - class Match01/Test1/X13 V_7, - class Match01/Test1/X14 V_8, - class Match01/Test1/X14 V_9) - IL_0000: ldarg.0 - IL_0001: brfalse IL_00c0 - - IL_0006: ldarg.1 - IL_0007: brfalse IL_00be - - IL_000c: ldarg.0 - IL_000d: ldfld int32 Match01/Test1::_tag - IL_0012: stloc.0 - IL_0013: ldarg.1 - IL_0014: ldfld int32 Match01/Test1::_tag - IL_0019: stloc.1 - IL_001a: ldloc.0 - IL_001b: ldloc.1 - IL_001c: bne.un IL_00bc - - IL_0021: ldarg.0 - IL_0022: call instance int32 Match01/Test1::get_Tag() - IL_0027: switch ( - IL_003c, - IL_0059, - IL_007a, - IL_009b) - IL_003c: ldarg.0 - IL_003d: castclass Match01/Test1/X11 - IL_0042: stloc.2 - IL_0043: ldarg.1 - IL_0044: castclass Match01/Test1/X11 - IL_0049: stloc.3 - IL_004a: ldloc.2 - IL_004b: ldfld int32 Match01/Test1/X11::item - IL_0050: ldloc.3 - IL_0051: ldfld int32 Match01/Test1/X11::item - IL_0056: ceq - IL_0058: ret - - IL_0059: ldarg.0 - IL_005a: castclass Match01/Test1/X12 - IL_005f: stloc.s V_4 - IL_0061: ldarg.1 - IL_0062: castclass Match01/Test1/X12 - IL_0067: stloc.s V_5 - IL_0069: ldloc.s V_4 - IL_006b: ldfld int32 Match01/Test1/X12::item - IL_0070: ldloc.s V_5 - IL_0072: ldfld int32 Match01/Test1/X12::item - IL_0077: ceq - IL_0079: ret - - IL_007a: ldarg.0 - IL_007b: castclass Match01/Test1/X13 - IL_0080: stloc.s V_6 - IL_0082: ldarg.1 - IL_0083: castclass Match01/Test1/X13 - IL_0088: stloc.s V_7 - IL_008a: ldloc.s V_6 - IL_008c: ldfld int32 Match01/Test1/X13::item - IL_0091: ldloc.s V_7 - IL_0093: ldfld int32 Match01/Test1/X13::item - IL_0098: ceq - IL_009a: ret - - IL_009b: ldarg.0 - IL_009c: castclass Match01/Test1/X14 - IL_00a1: stloc.s V_8 - IL_00a3: ldarg.1 - IL_00a4: castclass Match01/Test1/X14 - IL_00a9: stloc.s V_9 - IL_00ab: ldloc.s V_8 - IL_00ad: ldfld int32 Match01/Test1/X14::item - IL_00b2: ldloc.s V_9 - IL_00b4: ldfld int32 Match01/Test1/X14::item - IL_00b9: ceq - IL_00bb: ret - - IL_00bc: ldc.i4.0 - IL_00bd: ret - - IL_00be: ldc.i4.0 - IL_00bf: ret - - IL_00c0: ldarg.1 - IL_00c1: ldnull - IL_00c2: cgt.un - IL_00c4: ldc.i4.0 - IL_00c5: ceq - IL_00c7: ret - } - - .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 5 - .locals init (class Match01/Test1 V_0) - IL_0000: ldarg.1 - IL_0001: isinst Match01/Test1 - IL_0006: stloc.0 - IL_0007: ldloc.0 - IL_0008: brfalse.s IL_0013 - - IL_000a: ldarg.0 - IL_000b: ldloc.0 - IL_000c: ldarg.2 - IL_000d: callvirt instance bool Match01/Test1::Equals(class Match01/Test1, - class [runtime]System.Collections.IEqualityComparer) - IL_0012: ret - - IL_0013: ldc.i4.0 - IL_0014: ret - } - - .method public hidebysig virtual final instance bool Equals(class Match01/Test1 obj) cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 4 - .locals init (int32 V_0, - int32 V_1, - class Match01/Test1/X11 V_2, - class Match01/Test1/X11 V_3, - class Match01/Test1/X12 V_4, - class Match01/Test1/X12 V_5, - class Match01/Test1/X13 V_6, - class Match01/Test1/X13 V_7, - class Match01/Test1/X14 V_8, - class Match01/Test1/X14 V_9) - IL_0000: ldarg.0 - IL_0001: brfalse IL_00c0 - - IL_0006: ldarg.1 - IL_0007: brfalse IL_00be - - IL_000c: ldarg.0 - IL_000d: ldfld int32 Match01/Test1::_tag - IL_0012: stloc.0 - IL_0013: ldarg.1 - IL_0014: ldfld int32 Match01/Test1::_tag - IL_0019: stloc.1 - IL_001a: ldloc.0 - IL_001b: ldloc.1 - IL_001c: bne.un IL_00bc - - IL_0021: ldarg.0 - IL_0022: call instance int32 Match01/Test1::get_Tag() - IL_0027: switch ( - IL_003c, - IL_0059, - IL_007a, - IL_009b) - IL_003c: ldarg.0 - IL_003d: castclass Match01/Test1/X11 - IL_0042: stloc.2 - IL_0043: ldarg.1 - IL_0044: castclass Match01/Test1/X11 - IL_0049: stloc.3 - IL_004a: ldloc.2 - IL_004b: ldfld int32 Match01/Test1/X11::item - IL_0050: ldloc.3 - IL_0051: ldfld int32 Match01/Test1/X11::item - IL_0056: ceq - IL_0058: ret - - IL_0059: ldarg.0 - IL_005a: castclass Match01/Test1/X12 - IL_005f: stloc.s V_4 - IL_0061: ldarg.1 - IL_0062: castclass Match01/Test1/X12 - IL_0067: stloc.s V_5 - IL_0069: ldloc.s V_4 - IL_006b: ldfld int32 Match01/Test1/X12::item - IL_0070: ldloc.s V_5 - IL_0072: ldfld int32 Match01/Test1/X12::item - IL_0077: ceq - IL_0079: ret - - IL_007a: ldarg.0 - IL_007b: castclass Match01/Test1/X13 - IL_0080: stloc.s V_6 - IL_0082: ldarg.1 - IL_0083: castclass Match01/Test1/X13 - IL_0088: stloc.s V_7 - IL_008a: ldloc.s V_6 - IL_008c: ldfld int32 Match01/Test1/X13::item - IL_0091: ldloc.s V_7 - IL_0093: ldfld int32 Match01/Test1/X13::item - IL_0098: ceq - IL_009a: ret - - IL_009b: ldarg.0 - IL_009c: castclass Match01/Test1/X14 - IL_00a1: stloc.s V_8 - IL_00a3: ldarg.1 - IL_00a4: castclass Match01/Test1/X14 - IL_00a9: stloc.s V_9 - IL_00ab: ldloc.s V_8 - IL_00ad: ldfld int32 Match01/Test1/X14::item - IL_00b2: ldloc.s V_9 - IL_00b4: ldfld int32 Match01/Test1/X14::item - IL_00b9: ceq - IL_00bb: ret - - IL_00bc: ldc.i4.0 - IL_00bd: ret - - IL_00be: ldc.i4.0 - IL_00bf: ret - - IL_00c0: ldarg.1 - IL_00c1: ldnull - IL_00c2: cgt.un - IL_00c4: ldc.i4.0 - IL_00c5: ceq - IL_00c7: ret - } - - .method public hidebysig virtual final instance bool Equals(object obj) cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 4 - .locals init (class Match01/Test1 V_0) - IL_0000: ldarg.1 - IL_0001: isinst Match01/Test1 - IL_0006: stloc.0 - IL_0007: ldloc.0 - IL_0008: brfalse.s IL_0012 - - IL_000a: ldarg.0 - IL_000b: ldloc.0 - IL_000c: callvirt instance bool Match01/Test1::Equals(class Match01/Test1) - IL_0011: ret - - IL_0012: ldc.i4.0 - IL_0013: ret - } - - .property instance int32 Tag() - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .get instance int32 Match01/Test1::get_Tag() - } - .property instance bool IsX11() - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .get instance bool Match01/Test1::get_IsX11() - } - .property instance bool IsX12() - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .get instance bool Match01/Test1::get_IsX12() - } - .property instance bool IsX13() - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .get instance bool Match01/Test1::get_IsX13() - } - .property instance bool IsX14() - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .get instance bool Match01/Test1::get_IsX14() - } - } - - .method public static int32 select1(class Match01/Test1 x) cil managed - { - - .maxstack 8 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: call instance int32 Match01/Test1::get_Tag() - IL_0007: switch ( - IL_001c, - IL_0028, - IL_002a, - IL_002c) - IL_001c: ldarg.0 - IL_001d: castclass Match01/Test1/X11 - IL_0022: ldfld int32 Match01/Test1/X11::item - IL_0027: ret - - IL_0028: ldc.i4.2 - IL_0029: ret - - IL_002a: ldc.i4.3 - IL_002b: ret - - IL_002c: ldc.i4.4 - IL_002d: ret - } - - .method public static int32 fm(class Match01/Test1 y) cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call int32 Match01::select1(class Match01/Test1) - IL_0006: ret - } - -} - -.class private abstract auto ansi sealed ''.$Match01 - extends [runtime]System.Object -{ - .method public static void main@() cil managed - { - .entrypoint - - .maxstack 8 - IL_0000: ret - } +.class public abstract auto ansi sealed assembly +extends [runtime]System.Object +{ +.custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) +.class abstract auto autochar serializable nested public beforefieldinit Test1 +extends [runtime]System.Object +implements class [runtime]System.IEquatable`1, +[runtime]System.Collections.IStructuralEquatable, +class [runtime]System.IComparable`1, +[runtime]System.IComparable, +[runtime]System.Collections.IStructuralComparable +{ +.custom instance void [runtime]System.Diagnostics.DebuggerDisplayAttribute::.ctor(string) = ( 01 00 15 7B 5F 5F 44 65 62 75 67 44 69 73 70 6C +61 79 28 29 2C 6E 71 7D 00 00 ) +.custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 01 00 00 00 00 00 ) +.class abstract auto ansi sealed nested public Tags +extends [runtime]System.Object +{ +.field public static literal int32 X11 = int32(0x00000000) +.field public static literal int32 X12 = int32(0x00000001) +.field public static literal int32 X13 = int32(0x00000002) +.field public static literal int32 X14 = int32(0x00000003) +} + +.class auto ansi serializable nested public beforefieldinit specialname X11 +extends assembly/Test1 +{ +.custom instance void [runtime]System.Diagnostics.DebuggerTypeProxyAttribute::.ctor(class [runtime]System.Type) = ( 01 00 20 4D 61 74 63 68 30 31 2B 54 65 73 74 31 +2B 58 31 31 40 44 65 62 75 67 54 79 70 65 50 72 +6F 78 79 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerDisplayAttribute::.ctor(string) = ( 01 00 15 7B 5F 5F 44 65 62 75 67 44 69 73 70 6C +61 79 28 29 2C 6E 71 7D 00 00 ) +.field assembly initonly int32 item +.custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.method assembly specialname rtspecialname instance void .ctor(int32 item) cil managed +{ +.custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, +class [runtime]System.Type) = ( 01 00 60 06 00 00 0D 4D 61 74 63 68 30 31 2B 54 +65 73 74 31 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: ldc.i4.0 +IL_0002: call instance void assembly/Test1::.ctor(int32) +IL_0007: ldarg.0 +IL_0008: ldarg.1 +IL_0009: stfld int32 assembly/Test1/X11::item +IL_000e: ret +} + +.method public hidebysig instance int32 get_Item() cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: ldfld int32 assembly/Test1/X11::item +IL_0006: ret +} + +.property instance int32 Item() +{ +.custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, +int32, +int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.get instance int32 assembly/Test1/X11::get_Item() +} +} + +.class auto ansi serializable nested public beforefieldinit specialname X12 +extends assembly/Test1 +{ +.custom instance void [runtime]System.Diagnostics.DebuggerTypeProxyAttribute::.ctor(class [runtime]System.Type) = ( 01 00 20 4D 61 74 63 68 30 31 2B 54 65 73 74 31 +2B 58 31 32 40 44 65 62 75 67 54 79 70 65 50 72 +6F 78 79 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerDisplayAttribute::.ctor(string) = ( 01 00 15 7B 5F 5F 44 65 62 75 67 44 69 73 70 6C +61 79 28 29 2C 6E 71 7D 00 00 ) +.field assembly initonly int32 item +.custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.method assembly specialname rtspecialname instance void .ctor(int32 item) cil managed +{ +.custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, +class [runtime]System.Type) = ( 01 00 60 06 00 00 0D 4D 61 74 63 68 30 31 2B 54 +65 73 74 31 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: ldc.i4.1 +IL_0002: call instance void assembly/Test1::.ctor(int32) +IL_0007: ldarg.0 +IL_0008: ldarg.1 +IL_0009: stfld int32 assembly/Test1/X12::item +IL_000e: ret +} + +.method public hidebysig instance int32 get_Item() cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: ldfld int32 assembly/Test1/X12::item +IL_0006: ret +} + +.property instance int32 Item() +{ +.custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, +int32, +int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 00 00 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.get instance int32 assembly/Test1/X12::get_Item() +} +} + +.class auto ansi serializable nested public beforefieldinit specialname X13 +extends assembly/Test1 +{ +.custom instance void [runtime]System.Diagnostics.DebuggerTypeProxyAttribute::.ctor(class [runtime]System.Type) = ( 01 00 20 4D 61 74 63 68 30 31 2B 54 65 73 74 31 +2B 58 31 33 40 44 65 62 75 67 54 79 70 65 50 72 +6F 78 79 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerDisplayAttribute::.ctor(string) = ( 01 00 15 7B 5F 5F 44 65 62 75 67 44 69 73 70 6C +61 79 28 29 2C 6E 71 7D 00 00 ) +.field assembly initonly int32 item +.custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.method assembly specialname rtspecialname instance void .ctor(int32 item) cil managed +{ +.custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, +class [runtime]System.Type) = ( 01 00 60 06 00 00 0D 4D 61 74 63 68 30 31 2B 54 +65 73 74 31 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: ldc.i4.2 +IL_0002: call instance void assembly/Test1::.ctor(int32) +IL_0007: ldarg.0 +IL_0008: ldarg.1 +IL_0009: stfld int32 assembly/Test1/X13::item +IL_000e: ret +} + +.method public hidebysig instance int32 get_Item() cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: ldfld int32 assembly/Test1/X13::item +IL_0006: ret +} + +.property instance int32 Item() +{ +.custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, +int32, +int32) = ( 01 00 04 00 00 00 02 00 00 00 00 00 00 00 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.get instance int32 assembly/Test1/X13::get_Item() +} +} + +.class auto ansi serializable nested public beforefieldinit specialname X14 +extends assembly/Test1 +{ +.custom instance void [runtime]System.Diagnostics.DebuggerTypeProxyAttribute::.ctor(class [runtime]System.Type) = ( 01 00 20 4D 61 74 63 68 30 31 2B 54 65 73 74 31 +2B 58 31 34 40 44 65 62 75 67 54 79 70 65 50 72 +6F 78 79 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerDisplayAttribute::.ctor(string) = ( 01 00 15 7B 5F 5F 44 65 62 75 67 44 69 73 70 6C +61 79 28 29 2C 6E 71 7D 00 00 ) +.field assembly initonly int32 item +.custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.method assembly specialname rtspecialname instance void .ctor(int32 item) cil managed +{ +.custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, +class [runtime]System.Type) = ( 01 00 60 06 00 00 0D 4D 61 74 63 68 30 31 2B 54 +65 73 74 31 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: ldc.i4.3 +IL_0002: call instance void assembly/Test1::.ctor(int32) +IL_0007: ldarg.0 +IL_0008: ldarg.1 +IL_0009: stfld int32 assembly/Test1/X14::item +IL_000e: ret +} + +.method public hidebysig instance int32 get_Item() cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: ldfld int32 assembly/Test1/X14::item +IL_0006: ret +} + +.property instance int32 Item() +{ +.custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, +int32, +int32) = ( 01 00 04 00 00 00 03 00 00 00 00 00 00 00 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.get instance int32 assembly/Test1/X14::get_Item() +} +} + +.class auto ansi nested assembly beforefieldinit specialname X11@DebugTypeProxy +extends [runtime]System.Object +{ +.field assembly class assembly/Test1/X11 _obj +.custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.method public specialname rtspecialname instance void .ctor(class assembly/Test1/X11 obj) cil managed +{ +.custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, +class [runtime]System.Type) = ( 01 00 60 06 00 00 0D 4D 61 74 63 68 30 31 2B 54 +65 73 74 31 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: call instance void [runtime]System.Object::.ctor() +IL_0006: ldarg.0 +IL_0007: ldarg.1 +IL_0008: stfld class assembly/Test1/X11 assembly/Test1/X11@DebugTypeProxy::_obj +IL_000d: ret +} + +.method public hidebysig instance int32 get_Item() cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: ldfld class assembly/Test1/X11 assembly/Test1/X11@DebugTypeProxy::_obj +IL_0006: ldfld int32 assembly/Test1/X11::item +IL_000b: ret +} + +.property instance int32 Item() +{ +.custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, +int32, +int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.get instance int32 assembly/Test1/X11@DebugTypeProxy::get_Item() +} +} + +.class auto ansi nested assembly beforefieldinit specialname X12@DebugTypeProxy +extends [runtime]System.Object +{ +.field assembly class assembly/Test1/X12 _obj +.custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.method public specialname rtspecialname instance void .ctor(class assembly/Test1/X12 obj) cil managed +{ +.custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, +class [runtime]System.Type) = ( 01 00 60 06 00 00 0D 4D 61 74 63 68 30 31 2B 54 +65 73 74 31 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: call instance void [runtime]System.Object::.ctor() +IL_0006: ldarg.0 +IL_0007: ldarg.1 +IL_0008: stfld class assembly/Test1/X12 assembly/Test1/X12@DebugTypeProxy::_obj +IL_000d: ret +} + +.method public hidebysig instance int32 get_Item() cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: ldfld class assembly/Test1/X12 assembly/Test1/X12@DebugTypeProxy::_obj +IL_0006: ldfld int32 assembly/Test1/X12::item +IL_000b: ret +} + +.property instance int32 Item() +{ +.custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, +int32, +int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 00 00 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.get instance int32 assembly/Test1/X12@DebugTypeProxy::get_Item() +} +} + +.class auto ansi nested assembly beforefieldinit specialname X13@DebugTypeProxy +extends [runtime]System.Object +{ +.field assembly class assembly/Test1/X13 _obj +.custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.method public specialname rtspecialname instance void .ctor(class assembly/Test1/X13 obj) cil managed +{ +.custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, +class [runtime]System.Type) = ( 01 00 60 06 00 00 0D 4D 61 74 63 68 30 31 2B 54 +65 73 74 31 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: call instance void [runtime]System.Object::.ctor() +IL_0006: ldarg.0 +IL_0007: ldarg.1 +IL_0008: stfld class assembly/Test1/X13 assembly/Test1/X13@DebugTypeProxy::_obj +IL_000d: ret +} + +.method public hidebysig instance int32 get_Item() cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: ldfld class assembly/Test1/X13 assembly/Test1/X13@DebugTypeProxy::_obj +IL_0006: ldfld int32 assembly/Test1/X13::item +IL_000b: ret +} + +.property instance int32 Item() +{ +.custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, +int32, +int32) = ( 01 00 04 00 00 00 02 00 00 00 00 00 00 00 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.get instance int32 assembly/Test1/X13@DebugTypeProxy::get_Item() +} +} + +.class auto ansi nested assembly beforefieldinit specialname X14@DebugTypeProxy +extends [runtime]System.Object +{ +.field assembly class assembly/Test1/X14 _obj +.custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.method public specialname rtspecialname instance void .ctor(class assembly/Test1/X14 obj) cil managed +{ +.custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, +class [runtime]System.Type) = ( 01 00 60 06 00 00 0D 4D 61 74 63 68 30 31 2B 54 +65 73 74 31 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: call instance void [runtime]System.Object::.ctor() +IL_0006: ldarg.0 +IL_0007: ldarg.1 +IL_0008: stfld class assembly/Test1/X14 assembly/Test1/X14@DebugTypeProxy::_obj +IL_000d: ret +} + +.method public hidebysig instance int32 get_Item() cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: ldfld class assembly/Test1/X14 assembly/Test1/X14@DebugTypeProxy::_obj +IL_0006: ldfld int32 assembly/Test1/X14::item +IL_000b: ret +} + +.property instance int32 Item() +{ +.custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, +int32, +int32) = ( 01 00 04 00 00 00 03 00 00 00 00 00 00 00 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.get instance int32 assembly/Test1/X14@DebugTypeProxy::get_Item() +} +} + +.field assembly initonly int32 _tag +.custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.method assembly specialname rtspecialname instance void .ctor(int32 _tag) cil managed +{ +.custom instance void System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, +class [runtime]System.Type) = ( 01 00 E0 07 00 00 0D 4D 61 74 63 68 30 31 2B 54 +65 73 74 31 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: call instance void [runtime]System.Object::.ctor() +IL_0006: ldarg.0 +IL_0007: ldarg.1 +IL_0008: stfld int32 assembly/Test1::_tag +IL_000d: ret +} + +.method public static class assembly/Test1 NewX11(int32 item) cil managed +{ +.custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, +int32) = ( 01 00 08 00 00 00 00 00 00 00 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: newobj instance void assembly/Test1/X11::.ctor(int32) +IL_0006: ret +} + +.method public hidebysig instance bool get_IsX11() cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: call instance int32 assembly/Test1::get_Tag() +IL_0006: ldc.i4.0 +IL_0007: ceq +IL_0009: ret +} + +.method public static class assembly/Test1 NewX12(int32 item) cil managed +{ +.custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, +int32) = ( 01 00 08 00 00 00 01 00 00 00 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: newobj instance void assembly/Test1/X12::.ctor(int32) +IL_0006: ret +} + +.method public hidebysig instance bool get_IsX12() cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: call instance int32 assembly/Test1::get_Tag() +IL_0006: ldc.i4.1 +IL_0007: ceq +IL_0009: ret +} + +.method public static class assembly/Test1 NewX13(int32 item) cil managed +{ +.custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, +int32) = ( 01 00 08 00 00 00 02 00 00 00 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: newobj instance void assembly/Test1/X13::.ctor(int32) +IL_0006: ret +} + +.method public hidebysig instance bool get_IsX13() cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: call instance int32 assembly/Test1::get_Tag() +IL_0006: ldc.i4.2 +IL_0007: ceq +IL_0009: ret +} + +.method public static class assembly/Test1 NewX14(int32 item) cil managed +{ +.custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, +int32) = ( 01 00 08 00 00 00 03 00 00 00 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: newobj instance void assembly/Test1/X14::.ctor(int32) +IL_0006: ret +} + +.method public hidebysig instance bool get_IsX14() cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: call instance int32 assembly/Test1::get_Tag() +IL_0006: ldc.i4.3 +IL_0007: ceq +IL_0009: ret +} + +.method public hidebysig instance int32 get_Tag() cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: ldfld int32 assembly/Test1::_tag +IL_0006: ret +} + +.method assembly hidebysig specialname instance object __DebugDisplay() cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldstr "%+0.8A" +IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,string>::.ctor(string) +IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) +IL_000f: ldarg.0 +IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) +IL_0015: ret +} + +.method public strict virtual instance string ToString() cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldstr "%+A" +IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class assembly/Test1>::.ctor(string) +IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) +IL_000f: ldarg.0 +IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) +IL_0015: ret +} + +.method public hidebysig virtual final instance int32 CompareTo(class assembly/Test1 obj) cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: brfalse.s IL_0011 + +IL_0003: ldarg.1 +IL_0004: brfalse.s IL_000f + +IL_0006: ldarg.0 +IL_0007: ldarg.1 +IL_0008: ldnull +IL_0009: call int32 assembly::CompareTo$cont@4(class assembly/Test1, +class assembly/Test1, +class [FSharp.Core]Microsoft.FSharp.Core.Unit) +IL_000e: ret + +IL_000f: ldc.i4.1 +IL_0010: ret + +IL_0011: ldarg.1 +IL_0012: brfalse.s IL_0016 + +IL_0014: ldc.i4.m1 +IL_0015: ret + +IL_0016: ldc.i4.0 +IL_0017: ret +} + +.method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: ldarg.1 +IL_0002: unbox.any assembly/Test1 +IL_0007: callvirt instance int32 assembly/Test1::CompareTo(class assembly/Test1) +IL_000c: ret +} + +.method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 6 +.locals init (class assembly/Test1 V_0) +IL_0000: ldarg.1 +IL_0001: unbox.any assembly/Test1 +IL_0006: stloc.0 +IL_0007: ldarg.0 +IL_0008: brfalse.s IL_0014 + +IL_000a: ldarg.0 +IL_000b: ldarg.1 +IL_000c: ldloc.0 +IL_000d: ldnull +IL_000e: call int32 assembly::'CompareTo$cont@4-1'(class assembly/Test1, +object, +class assembly/Test1, +class [FSharp.Core]Microsoft.FSharp.Core.Unit) +IL_0013: ret + +IL_0014: ldarg.1 +IL_0015: unbox.any assembly/Test1 +IL_001a: brfalse.s IL_001e + +IL_001c: ldc.i4.m1 +IL_001d: ret + +IL_001e: ldc.i4.0 +IL_001f: ret +} + +.method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 7 +.locals init (int32 V_0, +class assembly/Test1/X11 V_1, +class assembly/Test1/X12 V_2, +class assembly/Test1/X13 V_3, +class assembly/Test1/X14 V_4) +IL_0000: ldarg.0 +IL_0001: brfalse IL_00a5 + +IL_0006: ldc.i4.0 +IL_0007: stloc.0 +IL_0008: ldarg.0 +IL_0009: call instance int32 assembly/Test1::get_Tag() +IL_000e: switch ( +IL_0023, +IL_0043, +IL_0063, +IL_0083) +IL_0023: ldarg.0 +IL_0024: castclass assembly/Test1/X11 +IL_0029: stloc.1 +IL_002a: ldc.i4.0 +IL_002b: stloc.0 +IL_002c: ldc.i4 0x9e3779b9 +IL_0031: ldloc.1 +IL_0032: ldfld int32 assembly/Test1/X11::item +IL_0037: ldloc.0 +IL_0038: ldc.i4.6 +IL_0039: shl +IL_003a: ldloc.0 +IL_003b: ldc.i4.2 +IL_003c: shr +IL_003d: add +IL_003e: add +IL_003f: add +IL_0040: stloc.0 +IL_0041: ldloc.0 +IL_0042: ret + +IL_0043: ldarg.0 +IL_0044: castclass assembly/Test1/X12 +IL_0049: stloc.2 +IL_004a: ldc.i4.1 +IL_004b: stloc.0 +IL_004c: ldc.i4 0x9e3779b9 +IL_0051: ldloc.2 +IL_0052: ldfld int32 assembly/Test1/X12::item +IL_0057: ldloc.0 +IL_0058: ldc.i4.6 +IL_0059: shl +IL_005a: ldloc.0 +IL_005b: ldc.i4.2 +IL_005c: shr +IL_005d: add +IL_005e: add +IL_005f: add +IL_0060: stloc.0 +IL_0061: ldloc.0 +IL_0062: ret + +IL_0063: ldarg.0 +IL_0064: castclass assembly/Test1/X13 +IL_0069: stloc.3 +IL_006a: ldc.i4.2 +IL_006b: stloc.0 +IL_006c: ldc.i4 0x9e3779b9 +IL_0071: ldloc.3 +IL_0072: ldfld int32 assembly/Test1/X13::item +IL_0077: ldloc.0 +IL_0078: ldc.i4.6 +IL_0079: shl +IL_007a: ldloc.0 +IL_007b: ldc.i4.2 +IL_007c: shr +IL_007d: add +IL_007e: add +IL_007f: add +IL_0080: stloc.0 +IL_0081: ldloc.0 +IL_0082: ret + +IL_0083: ldarg.0 +IL_0084: castclass assembly/Test1/X14 +IL_0089: stloc.s V_4 +IL_008b: ldc.i4.3 +IL_008c: stloc.0 +IL_008d: ldc.i4 0x9e3779b9 +IL_0092: ldloc.s V_4 +IL_0094: ldfld int32 assembly/Test1/X14::item +IL_0099: ldloc.0 +IL_009a: ldc.i4.6 +IL_009b: shl +IL_009c: ldloc.0 +IL_009d: ldc.i4.2 +IL_009e: shr +IL_009f: add +IL_00a0: add +IL_00a1: add +IL_00a2: stloc.0 +IL_00a3: ldloc.0 +IL_00a4: ret + +IL_00a5: ldc.i4.0 +IL_00a6: ret +} + +.method public hidebysig virtual final instance int32 GetHashCode() cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() +IL_0006: callvirt instance int32 assembly/Test1::GetHashCode(class [runtime]System.Collections.IEqualityComparer) +IL_000b: ret +} + +.method public hidebysig instance bool Equals(class assembly/Test1 obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 4 +.locals init (int32 V_0, +int32 V_1, +class assembly/Test1/X11 V_2, +class assembly/Test1/X11 V_3, +class assembly/Test1/X12 V_4, +class assembly/Test1/X12 V_5, +class assembly/Test1/X13 V_6, +class assembly/Test1/X13 V_7, +class assembly/Test1/X14 V_8, +class assembly/Test1/X14 V_9) +IL_0000: ldarg.0 +IL_0001: brfalse IL_00c0 + +IL_0006: ldarg.1 +IL_0007: brfalse IL_00be + +IL_000c: ldarg.0 +IL_000d: ldfld int32 assembly/Test1::_tag +IL_0012: stloc.0 +IL_0013: ldarg.1 +IL_0014: ldfld int32 assembly/Test1::_tag +IL_0019: stloc.1 +IL_001a: ldloc.0 +IL_001b: ldloc.1 +IL_001c: bne.un IL_00bc + +IL_0021: ldarg.0 +IL_0022: call instance int32 assembly/Test1::get_Tag() +IL_0027: switch ( +IL_003c, +IL_0059, +IL_007a, +IL_009b) +IL_003c: ldarg.0 +IL_003d: castclass assembly/Test1/X11 +IL_0042: stloc.2 +IL_0043: ldarg.1 +IL_0044: castclass assembly/Test1/X11 +IL_0049: stloc.3 +IL_004a: ldloc.2 +IL_004b: ldfld int32 assembly/Test1/X11::item +IL_0050: ldloc.3 +IL_0051: ldfld int32 assembly/Test1/X11::item +IL_0056: ceq +IL_0058: ret + +IL_0059: ldarg.0 +IL_005a: castclass assembly/Test1/X12 +IL_005f: stloc.s V_4 +IL_0061: ldarg.1 +IL_0062: castclass assembly/Test1/X12 +IL_0067: stloc.s V_5 +IL_0069: ldloc.s V_4 +IL_006b: ldfld int32 assembly/Test1/X12::item +IL_0070: ldloc.s V_5 +IL_0072: ldfld int32 assembly/Test1/X12::item +IL_0077: ceq +IL_0079: ret + +IL_007a: ldarg.0 +IL_007b: castclass assembly/Test1/X13 +IL_0080: stloc.s V_6 +IL_0082: ldarg.1 +IL_0083: castclass assembly/Test1/X13 +IL_0088: stloc.s V_7 +IL_008a: ldloc.s V_6 +IL_008c: ldfld int32 assembly/Test1/X13::item +IL_0091: ldloc.s V_7 +IL_0093: ldfld int32 assembly/Test1/X13::item +IL_0098: ceq +IL_009a: ret + +IL_009b: ldarg.0 +IL_009c: castclass assembly/Test1/X14 +IL_00a1: stloc.s V_8 +IL_00a3: ldarg.1 +IL_00a4: castclass assembly/Test1/X14 +IL_00a9: stloc.s V_9 +IL_00ab: ldloc.s V_8 +IL_00ad: ldfld int32 assembly/Test1/X14::item +IL_00b2: ldloc.s V_9 +IL_00b4: ldfld int32 assembly/Test1/X14::item +IL_00b9: ceq +IL_00bb: ret + +IL_00bc: ldc.i4.0 +IL_00bd: ret + +IL_00be: ldc.i4.0 +IL_00bf: ret + +IL_00c0: ldarg.1 +IL_00c1: ldnull +IL_00c2: cgt.un +IL_00c4: ldc.i4.0 +IL_00c5: ceq +IL_00c7: ret +} + +.method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 5 +.locals init (class assembly/Test1 V_0) +IL_0000: ldarg.1 +IL_0001: isinst assembly/Test1 +IL_0006: stloc.0 +IL_0007: ldloc.0 +IL_0008: brfalse.s IL_0013 + +IL_000a: ldarg.0 +IL_000b: ldloc.0 +IL_000c: ldarg.2 +IL_000d: callvirt instance bool assembly/Test1::Equals(class assembly/Test1, +class [runtime]System.Collections.IEqualityComparer) +IL_0012: ret + +IL_0013: ldc.i4.0 +IL_0014: ret +} + +.method public hidebysig virtual final instance bool Equals(class assembly/Test1 obj) cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 4 +.locals init (int32 V_0, +int32 V_1, +class assembly/Test1/X11 V_2, +class assembly/Test1/X11 V_3, +class assembly/Test1/X12 V_4, +class assembly/Test1/X12 V_5, +class assembly/Test1/X13 V_6, +class assembly/Test1/X13 V_7, +class assembly/Test1/X14 V_8, +class assembly/Test1/X14 V_9) +IL_0000: ldarg.0 +IL_0001: brfalse IL_00c0 + +IL_0006: ldarg.1 +IL_0007: brfalse IL_00be + +IL_000c: ldarg.0 +IL_000d: ldfld int32 assembly/Test1::_tag +IL_0012: stloc.0 +IL_0013: ldarg.1 +IL_0014: ldfld int32 assembly/Test1::_tag +IL_0019: stloc.1 +IL_001a: ldloc.0 +IL_001b: ldloc.1 +IL_001c: bne.un IL_00bc + +IL_0021: ldarg.0 +IL_0022: call instance int32 assembly/Test1::get_Tag() +IL_0027: switch ( +IL_003c, +IL_0059, +IL_007a, +IL_009b) +IL_003c: ldarg.0 +IL_003d: castclass assembly/Test1/X11 +IL_0042: stloc.2 +IL_0043: ldarg.1 +IL_0044: castclass assembly/Test1/X11 +IL_0049: stloc.3 +IL_004a: ldloc.2 +IL_004b: ldfld int32 assembly/Test1/X11::item +IL_0050: ldloc.3 +IL_0051: ldfld int32 assembly/Test1/X11::item +IL_0056: ceq +IL_0058: ret + +IL_0059: ldarg.0 +IL_005a: castclass assembly/Test1/X12 +IL_005f: stloc.s V_4 +IL_0061: ldarg.1 +IL_0062: castclass assembly/Test1/X12 +IL_0067: stloc.s V_5 +IL_0069: ldloc.s V_4 +IL_006b: ldfld int32 assembly/Test1/X12::item +IL_0070: ldloc.s V_5 +IL_0072: ldfld int32 assembly/Test1/X12::item +IL_0077: ceq +IL_0079: ret + +IL_007a: ldarg.0 +IL_007b: castclass assembly/Test1/X13 +IL_0080: stloc.s V_6 +IL_0082: ldarg.1 +IL_0083: castclass assembly/Test1/X13 +IL_0088: stloc.s V_7 +IL_008a: ldloc.s V_6 +IL_008c: ldfld int32 assembly/Test1/X13::item +IL_0091: ldloc.s V_7 +IL_0093: ldfld int32 assembly/Test1/X13::item +IL_0098: ceq +IL_009a: ret + +IL_009b: ldarg.0 +IL_009c: castclass assembly/Test1/X14 +IL_00a1: stloc.s V_8 +IL_00a3: ldarg.1 +IL_00a4: castclass assembly/Test1/X14 +IL_00a9: stloc.s V_9 +IL_00ab: ldloc.s V_8 +IL_00ad: ldfld int32 assembly/Test1/X14::item +IL_00b2: ldloc.s V_9 +IL_00b4: ldfld int32 assembly/Test1/X14::item +IL_00b9: ceq +IL_00bb: ret + +IL_00bc: ldc.i4.0 +IL_00bd: ret + +IL_00be: ldc.i4.0 +IL_00bf: ret + +IL_00c0: ldarg.1 +IL_00c1: ldnull +IL_00c2: cgt.un +IL_00c4: ldc.i4.0 +IL_00c5: ceq +IL_00c7: ret +} + +.method public hidebysig virtual final instance bool Equals(object obj) cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 4 +.locals init (class assembly/Test1 V_0) +IL_0000: ldarg.1 +IL_0001: isinst assembly/Test1 +IL_0006: stloc.0 +IL_0007: ldloc.0 +IL_0008: brfalse.s IL_0012 + +IL_000a: ldarg.0 +IL_000b: ldloc.0 +IL_000c: callvirt instance bool assembly/Test1::Equals(class assembly/Test1) +IL_0011: ret + +IL_0012: ldc.i4.0 +IL_0013: ret +} + +.property instance int32 Tag() +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) +.get instance int32 assembly/Test1::get_Tag() +} +.property instance bool IsX11() +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) +.get instance bool assembly/Test1::get_IsX11() +} +.property instance bool IsX12() +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) +.get instance bool assembly/Test1::get_IsX12() +} +.property instance bool IsX13() +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) +.get instance bool assembly/Test1::get_IsX13() +} +.property instance bool IsX14() +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) +.get instance bool assembly/Test1::get_IsX14() +} +} + +.method public static int32 select1(class assembly/Test1 x) cil managed +{ + +.maxstack 8 +IL_0000: nop +IL_0001: ldarg.0 +IL_0002: call instance int32 assembly/Test1::get_Tag() +IL_0007: switch ( +IL_001c, +IL_0028, +IL_002a, +IL_002c) +IL_001c: ldarg.0 +IL_001d: castclass assembly/Test1/X11 +IL_0022: ldfld int32 assembly/Test1/X11::item +IL_0027: ret + +IL_0028: ldc.i4.2 +IL_0029: ret + +IL_002a: ldc.i4.3 +IL_002b: ret + +IL_002c: ldc.i4.4 +IL_002d: ret +} + +.method public static int32 fm(class assembly/Test1 y) cil managed +{ + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: call int32 assembly::select1(class assembly/Test1) +IL_0006: ret +} + +.method assembly static int32 CompareTo$cont@4(class assembly/Test1 this, +class assembly/Test1 obj, +class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 5 +.locals init (int32 V_0, +int32 V_1, +class assembly/Test1/X11 V_2, +class assembly/Test1/X11 V_3, +class [runtime]System.Collections.IComparer V_4, +int32 V_5, +int32 V_6, +class assembly/Test1/X12 V_7, +class assembly/Test1/X12 V_8, +class assembly/Test1/X13 V_9, +class assembly/Test1/X13 V_10, +class assembly/Test1/X14 V_11, +class assembly/Test1/X14 V_12) +IL_0000: ldarg.0 +IL_0001: ldfld int32 assembly/Test1::_tag +IL_0006: stloc.0 +IL_0007: ldarg.1 +IL_0008: ldfld int32 assembly/Test1::_tag +IL_000d: stloc.1 +IL_000e: ldloc.0 +IL_000f: ldloc.1 +IL_0010: bne.un IL_0108 + +IL_0015: ldarg.0 +IL_0016: call instance int32 assembly/Test1::get_Tag() +IL_001b: switch ( +IL_0030, +IL_0063, +IL_009a, +IL_00d1) +IL_0030: ldarg.0 +IL_0031: castclass assembly/Test1/X11 +IL_0036: stloc.2 +IL_0037: ldarg.1 +IL_0038: castclass assembly/Test1/X11 +IL_003d: stloc.3 +IL_003e: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() +IL_0043: stloc.s V_4 +IL_0045: ldloc.2 +IL_0046: ldfld int32 assembly/Test1/X11::item +IL_004b: stloc.s V_5 +IL_004d: ldloc.3 +IL_004e: ldfld int32 assembly/Test1/X11::item +IL_0053: stloc.s V_6 +IL_0055: ldloc.s V_5 +IL_0057: ldloc.s V_6 +IL_0059: cgt +IL_005b: ldloc.s V_5 +IL_005d: ldloc.s V_6 +IL_005f: clt +IL_0061: sub +IL_0062: ret + +IL_0063: ldarg.0 +IL_0064: castclass assembly/Test1/X12 +IL_0069: stloc.s V_7 +IL_006b: ldarg.1 +IL_006c: castclass assembly/Test1/X12 +IL_0071: stloc.s V_8 +IL_0073: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() +IL_0078: stloc.s V_4 +IL_007a: ldloc.s V_7 +IL_007c: ldfld int32 assembly/Test1/X12::item +IL_0081: stloc.s V_5 +IL_0083: ldloc.s V_8 +IL_0085: ldfld int32 assembly/Test1/X12::item +IL_008a: stloc.s V_6 +IL_008c: ldloc.s V_5 +IL_008e: ldloc.s V_6 +IL_0090: cgt +IL_0092: ldloc.s V_5 +IL_0094: ldloc.s V_6 +IL_0096: clt +IL_0098: sub +IL_0099: ret + +IL_009a: ldarg.0 +IL_009b: castclass assembly/Test1/X13 +IL_00a0: stloc.s V_9 +IL_00a2: ldarg.1 +IL_00a3: castclass assembly/Test1/X13 +IL_00a8: stloc.s V_10 +IL_00aa: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() +IL_00af: stloc.s V_4 +IL_00b1: ldloc.s V_9 +IL_00b3: ldfld int32 assembly/Test1/X13::item +IL_00b8: stloc.s V_5 +IL_00ba: ldloc.s V_10 +IL_00bc: ldfld int32 assembly/Test1/X13::item +IL_00c1: stloc.s V_6 +IL_00c3: ldloc.s V_5 +IL_00c5: ldloc.s V_6 +IL_00c7: cgt +IL_00c9: ldloc.s V_5 +IL_00cb: ldloc.s V_6 +IL_00cd: clt +IL_00cf: sub +IL_00d0: ret + +IL_00d1: ldarg.0 +IL_00d2: castclass assembly/Test1/X14 +IL_00d7: stloc.s V_11 +IL_00d9: ldarg.1 +IL_00da: castclass assembly/Test1/X14 +IL_00df: stloc.s V_12 +IL_00e1: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() +IL_00e6: stloc.s V_4 +IL_00e8: ldloc.s V_11 +IL_00ea: ldfld int32 assembly/Test1/X14::item +IL_00ef: stloc.s V_5 +IL_00f1: ldloc.s V_12 +IL_00f3: ldfld int32 assembly/Test1/X14::item +IL_00f8: stloc.s V_6 +IL_00fa: ldloc.s V_5 +IL_00fc: ldloc.s V_6 +IL_00fe: cgt +IL_0100: ldloc.s V_5 +IL_0102: ldloc.s V_6 +IL_0104: clt +IL_0106: sub +IL_0107: ret + +IL_0108: ldloc.0 +IL_0109: ldloc.1 +IL_010a: sub +IL_010b: ret +} + +.method assembly static int32 'CompareTo$cont@4-1'(class assembly/Test1 this, +object obj, +class assembly/Test1 objTemp, +class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 5 +.locals init (int32 V_0, +int32 V_1, +class assembly/Test1/X11 V_2, +class assembly/Test1/X11 V_3, +int32 V_4, +int32 V_5, +class assembly/Test1/X12 V_6, +class assembly/Test1/X12 V_7, +class assembly/Test1/X13 V_8, +class assembly/Test1/X13 V_9, +class assembly/Test1/X14 V_10, +class assembly/Test1/X14 V_11) +IL_0000: ldarg.1 +IL_0001: unbox.any assembly/Test1 +IL_0006: brfalse IL_00fb + +IL_000b: ldarg.0 +IL_000c: ldfld int32 assembly/Test1::_tag +IL_0011: stloc.0 +IL_0012: ldarg.2 +IL_0013: ldfld int32 assembly/Test1::_tag +IL_0018: stloc.1 +IL_0019: ldloc.0 +IL_001a: ldloc.1 +IL_001b: bne.un IL_00f7 + +IL_0020: ldarg.0 +IL_0021: call instance int32 assembly/Test1::get_Tag() +IL_0026: switch ( +IL_003b, +IL_0067, +IL_0097, +IL_00c7) +IL_003b: ldarg.0 +IL_003c: castclass assembly/Test1/X11 +IL_0041: stloc.2 +IL_0042: ldarg.2 +IL_0043: castclass assembly/Test1/X11 +IL_0048: stloc.3 +IL_0049: ldloc.2 +IL_004a: ldfld int32 assembly/Test1/X11::item +IL_004f: stloc.s V_4 +IL_0051: ldloc.3 +IL_0052: ldfld int32 assembly/Test1/X11::item +IL_0057: stloc.s V_5 +IL_0059: ldloc.s V_4 +IL_005b: ldloc.s V_5 +IL_005d: cgt +IL_005f: ldloc.s V_4 +IL_0061: ldloc.s V_5 +IL_0063: clt +IL_0065: sub +IL_0066: ret + +IL_0067: ldarg.0 +IL_0068: castclass assembly/Test1/X12 +IL_006d: stloc.s V_6 +IL_006f: ldarg.2 +IL_0070: castclass assembly/Test1/X12 +IL_0075: stloc.s V_7 +IL_0077: ldloc.s V_6 +IL_0079: ldfld int32 assembly/Test1/X12::item +IL_007e: stloc.s V_4 +IL_0080: ldloc.s V_7 +IL_0082: ldfld int32 assembly/Test1/X12::item +IL_0087: stloc.s V_5 +IL_0089: ldloc.s V_4 +IL_008b: ldloc.s V_5 +IL_008d: cgt +IL_008f: ldloc.s V_4 +IL_0091: ldloc.s V_5 +IL_0093: clt +IL_0095: sub +IL_0096: ret + +IL_0097: ldarg.0 +IL_0098: castclass assembly/Test1/X13 +IL_009d: stloc.s V_8 +IL_009f: ldarg.2 +IL_00a0: castclass assembly/Test1/X13 +IL_00a5: stloc.s V_9 +IL_00a7: ldloc.s V_8 +IL_00a9: ldfld int32 assembly/Test1/X13::item +IL_00ae: stloc.s V_4 +IL_00b0: ldloc.s V_9 +IL_00b2: ldfld int32 assembly/Test1/X13::item +IL_00b7: stloc.s V_5 +IL_00b9: ldloc.s V_4 +IL_00bb: ldloc.s V_5 +IL_00bd: cgt +IL_00bf: ldloc.s V_4 +IL_00c1: ldloc.s V_5 +IL_00c3: clt +IL_00c5: sub +IL_00c6: ret + +IL_00c7: ldarg.0 +IL_00c8: castclass assembly/Test1/X14 +IL_00cd: stloc.s V_10 +IL_00cf: ldarg.2 +IL_00d0: castclass assembly/Test1/X14 +IL_00d5: stloc.s V_11 +IL_00d7: ldloc.s V_10 +IL_00d9: ldfld int32 assembly/Test1/X14::item +IL_00de: stloc.s V_4 +IL_00e0: ldloc.s V_11 +IL_00e2: ldfld int32 assembly/Test1/X14::item +IL_00e7: stloc.s V_5 +IL_00e9: ldloc.s V_4 +IL_00eb: ldloc.s V_5 +IL_00ed: cgt +IL_00ef: ldloc.s V_4 +IL_00f1: ldloc.s V_5 +IL_00f3: clt +IL_00f5: sub +IL_00f6: ret + +IL_00f7: ldloc.0 +IL_00f8: ldloc.1 +IL_00f9: sub +IL_00fa: ret + +IL_00fb: ldc.i4.1 +IL_00fc: ret +} + +} + +.class private abstract auto ansi sealed ''.$assembly +extends [runtime]System.Object +{ +.method public static void main@() cil managed +{ +.entrypoint + +.maxstack 8 +IL_0000: ret +} } .class private auto ansi serializable sealed System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - extends [runtime]System.Enum -{ - .custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .field public specialname rtspecialname int32 value__ - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) - .field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) +extends [runtime]System.Enum +{ +.custom instance void [runtime]System.FlagsAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.field public specialname rtspecialname int32 value__ +.field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes All = int32(0xFFFFFFFF) +.field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes None = int32(0x00000000) +.field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicParameterlessConstructor = int32(0x00000001) +.field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicConstructors = int32(0x00000003) +.field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicConstructors = int32(0x00000004) +.field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicMethods = int32(0x00000008) +.field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicMethods = int32(0x00000010) +.field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicFields = int32(0x00000020) +.field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicFields = int32(0x00000040) +.field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicNestedTypes = int32(0x00000080) +.field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicNestedTypes = int32(0x00000100) +.field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicProperties = int32(0x00000200) +.field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicProperties = int32(0x00000400) +.field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes PublicEvents = int32(0x00000800) +.field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes NonPublicEvents = int32(0x00001000) +.field public static literal valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes Interfaces = int32(0x00002000) } .class private auto ansi beforefieldinit System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute - extends [runtime]System.Attribute -{ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .field private class [runtime]System.Type Type@ - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [runtime]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0014: ret - } - - .method public hidebysig specialname instance class [runtime]System.Type get_Type() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ - IL_0006: ret - } - - .method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ - IL_0006: ret - } - - .property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes - MemberType() - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() - } - .property instance class [runtime]System.Type - Type() - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() - } +extends [runtime]System.Attribute +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.field private valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType@ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.field private class [runtime]System.Type Type@ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.method public specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberType, class [runtime]System.Type Type) cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: call instance void [runtime]System.Attribute::.ctor() +IL_0006: ldarg.0 +IL_0007: ldarg.1 +IL_0008: stfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ +IL_000d: ldarg.0 +IL_000e: ldarg.2 +IL_000f: stfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ +IL_0014: ret } +.method public hidebysig specialname instance class [runtime]System.Type get_Type() cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: ldfld class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::Type@ +IL_0006: ret +} +.method public hidebysig specialname instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes get_MemberType() cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: ldfld valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::MemberType@ +IL_0006: ret +} - +.property instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes +MemberType() +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.get instance valuetype System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_MemberType() +} +.property instance class [runtime]System.Type +Type() +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) +.get instance class [runtime]System.Type System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::get_Type() +} +} \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOn.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOn.il.netcore.bsl index b0035f72dbc..0dddc8c3978 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOn.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOn.il.netcore.bsl @@ -449,361 +449,6 @@ } } - .class auto ansi serializable sealed nested assembly beforefieldinit clo@4 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .field public class assembly/Test1 this - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .field public class assembly/Test1 obj - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname instance void .ctor(class assembly/Test1 this, class assembly/Test1 obj) cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class assembly/Test1 assembly/Test1/clo@4::this - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class assembly/Test1 assembly/Test1/clo@4::obj - IL_0014: ret - } - - .method public strict virtual instance int32 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed - { - - .maxstack 7 - .locals init (int32 V_0, - int32 V_1, - class assembly/Test1/X11 V_2, - class assembly/Test1/X11 V_3, - class [runtime]System.Collections.IComparer V_4, - int32 V_5, - int32 V_6, - class assembly/Test1/X12 V_7, - class assembly/Test1/X12 V_8, - class assembly/Test1/X13 V_9, - class assembly/Test1/X13 V_10, - class assembly/Test1/X14 V_11, - class assembly/Test1/X14 V_12) - IL_0000: ldarg.0 - IL_0001: ldfld class assembly/Test1 assembly/Test1/clo@4::this - IL_0006: ldfld int32 assembly/Test1::_tag - IL_000b: stloc.0 - IL_000c: ldarg.0 - IL_000d: ldfld class assembly/Test1 assembly/Test1/clo@4::obj - IL_0012: ldfld int32 assembly/Test1::_tag - IL_0017: stloc.1 - IL_0018: ldloc.0 - IL_0019: ldloc.1 - IL_001a: bne.un IL_013f - - IL_001f: ldarg.0 - IL_0020: ldfld class assembly/Test1 assembly/Test1/clo@4::this - IL_0025: call instance int32 assembly/Test1::get_Tag() - IL_002a: switch ( - IL_003f, - IL_007c, - IL_00bd, - IL_00fe) - IL_003f: ldarg.0 - IL_0040: ldfld class assembly/Test1 assembly/Test1/clo@4::this - IL_0045: castclass assembly/Test1/X11 - IL_004a: stloc.2 - IL_004b: ldarg.0 - IL_004c: ldfld class assembly/Test1 assembly/Test1/clo@4::obj - IL_0051: castclass assembly/Test1/X11 - IL_0056: stloc.3 - IL_0057: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_005c: stloc.s V_4 - IL_005e: ldloc.2 - IL_005f: ldfld int32 assembly/Test1/X11::item - IL_0064: stloc.s V_5 - IL_0066: ldloc.3 - IL_0067: ldfld int32 assembly/Test1/X11::item - IL_006c: stloc.s V_6 - IL_006e: ldloc.s V_5 - IL_0070: ldloc.s V_6 - IL_0072: cgt - IL_0074: ldloc.s V_5 - IL_0076: ldloc.s V_6 - IL_0078: clt - IL_007a: sub - IL_007b: ret - - IL_007c: ldarg.0 - IL_007d: ldfld class assembly/Test1 assembly/Test1/clo@4::this - IL_0082: castclass assembly/Test1/X12 - IL_0087: stloc.s V_7 - IL_0089: ldarg.0 - IL_008a: ldfld class assembly/Test1 assembly/Test1/clo@4::obj - IL_008f: castclass assembly/Test1/X12 - IL_0094: stloc.s V_8 - IL_0096: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_009b: stloc.s V_4 - IL_009d: ldloc.s V_7 - IL_009f: ldfld int32 assembly/Test1/X12::item - IL_00a4: stloc.s V_5 - IL_00a6: ldloc.s V_8 - IL_00a8: ldfld int32 assembly/Test1/X12::item - IL_00ad: stloc.s V_6 - IL_00af: ldloc.s V_5 - IL_00b1: ldloc.s V_6 - IL_00b3: cgt - IL_00b5: ldloc.s V_5 - IL_00b7: ldloc.s V_6 - IL_00b9: clt - IL_00bb: sub - IL_00bc: ret - - IL_00bd: ldarg.0 - IL_00be: ldfld class assembly/Test1 assembly/Test1/clo@4::this - IL_00c3: castclass assembly/Test1/X13 - IL_00c8: stloc.s V_9 - IL_00ca: ldarg.0 - IL_00cb: ldfld class assembly/Test1 assembly/Test1/clo@4::obj - IL_00d0: castclass assembly/Test1/X13 - IL_00d5: stloc.s V_10 - IL_00d7: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_00dc: stloc.s V_4 - IL_00de: ldloc.s V_9 - IL_00e0: ldfld int32 assembly/Test1/X13::item - IL_00e5: stloc.s V_5 - IL_00e7: ldloc.s V_10 - IL_00e9: ldfld int32 assembly/Test1/X13::item - IL_00ee: stloc.s V_6 - IL_00f0: ldloc.s V_5 - IL_00f2: ldloc.s V_6 - IL_00f4: cgt - IL_00f6: ldloc.s V_5 - IL_00f8: ldloc.s V_6 - IL_00fa: clt - IL_00fc: sub - IL_00fd: ret - - IL_00fe: ldarg.0 - IL_00ff: ldfld class assembly/Test1 assembly/Test1/clo@4::this - IL_0104: castclass assembly/Test1/X14 - IL_0109: stloc.s V_11 - IL_010b: ldarg.0 - IL_010c: ldfld class assembly/Test1 assembly/Test1/clo@4::obj - IL_0111: castclass assembly/Test1/X14 - IL_0116: stloc.s V_12 - IL_0118: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_011d: stloc.s V_4 - IL_011f: ldloc.s V_11 - IL_0121: ldfld int32 assembly/Test1/X14::item - IL_0126: stloc.s V_5 - IL_0128: ldloc.s V_12 - IL_012a: ldfld int32 assembly/Test1/X14::item - IL_012f: stloc.s V_6 - IL_0131: ldloc.s V_5 - IL_0133: ldloc.s V_6 - IL_0135: cgt - IL_0137: ldloc.s V_5 - IL_0139: ldloc.s V_6 - IL_013b: clt - IL_013d: sub - IL_013e: ret - - IL_013f: ldloc.0 - IL_0140: ldloc.1 - IL_0141: sub - IL_0142: ret - } - - } - - .class auto ansi serializable sealed nested assembly beforefieldinit 'clo@4-1' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .field public class assembly/Test1 this - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .field public object obj - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .field public class assembly/Test1 objTemp - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname - instance void .ctor(class assembly/Test1 this, - object obj, - class assembly/Test1 objTemp) cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class assembly/Test1 assembly/Test1/'clo@4-1'::this - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld object assembly/Test1/'clo@4-1'::obj - IL_0014: ldarg.0 - IL_0015: ldarg.3 - IL_0016: stfld class assembly/Test1 assembly/Test1/'clo@4-1'::objTemp - IL_001b: ret - } - - .method public strict virtual instance int32 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed - { - - .maxstack 7 - .locals init (int32 V_0, - int32 V_1, - class assembly/Test1/X11 V_2, - class assembly/Test1/X11 V_3, - int32 V_4, - int32 V_5, - class assembly/Test1/X12 V_6, - class assembly/Test1/X12 V_7, - class assembly/Test1/X13 V_8, - class assembly/Test1/X13 V_9, - class assembly/Test1/X14 V_10, - class assembly/Test1/X14 V_11) - IL_0000: ldarg.0 - IL_0001: ldfld object assembly/Test1/'clo@4-1'::obj - IL_0006: unbox.any assembly/Test1 - IL_000b: brfalse IL_0137 - - IL_0010: ldarg.0 - IL_0011: ldfld class assembly/Test1 assembly/Test1/'clo@4-1'::this - IL_0016: ldfld int32 assembly/Test1::_tag - IL_001b: stloc.0 - IL_001c: ldarg.0 - IL_001d: ldfld class assembly/Test1 assembly/Test1/'clo@4-1'::objTemp - IL_0022: ldfld int32 assembly/Test1::_tag - IL_0027: stloc.1 - IL_0028: ldloc.0 - IL_0029: ldloc.1 - IL_002a: bne.un IL_0133 - - IL_002f: ldarg.0 - IL_0030: ldfld class assembly/Test1 assembly/Test1/'clo@4-1'::this - IL_0035: call instance int32 assembly/Test1::get_Tag() - IL_003a: switch ( - IL_004f, - IL_0085, - IL_00bf, - IL_00f9) - IL_004f: ldarg.0 - IL_0050: ldfld class assembly/Test1 assembly/Test1/'clo@4-1'::this - IL_0055: castclass assembly/Test1/X11 - IL_005a: stloc.2 - IL_005b: ldarg.0 - IL_005c: ldfld class assembly/Test1 assembly/Test1/'clo@4-1'::objTemp - IL_0061: castclass assembly/Test1/X11 - IL_0066: stloc.3 - IL_0067: ldloc.2 - IL_0068: ldfld int32 assembly/Test1/X11::item - IL_006d: stloc.s V_4 - IL_006f: ldloc.3 - IL_0070: ldfld int32 assembly/Test1/X11::item - IL_0075: stloc.s V_5 - IL_0077: ldloc.s V_4 - IL_0079: ldloc.s V_5 - IL_007b: cgt - IL_007d: ldloc.s V_4 - IL_007f: ldloc.s V_5 - IL_0081: clt - IL_0083: sub - IL_0084: ret - - IL_0085: ldarg.0 - IL_0086: ldfld class assembly/Test1 assembly/Test1/'clo@4-1'::this - IL_008b: castclass assembly/Test1/X12 - IL_0090: stloc.s V_6 - IL_0092: ldarg.0 - IL_0093: ldfld class assembly/Test1 assembly/Test1/'clo@4-1'::objTemp - IL_0098: castclass assembly/Test1/X12 - IL_009d: stloc.s V_7 - IL_009f: ldloc.s V_6 - IL_00a1: ldfld int32 assembly/Test1/X12::item - IL_00a6: stloc.s V_4 - IL_00a8: ldloc.s V_7 - IL_00aa: ldfld int32 assembly/Test1/X12::item - IL_00af: stloc.s V_5 - IL_00b1: ldloc.s V_4 - IL_00b3: ldloc.s V_5 - IL_00b5: cgt - IL_00b7: ldloc.s V_4 - IL_00b9: ldloc.s V_5 - IL_00bb: clt - IL_00bd: sub - IL_00be: ret - - IL_00bf: ldarg.0 - IL_00c0: ldfld class assembly/Test1 assembly/Test1/'clo@4-1'::this - IL_00c5: castclass assembly/Test1/X13 - IL_00ca: stloc.s V_8 - IL_00cc: ldarg.0 - IL_00cd: ldfld class assembly/Test1 assembly/Test1/'clo@4-1'::objTemp - IL_00d2: castclass assembly/Test1/X13 - IL_00d7: stloc.s V_9 - IL_00d9: ldloc.s V_8 - IL_00db: ldfld int32 assembly/Test1/X13::item - IL_00e0: stloc.s V_4 - IL_00e2: ldloc.s V_9 - IL_00e4: ldfld int32 assembly/Test1/X13::item - IL_00e9: stloc.s V_5 - IL_00eb: ldloc.s V_4 - IL_00ed: ldloc.s V_5 - IL_00ef: cgt - IL_00f1: ldloc.s V_4 - IL_00f3: ldloc.s V_5 - IL_00f5: clt - IL_00f7: sub - IL_00f8: ret - - IL_00f9: ldarg.0 - IL_00fa: ldfld class assembly/Test1 assembly/Test1/'clo@4-1'::this - IL_00ff: castclass assembly/Test1/X14 - IL_0104: stloc.s V_10 - IL_0106: ldarg.0 - IL_0107: ldfld class assembly/Test1 assembly/Test1/'clo@4-1'::objTemp - IL_010c: castclass assembly/Test1/X14 - IL_0111: stloc.s V_11 - IL_0113: ldloc.s V_10 - IL_0115: ldfld int32 assembly/Test1/X14::item - IL_011a: stloc.s V_4 - IL_011c: ldloc.s V_11 - IL_011e: ldfld int32 assembly/Test1/X14::item - IL_0123: stloc.s V_5 - IL_0125: ldloc.s V_4 - IL_0127: ldloc.s V_5 - IL_0129: cgt - IL_012b: ldloc.s V_4 - IL_012d: ldloc.s V_5 - IL_012f: clt - IL_0131: sub - IL_0132: ret - - IL_0133: ldloc.0 - IL_0134: ldloc.1 - IL_0135: sub - IL_0136: ret - - IL_0137: ldc.i4.1 - IL_0138: ret - } - - } - .field assembly initonly int32 _tag .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -971,36 +616,32 @@ { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .maxstack 4 - .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_0) + .maxstack 8 IL_0000: ldarg.0 - IL_0001: brfalse.s IL_001a + IL_0001: brfalse.s IL_0011 IL_0003: ldarg.1 - IL_0004: brfalse.s IL_0018 + IL_0004: brfalse.s IL_000f IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: newobj instance void assembly/Test1/clo@4::.ctor(class assembly/Test1, - class assembly/Test1) - IL_000d: stloc.0 - IL_000e: ldloc.0 - IL_000f: ldnull - IL_0010: tail. - IL_0012: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0017: ret + IL_0008: ldnull + IL_0009: call int32 assembly::CompareTo$cont@4(class assembly/Test1, + class assembly/Test1, + class [FSharp.Core]Microsoft.FSharp.Core.Unit) + IL_000e: ret - IL_0018: ldc.i4.1 - IL_0019: ret + IL_000f: ldc.i4.1 + IL_0010: ret - IL_001a: ldarg.1 - IL_001b: brfalse.s IL_001f + IL_0011: ldarg.1 + IL_0012: brfalse.s IL_0016 - IL_001d: ldc.i4.m1 - IL_001e: ret + IL_0014: ldc.i4.m1 + IL_0015: ret - IL_001f: ldc.i4.0 - IL_0020: ret + IL_0016: ldc.i4.0 + IL_0017: ret } .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed @@ -1019,37 +660,33 @@ { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .maxstack 5 - .locals init (class assembly/Test1 V_0, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_1) + .maxstack 6 + .locals init (class assembly/Test1 V_0) IL_0000: ldarg.1 IL_0001: unbox.any assembly/Test1 IL_0006: stloc.0 IL_0007: ldarg.0 - IL_0008: brfalse.s IL_001d + IL_0008: brfalse.s IL_0014 IL_000a: ldarg.0 IL_000b: ldarg.1 IL_000c: ldloc.0 - IL_000d: newobj instance void assembly/Test1/'clo@4-1'::.ctor(class assembly/Test1, - object, - class assembly/Test1) - IL_0012: stloc.1 - IL_0013: ldloc.1 - IL_0014: ldnull - IL_0015: tail. - IL_0017: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_001c: ret - - IL_001d: ldarg.1 - IL_001e: unbox.any assembly/Test1 - IL_0023: brfalse.s IL_0027 - - IL_0025: ldc.i4.m1 - IL_0026: ret - - IL_0027: ldc.i4.0 - IL_0028: ret + IL_000d: ldnull + IL_000e: call int32 assembly::'CompareTo$cont@4-1'(class assembly/Test1, + object, + class assembly/Test1, + class [FSharp.Core]Microsoft.FSharp.Core.Unit) + IL_0013: ret + + IL_0014: ldarg.1 + IL_0015: unbox.any assembly/Test1 + IL_001a: brfalse.s IL_001e + + IL_001c: ldc.i4.m1 + IL_001d: ret + + IL_001e: ldc.i4.0 + IL_001f: ret } .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed @@ -1498,6 +1135,275 @@ IL_0006: ret } + .method assembly static int32 CompareTo$cont@4(class assembly/Test1 this, + class assembly/Test1 obj, + class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (int32 V_0, + int32 V_1, + class assembly/Test1/X11 V_2, + class assembly/Test1/X11 V_3, + class [runtime]System.Collections.IComparer V_4, + int32 V_5, + int32 V_6, + class assembly/Test1/X12 V_7, + class assembly/Test1/X12 V_8, + class assembly/Test1/X13 V_9, + class assembly/Test1/X13 V_10, + class assembly/Test1/X14 V_11, + class assembly/Test1/X14 V_12) + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/Test1::_tag + IL_0006: stloc.0 + IL_0007: ldarg.1 + IL_0008: ldfld int32 assembly/Test1::_tag + IL_000d: stloc.1 + IL_000e: ldloc.0 + IL_000f: ldloc.1 + IL_0010: bne.un IL_0108 + + IL_0015: ldarg.0 + IL_0016: call instance int32 assembly/Test1::get_Tag() + IL_001b: switch ( + IL_0030, + IL_0063, + IL_009a, + IL_00d1) + IL_0030: ldarg.0 + IL_0031: castclass assembly/Test1/X11 + IL_0036: stloc.2 + IL_0037: ldarg.1 + IL_0038: castclass assembly/Test1/X11 + IL_003d: stloc.3 + IL_003e: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0043: stloc.s V_4 + IL_0045: ldloc.2 + IL_0046: ldfld int32 assembly/Test1/X11::item + IL_004b: stloc.s V_5 + IL_004d: ldloc.3 + IL_004e: ldfld int32 assembly/Test1/X11::item + IL_0053: stloc.s V_6 + IL_0055: ldloc.s V_5 + IL_0057: ldloc.s V_6 + IL_0059: cgt + IL_005b: ldloc.s V_5 + IL_005d: ldloc.s V_6 + IL_005f: clt + IL_0061: sub + IL_0062: ret + + IL_0063: ldarg.0 + IL_0064: castclass assembly/Test1/X12 + IL_0069: stloc.s V_7 + IL_006b: ldarg.1 + IL_006c: castclass assembly/Test1/X12 + IL_0071: stloc.s V_8 + IL_0073: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0078: stloc.s V_4 + IL_007a: ldloc.s V_7 + IL_007c: ldfld int32 assembly/Test1/X12::item + IL_0081: stloc.s V_5 + IL_0083: ldloc.s V_8 + IL_0085: ldfld int32 assembly/Test1/X12::item + IL_008a: stloc.s V_6 + IL_008c: ldloc.s V_5 + IL_008e: ldloc.s V_6 + IL_0090: cgt + IL_0092: ldloc.s V_5 + IL_0094: ldloc.s V_6 + IL_0096: clt + IL_0098: sub + IL_0099: ret + + IL_009a: ldarg.0 + IL_009b: castclass assembly/Test1/X13 + IL_00a0: stloc.s V_9 + IL_00a2: ldarg.1 + IL_00a3: castclass assembly/Test1/X13 + IL_00a8: stloc.s V_10 + IL_00aa: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_00af: stloc.s V_4 + IL_00b1: ldloc.s V_9 + IL_00b3: ldfld int32 assembly/Test1/X13::item + IL_00b8: stloc.s V_5 + IL_00ba: ldloc.s V_10 + IL_00bc: ldfld int32 assembly/Test1/X13::item + IL_00c1: stloc.s V_6 + IL_00c3: ldloc.s V_5 + IL_00c5: ldloc.s V_6 + IL_00c7: cgt + IL_00c9: ldloc.s V_5 + IL_00cb: ldloc.s V_6 + IL_00cd: clt + IL_00cf: sub + IL_00d0: ret + + IL_00d1: ldarg.0 + IL_00d2: castclass assembly/Test1/X14 + IL_00d7: stloc.s V_11 + IL_00d9: ldarg.1 + IL_00da: castclass assembly/Test1/X14 + IL_00df: stloc.s V_12 + IL_00e1: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_00e6: stloc.s V_4 + IL_00e8: ldloc.s V_11 + IL_00ea: ldfld int32 assembly/Test1/X14::item + IL_00ef: stloc.s V_5 + IL_00f1: ldloc.s V_12 + IL_00f3: ldfld int32 assembly/Test1/X14::item + IL_00f8: stloc.s V_6 + IL_00fa: ldloc.s V_5 + IL_00fc: ldloc.s V_6 + IL_00fe: cgt + IL_0100: ldloc.s V_5 + IL_0102: ldloc.s V_6 + IL_0104: clt + IL_0106: sub + IL_0107: ret + + IL_0108: ldloc.0 + IL_0109: ldloc.1 + IL_010a: sub + IL_010b: ret + } + + .method assembly static int32 'CompareTo$cont@4-1'(class assembly/Test1 this, + object obj, + class assembly/Test1 objTemp, + class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (int32 V_0, + int32 V_1, + class assembly/Test1/X11 V_2, + class assembly/Test1/X11 V_3, + int32 V_4, + int32 V_5, + class assembly/Test1/X12 V_6, + class assembly/Test1/X12 V_7, + class assembly/Test1/X13 V_8, + class assembly/Test1/X13 V_9, + class assembly/Test1/X14 V_10, + class assembly/Test1/X14 V_11) + IL_0000: ldarg.1 + IL_0001: unbox.any assembly/Test1 + IL_0006: brfalse IL_00fb + + IL_000b: ldarg.0 + IL_000c: ldfld int32 assembly/Test1::_tag + IL_0011: stloc.0 + IL_0012: ldarg.2 + IL_0013: ldfld int32 assembly/Test1::_tag + IL_0018: stloc.1 + IL_0019: ldloc.0 + IL_001a: ldloc.1 + IL_001b: bne.un IL_00f7 + + IL_0020: ldarg.0 + IL_0021: call instance int32 assembly/Test1::get_Tag() + IL_0026: switch ( + IL_003b, + IL_0067, + IL_0097, + IL_00c7) + IL_003b: ldarg.0 + IL_003c: castclass assembly/Test1/X11 + IL_0041: stloc.2 + IL_0042: ldarg.2 + IL_0043: castclass assembly/Test1/X11 + IL_0048: stloc.3 + IL_0049: ldloc.2 + IL_004a: ldfld int32 assembly/Test1/X11::item + IL_004f: stloc.s V_4 + IL_0051: ldloc.3 + IL_0052: ldfld int32 assembly/Test1/X11::item + IL_0057: stloc.s V_5 + IL_0059: ldloc.s V_4 + IL_005b: ldloc.s V_5 + IL_005d: cgt + IL_005f: ldloc.s V_4 + IL_0061: ldloc.s V_5 + IL_0063: clt + IL_0065: sub + IL_0066: ret + + IL_0067: ldarg.0 + IL_0068: castclass assembly/Test1/X12 + IL_006d: stloc.s V_6 + IL_006f: ldarg.2 + IL_0070: castclass assembly/Test1/X12 + IL_0075: stloc.s V_7 + IL_0077: ldloc.s V_6 + IL_0079: ldfld int32 assembly/Test1/X12::item + IL_007e: stloc.s V_4 + IL_0080: ldloc.s V_7 + IL_0082: ldfld int32 assembly/Test1/X12::item + IL_0087: stloc.s V_5 + IL_0089: ldloc.s V_4 + IL_008b: ldloc.s V_5 + IL_008d: cgt + IL_008f: ldloc.s V_4 + IL_0091: ldloc.s V_5 + IL_0093: clt + IL_0095: sub + IL_0096: ret + + IL_0097: ldarg.0 + IL_0098: castclass assembly/Test1/X13 + IL_009d: stloc.s V_8 + IL_009f: ldarg.2 + IL_00a0: castclass assembly/Test1/X13 + IL_00a5: stloc.s V_9 + IL_00a7: ldloc.s V_8 + IL_00a9: ldfld int32 assembly/Test1/X13::item + IL_00ae: stloc.s V_4 + IL_00b0: ldloc.s V_9 + IL_00b2: ldfld int32 assembly/Test1/X13::item + IL_00b7: stloc.s V_5 + IL_00b9: ldloc.s V_4 + IL_00bb: ldloc.s V_5 + IL_00bd: cgt + IL_00bf: ldloc.s V_4 + IL_00c1: ldloc.s V_5 + IL_00c3: clt + IL_00c5: sub + IL_00c6: ret + + IL_00c7: ldarg.0 + IL_00c8: castclass assembly/Test1/X14 + IL_00cd: stloc.s V_10 + IL_00cf: ldarg.2 + IL_00d0: castclass assembly/Test1/X14 + IL_00d5: stloc.s V_11 + IL_00d7: ldloc.s V_10 + IL_00d9: ldfld int32 assembly/Test1/X14::item + IL_00de: stloc.s V_4 + IL_00e0: ldloc.s V_11 + IL_00e2: ldfld int32 assembly/Test1/X14::item + IL_00e7: stloc.s V_5 + IL_00e9: ldloc.s V_4 + IL_00eb: ldloc.s V_5 + IL_00ed: cgt + IL_00ef: ldloc.s V_4 + IL_00f1: ldloc.s V_5 + IL_00f3: clt + IL_00f5: sub + IL_00f6: ret + + IL_00f7: ldloc.0 + IL_00f8: ldloc.1 + IL_00f9: sub + IL_00fa: ret + + IL_00fb: ldc.i4.1 + IL_00fc: ret + } + } .class private abstract auto ansi sealed ''.$assembly @@ -1517,4 +1423,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_Specialize_ConstraintVerification.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_Specialize_ConstraintVerification.fs new file mode 100644 index 00000000000..b727a6c9258 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_Specialize_ConstraintVerification.fs @@ -0,0 +1,76 @@ +namespace EmittedIL.RealInternalSignature + +open Xunit +open FSharp.Test +open FSharp.Test.Compiler + +/// Each test exercises one ILGenericParameterDef field cleared by stripILGenericParamConstraints. +/// If a constraint leaks onto the closure's Specialize override the JIT throws TypeLoadException +/// ("weaker type parameter constraints"). See #14492. +module Regression_Specialize_ConstraintVerification = + + open Regression_TLR_MutualInnerRec_StructuralAssertions + + let private compileVerifyAndRun realsig source = + source |> compileOptimized realsig |> compile |> shouldSucceed |> verifyPEAndRun + + [] + let ``struct + equality`` (realsig: bool) = + closureWithConstraint "'a : struct and 'a : equality" "a = b" "int" "42" + |> compileVerifyAndRun realsig + + [] + let ``not struct + equality`` (realsig: bool) = + closureWithConstraint "'a : not struct and 'a : equality" "obj.ReferenceEquals(a, b)" "string" "\"ok\"" + |> compileVerifyAndRun realsig + + /// Specifically guards the `IsUnmanagedAttribute` (carried via CustomAttrsStored) clearing + /// in `stripILGenericParamConstraints` — leaks of that attribute onto the Specialize override + /// were the original #14492 trigger for unmanaged-constrained inlines. + [] + let ``unmanaged + equality`` (realsig: bool) = + let source = closureWithConstraint "'a : unmanaged and 'a : equality" "a = b" "int" "42" + let compiled = source |> compileOptimized realsig |> compile |> shouldSucceed + compiled + |> verifyILNotPresent [ + // No IsUnmanagedAttribute / modreq leakage onto the Specialize override / T-suffix class. + "Specialize] + let ``default constructor`` (realsig: bool) = + closureWithConstraint "'a : (new : unit -> 'a) and 'a : equality" "a = b" "int" "42" + |> compileVerifyAndRun realsig + + [] + let ``interface IComparable`` (realsig: bool) = + closureWithConstraint "'a :> System.IComparable" "(a :> System.IComparable).CompareTo(b) = 0" "int" "42" + |> compileVerifyAndRun realsig + + [] + let ``comparison`` (realsig: bool) = + closureWithConstraint "'a : comparison" "compare a b = 0" "int" "42" + |> compileVerifyAndRun realsig + + [] + let ``struct + comparison + equality combined`` (realsig: bool) = + closureWithConstraint "'a : struct and 'a : comparison and 'a : equality" "a >= b" "int" "42" + |> compileVerifyAndRun realsig + + /// Constrained inline member call inside a closure caused CLR segfault. See #19075. + [] + let ``SRTP member constraint with IDisposable`` (realsig: bool) = + """module Test +open System +open System.IO +module Dispose = + let inline action<'a when 'a: (member Dispose: unit -> unit) and 'a :> IDisposable>(a: 'a) = a.Dispose() +[] +let main _ = + let ms = new MemoryStream() + ms |> Dispose.action + 0 +""" + |> compileVerifyAndRun realsig diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec.fs new file mode 100644 index 00000000000..1fa8383bf62 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec.fs @@ -0,0 +1,15 @@ +module Regression_TLR_MutualInnerRec + +let fifth() = + let rec fifthMethodFirstCallee(iterationCount, firstArg: int) = + if iterationCount = 0 then 100 + else if iterationCount % 2 = 0 then fifthMethodSecondCallee(iterationCount - 1, firstArg) + else fifthMethodFirstCallee(iterationCount - 1, firstArg) + and fifthMethodSecondCallee(iterationCount, firstArg) = + if iterationCount = 0 then 101 + else if iterationCount % 2 = 0 then fifthMethodSecondCallee(iterationCount - 1, firstArg) + else fifthMethodFirstCallee(iterationCount - 1, firstArg) + fifthMethodFirstCallee(1000000, 158_423) + +[] +let main _argv = fifth () diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec.fs.il.bsl new file mode 100644 index 00000000000..e6b6253be66 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec.fs.il.bsl @@ -0,0 +1,141 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly assembly +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + + + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module assembly.exe + +.imagebase {value} +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 +.corflags 0x00000001 + + + + + +.class public abstract auto ansi sealed assembly + extends [runtime]System.Object +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .method public static int32 fifth() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4 0xf4240 + IL_0005: ldc.i4 0x26ad7 + IL_000a: tail. + IL_000c: call int32 assembly::fifthMethodFirstCallee@4(int32, + int32) + IL_0011: ret + } + + .method public static int32 main(string[] _argv) cil managed + { + .entrypoint + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.EntryPointAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: tail. + IL_0002: call int32 assembly::fifth() + IL_0007: ret + } + + .method assembly static int32 fifthMethodFirstCallee@4(int32 iterationCount, + int32 firstArg) cil managed + { + + .maxstack 8 + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: brtrue.s IL_0007 + + IL_0004: ldc.i4.s 100 + IL_0006: ret + + IL_0007: nop + IL_0008: ldarg.0 + IL_0009: ldc.i4.2 + IL_000a: rem + IL_000b: brtrue.s IL_0019 + + IL_000d: ldarg.0 + IL_000e: ldc.i4.1 + IL_000f: sub + IL_0010: ldarg.1 + IL_0011: tail. + IL_0013: call int32 assembly::fifthMethodSecondCallee@8(int32, + int32) + IL_0018: ret + + IL_0019: ldarg.0 + IL_001a: ldc.i4.1 + IL_001b: sub + IL_001c: ldarg.1 + IL_001d: starg.s firstArg + IL_001f: starg.s iterationCount + IL_0021: br.s IL_0000 + } + + .method assembly static int32 fifthMethodSecondCallee@8(int32 iterationCount, + int32 firstArg) cil managed + { + + .maxstack 8 + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: brtrue.s IL_0007 + + IL_0004: ldc.i4.s 101 + IL_0006: ret + + IL_0007: nop + IL_0008: ldarg.0 + IL_0009: ldc.i4.2 + IL_000a: rem + IL_000b: brtrue.s IL_0017 + + IL_000d: ldarg.0 + IL_000e: ldc.i4.1 + IL_000f: sub + IL_0010: ldarg.1 + IL_0011: starg.s firstArg + IL_0013: starg.s iterationCount + IL_0015: br.s IL_0000 + + IL_0017: ldarg.0 + IL_0018: ldc.i4.1 + IL_0019: sub + IL_001a: ldarg.1 + IL_001b: tail. + IL_001d: call int32 assembly::fifthMethodFirstCallee@4(int32, + int32) + IL_0022: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ +} + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec_CapturedEnv.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec_CapturedEnv.fs new file mode 100644 index 00000000000..3fc9f0f344f --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec_CapturedEnv.fs @@ -0,0 +1,15 @@ +module Regression_TLR_MutualInnerRec_CapturedEnv + +let outer (threshold: int) (factor: int) = + let rec a(n) = + if n = 0 then threshold + elif n % 2 = 0 then b(n - 1) + else a(n - factor) + and b(n) = + if n = 0 then threshold + 1 + elif n % 2 = 0 then b(n - factor) + else a(n - 1) + a(100) + +[] +let main _argv = outer 7 1 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec_CapturedEnv.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec_CapturedEnv.fs.il.bsl new file mode 100644 index 00000000000..9dc10e0e9cb --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec_CapturedEnv.fs.il.bsl @@ -0,0 +1,166 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly assembly +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + + + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module assembly.exe + +.imagebase {value} +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 +.corflags 0x00000001 + + + + + +.class public abstract auto ansi sealed assembly + extends [runtime]System.Object +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .method public static int32 outer(int32 threshold, + int32 factor) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + + .maxstack 5 + .locals init (int32 V_0, + int32 V_1) + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldarg.1 + IL_0003: stloc.1 + IL_0004: ldarg.0 + IL_0005: ldarg.1 + IL_0006: ldc.i4.s 100 + IL_0008: tail. + IL_000a: call int32 assembly::a@4(int32, + int32, + int32) + IL_000f: ret + } + + .method public static int32 main(string[] _argv) cil managed + { + .entrypoint + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.EntryPointAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldc.i4.7 + IL_0001: ldc.i4.1 + IL_0002: tail. + IL_0004: call int32 assembly::outer(int32, + int32) + IL_0009: ret + } + + .method assembly static int32 a@4(int32 threshold, + int32 factor, + int32 n) cil managed + { + + .maxstack 8 + IL_0000: nop + IL_0001: ldarg.2 + IL_0002: brtrue.s IL_0006 + + IL_0004: ldarg.0 + IL_0005: ret + + IL_0006: nop + IL_0007: ldarg.2 + IL_0008: ldc.i4.2 + IL_0009: rem + IL_000a: brtrue.s IL_0019 + + IL_000c: ldarg.0 + IL_000d: ldarg.1 + IL_000e: ldarg.2 + IL_000f: ldc.i4.1 + IL_0010: sub + IL_0011: tail. + IL_0013: call int32 assembly::b@8(int32, + int32, + int32) + IL_0018: ret + + IL_0019: ldarg.0 + IL_001a: ldarg.1 + IL_001b: ldarg.2 + IL_001c: ldarg.1 + IL_001d: sub + IL_001e: starg.s n + IL_0020: starg.s factor + IL_0022: starg.s threshold + IL_0024: br.s IL_0000 + } + + .method assembly static int32 b@8(int32 threshold, + int32 factor, + int32 n) cil managed + { + + .maxstack 8 + IL_0000: nop + IL_0001: ldarg.2 + IL_0002: brtrue.s IL_0008 + + IL_0004: ldarg.0 + IL_0005: ldc.i4.1 + IL_0006: add + IL_0007: ret + + IL_0008: nop + IL_0009: ldarg.2 + IL_000a: ldc.i4.2 + IL_000b: rem + IL_000c: brtrue.s IL_001b + + IL_000e: ldarg.0 + IL_000f: ldarg.1 + IL_0010: ldarg.2 + IL_0011: ldarg.1 + IL_0012: sub + IL_0013: starg.s n + IL_0015: starg.s factor + IL_0017: starg.s threshold + IL_0019: br.s IL_0000 + + IL_001b: ldarg.0 + IL_001c: ldarg.1 + IL_001d: ldarg.2 + IL_001e: ldc.i4.1 + IL_001f: sub + IL_0020: tail. + IL_0022: call int32 assembly::a@4(int32, + int32, + int32) + IL_0027: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ +} + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec_Generic.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec_Generic.fs new file mode 100644 index 00000000000..f1895ba465c --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec_Generic.fs @@ -0,0 +1,16 @@ +module Regression_TLR_MutualInnerRec_Generic + +let outer<'T> (initial: 'T) (zero: 'T) = + let rec a(n, v: 'T) = + if n = 0 then v + elif n % 2 = 0 then b(n - 1, v) + else a(n - 1, v) + and b(n, v: 'T) = + if n = 0 then zero + elif n % 2 = 0 then b(n - 1, v) + else a(n - 1, v) + a(1000, initial) + +[] +let main _argv = + if outer 1 0 = 1 then 0 else 1 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec_Generic.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec_Generic.fs.il.bsl new file mode 100644 index 00000000000..7f866e6e4b4 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec_Generic.fs.il.bsl @@ -0,0 +1,168 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly assembly +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + + + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module assembly.exe + +.imagebase {value} +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 +.corflags 0x00000001 + + + + + +.class public abstract auto ansi sealed assembly + extends [runtime]System.Object +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .method public static !!T outer(!!T initial, + !!T zero) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + + .maxstack 5 + .locals init (!!T V_0) + IL_0000: ldarg.1 + IL_0001: stloc.0 + IL_0002: ldarg.1 + IL_0003: ldc.i4 0x3e8 + IL_0008: ldarg.0 + IL_0009: tail. + IL_000b: call !!0 assembly::a@4(!!0, + int32, + !!0) + IL_0010: ret + } + + .method public static int32 main(string[] _argv) cil managed + { + .entrypoint + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.EntryPointAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: nop + IL_0001: ldc.i4.1 + IL_0002: ldc.i4.0 + IL_0003: call !!0 assembly::outer(!!0, + !!0) + IL_0008: ldc.i4.1 + IL_0009: bne.un.s IL_000d + + IL_000b: ldc.i4.0 + IL_000c: ret + + IL_000d: ldc.i4.1 + IL_000e: ret + } + + .method assembly static !!T a@4(!!T zero, + int32 n, + !!T v) cil managed + { + + .maxstack 8 + IL_0000: nop + IL_0001: ldarg.1 + IL_0002: brtrue.s IL_0006 + + IL_0004: ldarg.2 + IL_0005: ret + + IL_0006: nop + IL_0007: ldarg.1 + IL_0008: ldc.i4.2 + IL_0009: rem + IL_000a: brtrue.s IL_0019 + + IL_000c: ldarg.0 + IL_000d: ldarg.1 + IL_000e: ldc.i4.1 + IL_000f: sub + IL_0010: ldarg.2 + IL_0011: tail. + IL_0013: call !!0 assembly::b@8(!!0, + int32, + !!0) + IL_0018: ret + + IL_0019: ldarg.0 + IL_001a: ldarg.1 + IL_001b: ldc.i4.1 + IL_001c: sub + IL_001d: ldarg.2 + IL_001e: starg.s v + IL_0020: starg.s n + IL_0022: starg.s zero + IL_0024: br.s IL_0000 + } + + .method assembly static !!T b@8(!!T zero, + int32 n, + !!T v) cil managed + { + + .maxstack 8 + IL_0000: nop + IL_0001: ldarg.1 + IL_0002: brtrue.s IL_0006 + + IL_0004: ldarg.0 + IL_0005: ret + + IL_0006: nop + IL_0007: ldarg.1 + IL_0008: ldc.i4.2 + IL_0009: rem + IL_000a: brtrue.s IL_0019 + + IL_000c: ldarg.0 + IL_000d: ldarg.1 + IL_000e: ldc.i4.1 + IL_000f: sub + IL_0010: ldarg.2 + IL_0011: starg.s v + IL_0013: starg.s n + IL_0015: starg.s zero + IL_0017: br.s IL_0000 + + IL_0019: ldarg.0 + IL_001a: ldarg.1 + IL_001b: ldc.i4.1 + IL_001c: sub + IL_001d: ldarg.2 + IL_001e: tail. + IL_0020: call !!0 assembly::a@4(!!0, + int32, + !!0) + IL_0025: ret + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ +} + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec_Point2D.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec_Point2D.fs new file mode 100644 index 00000000000..d9c2e7ae00b --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec_Point2D.fs @@ -0,0 +1,23 @@ +module Regression_TLR_MutualInnerRec_Point2D + +[] +type Point2D(x: double, y: double) = + member _.X = x + member _.Y = y + +let fifth() = + let rec firstCallee(n, a: Point2D, b: Point2D, c: Point2D, d: Point2D, e: Point2D) = + if a.X <> 10.0 then -100 + elif n = 0 then 100 + elif n % 2 = 0 then secondCallee(n - 1, a, b, c, d, e) + else firstCallee(n - 1, a, b, c, d, e) + and secondCallee(n, a: Point2D, b: Point2D, c: Point2D, d: Point2D, e: Point2D) = + if n = 0 then 101 + elif n % 2 = 0 then secondCallee(n - 1, a, b, c, d, e) + else firstCallee(n - 1, a, b, c, d, e) + let p = Point2D(10.0, 20.0) + let q = Point2D(30.0, 40.0) + firstCallee(1000000, p, q, p, q, p) + +[] +let main _argv = fifth () diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec_Point2D.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec_Point2D.fs.il.bsl new file mode 100644 index 00000000000..0a3244fe212 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec_Point2D.fs.il.bsl @@ -0,0 +1,677 @@ +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly assembly +{ +.custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, +int32, +int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + + + +.hash algorithm 0x00008004 +.ver 0:0:0:0 +} +.module assembly.exe + +.imagebase {value} +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 +.corflags 0x00000001 + + + + + +.class public abstract auto ansi sealed assembly +extends [runtime]System.Object +{ +.custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) +.class sequential ansi serializable sealed nested public Point2D +extends [runtime]System.ValueType +implements class [runtime]System.IEquatable`1, +[runtime]System.Collections.IStructuralEquatable, +class [runtime]System.IComparable`1, +[runtime]System.IComparable, +[runtime]System.Collections.IStructuralComparable +{ +.custom instance void [FSharp.Core]Microsoft.FSharp.Core.StructAttribute::.ctor() = ( 01 00 00 00 ) +.custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) +.field assembly float64 x +.field assembly float64 y +.method public hidebysig virtual final instance int32 CompareTo(valuetype assembly/Point2D obj) cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 5 +.locals init (int32 V_0, +class [runtime]System.Collections.IComparer V_1, +float64 V_2, +float64 V_3) +IL_0000: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() +IL_0005: stloc.1 +IL_0006: ldarg.0 +IL_0007: ldfld float64 assembly/Point2D::x +IL_000c: stloc.2 +IL_000d: ldarga.s obj +IL_000f: ldfld float64 assembly/Point2D::x +IL_0014: stloc.3 +IL_0015: ldloc.2 +IL_0016: ldloc.3 +IL_0017: clt +IL_0019: brfalse.s IL_001f + +IL_001b: ldc.i4.m1 +IL_001c: nop +IL_001d: br.s IL_003e + +IL_001f: ldloc.2 +IL_0020: ldloc.3 +IL_0021: cgt +IL_0023: brfalse.s IL_0029 + +IL_0025: ldc.i4.1 +IL_0026: nop +IL_0027: br.s IL_003e + +IL_0029: ldloc.2 +IL_002a: ldloc.3 +IL_002b: ceq +IL_002d: brfalse.s IL_0033 + +IL_002f: ldc.i4.0 +IL_0030: nop +IL_0031: br.s IL_003e + +IL_0033: ldloc.1 +IL_0034: ldloc.2 +IL_0035: ldloc.3 +IL_0036: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [runtime]System.Collections.IComparer, +!!0, +!!0) +IL_003b: nop +IL_003c: br.s IL_003e + +IL_003e: stloc.0 +IL_003f: ldloc.0 +IL_0040: ldc.i4.0 +IL_0041: bge.s IL_0045 + +IL_0043: ldloc.0 +IL_0044: ret + +IL_0045: ldloc.0 +IL_0046: ldc.i4.0 +IL_0047: ble.s IL_004b + +IL_0049: ldloc.0 +IL_004a: ret + +IL_004b: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() +IL_0050: stloc.1 +IL_0051: ldarg.0 +IL_0052: ldfld float64 assembly/Point2D::y +IL_0057: stloc.2 +IL_0058: ldarga.s obj +IL_005a: ldfld float64 assembly/Point2D::y +IL_005f: stloc.3 +IL_0060: ldloc.2 +IL_0061: ldloc.3 +IL_0062: clt +IL_0064: brfalse.s IL_0068 + +IL_0066: ldc.i4.m1 +IL_0067: ret + +IL_0068: ldloc.2 +IL_0069: ldloc.3 +IL_006a: cgt +IL_006c: brfalse.s IL_0070 + +IL_006e: ldc.i4.1 +IL_006f: ret + +IL_0070: ldloc.2 +IL_0071: ldloc.3 +IL_0072: ceq +IL_0074: brfalse.s IL_0078 + +IL_0076: ldc.i4.0 +IL_0077: ret + +IL_0078: ldloc.1 +IL_0079: ldloc.2 +IL_007a: ldloc.3 +IL_007b: tail. +IL_007d: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [runtime]System.Collections.IComparer, +!!0, +!!0) +IL_0082: ret +} + +.method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: ldarg.1 +IL_0002: unbox.any assembly/Point2D +IL_0007: call instance int32 assembly/Point2D::CompareTo(valuetype assembly/Point2D) +IL_000c: ret +} + +.method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 5 +.locals init (valuetype assembly/Point2D V_0, +int32 V_1, +float64 V_2, +float64 V_3) +IL_0000: ldarg.1 +IL_0001: unbox.any assembly/Point2D +IL_0006: stloc.0 +IL_0007: ldarg.0 +IL_0008: ldfld float64 assembly/Point2D::x +IL_000d: stloc.2 +IL_000e: ldloca.s V_0 +IL_0010: ldfld float64 assembly/Point2D::x +IL_0015: stloc.3 +IL_0016: ldloc.2 +IL_0017: ldloc.3 +IL_0018: clt +IL_001a: brfalse.s IL_0020 + +IL_001c: ldc.i4.m1 +IL_001d: nop +IL_001e: br.s IL_003f + +IL_0020: ldloc.2 +IL_0021: ldloc.3 +IL_0022: cgt +IL_0024: brfalse.s IL_002a + +IL_0026: ldc.i4.1 +IL_0027: nop +IL_0028: br.s IL_003f + +IL_002a: ldloc.2 +IL_002b: ldloc.3 +IL_002c: ceq +IL_002e: brfalse.s IL_0034 + +IL_0030: ldc.i4.0 +IL_0031: nop +IL_0032: br.s IL_003f + +IL_0034: ldarg.2 +IL_0035: ldloc.2 +IL_0036: ldloc.3 +IL_0037: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [runtime]System.Collections.IComparer, +!!0, +!!0) +IL_003c: nop +IL_003d: br.s IL_003f + +IL_003f: stloc.1 +IL_0040: ldloc.1 +IL_0041: ldc.i4.0 +IL_0042: bge.s IL_0046 + +IL_0044: ldloc.1 +IL_0045: ret + +IL_0046: ldloc.1 +IL_0047: ldc.i4.0 +IL_0048: ble.s IL_004c + +IL_004a: ldloc.1 +IL_004b: ret + +IL_004c: ldarg.0 +IL_004d: ldfld float64 assembly/Point2D::y +IL_0052: stloc.2 +IL_0053: ldloca.s V_0 +IL_0055: ldfld float64 assembly/Point2D::y +IL_005a: stloc.3 +IL_005b: ldloc.2 +IL_005c: ldloc.3 +IL_005d: clt +IL_005f: brfalse.s IL_0063 + +IL_0061: ldc.i4.m1 +IL_0062: ret + +IL_0063: ldloc.2 +IL_0064: ldloc.3 +IL_0065: cgt +IL_0067: brfalse.s IL_006b + +IL_0069: ldc.i4.1 +IL_006a: ret + +IL_006b: ldloc.2 +IL_006c: ldloc.3 +IL_006d: ceq +IL_006f: brfalse.s IL_0073 + +IL_0071: ldc.i4.0 +IL_0072: ret + +IL_0073: ldarg.2 +IL_0074: ldloc.2 +IL_0075: ldloc.3 +IL_0076: tail. +IL_0078: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [runtime]System.Collections.IComparer, +!!0, +!!0) +IL_007d: ret +} + +.method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 7 +.locals init (int32 V_0) +IL_0000: ldc.i4.0 +IL_0001: stloc.0 +IL_0002: ldc.i4 0x9e3779b9 +IL_0007: ldarg.1 +IL_0008: ldarg.0 +IL_0009: ldfld float64 assembly/Point2D::y +IL_000e: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, +!!0) +IL_0013: ldloc.0 +IL_0014: ldc.i4.6 +IL_0015: shl +IL_0016: ldloc.0 +IL_0017: ldc.i4.2 +IL_0018: shr +IL_0019: add +IL_001a: add +IL_001b: add +IL_001c: stloc.0 +IL_001d: ldc.i4 0x9e3779b9 +IL_0022: ldarg.1 +IL_0023: ldarg.0 +IL_0024: ldfld float64 assembly/Point2D::x +IL_0029: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [runtime]System.Collections.IEqualityComparer, +!!0) +IL_002e: ldloc.0 +IL_002f: ldc.i4.6 +IL_0030: shl +IL_0031: ldloc.0 +IL_0032: ldc.i4.2 +IL_0033: shr +IL_0034: add +IL_0035: add +IL_0036: add +IL_0037: stloc.0 +IL_0038: ldloc.0 +IL_0039: ret +} + +.method public hidebysig virtual final instance int32 GetHashCode() cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() +IL_0006: call instance int32 assembly/Point2D::GetHashCode(class [runtime]System.Collections.IEqualityComparer) +IL_000b: ret +} + +.method public hidebysig instance bool Equals(valuetype assembly/Point2D obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: ldfld float64 assembly/Point2D::x +IL_0006: ldarga.s obj +IL_0008: ldfld float64 assembly/Point2D::x +IL_000d: ceq +IL_000f: brfalse.s IL_0021 + +IL_0011: ldarg.0 +IL_0012: ldfld float64 assembly/Point2D::y +IL_0017: ldarga.s obj +IL_0019: ldfld float64 assembly/Point2D::y +IL_001e: ceq +IL_0020: ret + +IL_0021: ldc.i4.0 +IL_0022: ret +} + +.method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 5 +.locals init (valuetype assembly/Point2D V_0) +IL_0000: ldarg.1 +IL_0001: isinst assembly/Point2D +IL_0006: brfalse.s IL_0018 + +IL_0008: ldarg.1 +IL_0009: unbox.any assembly/Point2D +IL_000e: stloc.0 +IL_000f: ldarg.0 +IL_0010: ldloc.0 +IL_0011: ldarg.2 +IL_0012: call instance bool assembly/Point2D::Equals(valuetype assembly/Point2D, +class [runtime]System.Collections.IEqualityComparer) +IL_0017: ret + +IL_0018: ldc.i4.0 +IL_0019: ret +} + +.method public specialname rtspecialname instance void .ctor(float64 x, float64 y) cil managed +{ + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: ldarg.1 +IL_0002: stfld float64 assembly/Point2D::x +IL_0007: ldarg.0 +IL_0008: ldarg.2 +IL_0009: stfld float64 assembly/Point2D::y +IL_000e: ret +} + +.method public hidebysig specialname instance float64 get_X() cil managed +{ + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: ldfld float64 assembly/Point2D::x +IL_0006: ret +} + +.method public hidebysig specialname instance float64 get_Y() cil managed +{ + +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: ldfld float64 assembly/Point2D::y +IL_0006: ret +} + +.method public hidebysig virtual final instance bool Equals(valuetype assembly/Point2D obj) cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 4 +.locals init (float64 V_0, +float64 V_1) +IL_0000: ldarg.0 +IL_0001: ldfld float64 assembly/Point2D::x +IL_0006: stloc.0 +IL_0007: ldarga.s obj +IL_0009: ldfld float64 assembly/Point2D::x +IL_000e: stloc.1 +IL_000f: ldloc.0 +IL_0010: ldloc.1 +IL_0011: ceq +IL_0013: brfalse.s IL_0019 + +IL_0015: ldc.i4.1 +IL_0016: nop +IL_0017: br.s IL_002b + +IL_0019: ldloc.0 +IL_001a: ldloc.0 +IL_001b: beq.s IL_0027 + +IL_001d: ldloc.1 +IL_001e: ldloc.1 +IL_001f: ceq +IL_0021: ldc.i4.0 +IL_0022: ceq +IL_0024: nop +IL_0025: br.s IL_002b + +IL_0027: ldc.i4.0 +IL_0028: nop +IL_0029: br.s IL_002b + +IL_002b: brfalse.s IL_0052 + +IL_002d: ldarg.0 +IL_002e: ldfld float64 assembly/Point2D::y +IL_0033: stloc.0 +IL_0034: ldarga.s obj +IL_0036: ldfld float64 assembly/Point2D::y +IL_003b: stloc.1 +IL_003c: ldloc.0 +IL_003d: ldloc.1 +IL_003e: ceq +IL_0040: brfalse.s IL_0044 + +IL_0042: ldc.i4.1 +IL_0043: ret + +IL_0044: ldloc.0 +IL_0045: ldloc.0 +IL_0046: beq.s IL_0050 + +IL_0048: ldloc.1 +IL_0049: ldloc.1 +IL_004a: ceq +IL_004c: ldc.i4.0 +IL_004d: ceq +IL_004f: ret + +IL_0050: ldc.i4.0 +IL_0051: ret + +IL_0052: ldc.i4.0 +IL_0053: ret +} + +.method public hidebysig virtual final instance bool Equals(object obj) cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: ldarg.1 +IL_0001: isinst assembly/Point2D +IL_0006: brfalse.s IL_0015 + +IL_0008: ldarg.0 +IL_0009: ldarg.1 +IL_000a: unbox.any assembly/Point2D +IL_000f: call instance bool assembly/Point2D::Equals(valuetype assembly/Point2D) +IL_0014: ret + +IL_0015: ldc.i4.0 +IL_0016: ret +} + +.property instance float64 X() +{ +.get instance float64 assembly/Point2D::get_X() +} +.property instance float64 Y() +{ +.get instance float64 assembly/Point2D::get_Y() +} +} + +.method public static int32 fifth() cil managed +{ + +.maxstack 8 +.locals init (valuetype assembly/Point2D V_0, +valuetype assembly/Point2D V_1) +IL_0000: ldc.r8 10 +IL_0009: ldc.r8 20 +IL_0012: newobj instance void assembly/Point2D::.ctor(float64, +float64) +IL_0017: stloc.0 +IL_0018: ldc.r8 30 +IL_0021: ldc.r8 40 +IL_002a: newobj instance void assembly/Point2D::.ctor(float64, +float64) +IL_002f: stloc.1 +IL_0030: ldc.i4 0xf4240 +IL_0035: ldloc.0 +IL_0036: ldloc.1 +IL_0037: ldloc.0 +IL_0038: ldloc.1 +IL_0039: ldloc.0 +IL_003a: tail. +IL_003c: call int32 assembly::firstCallee@9(int32, +valuetype assembly/Point2D, +valuetype assembly/Point2D, +valuetype assembly/Point2D, +valuetype assembly/Point2D, +valuetype assembly/Point2D) +IL_0041: ret +} + +.method public static int32 main(string[] _argv) cil managed +{ +.entrypoint +.custom instance void [FSharp.Core]Microsoft.FSharp.Core.EntryPointAttribute::.ctor() = ( 01 00 00 00 ) + +.maxstack 8 +IL_0000: tail. +IL_0002: call int32 assembly::fifth() +IL_0007: ret +} + +.method assembly static int32 firstCallee@9(int32 n, +valuetype assembly/Point2D a, +valuetype assembly/Point2D b, +valuetype assembly/Point2D c, +valuetype assembly/Point2D d, +valuetype assembly/Point2D e) cil managed +{ + +.maxstack 8 +IL_0000: nop +IL_0001: ldarga.s a +IL_0003: ldfld float64 assembly/Point2D::x +IL_0008: ldc.r8 10 +IL_0011: beq.s IL_0016 + +IL_0013: ldc.i4.s -100 +IL_0015: ret + +IL_0016: nop +IL_0017: ldarg.0 +IL_0018: brtrue.s IL_001d + +IL_001a: ldc.i4.s 100 +IL_001c: ret + +IL_001d: nop +IL_001e: ldarg.0 +IL_001f: ldc.i4.2 +IL_0020: rem +IL_0021: brtrue.s IL_0035 + +IL_0023: ldarg.0 +IL_0024: ldc.i4.1 +IL_0025: sub +IL_0026: ldarg.1 +IL_0027: ldarg.2 +IL_0028: ldarg.3 +IL_0029: ldarg.s d +IL_002b: ldarg.s e +IL_002d: tail. +IL_002f: call int32 assembly::secondCallee@14(int32, +valuetype assembly/Point2D, +valuetype assembly/Point2D, +valuetype assembly/Point2D, +valuetype assembly/Point2D, +valuetype assembly/Point2D) +IL_0034: ret + +IL_0035: ldarg.0 +IL_0036: ldc.i4.1 +IL_0037: sub +IL_0038: ldarg.1 +IL_0039: ldarg.2 +IL_003a: ldarg.3 +IL_003b: ldarg.s d +IL_003d: ldarg.s e +IL_003f: starg.s e +IL_0041: starg.s d +IL_0043: starg.s c +IL_0045: starg.s b +IL_0047: starg.s a +IL_0049: starg.s n +IL_004b: br.s IL_0000 +} + +.method assembly static int32 secondCallee@14(int32 n, +valuetype assembly/Point2D a, +valuetype assembly/Point2D b, +valuetype assembly/Point2D c, +valuetype assembly/Point2D d, +valuetype assembly/Point2D e) cil managed +{ + +.maxstack 8 +IL_0000: nop +IL_0001: ldarg.0 +IL_0002: brtrue.s IL_0007 + +IL_0004: ldc.i4.s 101 +IL_0006: ret + +IL_0007: nop +IL_0008: ldarg.0 +IL_0009: ldc.i4.2 +IL_000a: rem +IL_000b: brtrue.s IL_0025 + +IL_000d: ldarg.0 +IL_000e: ldc.i4.1 +IL_000f: sub +IL_0010: ldarg.1 +IL_0011: ldarg.2 +IL_0012: ldarg.3 +IL_0013: ldarg.s d +IL_0015: ldarg.s e +IL_0017: starg.s e +IL_0019: starg.s d +IL_001b: starg.s c +IL_001d: starg.s b +IL_001f: starg.s a +IL_0021: starg.s n +IL_0023: br.s IL_0000 + +IL_0025: ldarg.0 +IL_0026: ldc.i4.1 +IL_0027: sub +IL_0028: ldarg.1 +IL_0029: ldarg.2 +IL_002a: ldarg.3 +IL_002b: ldarg.s d +IL_002d: ldarg.s e +IL_002f: tail. +IL_0031: call int32 assembly::firstCallee@9(int32, +valuetype assembly/Point2D, +valuetype assembly/Point2D, +valuetype assembly/Point2D, +valuetype assembly/Point2D, +valuetype assembly/Point2D) +IL_0036: ret +} + +} + +.class private abstract auto ansi sealed ''.$assembly +extends [runtime]System.Object +{ +} \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec_StructuralAssertions.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec_StructuralAssertions.fs new file mode 100644 index 00000000000..81e58f02457 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Regression_TLR_MutualInnerRec_StructuralAssertions.fs @@ -0,0 +1,278 @@ +namespace EmittedIL.RealInternalSignature + +open Xunit +open FSharp.Test +open FSharp.Test.Compiler + +module Regression_TLR_MutualInnerRec_StructuralAssertions = + + let internal compileOptimized realsig source = + FSharp source + |> withRealInternalSignature realsig + |> asExe + |> withOptimize + |> ignoreWarnings + + let private compileOptimizedAndRun realsig source = + source |> compileOptimized realsig |> compileExeAndRun |> shouldSucceed |> ignore + + /// Shared "PEVerify + run" tail used by tests that assert both metadata validity and runtime success. + let internal verifyPEAndRun (compiled: CompilationResult) = + compiled |> verifyPEFileWithSystemDlls |> shouldSucceed |> ignore + compiled |> run |> shouldSucceed |> ignore + + let private compileAndAssertNoClosures realsig expectedIL source = + let result = source |> compileOptimized realsig |> compile |> shouldSucceed + result |> verifyILPresent expectedIL + result |> verifyILNotPresent [ "extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc" ] + result + + let private compileAssertNoClosuresAndRun realsig expectedIL source = + source |> compileAndAssertNoClosures realsig expectedIL |> run |> shouldSucceed |> ignore + + // Inline constrained call inside a memoize closure — the inline expands into the closure body, + // attaching constraints to the closure class typars; EraseClosures must strip them. + let internal closureWithConstraint constraintClause inlineBody typeAnnotation callValue = + $"""module Test +open System +let inline worker<'a when {constraintClause}> (a: 'a) (b: 'a) : bool = {inlineBody} +let inline tee f x = f x; x +let memoize (f: 'a -> 'b) = + let cell = ref None + let f' (x: 'a) = + match cell.Value with + | Some (x', value) when worker x' x -> value + | _ -> f x |> tee (fun y -> cell.Value <- Some (x, y)) + f' +[] +let main _argv = + let f: {typeAnnotation} -> {typeAnnotation} = memoize id + if f {callValue} = {callValue} then 0 else 1 +""" + + // --- TLR tests (#17607) --- + + [] + let ``Single inner let rec fires TLR`` (realsig: bool) = + """module Sample +let wrapper() = + let rec countdown(n) = + if n = 0 then 100 + else countdown(n - 1) + countdown(1000000) +[] +let main _argv = wrapper() +""" + |> compileAndAssertNoClosures realsig [ "static int32 countdown@" ] + |> ignore + + [] + let ``TLR inside generic class member`` (realsig: bool) = + """module Sample +type Container<'T>(initial: 'T) = + member _.Run() = + let rec a(n, v: 'T) = + if n = 0 then v + elif n % 2 = 0 then b(n - 1, v) + else a(n - 1, v) + and b(n, v: 'T) = + if n = 0 then v + elif n % 2 = 0 then b(n - 1, v) + else a(n - 1, v) + a(100, initial) +[] +let main _argv = + if Container(42).Run() = 42 then 0 else 1 +""" + |> compileAssertNoClosuresAndRun realsig [ "static !!T a@"; "static !!T b@" ] + + [] + let ``TLR with generic method on generic type`` (realsig: bool) = + """module Sample +type Processor<'T when 'T : struct>(value: 'T) = + member _.Transform<'U when 'U : equality>(input: 'U, expected: 'U) = + let rec apply(n, acc: 'U) = + if n <= 0 then acc = expected + else step(n, acc) + and step(n, acc: 'U) = + apply(n - 1, acc) + apply(100, input) +[] +let main _argv = + if Processor(1).Transform("hello", "hello") then 0 else 1 +""" + |> compileAssertNoClosuresAndRun realsig [ "static bool apply@"; "static bool step@"; "!!U" ] + + [] + let ``Three-way mutual recursion`` (realsig: bool) = + """module Sample +let run() = + let rec a(n) = + if n = 0 then 100 + elif n % 3 = 0 then b(n - 1) + elif n % 3 = 1 then c(n - 1) + else a(n - 1) + and b(n) = + if n = 0 then 101 else a(n - 1) + and c(n) = + if n = 0 then 102 else b(n - 1) + a(1000) +[] +let main _argv = run() +""" + |> compileAssertNoClosuresAndRun realsig [ "static int32 a@"; "static int32 b@"; "static int32 c@" ] + + [] + let ``TLR in nested module`` (realsig: bool) = + """module Outer +module Inner = + let run() = + let rec a(n) = + if n = 0 then 100 + elif n % 2 = 0 then b(n - 1) + else a(n - 1) + and b(n) = + if n = 0 then 101 else a(n - 1) + a(1000) +[] +let main _argv = Inner.run() +""" + |> compileAssertNoClosuresAndRun realsig [ "static int32 a@"; "static int32 b@" ] + + // Regression for FS2014 duplicate generated method names across namespace-only files (see IlxGen.AllocValReprWithinExpr). + [] + let ``Namespace-level inner-rec in multiple files does not collide`` (realsig: bool) = + let src1 = """namespace Mine +type A() = + static member Run() = + let rec capture x = if x = 0 then 0 else capture (x - 1) + capture 10 + +type B() = + static member Run() = + let rec capture y = if y = 0 then 1 else capture (y - 1) + capture 20 +""" + let src2 = """namespace Mine +type C() = + static member Run() = + let rec capture z = if z = 0 then 2 else capture (z - 1) + capture 30 +""" + FSharp src1 + |> withAdditionalSourceFile (SourceCodeFileKind.Create("B.fs", src2)) + |> withRealInternalSignature realsig + |> asLibrary + |> withOptimize + |> compile + |> shouldSucceed + |> verifyILNotPresent [ "PrivateImplementationDetails" ] + + [] + let ``Value recursion is not broken by TLR`` (realsig: bool) = + """module Sample +let run() = + let rec values = [| 1; 2; 3 |] + and sum() = Array.sum values + sum() +[] +let main _argv = if run() = 6 then 0 else 1 +""" + |> compileOptimizedAndRun realsig + + [] + let ``Quotation body is not affected by TLR`` (realsig: bool) = + """module Sample +open Microsoft.FSharp.Quotations +open Microsoft.FSharp.Quotations.Patterns +let q : Expr = + <@ + let rec a(n) = + if n = 0 then 1 + elif n % 2 = 0 then b(n - 1) + else a(n - 1) + and b(n) = + if n = 0 then 2 + elif n % 2 = 0 then b(n - 1) + else a(n - 1) + a(100) + @> +[] +let main _argv = + match q.Raw with LetRecursive _ -> 0 | _ -> 1 +""" + |> compileOptimizedAndRun realsig + + // --- Constraint stripping tests (#14492) --- + + [] + let ``Issue 14492: Specialize override and T-suffix class have no constraints in IL`` (realsig: bool) = + let result = + closureWithConstraint "'a : not struct and 'a : equality" "obj.ReferenceEquals(a, b)" "string" "\"ok\"" + |> compileOptimized realsig + |> compile + |> shouldSucceed + + result |> verifyILPresent [ "object Specialize<" ] + result |> verifyILNotPresent [ "Specialize verifyILNotPresent [ "T5 curried params forces EraseClosures CASE 2a term-splitting, producing a D-suffixed nested type. + [] + let ``Issue 14492: >5 params chain produces D-suffix nested type (CASE 2a)`` (realsig: bool) = + let source = + """module Sample +open System +let inline worker<'a when 'a : not struct> (a: 'a) (b: 'a) : bool = obj.ReferenceEquals(a, b) +let inline tee f x = f x; x +let memoize (f: 'a -> 'b) = + let cell = ref None + let f' (x: 'a) (a2: 'a) (a3: 'a) (a4: 'a) (a5: 'a) (a6: 'a) = + match cell.Value with + | Some (k, v) when worker k x && worker a2 a3 -> v + | _ -> f (if worker a4 a5 then x else a6) |> tee (fun y -> cell.Value <- Some (x, y)) + f' +[] +let main _argv = + let g: string -> string -> string -> string -> string -> string -> string = memoize id + if g "ok" "ok" "ok" "ok" "ok" "ok" = "ok" then 0 else 1 +""" + + let result = source |> compileOptimized realsig |> compile |> shouldSucceed + + result |> verifyILPresent [ "memoize@8D<" ] + verifyPEAndRun result + + // --- Combined test (exercises both #17607 and #14492 together) --- + + // TLR inside generic class (#17607) + constrained inline inside closure (#14492). + [] + let ``Combined: TLR in generic class with constrained inline closure`` (realsig: bool) = + let result = + """module Sample +open System +let inline worker<'a when 'a : not struct> (a: 'a) (b: 'a) : bool = obj.ReferenceEquals(a, b) +type Cache<'T when 'T : not struct and 'T : equality>(initial: 'T) = + member _.Lookup(key: 'T) = + let memoize (f: 'a -> 'b) = + let cell = ref None + let f' (x: 'a) = + match cell.Value with + | Some (k, v) when worker k x -> v + | _ -> let v = f x in cell.Value <- Some (x, v); v + f' + let rec search n = + if n <= 0 then false + elif (memoize id) key = key then true + else check (n - 1) + and check n = search (n - 1) + search 10 +[] +let main _argv = + if Cache("test").Lookup("test") then 0 else 1 +""" + |> compileOptimized realsig |> compile |> shouldSucceed + + result |> verifyILPresent [ "static bool search@" ] + result |> verifyILNotPresent [ "Specialize compileOptimized realsig |> compileExeAndRun |> shouldSucceed |> ignore + + /// Module-private value + TLR-lifted inner-rec at module level. + /// Lifted helper lives in the same module class as `secret`, so access should hold. + [] + let ``Module-private value accessed from TLR-lifted inner-rec`` (realsig: bool) = + """module Sample +let private secret = 42 +let outer () = + let rec h n = if n = 0 then secret else h (n - 1) + h 10 +[] +let main _ = if outer() = 42 then 0 else 1 +""" + |> compileRunSucceeds realsig + + /// Type-private static accessed from inner-rec inside a member of the same class. + /// Under realsig+, `C.Secret` is IL-private to `C`; the lifted helper is routed to + /// the per-file InitClass (different IL type). Demonstrates routing must preserve + /// access — would `MethodAccessException` if the lift's IL accessibility were wrong. + [] + let ``Type-private static accessed from TLR-lifted inner-rec inside same type`` (realsig: bool) = + """module Sample +type C() = + static member private Secret = 42 + static member Run() = + let rec h n = if n = 0 then C.Secret else h (n - 1) + h 10 +[] +let main _ = if C.Run() = 42 then 0 else 1 +""" + |> compileRunSucceeds realsig + + /// Private DU + structural compare (Match01-shape). The compiler-generated + /// `CompareTo$cont` continuation is lifted out of the DU type to the module class; + /// case fields are source-private. Would `FieldAccessException` if visibility leaked. + [] + let ``Private DU structural compare via TLR-lifted continuation`` (realsig: bool) = + """module Sample +type private DU = A of int | B of int +[] +let main _ = + let cmp (x: DU) (y: DU) = compare x y + if cmp (A 1) (A 1) = 0 && cmp (A 1) (B 1) <> 0 then 0 else 1 +""" + |> compileRunSucceeds realsig + + /// Generic + private nested type captured by a TLR-lifted inner-rec. + /// Lifted helper's signature mentions the private generic type — would + /// `TypeAccessException` on JIT/load if visibility were not preserved. + [] + let ``Generic + private nested type captured by TLR-lifted inner-rec`` (realsig: bool) = + """module Sample +type private Box<'T> = { mutable v: 'T } +[] +let main _ = + let outer (b: Box) = + let rec h n = if n = 0 then b.v else h (n - 1) + h 10 + let b = { v = 42 } + if outer b = 42 then 0 else 1 +""" + |> compileRunSucceeds realsig + + /// Generic class with type-private static accessed from TLR-lifted inner-rec + /// inside an instance member. Adversarial wave 2 (opus 4.8 attempt 20) — confirmed + /// `MethodAccessException` before the SelectTLRVals private-ref guard. + [] + let ``Type-private static of generic class accessed from TLR-lifted inner-rec`` (realsig: bool) = + """module Sample +type Holder<'T>() = + static let secret = 42 + static member private Secret = secret + member _.Run() = + let rec h n = if n = 0 then Holder<'T>.Secret else h (n - 1) + h 5 +[] +let main _ = if Holder().Run() = 42 then 0 else 1 +""" + |> compileRunSucceeds realsig + + /// Same shape as above but the private member reads a mutable backing field, + /// proving the failure is a CLR access check at the call site rather than + /// constant folding. Adversarial wave 2 (opus 4.8 attempt 24). + [] + let ``Type-private static (mutable backing) of generic class accessed from TLR-lifted inner-rec`` (realsig: bool) = + """module Sample +type Holder<'T>() = + static let mutable backing = 0 + static member Set v = backing <- v + static member private Secret = backing + 1 + member _.Run() = + let rec h n = if n = 0 then Holder<'T>.Secret else h (n - 1) + h 5 +[] +let main _ = + Holder.Set 41 + if Holder().Run() = 42 then 0 else 1 +""" + |> compileRunSucceeds realsig diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction06.fs.RealInternalSignatureOn.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction06.fs.RealInternalSignatureOn.OptimizeOn.il.bsl index fa8c139a871..43d92d119f3 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction06.fs.RealInternalSignatureOn.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction06.fs.RealInternalSignatureOn.OptimizeOn.il.bsl @@ -38,54 +38,6 @@ extends [runtime]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) - .class auto ansi serializable sealed nested assembly beforefieldinit f@11 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .field static assembly initonly class assembly/f@11 @_instance - .method assembly specialname rtspecialname instance void .ctor() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() - IL_0006: ret - } - - .method public strict virtual instance int32 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) cil managed - { - - .maxstack 6 - .locals init (int32 V_0, - class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 V_1) - IL_0000: call int32 assembly::TestFunction1() - IL_0005: stloc.0 - IL_0006: ldstr "Hello" - IL_000b: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_0010: stloc.1 - IL_0011: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() - IL_0016: ldloc.1 - IL_0017: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [runtime]System.IO.TextWriter, - class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_001c: pop - IL_001d: ldloc.0 - IL_001e: ldloc.0 - IL_001f: add - IL_0020: ret - } - - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void assembly/f@11::.ctor() - IL_0005: stsfld class assembly/f@11 assembly/f@11::@_instance - IL_000a: ret - } - - } - .method public static int32 TestFunction1() cil managed { @@ -114,18 +66,35 @@ .method public static int32 TestFunction6() cil managed { - .maxstack 5 - .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_0) - IL_0000: ldsfld class assembly/f@11 assembly/f@11::@_instance + .maxstack 8 + IL_0000: ldnull + IL_0001: call int32 assembly::f@10(class [FSharp.Core]Microsoft.FSharp.Core.Unit) + IL_0006: ldnull + IL_0007: call int32 assembly::f@10(class [FSharp.Core]Microsoft.FSharp.Core.Unit) + IL_000c: add + IL_000d: ret + } + + .method assembly static int32 f@10(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) cil managed + { + + .maxstack 4 + .locals init (int32 V_0, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 V_1) + IL_0000: call int32 assembly::TestFunction1() IL_0005: stloc.0 - IL_0006: ldloc.0 - IL_0007: ldnull - IL_0008: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_000d: ldloc.0 - IL_000e: ldnull - IL_000f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0014: add - IL_0015: ret + IL_0006: ldstr "Hello" + IL_000b: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0010: stloc.1 + IL_0011: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_0016: ldloc.1 + IL_0017: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [runtime]System.IO.TextWriter, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_001c: pop + IL_001d: ldloc.0 + IL_001e: ldloc.0 + IL_001f: add + IL_0020: ret } } @@ -147,4 +116,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOn.OptimizeOn.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOn.OptimizeOn.il.net472.bsl index f4f126bbc5b..43b4d63535e 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOn.OptimizeOn.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOn.OptimizeOn.il.net472.bsl @@ -1,26 +1,21 @@ - - - - - .assembly extern runtime { } .assembly extern FSharp.Core { } .assembly extern netstandard { - .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) - .ver 2:1:0:0 +.publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) +.ver 2:1:0:0 } .assembly assembly { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, - int32, - int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) +.custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, +int32, +int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + - - - .hash algorithm 0x00008004 - .ver 0:0:0:0 +.hash algorithm 0x00008004 +.ver 0:0:0:0 } .module assembly.exe @@ -35,142 +30,109 @@ .class public abstract auto ansi sealed assembly - extends [runtime]System.Object +extends [runtime]System.Object +{ +.custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) +.class auto ansi serializable nested public C +extends [runtime]System.Object +{ +.custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) +.field assembly string x +.field assembly string x@8 +.method public specialname rtspecialname instance void .ctor() cil managed { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) - .class auto ansi serializable nested public C - extends [runtime]System.Object - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) - .field assembly string x - .field assembly string x@8 - .method public specialname rtspecialname instance void .ctor() cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: callvirt instance void [runtime]System.Object::.ctor() - IL_0006: ldarg.0 - IL_0007: pop - IL_0008: ldarg.0 - IL_0009: call string [runtime]System.Console::ReadLine() - IL_000e: stfld string assembly/C::x - IL_0013: ldarg.0 - IL_0014: call string [runtime]System.Console::ReadLine() - IL_0019: stfld string assembly/C::x@8 - IL_001e: ret - } - - .method public hidebysig instance string M() cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld string assembly/C::x@8 - IL_0006: ldarg.0 - IL_0007: callvirt instance string assembly/C::g() - IL_000c: call string [runtime]System.String::Concat(string, - string) - IL_0011: ret - } - - .method assembly hidebysig instance string g() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld string assembly/C::x - IL_0006: ret - } - - } - - .class auto ansi serializable sealed nested assembly beforefieldinit g@13 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .field static assembly initonly class assembly/g@13 @_instance - .method assembly specialname rtspecialname instance void .ctor() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() - IL_0006: ret - } - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) cil managed - { - - .maxstack 6 - .locals init (class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 V_0) - IL_0000: ldstr "Hello" - IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_000a: stloc.0 - IL_000b: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() - IL_0010: ldloc.0 - IL_0011: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [runtime]System.IO.TextWriter, - class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0016: pop - IL_0017: ldstr "Hello" - IL_001c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_0021: stloc.0 - IL_0022: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() - IL_0027: ldloc.0 - IL_0028: tail. - IL_002a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [runtime]System.IO.TextWriter, - class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_002f: ret - } - - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void assembly/g@13::.ctor() - IL_0005: stsfld class assembly/g@13 assembly/g@13::@_instance - IL_000a: ret - } - - } - - .method public static class [runtime]System.Tuple`2 f(!!a x) cil managed - { - - .maxstack 5 - .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_0) - IL_0000: ldsfld class assembly/g@13 assembly/g@13::@_instance - IL_0005: stloc.0 - IL_0006: ldloc.0 - IL_0007: ldnull - IL_0008: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_000d: ldloc.0 - IL_000e: ldnull - IL_000f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0014: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, - !1) - IL_0019: ret - } +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: callvirt instance void [runtime]System.Object::.ctor() +IL_0006: ldarg.0 +IL_0007: pop +IL_0008: ldarg.0 +IL_0009: call string [runtime]System.Console::ReadLine() +IL_000e: stfld string assembly/C::x +IL_0013: ldarg.0 +IL_0014: call string [runtime]System.Console::ReadLine() +IL_0019: stfld string assembly/C::x@8 +IL_001e: ret } -.class private abstract auto ansi sealed ''.$assembly - extends [runtime]System.Object +.method public hidebysig instance string M() cil managed { - .method public static void main@() cil managed - { - .entrypoint - - .maxstack 8 - IL_0000: ret - } +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: ldfld string assembly/C::x@8 +IL_0006: ldarg.0 +IL_0007: callvirt instance string assembly/C::g() +IL_000c: call string [runtime]System.String::Concat(string, +string) +IL_0011: ret } +.method assembly hidebysig instance string g() cil managed +{ +.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) +.maxstack 8 +IL_0000: ldarg.0 +IL_0001: ldfld string assembly/C::x +IL_0006: ret +} +} +.method public static class [runtime]System.Tuple`2 f(!!a x) cil managed +{ +.maxstack 8 +IL_0000: ldnull +IL_0001: call void assembly::g@12(class [FSharp.Core]Microsoft.FSharp.Core.Unit) +IL_0006: nop +IL_0007: ldnull +IL_0008: ldnull +IL_0009: call void assembly::g@12(class [FSharp.Core]Microsoft.FSharp.Core.Unit) +IL_000e: nop +IL_000f: ldnull +IL_0010: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, +!1) +IL_0015: ret +} + +.method assembly static void g@12(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) cil managed +{ + +.maxstack 4 +.locals init (class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 V_0) +IL_0000: ldstr "Hello" +IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) +IL_000a: stloc.0 +IL_000b: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() +IL_0010: ldloc.0 +IL_0011: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [runtime]System.IO.TextWriter, +class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) +IL_0016: pop +IL_0017: ldstr "Hello" +IL_001c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) +IL_0021: stloc.0 +IL_0022: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() +IL_0027: ldloc.0 +IL_0028: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [runtime]System.IO.TextWriter, +class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) +IL_002d: pop +IL_002e: ret +} + +} + +.class private abstract auto ansi sealed ''.$assembly +extends [runtime]System.Object +{ +.method public static void main@() cil managed +{ +.entrypoint + +.maxstack 8 +IL_0000: ret +} +} \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOn.OptimizeOn.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOn.OptimizeOn.il.netcore.bsl index 422674eeb50..82a314e85a7 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOn.OptimizeOn.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOn.OptimizeOn.il.netcore.bsl @@ -5,12 +5,12 @@ .assembly extern runtime { } .assembly extern FSharp.Core { } -.assembly extern runtime { } .assembly extern netstandard { .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) .ver 2:1:0:0 } +.assembly extern runtime { } .assembly assembly { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, @@ -87,72 +87,45 @@ } - .class auto ansi serializable sealed nested assembly beforefieldinit g@13 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .field static assembly initonly class assembly/g@13 @_instance - .method assembly specialname rtspecialname instance void .ctor() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() - IL_0006: ret - } - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) cil managed - { - - .maxstack 6 - .locals init (class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 V_0) - IL_0000: ldstr "Hello" - IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_000a: stloc.0 - IL_000b: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() - IL_0010: ldloc.0 - IL_0011: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [runtime]System.IO.TextWriter, - class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0016: pop - IL_0017: ldstr "Hello" - IL_001c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_0021: stloc.0 - IL_0022: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() - IL_0027: ldloc.0 - IL_0028: tail. - IL_002a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [runtime]System.IO.TextWriter, - class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_002f: ret - } - - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void assembly/g@13::.ctor() - IL_0005: stsfld class assembly/g@13 assembly/g@13::@_instance - IL_000a: ret - } - - } - .method public static class [runtime]System.Tuple`2 f(!!a x) cil managed { - .maxstack 5 - .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_0) - IL_0000: ldsfld class assembly/g@13 assembly/g@13::@_instance - IL_0005: stloc.0 - IL_0006: ldloc.0 + .maxstack 8 + IL_0000: ldnull + IL_0001: call void assembly::g@12(class [FSharp.Core]Microsoft.FSharp.Core.Unit) + IL_0006: nop IL_0007: ldnull - IL_0008: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_000d: ldloc.0 - IL_000e: ldnull - IL_000f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0014: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + IL_0008: ldnull + IL_0009: call void assembly::g@12(class [FSharp.Core]Microsoft.FSharp.Core.Unit) + IL_000e: nop + IL_000f: ldnull + IL_0010: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, !1) - IL_0019: ret + IL_0015: ret + } + + .method assembly static void g@12(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) cil managed + { + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 V_0) + IL_0000: ldstr "Hello" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_000a: stloc.0 + IL_000b: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_0010: ldloc.0 + IL_0011: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [runtime]System.IO.TextWriter, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0016: pop + IL_0017: ldstr "Hello" + IL_001c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0021: stloc.0 + IL_0022: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_0027: ldloc.0 + IL_0028: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [runtime]System.IO.TextWriter, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_002d: pop + IL_002e: ret } } @@ -174,4 +147,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj index 0ecc691ef57..4a70c3ea9b2 100644 --- a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj +++ b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj @@ -265,6 +265,9 @@ + + + diff --git a/tests/FSharp.Compiler.ComponentTests/Signatures/TypeTests.fs b/tests/FSharp.Compiler.ComponentTests/Signatures/TypeTests.fs index d8317ff8e92..38ca5c26ee0 100644 --- a/tests/FSharp.Compiler.ComponentTests/Signatures/TypeTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/Signatures/TypeTests.fs @@ -344,7 +344,7 @@ type GenericType<'X> with one |> withAdditionalSourceFiles [ two; three ] |> compile - |> verifyILContains [ ".Print" ] + |> verifyILPresent [ ".Print" ] // https://github.com/dotnet/fsharp/issues/14310 [] @@ -990,9 +990,9 @@ let test() = |> shouldSucceed |> ignore -// Verify M(()) and M() produce identical IL method signatures +// Regression for #19615: M(()) emits explicit Unit argument, distinct from a no-arg M(). [] -let ``Unit param - M(()) and M() produce same IL method signature`` () = +let ``Unit param - M(()) emits Unit argument distinct from M(int)`` () = FSharp """ module Test type D() = @@ -1001,8 +1001,7 @@ type D() = """ |> compile |> shouldSucceed - |> verifyILContains [ - ".method public hidebysig instance int32 M() cil managed" + |> verifyILPresent [ + ".method public hidebysig instance int32 M(class [FSharp.Core]Microsoft.FSharp.Core.Unit _arg1) cil managed" ".method public hidebysig instance int32 M(int32 y) cil managed" ] - |> ignore diff --git a/tests/FSharp.Test.Utilities/Compiler.fs b/tests/FSharp.Test.Utilities/Compiler.fs index 86f760a3bee..b1c431aa0c8 100644 --- a/tests/FSharp.Test.Utilities/Compiler.fs +++ b/tests/FSharp.Test.Utilities/Compiler.fs @@ -1342,8 +1342,7 @@ $ code --diff {outFile} {expectedFile} | Some p -> match ILChecker.verifyILAndReturnActual [] p expected with | true, _, _ -> result - | false, errorMsg, _actualIL -> - CompilationResult.Failure( {s with Output = Some (ExecutionOutput {Outcome = NoExitCode; StdOut = errorMsg; StdErr = ""})} ) + | false, errorMsg, _actualIL -> failwith $"IL verification failed:\n{errorMsg}" | CompilationResult.Failure f -> printfn "Failure:" printfn $"{f}" @@ -1351,6 +1350,8 @@ $ code --diff {outFile} {expectedFile} let verifyIL = doILCheck ILChecker.checkIL + let verifyILPresent = doILCheck ILChecker.checkILPresent + let verifyILNotPresent = doILCheck ILChecker.checkILNotPresent /// Verifies that the compiled assembly contains an assembly reference whose name starts with the given prefix. diff --git a/tests/FSharp.Test.Utilities/ILChecker.fs b/tests/FSharp.Test.Utilities/ILChecker.fs index a9ec56ccc67..24ff56e0587 100644 --- a/tests/FSharp.Test.Utilities/ILChecker.fs +++ b/tests/FSharp.Test.Utilities/ILChecker.fs @@ -65,12 +65,17 @@ module ILChecker = let unifyImageBase ilCode = replace ilCode ("\.imagebase\s*0x\d*", ".imagebase {value}") + // Normalize ildasm's platform-specific `ldc.r8 10` vs `ldc.r8 10.` for plain-integer doubles. + let unifyFloatLiterals ilCode = + Regex.Replace(ilCode, "(ldc\.r8\s+-?\d+)(\s|$)", "$1.$2", RegexOptions.Multiline) + let unifyingAssemblyNames (text: string) = match assemblyName with | Some name -> text.Replace(name, "assembly") | None -> text |> unifyRuntimeAssemblyName |> unifyImageBase + |> unifyFloatLiterals let stripManagedResources (text: string) = let result = Regex.Replace(text, "\.mresource public .*\r?\n{\s*}\r?\n", "", RegexOptions.Multiline) @@ -195,19 +200,25 @@ module ILChecker = let verifyILAndReturnActual args dllFilePath expectedIL = checkILPrim args dllFilePath expectedIL - let checkILNotPresent dllFilePath unexpectedIL = + let private checkILFragments shouldBePresent dllFilePath fragments = let actualIL = generateIL dllFilePath [] - if unexpectedIL = [] then - Assert.Fail $"No unexpected IL given. This is actual IL: \n{actualIL}" + if fragments = [] then + Assert.Fail $"No IL fragments given. This is actual IL: \n{actualIL}" + let label = if shouldBePresent then "Not found in" else "Found in" + let isError (fragment: string) = actualIL.Contains(fragment) <> shouldBePresent let errors = - unexpectedIL + fragments |> Seq.map (normalizeILText None) - |> Seq.filter actualIL.Contains - |> Seq.map (sprintf "Found in actual IL: '%s'") + |> Seq.filter isError + |> Seq.map (sprintf "%s actual IL: '%s'" label) |> String.concat "\n" if errors <> "" then Assert.Fail $"{errors}\n\n\nEntire actual:\n{actualIL}" + let checkILNotPresent dllFilePath unexpectedIL = checkILFragments false dllFilePath unexpectedIL + + let checkILPresent dllFilePath expectedIL = checkILFragments true dllFilePath expectedIL + let reassembleIL ilFilePath dllFilePath = let ilasmPath = config.ILASM let _, _, errors = exec ilasmPath [ $"%s{ilFilePath} /output=%s{dllFilePath} /dll" ] From 42e9b5761d77cc9b7fc5ad8a2c01f36a61d22374 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Fri, 12 Jun 2026 12:10:07 +0200 Subject: [PATCH 66/72] Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20260609.1 (#19927) On relative base path root optimization.linux-arm64.MIBC.Runtime , optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-arm64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime From Version 1.0.0-prerelease.26276.2 -> To Version 1.0.0-prerelease.26309.1 Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.props | 10 +++++----- eng/Version.Details.xml | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/eng/Version.Details.props b/eng/Version.Details.props index 8198264a4a0..8dbcf149ce8 100644 --- a/eng/Version.Details.props +++ b/eng/Version.Details.props @@ -13,11 +13,11 @@ This file should be imported by eng/Versions.props 18.8.0-preview-26275-09 18.8.0-preview-26275-09 - 1.0.0-prerelease.26276.2 - 1.0.0-prerelease.26276.2 - 1.0.0-prerelease.26276.2 - 1.0.0-prerelease.26276.2 - 1.0.0-prerelease.26276.2 + 1.0.0-prerelease.26309.1 + 1.0.0-prerelease.26309.1 + 1.0.0-prerelease.26309.1 + 1.0.0-prerelease.26309.1 + 1.0.0-prerelease.26309.1 5.9.0-1.26302.3 5.9.0-1.26302.3 diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 222157fba7e..4d1eaa5ea4b 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -86,25 +86,25 @@ https://github.com/dotnet/arcade 2a80f6e04a835d6beee635c93331b38944de8129 - + https://dev.azure.com/dnceng/internal/_git/dotnet-optimization - 66482c2bec0351f496e4cc18d98f0f55f78b0c78 + b5964e83d71a6fbe08ae90fd5f5a2556917d27e6 - + https://dev.azure.com/dnceng/internal/_git/dotnet-optimization - 66482c2bec0351f496e4cc18d98f0f55f78b0c78 + b5964e83d71a6fbe08ae90fd5f5a2556917d27e6 - + https://dev.azure.com/dnceng/internal/_git/dotnet-optimization - 66482c2bec0351f496e4cc18d98f0f55f78b0c78 + b5964e83d71a6fbe08ae90fd5f5a2556917d27e6 - + https://dev.azure.com/dnceng/internal/_git/dotnet-optimization - 66482c2bec0351f496e4cc18d98f0f55f78b0c78 + b5964e83d71a6fbe08ae90fd5f5a2556917d27e6 - + https://dev.azure.com/dnceng/internal/_git/dotnet-optimization - 66482c2bec0351f496e4cc18d98f0f55f78b0c78 + b5964e83d71a6fbe08ae90fd5f5a2556917d27e6 From 6127daa38ec868f31962d9782abbc401a829c468 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 12 Jun 2026 12:10:15 +0200 Subject: [PATCH 67/72] docs: update state-machine diagram for security scan pagination + date filter (#19909) Reflects changes in labelops-pr-security-scan.md: - Adds date filter (cutoff-based skip) as explicit choice state - Clarifies that repo rules + memory are read together at setup - Notes paginated PR listing (newest first) - Updates state.json check description Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/docs/state-machine.md | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/docs/state-machine.md b/.github/docs/state-machine.md index 379cb9185c7..a592a9bb609 100644 --- a/.github/docs/state-machine.md +++ b/.github/docs/state-machine.md @@ -134,17 +134,24 @@ stateDiagram-v2 [*] --> ScanQueue: ⏰ labelops-pr-security-scan (1h) state "Per-PR Classification" as ScanLoop { - ScanQueue --> ReadRules: 🤖 security-scan reads repo rules - ReadRules --> CheckDraft: 🤖 security-scan checks isDraft + ScanQueue --> ReadRules: 🤖 security-scan reads repo rules + memory + ReadRules --> CheckDate: 🤖 security-scan paginates PRs (newest first) + + state datecheck <> + CheckDate --> datecheck + datecheck --> SkipOld: PR before date cutoff + datecheck --> CheckDraft: PR within scan window + + SkipOld --> [*]: skip state draftcheck <> - CheckDraft --> draftcheck + CheckDraft --> draftcheck: 🤖 security-scan checks isDraft draftcheck --> SkipDraft: draft PR draftcheck --> CheckMemory: non-draft PR SkipDraft --> [*]: skip - CheckMemory --> CheckMemory2: 🤖 security-scan reads state.json + CheckMemory --> CheckMemory2: 🤖 security-scan checks state.json sha state memcheck <> CheckMemory2 --> memcheck @@ -255,7 +262,7 @@ stateDiagram-v2 aw-auto-update.md: da8c5e340a43d73616e3a0203c7e56de9ca4b82ee78b1902afe466a49a08bc17 labelops-flake-fix.md: 7dca5b8faa60f947204f8925c6238fbecf42aa8cbf3144a166120501b0eef1e4 labelops-pr-maintenance.md: 59ba52fc625e0b9112c31864e92154cdf09acf0bc0f2b167aa30a0d76baa898f -labelops-pr-security-scan.md: 675430850eaf8edaa86b4d26c9d381ac48e13536469f17748e7104f6e75937c2 +labelops-pr-security-scan.md: 7dd4063d35d2bac6b0edf238e72a1ffe2570d0102340dab8064bf1de9ec73ac7 regression-pr-shepherd.md: 18a65fe1cdf8aa219158f1d610db14078e5ff2f1ac912df2566bf796792395b5 repo-assist.md: 3775b51d142d22c98e87e48e8ac9d46cdf69e9c8306d5787758a35578dcb1119 --> From 276708b72f0cbf84cbcecc528356c41d34bb4ca2 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Fri, 12 Jun 2026 12:10:20 +0200 Subject: [PATCH 68/72] Update dependencies from https://github.com/dotnet/arcade build 20260604.4 (#19903) On relative base path root Microsoft.DotNet.Arcade.Sdk From Version 10.0.0-beta.26301.2 -> To Version 10.0.0-beta.26304.4 Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.props | 2 +- eng/Version.Details.xml | 4 ++-- global.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/eng/Version.Details.props b/eng/Version.Details.props index 8dbcf149ce8..76b25c10763 100644 --- a/eng/Version.Details.props +++ b/eng/Version.Details.props @@ -6,7 +6,7 @@ This file should be imported by eng/Versions.props - 10.0.0-beta.26301.2 + 10.0.0-beta.26304.4 18.8.0-preview-26275-09 18.8.0-preview-26275-09 diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 4d1eaa5ea4b..ce44c80b8b7 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -82,9 +82,9 @@ - + https://github.com/dotnet/arcade - 2a80f6e04a835d6beee635c93331b38944de8129 + 7b306e34463421cef2816352743b943c6547dfab https://dev.azure.com/dnceng/internal/_git/dotnet-optimization diff --git a/global.json b/global.json index 2f60a93cbf1..36f6e741ee9 100644 --- a/global.json +++ b/global.json @@ -22,7 +22,7 @@ "xcopy-msbuild": "18.0.0" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.26301.2", + "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.26304.4", "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.23255.2" } } From fb9e1907890e78cc6b39b6cbf0903c6eb8438eab Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Fri, 12 Jun 2026 12:10:25 +0200 Subject: [PATCH 69/72] [main] Update dependencies from dotnet/roslyn (#19889) * Update dependencies from https://github.com/dotnet/roslyn build 20260603.12 On relative base path root Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.Compilers , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.EditorFeatures , Microsoft.CodeAnalysis.EditorFeatures.Text , Microsoft.CodeAnalysis.ExternalAccess.FSharp , Microsoft.CodeAnalysis.Features , Microsoft.VisualStudio.LanguageServices From Version 5.9.0-1.26302.3 -> To Version 5.9.0-1.26303.12 * Update dependencies from https://github.com/dotnet/roslyn build 20260604.2 On relative base path root Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.Compilers , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.EditorFeatures , Microsoft.CodeAnalysis.EditorFeatures.Text , Microsoft.CodeAnalysis.ExternalAccess.FSharp , Microsoft.CodeAnalysis.Features , Microsoft.VisualStudio.LanguageServices From Version 5.9.0-1.26302.3 -> To Version 5.9.0-1.26304.2 * Update dependencies from https://github.com/dotnet/roslyn build 20260605.6 On relative base path root Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.Compilers , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.EditorFeatures , Microsoft.CodeAnalysis.EditorFeatures.Text , Microsoft.CodeAnalysis.ExternalAccess.FSharp , Microsoft.CodeAnalysis.Features , Microsoft.VisualStudio.LanguageServices From Version 5.9.0-1.26302.3 -> To Version 5.9.0-1.26305.6 * Update dependencies from https://github.com/dotnet/roslyn build 20260606.2 On relative base path root Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.Compilers , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.EditorFeatures , Microsoft.CodeAnalysis.EditorFeatures.Text , Microsoft.CodeAnalysis.ExternalAccess.FSharp , Microsoft.CodeAnalysis.Features , Microsoft.VisualStudio.LanguageServices From Version 5.9.0-1.26302.3 -> To Version 5.9.0-1.26306.2 * Update dependencies from https://github.com/dotnet/roslyn build 20260608.7 On relative base path root Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.Compilers , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.EditorFeatures , Microsoft.CodeAnalysis.EditorFeatures.Text , Microsoft.CodeAnalysis.ExternalAccess.FSharp , Microsoft.CodeAnalysis.Features , Microsoft.VisualStudio.LanguageServices From Version 5.9.0-1.26302.3 -> To Version 5.9.0-1.26308.7 * Update dependencies from https://github.com/dotnet/roslyn build 20260609.3 On relative base path root Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.Compilers , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.EditorFeatures , Microsoft.CodeAnalysis.EditorFeatures.Text , Microsoft.CodeAnalysis.ExternalAccess.FSharp , Microsoft.CodeAnalysis.Features , Microsoft.VisualStudio.LanguageServices From Version 5.9.0-1.26302.3 -> To Version 5.9.0-1.26309.3 * Update dependencies from https://github.com/dotnet/roslyn build 20260611.6 On relative base path root Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.Compilers , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.EditorFeatures , Microsoft.CodeAnalysis.EditorFeatures.Text , Microsoft.CodeAnalysis.ExternalAccess.FSharp , Microsoft.CodeAnalysis.Features , Microsoft.VisualStudio.LanguageServices From Version 5.9.0-1.26302.3 -> To Version 5.9.0-1.26311.6 --------- Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.props | 16 ++++++++-------- eng/Version.Details.xml | 32 ++++++++++++++++---------------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/eng/Version.Details.props b/eng/Version.Details.props index 76b25c10763..c3420f1df4b 100644 --- a/eng/Version.Details.props +++ b/eng/Version.Details.props @@ -19,14 +19,14 @@ This file should be imported by eng/Versions.props 1.0.0-prerelease.26309.1 1.0.0-prerelease.26309.1 - 5.9.0-1.26302.3 - 5.9.0-1.26302.3 - 5.9.0-1.26302.3 - 5.9.0-1.26302.3 - 5.9.0-1.26302.3 - 5.9.0-1.26302.3 - 5.9.0-1.26302.3 - 5.9.0-1.26302.3 + 5.9.0-1.26311.6 + 5.9.0-1.26311.6 + 5.9.0-1.26311.6 + 5.9.0-1.26311.6 + 5.9.0-1.26311.6 + 5.9.0-1.26311.6 + 5.9.0-1.26311.6 + 5.9.0-1.26311.6 10.0.2 10.0.2 diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index ce44c80b8b7..fbfc306c7c5 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -18,37 +18,37 @@ https://github.com/dotnet/msbuild 4ea8215937724cd480a29c30187195b5cbda7486 - + https://github.com/dotnet/roslyn - 9fa44037cfccdd8ec2e56429627522e15712af23 + 3577da32af34a77d27de686c0fa25269ac1b50da - + https://github.com/dotnet/roslyn - 9fa44037cfccdd8ec2e56429627522e15712af23 + 3577da32af34a77d27de686c0fa25269ac1b50da - + https://github.com/dotnet/roslyn - 9fa44037cfccdd8ec2e56429627522e15712af23 + 3577da32af34a77d27de686c0fa25269ac1b50da - + https://github.com/dotnet/roslyn - 9fa44037cfccdd8ec2e56429627522e15712af23 + 3577da32af34a77d27de686c0fa25269ac1b50da - + https://github.com/dotnet/roslyn - 9fa44037cfccdd8ec2e56429627522e15712af23 + 3577da32af34a77d27de686c0fa25269ac1b50da - + https://github.com/dotnet/roslyn - 9fa44037cfccdd8ec2e56429627522e15712af23 + 3577da32af34a77d27de686c0fa25269ac1b50da - + https://github.com/dotnet/roslyn - 9fa44037cfccdd8ec2e56429627522e15712af23 + 3577da32af34a77d27de686c0fa25269ac1b50da - + https://github.com/dotnet/roslyn - 9fa44037cfccdd8ec2e56429627522e15712af23 + 3577da32af34a77d27de686c0fa25269ac1b50da From b2319f70fa59f9c68c421c057604acb7bdfd2aab Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Fri, 12 Jun 2026 12:10:30 +0200 Subject: [PATCH 70/72] [main] Update dependencies from dotnet/msbuild (#19826) * Update dependencies from https://github.com/dotnet/msbuild build 20260526.3 On relative base path root Microsoft.Build , Microsoft.Build.Framework , Microsoft.Build.Tasks.Core , Microsoft.Build.Utilities.Core From Version 18.8.0-preview-26275-09 -> To Version 18.8.0-preview-26276-03 * Update dependencies from https://github.com/dotnet/msbuild build 20260527.9 On relative base path root Microsoft.Build , Microsoft.Build.Framework , Microsoft.Build.Tasks.Core , Microsoft.Build.Utilities.Core From Version 18.8.0-preview-26275-09 -> To Version 18.9.0-preview-26277-09 * Update dependencies from https://github.com/dotnet/msbuild build 20260529.4 On relative base path root Microsoft.Build , Microsoft.Build.Framework , Microsoft.Build.Tasks.Core , Microsoft.Build.Utilities.Core From Version 18.8.0-preview-26275-09 -> To Version 18.9.0-preview-26279-04 * Update dependencies from https://github.com/dotnet/msbuild build 20260601.10 On relative base path root Microsoft.Build , Microsoft.Build.Framework , Microsoft.Build.Tasks.Core , Microsoft.Build.Utilities.Core From Version 18.8.0-preview-26275-09 -> To Version 18.9.0-preview-26301-10 * Update dependencies from https://github.com/dotnet/msbuild build 20260602.8 On relative base path root Microsoft.Build , Microsoft.Build.Framework , Microsoft.Build.Tasks.Core , Microsoft.Build.Utilities.Core From Version 18.8.0-preview-26275-09 -> To Version 18.9.0-preview-26302-08 * Fix UseDotNet@2 temp extraction conflict in regression tests The UseDotNet@2 task fails when installing multiple .NET SDKs sequentially because it doesn't always clean up temp extraction directories between runs. This causes 'The file dotnet.exe already exists' errors when the 3rd SDK (10.0.100) tries to extract to the same temp directory used by a prior install. Add a cleanup step between the 9.0.x and 10.0.100 SDK installs that removes any leftover extraction directories containing dotnet.exe along with SDK structure markers (sdk/, host/, shared/). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Update dependencies from https://github.com/dotnet/msbuild build 20260603.5 On relative base path root Microsoft.Build , Microsoft.Build.Framework , Microsoft.Build.Tasks.Core , Microsoft.Build.Utilities.Core From Version 18.8.0-preview-26275-09 -> To Version 18.9.0-preview-26303-05 * Update dependencies from https://github.com/dotnet/msbuild build 20260604.5 On relative base path root Microsoft.Build , Microsoft.Build.Framework , Microsoft.Build.Tasks.Core , Microsoft.Build.Utilities.Core From Version 18.8.0-preview-26275-09 -> To Version 18.9.0-preview-26304-05 * Update dependencies from https://github.com/dotnet/msbuild build 20260605.7 On relative base path root Microsoft.Build , Microsoft.Build.Framework , Microsoft.Build.Tasks.Core , Microsoft.Build.Utilities.Core From Version 18.8.0-preview-26275-09 -> To Version 18.9.0-preview-26305-07 * Update dependencies from https://github.com/dotnet/msbuild build 20260608.25 On relative base path root Microsoft.Build , Microsoft.Build.Framework , Microsoft.Build.Tasks.Core , Microsoft.Build.Utilities.Core From Version 18.8.0-preview-26275-09 -> To Version 18.9.0-preview-26308-25 * Update dependencies from https://github.com/dotnet/msbuild build 20260609.5 On relative base path root Microsoft.Build , Microsoft.Build.Framework , Microsoft.Build.Tasks.Core , Microsoft.Build.Utilities.Core From Version 18.8.0-preview-26275-09 -> To Version 18.9.0-preview-26309-05 * Update dependencies from https://github.com/dotnet/msbuild build 20260610.5 On relative base path root Microsoft.Build , Microsoft.Build.Framework , Microsoft.Build.Tasks.Core , Microsoft.Build.Utilities.Core From Version 18.8.0-preview-26275-09 -> To Version 18.9.0-preview-26310-05 * Update dependencies from https://github.com/dotnet/msbuild build 20260612.1 On relative base path root Microsoft.Build , Microsoft.Build.Framework , Microsoft.Build.Tasks.Core , Microsoft.Build.Utilities.Core From Version 18.8.0-preview-26275-09 -> To Version 18.9.0-preview-26312-01 --------- Co-authored-by: dotnet-maestro[bot] Co-authored-by: Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- eng/Version.Details.props | 8 ++++---- eng/Version.Details.xml | 16 ++++++++-------- eng/templates/regression-test-jobs.yml | 19 +++++++++++++++++++ 3 files changed, 31 insertions(+), 12 deletions(-) diff --git a/eng/Version.Details.props b/eng/Version.Details.props index c3420f1df4b..50acb60c234 100644 --- a/eng/Version.Details.props +++ b/eng/Version.Details.props @@ -8,10 +8,10 @@ This file should be imported by eng/Versions.props 10.0.0-beta.26304.4 - 18.8.0-preview-26275-09 - 18.8.0-preview-26275-09 - 18.8.0-preview-26275-09 - 18.8.0-preview-26275-09 + 18.9.0-preview-26312-01 + 18.9.0-preview-26312-01 + 18.9.0-preview-26312-01 + 18.9.0-preview-26312-01 1.0.0-prerelease.26309.1 1.0.0-prerelease.26309.1 diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index fbfc306c7c5..3de6009f4b3 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -2,21 +2,21 @@ - + https://github.com/dotnet/msbuild - 4ea8215937724cd480a29c30187195b5cbda7486 + 63a3382f0a51f6ab82d0a43c395019ecba7be12c - + https://github.com/dotnet/msbuild - 4ea8215937724cd480a29c30187195b5cbda7486 + 63a3382f0a51f6ab82d0a43c395019ecba7be12c - + https://github.com/dotnet/msbuild - 4ea8215937724cd480a29c30187195b5cbda7486 + 63a3382f0a51f6ab82d0a43c395019ecba7be12c - + https://github.com/dotnet/msbuild - 4ea8215937724cd480a29c30187195b5cbda7486 + 63a3382f0a51f6ab82d0a43c395019ecba7be12c https://github.com/dotnet/roslyn diff --git a/eng/templates/regression-test-jobs.yml b/eng/templates/regression-test-jobs.yml index 9b50f376fe9..16da81059c2 100644 --- a/eng/templates/regression-test-jobs.yml +++ b/eng/templates/regression-test-jobs.yml @@ -115,6 +115,25 @@ jobs: version: '9.0.x' installationPath: $(Pipeline.Workspace)/TestRepo/.dotnet + - pwsh: | + # Clean leftover SDK extraction directories in agent temp to prevent + # UseDotNet@2 "file already exists" errors when installing multiple SDKs sequentially. + # The task extracts to a temp folder before moving to installationPath, but doesn't + # always clean up between runs on the same agent. + $tempDir = $env:AGENT_TEMPDIRECTORY + if ($tempDir -and (Test-Path $tempDir)) { + Get-ChildItem $tempDir -Directory -ErrorAction SilentlyContinue | + Where-Object { + (Test-Path (Join-Path $_.FullName "dotnet.exe")) -and + ((Test-Path (Join-Path $_.FullName "sdk")) -or (Test-Path (Join-Path $_.FullName "host")) -or (Test-Path (Join-Path $_.FullName "shared"))) + } | + ForEach-Object { + Write-Host "Removing leftover dotnet extraction dir: $($_.FullName)" + Remove-Item $_.FullName -Recurse -Force -ErrorAction Stop + } + } + displayName: Clean UseDotNet temp extraction directories for ${{ item.displayName }} + - task: UseDotNet@2 displayName: Install .NET SDK 10.0.100 for ${{ item.displayName }} inputs: From 14c4ced4e4719c266d6f8af061c369100a64f87a Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Fri, 12 Jun 2026 12:20:47 +0200 Subject: [PATCH 71/72] Warn FS3888 when consumer-visible attributes are missing from .fsi (#19880) --- .github/instructions/NoBloat.instructions.md | 55 ++ .../.FSharp.Compiler.Service/11.0.100.md | 1 + docs/release-notes/.FSharp.Core/11.0.100.md | 1 + docs/release-notes/.Language/preview.md | 1 + docs/release-notes/.VisualStudio/18.vNext.md | 4 + src/Compiler/AbstractIL/il.fsi | 3 + src/Compiler/AbstractIL/ilprint.fs | 2 +- src/Compiler/AbstractIL/ilread.fs | 2 +- src/Compiler/AbstractIL/ilwrite.fs | 2 +- src/Compiler/Checking/NameResolution.fs | 2 +- src/Compiler/Checking/SignatureConformance.fs | 130 ++++ src/Compiler/CodeGen/EraseUnions.fs | 5 +- src/Compiler/CodeGen/IlxGen.fs | 6 +- src/Compiler/Driver/CompilerConfig.fs | 2 +- src/Compiler/Driver/CompilerDiagnostics.fs | 2 +- src/Compiler/FSComp.txt | 2 + src/Compiler/Facilities/DiagnosticsLogger.fs | 2 +- src/Compiler/Facilities/DiagnosticsLogger.fsi | 1 + src/Compiler/Facilities/LanguageFeatures.fs | 3 + src/Compiler/Facilities/LanguageFeatures.fsi | 1 + src/Compiler/Service/ExternalSymbol.fsi | 2 + .../Service/ServiceCompilerDiagnostics.fsi | 1 + .../Service/ServiceDeclarationLists.fs | 1 + .../Service/ServiceDeclarationLists.fsi | 2 +- src/Compiler/Service/ServiceNavigation.fs | 4 +- src/Compiler/Service/ServiceNavigation.fsi | 2 + src/Compiler/Symbols/SymbolPatterns.fs | 1 + src/Compiler/Symbols/SymbolPatterns.fsi | 1 + src/Compiler/SyntaxTree/ParseHelpers.fsi | 1 + src/Compiler/SyntaxTree/PrettyNaming.fsi | 1 + src/Compiler/SyntaxTree/WarnScopes.fsi | 1 + src/Compiler/SyntaxTree/XmlDoc.fs | 1 - .../TypedTree/TypedTreeOps.FreeVars.fsi | 1 + .../TypedTree/TypedTreeOps.Transforms.fsi | 1 + src/Compiler/TypedTree/WellKnownAttribs.fs | 13 + src/Compiler/TypedTree/WellKnownAttribs.fsi | 13 + src/Compiler/Utilities/FileSystem.fs | 5 - src/Compiler/Utilities/FileSystem.fsi | 1 + src/Compiler/Utilities/sformat.fsi | 1 + src/Compiler/xlf/FSComp.txt.cs.xlf | 40 +- src/Compiler/xlf/FSComp.txt.de.xlf | 40 +- src/Compiler/xlf/FSComp.txt.es.xlf | 40 +- src/Compiler/xlf/FSComp.txt.fr.xlf | 40 +- src/Compiler/xlf/FSComp.txt.it.xlf | 40 +- src/Compiler/xlf/FSComp.txt.ja.xlf | 40 +- src/Compiler/xlf/FSComp.txt.ko.xlf | 40 +- src/Compiler/xlf/FSComp.txt.pl.xlf | 40 +- src/Compiler/xlf/FSComp.txt.pt-BR.xlf | 40 +- src/Compiler/xlf/FSComp.txt.ru.xlf | 40 +- src/Compiler/xlf/FSComp.txt.tr.xlf | 40 +- src/Compiler/xlf/FSComp.txt.zh-Hans.xlf | 40 +- src/Compiler/xlf/FSComp.txt.zh-Hant.xlf | 40 +- src/FSharp.Core/Query.fsi | 2 + src/FSharp.Core/async.fsi | 1 + src/FSharp.Core/fslib-extra-pervasives.fsi | 3 + src/FSharp.Core/nativeptr.fsi | 19 + src/FSharp.Core/prim-types.fsi | 44 ++ src/FSharp.Core/resumable.fsi | 1 + .../Signatures/SignatureEnforcedAttributes.fs | 482 +++++++++++++ .../FSharp.Compiler.ComponentTests.fsproj | 1 + tests/fsharp/typecheck/sigs/neg31.bsl | 4 + .../AddMissingAttributeToSignature.fs | 231 +++++++ .../RemoveExtraAttributeFromImplementation.fs | 121 ++++ .../src/FSharp.Editor/Common/Constants.fs | 7 + .../src/FSharp.Editor/FSharp.Editor.fsproj | 2 + .../AddMissingAttributeToSignatureTests.fs | 631 ++++++++++++++++++ ...veExtraAttributeFromImplementationTests.fs | 174 +++++ .../FSharp.Editor.Tests.fsproj | 2 + 68 files changed, 2309 insertions(+), 216 deletions(-) create mode 100644 .github/instructions/NoBloat.instructions.md create mode 100644 tests/FSharp.Compiler.ComponentTests/Conformance/Signatures/SignatureEnforcedAttributes.fs create mode 100644 vsintegration/src/FSharp.Editor/CodeFixes/AddMissingAttributeToSignature.fs create mode 100644 vsintegration/src/FSharp.Editor/CodeFixes/RemoveExtraAttributeFromImplementation.fs create mode 100644 vsintegration/tests/FSharp.Editor.Tests/CodeFixes/AddMissingAttributeToSignatureTests.fs create mode 100644 vsintegration/tests/FSharp.Editor.Tests/CodeFixes/RemoveExtraAttributeFromImplementationTests.fs diff --git a/.github/instructions/NoBloat.instructions.md b/.github/instructions/NoBloat.instructions.md new file mode 100644 index 00000000000..c80ca85f01b --- /dev/null +++ b/.github/instructions/NoBloat.instructions.md @@ -0,0 +1,55 @@ +--- +applyTo: + - "src/Compiler/**/*.{fs,fsi}" + - "vsintegration/src/**/*.{fs,fsi}" + - "tests/FSharp.Compiler.ComponentTests/**/*.fs" + - "tests/FSharp.Compiler.Service.Tests/**/*.fs" + - "vsintegration/tests/**/*.fs" +--- + +# Code Style: No Bloat + +Reviewers read code, not prose. Add bytes only when they pay for themselves. + +## Comments + +Good names **always** beat comments. Before writing a comment, ask: *can I rename a value, extract a function, or use an active pattern so the comment becomes unnecessary?* If yes, do that instead. + +- **Do not** restate what the code says (variable name, type name, attribute name, function signature). +- **Do not** narrate the algorithm step-by-step. The diff is the algorithm. +- **Do not** justify design decisions inline ("we chose X over Y because…"). Put rationale in the commit message or PR body. +- **Do not** leave war-story comments ("previously we did Z, but…", "counter-example: …"). The history is in `git log`. +- **Do not** write multi-line `///` doc comments for internal helpers whose body is one expression. + +Acceptable comments answer **why**, not **what**, and only when the *why* is non-obvious and cannot be expressed by renaming: +- Workarounds for compiler/runtime bugs (link the bug). +- Performance constraints invisible from the code shape ("inner loop runs 50M times per typecheck"). +- Cross-file invariants the code itself can't enforce. + +If you are tempted to write `// This is intentional`, change the code so the intent is structural, not decorative. + +## Code shape + +- Compact, idiomatic F#: pattern matching over `if`/`elif` ladders; active patterns where they remove duplication. +- Low cyclomatic complexity per function. Extract helpers — even one-line ones — when a name clarifies a step. +- Prefer module-level `let` over big bodies with nested locals. +- New file > bloating an existing 5000-line file when adding a self-contained concept. + +## Test code + +Tests get a touch more leeway for explanation, but the same rules largely apply: + +- One parametrized test (`[]`, `[]`, or a `for/yield` over inputs) > five copy-pasted tests. +- Module-level constants for shared paths (`Path.Combine` for OS neutrality), shared source strings, and shared expected outputs. +- Helpers like `parseAndCheck code` over reinventing the setup per test. +- Don't reinvent an entire `.fs` file inside each test when one shared module-level binding will do. + +## PR scope + +**Not paid by LOC.** Large PRs are typically shitty PRs. If the diff has 1000+ lines, split it. +- Cleanup commits separate from feature commits. +- No "phase tag" / "transitional measure" / "follow-up" comments left behind — either do it now in a follow-up commit, or file an issue. Don't leave breadcrumbs in the code. + +## When in doubt + +Delete the comment, rename the value, and re-read. If the code is still unclear, *that* is what needs fixing — not the comment. diff --git a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md index 75bbc9c7644..0ba56d79f13 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md +++ b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md @@ -77,6 +77,7 @@ * Reference assembly MVIDs are now deterministic across compiler invocations. Previously, `--refout` / `true` produced a different MVID every build because the implied signature hash used .NET's randomized `String.GetHashCode()`. ([Issue #19751](https://github.com/dotnet/fsharp/issues/19751), [PR #19801](https://github.com/dotnet/fsharp/pull/19801)) * Parser: recover on unfinished if and binary expressions ([PR #19724](https://github.com/dotnet/fsharp/pull/19724)) +* Warn FS3888 when a compiler-semantic attribute on a value/member or type/module is present in the `.fs` but missing from the `.fsi`. Such attributes were previously ignored at the consumer side. Under the `ErrorOnMissingSignatureAttribute` preview language feature, FS3888 is an error. ([Issue #19560](https://github.com/dotnet/fsharp/issues/19560), [PR #19880](https://github.com/dotnet/fsharp/pull/19880)) * Emit debug points at a stack-empty position ([PR #19877](https://github.com/dotnet/fsharp/pull/19877)) * Fix spurious XmlDoc warnings (unknown parameter / no documentation for parameter) under `--warnon:3390` when a get/set property documents the full parameter set across both accessors. ([Issue #13684](https://github.com/dotnet/fsharp/issues/13684), [PR #19884](https://github.com/dotnet/fsharp/pull/19884)) * Quotations of `match s with "" -> _` no longer leak the `s <> null && s.Length = 0` lowering; the empty-string optimization moved from pattern-match compilation to the optimizer so quoted expressions keep `op_Equality(s, "")`. ([Issue #19873](https://github.com/dotnet/fsharp/issues/19873)) diff --git a/docs/release-notes/.FSharp.Core/11.0.100.md b/docs/release-notes/.FSharp.Core/11.0.100.md index 7d0385e3b89..3349ac75260 100644 --- a/docs/release-notes/.FSharp.Core/11.0.100.md +++ b/docs/release-notes/.FSharp.Core/11.0.100.md @@ -1,5 +1,6 @@ ### Fixed +* Mirror compiler-semantic attributes (e.g. `[]`, `[]`) in `.fsi` signature files to match `.fs` implementations. ([Issue #19560](https://github.com/dotnet/fsharp/issues/19560), [PR #19880](https://github.com/dotnet/fsharp/pull/19880)) * Fix `Array.exists2` documentation examples to use equal-length arrays; the previous examples would throw `ArgumentException` at runtime instead of returning the documented `false`/`true` values. ([PR #19672](https://github.com/dotnet/fsharp/pull/19672)) * Move `Async.StartChild` to the "Starting Async Computations" docs category alongside `Async.StartChildAsTask`. ([Issue #19667](https://github.com/dotnet/fsharp/issues/19667)) * Add `InlineIfLambda` to `Array.init` ([PR #19869](https://github.com/dotnet/fsharp/pull/19869)) diff --git a/docs/release-notes/.Language/preview.md b/docs/release-notes/.Language/preview.md index d97ef294125..90c1aa2faa6 100644 --- a/docs/release-notes/.Language/preview.md +++ b/docs/release-notes/.Language/preview.md @@ -2,6 +2,7 @@ * Warn (FS3884) when a function or delegate value is used as an interpolated string argument, since it will be formatted via `ToString` rather than being applied. ([PR #19289](https://github.com/dotnet/fsharp/pull/19289)) * Added `MethodOverloadsCache` language feature (preview) that caches overload resolution results for repeated method calls, significantly improving compilation performance. ([PR #19072](https://github.com/dotnet/fsharp/pull/19072)) +* Added `ErrorOnMissingSignatureAttribute` preview language feature: makes FS3888 (compiler-semantic attribute on the `.fs` but not on the `.fsi`) an error instead of a warning. ([Issue #19560](https://github.com/dotnet/fsharp/issues/19560), [PR #19880](https://github.com/dotnet/fsharp/pull/19880)) ### Fixed diff --git a/docs/release-notes/.VisualStudio/18.vNext.md b/docs/release-notes/.VisualStudio/18.vNext.md index 781af946d89..abf918a6d38 100644 --- a/docs/release-notes/.VisualStudio/18.vNext.md +++ b/docs/release-notes/.VisualStudio/18.vNext.md @@ -1,3 +1,7 @@ +### Added + +* Code-fixes for FS3888 (compiler-semantic attribute on the `.fs` but not the `.fsi`): copy the attribute into the `.fsi`, or remove it from the `.fs`. ([Issue #19560](https://github.com/dotnet/fsharp/issues/19560), [PR #19880](https://github.com/dotnet/fsharp/pull/19880)) + ### Fixed * Fixed Rename incorrectly renaming `get` and `set` keywords for properties with explicit accessors. ([Issue #18270](https://github.com/dotnet/fsharp/issues/18270), [PR #19252](https://github.com/dotnet/fsharp/pull/19252)) diff --git a/src/Compiler/AbstractIL/il.fsi b/src/Compiler/AbstractIL/il.fsi index b543f0e19bd..dc22d5bc803 100644 --- a/src/Compiler/AbstractIL/il.fsi +++ b/src/Compiler/AbstractIL/il.fsi @@ -854,6 +854,7 @@ type ILAttribElem = type ILAttributeNamedArg = string * ILType * bool * ILAttribElem /// Custom attribute. +[] type ILAttribute = /// Attribute with args encoded to a binary blob according to ECMA-335 II.21 and II.23.3. /// 'decodeILAttribData' is used to parse the byte[] blob to ILAttribElem's as best as possible. @@ -973,6 +974,7 @@ type internal ILSecurityAction = | InheritanceDemandChoice | DemandChoice +[] type internal ILSecurityDecl = ILSecurityDecl of ILSecurityAction * byte[] /// Abstract type equivalent to ILSecurityDecl list - use helpers @@ -1041,6 +1043,7 @@ type MethodBody = | NotAvailable /// Generic parameters. Formal generic parameter declarations may include the bounds, if any, on the generic parameter. +[] type ILGenericParameterDef = { Name: string diff --git a/src/Compiler/AbstractIL/ilprint.fs b/src/Compiler/AbstractIL/ilprint.fs index 12e421f6829..f1fb38174c9 100644 --- a/src/Compiler/AbstractIL/ilprint.fs +++ b/src/Compiler/AbstractIL/ilprint.fs @@ -333,7 +333,7 @@ and goutput_permission _env os p = | ILSecurityAction.DemandChoice -> "demandchoice") match p with - | ILSecurityDecl(sa, b) -> + | ILSecurityDecl.ILSecurityDecl(sa, b) -> output_string os " .permissionset " output_security_action os sa output_string os " = (" diff --git a/src/Compiler/AbstractIL/ilread.fs b/src/Compiler/AbstractIL/ilread.fs index 7754fedad20..09fc311367a 100644 --- a/src/Compiler/AbstractIL/ilread.fs +++ b/src/Compiler/AbstractIL/ilread.fs @@ -3358,7 +3358,7 @@ and securityDeclsReader ctxtH tag = |> List.toArray) and seekReadSecurityDecl ctxt (act, ty) = - ILSecurityDecl( + ILSecurityDecl.ILSecurityDecl( (if List.memAssoc (int act) (Lazy.force ILSecurityActionRevMap) then List.assoc (int act) (Lazy.force ILSecurityActionRevMap) else diff --git a/src/Compiler/AbstractIL/ilwrite.fs b/src/Compiler/AbstractIL/ilwrite.fs index 7751a8d696b..13feeab294a 100644 --- a/src/Compiler/AbstractIL/ilwrite.fs +++ b/src/Compiler/AbstractIL/ilwrite.fs @@ -1506,7 +1506,7 @@ and GenCustomAttrsPass3Or4 cenv hca (attrs: ILAttributes) = // ILSecurityDecl --> DeclSecurity rows // -------------------------------------------------------------------- *) -let rec GetSecurityDeclRow cenv hds (ILSecurityDecl (action, s)) = +let rec GetSecurityDeclRow cenv hds (ILSecurityDecl.ILSecurityDecl (action, s)) = UnsharedRow [| UShort (uint16 (List.assoc action (Lazy.force ILSecurityActionMap))) HasDeclSecurity (fst hds, snd hds) diff --git a/src/Compiler/Checking/NameResolution.fs b/src/Compiler/Checking/NameResolution.fs index 36eedebfbe8..314dbe8cc9a 100644 --- a/src/Compiler/Checking/NameResolution.fs +++ b/src/Compiler/Checking/NameResolution.fs @@ -1990,7 +1990,7 @@ let ItemsAreEffectivelyEqual g orig other = | TType_var (tp1, _), TType_var (tp2, _) -> not tp1.IsCompilerGenerated && not tp1.IsFromError && not tp2.IsCompilerGenerated && not tp2.IsFromError && - equals tp1.Range tp2.Range + Range.equals tp1.Range tp2.Range | AbbrevOrAppTy(tcref1, _), AbbrevOrAppTy(tcref2, _) -> tyconRefDefnEq g tcref1 tcref2 | _ -> false) diff --git a/src/Compiler/Checking/SignatureConformance.fs b/src/Compiler/Checking/SignatureConformance.fs index 0f3d5ec13fe..c3a7f87e7bf 100644 --- a/src/Compiler/Checking/SignatureConformance.fs +++ b/src/Compiler/Checking/SignatureConformance.fs @@ -16,6 +16,7 @@ open FSharp.Compiler.InfoReader open FSharp.Compiler.Syntax open FSharp.Compiler.SyntaxTreeOps open FSharp.Compiler.Text +open FSharp.Compiler.TcGlobals open FSharp.Compiler.TypedTree open FSharp.Compiler.TypedTreeBasics open FSharp.Compiler.TypedTreeOps @@ -41,6 +42,124 @@ exception InterfaceNotRevealed of DisplayEnv * TType * range exception ArgumentsInSigAndImplMismatch of sigArg: Ident * implArg: Ident +type private V = WellKnownValAttributes +type private E = WellKnownEntityAttributes + +module private AttributeConformance = + + // Runtime-only attributes (DllImport, ReflectedDefinition, SkipLocalsInit, ...) deliberately not listed. + let private enforcedVals : V list = [ + V.NoDynamicInvocationAttribute_True ||| V.NoDynamicInvocationAttribute_False + V.RequiresExplicitTypeArgumentsAttribute + V.ConditionalAttribute + V.NoEagerConstraintApplicationAttribute + V.GeneralizableValueAttribute + V.WarnOnWithoutNullArgumentAttribute + V.CLIEventAttribute + V.ExtensionAttribute + V.ParamArrayAttribute + V.LiteralAttribute + ] + + let private enforcedEntities : E list = [ + E.RequireQualifiedAccessAttribute + // AutoOpen on .fs alone is a no-op for F# consumers (.fsi wins). + E.NoComparisonAttribute + E.NoEqualityAttribute + // StructuralEquality / StructuralComparison are documentary on .fsi; F# default already generates them. + E.CustomEqualityAttribute + E.CustomComparisonAttribute + E.ReferenceEqualityAttribute + E.AbstractClassAttribute + E.SealedAttribute_True ||| E.SealedAttribute_False + E.CLIMutableAttribute + E.AllowNullLiteralAttribute_True ||| E.AllowNullLiteralAttribute_False + E.DefaultAugmentationAttribute_True ||| E.DefaultAugmentationAttribute_False + E.ObsoleteAttribute + E.CompilerMessageAttribute + E.ExperimentalAttribute + E.UnverifiableAttribute + E.EditorBrowsableAttribute + E.AttributeUsageAttribute + E.IsByRefLikeAttribute + E.IsReadOnlyAttribute + E.ExtensionAttribute + E.MeasureAttribute + E.StructAttribute + E.ClassAttribute + E.InterfaceAttribute + ] + + let private enforcedValsMask : V = List.reduce Flags.union enforcedVals + let private enforcedEntitiesMask : E = List.reduce Flags.union enforcedEntities + + let inline private displayName< ^T when ^T : enum > (flag: ^T) : string = + let v = LanguagePrimitives.EnumToValue flag + let lsb : ^T = LanguagePrimitives.EnumOfValue (v &&& (0uL - v)) + let s = string lsb + let s = if s.EndsWith "_True" then s.Substring(0, s.Length - 5) + elif s.EndsWith "_False" then s.Substring(0, s.Length - 6) + else s + if s.EndsWith "Attribute" then s.Substring(0, s.Length - 9) else s + + // Squiggle the impl attribute, not the value/type identifier. + let inline private rangeOfMissing + (classify: Attrib -> 'F) + (attribs: Attrib list) + (bits: 'F) + (fallback: range) + : range = + match attribs |> List.tryFind (fun a -> classify a |> Flags.intersects bits) with + | Some a -> a.Range + | None -> fallback + + let inline private checkEnforced + (emit: exn -> unit) + (enforcedFlagsOn: 'Subject -> 'F) + (policy: 'F list) + (attribsOf: 'Subject -> Attrib list) + (classify: Attrib -> 'F) + (displayNameOf: 'Subject -> string) + (impl: 'Subject) (sig': 'Subject) (fallback: range) = + let presentOnImplAndRequiredFromSig = enforcedFlagsOn impl + if not (Flags.isEmpty presentOnImplAndRequiredFromSig) then + let actuallyPresentInSig = enforcedFlagsOn sig' + if not (presentOnImplAndRequiredFromSig |> Flags.isSubsetOf actuallyPresentInSig) then + let missing = presentOnImplAndRequiredFromSig |> Flags.except actuallyPresentInSig + let implAttribs = attribsOf impl + for flag in policy do + if flag |> Flags.intersects missing then + let m = rangeOfMissing classify implAttribs flag fallback + emit(Error (FSComp.SR.implAttributeMissingFromSignature(displayName flag, displayNameOf impl), m)) + + let private emitter (g: TcGlobals) : exn -> unit = + if g.langVersion.SupportsFeature LanguageFeature.ErrorOnMissingSignatureAttribute then + errorR + else + warning + + let checkVal (g: TcGlobals) (implVal: Val) (sigVal: Val) (fallback: range) = + let enforcedFlagsOnVal (v: Val) = + ValHasWellKnownAttribute g enforcedValsMask v |> ignore // forceload + v.ValAttribs.Flags |> Flags.intersect enforcedValsMask + checkEnforced (emitter g) enforcedFlagsOnVal enforcedVals + (fun (v: Val) -> v.Attribs) + (classifyValAttrib g) + (fun (v: Val) -> v.DisplayName) + implVal sigVal fallback + + let checkEntity (g: TcGlobals) (implEntity: Entity) (sigEntity: Entity) (fallback: range) = + // Opaque type in .fsi can't carry structural-equality / NoEquality. Modules pass: IsHiddenReprTycon=true but accept RQA. + if sigEntity.IsModuleOrNamespace || not sigEntity.IsHiddenReprTycon then + let enforcedFlagsOnEntity (e: Entity) = + EntityHasWellKnownAttribute g enforcedEntitiesMask e |> ignore // forceload + e.EntityAttribs.Flags |> Flags.intersect enforcedEntitiesMask + checkEnforced (emitter g) enforcedFlagsOnEntity enforcedEntities + (fun (e: Entity) -> e.Attribs) + (classifyEntityAttrib g) + (fun (e: Entity) -> e.DisplayName) + implEntity sigEntity fallback + exception DefinitionsInSigAndImplNotCompatibleAbbreviationsDiffer of denv: DisplayEnv * implTycon:Tycon * @@ -126,6 +245,12 @@ type Checker(g, amap, denv, remapInfo: SignatureRepackageInfo, checkingSig) = fixup (sigAttribs @ keptImplAttribs) true + let checkEnforcedEntityAttribs implEntity sigEntity m = + AttributeConformance.checkEntity g implEntity sigEntity m + + let checkEnforcedValAttribs implVal sigVal m = + AttributeConformance.checkVal g implVal sigVal m + let rec checkTypars m (aenv: TypeEquivEnv) (implTypars: Typars) (sigTypars: Typars) = if implTypars.Length <> sigTypars.Length then errorR (Error(FSComp.SR.typrelSigImplNotCompatibleParamCountsDiffer(), m)) @@ -185,6 +310,8 @@ type Checker(g, amap, denv, remapInfo: SignatureRepackageInfo, checkingSig) = // Propagate defn location information from implementation to signature . sigTycon.SetOtherRange (implTycon.Range, true) implTycon.SetOtherRange (sigTycon.Range, false) + + checkEnforcedEntityAttribs implTycon sigTycon m if implTycon.LogicalName <> sigTycon.LogicalName then errorR (Error (FSComp.SR.DefinitionsInSigAndImplNotCompatibleNamesDiffer(implTycon.TypeOrMeasureKind.ToString(), sigTycon.LogicalName, implTycon.LogicalName), m)) @@ -368,6 +495,8 @@ type Checker(g, amap, denv, remapInfo: SignatureRepackageInfo, checkingSig) = let mk_err kind denv f = ValueNotContained(kind,denv, infoReader, implModRef, implVal, sigVal, f) let err denv f = errorR(mk_err RegularMismatch denv f); false let m = implVal.Range + + checkEnforcedValAttribs implVal sigVal m if implVal.IsMutable <> sigVal.IsMutable then (err denv FSComp.SR.ValueNotContainedMutabilityAttributesDiffer) elif implVal.LogicalName <> sigVal.LogicalName then (err denv FSComp.SR.ValueNotContainedMutabilityNamesDiffer) elif (implVal.CompiledName g.CompilerGlobalState) <> (sigVal.CompiledName g.CompilerGlobalState) then (err denv FSComp.SR.ValueNotContainedMutabilityCompiledNamesDiffer) @@ -753,6 +882,7 @@ type Checker(g, amap, denv, remapInfo: SignatureRepackageInfo, checkingSig) = // Propagate defn location information from implementation to signature . sigModRef.SetOtherRange (implModRef.Range, true) implModRef.Deref.SetOtherRange (sigModRef.Range, false) + checkEnforcedEntityAttribs implModRef.Deref sigModRef implModRef.Range checkModuleOrNamespaceContents implModRef.Range aenv infoReader implModRef sigModRef.ModuleOrNamespaceType && checkAttribs aenv implModRef.Attribs sigModRef.Attribs implModRef.Deref.SetAttribs diff --git a/src/Compiler/CodeGen/EraseUnions.fs b/src/Compiler/CodeGen/EraseUnions.fs index 7a8f2bb9b2a..713759b40e2 100644 --- a/src/Compiler/CodeGen/EraseUnions.fs +++ b/src/Compiler/CodeGen/EraseUnions.fs @@ -694,9 +694,10 @@ let private rewriteNullableAttrForFlattenedField (g: TcGlobals) (existingAttrs: let replacementAttr = match existingAttrs[idx] with // Single byte: change non-nullable (1) to WithNull (2); leave nullable (2) and ambivalent (0) as-is - | Encoded(method, _data, [ ILAttribElem.Byte 1uy ]) -> mkILCustomAttribMethRef (method, [ ILAttribElem.Byte 2uy ], []) + | ILAttribute.Encoded(method, _data, [ ILAttribElem.Byte 1uy ]) -> + mkILCustomAttribMethRef (method, [ ILAttribElem.Byte 2uy ], []) // Array of bytes: change first element only (field itself); leave generic type arg nullability unchanged - | Encoded(method, _data, [ ILAttribElem.Array(elemType, ILAttribElem.Byte 1uy :: otherElems) ]) -> + | ILAttribute.Encoded(method, _data, [ ILAttribElem.Array(elemType, ILAttribElem.Byte 1uy :: otherElems) ]) -> mkILCustomAttribMethRef (method, [ ILAttribElem.Array(elemType, (ILAttribElem.Byte 2uy) :: otherElems) ], []) | attrAsBefore -> attrAsBefore diff --git a/src/Compiler/CodeGen/IlxGen.fs b/src/Compiler/CodeGen/IlxGen.fs index de0ff0c5c10..23d71d4bf06 100644 --- a/src/Compiler/CodeGen/IlxGen.fs +++ b/src/Compiler/CodeGen/IlxGen.fs @@ -3083,7 +3083,7 @@ and GenExprPreSteps (cenv: cenv) (cgbuf: CodeGenBuffer) eenv expr sequel = let others = [ for k in cenv.namedDebugPointsForInlinedCode.Keys do - if equals m k.Range then + if Range.equals m k.Range then yield k.Name ] |> String.concat "," @@ -3175,7 +3175,7 @@ and GenExprAux (cenv: cenv) (cgbuf: CodeGenBuffer) eenv expr (sequel: sequel) = | Expr.Match _ -> GenLinearExpr cenv cgbuf eenv expr sequel false id |> ignore | Expr.DebugPoint(DebugPointAtLeafExpr.Yes m, innerExpr) -> - if equals m range0 then + if Range.equals m range0 then cgbuf.EmitStartOfHiddenCode() else CG.EmitDebugPoint cgbuf m @@ -3740,7 +3740,7 @@ and GenLinearExpr cenv cgbuf eenv expr sequel preSteps (contf: FakeUnit -> FakeU Fake)) | Expr.DebugPoint(DebugPointAtLeafExpr.Yes m, innerExpr) -> - if equals m range0 then + if Range.equals m range0 then cgbuf.EmitStartOfHiddenCode() else CG.EmitDebugPoint cgbuf m diff --git a/src/Compiler/Driver/CompilerConfig.fs b/src/Compiler/Driver/CompilerConfig.fs index 0fbe48fb2eb..18b43b75ce5 100644 --- a/src/Compiler/Driver/CompilerConfig.fs +++ b/src/Compiler/Driver/CompilerConfig.fs @@ -1142,7 +1142,7 @@ type TcConfig private (data: TcConfigBuilder, validate: bool) = else // If the file doesn't exist, let reference resolution logic report the error later... defaultCoreLibraryReference, - if equals assemRef.Range rangeStartup then + if Range.equals assemRef.Range rangeStartup then Some fileName else None diff --git a/src/Compiler/Driver/CompilerDiagnostics.fs b/src/Compiler/Driver/CompilerDiagnostics.fs index 4ecbfc081ef..c340182d285 100644 --- a/src/Compiler/Driver/CompilerDiagnostics.fs +++ b/src/Compiler/Driver/CompilerDiagnostics.fs @@ -2100,7 +2100,7 @@ type FormattedDiagnostic = | Long of FSharpDiagnosticSeverity * FormattedDiagnosticDetailedInfo let FormatDiagnosticLocation (tcConfig: TcConfig) (m: Range) : FormattedDiagnosticLocation = - if equals m rangeStartup || equals m rangeCmdArgs then + if Range.equals m rangeStartup || Range.equals m rangeCmdArgs then { Range = m TextRepresentation = "" diff --git a/src/Compiler/FSComp.txt b/src/Compiler/FSComp.txt index f9765bdbd6e..dc27f32bae9 100644 --- a/src/Compiler/FSComp.txt +++ b/src/Compiler/FSComp.txt @@ -1818,4 +1818,6 @@ featurePreprocessorElif,"#elif preprocessor directive" 3885,parsLetBangCannotBeLastInCE,"'%s' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression." 3886,tcListLiteralWithSingleTupleElement,"This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements?" 3887,ilCustomAttrInvalidArrayElemType,"The type '%s' is not a valid custom attribute argument type. Custom attribute arrays must have elements of primitive types, enums, string, System.Type, or System.Object." +3888,implAttributeMissingFromSignature,"The attribute '%s' is present on '%s' in the implementation but not in the signature, which takes precedence for tooling and consumers. Add the attribute to the signature, to ensure the attribute is not ignored by the compiler." featureExceptionFieldSerializationSupport,"emit GetObjectData and field-restoring deserialization constructor for exception types" +featureErrorOnMissingSignatureAttribute,"error (rather than warning) when an enforced compiler-semantic attribute is present in the .fs but missing from the .fsi" diff --git a/src/Compiler/Facilities/DiagnosticsLogger.fs b/src/Compiler/Facilities/DiagnosticsLogger.fs index d5f87fb2e4e..2f2a1a70159 100644 --- a/src/Compiler/Facilities/DiagnosticsLogger.fs +++ b/src/Compiler/Facilities/DiagnosticsLogger.fs @@ -181,7 +181,7 @@ let inline protectAssemblyExplorationNoReraise dflt1 dflt2 ([] f // Attach a range if this is a range dual exception. let rec AttachRange m (exn: exn) = - if equals m range0 then + if Range.equals m range0 then exn else match exn with diff --git a/src/Compiler/Facilities/DiagnosticsLogger.fsi b/src/Compiler/Facilities/DiagnosticsLogger.fsi index 0f801b8b4d4..a6e787e8c8b 100644 --- a/src/Compiler/Facilities/DiagnosticsLogger.fsi +++ b/src/Compiler/Facilities/DiagnosticsLogger.fsi @@ -427,6 +427,7 @@ val inline MapReduce2D: ys: 'T2 list -> OperationResult<'c> +[] module OperationResult = val inline ignore: res: OperationResult<'T> -> OperationResult diff --git a/src/Compiler/Facilities/LanguageFeatures.fs b/src/Compiler/Facilities/LanguageFeatures.fs index c66a039d7df..da4ef690311 100644 --- a/src/Compiler/Facilities/LanguageFeatures.fs +++ b/src/Compiler/Facilities/LanguageFeatures.fs @@ -109,6 +109,7 @@ type LanguageFeature = | ImplicitDIMCoverage | PreprocessorElif | ExceptionFieldSerializationSupport + | ErrorOnMissingSignatureAttribute /// LanguageVersion management type LanguageVersion(versionText, ?disabledFeaturesArray: LanguageFeature array) = @@ -261,6 +262,7 @@ type LanguageVersion(versionText, ?disabledFeaturesArray: LanguageFeature array) LanguageFeature.FromEndSlicing, previewVersion // Unfinished features --- needs work LanguageFeature.MethodOverloadsCache, previewVersion // Performance optimization for overload resolution LanguageFeature.ImplicitDIMCoverage, languageVersion110 + LanguageFeature.ErrorOnMissingSignatureAttribute, previewVersion // Opt-in: turn FS3888 from warning into error ] static let defaultLanguageVersion = LanguageVersion("default") @@ -456,6 +458,7 @@ type LanguageVersion(versionText, ?disabledFeaturesArray: LanguageFeature array) | LanguageFeature.ImplicitDIMCoverage -> FSComp.SR.featureImplicitDIMCoverage () | LanguageFeature.PreprocessorElif -> FSComp.SR.featurePreprocessorElif () | LanguageFeature.ExceptionFieldSerializationSupport -> FSComp.SR.featureExceptionFieldSerializationSupport () + | LanguageFeature.ErrorOnMissingSignatureAttribute -> FSComp.SR.featureErrorOnMissingSignatureAttribute () /// Get a version string associated with the given feature. static member GetFeatureVersionString feature = diff --git a/src/Compiler/Facilities/LanguageFeatures.fsi b/src/Compiler/Facilities/LanguageFeatures.fsi index 4219ce43e35..5ba352191af 100644 --- a/src/Compiler/Facilities/LanguageFeatures.fsi +++ b/src/Compiler/Facilities/LanguageFeatures.fsi @@ -100,6 +100,7 @@ type LanguageFeature = | ImplicitDIMCoverage | PreprocessorElif | ExceptionFieldSerializationSupport + | ErrorOnMissingSignatureAttribute /// LanguageVersion management type LanguageVersion = diff --git a/src/Compiler/Service/ExternalSymbol.fsi b/src/Compiler/Service/ExternalSymbol.fsi index ee63d291084..e0846faece5 100644 --- a/src/Compiler/Service/ExternalSymbol.fsi +++ b/src/Compiler/Service/ExternalSymbol.fsi @@ -26,6 +26,7 @@ module internal FindDeclExternalType = val internal tryOfILType: string array -> ILType -> FindDeclExternalType option /// Represents the type of a single method parameter +[] [] type public FindDeclExternalParam = @@ -37,6 +38,7 @@ type public FindDeclExternalParam = override ToString: unit -> string +[] module internal FindDeclExternalParam = val internal tryOfILType: string array -> ILType -> FindDeclExternalParam option diff --git a/src/Compiler/Service/ServiceCompilerDiagnostics.fsi b/src/Compiler/Service/ServiceCompilerDiagnostics.fsi index f3536054c65..10836c5ef1b 100644 --- a/src/Compiler/Service/ServiceCompilerDiagnostics.fsi +++ b/src/Compiler/Service/ServiceCompilerDiagnostics.fsi @@ -10,6 +10,7 @@ type FSharpDiagnosticKind = | RemoveIndexerDot /// Exposes compiler diagnostic error messages. +[] module CompilerDiagnostics = /// Given a DiagnosticKind, returns the string representing the error message for that diagnostic. diff --git a/src/Compiler/Service/ServiceDeclarationLists.fs b/src/Compiler/Service/ServiceDeclarationLists.fs index 98312a69306..6adb17bea12 100644 --- a/src/Compiler/Service/ServiceDeclarationLists.fs +++ b/src/Compiler/Service/ServiceDeclarationLists.fs @@ -7,6 +7,7 @@ namespace FSharp.Compiler.EditorServices + open FSharp.Compiler.NicePrint open Internal.Utilities.Library open Internal.Utilities.Library.Extras diff --git a/src/Compiler/Service/ServiceDeclarationLists.fsi b/src/Compiler/Service/ServiceDeclarationLists.fsi index 3aeaa11112d..fbf74a4ab75 100644 --- a/src/Compiler/Service/ServiceDeclarationLists.fsi +++ b/src/Compiler/Service/ServiceDeclarationLists.fsi @@ -191,7 +191,7 @@ type public MethodGroupItemParameter = /// Represents one method (or other item) in a method group. The item may represent either a method or /// a single, non-overloaded item such as union case or a named function value. -[] +[] type public MethodGroupItem = /// The documentation for the item diff --git a/src/Compiler/Service/ServiceNavigation.fs b/src/Compiler/Service/ServiceNavigation.fs index 5c15f756133..a56b4d4eb6e 100755 --- a/src/Compiler/Service/ServiceNavigation.fs +++ b/src/Compiler/Service/ServiceNavigation.fs @@ -100,8 +100,8 @@ type NavigationItems(declarations: NavigationTopLevelDeclaration[]) = module NavigationImpl = let unionRangesChecked r1 r2 = - if equals r1 range0 then r2 - elif equals r2 range0 then r1 + if Range.equals r1 range0 then r2 + elif Range.equals r2 range0 then r1 else unionRanges r1 r2 let rangeOfDecls2 f decls = diff --git a/src/Compiler/Service/ServiceNavigation.fsi b/src/Compiler/Service/ServiceNavigation.fsi index 360855cce39..cfccd6ef20c 100755 --- a/src/Compiler/Service/ServiceNavigation.fsi +++ b/src/Compiler/Service/ServiceNavigation.fsi @@ -72,6 +72,7 @@ type public NavigationItems = member Declarations: NavigationTopLevelDeclaration[] // Functionality to access navigable F# items. +[] module public Navigation = val internal empty: NavigationItems val getNavigation: ParsedInput -> NavigationItems @@ -118,5 +119,6 @@ type NavigableItem = Kind: NavigableItemKind Container: NavigableContainer } +[] module public NavigateTo = val GetNavigableItems: ParsedInput -> NavigableItem[] diff --git a/src/Compiler/Symbols/SymbolPatterns.fs b/src/Compiler/Symbols/SymbolPatterns.fs index c29b4709244..527c628cf07 100644 --- a/src/Compiler/Symbols/SymbolPatterns.fs +++ b/src/Compiler/Symbols/SymbolPatterns.fs @@ -2,6 +2,7 @@ namespace FSharp.Compiler.Symbols + open FSharp.Compiler.Syntax /// Patterns over FSharpSymbol and derivatives. diff --git a/src/Compiler/Symbols/SymbolPatterns.fsi b/src/Compiler/Symbols/SymbolPatterns.fsi index b2635c57d4b..6fda47ae960 100644 --- a/src/Compiler/Symbols/SymbolPatterns.fsi +++ b/src/Compiler/Symbols/SymbolPatterns.fsi @@ -4,6 +4,7 @@ namespace FSharp.Compiler.Symbols /// Patterns over FSharpSymbol and derivatives. [] +[] module public FSharpSymbolPatterns = val (|AbbreviatedType|_|): FSharpEntity -> FSharpType option diff --git a/src/Compiler/SyntaxTree/ParseHelpers.fsi b/src/Compiler/SyntaxTree/ParseHelpers.fsi index bc0dc9f36fe..aae952d210c 100644 --- a/src/Compiler/SyntaxTree/ParseHelpers.fsi +++ b/src/Compiler/SyntaxTree/ParseHelpers.fsi @@ -47,6 +47,7 @@ type LexerIfdefStackEntries = (LexerIfdefStackEntry * range) list type LexerIfdefStack = LexerIfdefStackEntries +[] type LexerEndlineContinuation = | Token | IfdefSkip of int * range: range diff --git a/src/Compiler/SyntaxTree/PrettyNaming.fsi b/src/Compiler/SyntaxTree/PrettyNaming.fsi index 1156aa37f08..5ef8a02bc3d 100644 --- a/src/Compiler/SyntaxTree/PrettyNaming.fsi +++ b/src/Compiler/SyntaxTree/PrettyNaming.fsi @@ -272,6 +272,7 @@ val internal mkExceptionFieldName: (int -> string) /// The prefix of the names used for the fake namespace path added to all dynamic code entries in FSI.EXE val FsiDynamicModulePrefix: string +[] module internal CustomOperations = [] val Into: string = "into" diff --git a/src/Compiler/SyntaxTree/WarnScopes.fsi b/src/Compiler/SyntaxTree/WarnScopes.fsi index f6ae779da51..3e43b30c056 100644 --- a/src/Compiler/SyntaxTree/WarnScopes.fsi +++ b/src/Compiler/SyntaxTree/WarnScopes.fsi @@ -7,6 +7,7 @@ open FSharp.Compiler.SyntaxTrivia open FSharp.Compiler.Text open FSharp.Compiler.UnicodeLexing +[] module internal WarnScopes = /// To be called during lexing to save #nowarn / #warnon directives. diff --git a/src/Compiler/SyntaxTree/XmlDoc.fs b/src/Compiler/SyntaxTree/XmlDoc.fs index 3207b89905c..b3ef13d7a4c 100644 --- a/src/Compiler/SyntaxTree/XmlDoc.fs +++ b/src/Compiler/SyntaxTree/XmlDoc.fs @@ -15,7 +15,6 @@ open FSharp.Compiler.Text open FSharp.Compiler.Text.Range /// Represents collected XmlDoc lines -[] type XmlDoc(unprocessedLines: string[], range: range) = let rec processLines (lines: string list) = match lines with diff --git a/src/Compiler/TypedTree/TypedTreeOps.FreeVars.fsi b/src/Compiler/TypedTree/TypedTreeOps.FreeVars.fsi index 1787715a6e3..5024964297e 100644 --- a/src/Compiler/TypedTree/TypedTreeOps.FreeVars.fsi +++ b/src/Compiler/TypedTree/TypedTreeOps.FreeVars.fsi @@ -255,6 +255,7 @@ module internal MemberRepresentation = /// for example, `seq` instead of `int list seq` | TopLevelPrefix of nested: GenericParameterStyle + [] type DisplayEnv = { includeStaticParametersInTypeNames: bool diff --git a/src/Compiler/TypedTree/TypedTreeOps.Transforms.fsi b/src/Compiler/TypedTree/TypedTreeOps.Transforms.fsi index c25d155d2cc..109cb403c38 100644 --- a/src/Compiler/TypedTree/TypedTreeOps.Transforms.fsi +++ b/src/Compiler/TypedTree/TypedTreeOps.Transforms.fsi @@ -148,6 +148,7 @@ module internal TypeTestsAndPatterns = [] module internal Rewriting = + [] type ExprRewritingEnv = { PreIntercept: ((Expr -> Expr) -> Expr -> Expr option) option PostTransform: Expr -> Expr option diff --git a/src/Compiler/TypedTree/WellKnownAttribs.fs b/src/Compiler/TypedTree/WellKnownAttribs.fs index c05f0207551..fac3508a56e 100644 --- a/src/Compiler/TypedTree/WellKnownAttribs.fs +++ b/src/Compiler/TypedTree/WellKnownAttribs.fs @@ -118,6 +118,19 @@ type internal WellKnownValAttributes = | TailCallAttribute = (1uL <<< 40) | NotComputed = (1uL <<< 63) +module internal Flags = + let inline private bits (f: ^F when ^F: enum) = LanguagePrimitives.EnumToValue f + let inline private ofBits<'F when 'F: enum> (v: uint64) : 'F = LanguagePrimitives.EnumOfValue v + + let inline isEmpty (flags: 'F when 'F: enum) = bits flags = 0uL + let inline union (a: 'F when 'F: enum) (b: 'F) : 'F = ofBits<'F> (bits a ||| bits b) + let inline intersect (other: 'F when 'F: enum) (flags: 'F) : 'F = ofBits<'F> (bits flags &&& bits other) + let inline except (b: 'F when 'F: enum) (a: 'F) : 'F = ofBits<'F> (bits a &&& ~~~(bits b)) + let inline intersects (other: 'F when 'F: enum) (flags: 'F) = bits flags &&& bits other <> 0uL + + let inline isSubsetOf (superset: 'F when 'F: enum) (subset: 'F) = + bits subset &&& ~~~(bits superset) = 0uL + /// Generic wrapper for an item list together with cached well-known attribute flags. /// Used for O(1) lookup of well-known attributes on entities and vals. [] diff --git a/src/Compiler/TypedTree/WellKnownAttribs.fsi b/src/Compiler/TypedTree/WellKnownAttribs.fsi index 146ce3736a2..da7a7b67f33 100644 --- a/src/Compiler/TypedTree/WellKnownAttribs.fsi +++ b/src/Compiler/TypedTree/WellKnownAttribs.fsi @@ -116,6 +116,19 @@ type internal WellKnownValAttributes = | TailCallAttribute = (1uL <<< 40) | NotComputed = (1uL <<< 63) +module internal Flags = + val inline isEmpty<'F when 'F: enum> : flags: 'F -> bool + + val inline union<'F when 'F: enum> : a: 'F -> b: 'F -> 'F + + val inline intersect<'F when 'F: enum> : other: 'F -> flags: 'F -> 'F + + val inline except<'F when 'F: enum> : b: 'F -> a: 'F -> 'F + + val inline intersects<'F when 'F: enum> : other: 'F -> flags: 'F -> bool + + val inline isSubsetOf<'F when 'F: enum> : superset: 'F -> subset: 'F -> bool + /// Generic wrapper for an item list together with cached well-known attribute flags. /// Used for O(1) lookup of well-known attributes on entities and vals. [] diff --git a/src/Compiler/Utilities/FileSystem.fs b/src/Compiler/Utilities/FileSystem.fs index 5ff6b6e180e..0265454f117 100644 --- a/src/Compiler/Utilities/FileSystem.fs +++ b/src/Compiler/Utilities/FileSystem.fs @@ -46,7 +46,6 @@ module internal Bytes = let stringAsUnicodeNullTerminated (s: string) = Array.append (Encoding.Unicode.GetBytes s) (ofInt32Array [| 0x0; 0x0 |]) -[] [] type ByteMemory() = abstract Item: int -> byte with get, set @@ -446,14 +445,12 @@ module internal FileSystemUtils = let isDll fileName = checkSuffix fileName ".dll" -[] type IAssemblyLoader = abstract AssemblyLoadFrom: fileName: string -> Assembly abstract AssemblyLoad: assemblyName: AssemblyName -> Assembly -[] type DefaultAssemblyLoader() = interface IAssemblyLoader with @@ -462,7 +459,6 @@ type DefaultAssemblyLoader() = member _.AssemblyLoad(assemblyName: AssemblyName) = Assembly.Load assemblyName -[] type IFileSystem = // note: do not add members if you can put generic implementation under StreamExtensions below. @@ -512,7 +508,6 @@ type IFileSystem = // note: do not add members if you can put generic implementation under StreamExtensions below. -[] type DefaultFileSystem() as this = abstract AssemblyLoader: IAssemblyLoader default _.AssemblyLoader = DefaultAssemblyLoader() :> IAssemblyLoader diff --git a/src/Compiler/Utilities/FileSystem.fsi b/src/Compiler/Utilities/FileSystem.fsi index a41460e49c2..d17b43ff17d 100644 --- a/src/Compiler/Utilities/FileSystem.fsi +++ b/src/Compiler/Utilities/FileSystem.fsi @@ -101,6 +101,7 @@ module internal MemoryMappedFileExtensions = static member TryFromMemory: bytes: ReadOnlyMemory -> MemoryMappedFile option /// Filesystem helpers +[] module internal FileSystemUtils = val checkPathForIllegalChars: (string -> unit) diff --git a/src/Compiler/Utilities/sformat.fsi b/src/Compiler/Utilities/sformat.fsi index 64f8d917a13..224452b7ee4 100644 --- a/src/Compiler/Utilities/sformat.fsi +++ b/src/Compiler/Utilities/sformat.fsi @@ -215,6 +215,7 @@ module internal TaggedText = val internal keywordReturn: TaggedText val internal punctuationUnit: TaggedText +[] type internal IEnvironment = /// Return to the layout-generation /// environment to layout any otherwise uninterpreted object diff --git a/src/Compiler/xlf/FSComp.txt.cs.xlf b/src/Compiler/xlf/FSComp.txt.cs.xlf index 10fe84e6ab1..84e5e3cc50c 100644 --- a/src/Compiler/xlf/FSComp.txt.cs.xlf +++ b/src/Compiler/xlf/FSComp.txt.cs.xlf @@ -402,6 +402,11 @@ Error when invalid declarations are used in type definitions. + + error (rather than warning) when an enforced compiler-semantic attribute is present in the .fs but missing from the .fsi + error (rather than warning) when an enforced compiler-semantic attribute is present in the .fs but missing from the .fsi + + Error reporting on static classes Vytváření sestav chyb u statických tříd @@ -802,6 +807,11 @@ Konstruktor obnovitelného kódu {0} se dá použít jenom ve vloženém kódu chráněném příkazem if __useResumableCode then ... a celkové složení musí tvořit platný obnovitelný kód. + + The attribute '{0}' is present on '{1}' in the implementation but not in the signature, which takes precedence for tooling and consumers. Add the attribute to the signature, to ensure the attribute is not ignored by the compiler. + The attribute '{0}' is present on '{1}' in the implementation but not in the signature, which takes precedence for tooling and consumers. Add the attribute to the signature, to ensure the attribute is not ignored by the compiler. + + The 'InlineIfLambda' attribute is present in the signature but not the implementation. Atribut InlineIfLambda se nachází v signatuře, ale ne v implementaci. @@ -8972,21 +8982,21 @@ This expression is a function value. When used in an interpolated string it will be formatted using its 'ToString' method, which is likely not the intended behavior. Consider applying the function to its arguments. - - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - - - - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - - - - emit GetObjectData and field-restoring deserialization constructor for exception types - emit GetObjectData and field-restoring deserialization constructor for exception types - - + + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + + + + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + + + + emit GetObjectData and field-restoring deserialization constructor for exception types + emit GetObjectData and field-restoring deserialization constructor for exception types + + \ No newline at end of file diff --git a/src/Compiler/xlf/FSComp.txt.de.xlf b/src/Compiler/xlf/FSComp.txt.de.xlf index 17f93260936..d6edecb4def 100644 --- a/src/Compiler/xlf/FSComp.txt.de.xlf +++ b/src/Compiler/xlf/FSComp.txt.de.xlf @@ -402,6 +402,11 @@ Error when invalid declarations are used in type definitions. + + error (rather than warning) when an enforced compiler-semantic attribute is present in the .fs but missing from the .fsi + error (rather than warning) when an enforced compiler-semantic attribute is present in the .fs but missing from the .fsi + + Error reporting on static classes Fehlerberichterstattung für statische Klassen @@ -802,6 +807,11 @@ Das fortsetzbare Codekonstrukt "{0}" darf nur in Inlinecode verwendet werden, der durch "if __useResumableCode then..." geschützt wird. Die Gesamtkomposition muss einen gültigen fortsetzbaren Code bilden. + + The attribute '{0}' is present on '{1}' in the implementation but not in the signature, which takes precedence for tooling and consumers. Add the attribute to the signature, to ensure the attribute is not ignored by the compiler. + The attribute '{0}' is present on '{1}' in the implementation but not in the signature, which takes precedence for tooling and consumers. Add the attribute to the signature, to ensure the attribute is not ignored by the compiler. + + The 'InlineIfLambda' attribute is present in the signature but not the implementation. Das Attribut "InlineIfLambda" ist in der Signatur vorhanden, jedoch nicht in der Implementierung. @@ -8972,21 +8982,21 @@ This expression is a function value. When used in an interpolated string it will be formatted using its 'ToString' method, which is likely not the intended behavior. Consider applying the function to its arguments. - - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - - - - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - - - - emit GetObjectData and field-restoring deserialization constructor for exception types - emit GetObjectData and field-restoring deserialization constructor for exception types - - + + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + + + + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + + + + emit GetObjectData and field-restoring deserialization constructor for exception types + emit GetObjectData and field-restoring deserialization constructor for exception types + + \ No newline at end of file diff --git a/src/Compiler/xlf/FSComp.txt.es.xlf b/src/Compiler/xlf/FSComp.txt.es.xlf index ecc7e4a3f27..46573e801f1 100644 --- a/src/Compiler/xlf/FSComp.txt.es.xlf +++ b/src/Compiler/xlf/FSComp.txt.es.xlf @@ -402,6 +402,11 @@ Error when invalid declarations are used in type definitions. + + error (rather than warning) when an enforced compiler-semantic attribute is present in the .fs but missing from the .fsi + error (rather than warning) when an enforced compiler-semantic attribute is present in the .fs but missing from the .fsi + + Error reporting on static classes Informe de errores en clases estáticas @@ -802,6 +807,11 @@ La construcción de código reanudable "{0}" solo se puede usar en el código insertado protegido por "if __useResumableCode then ..." y la composición general debe formar un código reanudable válido. + + The attribute '{0}' is present on '{1}' in the implementation but not in the signature, which takes precedence for tooling and consumers. Add the attribute to the signature, to ensure the attribute is not ignored by the compiler. + The attribute '{0}' is present on '{1}' in the implementation but not in the signature, which takes precedence for tooling and consumers. Add the attribute to the signature, to ensure the attribute is not ignored by the compiler. + + The 'InlineIfLambda' attribute is present in the signature but not the implementation. El atributo "InlineIfLambda" está presente en la firma, pero no en la implementación. @@ -8972,21 +8982,21 @@ This expression is a function value. When used in an interpolated string it will be formatted using its 'ToString' method, which is likely not the intended behavior. Consider applying the function to its arguments. - - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - - - - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - - - - emit GetObjectData and field-restoring deserialization constructor for exception types - emit GetObjectData and field-restoring deserialization constructor for exception types - - + + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + + + + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + + + + emit GetObjectData and field-restoring deserialization constructor for exception types + emit GetObjectData and field-restoring deserialization constructor for exception types + + \ No newline at end of file diff --git a/src/Compiler/xlf/FSComp.txt.fr.xlf b/src/Compiler/xlf/FSComp.txt.fr.xlf index 3e0ab156a68..1acfc469b5b 100644 --- a/src/Compiler/xlf/FSComp.txt.fr.xlf +++ b/src/Compiler/xlf/FSComp.txt.fr.xlf @@ -402,6 +402,11 @@ Error when invalid declarations are used in type definitions. + + error (rather than warning) when an enforced compiler-semantic attribute is present in the .fs but missing from the .fsi + error (rather than warning) when an enforced compiler-semantic attribute is present in the .fs but missing from the .fsi + + Error reporting on static classes Rapport d’erreurs sur les classes statiques @@ -802,6 +807,11 @@ La construction de code pouvant être repris «{0}» ne peut être utilisée que dans du code inlined protégé par «if __useResumableCode then ...» et la composition globale doit former un code pouvant être repris valide. + + The attribute '{0}' is present on '{1}' in the implementation but not in the signature, which takes precedence for tooling and consumers. Add the attribute to the signature, to ensure the attribute is not ignored by the compiler. + The attribute '{0}' is present on '{1}' in the implementation but not in the signature, which takes precedence for tooling and consumers. Add the attribute to the signature, to ensure the attribute is not ignored by the compiler. + + The 'InlineIfLambda' attribute is present in the signature but not the implementation. L’attribut « InlineIfLambda » est présent dans la signature, mais pas dans l’implémentation. @@ -8972,21 +8982,21 @@ This expression is a function value. When used in an interpolated string it will be formatted using its 'ToString' method, which is likely not the intended behavior. Consider applying the function to its arguments. - - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - - - - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - - - - emit GetObjectData and field-restoring deserialization constructor for exception types - emit GetObjectData and field-restoring deserialization constructor for exception types - - + + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + + + + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + + + + emit GetObjectData and field-restoring deserialization constructor for exception types + emit GetObjectData and field-restoring deserialization constructor for exception types + + \ No newline at end of file diff --git a/src/Compiler/xlf/FSComp.txt.it.xlf b/src/Compiler/xlf/FSComp.txt.it.xlf index 424a8e0310b..deaca46fad0 100644 --- a/src/Compiler/xlf/FSComp.txt.it.xlf +++ b/src/Compiler/xlf/FSComp.txt.it.xlf @@ -402,6 +402,11 @@ Error when invalid declarations are used in type definitions. + + error (rather than warning) when an enforced compiler-semantic attribute is present in the .fs but missing from the .fsi + error (rather than warning) when an enforced compiler-semantic attribute is present in the .fs but missing from the .fsi + + Error reporting on static classes Segnalazione errori nelle classi statiche @@ -802,6 +807,11 @@ Il costrutto di codice ripristinabile '{0}' può essere usato solo nel codice impostato come inline e protetto da 'if __useResumableCode then...' e l'intera composizione deve formare codice ripristinabile valido. + + The attribute '{0}' is present on '{1}' in the implementation but not in the signature, which takes precedence for tooling and consumers. Add the attribute to the signature, to ensure the attribute is not ignored by the compiler. + The attribute '{0}' is present on '{1}' in the implementation but not in the signature, which takes precedence for tooling and consumers. Add the attribute to the signature, to ensure the attribute is not ignored by the compiler. + + The 'InlineIfLambda' attribute is present in the signature but not the implementation. L'attributo 'InlineIfLambda' è presente nella firma, ma non nell'implementazione. @@ -8972,21 +8982,21 @@ This expression is a function value. When used in an interpolated string it will be formatted using its 'ToString' method, which is likely not the intended behavior. Consider applying the function to its arguments. - - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - - - - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - - - - emit GetObjectData and field-restoring deserialization constructor for exception types - emit GetObjectData and field-restoring deserialization constructor for exception types - - + + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + + + + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + + + + emit GetObjectData and field-restoring deserialization constructor for exception types + emit GetObjectData and field-restoring deserialization constructor for exception types + + \ No newline at end of file diff --git a/src/Compiler/xlf/FSComp.txt.ja.xlf b/src/Compiler/xlf/FSComp.txt.ja.xlf index d588b1908d7..10029fab134 100644 --- a/src/Compiler/xlf/FSComp.txt.ja.xlf +++ b/src/Compiler/xlf/FSComp.txt.ja.xlf @@ -402,6 +402,11 @@ Error when invalid declarations are used in type definitions. + + error (rather than warning) when an enforced compiler-semantic attribute is present in the .fs but missing from the .fsi + error (rather than warning) when an enforced compiler-semantic attribute is present in the .fs but missing from the .fsi + + Error reporting on static classes 静的クラスに関するエラー報告 @@ -802,6 +807,11 @@ 再開可能なコード コンストラクト '{0}' は、 'if __useResumableCode then ...' によって保護されているインライン コードでのみ使用でき、コンポジション全体は有効な再開可能コードを形成する必要があります。 + + The attribute '{0}' is present on '{1}' in the implementation but not in the signature, which takes precedence for tooling and consumers. Add the attribute to the signature, to ensure the attribute is not ignored by the compiler. + The attribute '{0}' is present on '{1}' in the implementation but not in the signature, which takes precedence for tooling and consumers. Add the attribute to the signature, to ensure the attribute is not ignored by the compiler. + + The 'InlineIfLambda' attribute is present in the signature but not the implementation. 'InlineIfLambda' 属性はシグネチャに存在しますが、実装はありません。 @@ -8972,21 +8982,21 @@ This expression is a function value. When used in an interpolated string it will be formatted using its 'ToString' method, which is likely not the intended behavior. Consider applying the function to its arguments. - - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - - - - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - - - - emit GetObjectData and field-restoring deserialization constructor for exception types - emit GetObjectData and field-restoring deserialization constructor for exception types - - + + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + + + + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + + + + emit GetObjectData and field-restoring deserialization constructor for exception types + emit GetObjectData and field-restoring deserialization constructor for exception types + + \ No newline at end of file diff --git a/src/Compiler/xlf/FSComp.txt.ko.xlf b/src/Compiler/xlf/FSComp.txt.ko.xlf index ec0d939e7b2..1d7a19af957 100644 --- a/src/Compiler/xlf/FSComp.txt.ko.xlf +++ b/src/Compiler/xlf/FSComp.txt.ko.xlf @@ -402,6 +402,11 @@ Error when invalid declarations are used in type definitions. + + error (rather than warning) when an enforced compiler-semantic attribute is present in the .fs but missing from the .fsi + error (rather than warning) when an enforced compiler-semantic attribute is present in the .fs but missing from the .fsi + + Error reporting on static classes 정적 클래스에 대한 오류 보고 @@ -802,6 +807,11 @@ 다시 시작 가능한 코드 구문 '{0}'은 'if __useResumableCode then ...'로 보호되는 인라인 코드에서만 사용할 수 있습니다. 전반적인 구성은 유효한 다시 시작 가능한 코드를 형성해야 합니다. + + The attribute '{0}' is present on '{1}' in the implementation but not in the signature, which takes precedence for tooling and consumers. Add the attribute to the signature, to ensure the attribute is not ignored by the compiler. + The attribute '{0}' is present on '{1}' in the implementation but not in the signature, which takes precedence for tooling and consumers. Add the attribute to the signature, to ensure the attribute is not ignored by the compiler. + + The 'InlineIfLambda' attribute is present in the signature but not the implementation. 'InlineIfLambda' 특성이 서명에 있지만 구현에는 없습니다. @@ -8972,21 +8982,21 @@ This expression is a function value. When used in an interpolated string it will be formatted using its 'ToString' method, which is likely not the intended behavior. Consider applying the function to its arguments. - - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - - - - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - - - - emit GetObjectData and field-restoring deserialization constructor for exception types - emit GetObjectData and field-restoring deserialization constructor for exception types - - + + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + + + + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + + + + emit GetObjectData and field-restoring deserialization constructor for exception types + emit GetObjectData and field-restoring deserialization constructor for exception types + + \ No newline at end of file diff --git a/src/Compiler/xlf/FSComp.txt.pl.xlf b/src/Compiler/xlf/FSComp.txt.pl.xlf index ae93051caa0..170e6e37718 100644 --- a/src/Compiler/xlf/FSComp.txt.pl.xlf +++ b/src/Compiler/xlf/FSComp.txt.pl.xlf @@ -402,6 +402,11 @@ Error when invalid declarations are used in type definitions. + + error (rather than warning) when an enforced compiler-semantic attribute is present in the .fs but missing from the .fsi + error (rather than warning) when an enforced compiler-semantic attribute is present in the .fs but missing from the .fsi + + Error reporting on static classes Raportowanie błędów dla klas statycznych @@ -802,6 +807,11 @@ Konstrukcja kodu z możliwością wznowienia "{0}" może być używana tylko w nieliniowym kodzie chronionym przez "If __useResumableCode then..." i ogólna kompozycja musi być w formacie prawidłowego kodu z możliwością wznowienia. + + The attribute '{0}' is present on '{1}' in the implementation but not in the signature, which takes precedence for tooling and consumers. Add the attribute to the signature, to ensure the attribute is not ignored by the compiler. + The attribute '{0}' is present on '{1}' in the implementation but not in the signature, which takes precedence for tooling and consumers. Add the attribute to the signature, to ensure the attribute is not ignored by the compiler. + + The 'InlineIfLambda' attribute is present in the signature but not the implementation. Atrybut "InlineIfLambda" jest obecny w sygnaturze, ale nie w implementacji. @@ -8972,21 +8982,21 @@ This expression is a function value. When used in an interpolated string it will be formatted using its 'ToString' method, which is likely not the intended behavior. Consider applying the function to its arguments. - - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - - - - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - - - - emit GetObjectData and field-restoring deserialization constructor for exception types - emit GetObjectData and field-restoring deserialization constructor for exception types - - + + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + + + + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + + + + emit GetObjectData and field-restoring deserialization constructor for exception types + emit GetObjectData and field-restoring deserialization constructor for exception types + + \ No newline at end of file diff --git a/src/Compiler/xlf/FSComp.txt.pt-BR.xlf b/src/Compiler/xlf/FSComp.txt.pt-BR.xlf index 0e0c2367513..87ef255a7e8 100644 --- a/src/Compiler/xlf/FSComp.txt.pt-BR.xlf +++ b/src/Compiler/xlf/FSComp.txt.pt-BR.xlf @@ -402,6 +402,11 @@ Error when invalid declarations are used in type definitions. + + error (rather than warning) when an enforced compiler-semantic attribute is present in the .fs but missing from the .fsi + error (rather than warning) when an enforced compiler-semantic attribute is present in the .fs but missing from the .fsi + + Error reporting on static classes Relatório de erros em classes estáticas @@ -802,6 +807,11 @@ A construção de código retomável '{0}' só pode ser usada em código delimitado protegido por 'se __useResumableCode então ...' e a composição geral deve formar um código retomável válido. + + The attribute '{0}' is present on '{1}' in the implementation but not in the signature, which takes precedence for tooling and consumers. Add the attribute to the signature, to ensure the attribute is not ignored by the compiler. + The attribute '{0}' is present on '{1}' in the implementation but not in the signature, which takes precedence for tooling and consumers. Add the attribute to the signature, to ensure the attribute is not ignored by the compiler. + + The 'InlineIfLambda' attribute is present in the signature but not the implementation. O atributo 'InlineIfLambda' está presente na assinatura, mas não na implementação. @@ -8972,21 +8982,21 @@ This expression is a function value. When used in an interpolated string it will be formatted using its 'ToString' method, which is likely not the intended behavior. Consider applying the function to its arguments. - - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - - - - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - - - - emit GetObjectData and field-restoring deserialization constructor for exception types - emit GetObjectData and field-restoring deserialization constructor for exception types - - + + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + + + + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + + + + emit GetObjectData and field-restoring deserialization constructor for exception types + emit GetObjectData and field-restoring deserialization constructor for exception types + + \ No newline at end of file diff --git a/src/Compiler/xlf/FSComp.txt.ru.xlf b/src/Compiler/xlf/FSComp.txt.ru.xlf index e25503d865e..57f29e98517 100644 --- a/src/Compiler/xlf/FSComp.txt.ru.xlf +++ b/src/Compiler/xlf/FSComp.txt.ru.xlf @@ -402,6 +402,11 @@ Error when invalid declarations are used in type definitions. + + error (rather than warning) when an enforced compiler-semantic attribute is present in the .fs but missing from the .fsi + error (rather than warning) when an enforced compiler-semantic attribute is present in the .fs but missing from the .fsi + + Error reporting on static classes Отчеты об ошибках для статических классов @@ -802,6 +807,11 @@ Конструкцию возобновляемого кода "{0}" можно использовать только во встроенном коде, защищенном с помощью "if __useResumableCode then ...", а общая композиция должна представлять собой допустимый возобновляемый код. + + The attribute '{0}' is present on '{1}' in the implementation but not in the signature, which takes precedence for tooling and consumers. Add the attribute to the signature, to ensure the attribute is not ignored by the compiler. + The attribute '{0}' is present on '{1}' in the implementation but not in the signature, which takes precedence for tooling and consumers. Add the attribute to the signature, to ensure the attribute is not ignored by the compiler. + + The 'InlineIfLambda' attribute is present in the signature but not the implementation. Атрибут "InlineIfLambda" присутствует в сигнатуре, но отсутствует в реализации. @@ -8972,21 +8982,21 @@ This expression is a function value. When used in an interpolated string it will be formatted using its 'ToString' method, which is likely not the intended behavior. Consider applying the function to its arguments. - - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - - - - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - - - - emit GetObjectData and field-restoring deserialization constructor for exception types - emit GetObjectData and field-restoring deserialization constructor for exception types - - + + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + + + + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + + + + emit GetObjectData and field-restoring deserialization constructor for exception types + emit GetObjectData and field-restoring deserialization constructor for exception types + + \ No newline at end of file diff --git a/src/Compiler/xlf/FSComp.txt.tr.xlf b/src/Compiler/xlf/FSComp.txt.tr.xlf index a296c02e44c..08753e47a27 100644 --- a/src/Compiler/xlf/FSComp.txt.tr.xlf +++ b/src/Compiler/xlf/FSComp.txt.tr.xlf @@ -402,6 +402,11 @@ Error when invalid declarations are used in type definitions. + + error (rather than warning) when an enforced compiler-semantic attribute is present in the .fs but missing from the .fsi + error (rather than warning) when an enforced compiler-semantic attribute is present in the .fs but missing from the .fsi + + Error reporting on static classes Statik sınıflarda hata bildirimi @@ -802,6 +807,11 @@ Sürdürülebilir kod yapısı '{0}' yalnızca 'if__useResumableCode then ...' tarafından korunan satır içine alınmış kodda kullanılabilir ve genel birleştirme geçerli sürdürülebilir kod biçiminde olmalıdır. + + The attribute '{0}' is present on '{1}' in the implementation but not in the signature, which takes precedence for tooling and consumers. Add the attribute to the signature, to ensure the attribute is not ignored by the compiler. + The attribute '{0}' is present on '{1}' in the implementation but not in the signature, which takes precedence for tooling and consumers. Add the attribute to the signature, to ensure the attribute is not ignored by the compiler. + + The 'InlineIfLambda' attribute is present in the signature but not the implementation. 'InlineIfLambda' özniteliği imzada var ama uygulamada yok. @@ -8972,21 +8982,21 @@ This expression is a function value. When used in an interpolated string it will be formatted using its 'ToString' method, which is likely not the intended behavior. Consider applying the function to its arguments. - - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - - - - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - - - - emit GetObjectData and field-restoring deserialization constructor for exception types - emit GetObjectData and field-restoring deserialization constructor for exception types - - + + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + + + + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + + + + emit GetObjectData and field-restoring deserialization constructor for exception types + emit GetObjectData and field-restoring deserialization constructor for exception types + + \ No newline at end of file diff --git a/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf b/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf index aa66fa326f6..e117ab0ec5d 100644 --- a/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf +++ b/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf @@ -402,6 +402,11 @@ Error when invalid declarations are used in type definitions. + + error (rather than warning) when an enforced compiler-semantic attribute is present in the .fs but missing from the .fsi + error (rather than warning) when an enforced compiler-semantic attribute is present in the .fs but missing from the .fsi + + Error reporting on static classes 有关静态类的错误报告 @@ -802,6 +807,11 @@ 可恢复的代码构造 "{0}" 只能用于受 "if __useResumableCode then..." 保护的内联代码,且整体组合必须构成有效的可恢复代码。 + + The attribute '{0}' is present on '{1}' in the implementation but not in the signature, which takes precedence for tooling and consumers. Add the attribute to the signature, to ensure the attribute is not ignored by the compiler. + The attribute '{0}' is present on '{1}' in the implementation but not in the signature, which takes precedence for tooling and consumers. Add the attribute to the signature, to ensure the attribute is not ignored by the compiler. + + The 'InlineIfLambda' attribute is present in the signature but not the implementation. "InlineIfLambda" 属性存在于签名中,但实现中不存在。 @@ -8972,21 +8982,21 @@ This expression is a function value. When used in an interpolated string it will be formatted using its 'ToString' method, which is likely not the intended behavior. Consider applying the function to its arguments. - - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - - - - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - - - - emit GetObjectData and field-restoring deserialization constructor for exception types - emit GetObjectData and field-restoring deserialization constructor for exception types - - + + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + + + + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + + + + emit GetObjectData and field-restoring deserialization constructor for exception types + emit GetObjectData and field-restoring deserialization constructor for exception types + + \ No newline at end of file diff --git a/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf b/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf index d8517bff3ff..31c5596a098 100644 --- a/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf +++ b/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf @@ -402,6 +402,11 @@ Error when invalid declarations are used in type definitions. + + error (rather than warning) when an enforced compiler-semantic attribute is present in the .fs but missing from the .fsi + error (rather than warning) when an enforced compiler-semantic attribute is present in the .fs but missing from the .fsi + + Error reporting on static classes 報告靜態類別時發生錯誤 @@ -802,6 +807,11 @@ 可繼續的程式碼構造 '{0}' 只能用於 'if __useResumableCode then ...' 所保護的內嵌程式碼中,且整體組合必須形成有效的可繼續程式碼。 + + The attribute '{0}' is present on '{1}' in the implementation but not in the signature, which takes precedence for tooling and consumers. Add the attribute to the signature, to ensure the attribute is not ignored by the compiler. + The attribute '{0}' is present on '{1}' in the implementation but not in the signature, which takes precedence for tooling and consumers. Add the attribute to the signature, to ensure the attribute is not ignored by the compiler. + + The 'InlineIfLambda' attribute is present in the signature but not the implementation. 'InlineIfLambda' 屬性存在於簽章中,但不存在於實作中。 @@ -8972,21 +8982,21 @@ This expression is a function value. When used in an interpolated string it will be formatted using its 'ToString' method, which is likely not the intended behavior. Consider applying the function to its arguments. - - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. - - - - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? - - - - emit GetObjectData and field-restoring deserialization constructor for exception types - emit GetObjectData and field-restoring deserialization constructor for exception types - - + + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + '{0}' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression. + + + + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements? + + + + emit GetObjectData and field-restoring deserialization constructor for exception types + emit GetObjectData and field-restoring deserialization constructor for exception types + + \ No newline at end of file diff --git a/src/FSharp.Core/Query.fsi b/src/FSharp.Core/Query.fsi index c0774328cd6..9faefac1e95 100644 --- a/src/FSharp.Core/Query.fsi +++ b/src/FSharp.Core/Query.fsi @@ -428,6 +428,7 @@ namespace Microsoft.FSharp.Linq.QueryRunExtensions /// /// Contains modules used to support the F# query syntax. /// + [] module LowPriority = type Microsoft.FSharp.Linq.QueryBuilder with /// @@ -439,6 +440,7 @@ namespace Microsoft.FSharp.Linq.QueryRunExtensions /// /// A module used to support the F# query syntax. /// + [] module HighPriority = type Microsoft.FSharp.Linq.QueryBuilder with /// diff --git a/src/FSharp.Core/async.fsi b/src/FSharp.Core/async.fsi index b2fe66ddd13..2e99fea7c65 100644 --- a/src/FSharp.Core/async.fsi +++ b/src/FSharp.Core/async.fsi @@ -1077,6 +1077,7 @@ namespace Microsoft.FSharp.Control /// The F# compiler emits references to this type to implement F# async expressions. /// /// Async Internals + [] type AsyncReturn /// The F# compiler emits references to this type to implement F# async expressions. diff --git a/src/FSharp.Core/fslib-extra-pervasives.fsi b/src/FSharp.Core/fslib-extra-pervasives.fsi index 1e38995a2bd..dff6b2e68d1 100644 --- a/src/FSharp.Core/fslib-extra-pervasives.fsi +++ b/src/FSharp.Core/fslib-extra-pervasives.fsi @@ -375,12 +375,15 @@ namespace Microsoft.FSharp.Core.CompilerServices /// Library functionality for supporting type providers and code generated by the F# compiler. See /// also F# Type Providers in the F# Language Guide. /// + [] type MeasureProduct<'Measure1, 'Measure2> /// Represents the inverse of a measure expressions when returned as a generic argument of a provided type. + [] type MeasureInverse<'Measure> /// Represents the '1' measure expression when returned as a generic argument of a provided type. + [] type MeasureOne /// Place on a class that implements ITypeProvider to extend the compiler diff --git a/src/FSharp.Core/nativeptr.fsi b/src/FSharp.Core/nativeptr.fsi index 2f380f85dae..798290f1d4e 100644 --- a/src/FSharp.Core/nativeptr.fsi +++ b/src/FSharp.Core/nativeptr.fsi @@ -25,6 +25,7 @@ module NativePtr = /// [] [] + [] val inline ofNativeInt: address: nativeint -> nativeptr<'T> /// Returns a machine address for a given typed native pointer. @@ -36,6 +37,7 @@ module NativePtr = /// [] [] + [] val inline toNativeInt: address: nativeptr<'T> -> nativeint /// Returns a typed native pointer for a untyped native pointer. @@ -47,6 +49,7 @@ module NativePtr = /// [] [] + [] val inline ofVoidPtr: address: voidptr -> nativeptr<'T> /// Returns an untyped native pointer for a given typed native pointer. @@ -58,6 +61,7 @@ module NativePtr = /// [] [] + [] val inline toVoidPtr: address: nativeptr<'T> -> voidptr /// Returns a typed native pointer for a Common IL (Intermediate Language) signature pointer. @@ -69,6 +73,7 @@ module NativePtr = /// [] [] + [] val inline ofILSigPtr: address: ilsigptr<'T> -> nativeptr<'T> /// Returns a Common IL (Intermediate Language) signature pointer for a given typed native pointer. @@ -80,6 +85,7 @@ module NativePtr = /// [] [] + [] val inline toILSigPtr: address: nativeptr<'T> -> ilsigptr<'T> /// Converts a given typed native pointer to a managed pointer. @@ -91,6 +97,7 @@ module NativePtr = /// [] [] + [] val inline toByRef: address: nativeptr<'T> -> byref<'T> /// Returns a typed native pointer by adding index * sizeof<'T> to the @@ -104,6 +111,7 @@ module NativePtr = /// [] [] + [] val inline add: address: nativeptr<'T> -> index: int -> nativeptr<'T> /// Dereferences the typed native pointer computed by adding index * sizeof<'T> to the @@ -117,6 +125,7 @@ module NativePtr = /// [] [] + [] val inline get: address: nativeptr<'T> -> index: int -> 'T /// Dereferences the given typed native pointer. @@ -128,6 +137,7 @@ module NativePtr = /// [] [] + [] val inline read: address: nativeptr<'T> -> 'T /// Assigns the value into the memory location referenced by the given typed native pointer. @@ -138,6 +148,7 @@ module NativePtr = /// [] [] + [] val inline write: address: nativeptr<'T> -> value: 'T -> unit /// Assigns the value into the memory location referenced by the typed native @@ -150,6 +161,7 @@ module NativePtr = /// [] [] + [] val inline set: address: nativeptr<'T> -> index: int -> value: 'T -> unit /// Allocates a region of memory on the stack. @@ -161,6 +173,7 @@ module NativePtr = /// [] [] + [] val inline stackalloc: count: int -> nativeptr<'T> /// Gets the null native pointer. @@ -171,6 +184,7 @@ module NativePtr = [] [] [] + [] val inline nullPtr<'T when 'T: unmanaged> : nativeptr<'T> /// Tests whether the given native pointer is null. @@ -182,6 +196,7 @@ module NativePtr = /// [] [] + [] val inline isNullPtr: address: nativeptr<'T> -> bool /// Clears the value stored at the location of a given native pointer. @@ -191,6 +206,7 @@ module NativePtr = /// [] [] + [] val inline clear: address: nativeptr<'T> -> unit /// Initializes a specified block of memory starting at a specific address to a given byte count and initial byte value. @@ -202,6 +218,7 @@ module NativePtr = /// [] [] + [] val inline initBlock: address: nativeptr<'T> -> value: byte -> count: uint32 -> unit /// Copies a value to a specified destination address from a specified source address. @@ -212,6 +229,7 @@ module NativePtr = /// [] [] + [] val inline copy: destination: nativeptr<'T> -> source: nativeptr<'T> -> unit /// Copies a block of memory to a specified destination address starting from a specified source address until a specified byte count of (count * sizeof<'T>). @@ -223,4 +241,5 @@ module NativePtr = /// [] [] + [] val inline copyBlock: destination: nativeptr<'T> -> source: nativeptr<'T> -> count: int -> unit diff --git a/src/FSharp.Core/prim-types.fsi b/src/FSharp.Core/prim-types.fsi index fb03e49d201..82ab0584ca8 100644 --- a/src/FSharp.Core/prim-types.fsi +++ b/src/FSharp.Core/prim-types.fsi @@ -1233,14 +1233,17 @@ namespace Microsoft.FSharp.Core /// Represents a byref that can be written [] + [] type Out /// Represents a byref that can be read [] + [] type In /// Represents a byref that can be both read and written [] + [] type InOut /// Represents a in-argument or readonly managed pointer in F# code. This type should only be used with F# 4.5+. @@ -1745,6 +1748,7 @@ namespace Microsoft.FSharp.Core /// The input object. /// /// The managed pointer. + [] val inline (~&): obj: 'T -> byref<'T> /// Address-of. Uses of this value may result in the generation of unverifiable code. @@ -1752,6 +1756,7 @@ namespace Microsoft.FSharp.Core /// The input object. /// /// The unmanaged pointer. + [] val inline (~&&): obj: 'T -> nativeptr<'T> //------------------------------------------------------------------------- @@ -2773,6 +2778,7 @@ namespace Microsoft.FSharp.Core /// /// /// + [] val inline (~-): n: ^T -> ^T when ^T: (static member ( ~- ): ^T -> ^T) and default ^T: int /// Overloaded addition operator @@ -2803,6 +2809,7 @@ namespace Microsoft.FSharp.Core /// 10 - 2 // Evaluates to 8 /// /// + [] val inline (-): x: ^T1 -> y: ^T2 -> ^T3 when (^T1 or ^T2): (static member (-): ^T1 * ^T2 -> ^T3) and default ^T2: ^T3 and default ^T3: ^T1 and default ^T3: ^T2 and default ^T1: ^T3 and default ^T1: ^T2 and default ^T1: int /// Overloaded multiplication operator @@ -2831,6 +2838,7 @@ namespace Microsoft.FSharp.Core /// 16 / 2 // Evaluates to 8 /// /// + [] val inline (/): x: ^T1 -> y: ^T2 -> ^T3 when (^T1 or ^T2): (static member (/): ^T1 * ^T2 -> ^T3) and default ^T2: ^T3 and default ^T3: ^T1 and default ^T3: ^T2 and default ^T1: ^T3 and default ^T1: ^T2 and default ^T1: int /// Overloaded modulo operator @@ -2845,6 +2853,7 @@ namespace Microsoft.FSharp.Core /// 29 % 5 // Evaluates to 4 /// /// + [] val inline (%): x: ^T1 -> y: ^T2 -> ^T3 when (^T1 or ^T2): (static member (%): ^T1 * ^T2 -> ^T3) and default ^T2: ^T3 and default ^T3: ^T1 and default ^T3: ^T2 and default ^T1: ^T3 and default ^T1: ^T2 and default ^T1: int /// Overloaded bitwise-AND operator @@ -2862,6 +2871,7 @@ namespace Microsoft.FSharp.Core /// /// Evaluates to 9 /// + [] val inline (&&&): x: ^T -> y: ^T -> ^T when ^T: (static member (&&&): ^T * ^T -> ^T) and default ^T: int /// Overloaded bitwise-OR operator @@ -2879,6 +2889,7 @@ namespace Microsoft.FSharp.Core /// /// Evaluates to 15 /// + [] val inline (|||): x: ^T -> y: ^T -> ^T when ^T: (static member (|||): ^T * ^T -> ^T) and default ^T: int /// Overloaded bitwise-XOR operator @@ -2896,6 +2907,7 @@ namespace Microsoft.FSharp.Core /// /// Evaluates to 6 /// + [] val inline (^^^): x: ^T -> y: ^T -> ^T when ^T: (static member (^^^): ^T * ^T -> ^T) and default ^T: int /// Overloaded byte-shift left operator by a specified number of bits @@ -2912,6 +2924,7 @@ namespace Microsoft.FSharp.Core /// /// Evaluates to 208 /// + [] val inline (<<<): value: ^T -> shift: int32 -> ^T when ^T : (static member (<<<) : ^T * int32 -> ^T) and default ^T : int /// Overloaded byte-shift right operator by a specified number of bits @@ -2930,6 +2943,7 @@ namespace Microsoft.FSharp.Core /// Evaluates to 3 /// /// + [] val inline (>>>): value: ^T -> shift: int32 -> ^T when ^T: (static member (>>>): ^T * int32 -> ^T) and default ^T: int /// Overloaded bitwise-NOT operator @@ -2946,6 +2960,7 @@ namespace Microsoft.FSharp.Core /// Evaluates to 195 /// /// + [] val inline (~~~): value: ^T -> ^T when ^T: (static member (~~~): ^T -> ^T) and default ^T: int /// Overloaded prefix-plus operator @@ -2956,6 +2971,7 @@ namespace Microsoft.FSharp.Core /// /// /// + [] val inline (~+): value: ^T -> ^T when ^T: (static member (~+): ^T -> ^T) and default ^T: int /// Structural less-than comparison @@ -3289,6 +3305,7 @@ namespace Microsoft.FSharp.Core /// The result value. [] [] + [] val inline rethrow: unit -> 'T /// Rethrows an exception. This should only be used when handling an exception @@ -3310,6 +3327,7 @@ namespace Microsoft.FSharp.Core /// /// [] + [] val inline reraise: unit -> 'T /// Builds a object. @@ -4493,6 +4511,7 @@ namespace Microsoft.FSharp.Core /// /// [] + [] val inline byte: value: ^T -> byte when ^T: (static member op_Explicit: ^T -> byte) and default ^T: int /// Converts the argument to signed byte. This is a direct conversion for all @@ -4513,6 +4532,7 @@ namespace Microsoft.FSharp.Core /// /// [] + [] val inline sbyte: value:^T -> sbyte when ^T: (static member op_Explicit: ^T -> sbyte) and default ^T: int /// Converts the argument to signed 16-bit integer. This is a direct conversion for all @@ -4533,6 +4553,7 @@ namespace Microsoft.FSharp.Core /// /// [] + [] val inline int16: value: ^T -> int16 when ^T: (static member op_Explicit: ^T -> int16) and default ^T: int /// Converts the argument to unsigned 16-bit integer. This is a direct conversion for all @@ -4553,6 +4574,7 @@ namespace Microsoft.FSharp.Core /// /// [] + [] val inline uint16: value: ^T -> uint16 when ^T: (static member op_Explicit: ^T -> uint16) and default ^T: int /// Converts the argument to signed 32-bit integer. This is a direct conversion for all @@ -4632,6 +4654,7 @@ namespace Microsoft.FSharp.Core /// /// [] + [] val inline int32: value: ^T -> int32 when ^T: (static member op_Explicit: ^T -> int32) and default ^T: int /// Converts the argument to unsigned 32-bit integer. This is a direct conversion for all @@ -4652,6 +4675,7 @@ namespace Microsoft.FSharp.Core /// /// [] + [] val inline uint32: value: ^T -> uint32 when ^T: (static member op_Explicit: ^T -> uint32) and default ^T: int /// Converts the argument to signed 64-bit integer. This is a direct conversion for all @@ -4672,6 +4696,7 @@ namespace Microsoft.FSharp.Core /// /// [] + [] val inline int64: value: ^T -> int64 when ^T : (static member op_Explicit : ^T -> int64) and default ^T : int /// Converts the argument to unsigned 64-bit integer. This is a direct conversion for all @@ -4692,6 +4717,7 @@ namespace Microsoft.FSharp.Core /// /// [] + [] val inline uint64: value: ^T -> uint64 when ^T: (static member op_Explicit: ^T -> uint64) and default ^T: int /// Converts the argument to 32-bit float. This is a direct conversion for all @@ -4712,6 +4738,7 @@ namespace Microsoft.FSharp.Core /// /// [] + [] val inline float32: value: ^T -> float32 when ^T: (static member op_Explicit: ^T -> float32) and default ^T: int /// Converts the argument to 64-bit float. This is a direct conversion for all @@ -4732,6 +4759,7 @@ namespace Microsoft.FSharp.Core /// /// [] + [] val inline float: value: ^T -> float when ^T: (static member op_Explicit: ^T -> float) and default ^T: int /// Converts the argument to signed native integer. This is a direct conversion for all @@ -4751,6 +4779,7 @@ namespace Microsoft.FSharp.Core /// /// [] + [] val inline nativeint: value: ^T -> nativeint when ^T: (static member op_Explicit: ^T -> nativeint) and default ^T: int /// Converts the argument to unsigned native integer using a direct conversion for all @@ -4770,6 +4799,7 @@ namespace Microsoft.FSharp.Core /// /// [] + [] val inline unativeint: value: ^T -> unativeint when ^T: (static member op_Explicit: ^T -> unativeint) and default ^T: int /// Converts the argument to a string using ToString. @@ -4809,6 +4839,7 @@ namespace Microsoft.FSharp.Core /// /// [] + [] val inline decimal: value: ^T -> decimal when ^T: (static member op_Explicit: ^T -> decimal) and default ^T: int /// Converts the argument to character. Numeric inputs are converted according to the UTF-16 @@ -4828,6 +4859,7 @@ namespace Microsoft.FSharp.Core /// /// [] + [] val inline char: value: ^T -> char when ^T: (static member op_Explicit: ^T -> char) and default ^T: int /// An active pattern to match values of type @@ -5929,6 +5961,7 @@ namespace Microsoft.FSharp.Core /// /// /// + [] val inline (~-): value: ^T -> ^T when ^T: (static member (~-): ^T -> ^T) and default ^T: int /// Overloaded subtraction operator (checks for overflow) @@ -5976,6 +6009,7 @@ namespace Microsoft.FSharp.Core /// /// [] + [] val inline byte: value: ^T -> byte when ^T: (static member op_Explicit: ^T -> byte) and default ^T: int /// Converts the argument to sbyte. This is a direct, checked conversion for all @@ -5990,6 +6024,7 @@ namespace Microsoft.FSharp.Core /// /// [] + [] val inline sbyte: value: ^T -> sbyte when ^T: (static member op_Explicit: ^T -> sbyte) and default ^T: int /// Converts the argument to int16. This is a direct, checked conversion for all @@ -6004,6 +6039,7 @@ namespace Microsoft.FSharp.Core /// /// [] + [] val inline int16: value: ^T -> int16 when ^T: (static member op_Explicit: ^T -> int16) and default ^T: int /// Converts the argument to uint16. This is a direct, checked conversion for all @@ -6018,6 +6054,7 @@ namespace Microsoft.FSharp.Core /// /// [] + [] val inline uint16: value: ^T -> uint16 when ^T: (static member op_Explicit: ^T -> uint16) and default ^T: int /// Converts the argument to int. This is a direct, checked conversion for all @@ -6046,6 +6083,7 @@ namespace Microsoft.FSharp.Core /// /// [] + [] val inline int32: value: ^T -> int32 when ^T: (static member op_Explicit: ^T -> int32) and default ^T: int /// Converts the argument to uint32. This is a direct, checked conversion for all @@ -6060,6 +6098,7 @@ namespace Microsoft.FSharp.Core /// /// [] + [] val inline uint32: value: ^T -> uint32 when ^T: (static member op_Explicit: ^T -> uint32) and default ^T: int /// Converts the argument to int64. This is a direct, checked conversion for all @@ -6074,6 +6113,7 @@ namespace Microsoft.FSharp.Core /// /// [] + [] val inline int64: value: ^T -> int64 when ^T: (static member op_Explicit: ^T -> int64) and default ^T: int /// Converts the argument to uint64. This is a direct, checked conversion for all @@ -6088,6 +6128,7 @@ namespace Microsoft.FSharp.Core /// /// [] + [] val inline uint64: value: ^T -> uint64 when ^T: (static member op_Explicit: ^T -> uint64) and default ^T: int /// Converts the argument to . This is a direct, checked conversion for all @@ -6101,6 +6142,7 @@ namespace Microsoft.FSharp.Core /// /// [] + [] val inline nativeint: value: ^T -> nativeint when ^T: (static member op_Explicit: ^T -> nativeint) and default ^T: int /// Converts the argument to unativeint. This is a direct, checked conversion for all @@ -6114,6 +6156,7 @@ namespace Microsoft.FSharp.Core /// /// [] + [] val inline unativeint: value: ^T -> unativeint when ^T: (static member op_Explicit: ^T -> unativeint) and default ^T: int /// Converts the argument to char. Numeric inputs are converted using a checked @@ -6128,6 +6171,7 @@ namespace Microsoft.FSharp.Core /// /// [] + [] val inline char: value: ^T -> char when ^T: (static member op_Explicit: ^T -> char) and default ^T: int namespace Microsoft.FSharp.Control diff --git a/src/FSharp.Core/resumable.fsi b/src/FSharp.Core/resumable.fsi index f5a7f7ec719..e62a6597729 100644 --- a/src/FSharp.Core/resumable.fsi +++ b/src/FSharp.Core/resumable.fsi @@ -123,6 +123,7 @@ type SetStateMachineMethodImpl<'Data> = delegate of byref = delegate of byref> -> 'Result /// Contains compiler intrinsics related to the definition of state machines. +[] module StateMachineHelpers = /// diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Signatures/SignatureEnforcedAttributes.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Signatures/SignatureEnforcedAttributes.fs new file mode 100644 index 00000000000..e9a7639999a --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Signatures/SignatureEnforcedAttributes.fs @@ -0,0 +1,482 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Conformance.Signatures + +open Xunit +open FSharp.Test +open FSharp.Test.Compiler + +module SignatureEnforcedAttributes = + + let private fsi src = SourceCodeFileKind.Create("Library.fsi", src) + let private fs src = SourceCodeFileKind.Create("Library.fs", src) + + let private compileSigImpl (sigSrc: string) (implSrc: string) = + fsFromString (fsi sigSrc) + |> FS + |> withAdditionalSourceFile (fs implSrc) + |> asLibrary + |> ignoreWarnings + |> compile + + [] + let ``NoDynamicInvocation in impl but not sig produces warning`` () = + let sigSrc = """ +module M +val inline f: x: int -> int +""" + let implSrc = """ +module M +[] +let inline f (x: int) = x + 1 +""" + compileSigImpl sigSrc implSrc + |> shouldSucceed + |> withWarningCode 3888 + |> withDiagnosticMessageMatches "NoDynamicInvocation" + + [] + let ``NoDynamicInvocation in both impl and sig compiles clean`` () = + let sigSrc = """ +module M +[] +val inline f: x: int -> int +""" + let implSrc = """ +module M +[] +let inline f (x: int) = x + 1 +""" + compileSigImpl sigSrc implSrc + |> shouldSucceed + + [] + let ``Regular attribute in impl but not sig does NOT raise enforcement error`` () = + let sigSrc = """ +module M +val f: x: int -> int +""" + let implSrc = """ +module M +[] +let f (x: int) = x + 1 +""" + // Obsolete is NOT in the enforced list - compilation must succeed. + compileSigImpl sigSrc implSrc + |> shouldSucceed + + [] + let ``InlineIfLambda in sig but not impl still raises (existing behavior preserved)`` () = + let sigSrc = """ +module M +val run: f: (int -> int) -> int +""" + let implSrc = """ +module M +let run ([] f: int -> int) = f 42 +""" + // Pre-existing FS3518 path. Must still fire. + compileSigImpl sigSrc implSrc + |> shouldFail + |> withDiagnosticMessageMatches "InlineIfLambda" + + [] + let ``Attribute absent from both impl and sig is fine`` () = + let sigSrc = """ +module M +val f: x: int -> int +""" + let implSrc = """ +module M +let f (x: int) = x + 1 +""" + compileSigImpl sigSrc implSrc + |> shouldSucceed + + [] + let ``NoDynamicInvocation on type member in impl but not sig produces warning`` () = + let sigSrc = """ +module M +type T = + new: unit -> T + member inline F: x: int -> int +""" + let implSrc = """ +module M +type T() = + [] + member inline _.F(x: int) = x + 1 +""" + compileSigImpl sigSrc implSrc + |> shouldSucceed + |> withWarningCode 3888 + |> withDiagnosticMessageMatches "NoDynamicInvocation" + + [] + let ``RequiresExplicitTypeArguments in impl but not sig produces warning`` () = + let sigSrc = """ +module M +val f: x: int -> int +""" + let implSrc = """ +module M +[] +let f (x: int) = x + 1 +""" + compileSigImpl sigSrc implSrc + |> shouldSucceed + |> withWarningCode 3888 + |> withDiagnosticMessageMatches "RequiresExplicitTypeArguments" + + [] + let ``Conditional in impl but not sig produces warning`` () = + let sigSrc = """ +module M +type T = + new: unit -> T + member F: x: int -> unit +""" + let implSrc = """ +module M +type T() = + [] + member _.F(x: int) = () +""" + compileSigImpl sigSrc implSrc + |> shouldSucceed + |> withWarningCode 3888 + |> withDiagnosticMessageMatches "Conditional" + + [] + let ``RequireQualifiedAccess on union in impl but not sig produces warning`` () = + let sigSrc = """ +module M +type U = A | B +""" + let implSrc = """ +module M +[] +type U = A | B +""" + compileSigImpl sigSrc implSrc + |> shouldSucceed + |> withWarningCode 3888 + |> withDiagnosticMessageMatches "RequireQualifiedAccess" + + [] + let ``AutoOpen on nested module in impl but not sig does NOT fire FS3888 (intentionally asymmetric)`` () = + // AutoOpen on an internal module is a legitimate asymmetric idiom: auto-open + // within the project, opaque for InternalsVisibleTo consumers. + let sigSrc = """ +module M +module Inner = + val x: int +""" + let implSrc = """ +module M +[] +module Inner = + let x = 42 +""" + compileSigImpl sigSrc implSrc + |> shouldSucceed + |> withWarningCodes [] + + [] + let ``CLIMutable on record in impl but not sig produces warning`` () = + let sigSrc = """ +module M +type R = { mutable X: int } +""" + let implSrc = """ +module M +[] +type R = { mutable X: int } +""" + compileSigImpl sigSrc implSrc + |> shouldSucceed + |> withWarningCode 3888 + |> withDiagnosticMessageMatches "CLIMutable" + + [] + let ``AllowNullLiteral on type in impl but not sig produces warning`` () = + let sigSrc = """ +module M +type C = + new: unit -> C +""" + let implSrc = """ +module M +[] +type C() = class end +""" + compileSigImpl sigSrc implSrc + |> shouldSucceed + |> withWarningCode 3888 + |> withDiagnosticMessageMatches "AllowNullLiteral" + + [] + let ``NoEquality on record in impl but not sig produces warning`` () = + // The mismatch also triggers FS293 (signature requires IStructuralEquatable + // but implementation has NoEquality). That's a separate, existing diagnostic. + // We verify the new warning is included regardless. + let sigSrc = """ +module M +type R = { X: int } +""" + let implSrc = """ +module M +[] +type R = { X: int } +""" + compileSigImpl sigSrc implSrc + |> withDiagnosticMessageMatches "NoEquality" + + [] + let ``Multiple enforced attributes on same val produce multiple warnings`` () = + let sigSrc = """ +module M +val inline f: x: int -> int +""" + let implSrc = """ +module M +[] +[] +let inline f (x: int) = x + 1 +""" + compileSigImpl sigSrc implSrc + |> shouldSucceed + |> withDiagnosticMessageMatches "NoDynamicInvocation" + |> withDiagnosticMessageMatches "RequiresExplicitTypeArguments" + + [] + let ``Warning is suppressible with nowarn 3888`` () = + let sigSrc = """ +module M +val inline f: x: int -> int +""" + let implSrc = """ +module M +#nowarn "3888" +[] +let inline f (x: int) = x + 1 +""" + fsFromString (fsi sigSrc) + |> FS + |> withAdditionalSourceFile (fs implSrc) + |> asLibrary + |> compile + |> shouldSucceed + + // Module-level attribute. + + [] + let ``AutoOpen on top-level module in impl but not sig does NOT fire FS3888 (intentionally asymmetric)`` () = + let sigSrc = """ +module M.Sub +val x: int +""" + let implSrc = """ +[] +module M.Sub +let x = 1 +""" + compileSigImpl sigSrc implSrc + |> shouldSucceed + |> withWarningCodes [] + + // Diagnostic placement and range. + + [] + let ``Diagnostic squiggle is placed on the offending attribute in the .fs`` () = + let sigSrc = """ +module M +val inline f: x: int -> int +""" + // Line numbers (1-based) — line 1 is empty, line 2 `module M`, line 3 the attribute. + let implSrc = """ +module M +[] +let inline f (x: int) = x + 1 +""" + let result = compileSigImpl sigSrc implSrc |> shouldSucceed + // Verify a single FS3888 diagnostic and that its range targets the + // attribute on line 3, not the value identifier on line 4. + let diagnostics = + match result with + | CompilationResult.Success r -> r.Diagnostics + | CompilationResult.Failure r -> r.Diagnostics + let attribDiag = + diagnostics + |> List.filter (fun d -> match d.Error with Warning n -> n = 3888 | _ -> false) + |> List.exactlyOne + Assert.Equal(3, attribDiag.Range.StartLine) + Assert.Equal(3, attribDiag.Range.EndLine) + + [] + let ``Diagnostic on entity attribute targets the attribute in the .fs`` () = + let sigSrc = """ +module M +type U = A | B +""" + let implSrc = """ +module M +[] +type U = A | B +""" + let result = compileSigImpl sigSrc implSrc |> shouldSucceed + let diagnostics = + match result with + | CompilationResult.Success r -> r.Diagnostics + | CompilationResult.Failure r -> r.Diagnostics + let attribDiag = + diagnostics + |> List.filter (fun d -> match d.Error with Warning n -> n = 3888 | _ -> false) + |> List.exactlyOne + // Attribute is on line 3 (1-based, after the leading empty line + `module M`). + Assert.Equal(3, attribDiag.Range.StartLine) + + [] + let ``Under preview langversion FS3888 is an error (feature ErrorOnMissingSignatureAttribute)`` () = + let sigSrc = """ +module M +val inline f: x: int -> int +""" + let implSrc = """ +module M +[] +let inline f (x: int) = x + 1 +""" + fsFromString (fsi sigSrc) + |> FS + |> withAdditionalSourceFile (fs implSrc) + |> withLangVersionPreview + |> asLibrary + |> compile + |> shouldFail + |> withErrorCode 3888 + |> withDiagnosticMessageMatches "NoDynamicInvocation" + + [] + let ``Under default langversion FS3888 is a warning (feature off)`` () = + let sigSrc = """ +module M +val inline f: x: int -> int +""" + let implSrc = """ +module M +[] +let inline f (x: int) = x + 1 +""" + fsFromString (fsi sigSrc) + |> FS + |> withAdditionalSourceFile (fs implSrc) + |> withLangVersion90 + |> asLibrary + |> ignoreWarnings + |> compile + |> shouldSucceed + |> withWarningCode 3888 + |> withDiagnosticMessageMatches "NoDynamicInvocation" + + // Internal-symbol scope: same .fsi/.fs divergence applies (cross-file + InternalsVisibleTo). + + [] + let ``Internal type with attribute mismatch still fires FS3888`` () = + let sigSrc = """ +module M +type internal C = { X: int } +""" + let implSrc = """ +module M +[] +type internal C = { X: int } +""" + compileSigImpl sigSrc implSrc + |> withDiagnosticMessageMatches "NoEquality" + + [] + let ``Internal val with attribute mismatch still fires FS3888`` () = + let sigSrc = """ +module M +val inline internal f: x: int -> int +""" + let implSrc = """ +module M +[] +let inline internal f (x: int) = x + 1 +""" + compileSigImpl sigSrc implSrc + |> shouldSucceed + |> withWarningCode 3888 + |> withDiagnosticMessageMatches "NoDynamicInvocation" + + // Expanded attribute set: typecheck-affecting attributes added after the initial PR. + + [] + let ``StructuralEquality/Comparison on impl but not sig is documentary and does NOT fire FS3888`` () = + // StructuralEquality / StructuralComparison on a record matches the F# default; + // the attributes are documentary and have no observable consumer effect. + let sigSrc = """ +module M +type R = { X: int } +""" + let implSrc = """ +module M +[] +type R = { X: int } +""" + compileSigImpl sigSrc implSrc + |> shouldSucceed + |> withWarningCodes [] + + [] + let ``IsReadOnly mismatch fires FS3888`` () = + let sigSrc = """ +module M +[] +type R = { X: int } +""" + let implSrc = """ +module M +[] +[] +type R = { X: int } +""" + compileSigImpl sigSrc implSrc + |> shouldSucceed + |> withWarningCode 3888 + |> withDiagnosticMessageMatches "IsReadOnly" + + [] + let ``Struct attribute mismatch fires FS3888`` () = + // Sig as class, impl as struct: boxing/byref semantics flip. + let sigSrc = """ +module M +type R = { X: int } +""" + let implSrc = """ +module M +[] +type R = { X: int } +""" + compileSigImpl sigSrc implSrc + |> withDiagnosticMessageMatches "Struct" + + [] + let ``RequireQualifiedAccess on nested module: impl-only fires FS3888`` () = + let sigSrc = """ +module M +module Inner = + val x: int +""" + let implSrc = """ +module M +[] +module Inner = + let x = 42 +""" + compileSigImpl sigSrc implSrc + |> shouldSucceed + |> withWarningCode 3888 + |> withDiagnosticMessageMatches "RequireQualifiedAccess" diff --git a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj index 4a70c3ea9b2..468901d8404 100644 --- a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj +++ b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj @@ -212,6 +212,7 @@ + diff --git a/tests/fsharp/typecheck/sigs/neg31.bsl b/tests/fsharp/typecheck/sigs/neg31.bsl index 9140452d235..92b01723fd1 100644 --- a/tests/fsharp/typecheck/sigs/neg31.bsl +++ b/tests/fsharp/typecheck/sigs/neg31.bsl @@ -5,8 +5,12 @@ neg31.fs(71,12,71,70): typecheck error FS1200: The attribute 'ObsoleteAttribute' neg31.fs(107,13,107,48): typecheck error FS1200: The attribute 'CLSCompliantAttribute' appears in both the implementation and the signature, but the attribute arguments differ. Only the attribute from the signature will be included in the compiled code. +neg31.fs(32,6,32,82): typecheck error FS3888: The attribute 'Obsolete' is present on 'C3' in the implementation but not in the signature, which takes precedence for tooling and consumers. Add the attribute to the signature, to ensure the attribute is not ignored by the compiler. + neg31.fs(28,6,28,64): typecheck error FS1200: The attribute 'ObsoleteAttribute' appears in both the implementation and the signature, but the attribute arguments differ. Only the attribute from the signature will be included in the compiled code. neg31.fs(93,14,93,49): typecheck error FS1200: The attribute 'CLSCompliantAttribute' appears in both the implementation and the signature, but the attribute arguments differ. Only the attribute from the signature will be included in the compiled code. +neg31.fs(52,6,52,82): typecheck error FS3888: The attribute 'Obsolete' is present on 'M3' in the implementation but not in the signature, which takes precedence for tooling and consumers. Add the attribute to the signature, to ensure the attribute is not ignored by the compiler. + neg31.fs(47,6,47,64): typecheck error FS1200: The attribute 'ObsoleteAttribute' appears in both the implementation and the signature, but the attribute arguments differ. Only the attribute from the signature will be included in the compiled code. diff --git a/vsintegration/src/FSharp.Editor/CodeFixes/AddMissingAttributeToSignature.fs b/vsintegration/src/FSharp.Editor/CodeFixes/AddMissingAttributeToSignature.fs new file mode 100644 index 00000000000..feeb3b10722 --- /dev/null +++ b/vsintegration/src/FSharp.Editor/CodeFixes/AddMissingAttributeToSignature.fs @@ -0,0 +1,231 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Microsoft.VisualStudio.FSharp.Editor + +open System +open System.Composition +open System.Collections.Immutable + +open Microsoft.CodeAnalysis +open Microsoft.CodeAnalysis.CodeActions +open Microsoft.CodeAnalysis.CodeFixes +open Microsoft.CodeAnalysis.Text + +open FSharp.Compiler.Symbols + +open CancellableTasks + +[] +type internal AddMissingAttributeToSignatureCodeFixProvider [] () = + inherit CodeFixProvider() + + // Normalize for slash/case/relative differences between FCS and Roslyn. + let tryFindSigDocument (document: Document) (sigFilePath: string) = + let solution = document.Project.Solution + + let normalizedPath = + try + System.IO.Path.GetFullPath(sigFilePath) + with _ -> + sigFilePath + + let docIds = solution.GetDocumentIdsWithFilePath(normalizedPath) + + if docIds.IsEmpty then + None + else + let preferred = docIds |> Seq.tryFind (fun id -> id.ProjectId = document.Project.Id) + + (preferred |> Option.defaultValue docIds.[0]) + |> solution.GetDocument + |> Option.ofObj + + // `Conditional("DEBUG")` -> `"Conditional"`, `"(\"DEBUG\")"`. + let splitAttribHead (text: string) : struct (string * string) = + let mutable i = 0 + + while i < text.Length && text.[i] <> '(' && not (Char.IsWhiteSpace(text.[i])) do + i <- i + 1 + + struct (text.Substring(0, i), text.Substring(i)) + + // Lookbehind avoids re-qualifying `X.Foo.` or matching a substring of a longer identifier. + let qualifyEnumToken (simple: string) (qualified: string) (text: string) : string = + let pattern = $@"(? "System.Diagnostics." + head + | "EditorBrowsable" + | "EditorBrowsableAttribute" -> "System.ComponentModel." + head + | "NoEagerConstraintApplication" + | "NoEagerConstraintApplicationAttribute" -> "Microsoft.FSharp.Core.CompilerServices." + head + | "Obsolete" + | "ObsoleteAttribute" -> "System." + head + | "AttributeUsage" + | "AttributeUsageAttribute" -> "System." + head + | "Unverifiable" + | "UnverifiableAttribute" -> "Microsoft.FSharp.Core.CompilerServices." + head + | _ -> head + + let qualifiedRest = + rest + |> qualifyEnumToken "EditorBrowsableState" "System.ComponentModel.EditorBrowsableState" + |> qualifyEnumToken "AttributeTargets" "System.AttributeTargets" + + qualifiedHead + qualifiedRest + + let indentOfLine (sigSourceText: SourceText) (lineStart: int) = + let line = sigSourceText.Lines.GetLineFromPosition(lineStart).ToString() + let mutable i = 0 + + while i < line.Length && (line.[i] = ' ' || line.[i] = '\t') do + i <- i + 1 + + line.Substring(0, i) + + // Match the .fsi's existing newline; fall back to Environment.NewLine. + let lineBreakAt (sigSourceText: SourceText) (lineStart: int) = + let inline lineBreakOf (line: TextLine) = + let lbLen = line.EndIncludingLineBreak - line.End + + if lbLen > 0 then + Some(sigSourceText.ToString(TextSpan(line.End, lbLen))) + else + None + + let lines = sigSourceText.Lines + let startLineNo = lines.GetLineFromPosition(lineStart).LineNumber + let mutable result: string option = None + let mutable i = startLineNo + + while result.IsNone && i >= 0 do + result <- lineBreakOf lines.[i] + i <- i - 1 + + result |> Option.defaultValue Environment.NewLine + + // Returns None if the .fsi was truncated between registration and apply. + let tryFSharpRangeToTextSpan (text: SourceText) (range: FSharp.Compiler.Text.range) = + try + Some(RoslynHelpers.FSharpRangeToTextSpan(text, range)) + with + | :? ArgumentOutOfRangeException + | :? IndexOutOfRangeException -> None + + override _.FixableDiagnosticIds = ImmutableArray.Create "FS3888" + + override _.RegisterCodeFixesAsync context = + cancellableTask { + let document = context.Document + let! sourceText = document.GetTextAsync(context.CancellationToken) + + // SynAttribute.Range covers one attribute body, no `[<` `>]` or sibling separators. + let attribSpan = context.Span + let rawAttribText = sourceText.GetSubText(attribSpan).ToString() + + if String.IsNullOrWhiteSpace rawAttribText then + () + else + + let attribText = canonicalizeAttribName rawAttribText + let bracketed = $"[<{attribText}>]" + + // Position lookup is unreliable inside `[]` and `[]\n[]`; enumerate symbol uses instead. + let! _, checkResults = document.GetFSharpParseAndCheckResultsAsync "AddMissingAttributeToSignature" + + let diagFsRange = + RoslynHelpers.TextSpanToFSharpRange(document.FilePath, attribSpan, sourceText) + + let candidates = + checkResults.GetAllUsesOfAllSymbolsInFile(context.CancellationToken) + |> Seq.filter (fun (u: FSharp.Compiler.CodeAnalysis.FSharpSymbolUse) -> + u.IsFromDefinition + && u.Symbol.SignatureLocation.IsSome + // The wildcard `_` in `member _.F = ...` is reported as a definition with SignatureLocation in the .fs. + && (match u.Symbol.SignatureLocation with + | Some sigLoc -> not (String.Equals(sigLoc.FileName, document.FilePath, StringComparison.OrdinalIgnoreCase)) + | None -> false) + // `type T() = ...` reports an implicit ctor whose SignatureLocation is `new: ...`. + && (match u.Symbol with + | :? FSharpMemberOrFunctionOrValue as mfv -> not mfv.IsConstructor + | _ -> true) + && (u.Range.StartLine > diagFsRange.EndLine + || (u.Range.StartLine = diagFsRange.EndLine + && u.Range.StartColumn >= diagFsRange.EndColumn))) + |> Seq.toArray + + let symbolUse = + if candidates.Length = 0 then + None + else + // Tie-break by name for deterministic overload/ctor selection. + candidates + |> Array.minBy (fun u -> + u.Range.StartLine, u.Range.StartColumn, u.Range.EndLine, u.Range.EndColumn, u.Symbol.FullName) + |> Some + + match symbolUse |> Option.bind (fun u -> u.Symbol.SignatureLocation) with + | Some sigRange when not (String.Equals(sigRange.FileName, document.FilePath, StringComparison.OrdinalIgnoreCase)) -> + match tryFindSigDocument document sigRange.FileName with + | Some sigDoc -> + // Re-resolve at apply time so intervening .fsi edits are observed. + let sigDocId = sigDoc.Id + + let normalizedSigPath = + try + System.IO.Path.GetFullPath(sigRange.FileName) + with _ -> + sigRange.FileName + + let createChangedSolution + (cancellationToken: System.Threading.CancellationToken) + : System.Threading.Tasks.Task = + task { + let currentSolution = document.Project.Solution + + match currentSolution.GetDocument(sigDocId) |> Option.ofObj with + | None -> return currentSolution + | Some liveSigDoc -> + let! current = liveSigDoc.GetTextAsync(cancellationToken) + + match tryFSharpRangeToTextSpan current sigRange with + | None -> return currentSolution + | Some currentSigSpan -> + let currentLineStart = current.Lines.GetLineFromPosition(currentSigSpan.Start).Start + let currentIndent = indentOfLine current currentLineStart + let currentLineBreak = lineBreakAt current currentLineStart + let currentInsertion = $"{currentIndent}{bracketed}{currentLineBreak}" + + let updated = + current.WithChanges(TextChange(TextSpan(currentLineStart, 0), currentInsertion)) + + return liveSigDoc.WithText(updated).Project.Solution + } + + let action = + CodeAction.Create( + $"Add {bracketed} to signature", + System.Func>( + createChangedSolution + ), + equivalenceKey = + $"{CodeFix.AddMissingAttributeToSignature}:{bracketed}:{normalizedSigPath}:{sigRange.StartLine}:{sigRange.StartColumn}:{sigRange.EndLine}:{sigRange.EndColumn}" + ) + + context.RegisterCodeFix(action, context.Diagnostics) + | None -> () + | Some _ + | None -> () + } + |> CancellableTask.startAsTask context.CancellationToken diff --git a/vsintegration/src/FSharp.Editor/CodeFixes/RemoveExtraAttributeFromImplementation.fs b/vsintegration/src/FSharp.Editor/CodeFixes/RemoveExtraAttributeFromImplementation.fs new file mode 100644 index 00000000000..562b0ba74b0 --- /dev/null +++ b/vsintegration/src/FSharp.Editor/CodeFixes/RemoveExtraAttributeFromImplementation.fs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Microsoft.VisualStudio.FSharp.Editor + +open System +open System.Composition +open System.Collections.Immutable + +open Microsoft.CodeAnalysis +open Microsoft.CodeAnalysis.CodeActions +open Microsoft.CodeAnalysis.CodeFixes +open Microsoft.CodeAnalysis.Text + +open CancellableTasks + +[] +type internal RemoveExtraAttributeFromImplementationCodeFixProvider [] () = + inherit CodeFixProvider() + + // Expand `attribSpan` (one attribute body, no brackets) to the smallest deletable chunk; None on layouts we won't touch. + let computeDeletionSpan (text: SourceText) (attribSpan: TextSpan) : TextSpan option = + let s = text.ToString() + + let nextNonWhitespaceForward pos = + let mutable i = pos + + while i < s.Length && (s.[i] = ' ' || s.[i] = '\t') do + i <- i + 1 + + i + + let nextNonWhitespaceBackward pos = + let mutable i = pos + + while i > 0 && (s.[i - 1] = ' ' || s.[i - 1] = '\t') do + i <- i - 1 + + i + + let leftTrim = nextNonWhitespaceBackward attribSpan.Start + let rightTrim = nextNonWhitespaceForward attribSpan.End + + let hasLeftSemi = leftTrim > 0 && s.[leftTrim - 1] = ';' + let hasRightSemi = rightTrim < s.Length && s.[rightTrim] = ';' + + let lookingAtBracketOpen pos = + pos >= 2 && s.[pos - 2] = '[' && s.[pos - 1] = '<' + + let lookingAtBracketClose pos = + pos + 1 < s.Length && s.[pos] = '>' && s.[pos + 1] = ']' + + if hasLeftSemi then + Some(TextSpan.FromBounds(leftTrim - 1, attribSpan.End)) + elif hasRightSemi then + let mutable rs = rightTrim + 1 + + while rs < s.Length && (s.[rs] = ' ' || s.[rs] = '\t') do + rs <- rs + 1 + + Some(TextSpan.FromBounds(attribSpan.Start, rs)) + elif lookingAtBracketOpen leftTrim && lookingAtBracketClose rightTrim then + let mutable deletionStart = leftTrim - 2 + let mutable deletionEnd = rightTrim + 2 + + if deletionEnd < s.Length && s.[deletionEnd] = '\r' then + deletionEnd <- deletionEnd + 1 + + if deletionEnd < s.Length && s.[deletionEnd] = '\n' then + deletionEnd <- deletionEnd + 1 + + // Only absorb leading indent if the bracket sits on its own line. + let mutable indentStart = deletionStart + + while indentStart > 0 && (s.[indentStart - 1] = ' ' || s.[indentStart - 1] = '\t') do + indentStart <- indentStart - 1 + + if indentStart = 0 || s.[indentStart - 1] = '\n' || s.[indentStart - 1] = '\r' then + deletionStart <- indentStart + + Some(TextSpan.FromBounds(deletionStart, deletionEnd)) + else + None + + override _.FixableDiagnosticIds = ImmutableArray.Create "FS3888" + + override _.RegisterCodeFixesAsync context = + cancellableTask { + let document = context.Document + let! sourceText = document.GetTextAsync(context.CancellationToken) + + let attribSpan = context.Span + + if attribSpan.IsEmpty then + () + else + let attribText = sourceText.GetSubText(attribSpan).ToString() + + if String.IsNullOrWhiteSpace attribText then + () + else + match computeDeletionSpan sourceText attribSpan with + | None -> () + | Some deletion -> + let title = $"Remove [<{attribText}>] from implementation" + + let action = + CodeAction.Create( + title, + System.Func>(fun ct -> + task { + let! current = document.GetTextAsync(ct) + let updated = current.WithChanges(TextChange(deletion, "")) + return document.WithText(updated) + }), + equivalenceKey = + $"{CodeFix.RemoveExtraAttributeFromImplementation}:{attribText}:{deletion.Start}:{deletion.End}" + ) + + context.RegisterCodeFix(action, context.Diagnostics) + } + |> CancellableTask.startAsTask context.CancellationToken diff --git a/vsintegration/src/FSharp.Editor/Common/Constants.fs b/vsintegration/src/FSharp.Editor/Common/Constants.fs index 24ee22eb433..ead451467cf 100644 --- a/vsintegration/src/FSharp.Editor/Common/Constants.fs +++ b/vsintegration/src/FSharp.Editor/Common/Constants.fs @@ -101,6 +101,13 @@ module internal CodeFix = [] let AddParentheses = "AddParentheses" + [] + let AddMissingAttributeToSignature = "AddMissingAttributeToSignature" + + [] + let RemoveExtraAttributeFromImplementation = + "RemoveExtraAttributeFromImplementation" + [] let AddTypeAnnotationToObjectOfIndeterminateType = "AddTypeAnnotationToObjectOfIndeterminateType" diff --git a/vsintegration/src/FSharp.Editor/FSharp.Editor.fsproj b/vsintegration/src/FSharp.Editor/FSharp.Editor.fsproj index ea8a0f15921..68206f698bd 100644 --- a/vsintegration/src/FSharp.Editor/FSharp.Editor.fsproj +++ b/vsintegration/src/FSharp.Editor/FSharp.Editor.fsproj @@ -121,6 +121,8 @@ + + diff --git a/vsintegration/tests/FSharp.Editor.Tests/CodeFixes/AddMissingAttributeToSignatureTests.fs b/vsintegration/tests/FSharp.Editor.Tests/CodeFixes/AddMissingAttributeToSignatureTests.fs new file mode 100644 index 00000000000..91cd072de59 --- /dev/null +++ b/vsintegration/tests/FSharp.Editor.Tests/CodeFixes/AddMissingAttributeToSignatureTests.fs @@ -0,0 +1,631 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +module FSharp.Editor.Tests.CodeFixes.AddMissingAttributeToSignatureTests + +open System.Collections.Immutable +open System.Threading + +open Microsoft.CodeAnalysis +open Microsoft.CodeAnalysis.CodeActions +open Microsoft.CodeAnalysis.CodeFixes +open Microsoft.CodeAnalysis.Text + +open Microsoft.VisualStudio.FSharp.Editor + +open FSharp.Editor.Tests.Helpers +open FSharp.Editor.Tests.CodeFixes.CodeFixTestFramework +open Xunit + +let private codeFix = AddMissingAttributeToSignatureCodeFixProvider() + +/// Cross-document harness: builds an .fsi + .fs pair, runs the F# checker, +/// finds the FS3888 diagnostic at index `diagIndex` on the .fs, invokes the +/// code-fix, captures the registered CodeAction, applies it and returns the +/// resulting .fsi text. Use `tryFixSig` for the common case (first diagnostic). +let private tryFixSigAt (diagIndex: int) (fsiCode: string) (fsCode: string) : string option = + let documents = RoslynTestHelpers.GetFsiAndFsDocuments fsiCode fsCode |> Seq.toList + let fsiDoc = documents |> List.find (fun d -> d.IsFSharpSignatureFile) + let fsDoc = documents |> List.find (fun d -> not d.IsFSharpSignatureFile) + + let sourceText = fsDoc.GetTextAsync().Result + + let _, checkResults = + fsDoc.GetFSharpParseAndCheckResultsAsync "test" + |> Microsoft.VisualStudio.FSharp.Editor.CancellableTasks.CancellableTask.runSynchronouslyWithoutCancellation + + let diagnostics = + checkResults.Diagnostics + |> Array.filter (fun d -> d.ErrorNumber = 3888) + |> Array.map (Diagnostic.ofFSharpDiagnostic sourceText fsDoc.FilePath) + + if diagIndex >= diagnostics.Length then + None + else + let diagnostic = diagnostics[diagIndex] + let mutable captured: CodeAction option = None + + let register = + System.Action>(fun action _ -> captured <- Some action) + + let ctx = + CodeFixContext(fsDoc, diagnostic.Location.SourceSpan, ImmutableArray.Create diagnostic, register, CancellationToken.None) + + codeFix.RegisterCodeFixesAsync(ctx).Wait() + + match captured with + | None -> None + | Some action -> + let operations = action.GetOperationsAsync(CancellationToken.None).Result + + let applyOp = + operations + |> Seq.pick (function + | :? ApplyChangesOperation as op -> Some op + | _ -> None) + + let newSolution = applyOp.ChangedSolution + let newFsi = newSolution.GetDocument(fsiDoc.Id) + Some((newFsi.GetTextAsync().Result).ToString()) + +let private tryFixSig fsiCode fsCode = tryFixSigAt 0 fsiCode fsCode + +let private countDiags (fsiCode: string) (fsCode: string) : int = + let documents = RoslynTestHelpers.GetFsiAndFsDocuments fsiCode fsCode |> Seq.toList + let fsDoc = documents |> List.find (fun d -> not d.IsFSharpSignatureFile) + + let _, checkResults = + fsDoc.GetFSharpParseAndCheckResultsAsync "test" + |> Microsoft.VisualStudio.FSharp.Editor.CancellableTasks.CancellableTask.runSynchronouslyWithoutCancellation + + checkResults.Diagnostics + |> Array.filter (fun d -> d.ErrorNumber = 3888) + |> Array.length + +[] +let ``Module-level: RequireQualifiedAccess on nested module is inserted into .fsi`` () = + let fsiCode = + """ +module M +module Inner = + val x: int +""" + + let fsCode = + """ +module M +[] +module Inner = + let x = 42 +""" + + let expectedFsi = + """ +module M +[] +module Inner = + val x: int +""" + + let actual = tryFixSig fsiCode fsCode + Assert.Equal(expectedFsi, actual |> Option.defaultValue "") + +[] +let ``Type-level: RequireQualifiedAccess on union is inserted into .fsi`` () = + let fsiCode = + """ +module M +type U = A | B +""" + + let fsCode = + """ +module M +[] +type U = A | B +""" + + let expectedFsi = + """ +module M +[] +type U = A | B +""" + + let actual = tryFixSig fsiCode fsCode + Assert.Equal(expectedFsi, actual |> Option.defaultValue "") + +[] +let ``Function-level: NoDynamicInvocation on val is inserted into .fsi`` () = + let fsiCode = + """ +module M +val inline f: x: int -> int +""" + + let fsCode = + """ +module M +[] +let inline f (x: int) = x + 1 +""" + + let expectedFsi = + """ +module M +[] +val inline f: x: int -> int +""" + + let actual = tryFixSig fsiCode fsCode + Assert.Equal(expectedFsi, actual |> Option.defaultValue "") + +[] +let ``Attribute with argument: AllowNullLiteral(false) is copied verbatim with args`` () = + let fsiCode = + """ +module M +type C = + new: unit -> C +""" + + let fsCode = + """ +module M +[] +type C() = class end +""" + + let expectedFsi = + """ +module M +[] +type C = + new: unit -> C +""" + + let actual = tryFixSig fsiCode fsCode + Assert.Equal(expectedFsi, actual |> Option.defaultValue "") + +// ------------------------------------------------------------------------- +// Multi-attribute scenarios +// ------------------------------------------------------------------------- + +[] +let ``Two enforced attributes stacked on separate lines produce two independent fixes`` () = + let fsiCode = + """ +module M +val inline f: x: int -> int +""" + + let fsCode = + """ +module M +[] +[] +let inline f (x: int) = x + 1 +""" + // Two FS3888 diagnostics fire (one per missing attribute). + Assert.Equal(2, countDiags fsiCode fsCode) + + // First fix: NoDynamicInvocation. + let firstFsi = tryFixSigAt 0 fsiCode fsCode + Assert.Contains("[]", firstFsi |> Option.defaultValue "") + + // Second fix: RequiresExplicitTypeArguments. + let secondFsi = tryFixSigAt 1 fsiCode fsCode + Assert.Contains("[]", secondFsi |> Option.defaultValue "") + +[] +let ``Two enforced attributes on one line [] produce two independent fixes`` () = + let fsiCode = + """ +module M +val inline f: x: int -> int +""" + + let fsCode = + """ +module M +[] +let inline f (x: int) = x + 1 +""" + + Assert.Equal(2, countDiags fsiCode fsCode) + + let firstFsi = tryFixSigAt 0 fsiCode fsCode |> Option.defaultValue "" + // First diagnostic (NoDynamicInvocation): inserted as its OWN [< >] block + // - not concatenated with the second attribute. The wrap is per-attribute + // because SynAttribute.Range covers one attribute body, not the whole list. + Assert.Contains("[]", firstFsi) + // Should not have leaked the second attribute's text into the insertion. + Assert.DoesNotContain("[ Option.defaultValue "" + Assert.Contains("[]", secondFsi) + Assert.DoesNotContain("[] +let ``Mixed: enforced attr next to a non-enforced attr on same line - only the enforced one is copied`` () = + let fsiCode = + """ +module M +val inline f: x: int -> int +""" + + let fsCode = + """ +module M +[] +let inline f (x: int) = x + 1 +""" + + Assert.Equal(1, countDiags fsiCode fsCode) + let fsi = tryFixSig fsiCode fsCode |> Option.defaultValue "" + Assert.Contains("[]", fsi) + // System.Obsolete is not enforced - must not appear in the .fsi insertion. + Assert.DoesNotContain("System.Obsolete", fsi) + +[] +let ``Non-enforced attribute already on .fsi declaration - new attribute is added above and the existing one is kept`` () = + let fsiCode = + """ +module M +[] +val inline f: x: int -> int +""" + + let fsCode = + """ +module M +[] +[] +let inline f (x: int) = x + 1 +""" + + let fsi = tryFixSig fsiCode fsCode |> Option.defaultValue "" + // Both attributes should be present on the val in the .fsi. + Assert.Contains("[]", fsi) + Assert.Contains("""[]""", fsi) + +// ------------------------------------------------------------------------- +// Strengthened multi-attribute: exact text instead of Contains +// ------------------------------------------------------------------------- + +[] +let ``Stacked [][] both missing: first fix yields exact expected .fsi`` () = + let fsiCode = + """ +module M +val inline f: x: int -> int +""" + + let fsCode = + """ +module M +[] +[] +let inline f (x: int) = x + 1 +""" + + let expected = + """ +module M +[] +val inline f: x: int -> int +""" + + let actual = tryFixSigAt 0 fsiCode fsCode + Assert.Equal(expected, actual |> Option.defaultValue "") + +[] +let ``Semicolon [] both missing: first fix yields exact expected .fsi`` () = + let fsiCode = + """ +module M +val inline f: x: int -> int +""" + + let fsCode = + """ +module M +[] +let inline f (x: int) = x + 1 +""" + + let expected = + """ +module M +[] +val inline f: x: int -> int +""" + + let actual = tryFixSigAt 0 fsiCode fsCode + Assert.Equal(expected, actual |> Option.defaultValue "") + +// ------------------------------------------------------------------------- +// Symbol-lookup edge cases (top-level module, member-in-type) +// ------------------------------------------------------------------------- + +[] +let ``Top-level module attribute is inserted on the .fsi module line`` () = + let fsiCode = + """ +module M.Sub +val x: int +""" + + let fsCode = + """ +[] +module M.Sub +let x = 1 +""" + + let expected = + """ +[] +module M.Sub +val x: int +""" + + let actual = tryFixSig fsiCode fsCode + Assert.Equal(expected, actual |> Option.defaultValue "") + +[] +let ``Member inside type with NoDynamicInvocation: fix targets the member sig line`` () = + let fsiCode = + """ +module M +type T = + new: unit -> T + member inline F: x: int -> int +""" + + let fsCode = + """ +module M +type T() = + [] + member inline _.F(x: int) = x + 1 +""" + + let fsi = tryFixSig fsiCode fsCode |> Option.defaultValue "" + // The inserted attribute should be on the line directly above + // `member inline F:` in the .fsi (not above `new:` and not above `type T =`). + let lines = fsi.Split([| '\n' |]) + + let memberLineIdx = + lines + |> Array.findIndex (fun line -> line.TrimStart().StartsWith("member inline F:")) + + let prevLine = lines.[memberLineIdx - 1].TrimEnd() + Assert.Equal(" []", prevLine) + +// ------------------------------------------------------------------------- +// CodeAction title contract +// ------------------------------------------------------------------------- + +[] +let ``CodeAction title includes the bracketed attribute text`` () = + let fsiCode = + """ +module M +val inline f: x: int -> int +""" + + let fsCode = + """ +module M +[] +let inline f (x: int) = x + 1 +""" + + let documents = RoslynTestHelpers.GetFsiAndFsDocuments fsiCode fsCode |> Seq.toList + let fsDoc = documents |> List.find (fun d -> not d.IsFSharpSignatureFile) + let sourceText = fsDoc.GetTextAsync().Result + + let _, checkResults = + fsDoc.GetFSharpParseAndCheckResultsAsync "test" + |> Microsoft.VisualStudio.FSharp.Editor.CancellableTasks.CancellableTask.runSynchronouslyWithoutCancellation + + let diagnostic = + checkResults.Diagnostics + |> Array.find (fun d -> d.ErrorNumber = 3888) + |> Diagnostic.ofFSharpDiagnostic sourceText fsDoc.FilePath + + let mutable captured: CodeAction option = None + + let register = + System.Action>(fun a _ -> captured <- Some a) + + let ctx = + CodeFixContext(fsDoc, diagnostic.Location.SourceSpan, ImmutableArray.Create diagnostic, register, CancellationToken.None) + + codeFix.RegisterCodeFixesAsync(ctx).Wait() + + let action = + captured + |> Option.defaultWith (fun () -> failwith "expected a code-fix to be registered") + + Assert.Equal("Add [] to signature", action.Title) + +// ------------------------------------------------------------------------- +// Canonicalization: attributes whose .fs form needs an `open` get qualified +// so the inserted .fsi compiles without extra opens +// ------------------------------------------------------------------------- + +[] +let ``Conditional in .fs gets qualified as System.Diagnostics.Conditional in .fsi`` () = + let fsiCode = + """ +module M +type T = + new: unit -> T + member F: x: int -> unit +""" + // .fs has `open System.Diagnostics`; .fsi does NOT - the inserted + // attribute must qualify, otherwise the .fsi fails to compile. + let fsCode = + """ +module M +open System.Diagnostics +type T() = + [] + member _.F(x: int) = () +""" + + let fsi = tryFixSig fsiCode fsCode |> Option.defaultValue "" + Assert.Contains("[]", fsi) + // The bare Conditional form should NOT be present. + Assert.DoesNotContain("[]", fsi) + +[] +let ``EditorBrowsable in .fs gets qualified as System.ComponentModel.EditorBrowsable in .fsi`` () = + let fsiCode = + """ +module M +type T = class end +""" + + let fsCode = + """ +module M +open System.ComponentModel +[] +type T() = class end +""" + + let fsi = tryFixSig fsiCode fsCode |> Option.defaultValue "" + // Both the attribute head AND its enum-typed argument must be qualified + // so the .fsi compiles without `open System.ComponentModel`. + Assert.Contains("[]", fsi) + +[] +let ``Conditional with a dotted string argument is still canonicalized`` () = + // Regression: an earlier `attribText.Contains(".")` check would skip + // canonicalization for `Conditional("DEBUG.V1")` because of the `.` in + // the argument. Now only the attribute HEAD is checked for qualification. + let fsiCode = + """ +module M +type T = + new: unit -> T + member F: x: int -> unit +""" + + let fsCode = + """ +module M +open System.Diagnostics +type T() = + [] + member _.F(x: int) = () +""" + + let fsi = tryFixSig fsiCode fsCode |> Option.defaultValue "" + Assert.Contains("[]", fsi) + +[] +let ``Already-qualified attribute name is left alone (no double-qualify)`` () = + let fsiCode = + """ +module M +val inline f: x: int -> int +""" + + let fsCode = + """ +module M +[] +let inline f (x: int) = x + 1 +""" + + let fsi = tryFixSig fsiCode fsCode |> Option.defaultValue "" + Assert.Contains("[]", fsi) + +[] +let ``Obsolete in .fs gets qualified as System.Obsolete in .fsi`` () = + let fsiCode = + """ +module M +type T = class end +""" + + let fsCode = + """ +module M +open System +[] +type T() = class end +""" + + let fsi = tryFixSig fsiCode fsCode |> Option.defaultValue "" + Assert.Contains("[]", fsi) + Assert.DoesNotContain("[]", fsi) + +[] +let ``AttributeUsage with AttributeTargets enum gets head AND enum qualified`` () = + let fsiCode = + """ +module M +type MyAttr = + inherit System.Attribute + new: unit -> MyAttr +""" + + let fsCode = + """ +module M +open System +[] +type MyAttr() = + inherit Attribute() +""" + + let fsi = tryFixSig fsiCode fsCode |> Option.defaultValue "" + Assert.Contains("[]", fsi) + +[] +let ``Qualified EditorBrowsable head with bare enum arg still qualifies the enum`` () = + // Regression: previously the head check `head.Contains(".")` short- + // circuited the WHOLE canonicalization, leaving the bare enum reference + // in place. Now the enum-arg rewrite runs independently of head qualification. + let fsiCode = + """ +module M +type T = class end +""" + + let fsCode = + """ +module M +open System.ComponentModel +[] +type T() = class end +""" + + let fsi = tryFixSig fsiCode fsCode |> Option.defaultValue "" + Assert.Contains("[]", fsi) + +[] +let ``Already-qualified enum reference is not double-qualified`` () = + // Regression: a naive `Replace` would turn + // `System.ComponentModel.EditorBrowsableState.Never` into + // `System.ComponentModel.System.ComponentModel.EditorBrowsableState.Never`. + let fsiCode = + """ +module M +type T = class end +""" + + let fsCode = + """ +module M +[] +type T() = class end +""" + + let fsi = tryFixSig fsiCode fsCode |> Option.defaultValue "" + Assert.Contains("[]", fsi) + Assert.DoesNotContain("System.ComponentModel.System.ComponentModel.", fsi) diff --git a/vsintegration/tests/FSharp.Editor.Tests/CodeFixes/RemoveExtraAttributeFromImplementationTests.fs b/vsintegration/tests/FSharp.Editor.Tests/CodeFixes/RemoveExtraAttributeFromImplementationTests.fs new file mode 100644 index 00000000000..b90aee5de4a --- /dev/null +++ b/vsintegration/tests/FSharp.Editor.Tests/CodeFixes/RemoveExtraAttributeFromImplementationTests.fs @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +module FSharp.Editor.Tests.CodeFixes.RemoveExtraAttributeFromImplementationTests + +open System.Collections.Immutable +open System.Threading + +open Microsoft.CodeAnalysis +open Microsoft.CodeAnalysis.CodeActions +open Microsoft.CodeAnalysis.CodeFixes +open Microsoft.CodeAnalysis.Text + +open Microsoft.VisualStudio.FSharp.Editor + +open FSharp.Editor.Tests.Helpers +open FSharp.Editor.Tests.CodeFixes.CodeFixTestFramework +open Xunit + +let private codeFix = RemoveExtraAttributeFromImplementationCodeFixProvider() + +/// Same-document harness: builds an .fsi + .fs pair, runs the F# checker, +/// finds the FS3888 diagnostic at index `diagIndex` on the .fs, invokes the +/// reverse code-fix, and returns the resulting .fs text. +let private tryFixFsAt (diagIndex: int) (fsiCode: string) (fsCode: string) : string option = + let documents = RoslynTestHelpers.GetFsiAndFsDocuments fsiCode fsCode |> Seq.toList + let fsDoc = documents |> List.find (fun d -> not d.IsFSharpSignatureFile) + + let sourceText = fsDoc.GetTextAsync().Result + + let _, checkResults = + fsDoc.GetFSharpParseAndCheckResultsAsync "test" + |> Microsoft.VisualStudio.FSharp.Editor.CancellableTasks.CancellableTask.runSynchronouslyWithoutCancellation + + let diagnostics = + checkResults.Diagnostics + |> Array.filter (fun d -> d.ErrorNumber = 3888) + |> Array.map (Diagnostic.ofFSharpDiagnostic sourceText fsDoc.FilePath) + + if diagIndex >= diagnostics.Length then + None + else + let diagnostic = diagnostics[diagIndex] + let mutable captured: CodeAction option = None + + let register = + System.Action>(fun action _ -> captured <- Some action) + + let ctx = + CodeFixContext(fsDoc, diagnostic.Location.SourceSpan, ImmutableArray.Create diagnostic, register, CancellationToken.None) + + codeFix.RegisterCodeFixesAsync(ctx).Wait() + + match captured with + | None -> None + | Some action -> + let operations = action.GetOperationsAsync(CancellationToken.None).Result + + let applyOp = + operations + |> Seq.pick (function + | :? ApplyChangesOperation as op -> Some op + | _ -> None) + + let newSolution = applyOp.ChangedSolution + let newFsDoc = newSolution.GetDocument(fsDoc.Id) + Some((newFsDoc.GetTextAsync().Result).ToString()) + +let private tryFixFs fsiCode fsCode = tryFixFsAt 0 fsiCode fsCode + +[] +let ``Lone attribute on its own line is removed cleanly`` () = + let fsi = + """module M +val inline f: x: int -> int +""" + + let fs = + """module M +[] +let inline f (x: int) = x + 1 +""" + + let expected = + """module M +let inline f (x: int) = x + 1 +""" + + Assert.Equal(Some expected, tryFixFs fsi fs) + +[] +let ``First sibling in [] list is removed, second sibling preserved`` () = + let fsi = + """module M +val inline f: x: int -> int +""" + + let fs = + """module M +[] +let inline f (x: int) = x + 1 +""" + // Reverse-fix the FIRST diagnostic (NoDynamicInvocation). The other + // FS3888 (RequiresExplicitTypeArguments) is still pending but its + // separate code-action would remove the second sibling. + let expected = + """module M +[] +let inline f (x: int) = x + 1 +""" + + Assert.Equal(Some expected, tryFixFsAt 0 fsi fs) + +[] +let ``Second sibling in [] list is removed, first sibling preserved`` () = + let fsi = + """module M +val inline f: x: int -> int +""" + + let fs = + """module M +[] +let inline f (x: int) = x + 1 +""" + + let expected = + """module M +[] +let inline f (x: int) = x + 1 +""" + + Assert.Equal(Some expected, tryFixFsAt 1 fsi fs) + +[] +let ``Attribute on type with body is removed without breaking the type`` () = + let fsi = + """module M +type C = + new: unit -> C +""" + + let fs = + """module M +[] +type C() = class end +""" + + let expected = + """module M +type C() = class end +""" + + Assert.Equal(Some expected, tryFixFs fsi fs) + +[] +let ``Attribute with arguments is removed cleanly`` () = + let fsi = + """module M +type C = + new: unit -> C +""" + + let fs = + """module M +[] +type C() = class end +""" + + let expected = + """module M +type C() = class end +""" + + Assert.Equal(Some expected, tryFixFs fsi fs) diff --git a/vsintegration/tests/FSharp.Editor.Tests/FSharp.Editor.Tests.fsproj b/vsintegration/tests/FSharp.Editor.Tests/FSharp.Editor.Tests.fsproj index ff40debc105..0d05a915760 100644 --- a/vsintegration/tests/FSharp.Editor.Tests/FSharp.Editor.Tests.fsproj +++ b/vsintegration/tests/FSharp.Editor.Tests/FSharp.Editor.Tests.fsproj @@ -47,6 +47,8 @@ + + From 464e37b0546d2b39cf6b6ccf8ee30fadc8705cd7 Mon Sep 17 00:00:00 2001 From: Copilot Date: Fri, 12 Jun 2026 12:31:44 +0200 Subject: [PATCH 72/72] Fix SymStore PDB conversion failure for ComponentTests The Arcade SDK's Tests.props only auto-detects test projects with .Tests/.UnitTests/.IntegrationTests/.PerformanceTests suffixes. FSharp.Compiler.ComponentTests (ending with .ComponentTests) was not detected, causing IsShipping=true and triggering SymStore's Pdb2Pdb conversion which crashes on this large test assembly. Explicitly set IsTestProject=true for all test projects in the tests\Directory.Build.props to ensure .ComponentTests projects are treated as non-shipping and excluded from PDB conversion. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- tests/Directory.Build.props | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/Directory.Build.props b/tests/Directory.Build.props index ccc7e44ffa3..0c1a2882fda 100644 --- a/tests/Directory.Build.props +++ b/tests/Directory.Build.props @@ -22,6 +22,10 @@ true + + true