Skip to content

airframe-di: Next generation DI library #1649

@xerial

Description

@xerial
  • Support only constructor injection!

  • Deprecate in-trait bindings

    • For supporting Scala 3 at ease. Writing macros for nested trait instantiation is the tricky part. If we use constructor injection, the code will be much simpler
  • Migration plan

    • Retain the current airframe module as is.
    • Add a new module "airframe-di" so that the user can migrate to a new one at any timing.
    • The package name will be wvlet.airframe.di => Deprecate in-trait injection only from Scala 3! Use the same package name to reduce the confusion.
  • Usage stats of in-trait bindings (inside TD)

    • bind[X] a lot!!!
    • bindLocal[X] only a few times
    • bindFactory[X] only a few times
    • So dropping bindLocal, bindFactory should be ok.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions