Skip to content

Bugfix :: Sequence points - #19278

Merged
T-Gro merged 43 commits into
mainfrom
bugfix/sequence-points
Mar 13, 2026
Merged

Bugfix :: Sequence points #19278
T-Gro merged 43 commits into
mainfrom
bugfix/sequence-points

Conversation

@T-Gro

@T-GroT-Gro commented Feb 12, 2026

Copy link
Copy Markdown
Member

Debug point / sequence point fixes

Breakpoints inside 'for x in xs -> body' (arrow syntax in list/array/seq
comprehensions) failed to bind because the SeqMap active pattern in
LowerComputedCollections.fs did not preserve debug point wrappers.
Fix: wrap body extraction in DebugPoints and return 'debug body', matching
the existing SeqCollectSingle pattern.
Add 3 tests verifying debug points exist on body expressions for list arrow,
array arrow, and do-yield comprehension forms.
 range (e.g., 'return 1' not just 'return') by using mFull instead of
keyword-only range m in DebugPointAtLeafExpr.Yes
- Fix use binding in CE to use DebugPointAtTarget.No on the SynMatchClause
to avoid generating an extra sequence point from the match target
- Add VerifyMethodSequencePoints test infrastructure to verify sequence
points for specific methods (e.g., Invoke, MoveNext, GenerateNext)
- Add CEDebugPoints test module with 3 tests validating the fixes
- Fix compiler: use full binding range (mBind) instead of keyword-only range
(leadingKeyword.Range) in mkSynCall for 'use' CE translation, eliminating
the use-keyword-only sequence point in state machine output.
- Extract verifyCEMethodDebugPoints helper to reduce test boilerplate.
- Change use test from async/Invoke to task/MoveNext for single-method SP
validation in the state machine.
- Update expected SP values to match actual compiler output.
- All 3 CEDebugPoints tests pass; PortablePdbs, ForArrowDebugPoints, and
AsyncExpressionStepping regression tests pass.
@T-Gro
T-Gro marked this pull request as ready for review February 12, 2026 17:01
@T-Gro
T-Gro requested a review from a team as a code ownerFebruary 12, 2026 17:01
@T-GroT-Gro changed the title WIP :: Bugfix :: Sequence points Bugfix :: Sequence points Feb 12, 2026
@T-Gro
T-Gro requested a review from abonieFebruary 12, 2026 17:03
@T-Gro
T-Groforce-pushed the bugfix/sequence-points branch from 38c2f6e to 1ce8e10CompareFebruary 12, 2026 22:43
T-Groand others added 6 commits February 13, 2026 00:03
…oc, and echo comments
Addresses NO-LEFTOVERS verifier feedback:
- Remove banner-style section separators in test helpers
- Remove xmldoc that restates function names
- Remove comments echoing code below them in test assertions
- Condense verbose implementation xmldoc to issue URLs
- Fix tryFixupSpan -> FixedSpan reference in ClassificationService.fs
- Fix duplicate URL in FindReferences.fs #line directive test
The function is only called internally within NameResolution.fs, so it
should not be exposed in the .fsi file. This minimizes the module's
public API surface as flagged by CODE-QUALITY verifier.
@github-actions

Copy link
Copy Markdown
Contributor

🔧 CLI Command Report

  • Command:/run fantomas
  • Outcome: success

✅ Patch applied:
- Files changed: 1
- Lines changed: 14

T-Groand others added 15 commits February 27, 2026 15:30
- Update ILVerify baselines for FSharp.Compiler.Service (4 files):
offset shifts from EmitStartOfHiddenCode change in bootstrap build
- Add PR #19278 URL to release note entries
- Fix fantomas formatting in NameResolution.fsi
- Merge main to pick up partitionWith and xUnit fixes
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… cleanup
Split out comment cleanup and API surface changes unrelated to the
sequence point fixes, as requested by reviewer @auduchinok.
Reverted files:
- vsintegration/ (5 source + 1 test file): comment condensation
- PrettyNaming.fs/fsi: doc comment removal
- NameResolution.fs: comment improvement
- NameResolution.fsi: RegisterUnionCaseTesterForProperty API removal
- FindReferences.fs: comment cleanup
- ProjectAnalysisTests.fs: comment cleanup
- check.ps1: trimming size (merge artifact)
- global.json: SDK version (merge artifact)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The IlxGen.fs fix adds unconditional EmitStartOfHiddenCode() at match
expression ends. This inserts nop instructions in FSharp.Core match
expressions, increasing the net9.0 trimmed size from 311296 to 311808.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…on tests
Production changes (vs main):
- IlxGen.fs: Remove .specialname from staticInitialization@ method (fixes
JMC debugger skipping module-level breakpoints)
- IlxGen.fs: Always emit EmitStartOfHiddenCode at match join points
(fixes#12052)
- CheckComputationExpressions.fs: Use mFull for yield/return debug point
ranges (fixes#19248), fix use binding debug points (fixes#19255)
Reverted from branch:
- LowerComputedCollections.fs SeqMap DebugPoints change (proven no-op)
- resumableCodeDefinitions removal (unrelated to debug points)
- All unrelated lexer/parser/service changes
Added instrumentation tests:
- H3: Verify for-line and body-line SPs are in same method (3 tests)
- H4: Verify no JMC-suppressing attrs on body method (2 tests)
- H1: Verify --realsig- same-method placement (1 test)
- #12052: Verify hidden FeeFee points ARE emitted at match joins
- #19248: Multi-line return expression range test
- #19255: Sequence point count verification for use in task CE
- Implicit yield regression check
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
# Conflicts:
#	docs/release-notes/.FSharp.Compiler.Service/10.0.300.md
#	tests/AheadOfTime/Trimming/check.ps1
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…debug point in list comprehension
- Update 211 .bsl files + 4 .fs test files: remove 'specialname' from
staticInitialization@() methods to match the intentional codegen change
from commit 5dce49e (baselines were overwritten by merge from main)
- Fix duplicate sequence point in LowerComputedCollections.fs: only wrap
with Expr.DebugPoint when lifting a let-binding's debug point, not for
simple body expressions (e.g. 'for x in xs -> x * x') which already
carry their own debug point
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@T-Gro
T-Gro enabled auto-merge (squash) March 10, 2026 11:13
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-project-automationgithub-project-automationBot moved this from New to In Progress in F# Compiler and ToolingMar 12, 2026
T-Groand others added 3 commits March 13, 2026 13:54
Resolve merge conflicts with main after PR #19372 (ILVerify fixes):
- Release notes: keep both PR's and #19372's entries
- ILVerify baselines: regenerated from clean builds
- CodeGenRenamings01 BSL: regenerated from clean build
- ForLoop, SeqExpressionStepping, AsyncExpressionStepping,
ComputationExpressions, TestFunction24 BSLs: auto-merged
successfully, verified by test runs
All tested locally - Debugger, ForLoop, SeqExpressionStepping,
AsyncExpressionStepping, ComputationExpressions, TestFunction24
tests pass.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update ILVerify baselines for RawByteMemory::set_Item IL offset change
(0x1F -> 0x25) in both net10.0 and netstandard2.0 configurations.
Update trimming check expected size for FSharp.Core.dll (310784 -> 311296).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

4 participants

@T-Gro@auduchinok@abonie@actions-user