From its Intro (https://www.lihaoyi.com/mill/index.html): Mill is your shiny new Java/Scala build tool! Scared of SBT? Melancholy over Maven? Grumbling about Gradle? Baffled by Bazel? Give Mill a try!
Questions tagged [mill]
34 questions
1
vote
1 answer
VS Code and Metals: Run 'Build import' to enable code navigation
I have a Scala- / Mill-Project that I wan't to import into VSCode.
The Metals Doctor gives me the following warnings:
Is there something missing in my project?
Here is my Mill configuration (build.sc):
import mill._
import mill.define.Target
import…

pme
- 14,156
- 3
- 52
- 95
1
vote
1 answer
Why does running the ZIO App with mill not work?
I setup the simple ZIO App from zio.dev.
val myAppLogic =
for {
_ <- putStrLn("Hello! What is your name?")
name <- getStrLn
_ <- putStrLn(s"Hello, ${name}, welcome to ZIO!")
} yield ()
When running in/with Intellij…

pme
- 14,156
- 3
- 52
- 95
0
votes
0 answers
Mill doesn't check local Ivy repository
Mill doesn't seem to check the local Ivy cache for (snapshot) dependencies. I've got a local build of a dependency I want to use - Mill can't find it. The output shows it searching my registered Maven repos:
def repositoriesTask = T.task {
…

Bender Rodriguez
- 67
- 6
0
votes
0 answers
java.nio.channels.UnsupportedAddressTypeException
I'm building a test gRPC server with Mill using ScalaPBModule. I can successfully build (with server.assembly) and start the server, but when it is hit with a request, the client throws this error:
Suppressed:…

Bender Rodriguez
- 67
- 6
0
votes
1 answer
Cannot load resource files using Scala / Mill
I cannot load resources in Scala, using Mill (0.10.5) as the build tool.
The minimal example is:
.
├── app
│ └── src
│ └── main
│ ├── resources
│ │ └── hello_world.txt
│ └── scala
│ └──…

Amaterasu
- 153
- 10
0
votes
1 answer
Mill, Cask, and SBT
I am following this tutorial: https://www.lihaoyi.com/post/SimpleWebandApiServerswithScala.html. I get to the part where I run "./mill -w app.runBackground", and I receive the following error:
"[error] java.lang.RuntimeException: /packages cannot be…

Basil Ahmad
- 9
- 1
0
votes
1 answer
How to iterate all mill targets in build.sc, how to get target.dest from outside the target?
I would like to write a mill utility tool (maybe a function or Module inside build.sc) for summarizing and post processing results of various targets. Instead of hard coding all processed targets I prefer a solution that could somehow iterate the…

user4955663
- 1,039
- 2
- 13
- 21
0
votes
1 answer
mill: Failed resolvedAmmoniteReplIvyDeps
I have following very simple module definition in build.src
import mill._
import mill.bsp.BSP.millSourcePath
import mill.scalalib.{JavaModule, ScalaModule}
object scalaMod0 extends ScalaModule {
override def scalaVersion = "2.13.6"
}
Mill…

user4955663
- 1,039
- 2
- 13
- 21
0
votes
1 answer
How to define withSources and/or withJavadoc in mill ivyDeps
If you want to load module sources and/or javadocs you write following sbt:
lazy val joda_timeV = "1.2.3"
lazy val scalatagsV = "1.2.3"
lazy val upickleV = "1.2.4"
lazy val autowireV = "1.2.5"
lazy val scalarxV = "1.2.6"
libraryDependencies…

user4955663
- 1,039
- 2
- 13
- 21
0
votes
1 answer
What is the preferred way in mill to point to the directory where build.sc file is located?
What is the preferred way in mill to point to the directory where build.sc file is located?
In the mill documentation os.pwd is used e.g. here, but if it is possible to start/run mill from elsewhere, then os.pwd points to incorrect location.
import…

user4955663
- 1,039
- 2
- 13
- 21
0
votes
0 answers
Bash call exec with one additional prepended parameter
In some cases I need to pass in an additional prepended parameter to the command line args used when I call exec. How can I accomplish this?
if [ -z "$MILL_HOME" ] ; then
exec $MILL_EXEC_PATH "$@"
else
MILL_EXEC_ARGS=("--home" "$MILL_HOME"…

Damian
- 2,709
- 2
- 29
- 40
0
votes
1 answer
Should mill tasks with non-file products produce something analogous to PathRef?
I'm using mill to build a pipeline that
cleans up a bunch of CSV files (producing new files)
loads them into a database
does more work in the database (create views, etc)
runs queries to extract some files.
Should the tasks associated with steps 2…

bwbecker
- 1,031
- 9
- 21
0
votes
1 answer
Accessing scala.js output in resources
I'm trying to build a application server using scala.js, scalatags, akka-http, and mill as my build tool. All goes well until the browser tries to find scripts with generated scala.js code. This is the scalatags code which successfully gets built…

nnovod
- 1
- 2
0
votes
0 answers
Scala Script Engine is not found when run in Test using Mill or SBT
I have a strange behaviour concerning Testing Scala Script Engine.
I have the following code:
val manager = new ScriptEngineManager(getClass.getClassLoader)
val e = manager.getEngineByExtension("scala")
log.info(s"Script Engine: $e from:…

pme
- 14,156
- 3
- 52
- 95
0
votes
1 answer
How to combine the Module Dependencies with the Dependencies of its parent Module with Mill
I want to combine the Module Dependencies with the ones from the parent Module.
I have the following in my build.sc:
trait ExampleModule extends ModuleWithTests {
override def moduleDeps = Seq(camunda, cli)
}
object twitter extends…

pme
- 14,156
- 3
- 52
- 95