-
Notifications
You must be signed in to change notification settings - Fork 202
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clear previous problems as early as possible
BSP requires that bloop clears problems that were present in previous compiler iterations manually. Previously, Bloop would meet this contract by clearing problems from previous compiler runs at the end of a successful incremental cycle. For every incremental cycle, bloop would go through the problems and clear those that were affected by changes occurred during that cycle. You can see more information in this pull request: #782 However, this approach was slower than desired and required that we successfully finished an incremental compiler cycle before *starting* to clean some diagnostics in the recompiled files. Instead, this pull request takes a different approach to this problem. We clear diagnostics as soon as we know they are safe to be cleared. For example, if in a previous compiler run typer emitted an error, we have bloop record that a diagnostic happened during that phase and, in subsequent compiler runs, we clear the diagnostic as soon as we've passed typer for the source file that contained the error. That is, we clear diagnostics right after the phase that generated them succeeded. If a diagnostic could not be mapped to a phase, we fallback to the previous behavior: we will clear it in `reportRemainingProblems` right after every incremental cycle.
- Loading branch information
Showing
10 changed files
with
217 additions
and
128 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package bloop.reporter | ||
|
||
/** | ||
* A problem that is mapped to the phase where it occurred. | ||
* | ||
* @param problem A problem reported by Zinc. | ||
* @param phase An optional phase in case compiler reports a problem before a phase is registered. | ||
*/ | ||
final case class ProblemPerPhase(problem: xsbti.Problem, phase: Option[String]) |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.