Skip to content

Commit 229e429

Browse files
committed
feat: bump mill-scip to 0.3.0 to add support for Java
This change bumps the mill-scip version to 0.3.0 and adds a test showing that this version now can also handle Java Modules.
1 parent 5dd2c0f commit 229e429

File tree

3 files changed

+31
-8
lines changed

3 files changed

+31
-8
lines changed

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ lazy val V =
2424
def testcontainers = "0.39.3"
2525
def requests = "0.6.5"
2626
def minimalMillVersion = "0.10.0"
27-
def millScipVersion = "0.2.3"
27+
def millScipVersion = "0.3.0"
2828
}
2929

3030
inThisBuild(

docs/getting-started.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ free to subscribe to the tracking issues to receive updates on your build tool.
243243
| Ant |||| [sourcegraph/scip-java#305](https://github.com/sourcegraph/scip-java/issues/305) |
244244
| Bazel |||| |
245245
| Buck |||| [sourcegraph/scip-java#99](https://github.com/sourcegraph/scip-java/issues/99) |
246-
| Mill | |||
246+
| Mill | |||
247247

248248
****: automatic indexing is fully supported. Please report a bug if the
249249
`scip-java index` command does not work on your codebase.
@@ -304,9 +304,10 @@ projects, with the following caveats:
304304
The `scip-java index` build should be able to automatically index most Mill
305305
projects, with the following caveats:
306306

307-
| Integration | Supported | Recommendation |
308-
| ------------- | --------- | -------------------------- |
309-
| Mill <v0.10.0 || Upgrade to Mill >= v0.10.0 |
307+
| Integration | Supported | Recommendation |
308+
| ------------- | --------------------| -------------------------------------------|
309+
| Mill <v0.10.0 || Upgrade to Mill >= v0.10.0 |
310+
| Mill <v0.10.6 | Only supports Scala | Upgrade to Mill >= v0.10.6 for Java support|
310311

311312

312313
### Bazel

tests/buildTools/src/test/scala/tests/MillBuildToolSuite.scala

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import scala.jdk.CollectionConverters._
99

1010
class MillBuildToolSuite extends BaseBuildToolSuite {
1111

12-
def setupMill() = {
12+
def setupMill(millVersion: String) = {
1313
val mill = workingDirectory.resolve("mill")
1414
val resource = getClass().getResource("/mill")
1515
val in = Paths.get(resource.toURI)
@@ -24,7 +24,7 @@ class MillBuildToolSuite extends BaseBuildToolSuite {
2424
PosixFilePermission.OWNER_EXECUTE
2525
).asJava
2626
)
27-
List("./mill", "--version")
27+
List("./mill", s"--mill-version", millVersion, "--version")
2828
}
2929

3030
def scalaLibrary(scalaVersion: String) =
@@ -92,8 +92,30 @@ class MillBuildToolSuite extends BaseBuildToolSuite {
9292
|maven:org.scalameta:junit-interface:1.0.0-M6
9393
|maven:org.scalameta:munit_${scalaBinaryVersion(scalaVersion)}:1.0.0-M6
9494
|""".stripMargin,
95-
initCommand = setupMill(),
95+
initCommand = setupMill(millVersion),
9696
targetRoot = Some("out/io/kipp/mill/scip/Scip/generate.dest")
9797
)
9898
}
99+
100+
checkBuild(
101+
"java-module",
102+
s"""|/.mill-version
103+
|0.10.7
104+
|/build.sc
105+
|import mill._, scalalib._
106+
|object minimal extends JavaModule
107+
|/minimal/src/ScipOutputFormat.java
108+
|package minimal;
109+
|public enum ScipOutputFormat {
110+
| GRAPH_NDJSON,
111+
| GRAPH_PROTOBUF,
112+
| TYPED_PROTOBUF,
113+
| TYPED_NDJSON,
114+
| UNKNOWN;
115+
|}
116+
|""".stripMargin,
117+
expectedSemanticdbFiles = 1,
118+
initCommand = setupMill("0.10.7"),
119+
targetRoot = Some("out/io/kipp/mill/scip/Scip/generate.dest")
120+
)
99121
}

0 commit comments

Comments
 (0)