Skip to content

Simplify sequence point display#81104

Merged
333fred merged 4 commits intodotnet:mainfrom
333fred:refactor-sequence-point-display
Nov 10, 2025
Merged

Simplify sequence point display#81104
333fred merged 4 commits intodotnet:mainfrom
333fred:refactor-sequence-point-display

Conversation

@333fred
Copy link
Member

@333fred 333fred commented Nov 8, 2025

Right now, two different string parameters are used to control sequence point display. Neither string is used beyond null checks. I've simplified this to be just a single, more explanatory enum. Along the way, I noticed that BasicBlock's visualization is also broken, so I restored the private method that it used for that.

The string taken to control whether to use the inline sequence point display is never actually used other than being compared against `null`. Simplify that to just be a boolean flag.
The string passed to `sequencePoints` was only ever checked against `null`. Simplified to just passing a `bool`.
Instead of 2 boolean flags, which were inconsistently available, use a single enum to control sequence point visualization, with documentation about the differences in visualization behavior.
This was removed in dotnet#61064, and broke visualization of BasicBlocks. I've restored it and left a comment indicating its current use.
@333fred 333fred requested a review from a team as a code owner November 8, 2025 01:48
@333fred
Copy link
Member Author

333fred commented Nov 8, 2025

@dotnet/roslyn-compiler for review. Recommend commit-by-commit here for ease of reviewing mechanical changes:

Commit 1 moves one of the string parameters to a bool.
Commit 2 moves the other string parameters to a bool.
Commit 3 combines the bool parameters into a single enum.
Commit 4 restores the missing visualization method.

@jcouv jcouv self-assigned this Nov 8, 2025
@jcouv
Copy link
Member

jcouv commented Nov 8, 2025

Thanks for improving this :-) I've found that even small improvements to our test helpers bring me a lot of joy since it removes friction in something we do so much of.
It's been on my mind and I'm curious what you think when you get to validating that for runtime-async feature: instrumentation tests are still too hard to follow (test helpers usability isn't great). I think some EnC tests also

mechanical changes:

Just curious, did you use some automation to make this change? If so, consider sharing for educational purpose

Copy link
Member

@jcouv jcouv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM Thanks (commit 4) with a clarifying question

@333fred
Copy link
Member Author

333fred commented Nov 8, 2025

Just curious, did you use some automation to make this change?

Regex find/replace for most of it. Nothing special.

Copy link
Member

@jjonescz jjonescz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @tmat

@tmat
Copy link
Member

tmat commented Nov 10, 2025

Can we use AI to eliminate Minimal (convert all those tests that use it to Enhanced)?

@333fred
Copy link
Member Author

333fred commented Nov 10, 2025

Can we use AI to eliminate Minimal (convert all those tests that use it to Enhanced)?

I've tried similar things recently, and the size of our test output is enough to kill any context windows I've tried.

@333fred 333fred merged commit 0544ad5 into dotnet:main Nov 10, 2025
26 checks passed
@333fred 333fred deleted the refactor-sequence-point-display branch November 10, 2025 17:12
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Nov 10, 2025
333fred added a commit to 333fred/roslyn that referenced this pull request Nov 10, 2025
* upstream/main:
  Simplify sequence point display (dotnet#81104)
  [main] Update dependencies from dotnet/arcade (dotnet#81129)
  [main] Update dependencies from dotnet/arcade (dotnet#81105)
  Target typed conditional expression recovery (dotnet#81025)
  dotnet#81118: Fix dropdown in "Move static members" dialog (dotnet#81119)
  Don't emit DebuggerStepThroughAttribute for runtime async methods (dotnet#81035)
@davidwengier davidwengier modified the milestones: Next, 18.3 Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants