Status Update
Comments
ap...@google.com <ap...@google.com> #2
For Kotlin 2.0 and KSP 2.0 the Cannot change attributes of configuration ':composeApp:debugFrameworkIosX64' after it has been locked for mutation
really seems like a KSP issue. You should file a bug in their repository with a sample app if possible.
If you downgrade to Kotlin 1.9 then things 'should' work, there are example apps out there with such configuration, like the following one:
da...@google.com <da...@google.com>
do...@traveloka.com <do...@traveloka.com> #3
Will try to use the example provided by you to check if it fixes the issue.
da...@google.com <da...@google.com> #4
Note that this issue happens when applying the Compose, KSP and Room Plugin together in Kotlin 2.0.x, the workaround for now is to not use the Room Gradle Plugin and instead specify the schema location vis KSP arguments:
// In the build.gradle
ksp {
arg("room.schemaLocation", "${projectDir}/schemas")
}
do...@traveloka.com <do...@traveloka.com> #5
Hi, I encountered a similar problem and was able to resolve it by updating the dependencies
room = "2.7.0-alpha08"
ksp = "2.0.20-1.0.25"
compose-plugin = "1.6.11"
kotlin = "2.0.20"
[Deleted User] <[Deleted User]> #6
da...@google.com <da...@google.com> #7
Hey, thank you so much for the reproducible project. The legacy hash is based on CREATE statements and it looks like that our backwards compatibility logic missed a detail.
In Room 2.2.0 we updated the CREATE INDEX statement to also included IF NOT EXSIST. We remove the latter section when calculating the legacy hash, buuuut turns out that the previous CREATE INDEX statement had two spaces between the CREATE and INDEX words, while the updated statement along with the backward compatibility adjustment makes it have one, causing the hash to be different.
I'll try to fix this soon, might end up in a Room 2.2.3 release.
da...@google.com <da...@google.com>
ap...@google.com <ap...@google.com> #8
Branch: androidx-master-dev
commit 40e267943a2398b9e4177f2642f9577455821ff6
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Thu Dec 05 09:02:11 2019
Leave extra space between CREATE and INDEX in legacy hash calculation.
When calculating the legacy hash not only must IF NOT EXISTS be removed
from the CREATE INDEX statement, but an extra space has to be preserved
since versions of Room before 2.2 had such typo and is considered
during legacy hash calculations.
Bug: 139306173
Test: ./gradlew vo.DatabaseTest
Change-Id: If1d9ad8f57b4953fb41f938d00a70199038e2266
M room/compiler/src/main/kotlin/androidx/room/vo/Database.kt
M room/compiler/src/test/kotlin/androidx/room/vo/DatabaseTest.kt
Description