Skip to content

Commit

Permalink
bugfix: Move Compilers.cancel() to the end of importBuild function
Browse files Browse the repository at this point in the history
  • Loading branch information
tgodzik committed Oct 18, 2023
1 parent f426852 commit 505e58c
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2178,7 +2178,6 @@ class MetalsLspService(
_ <- indexer.profiledIndexWorkspace(runDoctorCheck)
} {
focusedDocument().foreach(path => compilations.compileFile(path))
compilers.cancel()
}
}

Expand Down Expand Up @@ -2269,7 +2268,6 @@ class MetalsLspService(
}

private def importBuild(session: BspSession) = {
compilers.cancel()
val importedBuilds0 = timerProvider.timed("Imported build") {
session.importBuilds()
}
Expand All @@ -2283,7 +2281,7 @@ class MetalsLspService(
}
mainBuildTargetsData.resetConnections(idToConnection)
}
} yield ()
} yield compilers.cancel()
}

private def connectToNewBuildServer(
Expand Down

0 comments on commit 505e58c

Please sign in to comment.