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

Allow extendability (plugin support?) #192

Open
dshatz opened this issue Nov 27, 2024 · 1 comment
Open

Allow extendability (plugin support?) #192

dshatz opened this issue Nov 27, 2024 · 1 comment

Comments

@dshatz
Copy link

dshatz commented Nov 27, 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 (for generated code?). Or implement some plugin mechanism?

Describe alternatives you've considered
Disabling koin config check.

Target Koin project
Koin annotations, to be specific config check part.

@dshatz
Copy link
Author

dshatz commented Nov 30, 2024

I have resolved this (see latest commit in the repo above).

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