Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve extendability (plugin support?) #1890

Open
dshatz opened this issue Jun 3, 2024 · 0 comments
Open

Improve extendability (plugin support?) #1890

dshatz opened this issue Jun 3, 2024 · 0 comments

Comments

@dshatz
Copy link

dshatz commented Jun 3, 2024

Is your feature request related to a problem? Please describe.
I am developing a ksp processor for generating a koin module from ktorfit declarations.
https://github.com/dshatz/ktorfit-koin

The user creates a class:

@ServiceModule(scan="com.example.services")
class NetworkModule

My library generates:

val NetworkModule.module: Module = networkModule
val networkModule = module {
   // all ktorfit services discovered by my ksp processor.
}

Then, import the generated module into a normal Koin module.

@Module(includes=[NetworkModule::class])
class AppModule

The problem is that koin config check doesn't allow this. The error I get is:
Fix your configuration: add @Module annotation on <Module class generated by ktorfit-koin>

Describe the solution you'd like
Optionally disable @Module annotation presence check. Or implement some plugin mechanism?

Describe alternatives you've considered
Disabling koin config check.

Target Koin project

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant