Status Update
Comments
el...@google.com <el...@google.com>
yw...@gmail.com <yw...@gmail.com> #2
Project: platform/frameworks/support
Branch: androidx-main
Author: Daniel Santiago Rivera <
Link:
Use Context.getDatabasePath() when a driver is configured.
Expand for full commit details
Use Context.getDatabasePath() when a driver is configured.
This helps users migrating to driver APIs that use simple database names and expect Room to figure out the directory to store the database, for which the SupportSQLiteOpenHelper is responsible off when no driver is used.
Since getDatabasePath() does some IO, a hook for the driver wrapper in the base connection manager was added so that the file name could be resolved, lazily and in the background thread where the connection is being opened.
Lastly, if a bad path is used, a more proper error will be thrown instead of an obscure 'can't create file lock' since creating a file lock will first be attempted before actually creating / opening the actual database.
Bug: 377830104
Test: BuilderTest
Change-Id: I833154e2855a38520e5a0e8c802964bd455000e8
Files:
- M
room/integration-tests/multiplatformtestapp/src/androidInstrumentedTest/kotlin/androidx/room/integration/multiplatformtestapp/test/BuilderTest.kt
- M
room/room-runtime/src/androidMain/kotlin/androidx/room/RoomConnectionManager.android.kt
- M
room/room-runtime/src/commonMain/kotlin/androidx/room/RoomConnectionManager.kt
- M
room/room-runtime/src/commonMain/kotlin/androidx/room/concurrent/ExclusiveLock.kt
Hash: 35ddf21c6ede1af577d2d20b96107e04988b04e0
Date: Fri Jan 17 15:42:06 2025
da...@google.com <da...@google.com> #3
The following release(s) address this bug.It is possible this bug has only been partially addressed:
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
ap...@google.com <ap...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-main
Author: Daniel Santiago Rivera <
Link:
Configure the schema asset android copy task within its register block and not within AGP's wiredWith lambda.
Expand for full commit details
Configure the schema asset android copy task within its register block and not within AGP's wiredWith lambda.
Otherwise the tasks inputs are locked by the time the wiredWith lambda passed to addGeneratedSourceDirector() is invoked and will lead to "property 'inputDirectory' is final and cannot be changed any further".
Bug: 376071291
Test: Manual with sample repro app
Change-Id: I2c9da4855cd31d7df3276424546aba4c53edf7ea
Files:
- M
room/room-gradle-plugin/src/main/java/androidx/room/gradle/integration/AndroidPluginIntegration.kt
Hash: 1dbb4c1876e1e8a8e930bec4625741ac6dc05a0b
Date: Thu Dec 05 14:21:51 2024
da...@google.com <da...@google.com>
[Deleted User] <[Deleted User]> #5
tasks.matching { it.name.startsWith("copyRoomSchemasToAndroidTestAssetsDebugAndroidTest") }.configureEach {
enabled = false
}
But I believe this is not the right thing to do, since I'm hiding the error. Is there another way to solve it or will the library be updated to fix it?
da...@google.com <da...@google.com> #6
Unfortunately the fix did not make it to the alpha12 release, but it will indeed be in the next release.
ri...@ffw.com <ri...@ffw.com> #7
When will this be released? It's more than a month now?
da...@google.com <da...@google.com> #8
Sorry for the delay - Next androidx release is January 29
na...@google.com <na...@google.com> #9
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.room:room-gradle-plugin:2.7.0-alpha13
Description
Version used: 2.7.0-alpha08 to latest 2.7.0-alpha10
Devices/Android versions reproduced on: sdk 35
The Room compiler produces this build error:
Execution failed for task ':app:mergeDebugAndroidTestAssets'.
> The value for task ':app:copyRoomSchemasToAndroidTestAssetsDebugAndroidTest' property 'inputDirectory' is final and cannot be changed any further.
Reverting to Room version 2.7.0-alpha07 solves the issue.
I'm attaching a sample project that reproduces the error. Note that the error happens only by cleaning the build folder beforehand; the first full build with the "Make module" button runs "assembleDebug" and "assembleDebug...Test" tasks but from the second build it only runs "assembleDebug", so the build succeeds.