Skip to content
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

Update libraries #716

Merged
merged 2 commits into from
Aug 30, 2024
Merged

Conversation

LachlanMcKee
Copy link
Collaborator

@LachlanMcKee LachlanMcKee commented Aug 29, 2024

Description

Updated Kotlin, Compose Compiler (implicitly via Kotlin) and several Androidx libs

Check list

  • I have updated CHANGELOG.md if required.
  • I have updated documentation if required.

@@ -49,7 +49,8 @@ internal class ChildNodeCreationManager<NavTarget : Any>(
when (keepMode) {
ChildEntry.KeepMode.KEEP -> {
navModelKeepKeys =
(state.onScreen + state.offScreen).mapNotNullToSet { element -> element.key }
state.onScreen.mapNotNullToSet { element -> element.key } +
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Kotlin compiler reeeeeeally doesn't like (state.onScreen + state.offScreen)

I assume it has something to do with the generics, but even after attempting to change a lot of code to use : Any it still didn't work 🤔

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

those are 2 lists of the same type, looks like a compiler bug

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at least there was a workaround 🫠

Copy link
Collaborator

@KovalevAndrey KovalevAndrey Aug 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does set + set create a new set or a collection?

Copy link
Collaborator Author

@LachlanMcKee LachlanMcKee Aug 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a new set.

the definition of navModelKeepKeys is val navModelKeepKeys: Set<NavKey<NavTarget>> so it wouldn't compile unless it returned a set.

Comment on lines +41 to +42
ChildRenderer,
TransitionDescriptor<NavTarget, State>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is no longer allowed in Kotlin 2.0
https://developer.android.com/jetpack/androidx/releases/compose-compiler#1.5.0

Named arguments for @Composable lambda calls have been deprecated. This feature is relying on internal compiler APIs and will not be supported by K2.

Comment on lines -83 to -86
androidTestImplementation(composeBom)
androidTestImplementation(libs.androidx.test.espresso.core)
androidTestImplementation(libs.androidx.test.junit)
androidTestImplementation(libs.compose.ui.test.junit4)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are no tests in this module (maybe there should be?)

@LachlanMcKee LachlanMcKee changed the title Updated libs Update libraries Aug 30, 2024
@LachlanMcKee LachlanMcKee merged commit 7911ad9 into bumble-tech:1.x Aug 30, 2024
4 checks passed
@LachlanMcKee LachlanMcKee deleted the chore-update-libs branch August 30, 2024 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants