Status Update
Comments
so...@google.com <so...@google.com> #2
so...@google.com <so...@google.com> #3
Branch: 8.2
commit ea625d87f24c2ae20f8705d04180cce9d98e448f
Author: Søren Gjesse <sgjesse@google.com>
Date: Wed Nov 22 14:14:53 2023
Desugar records again for Android U (API level 34)
Art had a bug in native record support in the initial release of
Android U.
This will be fixed with Art mainline updates, but turning record
desugaring on again for API level 34 to avoid hitting issues on
Android U where mainline updates are not been applied.
Also removed the predicate canUseNativeRecords and replaced with
isRecordsDesugaredForD8 and isRecordsDesugaredForR8. These two
together with runtimeWithRecordsSupport are now used in all record
tests.
Bug:
Change-Id: I111e9779b657492583cd7b9eb60788d8ec6d198e
M src/main/java/com/android/tools/r8/utils/InternalOptions.java
M src/test/java/com/android/tools/r8/TestBase.java
M src/test/java/com/android/tools/r8/ToolHelper.java
M src/test/java/com/android/tools/r8/desugar/records/EmptyRecordAnnotationTest.java
M src/test/java/com/android/tools/r8/desugar/records/RecordBlogTest.java
M src/test/java/com/android/tools/r8/desugar/records/RecordComponentAnnotationsTest.java
M src/test/java/com/android/tools/r8/desugar/records/RecordComponentSignatureTest.java
M src/test/java/com/android/tools/r8/desugar/records/RecordInterfaceTest.java
M src/test/java/com/android/tools/r8/desugar/records/RecordInvokeCustomSplitDesugaringTest.java
M src/test/java/com/android/tools/r8/desugar/records/RecordMergeTest.java
M src/test/java/com/android/tools/r8/desugar/records/SimpleRecordTest.java
M src/test/java/com/android/tools/r8/profile/art/completeness/RecordProfileRewritingTest.java
so...@google.com <so...@google.com> #4
Branch: 8.2
commit 136c261588ac8f3ac0212a78c4523d28e9e51b15
Author: Søren Gjesse <sgjesse@google.com>
Date: Wed Nov 22 14:16:25 2023
Version 8.2.38
Bug:
Change-Id: I7997e9387b94f42d7a3dd73ceccd055999d54941
M src/main/java/com/android/tools/r8/Version.java
je...@google.com <je...@google.com>
ga...@google.com <ga...@google.com> #5
Thank you for your patience while our engineering team worked to resolve this issue. A fix for this issue is now available in:
- Android Studio Hedgehog | 2023.1.1 Patch 1
- Android Gradle Plugin 8.2.1
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Thank you for taking the time to submit feedback — we really appreciate it!
so...@google.com <so...@google.com> #6
so...@google.com <so...@google.com>
so...@google.com <so...@google.com>
ga...@google.com <ga...@google.com> #8
I've modified example in #2 a bit to make it Android-specific. The issues are summarized below.
-
:myjavalib
is an Android lib with *.java sources only:build/intermediates/javac/debug/classes/com/example/generated/Created.class
gets generated by annotation processorOther2.java
andFooTest.java
referenceCreated
and both:myjavalib:compileDebugUnitTestJavaWithJavac
and:myjavalib:compileDebugJavaWithJavac
pass- IDE does not resolve
Created
[1]
-
:mylibary
is an Android lib with both *.java and *.kt:build/tmp/kapt3/classes/debug/com/example/generated/Created.class
gets generated by KAPTFoo.java
andOther.kt
referenceCreated
and:mylibrary:cDJWJ
passes, and IDE resolves symbolsExampleUnitTest.kt
andFooTest.java
referenceCreated
and:mylibrary:cDUTJWJ
passes, but the IDE does NOT resoolve symbols [2]
-
:app
is an Android lib that depends on:myjavalib
App.java
referencesCreated
andgradle :app:cDJWJ
passes, but the IDE does not resolve symbols. The issue is the same as [1].
-
:app
is an Android lib that depends on:mylibrary
(please modifyapp/build.gradle
to test this scenario):App.java
referencesCreated
andgradle :app:cDJWJ
passes, but the IDE does not resolve symbols. The issue is the same as [1].
==============
[1] is impossible to fix as it'd require adding build/intermediates/javac/debug/classes
as a library. This would cause duplicate symbol definition for every class (as both its *.java and *.class versions would start showing up).
[2] can be solved by configuring kaptGeneratedClasses
library to be exported.
ga...@google.com <ga...@google.com> #9
Scenario [2] from #8 is now fixed in ag/Ia7163b3375eda263cb8cb0fc0ce8d6a0cf181bda. It will be released in the next Studio J canary.
an...@google.com <an...@google.com> #10
Thank you for your patience while our engineering team worked to resolve this issue. A fix for this issue is now available in:
- Android Studio Jellyfish | 2023.3.1 Canary 5
- Android Gradle Plugin 8.4.0-alpha05
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Thank you for taking the time to submit feedback — we really appreciate it!
Description
It looks like kapt generated classes are not added as dependencies to Android and unit test modules. They get their own version of kpat generated libraries but not the one from
main
.