Hello everyone! I'm needing some help related to t...
# koin
o
Hello everyone! I'm needing some help related to tests with Koin. What's the main difference between the old and now deprecated
checkModules
to the new
verify
? Because I'm seeing some scenarios where verify should fail, but it's not failing. Maybe I'm getting something wrong. If not, I would like to contribute to the project.
a
checkModules is kindof a sandbox run, whereas verify look at constructor and parameter metadata
checkModules are definitely hard to maintain on long time
o
What is the main challenge to support checkModules today, @arnaud.giuliani?
a
too verbose & fragile mainly, everytime your config changes it breaks
I'm looking at better DSL metadata to help verification. But I'm open to others ideas 👍
o
Just to clarify, by config changes you mean a construtor with a new parameter, or a new parameter passed by
parametersOf
? Now thinking about the checkModule really creating instances, it could even perform server requests in some cases like a request called on class constructor
init
. So the developers need to be sure to provide a mock instead a real api/dabatase implementation. That's really concerning.
👍 1
That's why koin now is building an annotation implementation version? I haven't used or read the code yet, but the annotation version of koin still only providing the instances when is require on an instantiated class, or it will work like Hilt/Dagger?
a
Koin annotation generate the Koin configuration in DSL for you. Still the same core engine