Distinguish struct tuples in quotation output by T-Gro · Pull Request #20814 · dotnet/fsharp · GitHub
Skip to content

Distinguish struct tuples in quotation output - #20814

Merged
T-Gro merged 2 commits into
mainfrom
fix/issue-20800
Oct 21, 2026
Merged

T-Gro merged 2 commits into
mainfrom
fix/issue-20800

Conversation

@T-Gro

@T-Gro T-Gro commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Fixes #20800

Print struct tuple construction as NewStructTuple in quotation output while keeping reference tuples as NewTuple.

Description

Tuple construction, matching, and types are unchanged.

Checklist

  • Test cases added

  • Performance benchmarks added in case of performance changes

  • Release notes entry updated:

    Please make sure to add an entry with short succinct description of the change as well as link to this pull request to the respective release notes file, if applicable.

    Release notes files:

    • If anything under src/Compiler has been changed, please make sure to make an entry in docs/release-notes/.FSharp.Compiler.Service/<version>.md, where <version> is usually "highest" one, e.g. 42.8.200
    • If language feature was added (i.e. LanguageFeatures.fsi was changed), please add it to docs/release-notes/.Language/preview.md
    • If a change to FSharp.Core was made, please make sure to edit docs/release-notes/.FSharp.Core/<version>.md where version is "highest" one, e.g. 8.0.200.

    Information about the release notes entries format can be found in the documentation.
    Example:

    If you believe that release notes are not necessary for this PR, please add NO_RELEASE_NOTES label to the pull request.

Use the stored tuple type only to select the debug-layout node name.
Preserve tuple construction, patterns, types and shape reconstruction.
Cover all four renderers with typed/untyped literals, both constructors,
mixed nesting, generic lambdas, and literal/constructed arities 7/8/9.
Add the VNEXT 11.0.200 FSharp.Core printer-only release note.

All commands below used BUILDING_USING_DOTNET=true and
FSHARPCORE_USE_PACKAGE=false. MTP options are passed directly: the
selected SDK rejects the handoff's extra "--" separator.

RED/GREEN command (plus Detailed output and xUnit XML diagnostics):
dotnet test --project tests\FSharp.Core.UnitTests\FSharp.Core.UnitTests.fsproj -c Debug -f net11.0 --filter-method "*Issue 20800*"
Before product edits: 2 executed, reference passed, struct failed,
exit 2. Expected: NewStructTuple (Value (1), Value ("a"))
Actual: NewTuple (Value (1), Value ("a"))
After the printer-only change: unchanged pair 2/2 passed, exit 0.
Expanded matrix: 3/3 passed, exit 0.

Both RED and GREEN loaded version 11.0.0.0 from:
C:\agents\fsharp-worktrees\issue-2112\artifacts\bin\FSharp.Core.UnitTests\Debug\net11.0\FSharp.Core.dll
Each matched the corresponding just-built repository core output:
C:\agents\fsharp-worktrees\issue-2112\artifacts\bin\FSharp.Core\Debug\net10.0\FSharp.Core.dll
RED SHA256: C1CDC73CE62BAB4DF4478F94CBA53488D69758C896734C4B15D61998DCB28AEF
GREEN SHA256: 05129632B3E6821E6E857FDF2EA68A0AEDC3FD4B67EC783707EC7203DFEE3E5D
Temporary runtime provenance diagnostics were removed.

Validation (all exit 0):
.\build.cmd -c Release
  Initial and final composite builds: 0 errors.
dotnet test --project tests\FSharp.Core.UnitTests\FSharp.Core.UnitTests.fsproj -c Debug -f net11.0 --filter-class "FSharp.Core.UnitTests.Quotations.*" --minimum-expected-tests 1
  29/29 passed, including unchanged tuple active-pattern facts.
dotnet test --project tests\FSharp.Core.UnitTests\FSharp.Core.UnitTests.fsproj -c Debug -f net11.0
  Total 6358: 6353 passed, 5 skipped, 0 failed.
dotnet test --project tests\FSharp.Compiler.ComponentTests\FSharp.Compiler.ComponentTests.fsproj -c Release -f net11.0 --filter-class "Conformance.Expressions.ExpressionQuotations.*" --minimum-expected-tests 1
  123/123 passed, including rendering snapshots.
dotnet test --project tests\fsharp\FSharpSuite.Tests.fsproj -c Debug -f net472 -p:BUILDING_USING_DOTNET=false --filter-method "*quotes-*" --output Detailed --minimum-expected-tests 3
  3/3 passed: quotes-FSC-FSC_DEBUG, quotes-FSC-BASIC, quotes-FSI-BASIC.
  These cases are #if !NETCOREAPP; net11.0 cannot discover them.
  MTP method filtering needs the leading wildcard for qualified names.
  MSBuild property enables desktop targeting; environment retains the
  values above and repository core project references remain in use.

Both requested file-scoped Fantomas commands ran. The product branch
is formatted; tests/ is intentionally excluded by .fantomasignore.
No unrelated formatting. git diff --check passed.
Bounded read-only expert-reviewer review using GPT-5.4: no findings.
Copilot Coding Agent-only final CoreCLR sweep is not applicable to
this Copilot CLI execution.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@T-Gro
T-Gro requested a review from abonie October 20, 2026 10:27
@T-Gro
T-Gro enabled auto-merge (squash) October 21, 2026 10:40
@github-project-automation github-project-automation Bot moved this from New to In Progress in F# Compiler and Tooling Oct 21, 2026
@T-Gro
T-Gro merged commit d0b662a into main Oct 21, 2026
56 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in F# Compiler and Tooling Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Printed quotations show a struct tuple as NewTuple

3 participants