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

Classes with the same name in different packages produce "Conflicting overloads" errors on build #209

Open
roschlau opened this issue Jan 16, 2025 · 0 comments

Comments

@roschlau
Copy link

Describe the bug
I've just updated our project from Koin 3.5.6 -> 4.0.1, and Koin Annotations 1.3.1 -> 1.4.0.

Trying to compile with the new versions, I'm now getting multiple cases of this error:

  • Two classes with the same name but in different packages: x.y.ClassName and x.y.z.ClassName
  • Koin Annotations generates a function Module.defineClassName() for each of these in the same generated file, leading to the Error "Conflicting overloads: fun Module.defineClassName(): KoinDefinition<*>" when trying to build the project.

Errors in the build:
Image

Generated code that's producing the errors:
Image

Is there any way to work around that? I don't want to rename all those classes just to get our DI library to work.

Expected behavior
I'd expect Koin to allow us to define multiple classes with the same name

Koin project used and used version:
koin-core version 4.0.1
koin-annotations version 1.4.0

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