8000 [KSP2] IllegalArgumentException when the module name contains a '-' · Issue #2407 · google/ksp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[KSP2] IllegalArgumentException when the module name contains a '-' #2407

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

Closed
gdesantos opened this issue Apr 10, 2025 · 4 comments
Closed

[KSP2] IllegalArgumentException when the module name contains a '-' #2407

gdesantos opened this issue Apr 10, 2025 · 4 comments

Comments

@gdesantos
Copy link
gdesantos commented Apr 10, 2025

KSP version: 2.1.20-2.0.0

Ksp throws an IllegalArgumentException when the module contains an script in the name

> Task :core:database-test:kspDebugKotlin
e: [ksp] java.lang.IllegalArgumentException: not a valid name: DatabaseTestModule_ProvidesNeotasteDatabase$database-test_debugFactory

Renaming the module without the '-' solved the issue

@gdesantos gdesantos changed the title IllegalArgumentException when the module name contains a '-' [KSP2] IllegalArgumentException when the module name contains a '-' Apr 10, 2025
@StefMa
Copy link
Contributor
StefMa commented Apr 16, 2025

I'm not 100% sure if this is related, but we also facing a issue with that.
But our module isn't named - 🤔
We have this:

@Module
public class UpdateLanguageActionModule {
    @Provides
    internal fun provide(userAuthRepository: UserAuthRepository, someService: someService): UpdateLanguageAction =
        DefaultUpdateLanguageAction(userAuthRepository, someService)
}

However, when building it says

A failure occurred while executing com.google.devtools.ksp.gradle.KspAAWorkerAction
not a valid name: UpdateLanguageActionModule_Provide$language-updater_debugFactory

We are using Dagger. Not sure if this is Dagger related? 🤔
Thinking about this because of #2320 🤷

@bacecek
Copy link
Contributor
bacecek commented Apr 16, 2025

Looks the same as #2413

@StefMa
Copy link
Contributor
StefMa commented Apr 16, 2025

Yep, seems to be the same and already fixed. We just have to wait for the next release 🙃

@gdesantos
Copy link
Author

Solved in 2.1.20-2.0.1 version. Thanks!

477E
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

3 participants
0