-
Notifications
You must be signed in to change notification settings - Fork 858
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
getSourcePositionFromJavaStack cannot perform well on Android system #1680
Comments
Sorry for this. I throughd, android uses Interpreter mode only and we should not get there. Can you (or anyone) tell me, how to run tests on android? |
Just for my info: which Android API version are you're on when running into this compatibility issue? Afaic java.utils.Optional should be supported from v24 onwards |
@rbri @p-bakker I found this not the problem of Android API version and desugar_jdk_libs. This also happens on Android 11. I will decompile "Context" class.
|
looks like StackWalker was added at API Level 34 / Android 14 (https://developer.android.com/reference/java/lang/StackWalker) |
All right, that's too high, and desugar_jdk_libs has not contained this. |
This has been a pending question without a cheat answer for quite a while: #1152 |
It looks like we could address this by replacing the StackWalker with the old "new Throwable().getStackTrace()" technique. That would prevent any Android problems (as shown by the fact that we had to add an annotation here for ErrorProne. @rbri do you recall why we changed this and whether it'd make sense to change it back? |
my memory says it was done to modernize the code based on jdk11 but i was not the author. |
f3f1b3f#diff-d0e61fbbe651a547bf81371014f77ac41baa787abac5f56122e9b5e791be91dcR2579
https://github.com/requirejs/r.js
cannot be evaluated after this commit with desugar_jdk_libs on Android system.
Maybe desugar_jdk_libs changes "java.util.Optional" to "$j.util.Optional".
I have reverted this commit.
The text was updated successfully, but these errors were encountered: