com-lihaoyi / mill

Mill is a fast JVM build tool that supports Java and Scala. 2-3x faster than Gradle and 5-10x faster than Maven for common workflows, Mill aims to make your project’s build process performant, maintainable, and flexible
https://mill-build.org/
MIT License
2.04k stars 329 forks source link

First Party Support for the Kotlin language (2000USD) #3451

Open lihaoyi opened 1 week ago

lihaoyi commented 1 week ago

From the maintainer Li Haoyi: I'm putting a 2000USD bounty on this issue, payable by bank transfer on a merged PR implementing this.


https://github.com/lefou/mill-kotlin/ exists, but it is a standalone project without many examples, and not enough for a newbie to pick up and begin using Mill with Kotlin. This ticket is to do the following:

  1. In-source https://github.com/lefou/mill-kotlin/ into the Mill repo as a kotlinlib submodule
  2. Write Kotlin versions of the example/javalib/{basic,builds,module,testing} example integration tests, where reasonable
  3. Flesh out whatever missing functionality is needed to do the above (I'm sure we'll hit things!)

As this ticket is large, I am splitting the bounty into two parts:

  1. 1000USD to get the mill-kotlin in-sourced and the example/javalib/basic examples converted to Kotlin and included on the docsite
  2. 1000USD to get the remaining examples in example/javalib/{builds,module,testing,publishing} converted to Kotlin and included on the docsite

The end result is that we have a suite of tested example documentation demonstrating how to use the Mill build tool to build a large variety of Kotlin projects mirroring the example documentation for Java and Scala projects.

Some code may be adaptable from https://github.com/rife2/bld-kotlin. ChatGPT (or claude or whatever) would probably also be a great help translating the examples; I used it heavily when setting up the Java example tests, but in the end the human still needs to debug things and polish it up so it's presentable for pedagogical purposes

llvee commented 1 week ago

If I claim this, can others also claim or start work on the bounty?

lihaoyi commented 1 week ago

@githubbin765 As mentioned in https://github.com/orgs/com-lihaoyi/discussions/5, bounties remain open until completed.

In this case I (just) broke up the bounty into two phases so it's not such a big all-or-nothing ticket, and I can break it up further if you think it would be useful.

But fundamentally there is no locking of bounties, so others can pick it up as well, and first PR wins (at my discretion)

llvee commented 1 week ago

I see, that makes sense. Changing the bounty rules based on specific participation seems like a good idea potentially. Ok I seem to have identified how to in-source the library may be able to complete translating remaining examples today for the first part of this. I will create two separate PRs one for the in-sourcing, another for examples.

lihaoyi commented 1 week ago

I would suggest doing everything in (1) above in one PR: both the insourced library and the translated example/javalib/basic. Easier to review together with the example tests validating that the insourcing works

llvee commented 1 week ago

The above isn't ChatGPT output. You also suggested using ChatGPT in the first post in order to help resolve this bounty. I shared the above because you stated wanting the example/javalib/basic examples converted to Kotlin and included on the docsite so I created a docsite format using Markdown. For the docsite, does the above look ok to you?

lihaoyi commented 1 week ago

@githubbin765 I don't think the output you gave above is relevant to the bounty at hand. I'm going to clean up the thread to make space for any further discussion that may occur. Feel free to open a PR when you have the working examples and we can take it from there

llvee commented 1 week ago

@lihaoyi I see. I will do that. I will open a second PR for the second bounty with the doc site code.

0xnm commented 1 day ago

@lihaoyi I may look into Part 2 as well. Do you have any ideas/suggestions about Kotlin libraries/frameworks you would like to see there?

lihaoyi commented 1 day ago

@0xnm most of the rest of the kotlinlib/ examples are roughly mechanical translations of the javalib/ examples re-arranging the stuff you already have in kotlinlib/basic/, but there are a few things that are worth calling out. Let me go through the folders below:

lihaoyi commented 1 day ago

TBH the list of stuff above seems like a lot. I'd be ok if you skipped the web/ folder and did all the other stuff. We can pick up the web stuff later in a separate ticket