Skip to content

Commit

Permalink
Merge pull request #163 from tgodzik/updaten
Browse files Browse the repository at this point in the history
bugfix: Don't show error message if nothing needs to be send, but end was processed
  • Loading branch information
tgodzik committed Apr 2, 2024
2 parents 967aa1b + 242278b commit 8f65ccc
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Expand Up @@ -16,7 +16,7 @@ jobs:
with:
submodules: true
fetch-depth: 0
- uses: coursier/setup-action@v1.3.0
- uses: coursier/setup-action@v1.3.5
with:
apps: scalafmt
jvm: "temurin:17"
Expand Down
2 changes: 1 addition & 1 deletion .scalafmt.conf
@@ -1,4 +1,4 @@
version = "3.8.0"
version = "3.8.1"

align.preset = more
maxColumn = 100
Expand Down
2 changes: 1 addition & 1 deletion backend/.scalafmt.conf
@@ -1,4 +1,4 @@
version = "3.7.3"
version = "3.8.1"
runner.dialect = scala213
maxColumn = 100
docstrings.style = Asterisk
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/.scalafmt.conf
@@ -1,4 +1,4 @@
version = "3.7.3"
version = "3.8.1"
runner.dialect = scala213
maxColumn = 100
docstrings.style = Asterisk
Expand Down
2 changes: 1 addition & 1 deletion bridges/.scalafmt.conf
@@ -1,4 +1,4 @@
version = "3.7.3"
version = "3.8.1"
runner.dialect = scala213
maxColumn = 100
docstrings.style = Asterisk
Expand Down
2 changes: 1 addition & 1 deletion frontend/.scalafmt.conf
@@ -1,4 +1,4 @@
version = "3.7.3"
version = "3.8.1"
runner.dialect = scala213
maxColumn = 100
docstrings.style = Asterisk
Expand Down
Expand Up @@ -276,17 +276,18 @@ final class BspProjectReporter(
override def reportCancelledCompilation(): Unit = ()

private var endEvent: Option[CompilationEvent.EndCompilation] = None
private var wasEndProcessed: Boolean = false
override def reportEndCompilation(): Unit = {
endEvent match {
case Some(end) => logger.publishCompilationEnd(end)
case None =>
case None if !wasEndProcessed =>
logger.error(
"Fatal invariant violated: `reportEndCompilation` was called before `processEndCompilation`"
)
case _ =>
}
}

//
override def processEndCompilation(
previousSuccessfulProblems: List[ProblemPerPhase],
code: bsp.StatusCode,
Expand Down Expand Up @@ -321,7 +322,7 @@ final class BspProjectReporter(
}
}
}

wasEndProcessed = true
endEvent = if (cycleCount.get == 0) {
recheckProblems
None
Expand Down
2 changes: 1 addition & 1 deletion shared/.scalafmt.conf
@@ -1,4 +1,4 @@
version = "3.7.3"
version = "3.8.1"
runner.dialect = scala213
maxColumn = 100
docstrings.style = Asterisk
Expand Down

0 comments on commit 8f65ccc

Please sign in to comment.