Skip to content

Commit af861e0

Browse files
authored
Checker: invalidate type check cache when clearing project (#16153)
* Checker: invalidate type check cache when clearing project
1 parent bdcedc1 commit af861e0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Compiler/Service/service.fs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1244,7 +1244,12 @@ type BackgroundCompiler
12441244

12451245
lock gate (fun () ->
12461246
options
1247-
|> Seq.iter (fun options -> incrementalBuildersCache.RemoveAnySimilar(AnyCallerThread, options)))
1247+
|> Seq.iter (fun options ->
1248+
incrementalBuildersCache.RemoveAnySimilar(AnyCallerThread, options)
1249+
1250+
parseCacheLock.AcquireLock(fun ltok ->
1251+
for sourceFile in options.SourceFiles do
1252+
checkFileInProjectCache.RemoveAnySimilar(ltok, (sourceFile, 0L, options)))))
12481253

12491254
member _.NotifyProjectCleaned(options: FSharpProjectOptions, userOpName) =
12501255
use _ =

0 commit comments

Comments
 (0)