-
-
Notifications
You must be signed in to change notification settings - Fork 367
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
Record diagnostics source rule when testing #3301
Conversation
0b04420
to
4025478
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice addition
94b69f8
to
663c833
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Slightly an abuse of the source
field but I guess it's fine. We could put it in the data
field? which is entirely implementation-defined. Then we could consider even doing it unconditionally, or having some richer-structured "provenance" structure.
Do you mean the |
663c833
to
0e1c645
Compare
No, |
0e1c645
to
5acffec
Compare
I have seen unexpected duplicate diagnostics leading to a failure in the ghcide testsuite: what seems to happen here is that both
Typecheck
andGetModIfaceFromDisk
contribute the same diagnostics. But this should never happen, because we never run both these rules for the same file:GetModIfaceFromDisk
is only run for non FOIs viaGetModIface
Typecheck
is only run for FOIs, either viaGetModIface
or on demand by code actionsThis PR adds more testing-only logging to help diagnostics when this happens again next time