Type checking is cancelled on parsing errors in the compiler compilations
- Dominant language
- F#
- Stars
- 4.3k
- Forks
- 876
- Avg merge
- 4d 8h
- Merged PRs (30d)
- 133
Description
While adding tests to #18311, I've noticed two things about reporting type checker errors:
* Type checker errors are [not reported](https://github.com/dotnet/fsharp/blob/a9f59cd4e55d7853e1f05e88e7a3d1ac2479c674/tests/FSharp.Test.Utilities/CompilerAssert.fs#L811) in the component tests when there're any parsing errors
* This makes it less suitable for testing the compiler service, since the errors are actually produced and reported there. This behavior is, however, inline with the actual compiler (not the service), so it's not clear what is the desired option here
* The compiler [stops](https://github.com/dotnet/fsharp/blob/e92bb80d7eb1c312159f077141ce9293e784032a/src/Compiler/Driver/fsc.fs#L563) when encountering syntax errors. It makes failing builds fail faster, but is it the behavior that we want? I.e. when there's a parser error, it seems that unrelated type checker errors are not going to be reported. I think reporting all known errors, like we do in the service, would be much more helpful with fixing these errors.
Contributor guide
Assessment
This issue has not been assessed yet.