google / ksp

Kotlin Symbol Processing API

Home Page:https://github.com/google/ksp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problematic use of Project.detachedConfiguration for KSP2

tadfisher opened this issue · comments

KSP2 uses a detached configuration to resolve the symbol-processing-aa dependency. This is problematic because detached configurations are not visible during the build's configuration phase, so use cases like the following are made more difficult:

  • Tools that aggregate a project's dependencies, such as the GitHub Dependency Graph Gradle Plugin and gradle2nix, fail to detect this configuration automatically.
  • Overriding dependencies for bug triaging or local development is more difficult; the only ways I can think of is to modify the plugin source or use dependency substitution with an included build.
  • The symbol-processing-aa dependency doesn't appear in the dependencies task.

For this case, I don't believe there is a technical limitation preventing the use of configurations registered at configuration time, as is done with KSP1.

I filed a related issue with Gradle, in case the Gradle team's response will be valuable.

gradle/gradle#29489