frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

Mill: A better build tool for Java, Scala, and Kotlin

https://mill-build.org/mill/index.html
65•lihaoyi•5h ago

Comments

ivolimmen•3h ago
It's nice that there are options but i'm sticking with maven. I hate programming my build; maven is just a configuration file.
jpitz•3h ago
Which works fine.....until it doesn't. Many non-trivial builds require custom logic, and trying to do that in maven was painful the last time I tried it.
throwaway7783•3h ago
Out of curiosity, what is non-trivial in this context?
spullara•3h ago
I have found that if it is hard to do in maven you probably shouldn't be doing it or there is a better way.
ackfoobar•2h ago
Yeah. It's Greenspun's tenth rule.

If you have any complexity, programming against a good abstraction (Gradle is not good good, but decent) beats finding the magical incantation of configuration to get the tool to do what you want.

lenkite•2h ago
That is why maven offers a plugin model for your custom logic that can be written in Java/Kotlin and a well defined lifecycle model where you can configure your plugin declaratively.

You can also download custom CLI tools and invoke them as part of a well-defined build lifecycle.

gf000•29m ago
And then fail to do proper incremental builds, leaving you with no choice but a faulty build or clean installing on every occasion.

At the very least, I would move to Gradle which does have proper knowledge of your build graph. But Mill is also a good choice and fills the same niche, with the added benefit that imperative-looking ordinary scala code will simply become a parallelizable, cacheable build graph.

switchbak•1h ago
I think folks just get used to Maven-induced constraints (this applies to SBT, Bazel, others too). When you free yourself from that you realize: builds just aren't all that hard, it's often the tooling that becomes a real limitation.

Of course, sometimes the limitations are good: preventing you from doing "the wrong thing", or encouraging cacheability, etc. But as with any abstraction layer - getting a model that fits across so many disparate use cases can be very challenging.

henry700•3h ago
I hate wrangling with configuration to make an amalgamation of plugins do what's expected in the expected order for my build; Gradle is just code and a DSL
askonomm•2h ago
If I would've gotten a Euro for every time "is just a DSL" was a reason everything was hard to debug and prone to failure, I'd have many Euros by now.
gf000•27m ago
Well, good luck debugging a multi-module maven pom file, then. You can get terrible error messages from both, to be honest.
imoverclocked•29m ago
It’s two DSLs which are versioned and whose behaviors are different.

Gradle groovy is extremely permissive (eg: you can access private class instance variables without even knowing that you are doing so)

Kotlin lacks that permissive quality in exchange for much easier introspection.

It’s often trivial to move from one to the other but those edge cases can find you in a codebase of any complexity.

chriswarbo•2h ago
> maven is just a configuration file

Even better, Maven "POMs" are written in a common, standard format (XML); so we can transform and manipulate it using off-the-shelf tools, if we really want to. I've found this useful e.g. in pre-commit hooks (tidy the formatting, checking/linting, etc.); in Nix builds (e.g. removing the version number, so it doesn't affect the hash and avoids spurious rebuilds); etc. That was a nice bonus when I switched some projects from SBT to Maven (due to SBT being wildly unreproducible).

pbh101•3h ago
Anyone have a comparison to Bazel? They only compare to JVM-centric tools eg Maven, sbt, Gradle.
frostirosti•3h ago
Bazel is just such a nightmare for me. It's amazing when someone understands it really well and can set things up. But for anything short of that, being on the hook to fix or debug things makes it a nightmare. That and trying to port anything over from sbt, like scalafix for instance, to bazel is a pain.

Also too, bazel has this issue of googleability? like I feel like I can take any build issue I've run into in sbt and find the solution and an example by just searching, but with Bazel, anything outside of the happy path is a recipe for pain

TheChaplain•3h ago
Reminded me of this: https://xkcd.com/927/
dang•3h ago
Related. Others?

Mill as a direct style build tool - https://news.ycombinator.com/item?id=43943792 - May 2025 (9 comments)

Why does Mill use Scala? - https://news.ycombinator.com/item?id=42997496 - Feb 2025 (75 comments)

Mill: A fast JVM build tool for Java and Scala - https://news.ycombinator.com/item?id=41967734 - Oct 2024 (162 comments)

What's So Special About the Mill Scala Build Tool - https://news.ycombinator.com/item?id=38877882 - Jan 2024 (1 comment)

Mill: A Build Tool Based on Pure Functional Programming - https://news.ycombinator.com/item?id=25925107 - Jan 2021 (1 comment)

Mill: Better Scala Builds - https://news.ycombinator.com/item?id=16775545 - April 2018 (16 comments)

spullara•3h ago
this is a horrific build file: https://github.com/swaldman/c3p0/blob/0.11.x/build.mill
billmcneale•2h ago
Yeah, hard to see how better this is than Gradle. If anything, it's worse by the mere fact this is Scala, but it's really so incredibly verbose to accomplish basic tasks such as upload to Sonatype.
spullara•2h ago
making it easier to generate maven poms I thought was a reasonable idea 18 years ago but gradle and other tools all went down the "making the build Turing complete" path.

https://github.com/spullara/graven/blob/master/pom.groovy

imoverclocked•19m ago
You can write bad code in any language. Don’t ask me how I know :)
frant-hartm•3h ago
I wonder what people use/need apart from the usual stuff in Maven nowadays.

In the last 5 years, I didn't need anything more than:

- resource plugin - compiler plugin - jar plugin (jars, test jars, javadoc jars) - surefire/failsafe - shade plugin for repackaging to avoid classpath hell - assemble plugin - license plugin

Most of the issues I had were with the shade/assemble/license plugins.

I consider myself a Maven power-user and like the tool compared to others (Gradle is too ant-like, resulting in non-standard builds, sbt is just a torture tool).

With time, I concluded that the simpler it is, the better.

debarshri•2h ago
I think you can make it 10 years. It is super robust. It just works for java stuff.
switchbak•1h ago
I've had the misfortune of having Maven forced on me for Scala projects, I just can't agree with you. The overhead of starting the compiler so often is a killer, and makes your builds much slower. Unless there's been some improvement of Zinc/Bloop/Etc with Maven since I've used it.

I think I would prefer to use Mill than Maven (I haven't used Mill myself) ... going through the video tutorial, it's clear that it's also a very simple system without some of the ancient baggage of Maven (xml, too many plugins, etc).

wellpast•1h ago
I agree 100%.

I've been around for a while, I've used many different build systems for JVM based builds (Java, Hybrid Java/Clojure, Scala) and Maven is by far the simplest most solid.

The basic reason is it's commitment to being declarative.

I understand why programmers want imperative (we're programmers) but it's just the wrong choice for a build system.

I've worked on many OSS projects. I've never pulled a Maven-based project that didn't immediately build and immediately load into my IDE. However for imperative based build systems (Gradle, Ant, now Mill) it's almost inevitable that you won't be able to get the build to work right away or pulled into your IDE in a sensible way (as IDEs cannot read imperative statemetns).

I've created many many build with Maven with many many different demands (polygot codebase, weird deployment artifacts, weird testing runtime needs, etc etc) and Maven has never let me down. Yes, in some cases I've had to write my own plugin but it was good that I had to do that; it forced me to ensure I really needed to -- the Maven plugin ecosystem is already great and covers 90+% of use cases of builds.

I've met a lot of Maven naysayers and the disdain is almost always either some weird aversion to XML (such a trivial reason to choose a worser build system) and/or because the programmer never took the time to understand the rather simple Maven runtime semantics and architecture.

ackfoobar•1h ago
> imperative based build systems (Gradle, Ant, now Mill)

Build code in Mill is pretty declarative. You're using the word to mean "not 'pure, serialized data'".

> IDEs cannot read imperative statemetns

They can, however, run the code to dump the structure.

It's easy for code to embed pure data; on the flip side it's hard to encode behaviour in serialized data. More often than custom Maven plugins I see people just drop down to using shell.

mindcrime•1h ago
Ya know, I've directed a lot of criticism at Maven over the years... and most of it well-founded, I believe, even in hindsight. And yet, today, I find that of all the Java build tools, Maven is my preferred one. Part of that is me, normalizing the pain of Maven in some regards, and part of that is places where they have improved the tool. But however you break it down, it is indeed the case that for the most part Maven "just works"™. That is, at least for Java. I don't do a lot of Scala or Kotlin or anything, so no comment there. And for Groovy, I'm usually doing Grails projects which default to Gradle, so I tend to use Gradle in that context. But for plain Java projects, I honestly find Maven to be the path of least resistance.
Taranovski•2h ago
Maintainability: Mill’s config and custom logic is written in concise type-checked JVM code - Inside - "why mill uses scala?" LOL))
octopoc•2h ago
IMO there should be one build system for each language and it should be good at the basics, and if you need more then you should write your own (minimal-dependency) build script in the same language as the code you're building, and in that system you do things like generate build files for the big, complicated thing you're trying to build.

In Java terms, if you have a big complicated Java repo that requires lots of steps to build, you should have a separate Java project in there just for building the main repo. That separate Java project should be built and run with maven, and that separate project can do all kinds of fancy things, but ultimately it will be generating maven projects or calling maven with special command line parameters or something like that.

I even put the logic for CI in my build project like this. It makes everything reproducible and debuggable. How cool is it to be able to put a breakpoint in your build script? How about stepping through your CI code? Things are way simpler this way.

I eschew frameworks in this custom build tool, because the build code should look conventional for whatever language it's written in.

zcw100•2h ago
I don't know why I don't see anyone ever mention JeKa. https://jeka.dev/

You don't have to learn a separate language or some weird config.

seanw444•2h ago
https://mill-build.org/mill/depth/parallelism.html#_mill_chr...

This is kinda funny. Generating a profile that is meant to be visualized with a web browser's built-in profiler, not even an HTML file. I guess if it's already built and works well ¯\_(ツ)_/¯

akazantsev•1h ago
That profiler is very powerful and used to analyze beasts like Android and Chromium. It's a pro, not a con.

https://ui.perfetto.dev

seanw444•57m ago
I had no clue it was its own independent, comprehensive project. Very cool.
switchbak•1h ago
Not a lot of love for Mill in these comments. I'm interested in what it has to offer.

I find SBT just has a lot of unnecessary abstractions and complexity. It's so opaque that I'm sure I'm leaving a lot of performance on the table with hidden antipatterns. Mill seems to solve that by being 'boring' (in a good way). Being able to trace what's happening in my IDE would be lovely - and something I don't have in SBT or Maven either.

Now that we also have fast running native CLI tooling, I think it's worth another look over SBT.

pi_22by7•1h ago
Honestly, I'm getting tired of the endless parade of "better" build tools. Maven works fine for most of what I do, even if it's occasionally painful. Gradle is... well, Gradle has its moments.

That said, Mill's performance claims sound interesting. If it really can cut build times by 3-6x, that's really amazing. I've wasted too much time in my life waiting for builds, especially on larger projects.

The Scala thing is a bit of a turn-off though. I get that you don't need to write Scala yourself, but now I'm dragging in the Scala ecosystem just to build my Java project? Feels heavy.

The IDE integration sounds nice in theory - being able to actually navigate and understand your build in IntelliJ would be pretty sweet.

Still not sure the switching costs are worth it unless you're really hitting Maven/Gradle pain points. But if I was starting a new project from scratch, might be worth a look.

le-mark•32m ago
When has build time been an issue though? Running tests have taken the most time by far on every project I’ve ever worked on.
HiPhish•1h ago
Is it bootstrappable? I mean really bootstrappable, not "the bootstrap script will download a binary from some server". This is where both Maven and Gradle fail (at least the last time I checked). Kotlin and Scala also have the problem that their compilers themselves are not bootstrappable either.
smrtinsert•53m ago
Please anything beyond gradle. Didn't hate maven but didn't love it either. Happy to investigate alternatives
elric•37m ago
Reading these comments I'm always amused by how different people/teams have radically different needs & preferences, and how other people seem to be dismissive of those. "I don't need anything more than maven", "maven is too slow", "if it's not bootstrappable I don't want it", "there should only be one ultimate build tool", "I hate programming my build", etc.

These opinions are all valid, but only if they don't discount the validity of other strategies. There is no universal law of optimal build practices. There are cases where build performance is critical, and others where it's not. There are cases where configurability is important, and there are cases where it's not. Etc.

Personally, I love having a programmable build in plain Java, which is why I enjoy bld [1] these days. I'm probably the only person you'll ever meet who actually enjoyed using ant, so you're welcome to take my opinion with as much salt as you need to digest that.

[1] https://rife2.com/bld

wiseowise•31m ago
> There are cases where build performance is critical, *and others where it's not.*

I'm curious about those.

Smar•24m ago
Often CI results are not put to use immediately, making build time irrelevant.
wiseowise•14m ago
So you're okay with waiting a day to get "linter error, you've put this on a wrong line, dumbass"?
kerblang•7m ago
Ant worked well because it was extremely _explicit_: You had to say what you wanted. This gave it a lot of flexibility. Unlike some other tools, you aren't running in front of a train trying to get it to stop and let you on. It doesn't go anywhere or do anything until you say so. The cost was pretty much zero defaults and a good bit of boilerplate.

I think a lot of people expected this from Gradle because the idea of "build as programming" seemed like it would give that stop-the-train-let-me-on-already ability. I don't know that it really worked out that way. Maven is all about running devs over, but it's faster than Gradle, which tries to start a daemon just like SBT.

Anyhow... this bld thing looks interesting, thanks...

lucumo•6m ago
> These opinions are all valid, but only if they don't discount the validity of other strategies.

I strongly agree with this as a general principle in nearly all technical discussions.

But also, if the discussion starts with declaring something is better than everything else (as the title here), then there's really no salvaging it anymore.

wiseowise•36m ago
I just want `uv`/`npm`/`crate` for JVM. Is that too much to ask?

Can someone from Astral fix Java too, please?

xg15•2m ago
Half expected this to be built in Rust...

Tyranny is an ever-present threat - How Classical Greece and China dealt with it

https://theconversation.com/tyranny-is-an-ever-present-threat-to-civilisations-heres-how-classical-greece-and-china-dealt-with-it-259680
3•consumer451•2m ago•0 comments

Training a Chunker with Burn

https://elijahpotter.dev/articles/training_a_chunker_with_burn
1•chilipepperhott•4m ago•0 comments

From Vibe Coding to Testing for Juniors

https://michaelbastos.com/blog/from-vibe-coding-to-verified-juniors-start-with-tests
1•mbastos•7m ago•1 comments

Fake Review Checker

1•FakeFind_ai•8m ago•0 comments

Does exercise improve mental health?

https://medicalxpress.com/news/2025-07-mental-health.html
1•PaulHoule•15m ago•0 comments

Once Upon a Pixel: How Crysis Changed Real-Time Lighting Forever [video]

https://www.youtube.com/watch?v=xq5hD4RGcYw
1•ibobev•16m ago•0 comments

Man eats mum's 22-year-old mince pies

https://www.bbc.co.uk/news/articles/ckgxl2xx018o
2•austinallegro•18m ago•0 comments

Runway – Act Two – motion capture model [video]

https://www.youtube.com/watch?v=JW8PHlFD7HM
1•ikerino•20m ago•0 comments

Let's Tidy Up State Government

https://statesforum.org/journal/issue-1/lets-tidy-up-state-government/
1•raybb•23m ago•0 comments

Tesla's change in bylaws to limit shareholder lawsuits slammed by NY officials

https://www.cnbc.com/2025/07/16/tesla-change-to-limit-shareholder-suits-slammed-by-new-york-officials.html
6•rntn•24m ago•3 comments

Metaflow: Build, Manage and Deploy AI/ML Systems

https://github.com/Netflix/metaflow
2•plokker•25m ago•0 comments

Manual vs. CNC machining as an analogy for manual vs. AI coding

https://actinium226.substack.com/p/manual-vs-cnc-machining-as-an-analogy
1•actinium226•26m ago•2 comments

Dollars per Token Considered Harmful

https://modal.com/blog/dollars-per-token-considered-harmful
4•emschwartz•27m ago•0 comments

Effects of exercise interventions in insomnia patients: review and meta-analysis

https://ebm.bmj.com/content/early/2025/07/09/bmjebm-2024-113512
1•gnabgib•28m ago•1 comments

Eswin Computing EBC77 RISC-V SBC to Support Ubuntu Linux

https://canonical.com/blog/eswin-computing-launches-the-ebc77-series-single-board-computer-with-ubuntu
2•fork-bomber•28m ago•0 comments

SFT Is Bad RL

https://justinchiu.netlify.app/blog/sftrl/
2•fofoz•30m ago•0 comments

Show HN: Debunkit.ai – Instantly Verify If News or Claims Are Real

1•debunkit_ai•31m ago•1 comments

Trump and the Energy Industry Are Eager to Power AI with Fossil Fuels

https://www.wired.com/story/trump-energy-industry-ai-fossil-fuels-pittsburgh-summit/
3•josefresco•32m ago•0 comments

DHS Faces New Pressure over DNA Taken from Immigrant Children

https://www.wired.com/story/dhs-and-doj-face-new-pressure-over-collecting-childrens-dna/
3•josefresco•33m ago•1 comments

A Recap on May/June Stability at Neon

https://neon.com/blog/an-apology-and-a-recap-on-may-june-stability
4•nikita•37m ago•0 comments

Show HN: I built an SDK for building an AI RAG app with Supabase and pgvector

https://github.com/supavec/supabase-ai
1•taishikato•37m ago•0 comments

Show HN: We made GPT-4.1-mini beat 4.1 at Tic-Tac-Toe using dynamic context

https://github.com/opper-ai/opper-cookbook/tree/main/examples/tictactoe-tournament
5•farouqaldori•38m ago•1 comments

Computer-vision, Pi3 and losing hackathons

https://mtende.blog/computer-vision-pi-waste
1•sonderotis•40m ago•0 comments

Helium 3

https://en.wikipedia.org/wiki/Helium-3
2•zafka•42m ago•3 comments

A New Chapter for Our Built World

https://bedrockrobotics.com/news/introducing-bedrock-robotics
3•pryz•43m ago•1 comments

Situated Software (2004)

https://web.archive.org/web/20040411202042/http://www.shirky.com/writings/situated_software.html
1•blackbrokkoli•46m ago•0 comments

A list of disposable email domains

https://github.com/disposable-email-domains/disposable-email-domains
3•taubek•46m ago•0 comments

Ask HN: Is it okay to stop chasing expertise?

4•grandimam•46m ago•3 comments

Young Graduates Are Facing an Employment Crisis

https://www.wsj.com/economy/jobs/jobs-unemployment-rise-young-people-ce4704d8
13•bdev12345•47m ago•2 comments

Least squares and least absolute deviations

https://niklasbuschmann.github.io/least-squares-least-absolute-deviation/
1•niklasbuschmann•48m ago•0 comments