-
Notifications
You must be signed in to change notification settings - Fork 264
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
exception in getJvmName for java methods #164
Comments
copybara-service bot
pushed a commit
to androidx/androidx
that referenced
this issue
Nov 24, 2020
I've also updated KSP implementation to treat internals as KAPT. This means, any method that receives or returns inline is hidden. Method / property names are now read from KSP which properly modifies them to have their jvm names applies (including internals). Unfortunately, this hits a bug in KSP. I've safe guarded it for now only where it reproduces to avoid hiding possible other places where it might occur. google/ksp#164 Bug: 160322705 Test: InternalModifierTest Change-Id: I739de215f40a453f4ddfb82290c969e0478de471
same exception happens when calling findOverridee in a java getter
|
copybara-service bot
pushed a commit
to androidx/androidx
that referenced
this issue
Dec 1, 2020
This CL fixes another case on variance inheritance for overrides where if there is an overridden method w/ star projected type argument, we should not use start projection but instead pick covariant (out). To reproduce it, i've expanded method spec helper test to cover methods that are not overridden. Unfortunately, it revelaled an issue where if a kotlin interface overrides another interface with generics, it is not possible to generate kotlin override for it if the type argument is a final type. (b/174313780). Only one test case hits it so I've added a way to ignore them for now (we cannot fix it until room generates kotlin sources). I've also hit some KSP bugs: google/ksp#175 Overrides might fail when overriding with generics. Luckily, findOverridee method finds it so I've added a workaround by calling findOverridee. We could possibly only call it instead of calling both but resolver bug will be eventually fixed in KSP hence I kept that call. google/ksp#174 Since we call findOverridee for properties now, it might trigger another issue in KSP. Added a try catch for it now. google/ksp#173 KSP might throw when resolving deserialized type alias descriptors. Added a try catch for it where we hit the issue. (reading annotations from an element that also has @throws annotation). google/ksp#164 This issue also affects get getJvmName for which we have safeGetJvmName. In this CL, it happens when finding overridee for getter/setter methods in java. Added a try catch for it for now. Bug: 174313780 Bug: 160322705 Test: MethodSpecHelperTest Change-Id: Ie6347f46027c317ed7784e8d2a0c834012fb4b52
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
calling
getJvmName
ongetX
ofJavaImpl
causes the following exception.The text was updated successfully, but these errors were encountered: