Fix #16708 / Some errors are not reported if any of previous files contain errors
Description
Fixes #16708
I don't know what originally caused this, but here's a proposed fix. We move the playback of background diagnostics to after we do a type check, so that previous errors don't trigger the suppression check for cascading errors.
Checklist
- [x] Test cases added
- [ ] ~Performance benchmarks added in case of performance changes~
- [x] Release notes entry updated:
:heavy_exclamation_mark: Release notes required
:white_check_mark: Found changes and release notes in following paths:
Change path Release notes path Description src/Compilerdocs/release-notes/.FSharp.Compiler.Service/8.0.300.md
I don't know what originally caused this,
If it's fairly recent, also #15840 comes to mind.
I did not. Git blame only lead to refactoring/cleanup commits and I was too lazy to dig deeper or set up a bisect script.
The only side-effect of this change that comes to mind is that the diagnostics will potentially be in different order. But I don't think you can say one ordering is better than the other. File related diagnostics will still be in the same order as before, just whatever else might be at the end now.
And if this breaks something that we don't have tests for then we can fix it and add those tests when it comes up 🤷