Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/release-notes/.VisualStudio/18.vNext.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

### Fixed

* Peek Definition from C# or Visual Basic on an F# symbol shows the F# declaration in place; it used to show the symbol decompiled into C#, while Go To Definition on the same symbol opened the F# file. ([PR #20520](https://github.com/dotnet/fsharp/pull/20520))
* Improve Find All References performance by throttling parallel typechecks. ([PR #20128](https://github.com/dotnet/fsharp/pull/20128))
* Fixed Rename incorrectly renaming `get` and `set` keywords for properties with explicit accessors. ([Issue #18270](https://github.com/dotnet/fsharp/issues/18270), [PR #19252](https://github.com/dotnet/fsharp/pull/19252))
* Fixed Find All References crash when F# project contains non-F# files like `.cshtml`. ([Issue #16394](https://github.com/dotnet/fsharp/issues/16394), [PR #19252](https://github.com/dotnet/fsharp/pull/19252))
Expand All @@ -15,6 +16,7 @@
* Fix doubled F# diagnostics in tooltips. ([Issue #16360](https://github.com/dotnet/fsharp/issues/16360))
* Fix `NotSupportedException` in the memory-mapped-file optimization when copying `ReadOnlyMemory` into `MemoryMappedFileViewStream`. ([Issue #20263](https://github.com/dotnet/fsharp/issues/20263))
* Reduce allocations in the VS project options reactor: the command-line options and project options caches and the mailbox reply payloads now hold struct tuples, and `IProjectSite.CompilationBinOutputPath` returns `string voption` picked with a new `Array.tryPickV`. ([PR #20413](https://github.com/dotnet/fsharp/pull/20413))
* Go To Definition from C# or Visual Basic into an F# project no longer type checks the whole project: the file declaring the symbol is found from parsed declarations and checked alone, with the whole-project check as a fallback. ([PR #20465](https://github.com/dotnet/fsharp/pull/20465))

### Changed

Expand Down
11 changes: 11 additions & 0 deletions vsintegration/src/FSharp.Editor/Common/CancellableTasks.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1147,6 +1147,17 @@ module CancellableTasks =
return results
}

/// Runs the chooser over the items one at a time and stops at the first ValueSome.
let rec tryPick (chooser: 'T -> CancellableTask<'U voption>) (items: 'T list) : CancellableTask<'U voption> =
match items with
| [] -> singleton ValueNone
| item :: rest ->
cancellableTask {
match! chooser item with
| ValueSome picked -> return ValueSome picked
| ValueNone -> return! tryPick chooser rest
}

let inline ignore ([<InlineIfLambda>] ctask: CancellableTask<_>) = toUnit ctask

/// If this CancellableTask gets canceled for another reason than the token being canceled, return the specified value.
Expand Down
1 change: 1 addition & 0 deletions vsintegration/src/FSharp.Editor/FSharp.Editor.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
<Compile Include="Navigation\GoToDefinitionService.fs" />
<Compile Include="Navigation\NavigationBarItemService.fs" />
<Compile Include="Navigation\NavigateToSearchService.fs" />
<Compile Include="Navigation\CrossLanguageSymbolNavigation.fs" />
<Compile Include="Navigation\FindUsagesService.fs" />
<Compile Include="Navigation\FindDefinitionService.fs" />
<Compile Include="QuickInfo\WpfFactories.fs" />
Expand Down
Loading
Loading