WAI
Status Update
Comments
ro...@gtempaccount.com <ro...@gtempaccount.com> #2
cc...@gmail.com <cc...@gmail.com> #3
to...@leach.it <to...@leach.it> #5
Project: platform/frameworks/support
Branch: androidx-main
Author: Daniel Santiago Rivera <
Link:
Make androidx.room and androidx.sqlite target Kotlin 2.0
Expand for full commit details
Make androidx.room and androidx.sqlite target Kotlin 2.0
This required the following changes:
* Suppress 'ACTUAL_ANNOTATIONS_NOT_MATCH_EXPECT' in SQLiteException.android.kt and ThreadLocal.jvmAndroid.kt due to being impossible to match annotations in expect when actual is a typealias to a platform type. Meanwhile in room-common repeatable annotations in JVM use @JvmRepeatable while expect uses Kotlin's @Repeatable and while trying to match actual with expect, an error is produced due to @JvmRepeatable and @Repeatable being used together.
* Fix various annotations mismatch between actual / expect.
* Removing @JvmField from common code as expect properties have no backing field and @JvmField targets FIELD.
* Smart-cast is not possible for expect properties, therefore first store in local variable before smart-case usage. Observed in TableInfo, FtsTableInfo, ViewInfo and MigrationUtil.
* Adding load() and getRefreshKey() to expect LimitOffsetPagingSource to conform to modality of actual overriding those functions.
* Make a XProcessingEnvConfig a normal class (instead of a data class) since it has a private constructor with a public copy() usage which is now invalid.
* Set useKsp2=true on projects with KSP and Kotlin language 2.0 (Room KMP test apps).
* Workaround KSP2 issue with default value of annotations not appearing in value list. Added a get() that returns nullable XAnnotationValue.
* Workaround KSP2 issue of projecting value class constructor as member of (to support generics).
* Workaround XPoet creating JavaPoet types of invalid methods (internal) when XProcessingEnvConfig.excludeMethodsWithInvalidJvmSourceNames is set to true due to Kotlin codegen.
Bug: 315461431
Bug: 384600605
Test: Existing
Relnote: "Native APIs updated due to Kotlin 2.0"
Change-Id: I8efb015c88682921780370c8bed5931d9933a319
Files:
- M
development/build_log_simplifier/messages.ignore
- M
room/integration-tests/kotlintestapp/build.gradle
- M
room/integration-tests/multiplatformtestapp/build.gradle
- M
room/room-common/bcv/native/current.txt
- M
room/room-common/build.gradle
- M
room/room-common/src/jvmMain/kotlin/androidx/room/DeleteColumn.jvm.kt
- M
room/room-common/src/jvmMain/kotlin/androidx/room/DeleteTable.jvm.kt
- M
room/room-common/src/jvmMain/kotlin/androidx/room/RenameColumn.jvm.kt
- M
room/room-common/src/jvmMain/kotlin/androidx/room/RenameTable.jvm.kt
- M
room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/InternalXAnnotation.kt
- 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/XAnnotation.kt
- M
room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/XProcessingEnvConfig.kt
- M
room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/util/NamingUtils.kt
- M
room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XAnnotationTest.kt
- M
room/room-compiler/build.gradle
- M
room/room-compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
- M
room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/MultimapQueryResultAdapter.kt
- M
room/room-compiler/src/test/kotlin/androidx/room/writer/BaseDaoKotlinCodeGenTest.kt
- M
room/room-compiler/src/test/kotlin/androidx/room/writer/DaoKotlinCodeGenTest.kt
- M
room/room-compiler/src/test/kotlin/androidx/room/writer/DaoRelationshipKotlinCodeGenTest.kt
- M
room/room-compiler/src/test/kotlin/androidx/room/writer/DatabaseKotlinCodeGenTest.kt
- M
room/room-compiler/src/test/test-data/kotlinCodeGen/database_daoProperty.kt
- M
room/room-compiler/src/test/test-data/kotlinCodeGen/database_internalVisibility.kt
- M
room/room-compiler/src/test/test-data/kotlinCodeGen/database_javaSource.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/guavaCallable_java.kt
- M
room/room-ktx/build.gradle
- M
room/room-migration/build.gradle
- M
room/room-paging-guava/build.gradle
- M
room/room-paging-rxjava2/build.gradle
- M
room/room-paging-rxjava3/build.gradle
- M
room/room-paging/build.gradle
- M
room/room-paging/src/androidMain/kotlin/androidx/room/paging/LimitOffsetPagingSource.android.kt
- M
room/room-paging/src/commonMain/kotlin/androidx/room/paging/LimitOffsetPagingSource.kt
- M
room/room-paging/src/jvmNativeMain/kotlin/androidx/room/paging/LimitOffsetPagingSource.jvmNative.kt
- M
room/room-runtime/bcv/native/current.txt
- M
room/room-runtime/build.gradle
- M
room/room-runtime/src/commonMain/kotlin/androidx/room/RoomConnectionManager.kt
- M
room/room-runtime/src/commonMain/kotlin/androidx/room/util/FtsTableInfo.kt
- M
room/room-runtime/src/commonMain/kotlin/androidx/room/util/MigrationUtil.kt
- M
room/room-runtime/src/commonMain/kotlin/androidx/room/util/TableInfo.kt
- M
room/room-runtime/src/commonMain/kotlin/androidx/room/util/ViewInfo.kt
- M
room/room-runtime/src/jvmAndroidMain/kotlin/androidx/room/concurrent/ThreadLocal.jvmAndroid.kt
- M
room/room-runtime/src/jvmNativeMain/kotlin/androidx/room/InvalidationTracker.jvmNative.kt
- M
room/room-runtime/src/jvmNativeMain/kotlin/androidx/room/util/TableInfo.jvmNative.kt
- M
room/room-runtime/src/jvmNativeMain/kotlin/androidx/room/util/ViewInfo.jvmNative.kt
- M
room/room-runtime/src/nativeMain/kotlin/androidx/room/concurrent/ThreadLocal.native.kt
- M
room/room-rxjava2/build.gradle
- M
room/room-rxjava3/build.gradle
- M
room/room-testing/build.gradle
- M
sqlite/sqlite-bundled/build.gradle
- M
sqlite/sqlite-bundled/src/commonMain/kotlin/androidx/sqlite/driver/bundled/BundledSQLiteConnection.kt
- M
sqlite/sqlite-bundled/src/commonMain/kotlin/androidx/sqlite/driver/bundled/BundledSQLiteDriver.kt
- M
sqlite/sqlite-bundled/src/commonMain/kotlin/androidx/sqlite/driver/bundled/BundledSQLiteStatement.kt
- M
sqlite/sqlite-bundled/src/jvmAndroidMain/kotlin/androidx/sqlite/driver/bundled/BundledSQLite.jvmAndroid.kt
- M
sqlite/sqlite-framework/build.gradle
- M
sqlite/sqlite-ktx/build.gradle
- M
sqlite/sqlite/build.gradle
- M
sqlite/sqlite/src/androidMain/kotlin/androidx/sqlite/SQLiteException.android.kt
- M
sqlite/sqlite/src/androidUnitTest/kotlin/androidx/sqlite/db/SimpleSQLiteQueryTest.kt
Hash: 6e1e6e154483b9346ffc27a0e57d14bd20f4359f
Date: Mon Dec 16 22:13:20 2024
ja...@gmail.com <ja...@gmail.com> #6
Project: platform/frameworks/support
Branch: androidx-main
Author: Daniel Santiago Rivera <
Link:
Migrate androidx.sqlite to use KMP AutoCloseable
Expand for full commit details
Migrate androidx.sqlite to use KMP AutoCloseable
AutoCloseable common was added in Kotlin 2.0
Bug: 315461431
Test: Existing
Relnote: Migrate androidx.sqlite.use to Kotlin's AutoCloseable's use in the stdlib.
Change-Id: I470f02620d43bbe641c58e3fc3637119e8c44532
Files:
- M
room/integration-tests/multiplatformtestapp/src/commonTest/kotlin/androidx/room/integration/multiplatformtestapp/test/BaseAutoMigrationTest.kt
- M
room/integration-tests/multiplatformtestapp/src/commonTest/kotlin/androidx/room/integration/multiplatformtestapp/test/BaseMigrationTest.kt
- M
room/room-paging/src/androidInstrumentedTest/kotlin/androidx/room/paging/LimitOffsetPagingSourceTest.kt
- M
room/room-paging/src/androidMain/kotlin/androidx/room/paging/LimitOffsetPagingSource.android.kt
- M
room/room-runtime/src/androidMain/kotlin/androidx/room/coroutines/AndroidSQLiteDriverConnectionPool.android.kt
- M
room/room-runtime/src/androidMain/kotlin/androidx/room/driver/SupportSQLiteConnectionPool.android.kt
- M
room/room-runtime/src/commonMain/kotlin/androidx/room/EntityDeleteOrUpdateAdapter.kt
- M
room/room-runtime/src/commonMain/kotlin/androidx/room/EntityInsertAdapter.kt
- M
room/room-runtime/src/commonMain/kotlin/androidx/room/InvalidationTracker.kt
- M
room/room-runtime/src/commonMain/kotlin/androidx/room/RoomConnectionManager.kt
- M
room/room-runtime/src/commonMain/kotlin/androidx/room/coroutines/ConnectionPoolImpl.kt
- M
room/room-runtime/src/commonMain/kotlin/androidx/room/util/ConnectionUtil.kt
- M
room/room-runtime/src/commonMain/kotlin/androidx/room/util/DBUtil.kt
- M
room/room-runtime/src/commonMain/kotlin/androidx/room/util/SchemaInfoUtil.kt
- M
room/room-runtime/src/commonTest/kotlin/androidx/room/coroutines/BaseConnectionPoolTest.kt
- M
room/room-testing/src/commonMain/kotlin/androidx/room/testing/MigrationTestHelper.kt
- M
sqlite/integration-tests/driver-conformance-test/build.gradle
- M
sqlite/integration-tests/driver-conformance-test/src/commonTest/kotlin/androidx/sqlite/driver/test/BaseBundledConformanceTest.kt
- M
sqlite/integration-tests/driver-conformance-test/src/commonTest/kotlin/androidx/sqlite/driver/test/BaseConformanceTest.kt
- M
sqlite/sqlite/api/current.txt
- M
sqlite/sqlite/api/restricted_current.txt
- M
sqlite/sqlite/bcv/native/current.txt
- M
sqlite/sqlite/src/commonMain/kotlin/androidx/sqlite/SQLite.kt
- M
sqlite/sqlite/src/commonMain/kotlin/androidx/sqlite/SQLiteConnection.kt
- M
sqlite/sqlite/src/commonMain/kotlin/androidx/sqlite/SQLiteStatement.kt
Hash: 62cf305b742fc901c10da7d435f77d2a38f9d67e
Date: Mon Dec 16 11:39:49 2024
jo...@gmail.com <jo...@gmail.com> #7
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.room:room-common:2.7.0-alpha13
androidx.room:room-common-iosarm64:2.7.0-alpha13
androidx.room:room-common-iossimulatorarm64:2.7.0-alpha13
androidx.room:room-common-iosx64:2.7.0-alpha13
androidx.room:room-common-jvm:2.7.0-alpha13
androidx.room:room-common-linuxarm64:2.7.0-alpha13
androidx.room:room-common-linuxx64:2.7.0-alpha13
androidx.room:room-common-macosarm64:2.7.0-alpha13
androidx.room:room-common-macosx64:2.7.0-alpha13
androidx.room:room-compiler:2.7.0-alpha13
androidx.room:room-compiler-processing:2.7.0-alpha13
androidx.room:room-ktx:2.7.0-alpha13
androidx.room:room-migration:2.7.0-alpha13
androidx.room:room-migration-iosarm64:2.7.0-alpha13
androidx.room:room-migration-iossimulatorarm64:2.7.0-alpha13
androidx.room:room-migration-iosx64:2.7.0-alpha13
androidx.room:room-migration-jvm:2.7.0-alpha13
androidx.room:room-migration-linuxarm64:2.7.0-alpha13
androidx.room:room-migration-linuxx64:2.7.0-alpha13
androidx.room:room-migration-macosarm64:2.7.0-alpha13
androidx.room:room-migration-macosx64:2.7.0-alpha13
androidx.room:room-paging:2.7.0-alpha13
androidx.room:room-paging-android:2.7.0-alpha13
androidx.room:room-paging-guava:2.7.0-alpha13
androidx.room:room-paging-iosarm64:2.7.0-alpha13
androidx.room:room-paging-iossimulatorarm64:2.7.0-alpha13
androidx.room:room-paging-iosx64:2.7.0-alpha13
androidx.room:room-paging-jvm:2.7.0-alpha13
androidx.room:room-paging-linuxarm64:2.7.0-alpha13
androidx.room:room-paging-linuxx64:2.7.0-alpha13
androidx.room:room-paging-macosarm64:2.7.0-alpha13
androidx.room:room-paging-macosx64:2.7.0-alpha13
androidx.room:room-paging-rxjava2:2.7.0-alpha13
androidx.room:room-paging-rxjava3:2.7.0-alpha13
androidx.room:room-runtime:2.7.0-alpha13
androidx.room:room-runtime-android:2.7.0-alpha13
androidx.room:room-runtime-iosarm64:2.7.0-alpha13
androidx.room:room-runtime-iossimulatorarm64:2.7.0-alpha13
androidx.room:room-runtime-iosx64:2.7.0-alpha13
androidx.room:room-runtime-jvm:2.7.0-alpha13
androidx.room:room-runtime-linuxarm64:2.7.0-alpha13
androidx.room:room-runtime-linuxx64:2.7.0-alpha13
androidx.room:room-runtime-macosarm64:2.7.0-alpha13
androidx.room:room-runtime-macosx64:2.7.0-alpha13
androidx.room:room-rxjava2:2.7.0-alpha13
androidx.room:room-rxjava3:2.7.0-alpha13
androidx.room:room-testing:2.7.0-alpha13
androidx.room:room-testing-android:2.7.0-alpha13
androidx.room:room-testing-iosarm64:2.7.0-alpha13
androidx.room:room-testing-iossimulatorarm64:2.7.0-alpha13
androidx.room:room-testing-iosx64:2.7.0-alpha13
androidx.room:room-testing-jvm:2.7.0-alpha13
androidx.room:room-testing-linuxarm64:2.7.0-alpha13
androidx.room:room-testing-linuxx64:2.7.0-alpha13
androidx.room:room-testing-macosarm64:2.7.0-alpha13
androidx.room:room-testing-macosx64:2.7.0-alpha13
androidx.sqlite:sqlite:2.5.0-alpha13
androidx.sqlite:sqlite-android:2.5.0-alpha13
androidx.sqlite:sqlite-bundled:2.5.0-alpha13
androidx.sqlite:sqlite-bundled-android:2.5.0-alpha13
androidx.sqlite:sqlite-bundled-iosarm64:2.5.0-alpha13
androidx.sqlite:sqlite-bundled-iossimulatorarm64:2.5.0-alpha13
androidx.sqlite:sqlite-bundled-iosx64:2.5.0-alpha13
androidx.sqlite:sqlite-bundled-jvm:2.5.0-alpha13
androidx.sqlite:sqlite-bundled-linuxarm64:2.5.0-alpha13
androidx.sqlite:sqlite-bundled-linuxx64:2.5.0-alpha13
androidx.sqlite:sqlite-bundled-macosarm64:2.5.0-alpha13
androidx.sqlite:sqlite-bundled-macosx64:2.5.0-alpha13
androidx.sqlite:sqlite-framework:2.5.0-alpha13
androidx.sqlite:sqlite-framework-android:2.5.0-alpha13
androidx.sqlite:sqlite-framework-iosarm64:2.5.0-alpha13
androidx.sqlite:sqlite-framework-iossimulatorarm64:2.5.0-alpha13
androidx.sqlite:sqlite-framework-iosx64:2.5.0-alpha13
androidx.sqlite:sqlite-framework-linuxarm64:2.5.0-alpha13
androidx.sqlite:sqlite-framework-linuxx64:2.5.0-alpha13
androidx.sqlite:sqlite-framework-macosarm64:2.5.0-alpha13
androidx.sqlite:sqlite-framework-macosx64:2.5.0-alpha13
androidx.sqlite:sqlite-iosarm64:2.5.0-alpha13
androidx.sqlite:sqlite-iossimulatorarm64:2.5.0-alpha13
androidx.sqlite:sqlite-iosx64:2.5.0-alpha13
androidx.sqlite:sqlite-jvm:2.5.0-alpha13
androidx.sqlite:sqlite-ktx:2.5.0-alpha13
androidx.sqlite:sqlite-linuxarm64:2.5.0-alpha13
androidx.sqlite:sqlite-linuxx64:2.5.0-alpha13
androidx.sqlite:sqlite-macosarm64:2.5.0-alpha13
androidx.sqlite:sqlite-macosx64:2.5.0-alpha13
ja...@gmail.com <ja...@gmail.com> #8
Hi joanpu...@gmail.com, as you can see the change https://android-review.googlesource.com/#/c/30921/ has been merged into the source code repository.
However the merged happened so late that it didnt make it into official Android 4.1 and thereforehttp://developer.android.com/reference/android/app/Application.html#onCreate() still doesent show the change.
However, from Android 4.2 the documentation should be the updated version.
However the merged happened so late that it didnt make it into official Android 4.1 and therefore
However, from Android 4.2 the documentation should be the updated version.
pv...@gmail.com <pv...@gmail.com> #9
>there are some cases of application objects accessing a content provider during
init
Could you point at what kind of situations?
init
Could you point at what kind of situations?
vi...@gmail.com <vi...@gmail.com> #10
What about multidex applications?
This can create problems if the ContentProvider class is not able to find classes from other dex files.
This can create problems if the ContentProvider class is not able to find classes from other dex files.
Description
1. Create an application that has the following:
- A subclass of Application with a log message in the onCreate() method
- A subclass of ContentProvider with a log message in the onCreate() method
- A simple "Hello World" activity.
2. Install the application and launch the Hello World Activity
3. Look at the logcat output
RESULTS
Actual: ContentProvider.onCreate() is called before Application.onCreate(). The logcat output from
the steps above would be:
I/ActivityManager( 92): Starting activity: Intent { act=android.intent.action.MAIN
cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.test/.TestActivity }
I/ActivityManager( 92): Start proc com.test for activity com.test/.TestActivity: pid=21831
uid=10074 gids={1015}
I/ActivityThread(21831): Publishing provider .TestContentProvider: com.test.TestContentProvider
D/[Test] (21831): Creating the ContentProvider
D/[Test] (21831): Creating the application
Expected: Application.onCreate() should always be the FIRST object created
REGRESSION
This appears to be long-standing bug, as it reproduces under Android 1.6, 2.0.1-update1, and 2.2.
NOTES
A simple example is attached.