-
Notifications
You must be signed in to change notification settings - Fork 832
Closed
Labels
Area-LangService-DiagnosticsFCS code analysis, diagnostics, red squiggliesFCS code analysis, diagnostics, red squiggliesBugImpact-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.
Milestone
Description
Repro steps:
- In VS, create a a console app project (legacy or newer).
- Once created, add a file named 'File1.fs' above 'Program.fs'
- Open both files, each with their own window and make sure they are visible.
- For File1.fs, use the following code and save file:
module File1
let say () = ()- In Program.fs, use the following code and save file:
[<EntryPoint>]
let main argv =
File1.say()
0- With both files open, each in their own window and visible, modify, but don't save, 'File1.fs' by commenting out
let say () = (). - Observe that
Program.fsis not giving an error, which it should (this is a bug). - Close and re-open 'Program.fs', observe the error is still not appearing (this is a bug).
- Then save
File1.fs. - Also Observe again that 'Program.fs' is not giving an error, (this is a bug).
- Close and re-open 'Program.fs', the error should now be showing.
The main problem is in FCS, but changes may be required in VS also.
FCS does receive the current text from text buffers, but when other files are parsed and type checked, it doesn't take into account files it depends on are invalidated because we rely on timestamps when a file was last wrote. This is the reason why we have issues with rename when editing a file but not saving.
Imagine we fixed the problem in FCS, we still need to make changes in our VS tooling to pass this information along most likely.
The fix for this might not be easy, but an effective start would probably be a way to pass stamps from VS to FCS on documents like we do for projects.
Metadata
Metadata
Assignees
Labels
Area-LangService-DiagnosticsFCS code analysis, diagnostics, red squiggliesFCS code analysis, diagnostics, red squiggliesBugImpact-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.
Type
Projects
Status
Done