-
Notifications
You must be signed in to change notification settings - Fork 294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KSP2: IllegalArgumentException: Failed requirement. #1966
Comments
Tried a few different attempted workarounds but no luck so far
|
potentially could be a same issue as #1930 tldr: when getting declarations of a class KSP queries analysis API for declared member scope, inside which AA will perform a serial of checks including checking for override e.t.c.. which has put an assertion for the symbols to be checked in resolved status, I am not certain about the cause of the status not being resolved though, since manually resolving does not seem to help, the check was added recently, I might need to talk to JB regarding this. |
Possibly yeah. Looks like this also happens with functions |
Also happens if the base class is an abstract or open class |
Actually this seems to intermittently also happen with non-java classes too :/ |
I am able to get this working by just not using constructor parameter properties abstract class BaseRepro(
prefs: Runnable,
) : IRepro {
override val prefs: Runnable = prefs
} |
can I get a case for non-java classes? |
Just another kotlin class in another module |
My concern is this is more widespread than #1930 , I've created https://youtrack.jetbrains.com/issue/KT-69070 issue for this, feel free to add more context there if you feel the issue is related in your case. |
Any luck with the above? With Kotlin 2.1 approaching, I'm worried about our ability to continue using KSP1, but this blocks KSP2 adoption |
I'm having a hard time reproducing it, even though that the stacktrace suggested that it happened before any processors run. @ZacSweers could you provide a mini gradle project? |
I'll see what I can do, but also happy to hop on a call and pair if that's easier |
KSP 2.0.20-1.0.25 is out and contains the upstream fix. Would you mind to give it a try? |
Looks like it's working for us in that version 👍 |
We encountered a crash in KSP2 (version
2.0.0-1.0.22
) in a very specific scenario. The crash comes from FIR/AA, but not sure if this is something wrong with KSP2's impl as the code itself compiles fine in K2 without KSP running.SharedPreferences
from android, but found it also repros with just Java'sRunnable
Repro:
When KSP2 runs on lib2, the below trace happens
The text was updated successfully, but these errors were encountered: