Status Update
Comments
ap...@google.com <ap...@google.com> #2
Branch: androidx-master-dev
commit b90079595f33f58fece04026a97faa0d243acdb1
Author: Yuichi Araki <yaraki@google.com>
Date: Wed Sep 18 16:55:49 2019
Change the way to detect mismatch between POJO and query
This fixes cursor mismatch warnings with expandProjection.
Bug: 140759491
Test: QueryMethodProcessorTest
Change-Id: I7659002e5e0d1ef60fc1af2a625c0c36da0664d8
M room/compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/compiler/src/main/kotlin/androidx/room/solver/query/result/PojoRowAdapter.kt
M room/compiler/src/test/kotlin/androidx/room/processor/QueryMethodProcessorTest.kt
M room/compiler/src/test/kotlin/androidx/room/testing/TestProcessor.kt
ap...@google.com <ap...@google.com> #3
ap...@google.com <ap...@google.com> #4
Branch: androidx-master-dev
commit bdde5a1a970ddc9007b28de4aa29d60ffa588f08
Author: Yigit Boyar <yboyar@google.com>
Date: Thu Apr 16 16:47:05 2020
Re-factor how errors are dismissed when query is re-written
This CL changes how we handle errors/warnings if query is
re-written.
There was a bug in expandProjection where we would report warnings
for things that Room already fixes automatically (
The solution to that problem (I7659002e5e0d1ef60fc1af2a625c0c36da0664d8)
solved it by deferring validating of columns until after re-write
decision is made. Unfortunately, this required changing PojoRowAdapter
to have a dummy mapping until it is validating, make it hard to use
as it does have a non-null mapping which is not useful.
This CL partially reverts that change and instead rely on the log
deferring logic we have in Context. This way, we don't need to break
the stability of PojoRowAdapter while still having the ability to
drop warnings that room fixes. This will also play nicer when we
have different query re-writing options that can use more information
about the query results.
Bug: 153387066
Bug: 140759491
Test: existing tests pass
Change-Id: I2ec967c763d33d7a3ff02c1a13c6953b460d1e5f
M room/compiler/src/main/kotlin/androidx/room/log/RLog.kt
M room/compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/compiler/src/main/kotlin/androidx/room/solver/query/result/PojoRowAdapter.kt
ap...@google.com <ap...@google.com> #5
Branch: androidx-main
commit ac841509bd4b19ac733e0476f8644963f59b6b51
Author: clarafok <clarafok@google.com>
Date: Fri Mar 25 14:17:02 2022
Rename savedState Recreator.java to .kt
Part of the kotlinification process of SavedState library.
Test: ./gradlew bOS
Bug: 220191285
Change-Id: I2834985b38fb8808733f1c41bfc9e29845be5485
M savedstate/savedstate/src/main/java/androidx/savedstate/Recreator.kt
ap...@google.com <ap...@google.com> #6
Branch: androidx-main
commit d19eb133d99947e3759464e781b1b932dd220184
Author: clarafok <clarafok@google.com>
Date: Mon Mar 28 17:05:01 2022
Update SavedStateRegistryOwner use in Compose UI
Part of the kotlinification process of SavedState library. Necessary
change to pass max_dep_version test
Test: ./gradlew compose:ui:ui-tooling:cC
Test: ./gradlew compose:ui:ui:cC
Bug: 220191285
Change-Id: I52769a5a1ce4e3e0636f3662db56528e0d0c036b
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/platform/DisposableSaveableStateRegistryTest.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/viewinterop/AndroidViewTest.kt
M compose/ui/ui-tooling/build.gradle
M compose/ui/ui-tooling/src/androidMain/kotlin/androidx/compose/ui/tooling/ComposeViewAdapter.kt
M compose/ui/ui/build.gradle
ap...@google.com <ap...@google.com> #7
Branch: androidx-main
commit 5028da7dc76757d75fb1d874a44836565dfb8410
Author: clarafok <clarafok@google.com>
Date: Thu Mar 24 12:05:30 2022
Update SavedStateRegistryOwner test class in Lifecycle
Part of the kotlinification process of SavedState library. Necessary
update to pass max_dep_versions test
Test: ./gradlew lifecycle:lifecycle-viewmodel-savedstate:cC
Bug: 220191285
Change-Id: I407317a471ff860340522f653ddbbb181fa65a22
M lifecycle/lifecycle-viewmodel-savedstate/src/androidTest/java/androidx/lifecycle/viewmodel/savedstate/TestComponent.kt
ap...@google.com <ap...@google.com> #8
Branch: androidx-main
commit 8c2885e747b132e2d0114ac031cc16169a5173d6
Author: clarafok <clarafok@google.com>
Date: Thu Mar 24 12:03:31 2022
Converted SavedStateRegistryOwner to Kotlin
Part of the kotlinification process of SavedState library.
SavedStateRegistryOwner is converted into Kotlin with source-incompatible changes. Dependencies in navigation, lifecycle-viewmodel-savedstate, and compose ui is updated to use latest SavedStateRegistryOwner.
Test: ./gradlew savedstate:savedState:cC
Test: ./gradlew savedstate:savedState-ktx:cC
Test: ./gradlew navigation:navigation-common:test
Test: ./gradlew navigation:navigation-common:cC
Bug: 220191285
Relnote: "`SavedStateRegistryOwner` is now in Kotlin. `SavedStateRegistry`
is now a property of `SaveStateRegistryOwner` for kotlin users which needs to be overridden via
overriding the property's default get() accessor."
Change-Id: I91fc991e6fdb11ea558a7158f319cfea4aae1e64
M savedstate/savedstate/api/restricted_current.txt
M navigation/navigation-common/api/restricted_current.txt
M savedstate/savedstate/src/main/java/androidx/savedstate/SavedStateRegistryOwner.kt
M savedstate/savedstate/api/current.txt
M navigation/navigation-common/api/public_plus_experimental_current.txt
M savedstate/savedstate/src/androidTest/java/androidx/savedstate/SavedStateRegistryTest.kt
M navigation/navigation-common/api/current.txt
M savedstate/savedstate-ktx/src/androidTest/java/androidx/savedstate/ViewTreeSavedStateRegistryOwnerTest.kt
M savedstate/savedstate/api/public_plus_experimental_current.txt
M navigation/navigation-common/src/main/java/androidx/navigation/NavBackStackEntry.kt
ap...@google.com <ap...@google.com> #9
Branch: androidx-main
commit 6d15b0171dfefdc911f9eda905855cebbd8da231
Author: clarafok <clarafok@google.com>
Date: Wed Mar 30 16:55:50 2022
Update ViewTreeSavedStateRegistryOwner use in Compose UI
Part of the kotlinification process of SavedState library. Necessary
change to pass max_dep_version test
Test: ./gradlew compose:ui:ui-tooling:cC
Test: ./gradlew compose:ui:ui:cC
Test: ./gradlew compose:material:material:cC
Test: ./gradlew compose:material3:material3:cC
Bug: 220191285
Change-Id: I828e8c8c9568ded7451a58b1ac14ef6c713c5267
M compose/material3/material3/src/androidMain/kotlin/androidx/compose/material3/internal/ExposedDropdownMenuPopup.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/viewinterop/AndroidViewHolder.android.kt
M compose/material/material/src/androidMain/kotlin/androidx/compose/material/internal/ExposedDropdownMenuPopup.kt
M compose/ui/ui-tooling/src/androidMain/kotlin/androidx/compose/ui/tooling/ComposeViewAdapter.kt
M compose/ui/ui/build.gradle
M compose/material3/material3/build.gradle
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/owners/SavedStateRegistryOwnerInFragmentTest.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/viewinterop/AndroidViewTest.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeView.android.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/window/AndroidDialog.android.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/window/AndroidPopup.android.kt
M activity/activity-compose/src/main/java/androidx/activity/compose/ComponentActivity.kt
ap...@google.com <ap...@google.com> #10
Branch: androidx-main
commit a40f4099e3f1cdc01f454fca93ff387e6bd2bc15
Author: clarafok <clarafok@google.com>
Date: Fri Apr 01 16:41:59 2022
Convert ViewTreeSavedStateRegistryOwnerTest to kotlin
Replace this test file with its identical but kotlin version from
savedstate-ktx.
Remove duplicated ViewTreeSavedStateRegistryOwnerTest from
savedstate-ktx
Test: ./gradlew savedstate:savedstate:cC
Bug: 220191285
Change-Id: Id2b78e0066526fcf8320246dad7160611a68c2b8
M savedstate/savedstate/src/androidTest/java/androidx/savedstate/ViewTreeSavedStateRegistryOwnerTest.kt
D savedstate/savedstate-ktx/src/androidTest/java/androidx/savedstate/ViewTreeSavedStateRegistryOwnerTest.kt
ap...@google.com <ap...@google.com> #11
Branch: androidx-main
commit a870e08c713c95aec3740267dd4a606ec224b457
Author: clarafok <clarafok@google.com>
Date: Tue Mar 29 14:01:51 2022
Rename ViewTreeSavedStateRegistryOwnerTest from .java to .kt
Test: ./gradlew bOS
Bug: 220191285
Change-Id: I4ca05fe6b69c7c02084243175021692611d0c66d
M savedstate/savedstate/src/androidTest/java/androidx/savedstate/ViewTreeSavedStateRegistryOwnerTest.kt
ap...@google.com <ap...@google.com> #12
Branch: androidx-main
commit 018966e693e2dd8e0930ed24eb63e9c851548c6c
Author: clarafok <clarafok@google.com>
Date: Fri Apr 01 16:44:09 2022
Convert ViewTreeSavedStateRegistryOwner to Kotlin
Deprecated helper function `View.findViewTreeSavedStateRegistryOwner()
from savedstate-ktx. Replaced with `View.getViewTreeSavedStateRegistryOwner()` from
`ViewTreeSavedStateRegistryOwner`
Test: ./gradlew checkApi all existing test pass
Bug: 220191285
RelNote: "ViewTreeSavedStateRegistryOwner in SavedState module is now in Kotlin.
Its new `View.findViewTreeSavedStateRegistryOwner()` has replaced the
one from View.kt which is now deprecated"
Change-Id: Ib9cbcc89c1973ea3ee9f554797afdb7763d52d52
M savedstate/savedstate/api/restricted_current.txt
M fragment/fragment/src/androidTest/java/androidx/fragment/app/FragmentViewLifecycleTest.kt
A savedstate/savedstate-ktx/api/current.ignore
M savedstate/savedstate/src/main/java/androidx/savedstate/ViewTreeSavedStateRegistryOwner.kt
A savedstate/savedstate-ktx/api/restricted_current.ignore
M fragment/fragment/src/androidTest/java/androidx/fragment/app/DialogFragmentViewTreeTest.kt
M savedstate/savedstate/api/public_plus_experimental_current.txt
M lifecycle/lifecycle-viewmodel-compose/src/androidTest/java/androidx/lifecycle/viewmodel/compose/ViewModelTest.kt
M savedstate/savedstate-ktx/api/current.txt
M activity/activity/src/androidTest/java/androidx/activity/ContentViewTest.kt
M savedstate/savedstate-ktx/api/restricted_current.txt
M savedstate/savedstate-ktx/src/main/java/androidx/savedstate/View.kt
M savedstate/savedstate/api/current.txt
M appcompat/appcompat/src/androidTest/java/androidx/appcompat/app/AppCompatActivityViewTreeTest.kt
M savedstate/savedstate-ktx/api/public_plus_experimental_current.txt
ap...@google.com <ap...@google.com> #13
Branch: androidx-main
commit dba2e248a6bd937753f8d12b7773c66acf85f297
Author: clarafok <clarafok@google.com>
Date: Fri Mar 25 15:56:56 2022
Rename ViewTreeSavedStateRegistryOwner from .java to .kt
Part of the kotlinification process of SavedState module.
Test: ./gradlew bOS
Bug: 220191285
Change-Id: I8197bf608a47b24a5a1698dfe4e89245e3b53d0b
M savedstate/savedstate/src/main/java/androidx/savedstate/ViewTreeSavedStateRegistryOwner.kt
ap...@google.com <ap...@google.com> #14
Branch: androidx-main
commit 6988752101f25dd03bdd3dd258c76764e7ed68db
Author: clarafok <clarafok@google.com>
Date: Thu Mar 31 16:10:28 2022
Convert SavedStateRegistry to Kotlin
Part of the kotlinification of SavedState module.
Test: ./gradlew checkApi all existing test pass
Bug: 220191285
Relnote: "SavedStateRegistry is now in Kotlin"
Change-Id: I2539228cdbb20892cb71dcc8f4fecc31cede9486
M savedstate/savedstate/api/restricted_current.txt
M savedstate/savedstate/api/current.txt
M savedstate/savedstate/src/main/java/androidx/savedstate/SavedStateRegistry.kt
M savedstate/savedstate/api/public_plus_experimental_current.txt
ap...@google.com <ap...@google.com> #15
Branch: androidx-main
commit 63fa258d9dc6350e9279346b826f1b659d7f93b2
Author: clarafok <clarafok@google.com>
Date: Wed Mar 30 12:04:15 2022
Rename SavedStateRegistry.java to .kt
Part of the kotlinification process of SavedState library.
Test: ./gradlew bOS
Bug: 220191285
Change-Id: Ifbbdb470308b7bc339344f70fbf90736b72da52a
M savedstate/savedstate/src/main/java/androidx/savedstate/SavedStateRegistry.kt
cl...@google.com <cl...@google.com>
ag...@google.com <ag...@google.com> #16
This change showed up on an androidx roll in Chrome as a sizeable binary size increase (our bots flag any commits > 16kb).
It's hard to justify binary size increases for pure refactorings. Would you be able to look into this and try and eliminate the regression? If there were new features being added here, please just let me know.
Here's the size breakdown:
One thing that popped out to me is that saveState
went from ~16 bytes to >1kb (within diff, filter for saveState
, then click the symbol and click "Show Disassembly" to see what might be the cause).
cl...@google.com <cl...@google.com>
ap...@google.com <ap...@google.com> #17
Branch: androidx-main
commit 83bd33c1398b25c262bc243dd2eaf19e9aa49c59
Author: clarafok <clarafok@google.com>
Date: Mon Apr 11 11:03:06 2022
Fix Recreator.kt binary size increase
Size increased from 16b to 1kb within #saveState when switched to
bundleOf() which creates a new Pair object.
Refactored to use Bundle() instead.
Test: ./gradlew checkApi all existing test pass
Test: ./gradlew savedstate:savedstate:cC
Fixes: 220191285
Change-Id: I2edad8504ec506b0a227bfbebf7dc43ff2cad89d
M savedstate/savedstate/src/main/java/androidx/savedstate/Recreator.kt
ag...@google.com <ag...@google.com> #18
Thanks!
Description
Thanks to Lifecycle, all of the libraries that depend on the
SavedState
module up stream now have a Kotlin dependency.It should be relatively straightforward to land SavedState in Kotlin and it would be a first step toward making the library be KMP.