internal members will have mangled names when seen from Java. In an existing non-KSP compiler plugin (Anvil) we use this logic to compute the mangled suffix that these functions would have like so
private fun ModuleDescriptor.mangledNameSuffix(): String {
// We replace - with _ to maintain interoperability with Dagger's expected generated identifiers
val name = name.asString().replace('-', '_')
return if (name.startsWith('<') && name.endsWith('>')) {
name.substring(1, name.length - 1)
} else {
name
}
}
Could KSP expose an API to access ModuleDescriptor.name? This would allow ensuring generation of jvm-compatible sources when migrating to KSP in our case.
internalmembers will have mangled names when seen from Java. In an existing non-KSP compiler plugin (Anvil) we use this logic to compute the mangled suffix that these functions would have like soCould KSP expose an API to access
ModuleDescriptor.name? This would allow ensuring generation of jvm-compatible sources when migrating to KSP in our case.