Status Update
Comments
il...@google.com <il...@google.com> #2
jb...@google.com <jb...@google.com> #3
since it is already marked as deprecated, we can probably do it by now.
sk...@gmail.com <sk...@gmail.com> #4
al...@gmail.com <al...@gmail.com> #5
Branch: androidx-master-dev
commit d576cbdc911cba16638a44fd8223391a90a07ef7
Author: Mike Nakhimovich <digitalbuddha@users.noreply.github.com>
Date: Tue Aug 11 09:30:34 2020
[GH] Hide deprecated internal API.
## Proposed Changes
* `RoomDatabase.java` has protected `mCallbacks` field which is leaking in the API docs, we should @Hide it.
## Testing
Test: Ran unit tests locally
## Issues Fixed
Fixes: 76109329
This is an imported pull request from
Resolves #61
Github-Pr-Head-Sha: 6440daa3a63752c7f9d5ba2a390248cd85bc634f
GitOrigin-RevId: fe92d8466a59b44b218b6ca3cbd57dcda17992f7
Change-Id: Id599cdf5b02b32bdae0166266fb7da967598fe92
A room/runtime/api/current.ignore
M room/runtime/api/current.txt
M room/runtime/api/public_plus_experimental_current.txt
M room/runtime/api/restricted_current.txt
M room/runtime/src/main/java/androidx/room/RoomDatabase.java
il...@google.com <il...@google.com>
j....@gmail.com <j....@gmail.com> #6
xa...@gmail.com <xa...@gmail.com> #7
xa...@gmail.com <xa...@gmail.com> #8
[Deleted User] <[Deleted User]> #9
il...@google.com <il...@google.com>
be...@gmail.com <be...@gmail.com> #10
da...@khol.me <da...@khol.me> #11
The workaround to put an <argument>
directly to the root of the <navigation>
holding the destination <fragment>
does not work, at least not in version 2.3.0
.
The other workaround to copy <argument>
to the source <fragment>
's <action>
works but it defeats the purpose of SafeArgs being safe. With that approach, you potentially have to update arguments in multiple source <fragment>
s that navigate to the same destination <fragment>
. If you forget to update some of the sources, the app will compile just fine but crash at runtime. That's just UnsafeArgs.
je...@gmail.com <je...@gmail.com> #12
og...@gmail.com <og...@gmail.com> #13
mt...@parsyl.com <mt...@parsyl.com> #14
Any updates on this? This has been open for 2.5 years.
g....@gmail.com <g....@gmail.com> #15
I recently got rid of all the optional arguments and default values, replacing them with Parcelable
classes that offer the same functionality leveraging Kotlin's type system. Since there are no compile time checks for start destinations and I had to touch some of them, I quickly put together a python script that checks the arguments of the actions that have a <navigation>
as destination.
I wrote the script with my use-case in mind, so the code makes some assumptions that are not generally true. These assumption should only cause false positives, but I really didn't think this through and I could be wrong. It's not perfect and there's definitely room for improvement, but it is enough for me for now.
Please remember that many are watching this issue and not everyone here care about this script. The source code is enough to seek for help elsewhere.
nv...@gmail.com <nv...@gmail.com> #16
A major fuck up for a documented use case.
nv...@gmail.com <nv...@gmail.com> #17
From this
- Copy
<argument>
to inside the<navigation>
tag, i.e. make it a sibling of other<fragment>
- Copy
<argument>
to inside the<action>
of the start fragment. Yes normally<action>
is a self close tag, and<argument>
is for<fragment>
.
And the workaround breaks navArgs()
, because StartFragmentOfNestedGraphArgs
is not generated.
ca...@gmail.com <ca...@gmail.com> #18
We actually just had a crash in our app, fortunately detected by qa, due to using the unsafe workaround.
[Deleted User] <[Deleted User]> #19
ju...@gmail.com <ju...@gmail.com> #20
That's even more annoying since putting the arguments directly inside de <navigation> tag doesn't work. (using 2.4.1)
[Deleted User] <[Deleted User]> #21
sp...@gmail.com <sp...@gmail.com> #22
sh...@gmail.com <sh...@gmail.com> #23
[Deleted User] <[Deleted User]> #24
ap...@google.com <ap...@google.com> #25
Branch: androidx-main
commit d1e16c5abced31a3738c9686121f3a2a50c3404e
Author: Clara Fok <clarafok@google.com>
Date: Mon Feb 26 12:18:38 2024
Fix startDestination route args not processed
Filled-in arguments in the route that is passed as a NavGraph's startDestination will now be processed and stored in the bundle.
These start route arguments will overwrite default values but not the others. The priority of args is as follows:
Restored/StartDestinationArgs > Start route args > Default args
Relnote: "You can now pass arguments to NavGraph's startDestination directly in the startDestination route without relying on defaultValue. This applies to nesteded NavGraph startDestinations as well."
Test: ./gradlew navigation:navigation-runtime:cC
Bug: 109505019
Bug: 188693139
Change-Id: I0e0b5a7c2bf2e77a8d7a46c91974509104e742a9
M navigation/navigation-common/src/main/java/androidx/navigation/NavGraphNavigator.kt
M navigation/navigation-runtime/src/androidTest/java/androidx/navigation/NavControllerRouteTest.kt
cl...@google.com <cl...@google.com> #26
Fixed internally, available in navigation-2.8.0-alpha05
jb...@google.com <jb...@google.com>
pr...@google.com <pr...@google.com> #27
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.navigation:navigation-common:2.8.0-alpha05
androidx.navigation:navigation-runtime:2.8.0-alpha05
Description
Version used: 1.0.0-alpha01
Devices/Android versions reproduced on: N/A
To reproduce:
1. Construct a navigation graph with a fragment and mark it as the startDestination for the graph.
2. Construct a subgraph with another fragment that requires an argument and mark it as the startDestination for the subgraph.
3. Construct an action from the first fragment to the subgraph.
4. Use the generated classes to construct the action. Observe that the argument is not required.
5. Move the argument from the fragment to the subgraph.
4. Use the generated classes to construct the action. Observe that the argument *is* required.
I believe that in both cases, the argument should be required because the purpose of the SafeArgs generated classes is to prevent missing arguments, which would occur if the subgraph did not require the arguments of its startDestination.