Open Bencodes opened 1 year ago
This is a pretty bazel-specific use case, and the result of bazel running every KSP processor in its own thread rather than the cooperative round-based approach that KSP is implemented as. I don't see a path forward on this in the way it's currently implemented in rules_kotlin. Correct me if I'm misunderstanding @Bencodes
When using KSP in a persistent multiplexed worker environment we see unexplainable build errors claiming that KSP is unable to resolve types defined in the same module that's currently being processed. We believe this is happening because of the changed introduced here to avoid leaking memory, are now causing KSP to wipe out the resolver cached needed by other threads.
A few examples of the errors that we are seeing:
KSTypeReference#resolve
returning null:KSP is unable to resolve types defined in the same module that's being processed: