Status Update
Comments
lp...@google.com <lp...@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
jl...@google.com <jl...@google.com>
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
lp...@google.com <lp...@google.com> #5
Not entirely sure what is wrong, but I think there might be some problem with the implementation of InspectableModifierImpl
- in my CL to migrate some unnecessary Modifier.composed usages to Modifier.inspectable I'm running into test failures.
If you revert the changes to Modifier.shadow, then these tests seem to pass again - so maybe there is some problem with the folding logic.
I tried adding some logging code to see what is going on, printing the layout node wrapper chain shows the following:
With composed:
[androidx.compose.ui.node.ModifiedLayoutNode@f2be456, androidx.compose.ui.input.nestedscroll.NestedScrollDelegatingWrapper@5c69cd7, androidx.compose.ui.node.PointerInputDelegatingWrapper@ea479c4, androidx.compose.ui.semantics.SemanticsWrapper@ab9c0ad id: 3 config: SemanticsConfiguration@f6e2f73{ Expand : AccessibilityAction(label=null, action=Function0<java.lang.Boolean>) }, androidx.compose.ui.node.ModifiedLayoutNode@a516e30, androidx.compose.ui.node.ModifiedDrawNode@d5ebaa9, androidx.compose.ui.node.ModifiedLayoutNode@5eb282e, androidx.compose.ui.semantics.SemanticsWrapper@cf24fcf id: 4 config: SemanticsConfiguration@0973d5c{ }, androidx.compose.ui.node.PointerInputDelegatingWrapper@63f5865]
With inspectable:
[androidx.compose.ui.node.ModifiedLayoutNode@f2be456, androidx.compose.ui.input.nestedscroll.NestedScrollDelegatingWrapper@5c69cd7, androidx.compose.ui.node.PointerInputDelegatingWrapper@ea479c4, androidx.compose.ui.semantics.SemanticsWrapper@ab9c0ad id: 3 config: SemanticsConfiguration@848c743{ Expand : AccessibilityAction(label=null, action=Function0<java.lang.Boolean>) }, androidx.compose.ui.node.ModifiedLayoutNode@a516e30, androidx.compose.ui.node.ModifiedLayoutNode@d5ebaa9, androidx.compose.ui.node.ModifiedLayoutNode@5eb282e, androidx.compose.ui.input.nestedscroll.NestedScrollDelegatingWrapper@cf24fcf, androidx.compose.ui.node.PointerInputDelegatingWrapper@973d5c, androidx.compose.ui.semantics.SemanticsWrapper@63f5865 id: 4 config: SemanticsConfiguration@48571c0{ Expand : AccessibilityAction(label=null, action=Function0<java.lang.Boolean>) }, androidx.compose.ui.node.ModifiedLayoutNode@8ee19eb, androidx.compose.ui.node.ModifiedDrawNode@8d348, androidx.compose.ui.node.ModifiedLayoutNode@5d215e1, androidx.compose.ui.semantics.SemanticsWrapper@a240f06 id: 5 config: SemanticsConfiguration@ffa1ef9{ }, androidx.compose.ui.node.PointerInputDelegatingWrapper@b7bdbf4]
So naively it looks like we are adding things twice. It might be a good idea to add a test for the folding logic in any case, since we are overriding it and doing something special here.
ap...@google.com <ap...@google.com> #6
Branch: androidx-main
commit ed0f91bff603994abc7102301310bf452d9e1637
Author: Jens Ole Lauridsen <jlauridsen@google.com>
Date: Wed Aug 25 09:14:36 2021
Redo the implementation of inspectable
The foldIn and foldOut logic did not work well when combined with
composed modifiers which implementation is calling foldIn repeatedly.
Instead use a start and end marker in the list of Modifier elements.
This fixes a set of tests that would fail with the earlier
implementation.
Bug: 191017532
Test: Fixes existing tests after using inspectable
Relnote: Redo implementation of inspectable
Change-Id: I927bc731712d81f47aefdf946f778047c7645b26
M compose/ui/ui-inspection/src/main/java/androidx/compose/ui/inspection/inspector/ParameterFactory.kt
M compose/ui/ui/api/current.txt
M compose/ui/ui/api/public_plus_experimental_current.txt
M compose/ui/ui/api/restricted_current.txt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/platform/InspectableValueTest.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/platform/InspectableValue.kt
ap...@google.com <ap...@google.com> #7
Branch: androidx-main
commit fd22208ed7a4d4b9978e55d2547b6762a41210ef
Author: Jens Ole Lauridsen <jlauridsen@google.com>
Date: Mon Aug 23 14:22:53 2021
Do not include preceding modifiers in wrapped inspectable
Bug: 191017532
Test: Fixes existing tests after using inspectable
Relnote: Changed parameter name of inspectable to match composed
Change-Id: I3a482c9f64ef0f7cc5a5a59cecaec010ca001e3f
M compose/ui/ui/api/current.txt
M compose/ui/ui/api/public_plus_experimental_current.txt
M compose/ui/ui/api/restricted_current.txt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/platform/InspectableValue.kt
ap...@google.com <ap...@google.com> #8
Branch: androidx-main
commit e5a77235e4d05b3d0690ee9f3c8297a34ebc17ef
Author: Louis Pullen-Freilich <lpf@google.com>
Date: Sat Aug 21 01:57:02 2021
Fixes existing UnnecessaryComposedModifier issues
Bug:
Test: lintDebug
Change-Id: I1a4db29446accdd136e4d94a855fc0f3e25b58d7
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/SelectableTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/ToggleableTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/Border.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/selection/Selectable.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/selection/Toggleable.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/draw/ShadowTest.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/draw/Shadow.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/input/key/KeyInputModifier.kt
M compose/ui/ui/src/test/kotlin/androidx/compose/ui/input/key/KeyInputModifierTest.kt
Description
Currently we use
Modifier.composed
in many places to 'wrap' modifiers with a newInspectorInfo
, while ignoring any infos used internally in the implementation detail of the modifiers.For example,
Modifier.selectable
currently looks like:In this case using
composed
is important, as we want to hide theclickable
'sInspectorInfo
, and replace it with a more meaningful one forselectable
.However, using
Modifier.composed
like this when there are no Composable functions being called in the implementation is expensive - it means that the modifier can never be skipped, and this can cause performance degradation. As a result, this shouldn't becomposed
, and we will need a new specific API to ignore the internal info.