Status Update
Comments
ma...@google.com <ma...@google.com>
so...@google.com <so...@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
ez...@gmail.com <ez...@gmail.com> #3
so...@google.com <so...@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
ch...@google.com <ch...@google.com> #5
The reason we are seeing this is because calling Popup
, through its use of setContent
on the corresponding popup view, will call ProvideCommonAmbients
again. This means, from composition perspective it looks like,
ProvideCommonAmbients {
...
Provide(MyAmbient provides 10) {
...
ProvideCommonAmbients {
...
MyAmbient.current
}
}
}
The mental model is that ambients look up the composition for the first provider it finds of the MyAmbient
(we actually build the scope as we go but the model holds). If MyAmbient
is provided in ProvideCommonAmbients
as 200
you can see that MyAmbient.current
will provide 200
which is what Filip demonstrated above.
The solution for this is to not reprovide ambient values inProvideCustomAmbients
, such as MyAmbient
or RTL, that are expected to inherit across nested view or portaled content (such as what Popup
does). One solution is to make ProvideCommonAmbients
more complicated by looking up all the providers but I believe a better solution would be to add providesDefault
as a peer of provides
to create a provider that only has an effect if the value is not already provided by the parent. Then ProvideCommonAmbients
would be changed to use providesDefault
instead of the unconditional provides
.
Right now, given my current priorities, I would not be able to implement this soon. However I would be more than happy to help someone who is willing to take this on.
I am assigning to Clara for now until it is decided who should work on this.
po...@google.com <po...@google.com>
ap...@google.com <ap...@google.com> #6
Branch: androidx-master-dev
commit a3ff42b57f75f0cadca18ab65774dd22c9628238
Author: Mihai Popa <popam@google.com>
Date: Thu Oct 29 14:53:57 2020
Add provideDefault for ambient and use it for LD
Relnote: provideDefault was added as an alternative to provide for providing ambients, and it can be used to specify ambient values that will only be set when there is no ambient value already provided.
Fixes: 171024925
Test: PopupTest
Change-Id: Id663500276ad2ec3e5a5b1310a81efbf3acc0842
M compose/runtime/runtime/api/current.txt
M compose/runtime/runtime/api/public_plus_experimental_current.txt
M compose/runtime/runtime/api/restricted_current.txt
M compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/Ambient.kt
M compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/Composer.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/window/PopupTest.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/platform/Ambients.kt
Description
Build: AI-202.7319.50.42.6863838, 202009251539,
AI-202.7319.50.42.6863838, JRE 11.0.8+10-b944.6842174x64 JetBrains s.r.o, OS Windows 10(amd64) v10.0 , screens 1920x1080, 1920x1080
AS: 4.2 Canary 13; Kotlin plugin: 1.4.10-release-Studio4.2-1; Android Gradle Plugin: 4.2.0-alpha13; Gradle: 6.7; NDK: from local.properties: (not specified), latest from SDK: (not found); LLDB: pinned revision 3.1 not found, latest from SDK: (package not found); CMake: from local.properties: (not specified), latest from SDK: (not found), from PATH: (not found)
IMPORTANT: Please readhttps://developer.android.com/studio/report-bugs.html carefully and supply all required information.
Compose Version : 1.0.0-alpha05
I'm building an app that's all RTL. I have an Alert Dialog in it, but the text inside the dialog isn't following RTL. I tried changing the alignment of the text, wrapping the Alert Dialog inside an RTL provider, wrapping the text inside an RTL provider, but nothing works.
Is something wrong with the component? Or is tehre something I'm not doing?