-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: port type safe nav APIs to kmp #1342
Conversation
Current issue that is preventing me from compiling Gradle output of compiler issue> Task :navigation:navigation-common:compileKotlinLinuxArm64 FAILED e: Compilation failed: public constructor JvmSuppressWildcards(suppress: kotlin.Boolean = ...) defined in kotlin.jvm.JvmSuppressWildcards[DeserializedClassConstructorDescriptor@4cb6877]
e: java.lang.IllegalStateException: public constructor JvmSuppressWildcards(suppress: kotlin.Boolean = ...) defined in kotlin.jvm.JvmSuppressWildcards[DeserializedClassConstructorDescriptor@4cb6877] |
* null if no characters should be skipped | ||
* @return an encoded version of s suitable for use as a URI component | ||
*/ | ||
fun encode(s: String, allow: String? = null): String { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
internal actual var sizeTransform: (@JvmSuppressWildcards | ||
AnimatedContentTransitionScope<NavBackStackEntry>.() -> SizeTransform?)? = null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't sure if the usage of this is something that could be supported yet so I left it in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like I was able to use it
@@ -101,3 +101,5 @@ public expect class ComposeNavigator : Navigator<Destination> { | |||
internal val NAME: String | |||
} | |||
} | |||
|
|||
@PublishedApi internal val ComposeNavigator.Companion.name get() = ComposeNavigator.NAME |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This (and similar code in DialogNavigator) is because the inline funs were having issues accessing ComposeNavigator.Companion.NAME
from js/wasmJs even though they were correctly annotated with PublishedApi
.
Thanks for the effort.
|
@eygraber there is |
@MatkovIvan thanks for pointing that out! I'll try rebasing later and seeing how much breaks 😅 My goal was to have a build locally to play with, so I can try and keep it up to date as I do that. In any case I realized I didn't port |
You're right. It's not in a good place to start working off of yet. I'll play around with my branch locally. I'll close this PR for now. Hopefully it can be helpful when this is ready to be worked on. |
@MatkovIvan I've been testing my changes here locally and it's working pretty well. I saw this commit that you made merging Does that mean |
Regarding |
Are the 2.8.0 dev artifacts (e.g. 2.8.0-dev1667) supposed to have the type safe APIs in them? If so, it looks like there might be an issue because they aren't there. |
Nope, dev builds compiled from jb-main. |
This is an attempt to port the new type save APIs from Jetpack Navigation. I think I got all of them, but I didn't write any tests yet, or attempt to use the artifacts locally to see if they work.
Testing
Describe how you tested your changes. If possible and needed:
This should be tested by QA
Release Notes
Sections:
Subsections:
Section - Subsection
Google CLA
Done