8000 compileRunner crashes for resolver.getModuleName() · Issue #2395 · google/ksp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

compileRunner crashes for resolver.getModuleName() #2395
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

Open
123abceng opened this issue Mar 31, 2025 · 0 comments
Open

compileRunner crashes for resolver.getModuleName() #2395

123abceng opened this issue Mar 31, 2025 · 0 comments

Comments

@123abceng
Copy link
123abceng commented Mar 31, 2025

ksp = '2.0.21-1.0.25'

`* What went wrong:
Execution failed for task ':basis:kspCommonMainKotlinMetadata'.

A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
Compilation error. See log for more details
`

Behavior:
` @OptIn(KspExperimental::class)
override fun process(resolver: Resolver): List {

    val moduleName = resolver.getModuleName().getShortName()
        .run { substringBefore('_', this) }
    logger.warn("detected AsyncDI annotations in $moduleName ")

... this first call works.

Calling it inside another function, and this call crashes the compiler runner:

`
@OptIn(KspExperimental::class)
internal fun validateOnceScopes(
resolver: Resolver,
logger: KSPLogger,
): List {
val a = resolver.getModuleName()
logger.error("$a")

`

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
0