Sourced from com.google.dagger:hilt-android's releases.
Dagger 2.53
Potentially breaking changes:
@Binds
methods now requires explicit nullabilityNew:
@Binds
methods must explicitly declare nullability (previously we tried to infer it from the parameter). This change aligns the nullability behavior of@Binds
with how nullability is treated elsewhere in Dagger by requiring it to be explict at the request and declaration sites. (4941926c5)Suggested fix: If you get a failure due to this change, add the proper nullability to your
@Binds
method/parameter. For example:@Module interface MyModule { - @Binds fun bindToNullableImpl(impl: FooImpl): Foo + @Binds fun bindToNullableImpl(impl: FooImpl?): Foo? }
Scopes are now banned on
@Binds
that delegate to production implementations.New: Scoping an
@Binds
method that delegates to an@Produces
implementation is not allowed. The scope was ignored anyway because production bindings are implicitly scoped. (03b237ff2)Suggested fix: Remove the scope annotation (since the scope was ignored, this should not be a functional change).
@Module interface MyModule { - @ProductionScoped @Binds fun bindToProductionImpl(impl: FooImpl): Foo }
@JvmSuppressWildcards
now required on multibound map requests in KSP.New: When requesting a multibound map, users must include
@JvmSuppressWildcards
on the map's value, e.g.Map<K, @JvmSuppressWildcards V>
. Note that this has always been the behavior in KAPT, but due to a bug in the KSP implementation we accidentally matched the request without@JvmSuppressWildcards
.Suggested fix: Unfortunately, this means users may need to add back
@JvmSuppressWildcards
for multibound map requests. At the moment, KSP doesn't provide a way to determine the Kotlin type is actually assignable toMap<K, V>
without@JvmSuppressWildcards
at compile time, and without this check users could hit runtime failures when Dagger tries to cast the type to the users type.class MyClass </tr></table>
... (truncated)
649eed5
2.53 release369bbc6
[Refactor]: Move members injection optimization into its
RequestRepresentation.841d765
Internal changes2d75be9
Internal changes4046f2c
[Refactor]: Change FrameworkField#create()
to better align
with the XPoet m...9fe4824
Internal changesfdbc63e
[Refactor]: Move
ProvisionMethods#create()
/InjectionSiteMethods#create()
...2b84e57
Kotlin compiler update to 2.0.21, prework.fe811e1
Kotlin compiler update to 2.0.21, prework.6b183f8
Support requesting Jakarta Provider types.Sourced from com.google.dagger:hilt-compiler's releases.
Dagger 2.53
Potentially breaking changes:
@Binds
methods now requires explicit nullabilityNew:
@Binds
methods must explicitly declare nullability (previously we tried to infer it from the parameter). This change aligns the nullability behavior of@Binds
with how nullability is treated elsewhere in Dagger by requiring it to be explict at the request and declaration sites. (4941926c5)Suggested fix: If you get a failure due to this change, add the proper nullability to your
@Binds
method/parameter. For example:@Module interface MyModule { - @Binds fun bindToNullableImpl(impl: FooImpl): Foo + @Binds fun bindToNullableImpl(impl: FooImpl?): Foo? }
Scopes are now banned on
@Binds
that delegate to production implementations.New: Scoping an
@Binds
method that delegates to an@Produces
implementation is not allowed. The scope was ignored anyway because production bindings are implicitly scoped. (03b237ff2)Suggested fix: Remove the scope annotation (since the scope was ignored, this should not be a functional change).
@Module interface MyModule { - @ProductionScoped @Binds fun bindToProductionImpl(impl: FooImpl): Foo }
@JvmSuppressWildcards
now required on multibound map requests in KSP.New: When requesting a multibound map, users must include
@JvmSuppressWildcards
on the map's value, e.g.Map<K, @JvmSuppressWildcards V>
. Note that this has always been the behavior in KAPT, but due to a bug in the KSP implementation we accidentally matched the request without@JvmSuppressWildcards
.Suggested fix: Unfortunately, this means users may need to add back
@JvmSuppressWildcards
for multibound map requests. At the moment, KSP doesn't provide a way to determine the Kotlin type is actually assignable toMap<K, V>
without@JvmSuppressWildcards
at compile time, and without this check users could hit runtime failures when Dagger tries to cast the type to the users type.class MyClass </tr></table>
... (truncated)
649eed5
2.53 release369bbc6
[Refactor]: Move members injection optimization into its
RequestRepresentation.841d765
Internal changes2d75be9
Internal changes4046f2c
[Refactor]: Change FrameworkField#create()
to better align
with the XPoet m...9fe4824
Internal changesfdbc63e
[Refactor]: Move
ProvisionMethods#create()
/InjectionSiteMethods#create()
...2b84e57
Kotlin compiler update to 2.0.21, prework.fe811e1
Kotlin compiler update to 2.0.21, prework.6b183f8
Support requesting Jakarta Provider types.Sourced from com.google.dagger.hilt.android's releases.
Dagger 2.53
Potentially breaking changes:
@Binds
methods now requires explicit nullabilityNew:
@Binds
methods must explicitly declare nullability (previously we tried to infer it from the parameter). This change aligns the nullability behavior of@Binds
with how nullability is treated elsewhere in Dagger by requiring it to be explict at the request and declaration sites. (4941926c5)Suggested fix: If you get a failure due to this change, add the proper nullability to your
@Binds
method/parameter. For example:@Module interface MyModule { - @Binds fun bindToNullableImpl(impl: FooImpl): Foo + @Binds fun bindToNullableImpl(impl: FooImpl?): Foo? }
Scopes are now banned on
@Binds
that delegate to production implementations.New: Scoping an
@Binds
method that delegates to an@Produces
implementation is not allowed. The scope was ignored anyway because production bindings are implicitly scoped. (03b237ff2)Suggested fix: Remove the scope annotation (since the scope was ignored, this should not be a functional change).
@Module interface MyModule { - @ProductionScoped @Binds fun bindToProductionImpl(impl: FooImpl): Foo }
@JvmSuppressWildcards
now required on multibound map requests in KSP.New: When requesting a multibound map, users must include
@JvmSuppressWildcards
on the map's value, e.g.Map<K, @JvmSuppressWildcards V>
. Note that this has always been the behavior in KAPT, but due to a bug in the KSP implementation we accidentally matched the request without@JvmSuppressWildcards
.Suggested fix: Unfortunately, this means users may need to add back
@JvmSuppressWildcards
for multibound map requests. At the moment, KSP doesn't provide a way to determine the Kotlin type is actually assignable toMap<K, V>
without@JvmSuppressWildcards
at compile time, and without this check users could hit runtime failures when Dagger tries to cast the type to the users type.class MyClass </tr></table>
... (truncated)
649eed5
2.53 release369bbc6
[Refactor]: Move members injection optimization into its
RequestRepresentation.841d765
Internal changes2d75be9
Internal changes4046f2c
[Refactor]: Change FrameworkField#create()
to better align
with the XPoet m...9fe4824
Internal changesfdbc63e
[Refactor]: Move
ProvisionMethods#create()
/InjectionSiteMethods#create()
...2b84e57
Kotlin compiler update to 2.0.21, prework.fe811e1
Kotlin compiler update to 2.0.21, prework.6b183f8
Support requesting Jakarta Provider types.