mill.daemon

package mill.daemon

Members list

Type members

Classlikes

object MillBspMain

Attributes

Source
MillBspMain.scala
Supertypes
class Object
trait Matchable
class Any
Self type
class MillBuildBootstrap(projectRoot: Path, output: Path, keepGoing: Boolean, imports: Seq[String], env: Map[String, String], ec: Option[ThreadPoolExecutor], tasksAndParams: Seq[String], prevRunnerState: RunnerState, logger: Logger, needBuildFile: Boolean, requestedMetaLevel: Option[Int], allowPositionalCommandArgs: Boolean, systemExit: StopServer, streams0: SystemStreams, selectiveExecution: Boolean, offline: Boolean, reporter: EvaluatorApi => Int => Option[CompileProblemReporter], skipSelectiveExecution: Boolean, enableTicker: Boolean)

Logic around bootstrapping Mill, creating a MillBuildRootModule.BootstrapModule and compiling builds/meta-builds and classloading their RootModules so we can evaluate the requested tasks on the RootModule representing the user's build.mill file.

Logic around bootstrapping Mill, creating a MillBuildRootModule.BootstrapModule and compiling builds/meta-builds and classloading their RootModules so we can evaluate the requested tasks on the RootModule representing the user's build.mill file.

When Mill is run in client-server mode, or with --watch, then data from each evaluation is cached in-memory in prevRunnerState.

When a subsequent evaluation happens, each level of evaluateRec uses its corresponding frame from prevRunnerState to avoid work, re-using classloaders or workers to avoid running expensive classloading or re-evaluation. This should be transparent, improving performance without affecting behavior.

Attributes

Companion
object
Source
MillBuildBootstrap.scala
Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Companion
class
Source
MillBuildBootstrap.scala
Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Companion
class
Source
MillDaemonMain.scala
Supertypes
class Object
trait Matchable
class Any
Self type
class MillDaemonMain(daemonDir: Path, acceptTimeout: FiniteDuration, locks: Locks, outMode: OutFolderMode) extends MillDaemonServer[RunnerState]

Attributes

Companion
object
Source
MillDaemonMain.scala
Supertypes
class Server
class Object
trait Matchable
class Any
Show all
object MillMain0

Attributes

Source
MillMain0.scala
Supertypes
class Object
trait Matchable
class Any
Self type
MillMain0.type

Attributes

Source
MillNoDaemonMain.scala
Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Source
MillScalaParserImpl.scala
Supertypes
class Object
trait Matchable
class Any
Self type
case class RunnerState(bootstrapModuleOpt: Option[RootModule], frames: Seq[Frame], errorOpt: Option[String], buildFile: Option[String])

This contains a list of frames each representing cached data from a single level of build.mill evaluation:

This contains a list of frames each representing cached data from a single level of build.mill evaluation:

  • frame(0) contains the output of evaluating the user-given tasks
  • frame(1) contains the output of build.mill file compilation
  • frame(2) contains the output of the in-memory MillBuildRootModule.BootstrapModule
  • If there are meta-builds present (e.g. mill-build/build.mill), then frame(2) would contain the output of the meta-build compilation, and the in-memory bootstrap module would be pushed to a higher frame

If a level n fails to evaluate, then errorOpt is set to the error message and frames < n are set to RunnerState.Frame.empty

Note that frames may be partially populated, e.g. the final level of evaluation populates watched but not scriptImportGraph, classLoaderOpt or runClasspath since there are no further levels of evaluation that require them.

Attributes

Companion
object
Source
RunnerState.scala
Supertypes
trait Serializable
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object RunnerState

Attributes

Companion
class
Source
RunnerState.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
class TailManager(daemonDir: Path) extends AutoCloseable

Attributes

Source
TailManager.scala
Supertypes
trait AutoCloseable
class Object
trait Matchable
class Any
class TeePrintStream(out1: PrintStream, out2: PrintStream) extends PrintStream

Attributes

Source
TeePrintStream.scala
Supertypes
class PrintStream
trait Appendable
class FilterOutputStream
class OutputStream
trait Flushable
trait Closeable
trait AutoCloseable
class Object
trait Matchable
class Any
Show all
object Watching

Logic around the "watch and wait" functionality in Mill: re-run on change, re-run when the user presses Enter, printing status messages, etc.

Logic around the "watch and wait" functionality in Mill: re-run on change, re-run when the user presses Enter, printing status messages, etc.

Attributes

Source
Watching.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Watching.type