Seb Jachec
01/23/2023, 3:19 PMsingleOf
declarations in the format below are now unable to be resolved at compile time. How should I be migrating these? I couldn’t seem to find any migration guide or detail of this in the changelog, unless I’ve missed something!
module {
// ...
singleOf { a, b, c -> SomeFactory(a, b, c).build() }
}
// Compiler error:
// None of the following functions can be called with the arguments supplied: ...
// public inline fun <reified R> Module.singleOf(...
// etc ...
Pedro Alberto
01/23/2023, 5:45 PMSeb Jachec
01/23/2023, 6:52 PMNone of the following functions can be called with the arguments supplied:
public inline fun <reified R> Module.singleOf(crossinline constructor: () -> TypeVariable(R), noinline options: DefinitionOptions<TypeVariable(R)>? /* = (BeanDefinition<TypeVariable(R)>.() -> Unit)? */ = ...): KoinDefinition<TypeVariable(R)> defined in org.koin.core.module.dsl
public inline fun <reified R, reified T1> Module.singleOf(crossinline constructor: (TypeVariable(T1)) -> TypeVariable(R), noinline options: DefinitionOptions<TypeVariable(R)>? /* = (BeanDefinition<TypeVariable(R)>.() -> Unit)? */ = ...): KoinDefinition<TypeVariable(R)> defined in org.koin.core.module.dsl
public inline fun <reified R, reified T1, reified T2> Module.singleOf(crossinline constructor: (TypeVariable(T1), TypeVariable(T2)) -> TypeVariable(R), noinline options: DefinitionOptions<TypeVariable(R)>? /* = (BeanDefinition<TypeVariable(R)>.() -> Unit)? */ = ...): KoinDefinition<TypeVariable(R)> defined in org.koin.core.module.dsl
public inline fun <reified R, reified T1, reified T2, reified T3> Module.singleOf(crossinline constructor: (TypeVariable(T1), TypeVariable(T2), TypeVariable(T3)) -> TypeVariable(R), noinline options: DefinitionOptions<TypeVariable(R)>? /* = (BeanDefinition<TypeVariable(R)>.() -> Unit)? */ = ...): KoinDefinition<TypeVariable(R)> defined in org.koin.core.module.dsl
public inline fun <reified R, reified T1, reified T2, reified T3, reified T4> Module.singleOf(crossinline constructor: (TypeVariable(T1), TypeVariable(T2), TypeVariable(T3), TypeVariable(T4)) -> TypeVariable(R), noinline options: DefinitionOptions<TypeVariable(R)>? /* = (BeanDefinition<TypeVariable(R)>.() -> Unit)? */ = ...): KoinDefinition<TypeVariable(R)> defined in org.koin.core.module.dsl
public inline fun <reified R, reified T1, reified T2, reified T3, reified T4, reified T5> Module.singleOf(crossinline constructor: (TypeVariable(T1), TypeVariable(T2), TypeVariable(T3), TypeVariable(T4), TypeVariable(T5)) -> TypeVariable(R), noinline options: DefinitionOptions<TypeVariable(R)>? /* = (BeanDefinition<TypeVariable(R)>.() -> Unit)? */ = ...): KoinDefinition<TypeVariable(R)> defined in org.koin.core.module.dsl
public inline fun <reified R, reified T1, reified T2, reified T3, reified T4, reified T5, reified T6> Module.singleOf(crossinline constructor: (TypeVariable(T1), TypeVariable(T2), TypeVariable(T3), TypeVariable(T4), TypeVariable(T5), TypeVariable(T6)) -> TypeVariable(R), noinline options: DefinitionOptions<TypeVariable(R)>? /* = (BeanDefinition<TypeVariable(R)>.() -> Unit)? */ = ...): KoinDefinition<TypeVariable(R)> defined in org.koin.core.module.dsl
public inline fun <reified R, reified T1, reified T2, reified T3, reified T4, reified T5, reified T6, reified T7> Module.singleOf(crossinline constructor: (TypeVariable(T1), TypeVariable(T2), TypeVariable(T3), TypeVariable(T4), TypeVariable(T5), TypeVariable(T6), TypeVariable(T7)) -> TypeVariable(R), noinline options: DefinitionOptions<TypeVariable(R)>? /* = (BeanDefinition<TypeVariable(R)>.() -> Unit)? */ = ...): KoinDefinition<TypeVariable(R)> defined in org.koin.core.module.dsl
Pedro Alberto
01/24/2023, 2:59 PMSeb Jachec
01/24/2023, 3:24 PMsingleOf { … }
with zero errors in 3.2.2, I’m not sure what to port/migrate them to in order to fix the errors that appear when I use Koin 3.3Pedro Alberto
01/24/2023, 3:52 PMSeb Jachec
01/24/2023, 3:52 PMPedro Alberto
01/24/2023, 8:39 PMarnaud.giuliani
01/25/2023, 8:26 AMsingleOf { a, b, c -> SomeFactory(a, b, c).build() }
won’t be replaceable with DSL ConstructorSeb Jachec
01/25/2023, 10:26 AMPedro Alberto
01/25/2023, 10:26 AMSeb Jachec
01/25/2023, 1:25 PM