This repository was archived by the owner on Jan 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 95
Deduplicate module not found diagnostics #952
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wz1000
reviewed
Dec 13, 2020
wz1000
reviewed
Dec 13, 2020
wz1000
approved these changes
Dec 13, 2020
e770e08
to
23f8275
Compare
The use of stale information should be limited to the leaves of the processing tree, otherwise it becomes impossible to reason about the semantics of diagnostics
23f8275
to
967c9ec
Compare
pepeiborra
added a commit
to pepeiborra/ide
that referenced
this pull request
Dec 29, 2020
* Trace rule errors * Disable check parents in command line script * Fix expectDiagnostics [] * Add a test * remove uses of stale info within rules The use of stale information should be limited to the leaves of the processing tree, otherwise it becomes impossible to reason about the semantics of diagnostics * Use stale info in the NeedsCompilation rule * Use stale data in GetDocMap * Fix tests that relied on unsupported behaviour of expectDiagnostics
pepeiborra
added a commit
to pepeiborra/ide
that referenced
this pull request
Dec 29, 2020
* Trace rule errors * Disable check parents in command line script * Fix expectDiagnostics [] * Add a test * remove uses of stale info within rules The use of stale information should be limited to the leaves of the processing tree, otherwise it becomes impossible to reason about the semantics of diagnostics * Use stale info in the NeedsCompilation rule * Use stale data in GetDocMap * Fix tests that relied on unsupported behaviour of expectDiagnostics
pepeiborra
added a commit
to pepeiborra/ide
that referenced
this pull request
Dec 29, 2020
* Trace rule errors * Disable check parents in command line script * Fix expectDiagnostics [] * Add a test * remove uses of stale info within rules The use of stale information should be limited to the leaves of the processing tree, otherwise it becomes impossible to reason about the semantics of diagnostics * Use stale info in the NeedsCompilation rule * Use stale data in GetDocMap * Fix tests that relied on unsupported behaviour of expectDiagnostics
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reworked version of #943. The root problem was in the use of stale data in rules - after adding a missing import the
GetDependencies
rule would fail, butTypeCheck
would go ahead anyway with the last successful result ofGetDependencies
and generate a missing module diagnostic which duplicates the one already generated byGetDependencies
.In general it seems a very bad idea to use stale data in core rules, if only because it makes it very difficult to reason about diagnostics. I have removed all other uses I've seen.
While I was debugging this with the command line driver, I found the default options to check all targets very noisy, and I changed the defaults (for the command line driver only). Moreover, I added tracing of rule failures.
Fixes haskell/haskell-language-server#630