Skip to content

Commit

Permalink
For full cross-compiled modules, only import main Scala versions ones (
Browse files Browse the repository at this point in the history
…#968)

when importing Almond in Metals
  • Loading branch information
alexarchambault authored Aug 17, 2022
1 parent f9ca7af commit 260ce5a
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import java.nio.file.FileSystems

import io.github.alexarchambault.millnativeimage.upload.Upload
import mill._, scalalib._
import mill.contrib.bloop.Bloop
import _root_.scala.concurrent.duration._
import _root_.scala.util.Properties

Expand Down Expand Up @@ -112,7 +113,8 @@ class JupyterApi(val crossScalaVersion: String) extends AlmondModule with Mima {
)
}

class ScalaKernelApi(val crossScalaVersion: String) extends AlmondModule with DependencyListResource with ExternalSources with PropertyFile with Mima {
class ScalaKernelApi(val crossScalaVersion: String) extends AlmondModule with DependencyListResource with ExternalSources with PropertyFile with Mima with Bloop.Module {
def skipBloop = !ScalaVersions.binaries.contains(crossScalaVersion)
def crossFullScalaVersion = true
def moduleDeps = Seq(
shared.`interpreter-api`(),
Expand All @@ -130,7 +132,8 @@ class ScalaKernelApi(val crossScalaVersion: String) extends AlmondModule with De
)
}

class ScalaInterpreter(val crossScalaVersion: String) extends AlmondModule {
class ScalaInterpreter(val crossScalaVersion: String) extends AlmondModule with Bloop.Module {
def skipBloop = !ScalaVersions.binaries.contains(crossScalaVersion)
def crossFullScalaVersion = true
def supports3 = true
def moduleDeps = Seq(
Expand Down Expand Up @@ -179,7 +182,8 @@ class ScalaInterpreter(val crossScalaVersion: String) extends AlmondModule {
}
}

class ScalaKernel(val crossScalaVersion: String) extends AlmondModule with ExternalSources with BootstrapLauncher {
class ScalaKernel(val crossScalaVersion: String) extends AlmondModule with ExternalSources with BootstrapLauncher with Bloop.Module {
def skipBloop = !ScalaVersions.binaries.contains(crossScalaVersion)
def crossFullScalaVersion = true
def moduleDeps = Seq(
shared.kernel(),
Expand Down Expand Up @@ -231,7 +235,8 @@ class ScalaKernel(val crossScalaVersion: String) extends AlmondModule with Exter
// depend on the more complex 2.13-targeting-scala-3 module like
// scala-kernel-cross-3.0.2_2.13.7. The former follows the same name pattern
// as their Scala 2 counterparts, and are more convenient to write down for end users.
class ScalaKernelHelper(val crossScalaVersion: String) extends AlmondModule {
class ScalaKernelHelper(val crossScalaVersion: String) extends AlmondModule with Bloop.Module {
def skipBloop = !ScalaVersions.binaries.contains(crossScalaVersion)
def crossFullScalaVersion = true
def supports3 = true
def artifactName = super.artifactName().stripSuffix("-helper")
Expand Down

0 comments on commit 260ce5a

Please sign in to comment.