Make `KSPConfig` instance available on `KotlinSymbolProcessing`
- Dominant language
- Kotlin
- Stars
- 3.5k
- Forks
- 415
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 53
Description
`KotlinSymbolProcessing` is the root class / object that drives KSP and currently the `ResolverAAImpl` instance has a handle on the `KSPConfig` instance. Other parts of the code then use the `Resolver` instance to obtain the `KSPConfig` object. However, that leads to a false dependency on `ResolverAAImpl`, since they should not depend on it and they only really need access to a `KSPConfig` object. Since all such consumers have shorter lifetimes than `KotlinSymbolProcessing` and are transitively created by it, it seems fine to include a globally avilable instance on that object. This reduces some of the scope / responsibility creep of `ResolverAAImpl` (which is slowly starting to become the global root object when in fact it's not).
See discussion in this comment: https://github.com/google/ksp/pull/2877/changes#r3188226920
Contributor guide
Assessment
This issue has not been assessed yet.