Skip to content

Commit

Permalink
Rebootstrap on latest master (#3420)
Browse files Browse the repository at this point in the history
Need to make sure everything works and dogfood it a bit before
0.12.0-RC1

This converts Mill over to the `build.mill` file extension. We also
break up `build.mill` into per-folder `package.mill` files:
`scalalib/package.mill`, `main/package.mill`, etc.

IntelliJ users would need go to `Settings` / `Editor` / `File Types` /
`Scala` and add `*.mill`. Github syntax highlighting doesn't work, which
is expected for now until
github-linguist/linguist#7028 lands (which will
need to wait for some usage in the wild according to Github's syntax
highlighting policy)
  • Loading branch information
lihaoyi authored Sep 4, 2024
1 parent 21fbf2b commit dd57a10
Show file tree
Hide file tree
Showing 65 changed files with 2,372 additions and 2,244 deletions.
2 changes: 1 addition & 1 deletion .config/mill-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.11.12
0.12.0-M0-68-21fbf2
39 changes: 39 additions & 0 deletions bsp/package.mill
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
package build.bsp
// imports
import mill._
import mill.contrib.buildinfo.BuildInfo
import mill.T


object `package` extends RootModule with build.MillPublishScalaModule with BuildInfo {
def compileModuleDeps = Seq(build.scalalib)
def testModuleDeps = super.testModuleDeps ++ compileModuleDeps
def buildInfoPackageName = "mill.bsp"

def buildInfoMembers = T {
val workerDep = worker.publishSelfDependency()
Seq(
BuildInfo.Value(
"bsp4jVersion",
build.Deps.bsp4j.dep.version,
"BSP4j version (BSP Protocol version)."
)
)
}

override lazy val test: MillScalaTests = new Test {}
trait Test extends MillScalaTests {
def forkEnv: T[Map[String, String]] = T {
// We try to fetch this dependency with coursier in the tests
worker.publishLocalCached()
super.forkEnv()
}

def forkArgs = super.forkArgs() ++ Seq(s"-DBSP4J_VERSION=${build.Deps.bsp4j.dep.version}")
}

object worker extends build.MillPublishScalaModule {
def compileModuleDeps = Seq(build.bsp, build.scalalib, build.testrunner, build.runner) ++ build.scalalib.compileModuleDeps
def ivyDeps = Agg(build.Deps.bsp4j, build.Deps.sbtTestInterface)
}
}
Loading

0 comments on commit dd57a10

Please sign in to comment.