PrecompiledModuleRef

mill.api.internal.PrecompiledModuleRef

Instantiates a precompiled module from a YAML config file at module construction time, allowing it to be discovered by resolve _ as a child of its parent build module.

Called from generated build code. The extends class name, YAML path, and module deps are embedded at code-generation time.

Instances are cached by script file path so that both the child alias path (via CodeGen) and the script module resolver path (via ScriptModuleInit) return the same instance.

Attributes

Source
PrecompiledModuleRef.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def apply(parent: Module, relPath: String, extendsClass: String, moduleDeps0: () => Map[String, Seq[Module]], compileModuleDeps0: () => Map[String, Seq[Module]], runModuleDeps0: () => Map[String, Seq[Module]], bomModuleDeps0: () => Map[String, Seq[Module]]): Module

Attributes

Source
PrecompiledModuleRef.scala
def resolveModuleRef(parent: Module, ref: String, scriptFile: String, index: Int): Module

Resolve a module reference like "foo" or "foo.test" by using reflection to access specific named methods on the parent, avoiding triggering all lazy vals (which would cause circular initialization deadlocks).

Resolve a module reference like "foo" or "foo.test" by using reflection to access specific named methods on the parent, avoiding triggering all lazy vals (which would cause circular initialization deadlocks).

Value parameters

index

the byte offset in the YAML file where this dep is declared

scriptFile

the YAML config file declaring this dep, for error reporting

Attributes

Source
PrecompiledModuleRef.scala