Skip to content

[automated] Merge branch 'main' => 'feature/net11-scouting'#19616

Merged
T-Gro merged 10 commits intofeature/net11-scoutingfrom
merge/main-to-feature/net11-scouting
Apr 20, 2026
Merged

[automated] Merge branch 'main' => 'feature/net11-scouting'#19616
T-Gro merged 10 commits intofeature/net11-scoutingfrom
merge/main-to-feature/net11-scouting

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

I detected changes in the main branch which have not been merged yet to feature/net11-scouting. I'm a robot and am configured to help you automatically keep feature/net11-scouting up to date, so I've opened this PR.

This PR merges commits made on main by the following committers:

  • dotnet-maestro[bot]
  • T-Gro
  • missymessa
  • OnurGumus
  • Copilot

Instructions for merging from UI

This PR will not be auto-merged. When pull request checks pass, complete this PR by creating a merge commit, not a squash or rebase commit.

merge button instructions

If this repo does not allow creating merge commits from the GitHub UI, use command line instructions.

Instructions for merging via command line

Run these commands to merge this pull request from the command line.

git fetch
git checkout main
git pull --ff-only
git checkout feature/net11-scouting
git pull --ff-only
git merge --no-ff main

# If there are merge conflicts, resolve them and then run git merge --continue to complete the merge
# Pushing the changes to the PR branch will re-trigger PR validation.
git push https://github.com/dotnet/fsharp HEAD:merge/main-to-feature/net11-scouting
or if you are using SSH
git push git@github.com:dotnet/fsharp HEAD:merge/main-to-feature/net11-scouting

After PR checks are complete push the branch

git push

Instructions for resolving conflicts

⚠️ If there are merge conflicts, you will need to resolve them manually before merging. You can do this using GitHub or using the command line.

Instructions for updating this pull request

Contributors to this repo have permission update this pull request by pushing to the branch 'merge/main-to-feature/net11-scouting'. This can be done to resolve conflicts or make other changes to this pull request before it is merged.
The provided examples assume that the remote is named 'origin'. If you have a different remote name, please replace 'origin' with the name of your remote.

git fetch
git checkout -b merge/main-to-feature/net11-scouting origin/feature/net11-scouting
git pull https://github.com/dotnet/fsharp merge/main-to-feature/net11-scouting
(make changes)
git commit -m "Updated PR with my changes"
git push https://github.com/dotnet/fsharp HEAD:merge/main-to-feature/net11-scouting
or if you are using SSH
git fetch
git checkout -b merge/main-to-feature/net11-scouting origin/feature/net11-scouting
git pull git@github.com:dotnet/fsharp merge/main-to-feature/net11-scouting
(make changes)
git commit -m "Updated PR with my changes"
git push git@github.com:dotnet/fsharp HEAD:merge/main-to-feature/net11-scouting

Contact .NET Core Engineering (dotnet/dnceng) if you have questions or issues.
Also, if this PR was generated incorrectly, help us fix it. See https://github.com/dotnet/arcade/blob/main/.github/workflows/scripts/inter-branch-merge.ps1.

Copilot AI and others added 10 commits April 16, 2026 10:32
…lows (#19567)

* Initial plan

* Add noop instructions to repo-assist and regression-pr-shepherd workflows

Reinforce noop requirement at key decision points:
- repo-assist: Command Mode exit path and Task FINAL fallthrough
- regression-pr-shepherd: When no eligible PRs exist

Fixes #17258 workflow failure (no safe outputs produced)

Agent-Logs-Url: https://github.com/dotnet/fsharp/sessions/ac165649-72fa-4613-bd06-fcdc9604f176

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>
…ion (#19369)

* Cache hash code in TypeStructure to fix O(n) GetHashCode regression

TypeStructure.GetHashCode was calling GenericHashArbArray on the
underlying TypeToken[] on every cache lookup, making each hash O(n).
In IDE mode with generative type providers this caused sustained ~150%
CPU as the type subsumption cache continuously rehashed all entries.

Pre-compute the hash when creating TypeStructure and store it in the
DU case. Add [<CustomEquality; NoComparison>] with a fast-path Equals
that checks the cached hash before comparing arrays.
* Migrate all .sln files to .slnx format

- Migrate 6 solutions to .slnx using `dotnet sln migrate`:
  FSharp, VisualFSharp, FSharp.Compiler.Service,
  Microsoft.FSharp.Compiler, FSharp.Benchmarks, LSPSolutionSlim
- Delete 3 redundant solutions:
  FSharp.Editor.sln (subset of VisualFSharp, zero CI/script refs)
  VSFSharpExtension.sln (subset of VisualFSharp, zero CI/script refs)
  TupleSample.sln (legacy 2016 test artifact, never referenced)
- Rename FSharp.Compiler.Service.sln.DotSettings to .slnx.DotSettings
- Update build scripts: eng/Build.ps1, eng/build.sh,
  eng/test-determinism.ps1, start-vs-FsharpSln.cmd
- Update CI pipelines: azure-pipelines-PR.yml,
  copilot-setup-steps.yml, commands.yml
- Update VSCode config: tasks.json, settings.json
- Update docs: README.md, DEVGUIDE.md, TESTGUIDE.md, test READMEs
- Update .gitignore with .slnx patterns

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

* Remove FSharp.Benchmarks solution and CI job

- Delete FSharp.Benchmarks.slnx
- Remove /Benchmarks/ folders from FSharp.slnx and VisualFSharp.slnx
- Remove Benchmarks CI job from azure-pipelines-PR.yml
- Remove -testBenchmarks flag from eng/Build.ps1 and eng/build.sh
- Remove benchmarking section from DEVGUIDE.md

The benchmark projects in tests/benchmarks/ remain on disk for
manual use but are no longer part of any solution or CI pipeline.

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

* Remove Microsoft.FSharp.Compiler.slnx, reference fsproj directly

The solution was a 1-project wrapper around
src/Microsoft.FSharp.Compiler/Microsoft.FSharp.Compiler.fsproj.
All callsites pass it to MSBuild via /p:Projects= which accepts
a project file directly. No solution needed.

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

* Remove manually-curated file lists from FSharp.slnx

Remove /Docs/ (60+ individually listed md/fsx/css/img files across
8 subfolders including release-notes that grow every release),
/eng/ (3 files), and /Solution Items/ (3 files) folders.

These cannot be maintained as manual lists in slnx (no glob support).
Keep only project references and stable config files in other solutions.

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

* Replace LSPSolutionSlim.slnx with VSFSharpExtension.slnx

- Remove LSPSolutionSlim.slnx (was only needed for GH copilot agent)
- Create VSFSharpExtension.slnx as slnx migration of VSFSharpExtension.sln
  with Misc.csproj for IDE visibility of miscellaneous files
- Remove LSPSolutionSlim build step from copilot-setup-steps.yml

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Fix recursive module do-binding leaking compiler-generated val in signature

Filter out compiler-generated vals with '@' in their LogicalName from
inferred signature printing. In 'module rec' contexts, 'do ()' bindings
are compiled as TMDefRec with vals named like 'doval@3' that leaked
into generated signatures.

Fixes #13832

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

* Fix literal values in attribute arguments during signature generation

When generating signatures, attribute arguments that reference [<Literal>]
values now preserve the literal identifier name instead of showing the
evaluated constant value. For example, [<Category(A)>] is preserved
instead of being reduced to [<Category("A")>].

The fix works by recovering literal val references from the syntax tree
during attribute checking: TcVal inlines literals to Expr.Const, but we
now look up the original identifier in the name resolution environment
and store Expr.Val as the source expression in AttribExpr. The Expr.Val
case is then handled in layoutAttribArg in NicePrint.fs to display the
literal name.

Fixes #13810

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

* Fix struct signature missing NoComparison/NoEquality attributes (#15339)

When generating signatures for struct types whose fields prevent
comparison/equality augmentation (e.g., fields of type obj), the
generated signature now includes [<NoComparison>] and [<NoEquality>]
attributes. Without these, the signature fails to compile with FS0293.

The fix detects when a struct type is a candidate for comparison/equality
augmentation but augmentation was not generated (GeneratedCompareToValues
or GeneratedHashAndEqualsValues is None), and injects synthetic attributes
into the signature output.

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

* Fix backtick escaping in AddBackticksToIdentifierIfNeeded (#15389)

Change single-backtick checks to double-backtick checks so identifiers
containing backticks in their names get properly escaped with `` `` ``
delimiters during signature generation.

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

* Fix private keyword placement in prefix-style type abbreviation signatures (#15560)

Move layoutAccessibility call after layoutTyparDecls so that 'private'
is placed before the entire ''a P' construct rather than between the
type parameter and name (producing 'type 'a private P' instead of
the correct 'type private 'a P').

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

* Fix missing [<Class>] attribute in signatures for types without visible constructors

When generating signatures for class types whose constructors are not
visible (e.g., private constructors), the [<Class>] attribute was not
emitted. This caused the generated signatures to fail compilation with
error FS0938 because the compiler cannot infer that the type is a class
from the signature alone.

The fix:
1. Always set start=Some "class" for class types regardless of
   printVerboseSignatures setting (was gated behind it before)
2. Suppress [<Class>] when allDecls is empty since the repr layout
   already produces 'class end' for empty classes
3. Remove commented-out conditions that were never active

Fixes #16531

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

* Add test coverage for literal attribute args and CompilerCompat

- Test multiple literal args in tuple attribute position (names recovered)
- Test qualified literal reference limitation (shows constant value)
- Add CompilerCompat test: type with literal-based attribute arg exercises
  Expr.Val in AttribExpr.source pickling across compiler versions

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

* Add guard condition and edge case tests for signature generation

- Struct with explicit [<NoComparison>] does not get duplicate attribute
- Struct with [<CustomComparison>] does not get [<NoComparison>] injected
- Empty class with private constructor uses 'class end' repr
- AbstractClass with private constructor roundtrips correctly

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

* Guard literal recovery against VRefNonLocal to prevent transitive deps

Only replace Expr.Const with Expr.Val in AttribExpr.source when the
literal val reference is local (VRefLocal). Cross-assembly literals
(VRefNonLocal from 'open ExternalLib') keep Expr.Const to avoid
creating unresolvable transitive assembly dependencies in pickled
metadata — consumers of the DLL may not reference the external assembly.

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

* Normalize Expr.Val back to Expr.Const in p_attrib_expr before pickling

The literal name recovery stores Expr.Val in AttribExpr.source as an
in-memory optimization for signature generation display. However, this
must NOT change the pickle format:

- Old compilers reading Expr.Val in AttribExpr.source would display
  '(* unsupported attribute argument *)' instead of the constant value
  in tooltips and signatures — a cross-version display regression.
- Old compilers' CheckDeclarations.fs pattern-matches on the source
  field and would miss the AssemblyVersion format warning.

By normalizing Expr.Val(literal_vref) back to Expr.Const(literal_value)
before pickling, the on-disk format is identical to before this PR.
The literal name display only works during the current compilation
(the signature generation use case), which is the correct scope.

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

* Fix literal recovery for named attrs and tighten doval filter

Two fixes from adversarial cross-model review:

1. Add SynExpr.App traversal to literal ident collector so named
   attribute arguments like [<Attr(Name = MyLiteral)>] also get
   literal name recovery. Previously only positional args worked.

2. Replace IsCompilerGeneratedName (any '@' in name) with targeted
   StartsWithOrdinal("doval@") in filterVal. The broad '@' check
   would incorrectly drop backtick-escaped user identifiers containing
   '@' from module rec signatures. The doval@ prefix is the only
   compiler-generated name pattern that leaks through TMDefRec bindings,
   matching the same pattern used in SignatureHash.fs.

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

* Add release notes for signature generation fixes

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

* Gate [<Class>] emission on showAttributes to fix FSI printing tests

The PR unconditionally set start=Some "class" for class types, causing
[<Class>] to appear in FSI output. Gate on denv.showAttributes instead
of the removed printVerboseSignatures check:
- FSI (showAttributes=false): no [<Class>] emitted (matches old behavior)
- GenerateSignature (showAttributes=true): [<Class>] emitted when needed
- --sig flag (showAttributes=true): [<Class>] emitted when needed

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

* Fix flaky help test: reset consolecolors before help output

Add --consolecolors+ before help flags (-?, /?, --help) in help tests
to ensure enableConsoleColoring is always true when help text is
generated. This prevents race conditions from concurrent tests that
temporarily set enableConsoleColoring to false (e.g., consolecolors
switch test), which caused Linux CI failures where the baseline
expected '(on by default)' but got '(off by default)'.

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

---------

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

Replace PAT-based auth for VSTS drop upload with AzureCLI@2 + WIF
service connection 'dnceng-devdiv-drop-rw-code-rw-wif'. The new flow
gets a DevDiv-scoped token via az CLI instead of using the PAT from
the DotNet-VSTS-Infra-Access variable group.

Work item: AB#10146
* Update dependencies from https://github.com/dotnet/roslyn build 20260416.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.7.0-1.26215.6 -> To Version 5.7.0-1.26216.4

* Update dependencies from https://github.com/dotnet/roslyn build 20260417.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.7.0-1.26215.6 -> To Version 5.7.0-1.26217.3

* Update dependencies from https://github.com/dotnet/roslyn build 20260417.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.7.0-1.26215.6 -> To Version 5.7.0-1.26217.5

---------

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Reset patterns:
- global.json
- eng/Version.Details.xml
- eng/Version.Details.props
- eng/Versions.props
- eng/common/**
- eng/TargetFrameworks.props
@github-project-automation github-project-automation Bot moved this from New to In Progress in F# Compiler and Tooling Apr 20, 2026
@T-Gro T-Gro merged commit cd47523 into feature/net11-scouting Apr 20, 2026
45 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in F# Compiler and Tooling Apr 20, 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.

4 participants