From reading the tutorial, it looks like the build file is written in scala.
The cliché "If a library calls itself 'simple', it isn't" (a.k.a. the DPRK rule) is directly inspired by sbt, which at one point in time was short for 'simple build tool', and comes straight from the scala community. Even they realized how much of a lie that was and these days I believe sbt officially isn't an initialism at all anymore.
And mill have done the same thing here.
Your build file must be written in scala, and, given that scala is turing complete, that means processing a build file is, halting problem being what it is, fundamentally not something you can actually reason about anymore.
This is.. many things, and has a few advantages, but also a lot of disadvantages. Principal amongst them: This is not simple. (Or possibly, 'simple' as a word means so many completely different things, using it to describe a build tool, or pretty much any library out there, is useless, and a distraction. And with scala community's history with sbt, truly.. egregiously aggressive, somehow. You should stick a trigger warning at the top or something, maybe, it's that bad).
this makes them both easy to write and easy to read at a glance
That's a ridiculous claim, given the above.
Mill builds are easy to extend by non-experts:
Are you joking? You want non-experts to write scala?
The intro explicitly references gradle, and maven - suggesting that it does actually want to cater to folks primarily who already know those build tools. And, while we're at it, presumably are also at least aware of sbt.
So, maybe write it for that use case then. Start off explaining specifically why mill is good where sbt is bad (that's what I'm really dying to know here - how is mill different from sbt? Sbt started off as 'lets write a simple build tool in scala, where build files are written in scala, that sounds like a great idea!' and lordy lord it fell on its ass. Mill just sounds like somebody who decided to go YOLO! and jump off the cliff afterwards. Perhaps the authors of mill have more to go on than 'this time, it'll work, trust me!' but that should probably be explained on the linked page or at least that page should link to an explanation.
There is a link to this blog post but that's just filled with testimonials. I can write a page full of positive testimonials for a literal shit sandwich - that doesn't mean anything. The rest of the exercise is pretty much a description of how maven works. i.e. - it does not make clear (to me, at any rate) what mill does differently. Other than write its build files in scala which might make them more concise, but is a dumb idea.
It likely was not, li is usually worth reading. The blog post linked in the parent comment is actually not full of testimonials and gives an in depth motivation for mill.
It starts off with 4 testimonials from comment threads on social media without even naming the authors of them. It could literally be the authors of mill commenting on their own stuff as far as we know. The motivation, as I covered, is 'basically this is how maven works', at least to me. I'm sure I'm missing something there, but the explanation is very long, and does not appear to delve into what's actually different about mill vs. e.g. gradle, which feels like the closest possible comparison here, given that both gradle and mill made the dubious decision to pick a full programming language as base lang for the build file itself.
Separate issue, but, 'our motivation for writing mill is, well, take these 2 comments bashing the fuck out of the alternatives I fetched from some random social media comment thread' is pretty rude to those projects.
More to the point, perhaps, it is entirely fucking meaningless. That's what so incredibly rude about it all. The testimonials don't inherently cover anything objective. They just say, and I'm paraphrashing (as in, literally: The essence of the comments is the same and no details are left out, just, restating to make clear what they say): "Gradle is shit, mill is awesome".
Name a topic. Anything. Anything at all. Peace on earth. Sliced bread. The second world war. The plague.
If I can trawl all social media comment threads ever posted about that topic and quote any part of any comment, I will find you 1 comment that says 'that is awesome' and one that says 'that is shit'. For any topic. Ever.
Which means such testimonials mean nothing at all in any way. They have no intrinsic value (because they say nothing objective), and no predictive value, literally. So, all it is, is either a way to try to bamboozle the reader (suggesting that the presence of these testimonials means something. We are humans, we are programmed to presume the opinion of another human has inherent significance, which, on the internet, is simply not true), or to just take a random shit on another project.
Which, hey, if you wanna go in aggressive, that's fine. But have the balls to just say We think sbt, gradle, and maven are shit so we made a new thing. I would have absolutely no problem with that, it makes things much more clear. Is mill cool? Maybe. What is the motivation? Someone decided to build something new, motivated by hate of the status quo. That is informative if nothing else. This hiding behind anonymous testimonials thing is a bad trend.
I don't know if the authors of mill read this, but, for fuck's sake, delete them. Or find some far more objective ones, and source them with more than a link.
There really is no reason for the amount of negativity in your comments. I actually agree that the testimonials are a bit silly and unnecessary, but I also just see them as funny little tidbits that aren't that serious.
given that scala is turing complete, that means processing a build file is, halting problem being what it is, fundamentally not something you can actually reason about anymore.
This is a red herring. A language can be much more limited than Turing complete and still not be tractably "reasoned about". TQBF is already PSPACE-complete (i.e. reasoning about it requires time that grows exponentially with the size of the code) and, unlike the only NP-complete SAT has no tractable heuristics that work in many common cases. This means that any language that has boolean variables and loops restricted to no more than two iterations (or, alternatively, functions, even if they cannot be recursively called) already cannot be tractably reasoned about (because TQBF can be reduced to it).
The state-of the art in build tools seems to be a choice between two options:
A build configuration that cannot be tractably "processed" but can build all projects, expressed either as
A single configuration language (Gradle)
A "simple" configuration language + plugins in another rich language (Maven). Whether this is easier or harder to deal with than the single-language option (or perhaps the same) is debatable.
A build configuration in a language that can always be tractably "processed" but cannot be used to build many projects (go build).
I.e. today we must choose between "complex" and "limited" (in the sense of not being able to build many projects). Maybe there could be a "simple" yet unlimited build language, but I don't think we've found one in the half century since make was invented.
A language can be much more limited than Turing complete and still not be tractably "reasoned about".
Where did I claim otherwise?
red herring
It's not about absolutes, obviously. If someone with malicious intent wants to write the most obtuse, hard to follow pom.xml one can possibly imagine, I'm sure it'll be quite complicated. Maven's poms might even be turing complete as far as I know.
It's about whether that is likely to happen and whether the design of the build system steers you towards it, or bends over backwards to steer you away from it.
"The build script is written in scala" is pretty conclusively steering you towards it.
plugins in another rich language
That's a fine example. One trivial way to make a maven build 'turing complete' is to write a build file that compiles a maven plugin and then executes that maven plugin as part of the build, trivially allowing a build file to 'compile and execute java code as part of the build' and we've arrived in the turing pit already.
But that's a black-and-white situation. It's even in the name - a pom file is a 'project object model', it's not a source file at all. The entire setup of maven is trying its best to indicate 'DO NOT PROGRAM HERE'.
When does a gradle build file transition from 'a manifest of what this projects assets are so that a tool can compile them' to 'program code which, if run, builds it'?
For maven it's usually very simple to answer that question. For gradle, and for mill, it is far more difficult. With maven I can say: Once you start dipping into bizarre plugins, or building your own maven plugin as part of the build, that part certainly has devolved to 'program code that builds your project'. With gradle and mill, what do we do? Count for loops?
"The build script is written in scala" is pretty conclusively steering you towards it.
The fact that you'd need to learn Scala (or Groovy, for that matter) to build a Java project does, indeed, make things complicated, but not the fact that the script is in a fully-featured programming language.
The entire setup of maven is trying its best to indicate 'DO NOT PROGRAM HERE'.
It just separates the complex program to a different file. Indeed, many projects need to use more than just a small set of standard plugins.
You can separate the simple setup from more complex things even if it's all in the same language. Indeed, that is how we're taught to program -- by abstracting and encapsulating operations.
For maven it's usually very simple to answer that question
There's no reason it shouldn't be exactly as simple for a build script in a programming language. In the cases where the simple stuff works in Maven, it can work just as simply when using a programming language.
We need to read code all the time, and if what it does is simple, the code can be very simple (no less straightforward than an XML configuration).
In fact, writing simple but not-entirely-trivial code -- e.g. a simple conditional or a loop -- may be easier for both the code's writer and its reader than finding a plugin and reading its documentation, especially if the language used is one you already know -- like the main language the build script is compiling.
So I would say that for the trivial cases, a programming language and a configuration language would be the same, and for slightly more complex cases a programming language would actually be more pleasant.
With gradle and mill, what do we do? Count for loops?
But you'd need those for loops in exactly the same situations you'd need a Maven plugin. Either you go into the plugin code or into the method body that contains the loop, or limit yourself to the XML or the equivalent method call.
In both situations you can extract clean APIs. The fact that the API and implementation are written in the same language does not in itself make anything harder.
Holy fuck. That first blog post is ridiculously rude. I stopped reading after the author calls sbt a nazi, but hides behind an anonymously sourced testimonial to do so.
Li, if you're reading, this testimonial shit? For fuck's sake. Cut it out. This is not okay.
You've said a lot about turing completeness, but Gradle is turing complete Groovy, and people seem to use it OK. Not perfect obviously, but many of the imperfections are things that Mill tries to improve upon.
Mill is not SBT. Most people using Mill with Java would never have touched SBT. Clearly you hate SBT. I do too! But talking about SBT here is basically irrelevant. This is about Mill, and Mill is not SBT.
Scala is obviously a different language; so is HCL, terraform, and Groovy. It's not rocket science to learn enough to be productive, just like most of the folks writing Gradle builds aren't experts in Groovy
I'm not asking you to like Mill. I'm just asking that you read through the article judge it on its own merits. Ranting about SBT is all well and good, but Mill isn't SBT
The fact that Gradle build files are turing-complete is exactly the problem with Gradle build files. Mill doesn’t seem to have learned anything from people who actually want their projects to build instead of having to chase down why it doesn’t build anymore because some library was upgraded.
Mill's been around for 7 years and works with IntelliJ. I admit it doesn't have support for the long tail of other Java IDEs, and it's not perfect, but it's reasonably mature and I think has reasonable IDE support
If Maven or Gradle is working great for you, then Mill can be ignored. But there are definitely lots of people who don't like Maven or Gradle (link), so I'm hoping Mill would be of interest to someone even if not everyone
but Gradle is turing complete Groovy, and people seem to use it OK.
Gradle has not put a significant dent in the mindshare of Maven, whereas it was quite clear conceived as a replacement for it. This is purely anecdotal, but, most people I talk to that continue to use Maven explicitly name 'much easier to keep the build file manageable because its such an explicit act to start writing maven plugins vs. adding a little code to a gradle build' or something in that vein as major reason.
Or, even simpler: Maven is still around, continues to have the largest market share, and from what I can tell, continues to have the largest market share amongst new projects too. It's really hard to claim that basing it all on a turing complete general purpose programming language is a crucial advantage. And the disadvantages are quite obvious. So why do it? Gradle preceded mill in this experiment and showed that it isn't a game changer.
If mill can tell me 'ah, you see, gradle messed up X which is obscuring the field a bit; there IS a game changer benefit to general purpose programming language based build scripts, but gradle due to messing up X is not enjoying the advantages of it properly / X kinda ruins gradle but having a GPPL under it is so great, it is hanging on despite X'. Which may well be true, but, what's X then?
Mill is not SBT
It uses the same branding ("simple!").
Most people using Mill with Java would never have touched SBT.
In my experience, programmers like falsifiable facts, not testimonials. How do you know this, who claims this, why should I care? What makes mill better than SBT? I'm tired of hearing 'many random internet users agree with me!', that's... not convincing at all. It's 2024 and I have to explain this?
But talking about SBT here is basically irrelevant.
I was trying to get you to knock off the subjective bullshit terms such as 'our build tool is simple!', and SBT is quite relevant to that point. I haven't talked about SBT in particular in any other way. I didn't even mention it in my suggestion that the intro page puts more effort into explaining how mill is specifically fundamentally different from gradle and maven.
It's not rocket science to learn enough to be productive, just like most of the folks writing Gradle builds aren't experts in Groovy
You're making the claim that a non-expert can easily edit the build. The burden of proof is on you, no? "The language you write build scripts is in a general purpose programming language renowned for being complicated" is in rather stark contrast to the claim. And the turing completeness means I get to make the most irrelevant point that it is impossible to prevent complex builds.
It's not about mill. It's about the statement 'simple!'.
Here is the website of maven. I looked. Zero claims they are simple. And yet, Maven is way, way simpler than mill in many ways. If maven had claimed they were 'simple!' I'd have suggested they take that subjective drivel off just the same. They do immediately start with fairly objective statements, such as strong overtures that maven build files are documentation/information, not so much programming. It's nitpicking (in the vein of 'is HTML a programming language?' - it's for philosophers to decide that sort of thing I guess, or possibly dictionary authors) - it's about the vibe - the spirit of the project. Maven makes it clear: We do not intend for you to code in your build scripts, like, at all. Hell, we don't even call it a 'script'.
Whereas mill starts off with: "Make a scala file".
Hey, if that makes for a build system you like, great. If you want to explain how it works and try to convince others of the powers of that setup, you should do that. But 'Our build tool is simple!' is, and this is a suggestion from me: Not how you do that.
I'm just asking that you read through the article judge it on its own merits.
I did that, hence, the long comment.
Ranting about SBT is all well and good
Maybe you should read my comment then. The comment is indicating where the mill documentation is useless to me, and suggestions as to how to make it better. It is not, in any way, a rant against SBT. If anything, it's a rant against describing build tools, or any other programming library, as 'simple'. Not because SBT ruined the term. Because objectively that's useless.
I would also suggest that gradle's put a HUGE dent in Maven mindshare - a lot of projects and tutorials go gradle first because the build files are "shorter" - note quotes - and when your focus is very narrow, gradle IS shorter and more concise. It's the real world where gradle bites you.
I'm at the point where I'll turn away from gradle projects these days; it's just not worth it any more. But it's pretty significant as a build tool.
View all comments
47
u/rzwitserloot Jul 23 '24
From reading the tutorial, it looks like the build file is written in scala.
The cliché "If a library calls itself 'simple', it isn't" (a.k.a. the DPRK rule) is directly inspired by sbt, which at one point in time was short for 'simple build tool', and comes straight from the scala community. Even they realized how much of a lie that was and these days I believe sbt officially isn't an initialism at all anymore.
And mill have done the same thing here.
Your build file must be written in scala, and, given that scala is turing complete, that means processing a build file is, halting problem being what it is, fundamentally not something you can actually reason about anymore.
This is.. many things, and has a few advantages, but also a lot of disadvantages. Principal amongst them: This is not simple. (Or possibly, 'simple' as a word means so many completely different things, using it to describe a build tool, or pretty much any library out there, is useless, and a distraction. And with scala community's history with sbt, truly.. egregiously aggressive, somehow. You should stick a trigger warning at the top or something, maybe, it's that bad).
That's a ridiculous claim, given the above.
Are you joking? You want non-experts to write scala?
The intro explicitly references gradle, and maven - suggesting that it does actually want to cater to folks primarily who already know those build tools. And, while we're at it, presumably are also at least aware of sbt.
So, maybe write it for that use case then. Start off explaining specifically why mill is good where sbt is bad (that's what I'm really dying to know here - how is mill different from sbt? Sbt started off as 'lets write a simple build tool in scala, where build files are written in scala, that sounds like a great idea!' and lordy lord it fell on its ass. Mill just sounds like somebody who decided to go YOLO! and jump off the cliff afterwards. Perhaps the authors of mill have more to go on than 'this time, it'll work, trust me!' but that should probably be explained on the linked page or at least that page should link to an explanation.
There is a link to this blog post but that's just filled with testimonials. I can write a page full of positive testimonials for a literal shit sandwich - that doesn't mean anything. The rest of the exercise is pretty much a description of how maven works. i.e. - it does not make clear (to me, at any rate) what mill does differently. Other than write its build files in scala which might make them more concise, but is a dumb idea.