-
Notifications
You must be signed in to change notification settings - Fork 30
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
Upgrades to Kotlin 2.0.20 #890
Conversation
I just marked this draft, so we do not merge this accidentally before the RC-19 release. |
eba7327
to
92af339
Compare
AS RC19 is released, we could now review and merge this one 😍 |
There are some warnings left, that should be handled. I suggest the following changes: Subject: [PATCH] Fixes small styling issue in sealed hierarchy example
---
Index: core/src/commonMain/kotlin/dev/fritz2/validation/validation.kt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/core/src/commonMain/kotlin/dev/fritz2/validation/validation.kt b/core/src/commonMain/kotlin/dev/fritz2/validation/validation.kt
--- a/core/src/commonMain/kotlin/dev/fritz2/validation/validation.kt (revision 92af339cb8a91bb4e32035b59f888b162d4aa144)
+++ b/core/src/commonMain/kotlin/dev/fritz2/validation/validation.kt (date 1726742213148)
@@ -62,7 +62,7 @@
* @param T metadata which perhaps is needed in validation process
*/
@JvmInline
-value class Validation<D, T, M>(private inline val validate: (Inspector<D>, T) -> List<M>) {
+value class Validation<D, T, M>(private val validate: (Inspector<D>, T) -> List<M>) {
operator fun invoke(inspector: Inspector<D>, metadata: T): List<M> = this.validate(inspector, metadata)
operator fun invoke(data: D, metadata: T): List<M> = this.validate(inspectorOf(data), metadata)
}
Index: headless/src/jsMain/kotlin/dev/fritz2/headless/components/combobox.kt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/headless/src/jsMain/kotlin/dev/fritz2/headless/components/combobox.kt b/headless/src/jsMain/kotlin/dev/fritz2/headless/components/combobox.kt
--- a/headless/src/jsMain/kotlin/dev/fritz2/headless/components/combobox.kt (revision 92af339cb8a91bb4e32035b59f888b162d4aa144)
+++ b/headless/src/jsMain/kotlin/dev/fritz2/headless/components/combobox.kt (date 1726742312590)
@@ -399,7 +399,7 @@
* Instances of this class are part of the [ItemList][QueryResult.ItemList] [QueryResult] and are passed to the
* [comboboxItem][ComboboxItems.comboboxItem] brick in order for it to know which item it represents.
*/
- data class Item<T> internal constructor(
+ data class Item<T>(
val index: Int,
val value: T
)
@@ -434,7 +434,7 @@
*
* See [QueryResult] for more information.
*/
- data class ItemList<T> internal constructor(
+ data class ItemList<T>(
val query: String,
val items: List<Item<T>>,
val truncated: Boolean
Index: core/src/jsMain/kotlin/dev/fritz2/core/handlers.kt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/core/src/jsMain/kotlin/dev/fritz2/core/handlers.kt b/core/src/jsMain/kotlin/dev/fritz2/core/handlers.kt
--- a/core/src/jsMain/kotlin/dev/fritz2/core/handlers.kt (revision 92af339cb8a91bb4e32035b59f888b162d4aa144)
+++ b/core/src/jsMain/kotlin/dev/fritz2/core/handlers.kt (date 1726742252369)
@@ -55,7 +55,7 @@
*
* @param process defines how to handle the values of the connected [Flow]
*/
-value class SimpleHandler<A>(override inline val process: (Flow<A>, Job) -> Unit) : Handler<A>
+value class SimpleHandler<A>(override val process: (Flow<A>, Job) -> Unit) : Handler<A>
/**
* An [EmittingHandler] is a special [Handler] that constitutes a new [Flow] by itself. You can emit values to this [Flow] from your code
@@ -65,7 +65,7 @@
* @property process function defining how this [Handler] collects a [Flow] when connected using [handledBy]
*/
class EmittingHandler<A, E>(
- inline val collectWithChannel: (Flow<A>, FlowCollector<E>, Job) -> Unit,
+ private val collectWithChannel: (Flow<A>, FlowCollector<E>, Job) -> Unit,
private val flow: MutableSharedFlow<E> = MutableSharedFlow()
) : Handler<A>, Flow<E> by flow { |
I have run the I also started most example apps. |
I applied your patch and did a full build. Build Warnings should be gone now. Thanks! |
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.
Please adapt the versions in the example build.gradle.kts
too.
Currently those are still at 1.9.x
Upgrades to Kotlin 2.0.20
version.properties
Closes #866