Skip to content

Add symbol and type highlighting to F# diagnostics - #20097

Merged
T-Gro merged 14 commits into
dotnet:mainfrom
auduchinok:richDiagnostics
Aug 12, 2026
Merged

Add symbol and type highlighting to F# diagnostics#20097
T-Gro merged 14 commits into
dotnet:mainfrom
auduchinok:richDiagnostics

Conversation

@auduchinok

Copy link
Copy Markdown
Member

Implements highlighting for symbols and types in diagnostic messages to be used by IDEs and tools like F# Interactive.

To make it possible, this PR introduces RichText type which wraps TaggedText[] uses and making the code simpler to work with in existing FCS APIs like tooltips.

The FSComp helpers generation is changed in a way that the same format works without changes, and only an additional RichText flag is needed in the fsproj.

@auduchinok
auduchinok requested a review from a team as a code ownerJuly 29, 2026 16:39
@auduchinokauduchinok changed the title Diagnostics: classify errors using RichTextAdd symbol and type highlighting to F# diagnosticsJul 29, 2026
@github-actionsgithub-actionsBot added ⚠️ Affects-Bootstrap Tooling check: PR touches compiler bootstrap chain ⚠️ Affects-Build-Infra Tooling check: PR touches build infrastructure labels Jul 29, 2026
@github-actions

This comment has been minimized.

@github-actionsgithub-actionsBot added the ⚠️ Affects-Compiler-Output Tooling check: PR touches IL emission or codegen label Jul 29, 2026
@github-actions

This comment has been minimized.

@auduchinok

Copy link
Copy Markdown
MemberAuthor

This is ready.

Comment threadsrc/Compiler/FSharp.Compiler.Service.fsproj
Comment threadtests/FSharp.Compiler.Service.Tests/FsiHelpTests.fs Outdated
Comment threadFSharpBuild.Directory.Build.targets Outdated
Comment threadsrc/Compiler/Facilities/DiagnosticsLogger.fsi Outdated
Comment threadsrc/Compiler/Facilities/RichText.fs Outdated
@github-actions

This comment has been minimized.

@github-actions

github-actionsBot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

⚠️ Release notes required, but author opted out

Warning

Author opted out of release notes, check is disabled for this pull request.
cc @dotnet/fsharp-team-msft

@github-actions

Copy link
Copy Markdown
Contributor

🔍 Tooling Safety Check — Affects-Bootstrap, Affects-Build-Infra, Affects-Compiler-Output
Affects-Bootstrap: modifies proto.proj, lex.fsl, pars.fsy
Affects-Build-Infra: modifies FSharpBuild.Directory.Build.targets, FSharpEmbedResourceText.fs
Affects-Compiler-Output: modifies IlxGen.fs, ilwrite.fs, ilreflect.fs

Generated by PR Tooling Safety Check · opus46 3.1M ·

@auduchinokauduchinok added the NO_RELEASE_NOTES Label for pull requests which signals, that user opted-out of providing release notes label Aug 10, 2026
@T-Gro

Copy link
Copy Markdown
Member

Approved, but I see a CI failure (will need to re-approve as any new push dismisses the review no)

@github-project-automationgithub-project-automationBot moved this from New to In Progress in F# Compiler and ToolingAug 12, 2026
auduchinokand others added 3 commits August 12, 2026 11:23
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@T-Gro
T-Gro merged commit 208b7b4 into dotnet:mainAug 12, 2026
55 checks passed
@github-project-automationgithub-project-automationBot moved this from In Progress to Done in F# Compiler and ToolingAug 12, 2026
@auduchinok
auduchinok deleted the richDiagnostics branch August 12, 2026 12:32
@nojafnojaf mentioned this pull request Aug 21, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⚠️ Affects-BootstrapTooling check: PR touches compiler bootstrap chain⚠️ Affects-Build-InfraTooling check: PR touches build infrastructure⚠️ Affects-Compiler-OutputTooling check: PR touches IL emission or codegenNO_RELEASE_NOTESLabel for pull requests which signals, that user opted-out of providing release notes

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants

@auduchinok@T-Gro