Hm, this issue was closed with a comment that this...
# ksp
r
Hm, this issue was closed with a comment that this may be a bug in Room, but I still run into the problem apparently with multiple processors when multiple rounds are involved. https://github.com/google/ksp/issues/1854 Any chance this could be reopened?
j
can you add details of error messages from other processors to this issue? Feel free to reopen it.
r
I did, I’ve added two stacktraces
👍 1
j
Oh I saw you already added, reopened issue.
r
Thanks
I just reproduced this outside of the compile testing library. So it’s a general problem.
I’ve updated the message.
j
thanks
t
Using elements across rounds is currently unsupported, because generated code may affect the elements. For example, the return type of a function may be an error in round 1 and defined by a class generated in round 2. In KSP1, caching elements across rounds happens to work for some cases but not all. In KSP2, the lifecycle check is more strict and the error is always thrown. This is not a regression. KSP's deferral mechanism (returning symbols to be deferred from
process()
) is designed to handle this use case. Please try to use it and let us know if it doesn't serve your use case well.