File tree Expand file tree Collapse file tree
doc/microsite/src/main/tut/distage Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -807,9 +807,9 @@ Further reading:
807807
808808## Mutator Bindings
809809
810- Mutations can be attached to any component using ` modify[X] ` keyword.
810+ Mutators can be attached to any component using ` modify[X] ` keyword.
811811
812- If present, they will be applied in an undefined order after the component has been created, but _ before_ it is visible to any other component.
812+ If present, mutators will be applied in an undefined order after the component has been created, but _ before_ it is visible to any other component.
813813
814814Mutators provide a way to do partial overrides or slight modifications of some existing component without redefining it fully.
815815
@@ -831,7 +831,7 @@ def incrementWithDep = new ModuleDef {
831831 make[String ].fromValue(" hello" )
832832 make[Int ].named(" a-few" ).fromValue(2 )
833833
834- // mutators may use other components and add additional dependencies
834+ // mutators may add dependencies on other components
835835 modify[Int ].by(_.flatAp {
836836 (s : String , few : Int @ Id (" a-few" )) => (currentInt : Int ) =>
837837 s.length + few + currentInt
Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ You may activate GraphViz dump for a `distage-framework` @ref[Role-based applica
105105
106106#### Testkit activation
107107
108- You may activate GraphViz dump in ` distage-testkit ` tests by setting ` PlanningOptions( addGraphVizDump = true) ` in ` config ` :
108+ You may activate GraphViz dump in ` distage-testkit ` tests by setting ` planningOptions. addGraphVizDump` to true in ` config ` :
109109
110110``` scala mdoc:reset
111111import izumi .distage .testkit .scalatest .Spec2
@@ -114,9 +114,7 @@ import izumi.distage.framework.config.PlanningOptions
114114
115115final class MyTest extends Spec2 [zio.IO ] {
116116 override def config : TestConfig = super .config.copy(
117- planningOptions = PlanningOptions (
118- addGraphVizDump = true ,
119- )
117+ planningOptions = PlanningOptions .default.copy(addGraphVizDump = true )
120118 )
121119}
122120```
@@ -133,7 +131,7 @@ import zio.IO
133131
134132abstract class MyRoleLauncher extends RoleAppMain .LauncherBIO [IO ] {
135133 override protected def roleAppBootOverrides (argv : RoleAppMain .ArgV ): Module = new ModuleDef {
136- make [PlanningOptions ].from( PlanningOptions (addGraphVizDump = true ))
134+ modify [PlanningOptions ](_.copy (addGraphVizDump = true ))
137135 }
138136}
139137```
You can’t perform that action at this time.
0 commit comments