Skip to content

Commit

Permalink
Adaptive refactorings and fixing code lens reference setting (#1052)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAngryByrd committed Feb 4, 2023
1 parent 63e5bbd commit 78d1fd4
Show file tree
Hide file tree
Showing 4 changed files with 224 additions and 227 deletions.
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

0 comments on commit 78d1fd4

Please sign in to comment.