yatagan icon indicating copy to clipboard operation
yatagan copied to clipboard

Api: Support dagger-compat mode.

Open Jeffset opened this issue 9 months ago • 1 comments

Api: Support dagger-compat mode.

This newly introduced mode can now be enabled with yatagan.experimental.enableDaggerCompatibility option.

This mode is designed for yatagan to be a drop-in replacement of dagger, with minimal migration work. And all the necessary migration actions will keep the code compatible with the vanilla dagger.

If active, all dagger annotations and types that have supported functionality in yatagan are recognized, while yatagan annotations and types can be used interchangeably.

Components can be created with Dagger<class-name> generated facades; Yatagan.* entry-points are also available, but only for classes, that are annotated with com.yandex.yatagan.Component annotations.

One can keep both dagger and yatagan annotations on declarations; the yatagan ones have priority over dagger ones.

RT support: possible, but TBD.

Jeffset avatar May 15 '24 15:05 Jeffset

Codecov Report

Attention: Patch coverage is 89.94083% with 17 lines in your changes are missing coverage. Please review.

Project coverage is 83.86%. Comparing base (e1cbe57) to head (6fa6118). Report is 1 commits behind head on main.

Files Patch % Lines
...atagan/codegen/impl/DaggerCompatBridgeGenerator.kt 83.87% 2 Missing and 3 partials :warning:
...ex/yatagan/codegen/impl/ScopedProviderGenerator.kt 0.00% 2 Missing and 1 partial :warning:
...n/com/yandex/yatagan/lang/compiled/CtMethodBase.kt 83.33% 0 Missing and 3 partials :warning:
...lin/com/yandex/yatagan/core/model/impl/coreUtil.kt 0.00% 1 Missing and 1 partial :warning:
.../yandex/yatagan/lang/compiled/CtConstructorBase.kt 66.66% 0 Missing and 2 partials :warning:
...dex/yatagan/lang/compiled/CtTypeDeclarationBase.kt 80.00% 0 Missing and 2 partials :warning:
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #153      +/-   ##
============================================
+ Coverage     83.71%   83.86%   +0.15%     
- Complexity     1555     1598      +43     
============================================
  Files           191      197       +6     
  Lines          7548     7681     +133     
  Branches       1416     1448      +32     
============================================
+ Hits           6319     6442     +123     
- Misses          727      729       +2     
- Partials        502      510       +8     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar May 15 '24 15:05 codecov[bot]