-
Notifications
You must be signed in to change notification settings - Fork 803
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some errors are not reported if any of previous files contain errors #16708
Comments
If this is not Transparent Compiler, then I suspect this one #16576. |
Yeah, looks likely, I can bisect it once back to normal internet |
Hmm, after investigating this for a bit, it seems to be on purpose...? The diagnostics come from here: fsharp/src/Compiler/Checking/CheckDeclarations.fs Lines 5723 to 5729 in 0f520bc
Explicitly having fsharp/src/Compiler/Checking/CheckDeclarations.fs Lines 5650 to 5651 in 0f520bc
And we put diagnostics collected from previously checked files there. fsharp/src/Compiler/Service/FSharpCheckerResults.fs Lines 2926 to 2927 in 0f520bc
All of this seems to have been there for a while. I am not sure what the purpose of this is: fsharp/src/Compiler/Service/FSharpCheckerResults.fs Lines 2912 to 2915 in 0f520bc
Or what "background diagnostics" are supposed to be. We put the previous files' errors there now - maybe that's just wrong? |
I think previously this would only affect the current file, i.e. it wouldn't affect showing errors in other files. |
Yeah that would make sense. If I remove playing back background diagnostics, only this test fails: fsharp/tests/service/MultiProjectAnalysisTests.fs Lines 950 to 972 in 44af7c8
|
Consider a project consisting of two files:
module AbstractBaseClass.File1 a
There's an error expected for the type declaration:
However, it's missing because of the undefined
a
error in the previous file. Commentinga
out fixes the issue.It seems it's a relatively recent regression, as I don't recall seeing this behavior previously.
The text was updated successfully, but these errors were encountered: