Skip to content

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

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

[automated] Merge branch 'main' => 'feature/net11-scouting'#19589
T-Gro merged 11 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
  • edgarfgp
  • techiedesu
  • github-actions[bot]

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.

T-Gro and others added 11 commits April 14, 2026 16:25
…ramException, stack corruption (#19338)

* Fix runtime crashes: TypeLoadException, InvalidProgramException, stack corruption
…query CEs (#19581)

Fixes #14566

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… unused (#19580)

Fixes #4473

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
ParserErrors.fs — horizontal error handling coverage:
  missing arguments (error 224), invalid integer arguments (error 241),
  out-of-range warn level (error 1050), unrecognized target (error 1048),
  unsupported checksum algorithm (error 1065), unrecognized options (error 243).

UncoveredOptions.fs — smoke tests for options without dedicated coverage:
  switch options (+/-), unit options, valid string values,
  compilation modes, diagnostic options.

Co-authored-by: Tomas Grosup <Tomas.Grosup@gmail.com>
…19468)

* Add regression test for #9382: SRTP stress test with matrix inverse

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

* Add regression test for #13114: SynPat.Record and QuoteExpr traversal

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

* Fix regression tests for #13114: remove unrelated test, add IsInst and FromParseError

- Remove the SRTP matrix inverse test from MemberConstraints.fs: it references
  issue #9382 and is unrelated to this PR (#13114).
- Add SynPat.IsInst test: verifies defaultTraverse descends into the SynType
  inside :? type-test patterns.
- Add SynPat.FromParseError test: verifies defaultTraverse descends into the
  nested pattern wrapped by FromParseError.

Per reviewer feedback from @abonie.

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

* Remove extra trailing newline in TreeVisitorTests (retrigger CI)

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

* Remove SynPat.IsInst test: defaultTraverse does not handle IsInst (bug still present)

SynPat.IsInst is not in the traversePat defaultTraverse in ServiceParseTreeWalk.fs,
so the test asserting it works was failing on all platforms.

Keeping Record, QuoteExpr, and Paren (FromParseError-labelled) tests which pass.

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

* Fix #13114: Handle SynPat.IsInst and SynPat.FromParseError in defaultTraverse

Add SynPat.IsInst and SynPat.FromParseError cases to the defaultTraverse
function in traversePat (ServiceParseTreeWalk.fs):
- SynPat.IsInst: traverses into the SynType via traverseSynType
- SynPat.FromParseError: traverses into the wrapped SynPat

Add regression test for SynPat.IsInst traversal using :? type test pattern.

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

* Rename 'pat' to 'ty' in SynPat.IsInst case (it's a type, not a pattern)

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>
…it FSI scenario (#19471)

* Fix SRTP overload resolution across FSI submissions (#12386)

Root cause: The TTrait solution ref cell is shared between typar constraints
and expression tree nodes (TOp.TraitCall). After typechecking, the codegen/
optimizer path calls SolveMemberConstraint with NoTrace, permanently mutating
the shared ref cell. In FSI, this mutation bleeds into the TcEnv carried to
the next submission, causing SolveMemberConstraint to return early with a
stale solution that doesn't unify the return type — triggering FS0030.

In compiled code (cross-DLL), pickling naturally creates fresh ref cells, so
the consumer starts with clean constraints. FSI had no equivalent isolation.

Fix: At generalization time in GeneralizeVal, when running in interactive mode,
decouple the typar constraints' TTrait solution ref cells from the expression
tree by cloning with fresh ref cells (TraitConstraintInfo.CloneWithFreshSolution).
This way:
- Same-submission call sites still see the solution (via the typar's own cell,
  which has the canonicalization result copied at clone time)
- Codegen mutates the expression tree's original cell (unaffected)
- Next submission instantiates from the typar's decoupled cell (no codegen
  contamination)

The fix is guarded by isInteractive so it has zero impact on batch compilation.
This matches the cross-DLL behavior where pickling creates independent cells.

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

* Add regression test for #12386: SRTP trait call correct overload resolution

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

* Fix fantomas formatting in TypedTreeOps.Remap.fs

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… API (#19498)

* Fix #3939: Hide compiler-generated auto-property symbols from Symbols API

Fixes #3939

Mark the compiler-generated `v` setter parameter and backing field
identifiers in auto-property desugaring with synthetic ranges, so they
are excluded from GetAllUsesOfAllSymbolsInFile(). Previously these
internal symbols leaked through the API with empty EnclosingEntity
and misleading DisplayName/CompiledName values.

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

* Fix CI: update ProjectAnalysisTests to match synthetic auto-property symbols

Remove compiler-generated auto-property backing fields and setter
parameter 'v' from expected symbol arrays in 'Test Project24 all symbols'
and 'Test symbol uses of properties with both getters and setters'.
These symbols are now correctly hidden by MakeSynthetic() ranges.

Also merge with latest main.

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

* Bump FSBuildVersion to 101: packages 11.0.100 and 43.12.100 already published

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…tes (#19315)

* Fix AttributeUsage.AllowMultiple not inherited for C#-defined attributes (#17107)

The F# compiler was not walking the inheritance chain for IL-imported (C#)
attribute types when checking AllowMultiple. The supersOfTyconRef function
only used tcaug_super, which is not populated for IL types.

This fix simplifies TryFindAttributeUsageAttribute to only check the
current type, and adds a recursive allowsMultiple function in
PostInferenceChecks that walks the inheritance chain using
GetSuperTypeOfType, which correctly handles both F# and IL-imported types.

Based on work by edgarfgp in PR #19315.
Fixes #17107

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

* Use O(1) WellKnownILAttributes fast-path for AttributeUsage lookup

Switch TryFindAttributeUsageAttribute to use tryBindTyconRefAttributeCore
with ValueSome WellKnownILAttributes.AttributeUsageAttribute, enabling
O(1) early exit on IL types that lack [AttributeUsage]. This avoids a
full linear attribute scan at each level of the inheritance chain walk.

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

---------

Co-authored-by: Tomas Grosup <Tomas.Grosup@gmail.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add synchronization to ensure the async computation has actually started
running on the thread pool before cancelling the default token. Without
this, under heavy CI load the thread pool may not schedule the async
within the 1-second wait window, causing the task to never transition
to Canceled state before the timeout.

This mirrors the pattern already used by the CancellationPropagatesToGroup
test which uses a ManualResetEvent for the same purpose.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…414.1 (#19587)

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.26210.5 -> To Version 5.7.0-1.26214.1

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 16, 2026
@T-Gro T-Gro merged commit 6156944 into feature/net11-scouting Apr 16, 2026
46 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in F# Compiler and Tooling Apr 16, 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.

3 participants