## Supports the creation of a pure wrapper codec for an existing codec. Pure wrapper codecs seemed to require explicitly defining the interconversion in Format. ```scala implicit val codec: Codec[MyName] = Format { json => MyName(json.to[String]) } { t => implicitly[Codec[String]].serialize(t) } ``` This is so redundant that it allows a simple wrap in ConstCodec to be used. ```scala implicit val codec: Codec[MyName] = ConstCodec.pure(MyName.apply)(MyName.unapply) ``` ## Supports primary constructor injections that are evaluated at any time. In the case of primary constructor injection, even classes that provide long-lived behavior are evaluated and immutable instances are created. It is incompatible with localized DI Scope and therefore supports injections that are evaluated every time they are accessed. ~ v1.2.3 ```scala class A(b: B) extends AutoInject class B(c: C) extends AutoInject class C() extends AutoInject { val value = 1 } val a = inject[A] a.b.c.value // will be 1 shade { implicit ctn => new B(new C() { override val value = 2 }).index(Overwrite) a.b.c.value // will be 1 } ``` v1.3.0 ~ ```scala class A(b: Lazy[B]) extends AutoInject // Importante!! class B(c: C) extends AutoInject class C() extends AutoInject { val value = 1 } val a = inject[A] a.b.c.value // will be 1 shade { implicit ctn => new B(new C() { override val value = 2 }).index(Overwrite) a.b.c.value // will be 2 // Because the member b of class A is `Lazy[B]`, it is evaluated on access } ```
This issue appears to be discussing a feature request or bug report related to the repository. Based on the content, it seems to be resolved. The issue was opened by giiita and has received 0 comments.