Skip to content

Commit 222a5df

Browse files
committed
Merge pull request #419 from vasily-kirichenko/clean-up-frameworkTcImportsCache
clean up IncrementalFSharpBuild.frameworkTcImportsCache
2 parents 8c02f5a + b38091b commit 222a5df

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

src/fsharp/vs/IncrementalBuild.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1088,7 +1088,7 @@ module internal IncrementalFSharpBuild =
10881088
/// Global service state
10891089
type FrameworkImportsCacheKey = (*resolvedpath*)string list * string * (*ClrRoot*)string list* (*fsharpBinaries*)string
10901090
let private frameworkTcImportsCache = AgedLookup<FrameworkImportsCacheKey,(TcGlobals * TcImports)>(8, areSame=(fun (x,y) -> x = y))
1091-
1091+
let ClearFrameworkTcImportsCache() = frameworkTcImportsCache.Clear()
10921092
/// This function strips the "System" assemblies from the tcConfig and returns a age-cached TcImports for them.
10931093
let GetFrameworkTcImports(tcConfig:TcConfig) =
10941094
// Split into installed and not installed.

src/fsharp/vs/IncrementalBuild.fsi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ module internal IncrementalFSharpBuild =
5050

5151
/// Lookup the global static cache for building the FrameworkTcImports
5252
val GetFrameworkTcImports : TcConfig -> TcGlobals * TcImports * AssemblyResolution list * UnresolvedAssemblyReference list
53-
53+
val ClearFrameworkTcImportsCache: unit -> unit
54+
5455
type PartialCheckResults =
5556
{ TcState : TcState
5657
TcImports: TcImports

src/fsharp/vs/service.fs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2999,6 +2999,7 @@ type FSharpChecker(projectCacheSize, keepAssemblyContents, keepAllBackgroundReso
29992999
parseAndCheckFileInProjectCache.Clear()
30003000
braceMatchCache.Clear()
30013001
parseFileInProjectCache.Clear()
3002+
IncrementalFSharpBuild.ClearFrameworkTcImportsCache()
30023003
for i in 0 .. 2 do
30033004
System.GC.Collect()
30043005
System.GC.WaitForPendingFinalizers()

0 commit comments

Comments
 (0)