summaryrefslogtreecommitdiff
path: root/scalalib/api/src/ZincWorkerApi.scala
diff options
context:
space:
mode:
authorTobias Roeser <le.petit.fou@web.de>2019-10-16 13:07:51 +0200
committerTobias Roeser <le.petit.fou@web.de>2019-10-16 13:07:51 +0200
commit6a19be4008426bb4edc137dd756d0a0b7347e0a5 (patch)
tree7add40a2be94061cac8767bb36e987a304077854 /scalalib/api/src/ZincWorkerApi.scala
parent9354e9311118ca23a44f72e463875a2769e53716 (diff)
parent76a8dfe705cafc18836df122d45c51452d4c6de3 (diff)
downloadmill-6a19be4008426bb4edc137dd756d0a0b7347e0a5.tar.gz
mill-6a19be4008426bb4edc137dd756d0a0b7347e0a5.tar.bz2
mill-6a19be4008426bb4edc137dd756d0a0b7347e0a5.zip
Merge pull request https://github.com/lihaoyi/mill/pull/664
Added the contrib.bsp module which contains an implementation of the BuildServer from BSP, thus alowing mill to be used by IDEs which use BSP. The MillBuildServer supports the following BSP features: * retrieving the build targets * compile requests * run requests * test requests * compile published diagnostics * task start/finish notifications for compile and test requests * progress notifications for compile * retrieving the scala main classes, test classes and scalac options Currently these features allow importing and compiling a mill project in IntelliJ IDEA via BSP. Known issues, some of which are being investigated: * can not run main classes from the IntelliJ interface * rarely, a strange NoClassDefFoundException is being thrown upon compiling from intellij * still tweaking the command for starting the server in order to work on all operating systems ( should be fine for linux and macOs so far ) Would be great to get feedback about this integration.
Diffstat (limited to 'scalalib/api/src/ZincWorkerApi.scala')
-rw-r--r--scalalib/api/src/ZincWorkerApi.scala11
1 files changed, 8 insertions, 3 deletions
diff --git a/scalalib/api/src/ZincWorkerApi.scala b/scalalib/api/src/ZincWorkerApi.scala
index 53a98c24..dfda44b8 100644
--- a/scalalib/api/src/ZincWorkerApi.scala
+++ b/scalalib/api/src/ZincWorkerApi.scala
@@ -1,8 +1,11 @@
package mill.scalalib.api
import mill.api.Loose.Agg
-import mill.api.PathRef
+import mill.api.{PathRef, BuildProblemReporter}
import mill.api.JsonFormatters._
+
+
+
object ZincWorkerApi{
type Ctx = mill.api.Ctx.Dest with mill.api.Ctx.Log with mill.api.Ctx.Home
}
@@ -11,7 +14,8 @@ trait ZincWorkerApi {
def compileJava(upstreamCompileOutput: Seq[CompilationResult],
sources: Agg[os.Path],
compileClasspath: Agg[os.Path],
- javacOptions: Seq[String])
+ javacOptions: Seq[String],
+ reporter: Option[BuildProblemReporter])
(implicit ctx: ZincWorkerApi.Ctx): mill.api.Result[CompilationResult]
/** Compile a mixed Scala/Java or Scala-only project */
@@ -23,7 +27,8 @@ trait ZincWorkerApi {
scalaOrganization: String,
scalacOptions: Seq[String],
compilerClasspath: Agg[os.Path],
- scalacPluginClasspath: Agg[os.Path])
+ scalacPluginClasspath: Agg[os.Path],
+ reporter: Option[BuildProblemReporter])
(implicit ctx: ZincWorkerApi.Ctx): mill.api.Result[CompilationResult]
def discoverMainClasses(compilationResult: CompilationResult)