Bump navigation3 to 1.2.0-alpha07 and fix DeepLinkMatcher signatures - #3054
Open
StylianosGakis wants to merge 1 commit into
Open
Bump navigation3 to 1.2.0-alpha07 and fix DeepLinkMatcher signatures#3054StylianosGakis wants to merge 1 commit into
StylianosGakis wants to merge 1 commit into
Conversation
alpha07 gives DeepLinkMatcher a second type parameter for its match-result type (DeepLinkMatcher<T, R : MatchResult<out T>>). Widen every aggregation-side usage to a star projection (DeepLinkMatcher<HedvigNavKey, *>), since the matcher registry is heterogeneous and does not name a concrete result type. UriDeepLinkMatcher and StaticKeyDeepLinkMatcher keep their single type parameter, so the UriDeepLinkMatcher subclass needs no change.
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.
Adapt to the new navigation3 deep link API
No important changes, but the code change is source breaking so we had to update it.
AI summary:
What
Bumps
androidx.navigation3from1.2.0-alpha06to1.2.0-alpha07and adapts to the one source-breaking API change in that release.Why
alpha07 gives
DeepLinkMatchera second type parameter for its match-result type:Every aggregation-side usage is widened to a star projection
DeepLinkMatcher<HedvigNavKey, *>. The matcher registry is heterogeneous (mixed matcher/result types ranked through their commonMatchResultbase) and never observes the concrete result type, so the star is the accurate type here, not a workaround.UriDeepLinkMatcher<T>andStaticKeyDeepLinkMatcher<T>keep their single type parameter (they fixRinternally), so theUriDeepLinkMatchersubclass infeature-addon-purchaseneeds no change.Scope
gradle/libs.versions.tomlversion bumpHedvigDeepLinkMatcher/DeepLinkMatcherProviderinnavigation-compose*DeepLinks.ktmatchers()override return typesVerification
:navigation-composecompiles on JVM and iOS (KMP common deep link code):app:compileDebugKotlin(transitively compiles all feature modules):navigation-compose:jvmTest --tests "*DeepLink*"passes:appdeep link + synthetic stack tests pass:navigation-compose:ktlintCheckpasses