Skip to content

Commit

Permalink
scalapblib - bring back old API to keep binary compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
oridag committed Nov 17, 2022
1 parent 48a3735 commit 2dcd5d7
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions contrib/scalapblib/src/ScalaPBWorker.scala
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ class ScalaPBWorker extends AutoCloseable {
ctx.log.debug(s"ScalaPBC args: ${args.mkString(" ")}")
mainMethod.invoke(null, args.toArray)
}

override def compileScalaPB(root: File, source: Seq[File], scalaPBOptions: String, generatedDirectory: File, otherArgs: Seq[String]): Unit =
compileScalaPB(Seq(root), source, scalaPBOptions, generatedDirectory, otherArgs)
}
scalaPBInstanceCache = Some((classloaderSig, instance))
instance
Expand Down Expand Up @@ -105,13 +108,20 @@ class ScalaPBWorker extends AutoCloseable {
}

trait ScalaPBWorkerApi {
def compileScalaPB(
roots: Seq[File],
source: Seq[File],
scalaPBOptions: String,
generatedDirectory: File,
otherArgs: Seq[String]
): Unit

@deprecated("Use other overload instead")
def compileScalaPB(root: File,
source: Seq[File],
scalaPBOptions: String,
generatedDirectory: File,
otherArgs: Seq[String]): Unit


def compileScalaPB(roots: Seq[File],
source: Seq[File],
scalaPBOptions: String,
generatedDirectory: File,
otherArgs: Seq[String]): Unit
}

object ScalaPBWorkerApi extends ExternalModule {
Expand Down

0 comments on commit 2dcd5d7

Please sign in to comment.