
main.dotty.tools.pc.Scala3CompilerAccess.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of scala3-presentation-compiler_3 Show documentation
Show all versions of scala3-presentation-compiler_3 Show documentation
scala3-presentation-compiler-bootstrapped
package dotty.tools.pc
import java.util.concurrent.ScheduledExecutorService
import scala.concurrent.ExecutionContextExecutor
import scala.meta.internal.metals.ReportContext
import scala.meta.internal.pc.CompilerAccess
import scala.meta.pc.PresentationCompilerConfig
import dotty.tools.dotc.reporting.StoreReporter
import dotty.tools.dotc.interactive.InteractiveDriver
class Scala3CompilerAccess(
config: PresentationCompilerConfig,
sh: Option[ScheduledExecutorService],
newCompiler: () => Scala3CompilerWrapper
)(using ec: ExecutionContextExecutor, rc: ReportContext)
extends CompilerAccess[StoreReporter, InteractiveDriver](
config,
sh,
newCompiler,
/* If running inside the executor, we need to reset the job queue
* Otherwise it will block indefinetely in case of infinite loops.
*/
shouldResetJobQueue = true
):
def newReporter = new StoreReporter(null)
/**
* Handle the exception in order to make sure that
* we retry immediately. Otherwise, we will wait until
* the end of the timeout, which is 20s by default.
*/
protected def handleSharedCompilerException(
t: Throwable
): Option[String] = None
protected def ignoreException(t: Throwable): Boolean = false
end Scala3CompilerAccess
© 2015 - 2025 Weber Informatics LLC | Privacy Policy