Skip to content

Commit 2b62bf4

Browse files
authored
invalidate typecheck cache when invalidating a configuration (#12853)
1 parent b4b1aaa commit 2b62bf4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/fsharp/service/service.fs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -928,6 +928,10 @@ type BackgroundCompiler(
928928

929929
member bc.InvalidateConfiguration(options: FSharpProjectOptions, userOpName) =
930930
if incrementalBuildersCache.ContainsSimilarKey (AnyCallerThread, options) then
931+
parseCacheLock.AcquireLock(fun ltok ->
932+
for sourceFile in options.SourceFiles do
933+
checkFileInProjectCache.RemoveAnySimilar(ltok, (sourceFile, 0L, options))
934+
)
931935
let _ = createBuilderNode (options, userOpName, CancellationToken.None)
932936
()
933937

0 commit comments

Comments
 (0)