Skip to content

Commit a132f8a

Browse files
authored
Rename MillServerMain to MillDaemonMain (#5089)
This brings the terminology in line with the package and module name, and away from the name "server" which can be confusing
1 parent 9a8f7de commit a132f8a

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

core/api/src/mill/api/MillException.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package mill.api
22

33
/**
4-
* This exception is specifically handled in [[mill.runner.MillMain]] and [[mill.runner.MillServerMain]]. You can use it, if you need to exit Mill with a nice error message.
4+
* This exception is specifically handled in [[mill.runner.MillMain]] and [[mill.runner.MillDaemonMain]]. You can use it, if you need to exit Mill with a nice error message.
55
* @param msg The error message, to be displayed to the user.
66
*/
77
class MillException(msg: String) extends Exception(msg)

core/define/src/mill/define/Task.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ object Task extends TaskBase {
149149
* [[Worker]] is a [[NamedTask]] that lives entirely in-memory, defined using
150150
* `Task.Worker{...}`. The value returned by `Task.Worker{...}` is long-lived,
151151
* persisting as long as the Mill process is kept alive (e.g. via `--watch`,
152-
* or via its default `MillServerMain` server process). This allows the user to
152+
* or via its default `MillDaemonMain` server process). This allows the user to
153153
* perform in-memory caching that is even more aggressive than the disk-based
154154
* caching enabled by [[PersistentImpl]]: your [[Worker]] can cache running
155155
* sub-processes, JVM Classloaders with JITed code, and all sorts of things

runner/daemon/src/mill/daemon/MillServerMain.scala renamed to runner/daemon/src/mill/daemon/MillDaemonMain.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import sun.misc.{Signal, SignalHandler}
88

99
import scala.util.Try
1010

11-
object MillServerMain {
11+
object MillDaemonMain {
1212
def main(args0: Array[String]): Unit = mill.define.SystemStreams.withTopLevelSystemStreamProxy {
1313
// Disable SIGINT interrupt signal in the Mill server.
1414
//
@@ -27,14 +27,14 @@ object MillServerMain {
2727
val acceptTimeoutMillis =
2828
Try(System.getProperty("mill.server_timeout").toInt).getOrElse(30 * 60 * 1000) // 30 minutes
2929

30-
new MillServerMain(
30+
new MillDaemonMain(
3131
serverDir = os.Path(args0(0)),
3232
acceptTimeoutMillis = acceptTimeoutMillis,
3333
Locks.files(args0(0))
3434
).run()
3535
}
3636
}
37-
class MillServerMain(
37+
class MillDaemonMain(
3838
serverDir: os.Path,
3939
acceptTimeoutMillis: Int,
4040
locks: Locks

runner/launcher/src/mill/launcher/MillProcessLauncher.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ static int launchMillNoServer(String[] args) throws Exception {
5959
static void launchMillServer(Path serverDir) throws Exception {
6060
List<String> l = new ArrayList<>();
6161
l.addAll(millLaunchJvmCommand());
62-
l.add("mill.daemon.MillServerMain");
62+
l.add("mill.daemon.MillDaemonMain");
6363
l.add(serverDir.toFile().getCanonicalPath());
6464

6565
ProcessBuilder builder = new ProcessBuilder()

website/blog/modules/ROOT/pages/7-graal-native-executables.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ _Executable Assembly_
409409
----
410410
$ jps
411411
58547 MillMain
412-
86276 MillServerMain
412+
86276 MillDaemonMain
413413
24895 Jps
414414
9263 Foo
415415
1071 Main
@@ -424,7 +424,7 @@ _Native Image_
424424
----
425425
$ ps aux | grep native-executable
426426
lihaoyi 43880 46.1 0.1 408681792 30176 s000 S+ 3:40PM 0:05.84 ./out/foo/nativeImage.dest/native-executable --text hello-world
427-
lihaoyi 86276 0.0 2.1 420349904 720416 s000 S 3:14PM 1:00.88 /Library/Java/JavaVirtualMachines/amazon-corretto-17.jdk/Contents/Home/bin/java -cp /Users/lihaoyi/.cache/mill/download/0.12.5-68-e4bf78 mill.runner.MillServerMain /Users/lihaoyi/Github/mill/blog/modules/ROOT/attachments/7-graal-native-executables/out/mill-server/aa508f0984fd2811f6c6d8fae1362f1774e4f5f7-1
427+
lihaoyi 86276 0.0 2.1 420349904 720416 s000 S 3:14PM 1:00.88 /Library/Java/JavaVirtualMachines/amazon-corretto-17.jdk/Contents/Home/bin/java -cp /Users/lihaoyi/.cache/mill/download/0.12.5-68-e4bf78 mill.runner.MillDaemonMain /Users/lihaoyi/Github/mill/blog/modules/ROOT/attachments/7-graal-native-executables/out/mill-server/aa508f0984fd2811f6c6d8fae1362f1774e4f5f7-1
428428
lihaoyi 48496 0.0 0.0 408626896 1376 s002 S+ 3:40PM 0:00.00 grep native-executable
429429
430430
$ top | grep 43880

website/docs/modules/ROOT/pages/depth/process-architecture.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ digraph G {
5353
subgraph cluster_server {
5454
label = "mill server";
5555
"PromptLogger"
56-
"MillServerMain"
56+
"MillDaemonMain"
5757
"Evaluator"
5858
"ServerSocket"
5959
@@ -78,10 +78,10 @@ digraph G {
7878
}
7979
8080
81-
"runArgs" -> "MillServerMain"
82-
"MillServerMain" -> "Evaluator" [dir=both]
81+
"runArgs" -> "MillDaemonMain"
82+
"MillDaemonMain" -> "Evaluator" [dir=both]
8383
"ServerSocket" -> "PromptLogger" [dir=back]
84-
"exitCode" -> "MillServerMain" [dir=back]
84+
"exitCode" -> "MillDaemonMain" [dir=back]
8585
"MillLauncherMain" -> "exitCode" [dir=back]
8686
"Socket" -> "socketPort" [dir=both]
8787
"socketPort" -> "ServerSocket" [dir=both]

0 commit comments

Comments
 (0)