From 3f3a0e6772eb356f2c88680016fe085e50c7b604 Mon Sep 17 00:00:00 2001 From: Andrii Chebukin Date: Mon, 14 Sep 2026 01:01:20 +0200 Subject: [PATCH 1/2] Use ValueOption to look up a reference's definition item Co-Authored-By: Claude Sonnet 5 --- .../src/FSharp.Editor/Navigation/FindUsagesService.fs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vsintegration/src/FSharp.Editor/Navigation/FindUsagesService.fs b/vsintegration/src/FSharp.Editor/Navigation/FindUsagesService.fs index c313d4f27ee..a81d2ec3fed 100644 --- a/vsintegration/src/FSharp.Editor/Navigation/FindUsagesService.fs +++ b/vsintegration/src/FSharp.Editor/Navigation/FindUsagesService.fs @@ -44,9 +44,9 @@ module FSharpFindUsagesService = externalDefinitionItem else definitionItems - |> Array.tryFind (snd >> (=) doc.Project.FilePath) - |> Option.map (fun (definitionItem, _) -> definitionItem) - |> Option.defaultValue externalDefinitionItem + |> Array.tryFindV (snd >> (=) doc.Project.FilePath) + |> ValueOption.map (fun (definitionItem, _) -> definitionItem) + |> ValueOption.defaultValue externalDefinitionItem let referenceItem = FSharpSourceReferenceItem(definitionItem, FSharpDocumentSpan(doc, fixedSpan)) From ec0737f310aaf12e69e9c6a48e1632cb0735999e Mon Sep 17 00:00:00 2001 From: Andrii Chebukin Date: Mon, 14 Sep 2026 01:29:33 +0200 Subject: [PATCH 2/2] Add release note Co-Authored-By: Claude Sonnet 5 --- docs/release-notes/.VisualStudio/18.vNext.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/release-notes/.VisualStudio/18.vNext.md b/docs/release-notes/.VisualStudio/18.vNext.md index ba03f663967..4a00e4c91a2 100644 --- a/docs/release-notes/.VisualStudio/18.vNext.md +++ b/docs/release-notes/.VisualStudio/18.vNext.md @@ -22,3 +22,4 @@ * Unused analyzers: disable in VS when file has errors ([PR #19892](https://github.com/dotnet/fsharp/pull/19892)) * Move to Roslyn's unified ExternalAccess library ([PR #20099](https://github.com/dotnet/fsharp/pull/20099)) * Remove trailing whitespace from source files. No functional change: whitespace inside string literals and inactive `#if` regions is preserved. ([PR #20355](https://github.com/dotnet/fsharp/pull/20355)) +* `FSharpFindUsagesService.onSymbolFound` looks up a reference's definition item with `voption` instead of `option`. No functional change. ([PR #20534](https://github.com/dotnet/fsharp/pull/20534))