Repository navigation
test(nav3): [Part 5] Verify the SerialName mapper under R8 - #6783
Draft
0xadam-brown wants to merge 1 commit into
Draft
0xadam-brown wants to merge 1 commit into
0xadam-brown wants to merge 1 commit into
Conversation
This was referenced Nov 25, 2026
Contributor
PR risk: mediumFor commit The model rated this change low. It was raised to medium because:
This label is a hint for reviewers, not an approval. |
0xadam-brown
force-pushed
the
feat/nav3-serial-name-stack-5
branch
from
November 25, 2026 15:34
c765b6c to
9f1998f
Compare
0xadam-brown
force-pushed
the
feat/nav3-serial-name-stack-4
branch
from
November 25, 2026 15:34
13ed74a to
37996b3
Compare
📲 Install BuildsAndroid
|
Add nav3-backstack-entry-mapper-r8-check, an app that maps representative back stack keys with BackStackEntryMapper.SerialName in an R8-minified release build and reports whether each name is right, and scripts/test-nav3-backstack-entry-mapper-r8.sh, which builds it against the kotlinx.serialization floor in R8 full and compat mode, and optionally other versions, and runs it on a booted emulator or device. Besides names, the app checks that R8 renamed classes, and, through a logger that records the mapper's messages, that the compatibility probe was conclusive.
0xadam-brown
force-pushed
the
feat/nav3-serial-name-stack-4
branch
from
November 25, 2026 16:31
37996b3 to
cd7e549
Compare
0xadam-brown
force-pushed
the
feat/nav3-serial-name-stack-5
branch
from
November 25, 2026 16:31
9f1998f to
ba7a24b
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Stack (Nav3 SerialName Mapper)
This stack replaces the
SerialNamehalf of #6696.SerialNameAndPropertieswill follow in its own stack.📜 Description
Adds
nav3-backstack-entry-mapper-r8-check, a small app insentry-android-integration-teststhat maps representative back stack keys withBackStackEntryMapper.SerialNamein an R8-minified release build and reportsPASSorFAILfor each. It runs on an emulator or device via:./scripts/test-nav3-backstack-entry-mapper-r8.sh # or: make runNav3BackStackEntryMapperR8TestThe script builds the app against the kotlinx.serialization floor (1.7.3) in R8 full and compat mode (plus any versions in
NAV3_EXTRA_KOTLINX_VERSIONS), installs each APK, and reads the results from logcat.The app checks:
/unknownfor keys that can't be named (String, non-@Serializableclasses, generic classes)./unknownat the floor, as the KDoc says, since kotlinx.serialization's own R8 rules only cover them from 1.10.0 on. Also, that the keep rules our Troubleshooting docs tell apps to add fix it.💡 Motivation and Context
SerialNamerelies on R8 keeping@Serializableannotations, generatedserializer()methods, companion objects, andINSTANCEfields, as kotlinx.serialization's consumer rules do. Unit tests run unminified, so they can't catch a release build that names screens differently from a debug build. The SDK is minified by apps' R8, so the only way to check it is to build an app.This check has already caught one bug: at the floor in R8 full mode, the probe's own object fixture lost its
INSTANCEfield, so the probe was silently inconclusive. Part 2 now keeps the fixture with a scoped consumer rule.addresses: JAVA-787 (link)
💚 How did you test it?
Ran the script on an emulator (API 36). Every check passes in R8 full and compat mode at 1.7.3, and in full mode at 1.13.0.
📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
Part 6 runs this check in CI.