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

Use Scala-Native for Mill Client (1000USD Bounty) #4016

Open
lihaoyi opened this issue Nov 24, 2024 · 10 comments
Open

Use Scala-Native for Mill Client (1000USD Bounty) #4016

lihaoyi opened this issue Nov 24, 2024 · 10 comments
Labels

Comments

@lihaoyi
Copy link
Member

lihaoyi commented Nov 24, 2024


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


Sister ticket to #4007.

The Mill client contains ~24 Java files with zero third party dependencies:

We should try to see if we can port it all to Scala-Native for improved startup performance and to allow us to use Scala libraries in the client. e.g. using MainArgs in the Mill client would alleviate the -i must be passed as the first argument restriction which is very annoying

The success criteria for this ticket is a PR which (a) translates all Mill client code from Java to Scala (b) cross-compiles the Mill client code using Scala-Native and (c) bundles the Scala native launcher together with the Mill server jar so the client is able to launch the server.

@lihaoyi lihaoyi added the bounty label Nov 24, 2024
@Quafadas
Copy link
Contributor

I'd be tempted to dot take a tilt at this, but I'll probably be slow.

@scarf005
Copy link

scarf005 commented Nov 24, 2024

i'm also interested in working on this, but pointers on how to incrementally migrate would be welcome: https://discord.com/channels/632150470000902164/1295786923410984981/1310137269801320498

@Quafadas
Copy link
Contributor

@scarf005 I'll leave it to you for the time being - if you're willing to publish your PR, we can try and work through it together, but it sounds to me as though you're doing the same things I would have been trying to do.

My knowledge is not more detailed than what Haoyi set out above right now.

@scarf005
Copy link

(b) cross-compiles the Mill client code using Scala-Native and (c) bundles the Scala native launcher together with the Mill server jar so the client is able to launch the

@lihaoyi sorry, but could this be explained in more detail? still quite new to mill, i've rewritten runner.client at https://github.com/scarf005/mill/tree/refactor/scala-native-mill-client but unsure which command to run to ensure (b) and (c) works correctly.

@Quafadas
Copy link
Contributor

@scarf005 If you try running this command;

mill show runner.client.compile

and check the compile.dest target dir. I guess, that it will be empty. Did you make the client module a ScalaModule? Otherwise, it will ignore *.scala.

@Quafadas
Copy link
Contributor

@scarf005 Just want to check - are you still looking at this?

@scarf005
Copy link

yes, i think i could work more on weekends...
tho it might not work well as planned since i'm new on this!

@Quafadas
Copy link
Contributor

@scarf Cool - if you want to collaborate on it and split the bounty, it could be fun - otherwise I'll leave you to it ... no pressure from me either way.

tho it might not work well as planned since i'm new on this!

it's open source so hopefully it's fun :-).

If you decide to drop it at some point, just please let me know?

@scarf005
Copy link

alright, will share how it goes here. btw - my handle is scarf005 not scarf

@lihaoyi
Copy link
Member Author

lihaoyi commented Nov 27, 2024

Just for some additional context, the long-term plan for this issue and #4007 is we will likely want both: initially to do a comparative analysis of Scala-Native vs Graal-Native approaches to the problem, and then either picking the Scala-Native version OR using Scala re-implementation on the JVM with Graal-Native. In either case we would need both tickets to be completed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants