Kotlin 2 Kotlin, part1#1824
Conversation
579d303 to
a6722d7
Compare
ButterscotchV
left a comment
There was a problem hiding this comment.
Seems fine, may need to double check that Android doesn't complain about any of these
|
KMP is the goal. but with the #1798 in progress that aim to that anyway. It feels a bit redundant to do it on the current codebase. |
|
@loucass003 Looks big. Why not incremental changes with AI? It is very accurate and fast. That is the kind of job that AI does better than best engineers. |
|
The structural change is too big to be incremental. I already use Ai to assist in some ways but this is not a magic tool. |
|
Agree, there is a huge tech dept. I thought it could be easier to split language and library change with structural. What maintainers say about your work? I would love it to merged and well tests. I just afraid it could be stalled. I hope it will not |
|
Main contributors are on board and the slime team too. so it will reach completion. just so you know i am the lead dev of the project. this is happening and not a daydream of some random contributor |
|
Thank you :) |
This commit replaces some JVM library calls with cross platform kotlin calls.
It would be great to move towards KMP.
Replaced imports
java.util.function.Consumer(T) -> Unitjava.util.function.BiConsumer(A, B) -> Unitjava.util.function.Function(T) -> Rjava.util.stream.Collectors.filter().toList()etc.)java.util.concurrent.CompletableFuturekotlinx.coroutines.CompletableDeferredjava.util.concurrent.Futurekotlinx.coroutines.Deferredjava.util.concurrent.ExecutionExceptionjava.util.concurrent.LinkedBlockingQueueArrayDeque+.removeFirstOrNull()java.util.concurrent.ConcurrentLinkedDequeArrayDequejava.util.Queue/java.util.DequeArrayDequejava.nio.charset.StandardCharsetsCharsets(kotlin.text)java.lang.IllegalArgumentExceptionIllegalArgumentException(kotlin-stdlib)java.io.CloseableCloseable(kotlin.io)java.util.ArrayListArrayList(kotlin.collections)java.util.Objects!!non-null assertionConsumer { }patterns{ }withforEach.stream().filter().collect(Collectors.toList()).filter().toList()Other changes
.accept(x)/.apply(x)calls with direct invocations whereConsumer/BiConsumer/Functionwere removed.stream().filter().findFirst()with.find { }whereStream→Sequenceconversion was possiblejava.util.stream.StreamonProtocolAPIServerandSerialHandlerinterfaces that Java classes implement