Skip to content

Commit

Permalink
Add bsp JavaBuildServerForwardStubs
Browse files Browse the repository at this point in the history
  • Loading branch information
adpi2 committed Jul 23, 2021
1 parent 253f1bd commit 1ea0e8a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ package scala.build.bloop

import ch.epfl.scala.bsp4j

trait BuildServer extends bsp4j.BuildServer with bsp4j.ScalaBuildServer
trait BuildServer extends bsp4j.BuildServer with bsp4j.ScalaBuildServer with bsp4j.JavaBuildServer
4 changes: 2 additions & 2 deletions modules/build/src/main/scala/scala/build/bsp/BspServer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import scala.build.GeneratedSource
import scala.build.Logger

class BspServer(
bloopServer: b.BuildServer with b.ScalaBuildServer,
bloopServer: b.BuildServer with b.ScalaBuildServer with b.JavaBuildServer,
compile: (() => CompletableFuture[b.CompileResult]) => CompletableFuture[b.CompileResult],
logger: Logger
) extends b.BuildServer with b.ScalaBuildServer with BuildServerForwardStubs with ScalaBuildServerForwardStubs with HasGeneratedSources {
) extends b.BuildServer with b.ScalaBuildServer with BuildServerForwardStubs with ScalaBuildServerForwardStubs with JavaBuildServerForwardStubs with HasGeneratedSources {

import BspServer._

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package scala.build.bsp

import ch.epfl.scala.bsp4j.{JavacOptionsParams, JavacOptionsResult}
import ch.epfl.scala.{bsp4j => b}

import java.util.concurrent.CompletableFuture

trait JavaBuildServerForwardStubs extends b.JavaBuildServer {
protected def forwardTo: b.JavaBuildServer

override def buildTargetJavacOptions(params: JavacOptionsParams): CompletableFuture[JavacOptionsResult] =
forwardTo.buildTargetJavacOptions(params)
}

0 comments on commit 1ea0e8a

Please sign in to comment.