@@ -12,6 +12,317 @@ endif::[]
12
12
_The changelog below is for tagged, stable releases. For unstable releases,
13
13
see the list at https://repo1.maven.org/maven2/com/lihaoyi/mill-dist_
14
14
15
+ [#1-0-0-RC1]
16
+ === 1.0.0-RC1 - 2025-05-25
17
+ :version: 1.0.0-RC1
18
+ :milestone-name: 1.0.0-RC1
19
+ :milestone: 115
20
+ :prev-version: 0.12.14
21
+
22
+ `1.0.0-RC1` is the first release candidate of the upcoming Mill 1.0.0 release. This is a major
23
+ backwards incompatible release that aims to clean up years of technical debt, and build a strong
24
+ technical foundation for the next few years of development. Any breakages or problems surfaced
25
+ by RC1 will be fixed in following RC releases, with the hope to release 1.0.0 final on 30 June
26
+ 2025. For any questions or discussion about `1.0.0-RC1`, please use the following thread:
27
+
28
+ - https://github.com/com-lihaoyi/mill/discussions/5189
29
+
30
+ Any Mill plugins you use will need to be re-published for Mill 1.0.0-RC1 if you would like to
31
+ try out the RC out in your builds, and re-published again for Mill 1.0.0 final (which may
32
+ have further changes and be incompatible with the RC1)
33
+
34
+ We expect it will take some work from projects on Mill 0.12.x or earlier to migrate to 1.0.0-RC1.
35
+ There are a lot of breaking changes in the release, but we hope that these breaking changes will
36
+ greatly simplify the Mill user experience going forward, and allow it to remain stable for more
37
+ years before further breaking changes are necessary. Updated docs are available on the Mill
38
+ doc-site's `main-branch` tab:
39
+
40
+ - https://mill-build.org/mill/main-branch/index.html
41
+
42
+ But for most people upgrading, the most relevant changes are listed in the changelog below:
43
+
44
+ * NOTE: Mill 1.0.0-RC1 (and all other versions since 0.12.13) requires an updated bootstrap
45
+ script in order to work, due to changes in Sonatype Central that forced a change in the
46
+ download URLs for new releases going forward. To update your bootstrap script, you can use
47
+
48
+ ```
49
+ # linux
50
+ curl -L https://repo1.maven.org/maven2/com/lihaoyi/mill-dist/1.0.0-RC1/mill-dist-1.0.0-RC1-mill.sh -o mill
51
+ chmod +x mill
52
+ echo 1.0.0-RC1 > .mill-version
53
+
54
+ # windows
55
+ curl -L https://repo1.maven.org/maven2/com/lihaoyi/mill-dist/1.0.0-RC1/mill-dist-1.0.0-RC1-mill.bat -o mill.bat
56
+ echo 1.0.0-RC1 > .mill-version
57
+ ```
58
+
59
+ ==== Major Breaking Changes
60
+
61
+ * `build.mill` and `package.mill` files are now written in Scala 3.7.0 ({link-pr}/3369[#3369]).
62
+ Any third-party libraries used must be Scala 3 compatible (most already are). You may now
63
+ use Scala 3 language features such as https://docs.scala-lang.org/scala3/reference/other-new-features/indentation.html[Optional Braces]
64
+ in your `.mill` files
65
+
66
+ ```scala
67
+ package build
68
+ import mill.*, javalib.*
69
+
70
+ object foo extends JavaModule:
71
+ def mvnDeps = Seq(
72
+ mvn"net.sourceforge.argparse4j:argparse4j:0.9.0",
73
+ mvn"org.thymeleaf:thymeleaf:3.1.1.RELEASE"
74
+ )
75
+
76
+ object test extends JavaTests with TestModule.Junit4:
77
+ def mvnDeps = Seq(
78
+ mvn"com.google.guava:guava:33.3.0-jre"
79
+ )
80
+ ```
81
+
82
+
83
+ * Mill now supports a YAML front-matter syntax (YAML version 1.2) in your root `build.mill`
84
+ file, defined by line comments starting with `//|` ({link-pr}/4969[#4969]). This replaces
85
+ the `import $ivy...` syntax and allows external configuration files like `.mill-version`,
86
+ `.mill-jvm-version`, etc. to be configured together e.g.
87
+
88
+ ```
89
+ //| mill-version: 1.0.0
90
+ //| mill-jvm-version: 17
91
+ //| repositories: [$PWD_URI/custom-repo]
92
+ //| mvnDeps:
93
+ //| - com.grack:nanojson:1.8-custom-test
94
+ //| - com.lihaoyi::scalatags:0.12.0
95
+
96
+ package build
97
+ ...
98
+ ```
99
+
100
+ * The YAML front-matter allows you to configure arbitrary tasks in the meta-build.
101
+ Above we show how to configure the `def repositories` and `def mvnDeps` tasks for the
102
+ meta-build, but other meta-build tasks can be configured as well (e.g.
103
+ `scalacOptions`) using the JSON version of the in-memory data structures.
104
+
105
+
106
+ * `ivyDeps` has been renamed to `mvnDeps`, along with all related tasks and methods
107
+ e.g. `compileIvyDeps` is now `compileMvnDeps`, `runIvyDeps` is now `runMvnDeps`, etc.
108
+ ({link-pr}/4930[#4930]).
109
+
110
+
111
+ * The `Agg()`/`Agg[T]` collection types have been removed and replaced by `Seq()`/`Seq[T]`
112
+ ({link-pr}/4525[#4525]). Aliases were left in place to ease in the migration, but you
113
+ should replace all usage of `Agg` with `Seq` and use `Seq` going forward
114
+
115
+
116
+ ```diff
117
+ -def ivyDeps = Agg(
118
+ +def mvnDeps = Seq(
119
+ mvn"org.scalameta::munit::0.7.29"
120
+ )
121
+ ```
122
+
123
+ * `import $file` has been removed and replaced by direct references to the
124
+ definitions ({link-pr}/4462[#4462]), e.g. if you have a `package build.foo.bar`
125
+ containing `def qux` you can refer to the definition via `build.foo.bar.qux`
126
+ or `import build.foo.bar.qux` without needing the `import $file`
127
+
128
+
129
+ ```diff
130
+ -import $file.foo.bar.Qux
131
+ +import build.foo.bar.Qux
132
+ ...Qux...
133
+ ```
134
+
135
+ * `mill.api.Ctx` is now `mill.define.TaskCtx`, and `mill.define.Ctx` is now `mill.define.ModuleCtx`,
136
+ to avoid confusion over the name `Ctx` being overloaded to refer to two different classes
137
+
138
+ * `interp.watch`, `interp.watchValue` and `mill.api.Workspace.workspaceRoot` have been moved
139
+ to a new `mill.define.BuildCtx` object that centralizes all these build-level APIs
140
+ ({link-pr}/5142[#5142])
141
+
142
+ * Many Task-related renamings in `mill.define`: `Target` -> `Task.Simple`, `TargetImpl` -> `Task.Computed`,
143
+ `Worker` -> `Task.Worker`, `Command` -> `Task.Command`, `AnonImpl` -> `Task.Anon`, `InputImpl` -> `Task.Input`,
144
+ `SourcesImpl` -> `Task.Sources`, `SourceImpl` -> `Task.Sources` ({link-pr}/5168[#5168]).
145
+
146
+ * `mill.testkit.TestBaseModule` has been renamed `mill.testkit.TestRootModule` ({link-pr}/5143[#5143]),
147
+ to make it clear it is meant to be the root of the module hierarchy
148
+
149
+ * The `T.*` methods have been removed. These were replaced by `Task.*` equivalents in 0.12.x.
150
+
151
+ ```diff
152
+ - def foo = T {
153
+ - ...T.dest...
154
+ - }
155
+ + def foo = Task{
156
+ + ...Task.dest...
157
+ + }
158
+ ```
159
+
160
+ * The terms `client`/`server` throughout the codebase have been renamed to `launcher`/`daemon` ({link-pr}/5135[#5135])
161
+
162
+ * Removed `PublishModule.publishSelfDependency` in favor of `artifactMetadata` ({link-pr}/5118[#5118])
163
+
164
+ * `os.*` filesystem operations are now restricted by default:
165
+
166
+ ** During the execution phase, Task implementations can only write
167
+ to their own `.dest` folder, and only read from their own or upstream `.dest` folders
168
+
169
+ ** During the Resolution phase, code running during module/task instantiation cannot
170
+ write to disk, and can only perform filesystem reads wrapped in `interp.watchValue` blocks
171
+
172
+ ** These restrictions are best effort guardrails to guide users towards best practices, and
173
+ are not intended to be a fully-hermetic sandbox. You can disable them via
174
+ `mill.define.BuildCtx.withFilesystemCheckerDisabled { ... }` if you need to do something
175
+ outside of the sandbox and are sure you know what you are doing.
176
+
177
+ * `build.mill` files are now compiled with a minimized classpath containing only
178
+ the necessary APIs, without all of Mill's internal code on the classpath
179
+ ({link-pr}/4879[#4879]).
180
+
181
+ ** The `build.mill` classpath has been consolidated under
182
+ the `mill-libs` artifact ({link-pr}/4967[#4967]), which should be used when
183
+ building plugins, rather than the `mill-dist` we were using before. All the "library"
184
+ code Mill provides to integrate language toolchains now has `libs-` in the artifact name,
185
+ e.g. `mill-libs-scalalib`, `mill-libs-kotlinlib`, etc.
186
+
187
+ ** `mill.resolve`, `mill.runner`, `mill.eval`, etc. are no longer on the classpath.
188
+ In general, a lot of Mill packages that were previously
189
+ on the classpath by happenstance have been removed, and only the core APIs you really
190
+ need remain exposed under `mill.api`, `mill.define`, `mill.util`, and the various
191
+ `mill.foolib` packages.
192
+
193
+ ** Similarly, many third-party libraries that were on the Mill classpath by happenstance
194
+ have been removed, and others that are not intended for public use are present at runtime
195
+ but removed from the compile-time classpath so you cannot compile against them in your
196
+ `build.mill` code. You can re-include any third party libraries you need
197
+ via the `//| mvnDeps: ` YAML header
198
+
199
+ ** `mill.api`, `mill.define` and `mill.util` have been re-organized. Many classes have been
200
+ moved around, so if your imports no longer compile you may need to try the other two packages
201
+ to see where the class ended up.
202
+
203
+ *** `mill.api` now contains `build.mill` code that has zero third-party dependencies
204
+ *** `mill.define` contains the code used in `build.mill` that has dependencies
205
+ *** `mill.util` contains code used in `build.mill` that is also used in other parts of Mill.
206
+
207
+ * Root modules in `build.mill` and `package.mill` files no longer need an explicit `extends RootModule`
208
+ superclass, as they can be identified unambiguously by the `object package` name, so
209
+ setting up the appropriate superclass is now taken care of by Mill automatically ({link-pr}/5008[#5008])
210
+
211
+ ```diff
212
+ -object `package` extends RootModule with JavaModule {
213
+ +object `package` extends JavaModule {
214
+ ...
215
+ }
216
+ ```
217
+
218
+ * `Jvm.*` methods to spawn subprocesses and classloaders have been consolidated from 20+ helpers
219
+ into 4 main functions ({link-pr}/4456[#4456]): `Jvm.createClassLoader`, `Jvm.withClassLoader`,
220
+ `Jvm.spawnProcess`, and `Jvm.callProcess`. These provide all the configurability you need for
221
+ most callsites in a much more consistent fashion than the previous grab-bag of helpers.
222
+
223
+ * `evaluator: Evaluator` Command parameters are now only available in commands marked
224
+ `exclusive = true` ({link-pr}/3717[#3717]). Furthermore, many previously-scattered
225
+ evaluation-related APIs have now been consolidated onto the `Evaluator` object:
226
+ `mill.main.RunScript` is now `Evaluator#evaluate`, `mill.resolve.Resolve.Foo` is now
227
+ `Evaluator#resolveFoo`, etc.
228
+
229
+ * `Task.Source`, `Task.Sources`, and `Task.Input` are no longer allowed to have upstream
230
+ tasks ({link-pr}/4524[#4524]). Most cases where a `Task.Sources` was receiving an upstream
231
+ task can be replaced by a separate `Task.Sources` and `Task{}`
232
+
233
+ ```diff
234
+ - def sources = Task.Sources{ super.sources() ++ Seq(PathRef(...)) }
235
+ + def customSources = Task.Sources(...)
236
+ + def sources = Task { super.sources() ++ customSources() }
237
+ ```
238
+
239
+ * Mill's plugin infrastructure has changed with the release of Mill 1.0.0: plugins now need
240
+ to use Scala 3.7.0, should now depend on `mill-libs` rather than `mill-dist`, and integration
241
+ and example tests should use a `MILL_LOCAL_TEST_OVERRIDE_CLASSPATH` environment variable
242
+ rather than the previous `mill/local-test-overrides` classpath resource. See the latest
243
+ documentation for how plugins are currently defined and published at
244
+ https://mill-build.org/mill/main-branch/extending/writing-plugins.html[Writing Mill Plugins]
245
+
246
+
247
+ ==== Other Changes
248
+
249
+ * Mill's bootstrap scripts now use the native launcher by the default, except for
250
+ Windows-ARM which is not supported by the Graal tooling we used to build these native
251
+ image. To use the JVM-based launcher, you need to explicitly use a `-jvm` suffix in
252
+ your `.mill-version` file e.g. `1.0.0-jvm`. We expect this should be mostly transparent
253
+ and have no visible impact to users.
254
+
255
+ * Mill's server-client model has been simplified, from having an elastic pool of JVM daemons
256
+ each connected to a single client at a time, to a single shared JVM that handles potentially
257
+ multiple client simultaneously ({link-pr}/5066[#5066]). This should result in reduced resource
258
+ usage when running Mill in multiple terminals.
259
+
260
+ ** Note that Mill still only processes
261
+ one command at a time, but it is possible to have multiple clients connected to the server
262
+ if e.g. one client is idle in `--watch` while the other client is running a command.
263
+
264
+ ** This fixes some long-standing bugs, e.g. `mill shutdown` used to only shutdown the first
265
+ process in the Mill daemon pool, whereas now
266
+ there is only one process which should get terminated correctly
267
+
268
+ * Mill's native launcher is able to run on systems without a JVM installed, and will
269
+ download an appropriate JVM distribution on demand if necessary ({link-pr}/4597[#4597])
270
+
271
+ * `Cross` can now be applied to root modules ({link-pr}/4593[#4593])
272
+
273
+ ```scala
274
+ object `package` extends Cross[FooModule]("3.6.2", "2.13.16") {
275
+ ...
276
+ }
277
+ ```
278
+
279
+ * Mill now supports a `--offline` option to run in offline mode.
280
+ Custom tasks that need to download remote resources should respect that mode via
281
+ the `Task.offline` API. ({link-pr}/4914[#4914])
282
+
283
+ * `def testParallelism` is set to `true` by default, letting Mill run multiple test classes
284
+ in parallel subprocesses even within the same module. Can be disabled by overriding
285
+ `def testParallelism = false` on the test module.
286
+
287
+ * `--watch` now uses filesystem change-notification APIs by default (inotify on Linux, fsevents
288
+ on OS-X, etc.) via the `os-lib-watch` module, rather than polling the filesystem for changes.
289
+ This should reduce significantly the baseline CPU usage when Mill is waiting for changes,
290
+ but can be disabled by explicitly passing `--notify-watch false` to the Mill launcher or
291
+ in the `.mill-opts` file if there are any issues with the new approach.
292
+
293
+ * Mill is now a lot stricter about avoid classloader and thread leaks, which should
294
+ help mitigate problems we've seen in the past with long-lived Mill processes becoming
295
+ unstable or unresponsive ({link-pr}/5079[#5079], {link-pr}/5080[#5080], {link-pr}/5082[#5082])
296
+
297
+ * Mill now uses uPickle 4.2.1, providing support for
298
+ https://docs.scala-lang.org/sips/named-tuples.html[Scala 3.7.0 Named Tuples]:
299
+
300
+ ```scala
301
+ import upickle.implicits.namedTuples.default.given
302
+ def namedTupleTask = Task {
303
+ (hello = "world", i = Seq("am", "cow"))
304
+ }
305
+ ```
306
+
307
+ * `def repositories: T[Seq[String]]` is now provided as a simpler alternative to
308
+ `def repositoriesTask`, making it easier to add the most common URL/file-based repositories
309
+ to your project. `repositoriesTask` still exists, but is now only necessary for
310
+ more complex custom repository setups beyond the simple cases that `repositories` supports.
311
+
312
+ * Lots of miscellaneous improvements:
313
+
314
+ ** BSP support and IDE integration ({link-pr}/4851[#4851],{link-pr}/4873[#4873],
315
+ {link-pr}/4876[#4876], {link-pr}/4881[#4881], {link-pr}/4873[#4873],
316
+ {link-pr}/4940[#4940], {link-pr}/4941[#4941])
317
+
318
+ ** Classloader and Thread leak prevention ({link-pr}/5079[#5079], {link-pr}/5082[#5082])
319
+
320
+ ** Android Support ({link-pr}/4485[#4485], {link-pr}/4540[#4540], {link-pr}/4583[#4583],
321
+ {link-pr}/4626[#4626], {link-pr}/4759[#4759], {link-pr}/4892[#4892], {link-pr}/4947[#4947],
322
+ {link-pr}/5013[#5013], {link-pr}/5053[#5053])
323
+
324
+ ** Kotlin Support ({link-pr}/4557[#4557], {link-pr}/4786[#4786], {link-pr}/4771[#4771],
325
+ {link-pr}/4779[#4779], {link-pr}/4797[#4797], {link-pr}/4963[#4963])
15
326
16
327
[#0-12-14]
17
328
=== 0.12.14 - 2025-05-20
@@ -110,6 +421,7 @@ published with some other suffix via `def extraPublish`
110
421
* Lots of Mill `main` branch compatibility changes, adding the new name and deprecating the old one
111
422
({link-pr}/4838[#4838], {link-pr}/4840[#4840], {link-pr}/4843[#4843], {link-pr}/5005[#5005])
112
423
424
+
113
425
[#0-12-10]
114
426
=== 0.12.10 - 2025-04-01
115
427
:version: 0.12.10
0 commit comments