-
Notifications
You must be signed in to change notification settings - Fork 846
Closed
Labels
Area-FCSBugImpact-Medium(Internal MS Team use only) Describes an issue with moderate impact on existing code.(Internal MS Team use only) Describes an issue with moderate impact on existing code.Regression
Milestone
Description
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:
fsharp/src/fsharp/service/service.fs
Line 480 in 8bfb0c7
| member _.GetCachedCheckFileResult(builder: IncrementalBuilder, filename, sourceText: ISourceText, options) = |
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
| 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).
Metadata
Metadata
Assignees
Labels
Area-FCSBugImpact-Medium(Internal MS Team use only) Describes an issue with moderate impact on existing code.(Internal MS Team use only) Describes an issue with moderate impact on existing code.Regression