Wanted to make an issue for tracking migration to Guice 7.0.0.
@ThePumpingLemma migrated to using Guice 6.0.0 (#2846), however, there remains issues with projects wanting to use misk-inject with Guice 7+. The largest issue is that when a project tries to use Guice 7+, it can not inject classes that are labelled with javax.inject.XXX annotations. Guice 6+ happily accepts both jakarta and javax.
Proposed path forwards
It seems like the path to migration would be twp steps:
- Replace all usages of
javax.inject.XXX with com.google.inject.XXX
- This enables projects to transition to using
jakarta.inject in their own projects, while consuming misk-inject @ 6.0.0
- Eventually cut over to Guice 7.0.0 at some point
- Optional: Replace
com.google.inject.XXX with jakarta.inject.XXX
Open question
- misk uses
detekt. Could we enable forbidding imports to enforce only using jakarta.inject.XXX?
- IntelliJ can also be adjusted to ignore certain imports for "Auto import" (Link), but there is no intellij configuration within misk by default
P.S. I'm happy to do the find-and-replace 😄
Wanted to make an issue for tracking migration to Guice 7.0.0.
@ThePumpingLemma migrated to using Guice 6.0.0 (#2846), however, there remains issues with projects wanting to use
misk-injectwith Guice 7+. The largest issue is that when a project tries to use Guice 7+, it can not inject classes that are labelled withjavax.inject.XXXannotations. Guice 6+ happily accepts bothjakartaandjavax.Proposed path forwards
It seems like the path to migration would be twp steps:
javax.inject.XXXwithcom.google.inject.XXXjakarta.injectin their own projects, while consumingmisk-inject@ 6.0.0com.google.inject.XXXwithjakarta.inject.XXXOpen question
detekt. Could we enable forbidding imports to enforce only usingjakarta.inject.XXX?P.S. I'm happy to do the find-and-replace 😄