Status Update
Comments
al...@gmail.com <al...@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
al...@gmail.com <al...@gmail.com> #3
jb...@google.com <jb...@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
al...@gmail.com <al...@gmail.com> #5
I'd also like to add the following details:
The project where this issue is happening is a multi-module project. We don't use Plugins DSL so we still have usages of apply plugin
, etc. I can also share logs with Google if someone wants to have a look.
al...@gmail.com <al...@gmail.com> #6
I would like to ask if this would be addressed in a future fix? I am planning to do a workaround that involves removing all nav args that use Serializable/Parcelable. It will be a big rework of our codebase, so I'd like to understand if there is any merit to this issue and if there is any appetite to fix this. I'd like to report the status of this issue to my higher-ups as soon as possible. Thanks
il...@google.com <il...@google.com> #7
We'll be addressing this in a Navigation 2.5.1 bug fix release.
al...@gmail.com <al...@gmail.com> #8
Thank you very much!
mi...@gmail.com <mi...@gmail.com> #9
mi...@gmail.com <mi...@gmail.com> #11
ap...@google.com <ap...@google.com> #12
Branch: androidx-main
commit 0027220b3ef51bf9c69ac0287c3699e0b87f6422
Author: Jeremy Woods <jbwoods@google.com>
Date: Fri Jul 15 14:38:08 2022
Add deprecation suppressions to generated fromBundle
The getParcelableArray() and get() functions on Bundle have been
deprecated in SDK 33. This causes warning in the generated Safe Args
classes that use the fromBundle function with custom types.
We need to continue to use the old functions since we need to support
older platform versions so we should suppress the warnings on these
calls.
RelNote: "Navigation Safe Args will no longer cause deprecation warnings
in generated classes when using custom types."
Test: ./gradlew :navigation:navigation-safe-args-generator:test
--rerun-tasks
Bug: 237725966
Change-Id: Id86edf231b90176b5a0f03239bff628171a0284c
M navigation/navigation-safe-args-generator/src/test/test-data/expected/java_nav_writer_test/MainFragmentArgs.java
M navigation/navigation-safe-args-generator/src/test/test-data/expected/kotlin_nav_writer_test/MainFragmentArgs.kt
M navigation/navigation-safe-args-generator/src/main/kotlin/androidx/navigation/safe/args/generator/java/JavaNavWriter.kt
M navigation/navigation-safe-args-generator/src/main/kotlin/androidx/navigation/safe/args/generator/kotlin/KotlinNavWriter.kt
jb...@google.com <jb...@google.com> #13
This has been fixed internally and will be released in the Navigation 2.5.1
and 2.6.0-alpha01
versions.
na...@google.com <na...@google.com> #14
This bug was linked in a change in the following release(s):
androidx.navigation:navigation-safe-args-generator:2.6.0-alpha01
Description
Component used: Navigation
Version used: 2.4.2
Target SDK and Compile SDK version: 33
I would like to report that when building our app that targets API 33, the generated code for destination arguments in Navigation graphs use deprecated usages of Bundle (ie.
Bundle.get(String key)
,Bundle.getParcelableArray(String key)
Here is an example of how the generated code looks like (I modified arg names):
and another: