package framework
- Alphabetic
- Public
- Protected
Type Members
- trait CheckableApp extends AnyRef
Represents
distage
apps that can be checked by izumi.distage.framework.PlanCheck at compile-time.Represents
distage
apps that can be checked by izumi.distage.framework.PlanCheck at compile-time.CheckableApp
must be inherited in a top-level object to be usable withPlanCheck
Role-based applications automatically inherit from RoleCheckableApp and can be checked out of the box.
Apps assembled directly using
distage-core
'sdistage.Injector
will need to implement the interface manually, using CoreCheckableApp or CoreCheckableAppSimple - abstract class CoreCheckableApp[F[_]] extends CheckableApp
- abstract class CoreCheckableAppSimple[F[_]] extends CoreCheckableApp[F]
- final case class PlanCheckConfig[Roles <: String, ExcludeActivations <: String, Config <: String, CheckConfig <: Boolean, PrintBindings <: Boolean, OnlyWarn <: Boolean](roles: Roles, excludeActivations: ExcludeActivations, config: Config, checkConfig: CheckConfig, printBindings: PrintBindings, onlyWarn: OnlyWarn) extends Product with Serializable
Options to alter the behavior of izumi.distage.framework.PlanCheck
Options to alter the behavior of izumi.distage.framework.PlanCheck
- roles
"*" to check all roles, "role1 role2" to check specific roles, "* -role1 -role2" to check all roles _except_ specific roles.
- excludeActivations
"repo:dummy" to ignore missing implementations or other issues in
repo:dummy
axis choice. "repo:dummy | scene:managed" to ignore missing implementations or other issues inrepo:dummy
axis choice and inscene:managed
axis choice. "repo:dummy mode:test | scene:managed" to ignore missing implementations or other issues inrepo:dummy mode:test
activation and inscene:managed
activation. This will ignore parts of the graph accessible through these activations and larger activations that include them. That is, anything involvingscene:managed
or the combination of bothrepo:dummy mode:test
will not be checked. but activationsrepo:prod mode:test scene:provided
andrepo:dummy mode:prod scene:provided
are not excluded and will be checked. Allows the check to pass even if some axis choices or combinations of choices are (wilfully) left invalid, e.g. if you do haverepo:prod
components, but no counterpartrepo:dummy
components, and don't want to add them, then you may exclude "repo:dummy" from being checked.- config
Config resource file name, e.g. "application.conf" or "*" if using the same config settings as
roleAppMain
- checkConfig
Try to parse config file checking all the config bindings added using izumi.distage.config.ConfigModuleDef. Default:
true
- printBindings
Print all the bindings loaded from plugins when a problem is found during plan checking. Default:
false
- onlyWarn
Do not abort compilation when errors are found, just print a warning instead. Does not affect plan checks performed at runtime. Default:
false
- final case class PlanCheckMaterializer[AppMain <: CheckableApp, -Cfg <: Any](checkPassed: Boolean, checkedPlugins: Seq[ModuleBase], app: AppMain, roles: String, excludeActivations: String, config: String, checkConfig: Option[Boolean], printBindings: Option[Boolean], onlyWarn: Option[Boolean]) extends Product with Serializable
This implicit performs a compile-time check for a given
distage
-basedApp
when materialized.This implicit performs a compile-time check for a given
distage
-basedApp
when materialized.The reason to use an implicit macro for this, instead of a direct def-macro is because implicit macros are more compositional – you may write new functions using the implicit without writing new macros, by contrast macros can only be composed inside new macros – and this in turn requires separating them into different
sbt
modules.- AppMain
The application to check, this should be a static object, most often a
main
object inherited from izumi.distage.roles.RoleAppMain- Cfg
Additional configuration options for compile-time checker
- See also
- abstract class RoleCheckableApp[F[_]] extends CheckableApp
Value Members
- object CheckableApp
- object DebugProperties extends fundamentals.platform.properties.DebugProperties
- object PlanCheck
API for performing compile-time and runtime checks of correctness for
distage
applications.API for performing compile-time and runtime checks of correctness for
distage
applications.The easiest way to add compile-time safety to your application is to add an object inheriting PlanCheck.Main in test scope of the same module where you define your Role Launcher
import izumi.distage.framework.PlanCheck import com.example.myapp.MainLauncher object WiringCheck extends PlanCheck.Main(MainLauncher)
This object will emit compile-time errors for any issues or omissions in your
ModuleDefs
- See also
Example: - object PlanCheckConfig extends Serializable
- object PlanCheckMaterializer extends Serializable