Status Update
Comments
le...@gmail.com <le...@gmail.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
nj...@google.com <nj...@google.com>
lp...@google.com <lp...@google.com>
so...@google.com <so...@google.com> #3
le...@gmail.com <le...@gmail.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
po...@google.com <po...@google.com>
an...@google.com <an...@google.com> #5
ma...@hopper.com <ma...@hopper.com> #6
Any updates on this?
I'm pretty sure this is the bug behind this StackOverflow question too:
The intrinsic size calculation is wrong for some reasons (probably not passing in the proper constraints when calculating the intrinsic size of the children).
A simpler demo of the issue is:
@Preview(showBackground = true, widthDp = 300, heightDp = 400)
@Composable
fun TestRowCompose() {
LazyColumn() {
item {
Row(
modifier = Modifier
.height(intrinsicSize = IntrinsicSize.Min)
.background(Color.Magenta),
verticalAlignment = Alignment.Top,
) {
Text(text = "abcde", Modifier.fillMaxWidth(0.25f).background(Color.Red))
}
}
}
}
I'm expecting the Magenta background to be the height of the Red backgorund, but instead it is bigger.
It's actually as high as the text if each characters were rendered on their own line, which seems to indicate an improper constraints in width when measuring the minIntrinsicHeight
for the Text
.
Adding characters to the text grows the vertical height of the Purple background, which is unexpected.
sz...@gmail.com <sz...@gmail.com> #7
Any updates on this?
uo...@google.com <uo...@google.com> #9
This is actually a text bug. It has to do with the cache stopping the update from happening:
I tested out the sample
Reassigning to Sean to take a look
se...@google.com <se...@google.com> #10
Thanks for digging into this!
se...@google.com <se...@google.com> #11
I suspect there may be two bugs stacked on top of each other based on history.
I'll fix the text over-caching issue quick and then we can see if the remaining intrinsics bug lingers.
Thanks!
Sean
se...@google.com <se...@google.com> #12
Update: It looks like this was just a text issue I can't reproduce without text.
Fixing in aosp/2962173
ap...@google.com <ap...@google.com> #13
Branch: androidx-main
commit e9ef4f948b25c55dd15eecf31476b287fd3966d8
Author: Sean McQuillan <seanmcq@google.com>
Date: Tue Feb 13 16:58:34 2024
Don't cache intrinsicHeight through text changes
Only applies to annotatedstring / layout result implementation
Fixes:
Test: ./gradlew :com:found:found:cAT
Change-Id: Ied047b99122e43d1a0c088f742fe090df5c0c4c2
M compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/text/modifiers/MultiParagraphLayoutCacheTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/modifiers/MultiParagraphLayoutCache.kt
mt...@gmail.com <mt...@gmail.com> #14
Any hope this fix will make it into a 1.6.x release?
se...@google.com <se...@google.com> #15
Trying to get it into 1.6.2
se...@google.com <se...@google.com> #16
Yep, it's heading in to 1.6.2.
Thanks for asking! Was able to make the cut :)
se...@google.com <se...@google.com> #17
Since hotpatching and linking to this bug - adding notes.
This bug applied if any of the following conditions were met:
- Text was selectable (selection container is not null)
- Text is annotated string
- onTextLayoutResult callback is not null
The "simple text" path (which exists for optimization reasons) did not have this bug. Notably TextStringSimpleNode / Paragraph cache was already
To force the issue if it is appearing randomly in your app, the easiest way would be to ensure you always pass an AnnotatedString for all Text/BasicText that you're debugging.
pr...@google.com <pr...@google.com> #18
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.foundation:foundation:1.6.2
androidx.compose.foundation:foundation-android:1.6.2
androidx.compose.foundation:foundation-desktop:1.6.2
androidx.compose.foundation:foundation:1.7.0-alpha03
androidx.compose.foundation:foundation-android:1.7.0-alpha03
androidx.compose.foundation:foundation-desktop:1.7.0-alpha03
mt...@gmail.com <mt...@gmail.com> #19
Thanks for including it into 1.6.2, which allows me to fix an annoying display bug!
Description
Description has been deleted.