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

Can't use Koin Annotations with package names that start with "it" #1904

Open
FCatinella opened this issue Jul 3, 2024 · 0 comments
Open

Comments

@FCatinella
Copy link

FCatinella commented Jul 3, 2024

Describe the bug
When a package name starts with "it" , ksp fails in generating the Koin Modules.

To Reproduce
Just annotate a class inside a package which name starts with "it"

package it.fabiocati.thegamedb.di

import org.koin.core.annotation.ComponentScan
import org.koin.core.annotation.Module

@Module
@ComponentScan
class GameDBModule

While compiling it throws this error:
[ksp] /Users/fabio/gameDbApp/app/build/generated/ksp/debug/kotlin/org/koin/ksp/generated/GameDBModuleGenit$fabiocati$thegamedb$di.kt: (7, 71): Function declaration must have a name

And by going inside GameDBModuleGen I could find this:
Screenshot 2024-07-03 alle 11 01 44

I suppose that the issue lies in the fact that "it" is a reserved word in Kotlin.

Expected behavior
Koin should create a Koin Module.

Koin module and version:
koin-annotations-bom : 1.3.1
koin-annotations : 1.3.1
koin-ksp-compiler: 1.3.1

Can you help me? Unfortunately in Italy we use the prefix "it" a lot.
Thanks

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