Define an app with a dependency on both the test library and Koin 3.5.3 (using BOM)
Invoke the library's entrypoint in an app
An exception similar to the following will be produced:
No static method koinApplication(Lkotlin/jvm/functions/Function1;)Lorg/koin/core/KoinApplication; in class Lorg/koin/dsl/KoinApplicationKt; or its super classes (declaration of 'org.koin.dsl.KoinApplicationKt' appears in […])
Expected behavior
Maven dependency resolution will select 3.5.3 over 3.4.2 because they are theoretically semver-compatible and 3.5.3 is higher.
Library will continue to function as expected, with isolated context.
Koin module and version:
koin-core:3.5.3
Snippet or Sample project to help reproduce
~No standalone set of projects created, but a PR will follow.~
https://github.com/gsprdev/koin1829
Describe the bug
If a library is compiled using Koin 3.4, and an app using Koin 3.5 tries to use that library, a runtime exception can occur.
Koin 3.5 appears to be source-compatible with 3.4, but is not binary-compatible.
This appears to be because Koin 3.5 violates kotlinlang.org's "Don't add arguments to existing API functions" guideline for libraries
To Reproduce
koinApplication { }
API as instructed in insert-koin.io's "Context Isolation" documentationAn exception similar to the following will be produced:
Expected behavior Maven dependency resolution will select 3.5.3 over 3.4.2 because they are theoretically semver-compatible and 3.5.3 is higher. Library will continue to function as expected, with isolated context.
Koin module and version: koin-core:3.5.3
Snippet or Sample project to help reproduce ~No standalone set of projects created, but a PR will follow.~ https://github.com/gsprdev/koin1829