Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adaptive refactorings and fixing code lens reference setting #1052

Merged
merged 3 commits into from Feb 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/FsAutoComplete.Core/CompilerServiceInterface.fs
Expand Up @@ -244,9 +244,8 @@ type FSharpCompilerServiceChecker(hasAnalyzers) =

/// This function is called when the entire environment is known to have changed for reasons not encoded in the ProjectOptions of any project/compilation.
member _.ClearCaches() =
let oldlastCheckResults = lastCheckResults
lastCheckResults.Dispose()
lastCheckResults <- memoryCache ()
oldlastCheckResults.Dispose()
checker.InvalidateAll()
checker.ClearLanguageServiceRootCachesAndCollectAndFinalizeAllTransients()

Expand Down
6 changes: 6 additions & 0 deletions src/FsAutoComplete.Core/Utils.fs
Expand Up @@ -503,6 +503,12 @@ module List =
let maxUnderThreshold nmax =
List.maxBy (fun n -> if n > nmax then 0 else n)

/// Groups a tupled list by the first item to produce a list of values
let groupByFst (tupledItems: ('Key * 'Value) list) =
tupledItems
|> List.groupBy (fst)
|> List.map (fun (key, list) -> key, list |> List.map snd)




Expand Down