From the maintainer Li Haoyi: I'm putting a 1000USD bounty on this issue, payable by bank transfer on a merged PR implementing this.
Mill 0.12.0 is moving towards using build.mill/package.mill files rather than build.sc. Basic IntelliJ support landed in JetBrains/intellij-scala#667, so the next thing to do is get them working in VSCode/Metals. .mill and .mill.scala files already mostly work in IntelliJ/BSP, so this ticket is to get the same support for .mill and .mill.scala files in VSCode/Metals/BSP as well.
The acceptance criteria is as follows:
- Download and unpack https://github.com/com-lihaoyi/mill/releases/download/0.12.0-RC3/0.12.0-RC3-example-depth-large-10-multi-file-builds.zip
- Load the folder's Mill build into Metals
- Inside
bar/qux/package.mill
- Jumping to
build.MyModule should bring you to build.mill
- Jumping to
build.MyModule should bring you to mill-scalalib_2.13-0.12.0-RC3-sources.jar/mill/scalalib/package.scala (or equivalent)
- Inside
foo/package.mill
- Jumping to
build.MyModule should bring you to build.mill
- Jumping to
build.bar.qux.mymodule should bring you to bar/qux/package.mill
- Jumping to
RootModule should bring you to mill-main_2.13-0.12.0-RC3-sources.jar/mill/package.scala (or equivalent)
- Inside
build.mill
- Jumping to
ScalaModule should bring you to mill-scalalib_2.13-0.12.0-RC3-sources.jar/mill/scalalib/ScalaModule.scala (or equivalent)
- Everything should still work if the
.mill files are renamed to .mill.scala
For the purposes of this ticket, treating .mill files as vanilla .scala files (with the appropriate classpath and sources) is sufficient. It's not 100% precise, but is good enough for 95% of scenarios, and we can sort out the last 5% in a followup. Notably, we do not want to treat them as .sc files, since things like ScalaCLI directives and other scripty things don't work
Prior Art: scalameta/metals#6752
Dependencies
From the maintainer Li Haoyi: I'm putting a 1000USD bounty on this issue, payable by bank transfer on a merged PR implementing this.
Mill 0.12.0 is moving towards using
build.mill/package.millfiles rather thanbuild.sc. Basic IntelliJ support landed in JetBrains/intellij-scala#667, so the next thing to do is get them working in VSCode/Metals..milland.mill.scalafiles already mostly work in IntelliJ/BSP, so this ticket is to get the same support for.milland.mill.scalafiles in VSCode/Metals/BSP as well.The acceptance criteria is as follows:
bar/qux/package.millbuild.MyModuleshould bring you tobuild.millbuild.MyModuleshould bring you tomill-scalalib_2.13-0.12.0-RC3-sources.jar/mill/scalalib/package.scala(or equivalent)foo/package.millbuild.MyModuleshould bring you tobuild.millbuild.bar.qux.mymoduleshould bring you tobar/qux/package.millRootModuleshould bring you tomill-main_2.13-0.12.0-RC3-sources.jar/mill/package.scala(or equivalent)build.millScalaModuleshould bring you tomill-scalalib_2.13-0.12.0-RC3-sources.jar/mill/scalalib/ScalaModule.scala(or equivalent).millfiles are renamed to.mill.scalaFor the purposes of this ticket, treating
.millfiles as vanilla.scalafiles (with the appropriate classpath and sources) is sufficient. It's not 100% precise, but is good enough for 95% of scenarios, and we can sort out the last 5% in a followup. Notably, we do not want to treat them as.scfiles, since things like ScalaCLI directives and other scripty things don't workPrior Art: scalameta/metals#6752
Dependencies
semanticDbDatafails on meta-build #3666millextension to supported ones scalameta/scalameta#3989