Consider the following repro steps for project with two files:
- Parse and check File2.fs (File1.fs is checked as a dependency, results for File1 and File2 get cached)
- Change File1.fs and parse and check it
- Parse and check File2.fs again, it'll have the same stamp (since its source hasn't changed), so it will use the old results
The following code uses the incremental builder cache that is seemingly never updated by the background compiler after a file check:
|
member _.GetCachedCheckFileResult(builder: IncrementalBuilder, filename, sourceText: ISourceText, options) = |
After checking a file only background compiler caches are updated, not the incremental builder ones:
|
bc.RecordTypeCheckFileInProjectResults(fileName, options, parsingOptions, parseResults, fileVersion, timeStamp, Some checkAnswer, sourceText.GetHashCode()) |
This was discussed in #11228 (comment), but FCS 39 has different logic there, and a different fix is needed (unless the PR with the fix is merged soon and everything else is considered stable enough for a new FCS release).
Consider the following repro steps for project with two files:
The following code uses the incremental builder cache that is seemingly never updated by the background compiler after a file check:
fsharp/src/fsharp/service/service.fs
Line 480 in 8bfb0c7
After checking a file only background compiler caches are updated, not the incremental builder ones:
fsharp/src/fsharp/service/service.fs
Line 567 in 8bfb0c7
This was discussed in #11228 (comment), but FCS 39 has different logic there, and a different fix is needed (unless the PR with the fix is merged soon and everything else is considered stable enough for a new FCS release).