Skip to content

Commit 633c4f9

Browse files
authored
Doc & Test Suite tweaks (#4023)
Add some subheadings to break up the large page
1 parent 5ca7abb commit 633c4f9

File tree

5 files changed

+21
-11
lines changed

5 files changed

+21
-11
lines changed

.github/workflows/run-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ jobs:
136136
- java-version: '11'
137137
millargs: '"{main,scalalib,bsp}.__.testCached"'
138138
- java-version: '11'
139-
millargs: '"example.scalalib.{basic,web}.__.fork.testCached"'
139+
millargs: '"example.scalalib.basic.__.fork.testCached"'
140140
- java-version: 17
141141
millargs: "'integration.{feature,failure}[_].fork.testCached'"
142142
- java-version: '11'

docs/modules/ROOT/pages/comparisons/java-compile.adoc

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Doing some ad-hoc benchmarks, we find that although the compiler is blazing fast
1212
build tools add significant overhead over compiling Java directly:
1313

1414
|===
15-
| Mockito Core | Time | Compiler lines/s | Multiplier | Netty Common | Time | Compiler lines/s | Multiplier
15+
| Mockito Core | Time | Compiler lines/s | Slowdown | Netty Common | Time | Compiler lines/s | Slowdown
1616
| Javac Hot | 0.36s | 115,600 | 1.0x | Javac Hot | 0.29s | 102,500 | 1.0x
1717
| Javac Cold | 1.29s | 32,200 | 4.4x | Javac Cold | 1.62s | 18,300 | 5.6x
1818
| Mill | 1.20s | 34,700 | 4.1x | Mill | 1.11s | 26,800 | 3.8x
@@ -275,10 +275,16 @@ $ ./mill clean common; time ./mill common.compile
275275
1.11s
276276
```
277277

278+
These benchmarks are run in similar conditions as those we saw earlier: ad-hoc on my M1
279+
Macbook Pro, with the metadata and jars of all third-party dependencies already downloaded and
280+
cached locally. So the time we are seeing above is purely the Java compilation + the overhead
281+
of the build tool realizing it doesn't need to do anything except compile the Java source code
282+
using the dependencies we already have on disk.
283+
278284
Tabulating this all together gives us the table we saw at the start of this page:
279285

280286
|===
281-
| Mockito Core | Time | Compiler lines/s | Multiplier | Netty Common | Time | Compiler lines/s | Multiplier
287+
| Mockito Core | Time | Compiler lines/s | Slowdown | Netty Common | Time | Compiler lines/s | Slowdown
282288
| Javac Hot | 0.36s | 115,600 | 1.0x | Javac Hot | 0.29s | 102,500 | 1.0x
283289
| Javac Cold | 1.29s | 32,200 | 4.4x | Javac Cold | 1.62s | 18,300 | 5.6x
284290
| Mill | 1.20s | 34,700 | 4.1x | Mill | 1.11s | 26,800 | 3.8x

docs/modules/ROOT/pages/index.adoc

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ helps keep builds clean and understandable
1515
* Mill is an easier alternative to https://bazel.build/[Bazel]
1616
for xref:depth/large-builds.adoc[large multi-language monorepos] with hundreds of modules
1717
18-
To get started using Mill for projects in each language:
18+
To get started using Mill, see the language-specific introductory documentation linked below:
1919

2020
[cols="1a,1a,1a"]
2121
|===
@@ -24,6 +24,8 @@ To get started using Mill for projects in each language:
2424
| xref:kotlinlib/intro.adoc[image:index/iconscout-kotlin.svg[kotlin,32] Kotlin with Mill]
2525
|===
2626

27+
=== Why Mill?
28+
2729
Although the Java compiler is very fast and the Java language is easy to learn,
2830
JVM build tools have a reputation for being sluggish and confusing. Mill tries to
2931
offer a better alternative, letting your build system take full advantage of the
@@ -72,8 +74,10 @@ https://github.com/com-lihaoyi/Ammonite[Ammonite REPL], and the
7274
https://github.com/SpinalHDL/SpinalHDL[SpinalHDL] and
7375
https://github.com/chipsalliance/chisel[Chisel] hardware design frameworks.
7476
Mill can be used for applications built on top of common JVM frameworks like
75-
xref:javalib/web-examples.adoc#_spring_boot_todomvc_app[Spring Boot] or
76-
xref:javalib/web-examples.adoc#_micronaut_todomvc_app[Micronaut].
77+
Spring Boot (both xref:javalib/web-examples.adoc#_spring_boot_todomvc_app[in Java]
78+
and xref:kotlinlib/web-examples.adoc#_spring_boot_todomvc_app[in Kotlin]),
79+
xref:javalib/web-examples.adoc#_micronaut_todomvc_app[Micronaut],
80+
or xref:kotlinlib/web-examples.adoc#_ktor_todomvc_app[Ktor].
7781

7882
Mill borrows ideas from other tools like https://maven.apache.org/[Maven],
7983
https://gradle.org/[Gradle], https://bazel.build/[Bazel], but tries to learn from the
@@ -88,7 +92,7 @@ build tools, check out these pages:
8892
| xref:comparisons/sbt.adoc[image:index/sbt.png[sbt,32] Mill vs SBT]
8993
|===
9094

91-
95+
=== Contributing and Community
9296

9397
If you want to contribute to Mill, or are interested in the fundamental ideas behind
9498
Mill rather than the user-facing benefits discussed above, check out the page on
@@ -101,7 +105,7 @@ they are interesting:
101105
To engage Mill with the community, you can use the channels below:
102106

103107
* https://github.com/com-lihaoyi/mill/discussions[Mill Github Discussions]
104-
* https://discord.com/invite/scala[Scala Discord], in the TOOLING#mill channel
108+
* https://discord.com/invite/scala[Scala Discord], in the `TOOLING#mill` channel
105109

106110
Mill maintains an open list of issue bounties below, with payouts ranging from
107111
500USD to 3000USD per issue. Feel free to look through the list and try your

example/extending/jvmcode/6-module-cached-classloader/bar/src/Bar.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package bar;
22

3-
import java.io.IOException;
43
import java.nio.file.*;
54
import java.util.Arrays;
65
import java.util.stream.Collectors;
@@ -13,7 +12,8 @@ public class Bar {
1312
static String mangledText;
1413
static Path fileDest;
1514

16-
public static void main(String[] args) throws IOException {
15+
public static void main(String[] args) throws Exception {
16+
Thread.sleep(1000); // Simulate a slow program that takes some time
1717
dest = Paths.get(args[0]);
1818
sources = Arrays.<String>copyOfRange(args, 1, args.length);
1919
for (String sourceStr : sources) {

main/server/test/src/mill/main/server/ClientServerTests.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ object ClientServerTests extends TestSuite {
172172
// Make sure if we delete the out dir, the server notices and exits
173173
Thread.sleep(500)
174174
os.remove.all(res3.outDir)
175-
Thread.sleep(500)
175+
Thread.sleep(1000)
176176

177177
assert(res3.logsFor("serverId file missing") == Seq("server-1"))
178178
assert(res3.logsFor("exiting server") == Seq("server-1", "server-1"))

0 commit comments

Comments
 (0)