In the previous version, the compiler would verify...
# koin
u
In the previous version, the compiler would verify completeness of single module's graphs. I see that this is not always desireable, but I actually thought it was a good idea to have the compiler verify self-containedness of single modules. I built all my modules to include all modules it dependent upon. Can this behavior be achieved with the 1.2 compiler as well?
a
You mean the local module verification?
u
I guess so
I mean, I would like the compiler to verify that no module has dangling dependencies, waiting to be filled in by the main app. I.e that each module is a valid subgraph on it's own. For each module I explicitly include all modules required to fulfill all it's deps. I started doing so, as the compiler plugin used to complain otherwise. Then when I adapted and started liking this explicit approach, the plugin stepped back to only verify the full app graph.
1.1.0 release notes say:
Copy code
A compile-safety architecture release: per-module validation is removed entirely in favor
of a single, authoritative full-graph check at each Koin entry point.
a
without full graph visiiblity it's hard to say if another modulecontribute or not
u
Right. If a gradle module wants stuff injected by the main app, then it's koin modules must by definition be non-complete. That's a design decision for an app which is debatable but valid. But if I claimed for my koin modules, that all dependencies were local or inside my included modules, this should be possible to verify. So if koin had a switch to turn on the pre 1.1.0 behavior, app architects could choose if they want loosely coupled dependency providers or strict, explicit subgraphs.