-
-
Notifications
You must be signed in to change notification settings - Fork 370
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
Kotlin Multiplatform Support (2500USD Bounty) #3867
Comments
Hello @lihaoyi do you want item 2 to use just |
@c0d33ngr i expect we would need a KotlinNativeModule, since kotlin native would have its own flags and configuration. This would be similar to ScalaNativeModule |
I suspected so. Thank for the reply
…On Mon, Nov 4, 2024, 3:34 PM Li Haoyi ***@***.***> wrote:
@c0d33ngr <https://github.com/c0d33ngr> i expect we would need a
KotlinNativeModule, since kotlin native would have its own flags and
configuration. This would be similar to ScalaNativeModule
—
Reply to this email directly, view it on GitHub
<#3867 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AZKEA4TDOGGPNTF3C2BSV3LZ66AXXAVCNFSM6AAAAABQZ7PSVKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINJUHA3TOMBWGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
This PR partially addresses #3670: it contains working example, but doesn't contain any docs. This example contains compilation and test execution for all the modules of https://github.com/arrow-kt/arrow for the JVM and JS (Node) targets, except [arrow-optics-compose](https://github.com/arrow-kt/arrow/tree/main/arrow-libs/optics/arrow-optics-compose) module (it requires better Android support by Mill). Full example run takes 6 minutes on my machine, so it is extracted into a dedicated CI job. The following Gradle plugins are not added to the example build script, because their respective tooling is Gradle-dependent (no raw-jar or CLI): * https://github.com/xvik/gradle-animalsniffer-plugin (although maybe it is possible to use options from https://www.mojohaus.org/animal-sniffer/) * https://github.com/Kotlin/kotlinx-knit * https://github.com/Kotlin/binary-compatibility-validator * https://github.com/diffplug/spotless There is also no publication support in this example (requires Kotlin Multiplatform publishing support, see #3867) I faced the following issues while writing this example: * There is quite a lot of duplication for JVM/JS configuration, because there is no support of [Kotlin Multiplatform hierarchies](https://kotlinlang.org/docs/multiplatform-hierarchy.html) * Each Maven or Module dependency should be with JS/JVM/etc. target qualifier, which also quite explodes amount of code to be written. This is also a question of Kotlin Multiplatform hierarchies support and resolution. * Until KMP hierarchies and target resolution support is not implemented, adding a new compilation target will bring quite a lot of new code in the build script. And there is a lot of targets in Arrow: https://github.com/arrow-kt/arrow-gradle-config/blob/97ba7b5eab810a336cf4070eb717f05533d208a8/arrow-gradle-config-kotlin/src/main/kotlin/io.arrow-kt.arrow-gradle-config-kotlin.gradle.kts#L34-L69 * There is no possibility to disable tests for the particular module (so I had to use a hack with overriding `compile` / `test` tasks) - this is because tests is dedicated module, but if comes as a part of the trait, we cannot add / remove it dynamically. Having such control is handy when certain multiplatform modules have a common trait for the main compilation unit, but some of them may have no tests. Regarding docs: I think it is too early to write any comparison with Gradle, because clearly new functionality will be added to the Kotlin support in Mill which will affect overall execution time and also the comparison should be done not only for JVM targets, but for Kotlin/JS and Kotlin/Native targets as well. And ideally it should be a defined methodology for such testing (for example, certain Gradle plugins should be removed from the Arrow Gradle build script, to have the same set as Mill build script; compiler execution time should be excluded (it may be different because of the different flags passed to it under the hood)). So I propose to open a dedicated bounty for writing such doc. --------- Co-authored-by: 0xnm <0xnm@users.noreply.github.com> Co-authored-by: Li Haoyi <haoyi.sg@gmail.com>
@0xnm the example about kotlin/native support that @lihaoyi included. What kind of implementation do you expect for the |
Any target supported by The exact use of |
From the maintainer Li Haoyi: I'm putting a 2000USD bounty on this issue, payable by bank transfer on a merged PR implementing this.
The goal of this bounty is to flesh out the missing parts of Kotlin-Multi-Platform support. Previous Kotlin support in Mill is mostly for the JVM (#3451) with some support for web and very basic Kotlin-JS use cases (#3611). The goal here is to flesh out the Kotlin-JS functionality, add support for Kotlin-Native, and improve the overall multi-platform support e.g. publishing and consuming KMP modules and writing KMP applications
Example for Kotlin/JS support of browser executables and test runner with selectors (500USD)
node
executablesExample for Kotlin/Native support (1000USD)
example/kotlinlib/basic/1-simple
as well asexample/scalalib/native/2-interop
but written using Kotlin-Native.Publishing Kotlin-Multi-Platform modules
.module
files such that they can be resolved by Gradle's kotlin-multi-platform integration (500USD)Example of a hello-world Kotlin-Multi-Platform app that uses Jetpack-Compose-Multi-Platform to support Desktop/Android/Web (500USD)
These milestones are open for discussion, and can be modified or additional milestones added if necessary
The text was updated successfully, but these errors were encountered: