mill.api

package mill.api

Members list

Type members

Classlikes

object BuildInfo

Attributes

Source
BuildInfo.scala
Supertypes
class Object
trait Matchable
class Any
Self type
BuildInfo.type
class BuildScriptException(msg: String, script: Option[String]) extends MillException

Attributes

Source
MillException.scala
Supertypes
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
abstract class CachedFactory[K, V] extends AutoCloseable

Manage the setup, teardown, and caching of objects of type V safely in a multithreaded environment.

Manage the setup, teardown, and caching of objects of type V safely in a multithreaded environment.

The user provides the setup and teardown logic along with a maxCacheSize, and CachedFactory provides instances of V as requested using the withValue method. These instances are automatically constructed on-demand from the give key, cached with an LRU strategy, and destroyed when they are eventually evicted

Intended for relatively small caches approximately O(num-threads) in size that will typically get used in a build system, not intended for caching large amounts of entries

Attributes

Source
CachedFactory.scala
Supertypes
trait AutoCloseable
class Object
trait Matchable
class Any
@Scaladoc(value = "/**\n * Utilities for creating classloaders for running compiled Java/Scala code in\n * isolated classpaths.\n */")
object ClassLoader

Utilities for creating classloaders for running compiled Java/Scala code in isolated classpaths.

Utilities for creating classloaders for running compiled Java/Scala code in isolated classpaths.

Attributes

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

A listener trait for getting notified about compilation output like compiler warnings and errors

A listener trait for getting notified about compilation output like compiler warnings and errors

Attributes

Source
CompileProblemReporter.scala
Supertypes
class Object
trait Matchable
class Any
@Scaladoc(value = "/**\n * Provides access to various resources in the context of a current execution Target.\n */")
object Ctx

Provides access to various resources in the context of a current execution Target.

Provides access to various resources in the context of a current execution Target.

Attributes

Companion
class
Source
Ctx.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Ctx.type
class Ctx(val args: IndexedSeq[_], dest0: () => Path, val log: Logger, val home: Path, val env: Map[String, String], val reporter: Int => Option[CompileProblemReporter], val testReporter: TestReporter, val workspace: Path, val systemExit: Int => Nothing, val fork: Api) extends Dest, Log, Args, Home, Env, Workspace

Represents the data and utilities that are contextually available inside the implementation of a Task.

Represents the data and utilities that are contextually available inside the implementation of a Task.

Attributes

Companion
object
Source
Ctx.scala
Supertypes
trait Workspace
trait Env
trait Home
trait Args
trait Log
trait Dest
class Object
trait Matchable
class Any
Show all

Unique diagnostic code given from the compiler with an optional further explanation.

Unique diagnostic code given from the compiler with an optional further explanation.

Attributes

Source
CompileProblemReporter.scala
Supertypes
class Object
trait Matchable
class Any
@Scaladoc(value = "/**\n * A dummy input stream containing an empty byte array.\n */")
object DummyInputStream extends ByteArrayInputStream

A dummy input stream containing an empty byte array.

A dummy input stream containing an empty byte array.

Attributes

Source
StreamSupport.scala
Supertypes
class ByteArrayInputStream
class InputStream
trait Closeable
trait AutoCloseable
class Object
trait Matchable
class Any
Show all
Self type
@Scaladoc(value = "/**\n * A dummy output stream that does nothing with what it consumes (think of it as `/dev/null`).\n */")
object DummyOutputStream extends OutputStream

A dummy output stream that does nothing with what it consumes (think of it as /dev/null).

A dummy output stream that does nothing with what it consumes (think of it as /dev/null).

Attributes

Source
StreamSupport.scala
Supertypes
class OutputStream
trait Flushable
trait Closeable
trait AutoCloseable
class Object
trait Matchable
class Any
Show all
Self type
@Scaladoc(value = "/**\n * Dummy Test Reporter that doesn\'t report\n * anything for any testing event.\n */")

Dummy Test Reporter that doesn't report anything for any testing event.

Dummy Test Reporter that doesn't report anything for any testing event.

Attributes

Source
BuildReporter.scala
Supertypes
trait TestReporter
class Object
trait Matchable
class Any
Self type
case object Error extends Severity

Attributes

Source
CompileProblemReporter.scala
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Severity
class Object
trait Matchable
class Any
Show all
Self type
Error.type
@Scaladoc(value = "/**\n * Misc IO utilities, eventually probably should be pushed upstream into\n * ammonite-ops\n */")
object IO extends StreamSupport

Misc IO utilities, eventually probably should be pushed upstream into ammonite-ops

Misc IO utilities, eventually probably should be pushed upstream into ammonite-ops

Attributes

Source
IO.scala
Supertypes
class Object
trait Matchable
class Any
Self type
IO.type
case object Info extends Severity

Attributes

Source
CompileProblemReporter.scala
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Severity
class Object
trait Matchable
class Any
Show all
Self type
Info.type
final class JarManifest

Represents a JAR manifest.

Represents a JAR manifest.

Value parameters

groups

additional attributes for named entries

main

the main manifest attributes

Attributes

Companion
object
Source
JarManifest.scala
Supertypes
class Object
trait Matchable
class Any
object JarManifest

Attributes

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

Attributes

Companion
object
Source
JarOps.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object JarOps
object JarOps extends JarOps

Attributes

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

Attributes

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

Defines various default JSON formatters used in mill.

Defines various default JSON formatters used in mill.

Attributes

Companion
object
Source
JsonFormatters.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Lazy[T](t: () => T)

Attributes

Source
Lazy.scala
Supertypes
class Object
trait Matchable
class Any
trait Logger extends AutoCloseable

The standard logging interface of the Mill build tool.

The standard logging interface of the Mill build tool.

Contains these primary logging methods, in order of increasing importance:

  • debug : internal debug messages normally not shown to the user; mostly useful when debugging issues

  • ticker: short-lived logging output where consecutive lines over-write each other; useful for information which is transient and disposable

  • info: miscellaneous logging output which isn't part of the main output a user is looking for, but useful to provide context on what Mill is doing

  • error: logging output which represents problems the user should care about

Also contains the two forwarded stdout and stderr streams, for code executed by Mill to use directly. Typically, these correspond to the stdout and stderr, but when show is used both are forwarded to stderr and stdout is only used to display the final show output for easy piping.

Attributes

Source
Logger.scala
Supertypes
trait AutoCloseable
class Object
trait Matchable
class Any
Known subtypes
trait ColorLogger
class MultiLogger
class PrefixLogger
class PrintLogger
object DummyLogger
class FileLogger
class ProxyLogger
Show all
object Loose

Attributes

Source
AggWrapper.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Loose.type
class MillException(msg: String) extends Exception

This exception is specifically handled in mill.runner.MillMain and mill.runner.MillServerMain. You can use it, if you need to exit Mill with a nice error message.

This exception is specifically handled in mill.runner.MillMain and mill.runner.MillServerMain. You can use it, if you need to exit Mill with a nice error message.

Value parameters

msg

The error message, to be displayed to the user.

Attributes

Source
MillException.scala
Supertypes
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
Known subtypes
object Mirrors

Attributes

Source
Mirrors.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Mirrors.type
case class PathRef

A wrapper around os.Path that calculates it's hashcode based on the contents of the filesystem underneath it. Used to ensure filesystem changes can bust caches which are keyed off hashcodes.

A wrapper around os.Path that calculates it's hashcode based on the contents of the filesystem underneath it. Used to ensure filesystem changes can bust caches which are keyed off hashcodes.

Attributes

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

Attributes

Companion
class
Source
PathRef.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
PathRef.type
trait Problem

Contains general information about the build problem

Contains general information about the build problem

Attributes

Source
CompileProblemReporter.scala
Supertypes
class Object
trait Matchable
class Any

Indicates the exact location (source file, line, column) of the build problem

Indicates the exact location (source file, line, column) of the build problem

Attributes

Source
CompileProblemReporter.scala
Supertypes
class Object
trait Matchable
class Any
sealed trait Result[+T]

The result of a task execution.

The result of a task execution.

Type parameters

T

The result type of the computed task.

Attributes

Companion
object
Source
Result.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Aborted
trait Failing[T]
class Exception
class Failure[T]
object Skipped
class Success[T]
Show all
object Result

Attributes

Companion
trait
Source
Result.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Result.type
case class Retry(count: Int, backoffMillis: Long, backoffMultiplier: Double, timeoutMillis: Long, filter: (Int, Throwable) => Boolean)

Attributes

Source
Retry.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
sealed trait Severity

Attributes

Source
CompileProblemReporter.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Error
object Info
object Warn

Attributes

Source
StreamSupport.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object IO
object Strict

Attributes

Source
AggWrapper.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Strict.type
class SystemStreams(val out: PrintStream, val err: PrintStream, val in: InputStream)

Represents a set of streams that look similar to those provided by the operating system. These may internally be proxied/redirected/processed, but from the consumer's perspective they look just like the stdout/stderr/stdin that any Unix process receives from the OS.

Represents a set of streams that look similar to those provided by the operating system. These may internally be proxied/redirected/processed, but from the consumer's perspective they look just like the stdout/stderr/stdin that any Unix process receives from the OS.

Attributes

Companion
object
Source
SystemStreams.scala
Supertypes
class Object
trait Matchable
class Any
object SystemStreams

Attributes

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

Test reporter class that can be injected into the test task and report information upon the start and the finish of testing events

Test reporter class that can be injected into the test task and report information upon the start and the finish of testing events

Attributes

Source
BuildReporter.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
case class Val(value: Any)

A somewhat-type-safe wrapper around Any. Stores an un-typed value, but can only be created explicitly by wrapping in Val(_) and de-constructed explicitly via .value. That makes it much less likely to introduce bugs passing the wrong thing, e.g. (Any, Int) can be passed to Any, but (Val, Int) cannot be passed to Val

A somewhat-type-safe wrapper around Any. Stores an un-typed value, but can only be created explicitly by wrapping in Val(_) and de-constructed explicitly via .value. That makes it much less likely to introduce bugs passing the wrong thing, e.g. (Any, Int) can be passed to Any, but (Val, Int) cannot be passed to Val

Attributes

Source
Val.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case object Warn extends Severity

Attributes

Source
CompileProblemReporter.scala
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Severity
class Object
trait Matchable
class Any
Show all
Self type
Warn.type
object WorkspaceRoot

Attributes

Source
WorkspaceRoot.scala
Supertypes
class Object
trait Matchable
class Any
Self type
class experimental extends StaticAnnotation

Annotation to mark experimental API, which is not guaranteed to stay.

Annotation to mark experimental API, which is not guaranteed to stay.

Attributes

Source
experimental.scala
Supertypes
trait StaticAnnotation
class Annotation
class Object
trait Matchable
class Any
class internal extends StaticAnnotation

Annotation to mark internal API, which is not guaranteed to stay.

Annotation to mark internal API, which is not guaranteed to stay.

Attributes

Source
internal.scala
Supertypes
trait StaticAnnotation
class Annotation
class Object
trait Matchable
class Any

Deprecated classlikes

class FixSizedCache[T](perKeySize: Int) extends KeyedLockedCache[T]

Simple fixed size cache mainly intended for use in ZincWorkerImpl with the following properties

Simple fixed size cache mainly intended for use in ZincWorkerImpl with the following properties

  • Elements are lazily initialized upon first access
  • Cached element ordering is preserved. The earliest available cache entry which is probably a compiler instance will always be returned first, and it will always be put back in the cache in the same position. This is important because each compiler instance is JITed independently. So with a stable ordering so we can bias towards reusing an already warm compiler.

Value parameters

perKeySize

Cache Size per unique key

Attributes

Deprecated
true
Source
FixSizedCache.scala
Supertypes
trait KeyedLockedCache[T]
class Object
trait Matchable
class Any
trait KeyedLockedCache[T]

A combination lock & cache; users provide a key, value-factory, and a body function to be called with the value. KeyedLockedCache ensures that the body function is called with the computed/cached value sequentially.

A combination lock & cache; users provide a key, value-factory, and a body function to be called with the value. KeyedLockedCache ensures that the body function is called with the computed/cached value sequentially.

Attributes

Companion
object
Deprecated
true
Source
KeyedLockedCache.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class FixSizedCache[T]

Attributes

Companion
trait
Deprecated
true
Source
KeyedLockedCache.scala
Supertypes
class Object
trait Matchable
class Any
Self type