Skip to content

Commit 67416e8

Browse files
Merge pull request #4 from alexarchambault/scala-js-cli-1.1.1-sc4
Update scala-js-cli to 1.1.1-sc4
2 parents 3d9afe0 + f00e2eb commit 67416e8

File tree

2 files changed

+31
-3
lines changed

2 files changed

+31
-3
lines changed

build.sc

+17-3
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,22 @@ import io.github.alexarchambault.millnativeimage.NativeImage
77
import io.github.alexarchambault.millnativeimage.upload.Upload
88
import mill._
99
import mill.scalalib._
10+
import coursier.core.Version
1011

11-
def scalaJsCliVersion = "1.1.1-sc3"
12+
def scalaJsCliVersion = "1.1.1-sc4.1"
1213
def scalaJsVersions = Seq("1.9.0", "1.10.0")
1314

1415
class ScalaJsCliNativeImage(val scalaJsVersion0: String) extends ScalaModule with NativeImage {
1516
def scalaVersion = "2.13.8"
1617
def scalaJsVersion = scalaJsVersion0
1718

19+
def sources = T.sources {
20+
val extra =
21+
if (Version(scalaJsVersion) < Version("1.10")) Nil
22+
else Seq(PathRef(os.pwd / "scala-js-1.10+" / "src"))
23+
super.sources() ++ extra
24+
}
25+
1826
def nativeImageClassPath = T{
1927
runClasspath()
2028
}
@@ -27,12 +35,18 @@ class ScalaJsCliNativeImage(val scalaJsVersion0: String) extends ScalaModule wit
2735
)
2836
}
2937
def nativeImagePersist = System.getenv("CI") != null
30-
def nativeImageGraalVmJvmId = "graalvm-java17:22.0.0"
38+
def graalVmVersion = "22.0.0"
39+
def nativeImageGraalVmJvmId = s"graalvm-java17:$graalVmVersion"
3140
def nativeImageName = "scala-js-ld"
3241
def ivyDeps = super.ivyDeps() ++ Seq(
33-
ivy"io.github.alexarchambault.tmp::scalajs-cli:$scalaJsCliVersion",
42+
ivy"io.github.alexarchambault.tmp::scalajs-cli:$scalaJsCliVersion"
43+
// so that this doesn't bump the version we pull ourselves
44+
.exclude(("org.scala-js", "scalajs-linker_2.13")),
3445
ivy"org.scala-js::scalajs-linker:$scalaJsVersion"
3546
)
47+
def compileIvyDeps = super.compileIvyDeps() ++ Seq(
48+
ivy"org.graalvm.nativeimage:svm:$graalVmVersion"
49+
)
3650
def nativeImageMainClass = "org.scalajs.cli.Scalajsld"
3751

3852
def nameSuffix = ""
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package org.scalajs.cli.internal;
2+
3+
import com.oracle.svm.core.annotate.Substitute;
4+
import com.oracle.svm.core.annotate.TargetClass;
5+
6+
@TargetClass(className = "org.scalajs.cli.internal.ModuleSplitStyleParser")
7+
final class ModuleSplitStyleParserSubst {
8+
9+
@Substitute
10+
ModuleSplitStyle parse(String splitStyle, String[] modulePackages) {
11+
ModuleSplitStyleParser110Plus parser = new ModuleSplitStyleParser110Plus();
12+
return parser.parse(splitStyle, modulePackages);
13+
}
14+
}

0 commit comments

Comments
 (0)