Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/fsharp/vs/IncrementalBuild.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1088,7 +1088,7 @@ module internal IncrementalFSharpBuild =
/// Global service state
type FrameworkImportsCacheKey = (*resolvedpath*)string list * string * (*ClrRoot*)string list* (*fsharpBinaries*)string
let private frameworkTcImportsCache = AgedLookup<FrameworkImportsCacheKey,(TcGlobals * TcImports)>(8, areSame=(fun (x,y) -> x = y))

let ClearFrameworkTcImportsCache() = frameworkTcImportsCache.Clear()
/// This function strips the "System" assemblies from the tcConfig and returns a age-cached TcImports for them.
let GetFrameworkTcImports(tcConfig:TcConfig) =
// Split into installed and not installed.
Expand Down
3 changes: 2 additions & 1 deletion src/fsharp/vs/IncrementalBuild.fsi
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ module internal IncrementalFSharpBuild =

/// Lookup the global static cache for building the FrameworkTcImports
val GetFrameworkTcImports : TcConfig -> TcGlobals * TcImports * AssemblyResolution list * UnresolvedAssemblyReference list

val ClearFrameworkTcImportsCache: unit -> unit

type PartialCheckResults =
{ TcState : TcState
TcImports: TcImports
Expand Down
1 change: 1 addition & 0 deletions src/fsharp/vs/service.fs
Original file line number Diff line number Diff line change
Expand Up @@ -2999,6 +2999,7 @@ type FSharpChecker(projectCacheSize, keepAssemblyContents, keepAllBackgroundReso
parseAndCheckFileInProjectCache.Clear()
braceMatchCache.Clear()
parseFileInProjectCache.Clear()
IncrementalFSharpBuild.ClearFrameworkTcImportsCache()
for i in 0 .. 2 do
System.GC.Collect()
System.GC.WaitForPendingFinalizers()
Expand Down