https://kotlinlang.org logo
Title
m

Merseyside

03/28/2023, 5:32 AM
Hi guys! Did somebody face the same behavoiur? https://github.com/InsertKoinIO/koin/issues/1544
a

arnaud.giuliani

03/31/2023, 12:56 PM
is it all the parameter stack cleared then?
m

Merseyside

03/31/2023, 1:31 PM
Clears _parameterStack in Scope.
See org.koin.core.scope.Scope, line 235
a

arnaud.giuliani

03/31/2023, 2:34 PM
but here we don't have any resolution result if I understand well, why keep such parameters?
m

Merseyside

03/31/2023, 2:37 PM
As I understand here's all params in the scope. If one time we didn't find it, next time I can not find something else. If I can not find 'A', 'B' clears too.
a

arnaud.giuliani

03/31/2023, 2:39 PM
parameters are "temporal " data used, just for one injection
m

Merseyside

03/31/2023, 2:39 PM
F.e. I make single { param1 = getOrNull(), param2 = get() }. First param not provided, then stack clears, and param2 then can not be found too.
Ok but somehow I can get param2 by get if param1 is not null, and can not get it if param1 not found in the scope.
a

arnaud.giuliani

03/31/2023, 3:51 PM
complex case here, as you resolution can fail
Then, if you use getOrNull() the stack clears the parameters?