Status Update
Comments
ca...@gmail.com <ca...@gmail.com> #2
1. Have you saw crash in real device or only in simulators?
2. Do you use dynamic feature for language ID?
yb...@google.com <yb...@google.com> #3
Tested on Android 12 Emulator with custom executor, but cannot repro this issue.
ca...@gmail.com <ca...@gmail.com> #4
-
Second crash in the description is from a real device. Experienced it myself on two different Xiaomi phones, plus lots of crashes from users in the Google Play console.
-
Dynamic features are not used in the application.
As a wild guess, I have downgraded build tools from 31.0.0 to 30.0.3, compileSdk from 31 to 30, and moved all work with Language ID to the service in a separate process (just to be sure that crash can kill secondary process instead of main). This combination is in beta for 2 days by now and I don't see any SIGSEGV crashes.
sl...@gmail.com <sl...@gmail.com> #5
Hmm, I feel the crash might be something related to separate/secondary process.
I also changed compileSdk and targetSDK to 31 but still cannot repro this issue.
sl...@gmail.com <sl...@gmail.com> #6
On the contrary, there was no separate process before, when crashes started.
In the new build (with the aforementioned changes) I can see SIGSEGV crash, but only one instead of dozens and it has a bit different backtrace:
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR)
liblanguage_id_jni.so (offset 0x11e000)
backtrace:
#00 pc 000000000003c7c0 /data/app/azagroup.reedy-mF7zTu2bv_ELlbFArwNgqA==/split_config.arm64_v8a.apk!lib/arm64-v8a/liblanguage_id_jni.so (offset 0x11e000)
#00 pc 000000000003b960 /data/app/azagroup.reedy-mF7zTu2bv_ELlbFArwNgqA==/split_config.arm64_v8a.apk!lib/arm64-v8a/liblanguage_id_jni.so (offset 0x11e000)
#00 pc 000000000003bb48 /data/app/azagroup.reedy-mF7zTu2bv_ELlbFArwNgqA==/split_config.arm64_v8a.apk!lib/arm64-v8a/liblanguage_id_jni.so (offset 0x11e000)
#00 pc 000000000003bafc /data/app/azagroup.reedy-mF7zTu2bv_ELlbFArwNgqA==/split_config.arm64_v8a.apk!lib/arm64-v8a/liblanguage_id_jni.so (offset 0x11e000)
#00 pc 0000000000036c98 /data/app/azagroup.reedy-mF7zTu2bv_ELlbFArwNgqA==/split_config.arm64_v8a.apk!lib/arm64-v8a/liblanguage_id_jni.so (offset 0x11e000)
#00 pc 0000000000032714 /data/app/azagroup.reedy-mF7zTu2bv_ELlbFArwNgqA==/split_config.arm64_v8a.apk!lib/arm64-v8a/liblanguage_id_jni.so (offset 0x11e000)
#00 pc 0000000000031cac /data/app/azagroup.reedy-mF7zTu2bv_ELlbFArwNgqA==/split_config.arm64_v8a.apk!lib/arm64-v8a/liblanguage_id_jni.so (offset 0x11e000)
#00 pc 0000000000057438 /data/app/azagroup.reedy-mF7zTu2bv_ELlbFArwNgqA==/oat/arm64/base.odex (offset 0x57000)
sl...@gmail.com <sl...@gmail.com> #7
FYI, ML Kit launched a new language ID SDK in the latest release, which uses a new language ID model.
Could you try the new SDK version(17.0.0) to check if you can still repro this native crash? Thanks!
yb...@google.com <yb...@google.com> #8
Thank you, I'll try it and check.
ap...@google.com <ap...@google.com> #9
Hello. I have similar experience.
- I'm using mlkit-language 16.1.1
- I didnot meet this error until using AGP 4.2
- I can get this error since using AGP 7.0
- This error raised on Release build only(minimized by R8)
- This error raised without obfuscation.
ap...@google.com <ap...@google.com> #11
I created reproducible project.
$ git clone https://github.com/ganadist/VersionCodeDemo -b mlkit_agp7 mlkit_agp7
$ cd mlkit_agp7
$ ./gradlew :app:pPRUA
$ adb install app/build/outputs/universal_apk/productionRelease/app-production-release-universal.apk
$ adb shell am start -n com.example.myapplication/.MainActivity
$ adb logcat -b crash -d
10-19 19:41:49.844 17810 17810 F libc : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x7acf9d733c in tid 17810 (e.myapplication), pid 17810 (e.myapplication)
10-19 19:41:50.473 17849 17849 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
10-19 19:41:50.473 17849 17849 F DEBUG : Build fingerprint: 'google/crosshatch/crosshatch:12/SPB5.210812.002/7671067:user/release-keys'
10-19 19:41:50.473 17849 17849 F DEBUG : Revision: 'MP1.0'
10-19 19:41:50.473 17849 17849 F DEBUG : ABI: 'arm64'
10-19 19:41:50.473 17849 17849 F DEBUG : Timestamp: 2021-10-19 19:41:49.903736988+0900
10-19 19:41:50.473 17849 17849 F DEBUG : Process uptime: 0s
10-19 19:41:50.473 17849 17849 F DEBUG : Cmdline: com.example.myapplication
10-19 19:41:50.474 17849 17849 F DEBUG : pid: 17810, tid: 17810, name: e.myapplication >>> com.example.myapplication <<<
10-19 19:41:50.474 17849 17849 F DEBUG : uid: 10240
10-19 19:41:50.474 17849 17849 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x7acf9d733c
10-19 19:41:50.474 17849 17849 F DEBUG : x0 0000000000000000 x1 00000000000008fc x2 0000007a76760c71 x3 0000000000000000
10-19 19:41:50.474 17849 17849 F DEBUG : x4 0000000000000010 x5 0000007ba4db49d0 x6 0000007b34dc3680 x7 3de38e3900000608
10-19 19:41:50.474 17849 17849 F DEBUG : x8 0000007bb4dbedf0 x9 0000007acf9db2aa x10 0000000000000000 x11 0000007acf9d6640
10-19 19:41:50.474 17849 17849 F DEBUG : x12 0000000000000009 x13 0000000000000000 x14 0000000000000061 x15 00000000ebad6a89
10-19 19:41:50.474 17849 17849 F DEBUG : x16 0000007a767cfef8 x17 0000007d9a564b40 x18 0000007da3830000 x19 0000007feaf56a08
10-19 19:41:50.474 17849 17849 F DEBUG : x20 0000000000000000 x21 0000007ba4da50b0 x22 0000007bb4dbedf0 x23 0000007ba4da50b8
10-19 19:41:50.474 17849 17849 F DEBUG : x24 0000000000000009 x25 000000000000067e x26 0000000000000012 x27 0000000000000008
10-19 19:41:50.474 17849 17849 F DEBUG : x28 0000007b64dc8440 x29 0000000000000000
10-19 19:41:50.474 17849 17849 F DEBUG : lr 0000007a7678a964 sp 0000007feaf56810 pc 0000007a7678b7c0 pst 0000000060000000
10-19 19:41:50.474 17849 17849 F DEBUG : backtrace:
10-19 19:41:50.474 17849 17849 F DEBUG : #00 pc 000000000003c7c0 /data/app/~~mHaMq-e9ocbm9UfYnkCGkQ==/com.example.myapplication-HgG9vkluwDDO1K78-Vzr0A==/lib/arm64/liblanguage_id_jni.so (BuildId: 859ec0ec2000a39e6ae8ed42e1704f46)
10-19 19:41:50.474 17849 17849 F DEBUG : #01 pc 000000000003b960 /data/app/~~mHaMq-e9ocbm9UfYnkCGkQ==/com.example.myapplication-HgG9vkluwDDO1K78-Vzr0A==/lib/arm64/liblanguage_id_jni.so (BuildId: 859ec0ec2000a39e6ae8ed42e1704f46)
10-19 19:41:50.474 17849 17849 F DEBUG : #02 pc 000000000003bb48 /data/app/~~mHaMq-e9ocbm9UfYnkCGkQ==/com.example.myapplication-HgG9vkluwDDO1K78-Vzr0A==/lib/arm64/liblanguage_id_jni.so (BuildId: 859ec0ec2000a39e6ae8ed42e1704f46)
10-19 19:41:50.474 17849 17849 F DEBUG : #03 pc 000000000003bafc /data/app/~~mHaMq-e9ocbm9UfYnkCGkQ==/com.example.myapplication-HgG9vkluwDDO1K78-Vzr0A==/lib/arm64/liblanguage_id_jni.so (BuildId: 859ec0ec2000a39e6ae8ed42e1704f46)
10-19 19:41:50.474 17849 17849 F DEBUG : #04 pc 0000000000036c98 /data/app/~~mHaMq-e9ocbm9UfYnkCGkQ==/com.example.myapplication-HgG9vkluwDDO1K78-Vzr0A==/lib/arm64/liblanguage_id_jni.so (BuildId: 859ec0ec2000a39e6ae8ed42e1704f46)
10-19 19:41:50.474 17849 17849 F DEBUG : #05 pc 00000000000324a4 /data/app/~~mHaMq-e9ocbm9UfYnkCGkQ==/com.example.myapplication-HgG9vkluwDDO1K78-Vzr0A==/lib/arm64/liblanguage_id_jni.so (BuildId: 859ec0ec2000a39e6ae8ed42e1704f46)
10-19 19:41:50.474 17849 17849 F DEBUG : #06 pc 0000000000031b5c /data/app/~~mHaMq-e9ocbm9UfYnkCGkQ==/com.example.myapplication-HgG9vkluwDDO1K78-Vzr0A==/lib/arm64/liblanguage_id_jni.so (Java_com_google_mlkit_nl_languageid_internal_LanguageIdentificationJni_nativeIdentifyLanguage+100) (BuildId: 859ec0ec2000a39e6ae8ed42e1704f46)
But after downgrade to AGP 4.2, crash is not reproducible.
$ git clone https://github.com/ganadist/VersionCodeDemo -b mlkit_agp42 mlkit_agp42
$ cd mlkit_agp42
$ ./gradlew :app:pPRUA
$ adb install app/build/outputs/universal_apk/productionRelease/app-production-release-universal.apk
$ adb shell am start -n com.example.myapplication/.MainActivity
Also, I tried to disable
$ git clone https://github.com/ganadist/VersionCodeDemo -b mlkit_agp7_r8_disable_inline_optimizer mlkit_agp7_r8
$ cd mlkit_agp7_r8
$ ./gradlew :app:pPRUA
$ adb install app/build/outputs/universal_apk/productionRelease/app-production-release-universal.apk
$ adb shell am start -n com.example.myapplication/.MainActivity
ap...@google.com <ap...@google.com> #12
I tried the repro steps but got a NPE when I run ./gradlew :app:pPRUA
FAILURE: Build failed with an exception.
* What went wrong:
java.lang.NullPointerException
> java.lang.NullPointerException (no error message)
Could you also check if this is reproducible on 17.0.0
or 17.0.1
? If yes, could you attach the full log that I can take a look? Thanks!
na...@google.com <na...@google.com> #13
Here are gradle build scan logs for each branches.
All builds were clean build, and disabled build cache.
- mlkit_agp7 :
https://scans.gradle.com/s/qrymdqfzwokbq - mlkit_agp42 :
https://scans.gradle.com/s/b6644hzfyfhaw - mlkit_agp7_r8_disable_inline_optimizer :
https://scans.gradle.com/s/c6h5hy2nxod4u
Also, I pushed to update MLKit Language Id version 17.0.1 on
And here is crash log after apply 17.0.1
You can see that BuildId
of liblanguage_id_l2c_jni.so
was changed from 859ec0ec2000a39e6ae8ed42e1704f46
to be6e59455cc10135330c93acdebfc121
10-20 03:07:24.522 24587 24628 F libc : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x7acf995426 in tid 24628 (pool-3-thread-3), pid 24587 (e.myapplication)
10-20 03:07:25.190 24710 24710 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
10-20 03:07:25.190 24710 24710 F DEBUG : Build fingerprint: 'google/crosshatch/crosshatch:12/SPB5.210812.002/7671067:user/release-keys'
10-20 03:07:25.190 24710 24710 F DEBUG : Revision: 'MP1.0'
10-20 03:07:25.190 24710 24710 F DEBUG : ABI: 'arm64'
10-20 03:07:25.190 24710 24710 F DEBUG : Timestamp: 2021-10-20 03:07:24.583346246+0900
10-20 03:07:25.190 24710 24710 F DEBUG : Process uptime: 0s
10-20 03:07:25.190 24710 24710 F DEBUG : Cmdline: com.example.myapplication
10-20 03:07:25.190 24710 24710 F DEBUG : pid: 24587, tid: 24628, name: pool-3-thread-3 >>> com.example.myapplication <<<
10-20 03:07:25.190 24710 24710 F DEBUG : uid: 10240
10-20 03:07:25.190 24710 24710 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x7acf995426
10-20 03:07:25.190 24710 24710 F DEBUG : x0 0000007b54da9d30 x1 0000007d9a5fe7cc x2 0000000000000000 x3 0000000000000010
10-20 03:07:25.190 24710 24710 F DEBUG : x4 0000000000000000 x5 0000007c34dbc79c x6 0000002f0000083b x7 000003c300002dd5
10-20 03:07:25.190 24710 24710 F DEBUG : x8 0000000000000001 x9 0000000000000004 x10 0000000000000010 x11 0000000000000000
10-20 03:07:25.190 24710 24710 F DEBUG : x12 0000000000000000 x13 000000000000217e x14 0000007acf9932a8 x15 000000000000217e
10-20 03:07:25.190 24710 24710 F DEBUG : x16 0000000000000000 x17 0000007d9a564c78 x18 0000007a6ef18000 x19 0000007c34dbc580
10-20 03:07:25.190 24710 24710 F DEBUG : x20 0000007ca4dc7170 x21 0000007ca4dc7800 x22 0000007ca4dc71e0 x23 0000000000000000
10-20 03:07:25.190 24710 24710 F DEBUG : x24 0000000000000018 x25 0000000000000007 x26 0000000000000006 x27 0000000000000004
10-20 03:07:25.190 24710 24710 F DEBUG : x28 0000007ca4dc7090 x29 0000007cb4da9940
10-20 03:07:25.190 24710 24710 F DEBUG : lr 0000007a770a9624 sp 0000007a6f7de9c0 pc 0000007a770a96a8 pst 0000000020000000
10-20 03:07:25.190 24710 24710 F DEBUG : backtrace:
10-20 03:07:25.190 24710 24710 F DEBUG : #00 pc 00000000000386a8 /data/app/~~KjjULZV48O7KSOgOP1wYNQ==/com.example.myapplication-vFUidUPTjaGg4oo3SRAYJw==/lib/arm64/liblanguage_id_l2c_jni.so (BuildId: be6e59455cc10135330c93acdebfc121)
10-20 03:07:25.190 24710 24710 F DEBUG : #01 pc 00000000000388a0 /data/app/~~KjjULZV48O7KSOgOP1wYNQ==/com.example.myapplication-vFUidUPTjaGg4oo3SRAYJw==/lib/arm64/liblanguage_id_l2c_jni.so (BuildId: be6e59455cc10135330c93acdebfc121)
10-20 03:07:25.190 24710 24710 F DEBUG : #02 pc 00000000000844a0 /data/app/~~KjjULZV48O7KSOgOP1wYNQ==/com.example.myapplication-vFUidUPTjaGg4oo3SRAYJw==/lib/arm64/liblanguage_id_l2c_jni.so (BuildId: be6e59455cc10135330c93acdebfc121)
10-20 03:07:25.190 24710 24710 F DEBUG : #03 pc 000000000008783c /data/app/~~KjjULZV48O7KSOgOP1wYNQ==/com.example.myapplication-vFUidUPTjaGg4oo3SRAYJw==/lib/arm64/liblanguage_id_l2c_jni.so (BuildId: be6e59455cc10135330c93acdebfc121)
10-20 03:07:25.190 24710 24710 F DEBUG : #04 pc 0000000000035fc4 /data/app/~~KjjULZV48O7KSOgOP1wYNQ==/com.example.myapplication-vFUidUPTjaGg4oo3SRAYJw==/lib/arm64/liblanguage_id_l2c_jni.so (BuildId: be6e59455cc10135330c93acdebfc121)
10-20 03:07:25.190 24710 24710 F DEBUG : #05 pc 0000000000034954 /data/app/~~KjjULZV48O7KSOgOP1wYNQ==/com.example.myapplication-vFUidUPTjaGg4oo3SRAYJw==/lib/arm64/liblanguage_id_l2c_jni.so (BuildId: be6e59455cc10135330c93acdebfc121)
10-20 03:07:25.190 24710 24710 F DEBUG : #06 pc 00000000000340e8 /data/app/~~KjjULZV48O7KSOgOP1wYNQ==/com.example.myapplication-vFUidUPTjaGg4oo3SRAYJw==/lib/arm64/liblanguage_id_l2c_jni.so (Java_com_google_mlkit_nl_languageid_internal_ThickLanguageIdentifier_nativeIdentifyPossibleLanguages+108) (BuildId: be6e59455cc10135330c93acdebfc121)
10-20 03:07:25.191 24710 24710 F DEBUG : #07 pc 00000000002d9a44 /apex/com.android.art/lib64/libart.so (art_quick_generic_jni_trampoline+148) (BuildId: cdecb8dde1264c9871695c29854aa3b1)
10-20 03:07:25.191 24710 24710 F DEBUG : #08 pc 000000000020a700 /apex/com.android.art/lib64/libart.so (nterp_helper+5648) (BuildId: cdecb8dde1264c9871695c29854aa3b1)
10-20 03:07:25.191 24710 24710 F DEBUG : #09 pc 00000000000cd0dc /data/app/~~KjjULZV48O7KSOgOP1wYNQ==/com.example.myapplication-vFUidUPTjaGg4oo3SRAYJw==/oat/arm64/base.vdex
10-20 03:07:25.191 24710 24710 F DEBUG : #10 pc 000000000020a044 /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: cdecb8dde1264c9871695c29854aa3b1)
10-20 03:07:25.191 24710 24710 F DEBUG : #11 pc 00000000000ccfa8 /data/app/~~KjjULZV48O7KSOgOP1wYNQ==/com.example.myapplication-vFUidUPTjaGg4oo3SRAYJw==/oat/arm64/base.vdex
10-20 03:07:25.191 24710 24710 F DEBUG : #12 pc 0000000000557cb4 /system/framework/arm64/boot-framework.oat (android.os.Binder.transact+148) (BuildId: 43a571a0ad85d6451b47016336a541ecb0eb12bb)
10-20 03:07:25.191 24710 24710 F DEBUG : #13 pc 000000000020b53c /apex/com.android.art/lib64/libart.so (nterp_helper+9292) (BuildId: cdecb8dde1264c9871695c29854aa3b1)
10-20 03:07:25.191 24710 24710 F DEBUG : #14 pc 00000000000b7aba /data/app/~~KjjULZV48O7KSOgOP1wYNQ==/com.example.myapplication-vFUidUPTjaGg4oo3SRAYJw==/oat/arm64/base.vdex
10-20 03:07:25.191 24710 24710 F DEBUG : #15 pc 000000000020a044 /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: cdecb8dde1264c9871695c29854aa3b1)
10-20 03:07:25.191 24710 24710 F DEBUG : #16 pc 00000000000a7496 /data/app/~~KjjULZV48O7KSOgOP1wYNQ==/com.example.myapplication-vFUidUPTjaGg4oo3SRAYJw==/oat/arm64/base.vdex
10-20 03:07:25.191 24710 24710 F DEBUG : #17 pc 000000000020a044 /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: cdecb8dde1264c9871695c29854aa3b1)
10-20 03:07:25.191 24710 24710 F DEBUG : #18 pc 00000000000a7360 /data/app/~~KjjULZV48O7KSOgOP1wYNQ==/com.example.myapplication-vFUidUPTjaGg4oo3SRAYJw==/oat/arm64/base.vdex
10-20 03:07:25.191 24710 24710 F DEBUG : #19 pc 000000000020ae64 /apex/com.android.art/lib64/libart.so (nterp_helper+7540) (BuildId: cdecb8dde1264c9871695c29854aa3b1)
10-20 03:07:25.191 24710 24710 F DEBUG : #20 pc 000000000009e46c /data/app/~~KjjULZV48O7KSOgOP1wYNQ==/com.example.myapplication-vFUidUPTjaGg4oo3SRAYJw==/oat/arm64/base.vdex
10-20 03:07:25.191 24710 24710 F DEBUG : #21 pc 000000000020ae64 /apex/com.android.art/lib64/libart.so (nterp_helper+7540) (BuildId: cdecb8dde1264c9871695c29854aa3b1)
10-20 03:07:25.191 24710 24710 F DEBUG : #22 pc 00000000000d33d6 /data/app/~~KjjULZV48O7KSOgOP1wYNQ==/com.example.myapplication-vFUidUPTjaGg4oo3SRAYJw==/oat/arm64/base.vdex
10-20 03:07:25.191 24710 24710 F DEBUG : #23 pc 000000000020ae64 /apex/com.android.art/lib64/libart.so (nterp_helper+7540) (BuildId: cdecb8dde1264c9871695c29854aa3b1)
10-20 03:07:25.191 24710 24710 F DEBUG : #24 pc 000000000009df0a /data/app/~~KjjULZV48O7KSOgOP1wYNQ==/com.example.myapplication-vFUidUPTjaGg4oo3SRAYJw==/oat/arm64/base.vdex
10-20 03:07:25.191 24710 24710 F DEBUG : #25 pc 0000000000209124 /apex/com.android.art/lib64/libart.so (nterp_helper+52) (BuildId: cdecb8dde1264c9871695c29854aa3b1)
10-20 03:07:25.191 24710 24710 F DEBUG : #26 pc 000000000009e350 /data/app/~~KjjULZV48O7KSOgOP1wYNQ==/com.example.myapplication-vFUidUPTjaGg4oo3SRAYJw==/oat/arm64/base.vdex
10-20 03:07:25.191 24710 24710 F DEBUG : #27 pc 000000000037b9ac /apex/com.android.art/javalib/arm64/boot.oat (java.util.concurrent.ThreadPoolExecutor.runWorker+988) (BuildId: ab2bf4ec264efdb6c452a238be38fe624de826b8)
10-20 03:07:25.191 24710 24710 F DEBUG : #28 pc 00000000003751d4 /apex/com.android.art/javalib/arm64/boot.oat (java.util.concurrent.ThreadPoolExecutor$Worker.run+68) (BuildId: ab2bf4ec264efdb6c452a238be38fe624de826b8)
10-20 03:07:25.191 24710 24710 F DEBUG : #29 pc 000000000020aec4 /apex/com.android.art/lib64/libart.so (nterp_helper+7636) (BuildId: cdecb8dde1264c9871695c29854aa3b1)
10-20 03:07:25.191 24710 24710 F DEBUG : #30 pc 000000000009e370 /data/app/~~KjjULZV48O7KSOgOP1wYNQ==/com.example.myapplication-vFUidUPTjaGg4oo3SRAYJw==/oat/arm64/base.vdex
10-20 03:07:25.191 24710 24710 F DEBUG : #31 pc 00000000001bf35c /apex/com.android.art/javalib/arm64/boot.oat (java.lang.Thread.run+76) (BuildId: ab2bf4ec264efdb6c452a238be38fe624de826b8)
10-20 03:07:25.191 24710 24710 F DEBUG : #32 pc 00000000002d0164 /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: cdecb8dde1264c9871695c29854aa3b1)
10-20 03:07:25.191 24710 24710 F DEBUG : #33 pc 000000000031ccac /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+156) (BuildId: cdecb8dde1264c9871695c29854aa3b1)
10-20 03:07:25.191 24710 24710 F DEBUG : #34 pc 00000000003cf8a0 /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeVirtualOrInterfaceWithJValues<art::ArtMethod*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, jvalue const*)+380) (BuildId: cdecb8dde1264c9871695c29854aa3b1)
10-20 03:07:25.191 24710 24710 F DEBUG : #35 pc 0000000000460894 /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallback(void*)+992) (BuildId: cdecb8dde1264c9871695c29854aa3b1)
10-20 03:07:25.191 24710 24710 F DEBUG : #36 pc 00000000000b1910 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+264) (BuildId: ba489d4985c0cf173209da67405662f9)
10-20 03:07:25.191 24710 24710 F DEBUG : #37 pc 00000000000513f0 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: ba489d4985c0cf173209da67405662f9)
ap...@google.com <ap...@google.com> #14
Cross-posted on R8 issue tracker.
ap...@google.com <ap...@google.com> #15
Hi,
Looks like we figured out the root cause in
For temporary workarounds for the existing SDKs, you need to add this rule
-keep class com.google.mlkit.nl.languageid.internal.LanguageIdentificationJni { *; }
for language-id 16.1.1
, and add this rule
-keep class com.google.mlkit.nl.languageid.internal.ThickLanguageIdentifier { *; }
for version language-id 17.0.0+
for the newer model.
We'll fix this issue in the upcoming release so that you'll not need these workarounds in the future release.
Thanks a lot for reporting this issue!
ap...@google.com <ap...@google.com> #16
Added workarounds in
ap...@google.com <ap...@google.com> #17
ap...@google.com <ap...@google.com> #18
Branch: androidx-main
commit 0cb41981b356abc62acab56634bda240d5809064
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Wed Oct 12 13:26:54 2022
Migrate QueryParameterAdapter implementations to XPoet
The migrated adapters are:
* BasicQueryParameterAdapter
* ArrayQueryParameterAdapter
* CollectionQueryParameterAdapter
A notable change is that nullability of the array and collection parameters have to be considered. Instead of prohibit this CL simply accepts them by binding a null arg when the param is null, essentially tackling
Also fixed a bug in KspArrayType.asTypeName() where the KTypeName didn't had right nullability, fixed it by using the KsTypeKotlinPoetExt (it was a missed migration).
New XPoet API:
* XCodeBlock.ofTernaryIf() - For generating inline if expressions with Java's ternary operator and Kotlin if/else.
Bug: 72246856
Bug: 127483380
Test: NullableCollectionQueryParamTest + KotlinCodeGenTest
Change-Id: I5e5b6a73733f2bbc8d111cdfa724720757ab38c5
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/NullableCollectionQueryParamTest.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XCodeBlock.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XTypeName.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/KotlinPoetExt.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/KspArrayType.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XAnnotationValueTest.kt
M room/room-compiler/src/main/kotlin/androidx/room/ext/javapoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/parameter/ArrayQueryParameterAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/parameter/BasicQueryParameterAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/parameter/CollectionQueryParameterAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/QueryWriter.kt
M room/room-compiler/src/test/kotlin/androidx/room/solver/query/QueryWriterTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/KotlinCodeGenTest.kt
M room/room-compiler/src/test/test-data/daoWriter/output/javac/ComplexDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/javac/DeletionDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/ComplexDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/DeletionDao.java
A room/room-compiler/src/test/test-data/kotlinCodeGen/arrayParameterAdapter.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/basicParameterAdapter_string.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/collectionParameterAdapter_string.kt
ap...@google.com <ap...@google.com> #19
Branch: androidx-main
commit dd774999930afba89226586051679f1e622b6649
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Tue Oct 11 22:07:14 2022
Migrate CoroutineResultBinder to XPoet
This change deals with generating suspend overrides in Kotlin codegen which differs from Java in that the override function has the suspend modifier, does not return Any and does not have an extra Continuation param.
There is an API change too: The CancellationSignal parameter in CoroutinesRoom.execute() was incorrectly nonnull instead of nullable, nullable should have been the acceptable type since the generated code uses DBUtil.createCancellationSignal() which will return null in older APIs and is simply piped into other APIs that accept null cancellation signals such as RoomDatabase.query(), this is now fixed. This is a compatible nullability change in a restricted API is only used by Room's generated code.
Bug: 127483380
Test: KotlinCodeGenTest
Change-Id: I4eb7a8a038aac6b3675cb9431287942eb24a866d
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/KotlinPoetExt.kt
M room/room-compiler/src/main/kotlin/androidx/room/ext/javapoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/MethodProcessorDelegate.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/CoroutineFlowResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/CoroutineFlowResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/CoroutineResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/GuavaListenableFutureQueryResultBinder.kt
M room/room-compiler/src/test/kotlin/androidx/room/testing/test_util.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/KotlinCodeGenTest.kt
M room/room-compiler/src/test/test-data/common/input/CoroutinesRoom.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/coroutineResultBinder.kt
M room/room-ktx/api/restricted_current.txt
M room/room-ktx/src/main/java/androidx/room/CoroutinesRoom.kt
ap...@google.com <ap...@google.com> #20
Branch: androidx-main
commit 76bf256f733dbd67b4848467d2c11489e382a594
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Sun Oct 16 12:31:34 2022
Migrate PreparedStatementWriter and PreparedQueryAdapter to XPoet
Migrates the simple path of prepared queries (thanks to that parameter adapters being migrated), specifically: InstantPreparedQueryResultBinder -> PreparedQueryAdapter, along with PreparedStatementWriter.
With this migration other prepared query binders can be migrated in parallel (Rx, Guava, etc...).
XPoet API Change:
* In XFunSpec.builder() renamed isOverridden to isOverride. (The typo was getting on my nerve...)
Bug: 127483380
Test: KotlinCodeGenTest + existing.
Change-Id: Ifa97d552282ca02488b1b7603b7b62fbae994d94
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XFunSpec.kt
M room/room-compiler/src/main/kotlin/androidx/room/ext/javapoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/prepared/binder/CallablePreparedQueryResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/prepared/binder/InstantPreparedQueryResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/prepared/binder/PreparedQueryResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/prepared/result/PreparedQueryResultAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/result/InsertOrUpsertMethodAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/AutoMigrationWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DaoWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/EntityInsertionAdapterWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/PreparedStatementWriter.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/KotlinCodeGenTest.kt
M room/room-compiler/src/test/test-data/daoWriter/output/javac/DeletionDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/javac/UpdateDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/DeletionDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/UpdateDao.java
A room/room-compiler/src/test/test-data/kotlinCodeGen/preparedQueryAdapter.kt
ap...@google.com <ap...@google.com> #21
Branch: androidx-main
commit 274fb308c905bde29f7c1ab53743ecc0f60f94ba
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Sun Oct 16 16:52:13 2022
Migrate DaoWriter raw query codegen to XPoet
A small but noticeable change is that we no longer assign the SupportSQLiteQuery param to a `final` local variable since for a while Room has been generating overrides with `final` parameters.
Also fixes the usage of a MemberName in EntityCursorConverterWriter, it was converted in aosp/2234531, but no Kotlin codegen test that used it was written until now.
Bug: 127483380
Test: KotlinCodeGenTest + existing.
Change-Id: Id3b5aea4a095da6fa9996abd82c4cc43bfa1aea3
M room/room-compiler/src/main/kotlin/androidx/room/ext/javapoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/ProcessorErrors.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/RawQueryMethodProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/RawQueryMethod.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DaoWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/EntityCursorConverterWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/QueryWriter.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/RawQueryMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/KotlinCodeGenTest.kt
M room/room-compiler/src/test/test-data/daoWriter/output/javac/ComplexDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/ComplexDao.java
A room/room-compiler/src/test/test-data/kotlinCodeGen/rawQuery.kt
ap...@google.com <ap...@google.com> #22
Branch: androidx-main
commit d45c2f9ef88fdf5db441a1aa06b25406414d32cf
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Wed Oct 19 10:36:37 2022
Migrate Kotlin delegating method binders to XPoet
When generating Kotlin there is no need to override and implement bridge functions for DefaultImpls and type args of boxed primitives. These two set of binders are only needed when generating Java and are entirely skipped in Kotlin. However, this change does migrate the binders to XPoet for migration completeness as we want to minimize JavaPoet usages in room-compiler.
Additionally add com.google.testparameterinjector:test-parameter-injector to the repo, useful for parametrized test methods (as opposed to the entire class).
Bug: 127483380
Test: KotlinCodeGenTest + DaoPrimitiveTest.kt + existing.
Change-Id: I85f675fb72b9956bc49f7153f234ff6a49efedd7
M gradle/libs.versions.toml
M gradle/verification-keyring.keys
M gradle/verification-metadata.xml
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/DaoBoxedPrimitiveDelegateTest.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XTypeName.kt
M room/room-compiler/build.gradle
M room/room-compiler/src/main/kotlin/androidx/room/processor/DaoProcessor.kt
A room/room-compiler/src/main/kotlin/androidx/room/solver/KotlinBoxedPrimitiveMethodDelegateBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/KotlinDefaultMethodDelegateBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/Dao.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/KotlinBoxedPrimitiveMethodDelegate.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/KotlinDefaultMethodDelegate.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DaoWriter.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/KotlinCodeGenTest.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/delegatingFunctions_boxedPrimitiveBridge.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/delegatingFunctions_defaultImplBridge.kt
ap...@google.com <ap...@google.com> #23
Branch: androidx-main
commit 147eede76bdff7b75de37ef6d416c669fa93ad8f
Author: elifbilgin <elifbilgin@google.com>
Date: Thu Oct 27 17:00:24 2022
Removing old documentation that left an import for `com.squareup.javapoet.CodeBlock` and replacing with XCodeBlock.
Bug: 127483380
Test: N/A
Change-Id: I286a629926ad811272c42c3c709034d4a7255477
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/SingleStatementTypeConverter.kt
ap...@google.com <ap...@google.com> #24
Branch: androidx-main
commit 6e6b63a7001c445ac8742b39d38584aa842022c3
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Thu Oct 27 19:04:31 2022
Convert DeleteOrUpdateMethodAdapter to XPoet
Convert the simple path for @Update, @Delete and @Upsert shortcut methods to generate Kotlin, i.e. the path that uses the instant binders. @Upsert was mostly done since it shares its adapter with @Insert but the binder needed converting and since it uses update too it had to be done in at the same time.
Bug: 127483380
Test: KotlinCodeGenTest
Change-Id: I4b606c3fa71a02c6f112a836590d31c17fb4f2e1
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/CallableDeleteOrUpdateMethodBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/DeleteOrUpdateMethodBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/InstantDeleteOrUpdateMethodBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/InstantUpsertMethodBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/result/DeleteOrUpdateMethodAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/result/InsertOrUpsertMethodAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DaoWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/EntityDeletionAdapterWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/EntityUpdateAdapterWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/EntityUpsertionAdapterWriter.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/KotlinCodeGenTest.kt
M room/room-compiler/src/test/test-data/daoWriter/output/javac/DeletionDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/javac/UpdateDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/javac/UpsertDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/DeletionDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/UpdateDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/UpsertDao.java
A room/room-compiler/src/test/test-data/kotlinCodeGen/deleteOrUpdateMethodAdapter.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/insertOrUpsertMethodAdapter.kt
ap...@google.com <ap...@google.com> #25
Branch: androidx-main
commit 28bdcef38f2e56f7fc1500d8d727db83da60d4c0
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Thu Oct 20 16:43:15 2022
Migrate TransactionMethodBinder and TransactionMethodAdapter to XPoet
Migrate transaction binders and adapters for wrapping concrete DAO functions in a transaction, including suspending transactions.
New XPoet API:
* XTypeName.getConsumerSuperName - to create a wildcard type name for a consumer (super type of)
* XTypeName.getProducerExtendsName - to create a wildcard type name for a producer (sub type of)
Bug: 127483380
Bug: 249984508
Test: KotlinCodeGenTest
Change-Id: Ib0413d7d465f4b53af8106ff064ec772cb1fa2aa
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XTypeName.kt
M room/room-compiler/src/main/kotlin/androidx/room/ext/javapoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/MethodProcessorDelegate.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/result/InsertOrUpsertMethodAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/transaction/binder/CoroutineTransactionMethodBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/transaction/binder/InstantTransactionMethodBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/transaction/binder/TransactionMethodBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/transaction/result/TransactionMethodAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DaoWriter.kt
M room/room-compiler/src/test/kotlin/androidx/room/testing/test_util.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/KotlinCodeGenTest.kt
A room/room-compiler/src/test/test-data/common/input/RoomDatabaseExt.kt
D room/room-compiler/src/test/test-data/common/input/RoomDatabaseKt.java
M room/room-compiler/src/test/test-data/daoWriter/output/javac/ComplexDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/ComplexDao.java
A room/room-compiler/src/test/test-data/kotlinCodeGen/transactionMethodAdapter_abstractClass.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/transactionMethodAdapter_interface.kt
ap...@google.com <ap...@google.com> #26
Branch: androidx-main
commit c14ab25b89149316c422c2ad4c13cc0bf03b82c9
Author: elifbilgin <elifbilgin@google.com>
Date: Tue Oct 11 19:19:59 2022
Generating Kotlin code in ListQueryResultAdapter.kt.
Bug: 127483380
Test: KotlinCodeGenTest.kt
Change-Id: I3578568e4814ca12500b1f7f8227cac8d3d89fab
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XTypeName.kt
M room/room-compiler/src/main/kotlin/androidx/room/ext/codegenpoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/ListQueryResultAdapter.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/KotlinCodeGenTest.kt
M room/room-compiler/src/test/test-data/daoWriter/output/javac/ComplexDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/ComplexDao.java
A room/room-compiler/src/test/test-data/kotlinCodeGen/queryResultAdapter_list.kt
ap...@google.com <ap...@google.com> #27
Branch: androidx-main
commit 8aab02df135e53b45adb90c24607c47a025011d4
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Thu Nov 03 11:12:49 2022
Migrate Relation and RelationCollectorFunctionWriter to XPoet
Migrate the relationship code writers of @Relation fields to XPoet to generate Kotlin code. This CL refactors the writer to accommodate for Kotlin's nullability checks in types along with moving some of the generated code to runtime helpers.
First the nullability of the parent and child relation columns have to be accounted when generating code that reads the 'key' column. The solution implemented is to use column readers when reading keys as these are null-aware as opposed to the hardcoded cursor get functions used. The readers are always available since the key type is based on the matching fields affinity and not the actual field type and thus they are all built-in supported types (String, Long, etc). One special type is ByteBuffer which is supported via a built-in converter for BLOB affinity. To support always finding the converter Context.fork() was updated to receive forced built-in converter states.
Second, the generated code to recursively fetch relationships when exceeding the max binding args amount was moved to runtime helpers functions in RelationUtil. This makes them easier to maintain and reduces the amount of code generation logic in the writer. However, the fetch functions are a bit redundant with each other as they need to support various map types, specifically HashMap, LongSparseArray and ArrayMap. This also means room-runtime has a new compileOnly dependency on androidx.collection to support having these runtime helper functions. The function to be use is still determine by room-compiler and the availability of androidx.collection types in the project's classpath.
XProcessing change:
* Fixed requireType(XTypeName) in KSP to not simply use KTypeName as String since that might contain the `?` suffix when nullable and will fail lookup. Instead find the type using the canonical name and then make nullable or non null based on XTypeName.nullability.
New XPoet API:
* XCodeBlock.indent() and XCodeBlock.unindent() - For adding and removing code indent, useful for lambdas.
* XTypeName.rawTypeName - For getting the raw type name of a parametrized type name. Even though there is no XParametrizedTypeName,the function is available to all type names returning itself if not parametrized.
Bug: 127483380
Test: DaoRelationshipKotlinCodeGenTest + existing
Change-Id: I2baf26703b1cc57e14af23e7ac452028a389d9ed
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XCodeBlock.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XTypeName.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/java/JavaCodeBlock.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/java/JavaFunSpec.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/kotlin/KotlinCodeBlock.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/kotlin/KotlinFunSpec.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/XProcessingEnv.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/codegen/XTypeNameTest.kt
M room/room-compiler/src/main/kotlin/androidx/room/ext/xpoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/ext/xtype_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/Context.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/CustomConverterProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/MapQueryResultAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/PojoRowAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/ByteBufferColumnTypeAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/Relation.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/RelationCollector.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DatabaseWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/RelationCollectorFunctionWriter.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/QueryMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/solver/BuiltInConverterFlagsTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/testing/test_util.kt
A room/room-compiler/src/test/kotlin/androidx/room/writer/BaseDaoKotlinCodeGenTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DaoKotlinCodeGenTest.kt
A room/room-compiler/src/test/kotlin/androidx/room/writer/DaoRelationshipKotlinCodeGenTest.kt
A room/room-compiler/src/test/test-data/common/input/collection/ArrayMap.java
A room/room-compiler/src/test/test-data/common/input/collection/LongSparseArray.java
A room/room-compiler/src/test/test-data/kotlinCodeGen/relations.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/relations_arrayMap.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/relations_byteBufferKey.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/relations_longSparseArray.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/relations_nullable.kt
M room/room-runtime/api/restricted_current.txt
M room/room-runtime/build.gradle
A room/room-runtime/src/main/java/androidx/room/util/RelationUtil.kt
ap...@google.com <ap...@google.com> #28
Branch: androidx-main
commit 35a9063a3822179d22a3fdfdc7d041269d3c359d
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Mon Nov 07 16:04:03 2022
Migrate SQLiteOpenHelperWriter and ValidationWriter impls to XPoet.
This migrations allow Room to generate the RoomOpenHelper.Delegate in Kotlin and moves it back to be an inner class of the database impl, instead of a separate class.
This CL in part reverts aosp/2290293.
Also, renamed the param name of most RoomOpenHelper.Delegate functions from 'database' to 'db', aligning with the other functions, even though this is regarded as an incompatible change, these functions are only called from generated code that up until now was Java code, thus it is a safe change.
Bug: 127483380
Test: DatabaseKotlinCodeGenTest + existing
Relnote: Revert the API changes in aosp/2290293, but also renamed the db param name of most RoomOpenHelper.Delegate.
Change-Id: I1b11d32c24d1489b8f03a8fc723252e8501f2fa7
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XFunSpec.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/java/JavaFunSpec.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/kotlin/KotlinFunSpec.kt
M room/room-compiler/src/main/kotlin/androidx/room/DatabaseProcessingStep.kt
M room/room-compiler/src/main/kotlin/androidx/room/ext/xpoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DatabaseWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/FtsTableInfoValidationWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/SQLiteOpenHelperWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/TableInfoValidationWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/ValidationWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/ViewInfoValidationWriter.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DatabaseKotlinCodeGenTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DatabaseWriterTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/SQLiteOpenHelperWriterTest.kt
M room/room-compiler/src/test/test-data/databasewriter/output/ComplexDatabase.java
D room/room-compiler/src/test/test-data/databasewriter/output/ComplexDatabase_Impl_OpenHelperDelegate.java
M room/room-compiler/src/test/test-data/kotlinCodeGen/database_propertyDao.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/database_simple.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/database_withFtsAndView.kt
D room/room-runtime/api/current.ignore
M room/room-runtime/api/current.txt
M room/room-runtime/api/public_plus_experimental_current.txt
M room/room-runtime/api/restricted_current.ignore
M room/room-runtime/api/restricted_current.txt
M room/room-runtime/src/main/java/androidx/room/RoomDatabase.kt
M room/room-runtime/src/main/java/androidx/room/RoomOpenHelper.kt
M room/room-testing/src/main/java/androidx/room/testing/MigrationTestHelper.kt
ap...@google.com <ap...@google.com> #29
Branch: androidx-main
commit 7e7bb0bd279d754b7cdd96e93d8f930989160bb6
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Mon Nov 07 10:54:49 2022
Migrate DatabaseWriter to XPoet
This migrations allow Room to generate the database implementation in Kotlin.
Some notable changes:
* getAutoMigrations() was changed to not use Arrays.asList() and instead just add to an ArrayList. Keeps the XPoet part equivalent for both languages.
* For Java Dao impl getters emit memoization logic, but for Kotlin we'll just use Lazy, making the getter way simpler.
* This changes adds overriding abstract dao property, but it has a few flaws. Follow-up bug filled.
New XPoet API:
* Created the fallback API for XPropertySpec to allow access to the actual builder when the code generation diverges too much between languages. Used to add 'volatile' modifier in Java and for property overriding.
Bug: 127483380
Test: DatabaseKotlinCodeGenTest + existing
Change-Id: I723023639b276368e87c6abe3dc3b807bc419b42
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XPropertySpec.kt
M room/room-compiler/src/main/kotlin/androidx/room/DatabaseProcessingStep.kt
M room/room-compiler/src/main/kotlin/androidx/room/ext/xpoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/ext/xtype_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/parser/SqlParser.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/AmbiguousColumnIndexAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/EntityRowAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/MultiTypedPagingSourceQueryResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/PositionalDataSourceQueryResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/StringColumnTypeAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/AutoMigration.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/AutoMigrationWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DatabaseWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/FtsTableInfoValidationWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/SQLiteOpenHelperWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/TableInfoValidationWriter.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/DeleteOrUpdateShortcutMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/InsertOrUpsertShortcutMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/QueryMethodProcessorTest.kt
A room/room-compiler/src/test/kotlin/androidx/room/writer/DatabaseKotlinCodeGenTest.kt
M room/room-compiler/src/test/test-data/databasewriter/output/ComplexDatabase.java
A room/room-compiler/src/test/test-data/kotlinCodeGen/database_propertyDao.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/database_simple.kt
M room/room-runtime/src/main/java/androidx/room/Room.kt
ap...@google.com <ap...@google.com> #30
Branch: androidx-main
commit 4183f5c0af2b47c63e050b4c684bfe95c7b43fa6
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Sat Nov 05 11:36:03 2022
Temporarily generate RoomOpenHelper.Delegate in its own Java file.
Generating the RoomOpenHelper.Delegate in its own file helps us migrate DatabaseWriter to XPoet so it can generate Kotlin code without having to also migrate SQLiteOpenHelperWriter.
Since the delegate is no longer an inner class two API had to be opened up in RoomDatabase to be called from the delegate. These are temporary and will be removed once the delegate is moved back to an inner class.
Bug: 127483380
Test: Existing
Relnote: Add restricted temporary API in RoomDatabase to be accessed by generated OpenHelper Delegate.
Change-Id: I2f206155ba48a235c580596dcad8bd3179a3ca24
M room/room-compiler/src/main/kotlin/androidx/room/DatabaseProcessingStep.kt
M room/room-compiler/src/main/kotlin/androidx/room/ext/xpoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DatabaseWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/SQLiteOpenHelperWriter.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DatabaseWriterTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/SQLiteOpenHelperWriterTest.kt
M room/room-compiler/src/test/test-data/databasewriter/output/ComplexDatabase.java
A room/room-compiler/src/test/test-data/databasewriter/output/ComplexDatabase_Impl_OpenHelperDelegate.java
A room/room-runtime/api/current.ignore
M room/room-runtime/api/current.txt
M room/room-runtime/api/public_plus_experimental_current.txt
M room/room-runtime/api/restricted_current.ignore
M room/room-runtime/api/restricted_current.txt
M room/room-runtime/src/main/java/androidx/room/RoomDatabase.kt
ap...@google.com <ap...@google.com> #31
Branch: androidx-main
commit e695d18e07c066ffd30d901023a19c425615eadd
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Tue Nov 08 21:12:14 2022
Migrate the remaining converters from the NullAwareTypeAdapterStore to XPoet
Also add more tests for custom type converters, including provides ones. This lead me to find that the getter for the provided converter was not quite right and ended up refactoring similar to dao impl getters, where we use a kotlin.Lazy when generating Kotlin otherwise the getter has memoization logic. Due to the lazy, Dao impl constructors had to be moved to the primary constructor, hence all Kotlin codegen tests update.
New XPoet API:
* XTypeSpec.Builder.setPrimaryConstructor() - For setting the primary constructor of a type, note that this has no real effect when generating Java, but will do when generating Kotlin.
Bug: 127483380
Test: DaoKotlinCodeGenTest + existing
Change-Id: Id07edb2af23f02a920cdcd6a132d5a04b6f0c4db
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XFunSpec.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XTypeSpec.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/java/JavaTypeSpec.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/kotlin/KotlinTypeSpec.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/transaction/binder/CoroutineTransactionMethodBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/CompositeTypeConverter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/CustomTypeConverterWrapper.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/NoOpConverter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/NullAwareTypeConverters.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/TypeConverter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/UpCastTypeConverter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DaoWriter.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DaoKotlinCodeGenTest.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/abstractClassWithParam.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/arrayParameterAdapter.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/basicParameterAdapter_string.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/collectionParameterAdapter_string.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/coroutineResultBinder.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/delegatingFunctions_boxedPrimitiveBridge.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/delegatingFunctions_defaultImplBridge.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/deleteOrUpdateMethodAdapter.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/insertOrUpsertMethodAdapter.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_boolean.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_byteArray.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_customTypeConverter.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_customTypeConverter_composite.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_customTypeConverter_nullAware.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_customTypeConverter_provided.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_customTypeConverter_upcast.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_embedded.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_enum.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_internalVisibility.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_primitives.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_primitives_nullable.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_string.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_uuid.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_variableProperty.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_variableProperty_java.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/preparedQueryAdapter.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/queryResultAdapter_list.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/rawQuery.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/relations.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/relations_arrayMap.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/relations_byteBufferKey.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/relations_longSparseArray.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/relations_nullable.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/transactionMethodAdapter_abstractClass.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/transactionMethodAdapter_interface.kt
ap...@google.com <ap...@google.com> #32
Branch: androidx-main
commit 917948e6651180b64a251926b9aba9b02f65cd50
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Tue Nov 15 20:09:58 2022
Cleanup usage of XType.typeName and XTypeElement.className
This CL handles most of room-compiler usages, but there are still more left in room-compiler-processing and various other non-converter type adapters.
New API in XProcessing:
* XType.isTypeVariable - To check if the type represents an unresolved type variable.
New XPoet API:
* XTypeName.isBoxedPrimitive - To check if the type is a boxed primitive.
* XTypeName.equalsIgnoreNullability - For comparing type names while ignoring nullability.
* XTypeName.toString - A version of toString() that takes the code language to print JPoet or KPoet names.
* Added boxed primitives
Bug: 127483380
Bug: 247247366
Bug: 247248619
Bug: 248280754
Bug: 249173483
Test: Existing
Change-Id: Idbadc464a5222644cc2ec0452a3855d5232b570f
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/PoetExt.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XTypeName.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/DeclarationCollector.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/XExecutableElement.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/XFieldElement.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/XMemberContainer.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/XProcessingEnv.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/XType.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/XTypeElement.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/XTypeParameterElement.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/javac/JavacType.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/javac/JavacTypeElement.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/KspFileMemberContainer.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/KspType.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/KspTypeArgumentType.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/KspTypeElement.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/synthetic/KspSyntheticFileMemberContainer.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/codegen/XTypeNameTest.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XProcessingEnvTest.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XTypeTest.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/ksp/KspTypeNamesGoldenTest.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/ksp/synthetic/KspSyntheticFileMemberContainerTest.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/util/TestExtensions.kt
M room/room-compiler/src/main/kotlin/androidx/room/ext/xpoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/ext/xtype_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/parser/SqlParser.kt
M room/room-compiler/src/main/kotlin/androidx/room/preconditions/Checks.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/AutoMigrationProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/Context.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/CustomConverterProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/DaoProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/DatabaseProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/FieldProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/FtsTableEntityProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/InsertionMethodProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/PojoProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/ProcessorErrors.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/RawQueryMethodProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/ShortcutMethodProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/TableEntityProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/UpdateMethodProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/UpsertionMethodProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/NullAwareTypeConverterStore.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/CursorQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/MultiTypedPagingSourceQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/prepared/result/PreparedQueryResultAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/MultimapQueryResultAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/PojoRowAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/result/InsertOrUpsertMethodAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/transaction/binder/CoroutineTransactionMethodBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/transaction/binder/InstantTransactionMethodBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/BoxedBooleanToBoxedIntConverter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/EnumColumnTypeAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/NullAwareTypeConverters.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/StringColumnTypeAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/UpCastTypeConverter.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/Field.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/RawQueryMethod.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/RelationCollector.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DaoWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DatabaseWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/EntityCursorConverterWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/EntityDeletionAdapterWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/EntityInsertionAdapterWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/EntityUpdateAdapterWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/PreparedStatementWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/QueryWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/RelationCollectorFunctionWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/TypeWriter.kt
M room/room-compiler/src/test/kotlin/androidx/room/ext/ElementExtTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/parser/SQLTypeAffinityTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/AutoMigrationProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/CustomConverterProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/DaoProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/DatabaseProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/DeleteOrUpdateShortcutMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/EntityNameMatchingVariationsTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/FieldProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/Fts3TableEntityProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/Fts4TableEntityProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/InsertOrUpsertShortcutMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/PojoProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/QueryMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/RawQueryMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/TableEntityProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/autovalue/AutoValuePojoProcessorDelegateTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/solver/Signatures.kt
M room/room-compiler/src/test/kotlin/androidx/room/solver/TypeAdapterStoreTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/solver/TypeConverterStoreTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/testing/test_util.kt
ap...@google.com <ap...@google.com> #33
Branch: androidx-main
commit 7acd1f3d757bbbf51f4aae31141465f9426cebbf
Author: elifbilgin <elifbilgin@google.com>
Date: Tue Nov 15 15:20:40 2022
Generating Kotlin in ArrayQueryResultAdapter.
Bug: 127483380
Test: KotlinCodeGenTest.kt
Change-Id: I855161d2695deecdce90ab8d170db35500905eb7
M room/room-compiler/src/main/kotlin/androidx/room/ext/xpoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/ArrayQueryResultAdapter.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DaoKotlinCodeGenTest.kt
M room/room-compiler/src/test/test-data/daoWriter/output/javac/ComplexDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/ComplexDao.java
A room/room-compiler/src/test/test-data/kotlinCodeGen/queryResultAdapter_array.kt
ap...@google.com <ap...@google.com> #34
Branch: androidx-main
commit 77b07ae76aeec7ee7b59cd0297e7bc2777efa4ff
Author: elifbilgin <elifbilgin@google.com>
Date: Tue Nov 15 15:14:01 2022
Refactoring TypeWriter.
Old version was generating the incorrect suppression tags for Kotlin (same as Java)
Bug: 127483380
Test: ./gradlew :room:room-compiler:test
Change-Id: I5aeac62b7f062832dd4925a31b84370f55e99679
M room/room-compiler/src/main/kotlin/androidx/room/writer/TypeWriter.kt
M room/room-compiler/src/test/test-data/autoMigrationWriter/output/kotlin/AutoMigrationWithProvidedSpec.kt
M room/room-compiler/src/test/test-data/autoMigrationWriter/output/kotlin/ValidAutoMigrationWithDefault.kt
M room/room-compiler/src/test/test-data/autoMigrationWriter/output/kotlin/ValidAutoMigrationWithoutDefault.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/abstractClassWithParam.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/arrayParameterAdapter.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/basicParameterAdapter_string.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/collectionParameterAdapter_string.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/coroutineResultBinder.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/database_propertyDao.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/database_simple.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/database_withFtsAndView.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/delegatingFunctions_boxedPrimitiveBridge.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/delegatingFunctions_defaultImplBridge.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/deleteOrUpdateMethodAdapter.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/entityRowAdapter.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/insertOrUpsertMethodAdapter.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_boolean.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_byteArray.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_customTypeConverter.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_customTypeConverter_composite.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_customTypeConverter_nullAware.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_customTypeConverter_provided.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_customTypeConverter_upcast.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_embedded.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_enum.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_internalVisibility.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_primitives.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_primitives_nullable.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_string.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_uuid.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_variableProperty.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_variableProperty_java.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/preparedQueryAdapter.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/queryResultAdapter_list.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/queryResultAdapter_map.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/queryResultAdapter_map_ambiguousIndexAdapter.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/rawQuery.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/relations.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/relations_arrayMap.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/relations_byteBufferKey.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/relations_longSparseArray.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/relations_nullable.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/transactionMethodAdapter_abstractClass.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/transactionMethodAdapter_interface.kt
ap...@google.com <ap...@google.com> #35
Branch: androidx-main
commit 581ce0b5ddb3830d6a515b3ea81feaf04070ff69
Author: elifbilgin <elifbilgin@google.com>
Date: Tue Nov 22 12:55:08 2022
Generating Kotlin in GuavaOptionalQueryResultAdapter.
Bug: 127483380
Test: KotlinCodeGenTest.kt
Change-Id: I2932ab180f62d411b83f6890c87b51fbe6f38004
M room/room-compiler/src/main/kotlin/androidx/room/ext/xpoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/GuavaOptionalQueryResultAdapter.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DaoKotlinCodeGenTest.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/queryResultAdapter_guavaOptional.kt
ap...@google.com <ap...@google.com> #36
Branch: androidx-main
commit 428c531bbcda8f5bee17da99348d78a29c54cd0b
Author: elifbilgin <elifbilgin@google.com>
Date: Tue Nov 08 15:59:11 2022
Generating Kotlin in OptionalQueryResultAdapter.
Bug: 127483380
Test: KotlinCodeGenTest.kt
Change-Id: I77186932f0a8b3d6da800356cf0daa3ea42136cc
M room/room-compiler/src/main/kotlin/androidx/room/ext/xpoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/OptionalQueryResultAdapter.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DaoKotlinCodeGenTest.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/queryResultAdapter_optional.kt
ap...@google.com <ap...@google.com> #37
Branch: androidx-main
commit 268572539eda5a3eddc49fb63e5dc9ac87179e37
Author: elifbilgin <elifbilgin@google.com>
Date: Tue Nov 08 13:56:40 2022
Generating Kotlin in ImmutableListQueryResultAdapter.
Bug: 127483380
Test: KotlinCodeGenTest.kt
Change-Id: I3c072df6f6cc6ddf83a6c527892bff1227d46e7e
M room/room-compiler/src/main/kotlin/androidx/room/ext/xpoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/ImmutableListQueryResultAdapter.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DaoKotlinCodeGenTest.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/queryResultAdapter_immutable_list.kt
ap...@google.com <ap...@google.com> #38
Branch: androidx-main
commit 906a064761e91002d1a5be0d9f92fdbfde519823
Author: elifbilgin <elifbilgin@google.com>
Date: Tue Nov 22 16:53:15 2022
Generating Kotlin in GuavaImmutableMultimapQueryResultAdapter.
Bug: 127483380
Test: KotlinCodeGenTest.kt
Change-Id: I932739d8323c0dac51f4e28f8e9fe8251206e677
M room/room-compiler/src/main/kotlin/androidx/room/ext/xpoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/GuavaImmutableMultimapQueryResultAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/GuavaOptionalQueryResultAdapter.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DaoKotlinCodeGenTest.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/queryResultAdapter_guavaImmutableMultimap.kt
ap...@google.com <ap...@google.com> #39
Branch: androidx-main
commit 4c09727d0759740ce5632fce389558a2558d49f1
Author: elifbilgin <elifbilgin@google.com>
Date: Tue Nov 22 16:15:47 2022
Generating Kotlin in GuavaImmutableMapQueryResultAdapter.
Bug: 127483380
Test: KotlinCodeGenTest.kt
Change-Id: I2a6fa079dea28c68805a1d6e4a62b8555b217516
M room/room-compiler/src/main/kotlin/androidx/room/ext/xpoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/ImmutableListQueryResultAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/ImmutableMapQueryResultAdapter.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DaoKotlinCodeGenTest.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/queryResultAdapter_guavaImmutableMap.kt
ap...@google.com <ap...@google.com> #40
Branch: androidx-main
commit 4defed070d5031434f7a04bed92b76d5cd37a350
Author: elifbilgin <elifbilgin@google.com>
Date: Thu Dec 01 15:14:20 2022
Converting paging sources in the compiler tests to Kotlin.
Bug: 127483380
Test: N/A
Change-Id: Ic15d9c19e8eab66ec616983037ebd0ea095dce0e
M room/room-compiler/src/test/test-data/common/input/LimitOffsetListenableFuturePagingSource.kt
A room/room-compiler/src/test/test-data/common/input/LimitOffsetPagingSource.kt
M room/room-compiler/src/test/test-data/common/input/LimitOffsetRx2PagingSource.kt
M room/room-compiler/src/test/test-data/common/input/LimitOffsetRx3PagingSource.kt
M room/room-compiler/src/test/test-data/common/input/ListenableFuturePagingSource.kt
M room/room-compiler/src/test/test-data/common/input/PagingSource.kt
M room/room-compiler/src/test/test-data/common/input/Rx2PagingSource.kt
M room/room-compiler/src/test/test-data/common/input/Rx3PagingSource.kt
ap...@google.com <ap...@google.com> #41
Branch: androidx-main
commit 190bd087cd58bcb7eb3b208f55b4afa09e31aec0
Author: elifbilgin <elifbilgin@google.com>
Date: Wed Nov 23 12:15:09 2022
Generating Kotlin in MultiTypedPagingSourceQueryResultBinder.
Bug: 127483380
Test: TypeAdapterStoreTest.kt, DaoKotlinCodeGenTest.kt
Change-Id: Id592fe870ef1a3896f144e13c73e081d1d45e54e
M room/room-compiler/src/main/kotlin/androidx/room/ext/xpoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/ListenableFuturePagingSourceQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/MultiTypedPagingSourceQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/PagingSourceQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/RxJava2PagingSourceQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/RxJava3PagingSourceQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/MultiTypedPagingSourceQueryResultBinder.kt
M room/room-compiler/src/test/kotlin/androidx/room/solver/TypeAdapterStoreTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/testing/test_util.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DaoKotlinCodeGenTest.kt
M room/room-compiler/src/test/test-data/common/input/LimitOffsetListenableFuturePagingSource.kt
D room/room-compiler/src/test/test-data/common/input/LimitOffsetPagingSource.java
M room/room-compiler/src/test/test-data/common/input/LimitOffsetPagingSource.kt
M room/room-compiler/src/test/test-data/common/input/LimitOffsetRx2PagingSource.kt
M room/room-compiler/src/test/test-data/common/input/LimitOffsetRx3PagingSource.kt
M room/room-compiler/src/test/test-data/common/input/ListenableFuturePagingSource.kt
M room/room-compiler/src/test/test-data/common/input/PagingSource.kt
M room/room-compiler/src/test/test-data/common/input/Rx2PagingSource.kt
M room/room-compiler/src/test/test-data/common/input/Rx3PagingSource.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/multiTypedPagingSourceResultBinder.kt
ap...@google.com <ap...@google.com> #42
Branch: androidx-main
commit bd1249f0b3581425c22e58d8592bab96e1440d7e
Author: elifbilgin <elifbilgin@google.com>
Date: Wed Dec 14 13:44:53 2022
Generating Kotlin in DataSourceFactoryQueryResultBinder and PositionalDataSourceQueryResultBinder.
Bug: 127483380
Test: KotlinCodeGenTest.kt
Change-Id: I471f9c2814f3d70b91fc244346fd989c6d69ecbe
M room/room-compiler/src/main/kotlin/androidx/room/ext/xpoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/DataSourceFactoryQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/DataSourceFactoryQueryResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/PositionalDataSourceQueryResultBinder.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/QueryMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/RawQueryMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/testing/test_util.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DaoKotlinCodeGenTest.kt
M room/room-compiler/src/test/test-data/common/input/DataSource.kt
D room/room-compiler/src/test/test-data/common/input/PositionalDataSource.java
A room/room-compiler/src/test/test-data/common/input/PositionalDataSource.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/dataSource.kt
ap...@google.com <ap...@google.com> #43
Branch: androidx-main
commit 1f7665431be7c1caaeb8d7740723ec1befde3afb
Author: elifbilgin <elifbilgin@google.com>
Date: Mon Nov 21 17:21:44 2022
Generating Kotlin in the remaining files.
This CL mainly focused on RxCallableQueryResultBinder, BaseObservableQueryResultBinder and TransactionWrapper to generate Kotlin. However, many other cases have also been handled, including shortcut methods, prepared queries, all rxjava2, rxjava3 and ListenableFuture return values.
Bug: 127483380
Test: KotlinCodeGenTest.kt
Change-Id: Iff93bb2ee7b3cb0f5a20774470bc7909349f0ce4
M room/room-compiler/src/main/kotlin/androidx/room/ext/xpoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/MethodProcessorDelegate.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/TransactionMethodProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/RxTypes.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/CoroutineFlowResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/GuavaListenableFutureQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/ListenableFuturePagingSourceQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/LiveDataQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/PagingSourceQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/QueryResultBinderProviderWithRequiredArtifact.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/RxCallableQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/RxJava2PagingSourceQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/RxJava3PagingSourceQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/RxQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/prepared/binder/CallablePreparedQueryResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/prepared/binderprovider/GuavaListenableFuturePreparedQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/prepared/binderprovider/RxPreparedQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/BaseObservableQueryResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/CoroutineFlowResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/CoroutineResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/GuavaListenableFutureQueryResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/LiveDataQueryResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/RxCallableQueryResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/RxQueryResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/TransactionWrapper.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/CallableDeleteOrUpdateMethodBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/CallableInsertMethodBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/CallableUpsertMethodBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/GuavaListenableFutureDeleteOrUpdateMethodBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/GuavaListenableFutureInsertMethodBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/GuavaListenableFutureUpsertMethodBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/RxCallableDeleteOrUpdateMethodBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/RxCallableInsertMethodBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/RxCallableUpsertMethodBinderProvider.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/DeleteOrUpdateShortcutMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/InsertOrUpsertShortcutMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/QueryMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/RawQueryMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/TransactionMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/solver/TypeAdapterStoreTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/testing/test_util.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DaoKotlinCodeGenTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DaoWriterTest.kt
M room/room-compiler/src/test/test-data/common/input/CoroutinesRoom.kt
M room/room-compiler/src/test/test-data/common/input/GuavaRoom.java
M room/room-compiler/src/test/test-data/common/input/Rx2Room.java
M room/room-compiler/src/test/test-data/common/input/Rx3Room.java
D room/room-compiler/src/test/test-data/common/input/coroutines/Channel.java
M room/room-compiler/src/test/test-data/common/input/coroutines/Channel.kt
M room/room-compiler/src/test/test-data/common/input/coroutines/ReceiveChannel.kt
M room/room-compiler/src/test/test-data/common/input/rxjava2/Completable.java
A room/room-compiler/src/test/test-data/common/input/rxjava2/EmptyResultSetException.java
M room/room-compiler/src/test/test-data/common/input/rxjava2/Maybe.java
M room/room-compiler/src/test/test-data/common/input/rxjava2/Single.java
M room/room-compiler/src/test/test-data/common/input/rxjava3/Completable.java
A room/room-compiler/src/test/test-data/common/input/rxjava3/EmptyResultSetException.java
M room/room-compiler/src/test/test-data/common/input/rxjava3/Flowable.java
M room/room-compiler/src/test/test-data/common/input/rxjava3/Maybe.java
M room/room-compiler/src/test/test-data/common/input/rxjava3/Single.java
M room/room-compiler/src/test/test-data/daoWriter/output/javac/ComplexDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/javac/DeletionDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/javac/UpdateDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/ComplexDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/DeletionDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/UpdateDao.java
A room/room-compiler/src/test/test-data/kotlinCodeGen/coroutines.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/guavaCallable.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/liveDataCallable.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/paging_dataSource.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/rx2CallableQuery.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/rx2PreparedCallableQuery.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/rx3CallableQuery.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/rx3PreparedCallableQuery.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/shortcutMethods_rxJava.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/shortcutMethods_suspend.kt
M room/room-rxjava3/src/main/java/androidx/room/rxjava3/EmptyResultSetException.java
ap...@google.com <ap...@google.com> #44
Branch: androidx-main
commit 2c9e6af2d1d7fbaec41ebe0605c0b1ca441d848c
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Wed Dec 21 12:46:57 2022
Fix some issues attempting to generate Kotlin in Room integration test.
* Use method `name` instead of `jvmName` when target language is Kotlin
* Rx shortcut queries of Completable must use nullable Void as typearg for Callable.
* EnumColumnTypeAdapter should use type element XClassName when generating switch and when cases, avoids emitting '?' when the `out` is nullable due to null-aware conversion.
* Use begin and end control flow functions when generating the `lazy` DAO property in the database impl.
Bug: 127483380
Test: Existing
Change-Id: I9569a7505eb5e5599b80b32ff7aeb6edd8e112b6
M room/integration-tests/kotlintestapp/src/androidTest/java/InvalidationTrackerExt.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/DatabaseProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/RawQueryMethodProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/RxCallableDeleteOrUpdateMethodBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/RxCallableInsertMethodBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/RxCallableUpsertMethodBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/CustomTypeConverterWrapper.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/EnumColumnTypeAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/Constructor.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/CustomTypeConverter.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/RawQueryMethod.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DaoWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DatabaseWriter.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/RawQueryMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/solver/Signatures.kt
M room/room-compiler/src/test/kotlin/androidx/room/solver/TypeAdapterStoreTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DaoKotlinCodeGenTest.kt
M room/room-compiler/src/test/test-data/daoWriter/output/javac/DeletionDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/javac/UpdateDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/DeletionDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/UpdateDao.java
M room/room-compiler/src/test/test-data/kotlinCodeGen/callableQuery_rx2.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/callableQuery_rx3.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/database_propertyDao.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/database_simple.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/database_withFtsAndView.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/preparedCallableQuery_rx2.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/preparedCallableQuery_rx3.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/shortcutMethods_rx2.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/shortcutMethods_rx3.kt
ap...@google.com <ap...@google.com> #45
Branch: androidx-main
commit 63239ab080e845cec39acc65fbd102fe9510413a
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Wed Dec 21 16:36:29 2022
Use internal visibility modifier in Room generated overrides for Kotlin codegen.
For Java internal visibility overrides are converted to public, there is no compiler check for exposing internal types. Also, AutoMigrations in Kotlin will be `internal` by default as opposed to public.
Bug: 127483380
Bug: 262615155
Test: Existing + DatabaseKotlinCodeGenTest.database_internalVisibility
Change-Id: I63aa5a5dfe21dd1f30fc999815038cc457429d49
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/VisibilityModifier.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/java/JavaFunSpec.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/kotlin/KotlinFunSpec.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/KotlinPoetExt.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/AutoMigrationWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DaoWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DatabaseWriter.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DaoKotlinCodeGenTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DatabaseKotlinCodeGenTest.kt
M room/room-compiler/src/test/test-data/autoMigrationWriter/output/kotlin/AutoMigrationWithProvidedSpec.kt
M room/room-compiler/src/test/test-data/autoMigrationWriter/output/kotlin/ValidAutoMigrationWithDefault.kt
M room/room-compiler/src/test/test-data/autoMigrationWriter/output/kotlin/ValidAutoMigrationWithoutDefault.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/database_internalVisibility.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_customTypeConverter_internalVisibility.kt
ap...@google.com <ap...@google.com> #46
Branch: androidx-main
commit aa2b688d0597b37ec9e73904eb68d94f83b83fd3
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Wed Dec 21 17:19:46 2022
Disallow abstract properties as DAO getters or DAO queries in Kotlin codegen.
Queries that are declared as a property and Room overrides the getter function give a false notion that the property is immutable or has a fixed stored result, that it won't change, however the getter is not pure, it can return different results if called at different times based on the data in the database. Therefore, this change disallows them when generating Kotlin.
Even though a DAO property in the abstract Database is a more appropriate case since Room generated code does cache the created DAO instance, it is encoding implementation logic. Kotlin codegen is greatly simplified when disallowed.
Bug: 127483380
Bug: 257967987
Test: DatabaseProcessorTest and DaoProcessorTest
Relnote: Disallow abstract properties as DAO getters or DAO queries in Kotlin codegen, instead they should be rewritten as functions to avoid the false notion that the property value is immutable and has a fixed stored result.
Change-Id: If6a13382b351fbcf9072a40c496d600cd329fd38
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/dao/BooksDao.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/AmbiguousColumnResolverTest.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/InternalsTest.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/InvalidationTrackerFlowTest.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/ItemWithNullableConstructor.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/JvmNameInDaoTest.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/ListenableFuturePagingSourceTest.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/MultiTypedPagingSourceTest.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/NullableCollectionQueryParamTest.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/Rx2PagingSourceTest.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/Rx3PagingSourceTest.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/SuspendingQueryTest.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/SyncTriggersConcurrencyTest.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/testutil/PagingDb.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/DaoProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/DatabaseProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/ProcessorErrors.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DatabaseWriter.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/DaoProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/DatabaseProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DatabaseKotlinCodeGenTest.kt
D room/room-compiler/src/test/test-data/kotlinCodeGen/database_propertyDao.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/database_withFtsAndView.kt
ap...@google.com <ap...@google.com> #47
Branch: androidx-main
commit 960274cef62fbb0674de42eb4ea5444940a4b15f
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Thu Dec 22 13:54:59 2022
Disallow non-null Void for ListenableFuture, and type args in general.
Since the Void class cannot be instantiated and 'null' is always returned, it is an error to declare a type arg as non-null Void and instead should be declared as nullable, e.g. ListenableFuture<Void?>.
Also, while inspecting usages of COMMON_TYPES.VOID I notice we had a missing `makeNullable` for Rx prepared queries with Completable. This change fixes that and makes the CallablePreparedQueryResultBinder gen code simpler.
Bug: 127483380
Test: Various @Test nonNullVoidGuava()
Change-Id: Ie91d084974d73ebfe81d6ca548b30e41b8626b23
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/dao/BooksDao.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/ProcessorErrors.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/GuavaListenableFutureQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/prepared/binder/CallablePreparedQueryResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/prepared/binderprovider/GuavaListenableFuturePreparedQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/prepared/binderprovider/RxPreparedQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/RxCallableQueryResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/GuavaListenableFutureDeleteOrUpdateMethodBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/GuavaListenableFutureInsertMethodBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/GuavaListenableFutureUpsertMethodBinderProvider.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/DeleteOrUpdateShortcutMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/InsertOrUpsertShortcutMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/QueryMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/RawQueryMethodProcessorTest.kt
M room/room-compiler/src/test/test-data/daoWriter/output/javac/DeletionDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/javac/UpdateDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/DeletionDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/UpdateDao.java
ap...@google.com <ap...@google.com> #48
Branch: androidx-main
commit a92310aafb4b4179b34ecb3bb4eacd7ece310266
Author: elifbilgin <elifbilgin@google.com>
Date: Tue Dec 20 07:34:17 2022
Removing usages of $S, $T, $N, $L, $W and `toJavaPoet()` across all files in Room.
Bug: 127483380
Test: Existing tests
Change-Id: I27bfd88931f04370eb54a6f6bb49c384edefe18d
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XFunSpec.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XPropertySpec.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XTypeSpec.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/java/JavaFunSpec.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/java/JavaTypeSpec.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/kotlin/KotlinFunSpec.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/kotlin/KotlinTypeSpec.kt
M room/room-compiler/src/main/kotlin/androidx/room/ext/xpoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/TypeWriter.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/CustomConverterProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/DaoProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/InsertOrUpsertShortcutMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/PojoProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/QueryMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/TableEntityProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/solver/CustomTypeConverterResolutionTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/solver/TypeAdapterStoreTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/solver/query/QueryWriterTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DaoWriterTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DefaultsInDaoTest.kt
M room/room-runtime/src/main/java/androidx/room/EntityUpsertionAdapter.kt
ap...@google.com <ap...@google.com> #49
Branch: androidx-main
commit c1172018f847f8e5dc003c311fb1db39478c0b5e
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Mon Jan 23 20:08:36 2023
Fix suspend vararg Kotlin overrides in XPoet
Also apply spread operator when calling super / delegate function in concrete @Transaction DAO functions, this is needed because unlike Java, Kotlin does not treat equally vararg parameters with its array representation.
Bug: 127483380
Bug: 253268357
Test: DaoKotlinCodeGenTest
Change-Id: I6de00f405a7693101ccbe5468c551d6a688c19c9
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/JavaPoetExt.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/KotlinPoetExt.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/KspExecutableElement.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XExecutableElementTest.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/TransactionMethodProcessor.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DaoKotlinCodeGenTest.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/coroutines.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/shortcutMethods_suspend.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/transactionMethodAdapter_abstractClass.kt
ap...@google.com <ap...@google.com> #50
Branch: androidx-main
commit 856cad743cb01aef3ebbda03aebc6ee0a3ec0d13
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Mon Jan 23 20:13:18 2023
Fix various miss usages of non-null return type queries that are asserted to return null.
Bug: 127483380
Test: Existing
Change-Id: I59388b991a71dd895459dd23c9d237e067f90766
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/dao/BooksDao.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/BooksDaoTest.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/DeferredBooksDaoTest.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/DependencyDaoTest.kt
M room/integration-tests/kotlintestapp/src/main/java/androidx/room/integration/kotlintestapp/dao/DependencyDao.kt
ap...@google.com <ap...@google.com> #51
Branch: androidx-main
commit d62dc3503f7b3ce001aea49bd212724cb15a6e4b
Author: elifbilgin <elifbilgin@google.com>
Date: Fri Feb 03 11:22:25 2023
Removing automigration related warnings as well as nullable collection parameter warnings in preparation for turning on the Kotlin CodeGen testapp.
Test: AutoMigrationWriterTest.kt, BoxedNonNullTypesTest.kt
Bug: 127483380
Change-Id: I6833210feb3dbfa05cac7d3b96eaf467d3365fa7
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/BoxedNonNullTypesTest.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/AutoMigrationWriter.kt
M room/room-compiler/src/test/test-data/autoMigrationWriter/output/java/AutoMigrationWithProvidedSpec.java
M room/room-compiler/src/test/test-data/autoMigrationWriter/output/java/ValidAutoMigrationWithDefault.java
M room/room-compiler/src/test/test-data/autoMigrationWriter/output/java/ValidAutoMigrationWithoutDefault.java
M room/room-compiler/src/test/test-data/autoMigrationWriter/output/kotlin/AutoMigrationWithProvidedSpec.kt
M room/room-compiler/src/test/test-data/autoMigrationWriter/output/kotlin/ValidAutoMigrationWithDefault.kt
M room/room-compiler/src/test/test-data/autoMigrationWriter/output/kotlin/ValidAutoMigrationWithoutDefault.kt
ap...@google.com <ap...@google.com> #52
Branch: androidx-main
commit f748a172bc0cdddab04240280a1a8305b5e3b848
Author: elifbilgin <elifbilgin@google.com>
Date: Thu Mar 02 10:27:43 2023
Duplicating all AutoMigration related tests in the Kotlin test app, in Kotlin.
Bug: 127483380
Test: AutoMigrationTest.kt, ProvidedAutoMigrationSpecTest.kt
Change-Id: Ifbee2f1e01ea4d81579e5c1a17dab9f14c339a39
A room/integration-tests/kotlintestapp/schemas-ksp/androidx.room.integration.kotlintestapp.migration.AutoMigrationDb/1.json
A room/integration-tests/kotlintestapp/schemas-ksp/androidx.room.integration.kotlintestapp.migration.AutoMigrationDb/2.json
A room/integration-tests/kotlintestapp/schemas-ksp/androidx.room.integration.kotlintestapp.migration.AutoMigrationDb/3.json
A room/integration-tests/kotlintestapp/schemas-ksp/androidx.room.integration.kotlintestapp.migration.EmbeddedAutoMigrationDb/1.json
A room/integration-tests/kotlintestapp/schemas-ksp/androidx.room.integration.kotlintestapp.migration.EmbeddedAutoMigrationDb/2.json
A room/integration-tests/kotlintestapp/schemas-ksp/androidx.room.integration.kotlintestapp.migration.ProvidedAutoMigrationSpecTest.ProvidedAutoMigrationDb/1.json
A room/integration-tests/kotlintestapp/schemas-ksp/androidx.room.integration.kotlintestapp.migration.ProvidedAutoMigrationSpecTest.ProvidedAutoMigrationDb/2.json
A room/integration-tests/kotlintestapp/schemas/androidx.room.integration.kotlintestapp.migration.AutoMigrationDb/1.json
A room/integration-tests/kotlintestapp/schemas/androidx.room.integration.kotlintestapp.migration.AutoMigrationDb/2.json
A room/integration-tests/kotlintestapp/schemas/androidx.room.integration.kotlintestapp.migration.AutoMigrationDb/3.json
A room/integration-tests/kotlintestapp/schemas/androidx.room.integration.kotlintestapp.migration.EmbeddedAutoMigrationDb/1.json
A room/integration-tests/kotlintestapp/schemas/androidx.room.integration.kotlintestapp.migration.EmbeddedAutoMigrationDb/2.json
A room/integration-tests/kotlintestapp/schemas/androidx.room.integration.kotlintestapp.migration.ProvidedAutoMigrationSpecTest.ProvidedAutoMigrationDb/1.json
A room/integration-tests/kotlintestapp/schemas/androidx.room.integration.kotlintestapp.migration.ProvidedAutoMigrationSpecTest.ProvidedAutoMigrationDb/2.json
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/migration/AutoMigrationDb.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/migration/AutoMigrationTest.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/migration/EmbeddedAutoMigrationDb.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/migration/ProvidedAutoMigrationSpecTest.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/Album.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/AlbumNameAndBandName.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/AlbumWithSongs.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/Artist.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/Playlist.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/PlaylistSongXRef.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/PlaylistWithSongs.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/ReleasedAlbum.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/Song.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/AutoMigrationWriter.kt
M room/room-testing/build.gradle
A room/room-testing/schemas/androidx.room.testing.kotlintestapp.migration.SimpleAutoMigrationDb/1.json
A room/room-testing/schemas/androidx.room.testing.kotlintestapp.migration.SimpleAutoMigrationDb/2.json
A room/room-testing/src/androidTest/java/androidx/room/testing/kotlintestapp/migration/AutoMigrationAndMigrationTest.kt
A room/room-testing/src/androidTest/java/androidx/room/testing/kotlintestapp/migration/SimpleAutoMigrationDb.kt
ap...@google.com <ap...@google.com> #53
Branch: androidx-main
commit 9802ded90ece9749211346118239bce19a8573d7
Author: elifbilgin <elifbilgin@google.com>
Date: Mon Mar 13 16:08:00 2023
Duplicating tests into the kotlin test app that test conflict in DAOs.
Bug: 127483380
Test: DaoConflictStrategyTest.kt, DaoNameConflictTest.kt
Change-Id: Ia2feeda6f862805672caa6866c6fc819dd0dc0d8
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/TestDatabase.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/dao/PetDao.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/dao/ToyDao.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/DaoConflictStrategyTest.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/DaoNameConflictTest.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/TestUtil.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/Day.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/Pet.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/PetAndOwner.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/PetUser.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/PetWithToyIds.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/PetWithUser.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/Toy.kt
ap...@google.com <ap...@google.com> #54
Branch: androidx-main
commit bfc8f1bd124699a3061c61238e5c8f22bb4d194f
Author: elifbilgin <elifbilgin@google.com>
Date: Mon Mar 06 19:42:35 2023
Duplicating all Multimap related tests in the Kotlin test app, in Kotlin.
Bug: 127483380
Test: MultimapQueryTest.kt
Change-Id: Iee3534d141fa52b2fb331e12930fc221cc171fd9
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/TestDatabase.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/dao/MusicDao.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/MultimapQueryTest.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/TestObserver.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/TestUtil.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/AlbumNameAndBandName.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/Image.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/ImageFormat.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/PlaylistMultiSongXRefView.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/PlaylistWithSongTitles.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/ReleasedAlbum.kt
ap...@google.com <ap...@google.com> #55
Branch: androidx-main
commit bfa6a0036c4db067a6df9e033c1dcb478a84969f
Author: elifbilgin <elifbilgin@google.com>
Date: Fri Mar 17 13:54:11 2023
Duplicating ProvidedTypeConverterTest in the Kotlin test app, in Kotlin.
Bug: 127483380
Test: ProvidedTypeConverterTest.kt
Change-Id: Ia5e305a0cd60a058d55c0255283e40f994efc3c0
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/dao/RobotsDao.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/ProvidedTypeConverterTest.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/TestUtil.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/Cluster.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/Hivemind.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/Pet.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/Robot.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/RobotAndHivemind.kt
Description