Fixed
Status Update
Comments
il...@google.com <il...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit 10279986f24d1648952e740ea38c72b7bc44fdc7
Author: Elif Bilgin <elifbilgin@google.com>
Date: Tue Oct 26 16:59:42 2021
Resolving auto migration issue where SQLite keywords are failed to be escaped in column names.
The issue was arising from the part of AutoMigrationWriter generating code to transfer data from the old table to the new table, preserving the order of the columns. The SQL statement used did not utilize `` to escape the column names, resulting in a compiler error in scenarios where a SQLite keyword was being used as a column name.
Issue was repro'd in the tests by using the column name "index" and confirming the escape is working as expected with the new changes.
Test: AutoMigrationTest.java
Bug: 197133152
Change-Id: Idbed488acb2027fb1c0d9c302d1cc83ed5bfba2c
M room/room-compiler/src/main/kotlin/androidx/room/writer/AutoMigrationWriter.kt
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/migration/AutoMigrationDb.java
M room/integration-tests/testapp/schemas/androidx.room.integration.testapp.migration.AutoMigrationDb/1.json
https://android-review.googlesource.com/1870037
Branch: androidx-main
commit 10279986f24d1648952e740ea38c72b7bc44fdc7
Author: Elif Bilgin <elifbilgin@google.com>
Date: Tue Oct 26 16:59:42 2021
Resolving auto migration issue where SQLite keywords are failed to be escaped in column names.
The issue was arising from the part of AutoMigrationWriter generating code to transfer data from the old table to the new table, preserving the order of the columns. The SQL statement used did not utilize `` to escape the column names, resulting in a compiler error in scenarios where a SQLite keyword was being used as a column name.
Issue was repro'd in the tests by using the column name "index" and confirming the escape is working as expected with the new changes.
Test: AutoMigrationTest.java
Bug: 197133152
Change-Id: Idbed488acb2027fb1c0d9c302d1cc83ed5bfba2c
M room/room-compiler/src/main/kotlin/androidx/room/writer/AutoMigrationWriter.kt
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/migration/AutoMigrationDb.java
M room/integration-tests/testapp/schemas/androidx.room.integration.testapp.migration.AutoMigrationDb/1.json
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 081112f1ba20684bebf5dcace0b9bdc39a403d90
Author: Ian Lake <ilake@google.com>
Date: Wed Jun 10 17:18:57 2020
Add FragmentScenario.withFragment for returning a result
Provide an alternative to onFragment for Kotlin
users in withActivity. withActivity notably returns
a result and rethrows any exceptions raised in the
given block.
Test: new FragmentScenarioTest tests
BUG: 158697631
Change-Id: If28636adc7c54e9fa7e92f1992323b1b270222be
M fragment/fragment-testing/api/1.3.0-alpha07.txt
M fragment/fragment-testing/api/current.txt
M fragment/fragment-testing/api/public_plus_experimental_1.3.0-alpha07.txt
M fragment/fragment-testing/api/public_plus_experimental_current.txt
M fragment/fragment-testing/api/restricted_1.3.0-alpha07.txt
M fragment/fragment-testing/api/restricted_current.txt
M fragment/fragment-testing/src/androidTest/java/androidx/fragment/app/testing/FragmentScenarioTest.kt
M fragment/fragment-testing/src/main/java/androidx/fragment/app/testing/FragmentScenario.kt
https://android-review.googlesource.com/1330480
Branch: androidx-master-dev
commit 081112f1ba20684bebf5dcace0b9bdc39a403d90
Author: Ian Lake <ilake@google.com>
Date: Wed Jun 10 17:18:57 2020
Add FragmentScenario.withFragment for returning a result
Provide an alternative to onFragment for Kotlin
users in withActivity. withActivity notably returns
a result and rethrows any exceptions raised in the
given block.
Test: new FragmentScenarioTest tests
BUG: 158697631
Change-Id: If28636adc7c54e9fa7e92f1992323b1b270222be
M fragment/fragment-testing/api/1.3.0-alpha07.txt
M fragment/fragment-testing/api/current.txt
M fragment/fragment-testing/api/public_plus_experimental_1.3.0-alpha07.txt
M fragment/fragment-testing/api/public_plus_experimental_current.txt
M fragment/fragment-testing/api/restricted_1.3.0-alpha07.txt
M fragment/fragment-testing/api/restricted_current.txt
M fragment/fragment-testing/src/androidTest/java/androidx/fragment/app/testing/FragmentScenarioTest.kt
M fragment/fragment-testing/src/main/java/androidx/fragment/app/testing/FragmentScenario.kt
il...@google.com <il...@google.com> #4
This has been fixed internally and will be available in Fragment 1.3.0-alpha07
.
Description
Component used: fragment-testing
It would be great to have a
FragmentScenario.withFragment()
extension function which has equivalent capabilities toActivityScenario.withActivity()
(return value, caching and rethrowing of exceptions).If it's helpful, I have added this to one of my tests here . It is a direct port of
ActivityScenario.withActivity()
, so I'm not sure if I'm missing any fragment-specific considerations, but it has been working for my use case.