Releases: com-lihaoyi/mill
0.11.2
Merged Pull Requests
- Added 0.11.1 to MiMa baselines by @lefou in #2631
- Differentiate by Mill version when selecting a server worker by @lefou in #2639
- Define reasonable
platformSuffix
inMillBuildPlatformModule
by @lefou in #2635 - Add mill-aliases plugin to third-party docs. by @carlosedp in #2644
- use bspCompileClassesPath in bspTransitiveCompileClasspath by @pieter-bos in #2646
- Update zinc to 1.9.2 by @lefou in #2645
- deps: update semanticdb to 4.8.1 by @ckipp01 in #2653
- Document
.config/mill-version
support by @lefou in #2652 - Update mill.bat to millw 0.4.7 by @lefou in #2651
- Update LICENSE to use Github template by @lolgab in #2657
- Avoid intermediate mapping in ZincWorkerImpl by @lolgab in #2661
- Docs: Added section for mill-spring-boot plugin by @lefou in #2666
- Docs: Fix real world Mill examples section by @lefou in #2667
- Update coursier to 2.1.5 by @lefou in #2671
- Update zinc to 1.9.3 by @lefou in #2668
- Update scalafmt to 3.7.10 by @lefou in #2670
- Tooling: Use scalafmt 3.7.10 by @lefou in #2669
- Update upickle to 3.1.2 by @lefou in #2672
- Fix
init
command and support running Mill without existingbuild.sc
by @lefou in #2662 - Reworked installation documentation by @lefou in #2676
- Bytecode reachability analysis for fine-grained target invalidation by @lihaoyi in #2417
- Add a CONTRIBUTING document by @lefou in #2677
- Add test for buildinfo with ScalaJS without special settings by @lolgab in #2577
- Fix line numbers in errors for scripts starting with leading comments or whitespace by @lihaoyi in #2686
- #2673 doc - use maven through corporate proxy by @Quafadas in #2684
- Update Scala for some workers to 2.12.18 by @lefou in #2679
- Fix redirection of stdout stream to stderr when using
show
by @lihaoyi in #2689 - Add Code of Conduct by @lefou in #2678
- Use original
Evaluator
s to preserve their association with modules in BSP to avoid using the wrong evaluator by @lihaoyi in #2692 - Rebootstrap Mill on top of 0.11.1-30-ead8bb by @lihaoyi in #2696
- Tweak examples and visualize rendering by @lihaoyi in #2697
- Derived new GenIdea module to support meta-builds by @lefou in #2638
- Render asciidoc varible in usage example by @lefou in #2698
- Update Mill version to 0.11.1-33-6635d2 by @lefou in #2699
- Don't fetch sources when not explicitly requested for by @lefou in #2701
- Avoid having the mill-launcher jar twice on the classpath by @lefou in #2702
- Update coursier to 2.1.6 to mitigate CVE-2022-46751 by @lefou in #2705
- Update junixsocket to 2.7.0 by @lefou in #2706
- Add merge_group to trigger CI runs by @lefou in #2713
- Update mainargs to 0.5.1 by @lefou in #2707
- Update zio-test to 2.0.16 by @lefou in #2712
- Update semanticdb-scala to 4.8.8 and semanticdb-java to 0.9.5 by @lefou in #2708
- Update coursier interface to 1.0.18 by @lefou in #2710
- Update mill-scip to 0.3.5 by @lefou in #2711
- Refactor and update dependencies of codesig tests by @lefou in #2709
New Contributors
- @pieter-bos made their first contribution in #2646
Full Changelog: 0.11.1...0.11.2
0.11.1
Merged Pull Requests
- After release maintenance by @lefou in #2578
- Rebootstrap Mill on 0.11.0 by @lihaoyi in #2571
- Fix type annotation for inner scoverage module by @lefou in #2583
- Refined fix for
ScoverageModule
inner module by @lefou in #2584 - CI: Make bin-compat-checks mandatory by @lefou in #2581
- Fix a couple minor typos and formatting by @ysthakur in #2592
- Fix edit page links in website by @ysthakur in #2593
- Add docker-nativeimage and native-image plugins to docs by @carlosedp in #2599
- Properly distinct-ify commands when resolved multiple times by query by @lihaoyi in #2604
- Code cleaning by @lefou in #2606
- Cleanup leftover --repl flag handling, fail when --repl is given by @lefou in #2611
- Fix source links in API documentation by @ysthakur in #2605
- Make empty selector message more helpful by @ysthakur in #2610
- Update mill-github-dependency-graph to 0.2.5 by @lolgab in #2608
- Restore correct default for
esFeatures
by @lolgab in #2607 - Fix typo in readme.adoc by @megri in #2614
- Added test-interface runtime dependency to testrunner.entrypoint by @lefou in #2612
- Remove scalameta trees dependency by @lolgab in #2616
- Convert entrypoint.runIvyDeps to ivyDeps by @lefou in #2617
- Update zinc to 1.9.1 by @lefou in #2619
- Update bsp4j to 2.1.0-M5 by @lefou in #2620
- Added more deps to dummy module by @lefou in #2615
- Support default crossSegment selection with
cross[]
notation by @lefou in #2623 - Update external plugin reference that supports 0.11 by @daddykotex in #2621
- Fix "A target must be provided" issue in
--bsp
mode by @lefou in #2625 - BSP: Fix MatchError when matching on modules in BSP by @lolgab in #2626
- Fix package of
mill.contrib.bloop.Bloop
module by @lolgab in #2628 - Update Ammonite to support Scala 3.3.0 by @lolgab in #2624
- Build with latest Mill snapshot by @lefou in #2630
New Contributors
Full Changelog: 0.11.0...0.11.1
0.11.0
Mill 0.11.0 is a breaking release with a focus on polish. This release fixes many long-standing sharp edges that could not be fixed without breaking backwards compatibility, and cleans up the Mill codebase for better maintainability and so we can offer better compatibility guarantees going forward. User-facing improvements include an overhauled documentation-site, much easier cross builds, faster/more-robust bootstrapping, better error messages. It aims to do everything Mill already does, but better.
One thing especially worth calling out is that the Mill documentation has been overhauled, with new sections Scala Build Examples, Scala Module Configuration, Web Build Examples, and many more. These examples all live in the example/ folder, and zips containing them can be downloaded from Github Releases to easily try them out or bootstrap a new project. This should make it much easier to learn Mill: what features exist, why they are necessary, and how you can use them in a realistic setting to configure a Mill build for a variety of real-world scenarios. All examples are executable, and are executed as part of Mill's CI to ensure they are correct and up to date. The Mill Scaladoc is now also aggregated and published with each release
Major changes that may require migration:
-
The
mill._
import now has to be included explicitly at the top of yourbuild.sc
, and is no longer added implicitly -
Mill no longer runs the
build.sc
file using Ammonite, and instead bootstrapsbuild.sc
itself using Mill.- Any
build.sc
compilation "pre-def" customization that may have been done using Ammonite'simport $file.foo
orimport $exec.foo
now has to be done using Mill meta-builds. - Normal
import $file
andimport $ivy
s should continue working
- Any
-
The
./mill
bootstrap script now downloads Mill from Maven Central rather than Github Releases.- This should help improve the robustness of Mill bootstrapping, such that Github outages would no longer cause Mill bootstrapping to fail (Maven Central outages cause bootstrapping failure regardless).
- We will continue publishing the Mill artifacts to Github Releases for compatibility, but please update your
./mill
script to the latest version (from this release) viacurl -L https://github.com/com-lihaoyi/mill/releases/download/0.11.0/0.11.0 -o mill
to benefit from this
-
Cross build syntax has been overhauled:
- Rather than using
class Foo(crossValue: T) extends Module
, they are now defined bytrait Foo extends Cross.Module[T]
. - Cross modules no longer add their cross-keys to the
millSourcePath
by default. If you previously had adef millSourcePath = super.millSourcePath / os.up
, you must remove it. If you previously did not have that, you must adddef millSourcePath = super.millSourcePath / crossValue
- See the Cross-Scala Version Modules or Cross Build Documentation for more details of how things work now.
- PlatformScalaModule has been introduced to simplify cross JVM/JS/Native modules: automatically inferring the
jvm
/js
/native
platformSuffix
from the module path, automatically adding-${versionSuffix}
source folders, and automatically removing theplatformSuffix
from the publish artifact path. - Test modules now automatically follow the source-folder layout of their parent module (#2531), removing much of the need for manually
override def sources
in your test modules to set up cross version/platform sources - See the Publishing Cross-Platform Scala Module or Publishing Cross-Platform Scala Module Alternative documentation to see how you can use these
- Rather than using
-
Target resolution now instantiates modules substantially more lazily, often not instantiating them at all unless strictly necessary.
- This may help improve startup performance for working with large build files
- This means that for modules who
override def millModuleDirectChildren
, you need to additionally inherit from the marker trait DynamicModule so Mill knows to instantiate the module and use your override during resolution
-
The
mill.modules
package has been removed, with functionality moved tomill.util
andmill.scalalib
-
The
Tests
trait has been removed, as it relies on trait shadowing that will be removed in Scala 3. Please useScalaTests
/ScalaJSTests
/ScalaNativeTests
instead -
The
ScalaModule#run
command now takes aargs: Task[Args]
instead ofargs: String*
, allowing it to be easily used in the implementation of tasks. example -
RunScript.resolveTasks
has been replaced bymill.resolve.Resolve.{Segments,Tasks}
Example Build Migrations
Below is a link the to 0.10.x -> 0.11.0 build migrations for a number of the com.lihaoyi
projects, in order from simplest to the more complex. These may be useful to skim through to see what kind of changes a "typical" Mill project would need to do migrating to 0.11.0
Merged Pull Requests (since 0.11.0-M11
)
- Renamings for conciseness: ScalaModuleTests -> ScalaTests, InnerCrossModule -> CrossValue by @lihaoyi in #2572
- Add
mill.define.DynamicModule
to allow custom overriding ofmillModuleDirectChildren
by @lihaoyi in #2574 - Bump Scala to 2.13.11 and use pre-published bridges by @lihaoyi in #2575
- Remove
mill._
magic import from builds by @lolgab in #2418
Full Changelog: 0.11.0-M11...0.11.0
All Merged Pull Requests (since 0.10.10
)
- fix: remove index.scip by @ckipp01 in #2172
- Update Mill to 0.10.10 by @lefou in #2174
- Cleanup deprecated API, removed API, adapted call sites by @lefou in #2031
- Restrict Cross parameter to be of type Module by @lefou in #2048
- Update os-lib to 0.9.0 by @scala-steward in #2176
- Consolidated artifact and platform suffix handling by @lefou in #2025
- MultiLogger refactoring to better control
debugEnabled
by @lefou in #2179 - Pass more settings from
ScalaJSModule
to itsTests
by @lolgab in #2180 - Remove deprecated scalajsmodule apis by @lolgab in #2181
- Don't include resources into compileClasspath. by @vic in #1811
- Removed some deprecated coursier helper methods by @lefou in #2184
- Use classpath
PathRef
s hashCode as cache key for Scala.js worker by @lolgab in #2183 - Use classpath PathRefs hashCode as cache key for Zinc worker by @lolgab in #2185
- Use PathRef hashCode for workers caches by @lolgab in #2189
- Doc: Fix download URL of Mill bootstrap script by @lefou in #2192
- Update Scala Native API and worker by @lolgab in #2193
- Update coursier to 2.1.0-RC3 by @scala-steward in #2194
- Update scala-library to 2.12.17 by @scala-steward in #2195
- Document
ivyDepsTree
and transitive dep management by @IdiosApps in #2175 - Add in ability to pass in
whatDependsOn
toJavaModule.ivyDepsTree
by @ckipp01 in #2191 - Bind cross-versions to the context of the originating module by @lefou in #1574
- Update trees to 4.7.0 by @scala-steward in #2201
- Tooling maintenance by @lefou in #2208
- Fixed typo in package of
mill.scalalib.BoundDep
by @lefou in #2214 - Use
millModuleDirectChildren
consistently everywhere by @lolgab in #2207 - Update trees to 4.7.1 by @sc...
0.11.0-M11
Second attempt and releasing 0.11.0-M11
0.11.0-M10
Merged Pull Requests
- Swap over to mill-build.com domain name by @lihaoyi in #2528
- Post release chore by @lefou in #2529
- Update mill-vcs-version to 0.3.1-6-e80da7 by @lefou in #2530
- Use
showNamed
output format forshow
with more than one item by @lihaoyi in #2532 - Rebootstrap Mill on 0.11.0-M9 by @lihaoyi in #2463
- Generalize handling of source folders in cross-platform/version scenarios by @lihaoyi in #2531
- Add Agg.when operator by @lihaoyi in #2535
- Publicize PlatformScalaModule#platformScalaSuffix by @lihaoyi in #2534
- Make
mill.backgroundwrapper
aJavaModule
again by @lihaoyi in #2538 - Backtick wrap identifiers in generated code where necessary by @lefou in #2492
- Move
mill.BuildInfo
tomill.main.BuildInfo
by @lihaoyi in #2537 - Make
mill.define.Module
a trait to allow abstract/virtual modulelazy val
s to betrait
s rather thanclass
es by @lihaoyi in #2536 - Clean up
mill.eval
even more by @lihaoyi in #2542 - Silence git stderr output by @lefou in #2541
- Tweak windows CI by @lihaoyi in #2544
- Re-enable Acyclic enforcement and fix existing violations by @lihaoyi in #2543
Full Changelog: 0.11.0-M9...0.11.0-M10
0.11.0-M9
Merged Pull Requests
- Post release chore by @lefou in #2454
- Filter out non-script paths to avoid blow up due to invalid path format by @lihaoyi in #2471
- Update testng to 7.5.1 by @lefou in #2469
- Clean up Resolve.scala and related code to improve rigor and error reporting by @lihaoyi in #2453
- Update semanticdb-scalac and trees to 4.7.7 and semanticdb-java to 0.8.16 by @lefou in #2470
- Update mill-vcs-version to 0.3.1 by @lefou in #2472
- Update mill-mima to 0.0.19 by @lefou in #2473
- Fix crash aggregating failures by @lolgab in #2478
- Break up
main.core
andmain.test
by @lihaoyi in #2475 - Re-introduce Mill special handling of ivydeps, overhaul test classpath management to allow testing by @lihaoyi in #2476
- Update scalajs-linker, ... to 1.13.1 by @scala-steward in #2431
- Make
run
command arguments Tasks by @lihaoyi in #2452 - Consolidate manual testing, automated testing, CI and release configurations by @lihaoyi in #2483
- Support
import $repo
magic import by @lefou in #2480 - Put BSP timing tests behind a retry, as these fail sometimes on Windows by @lefou in #2490
- Add ability to watch
T.input
s andinterp.watchValue
s by @lihaoyi in #2489 - Cleanup mill.eval by @lihaoyi in #2498
- Support Java 20 by @lefou in #2501
- Make
--import
flag work again by @lihaoyi in #2502 - Enable
inspect
,path
, etc. onT.command
s without needing to pass in args in common cases by @lihaoyi in #2500 - Tweak CI to improve UI display by @lihaoyi in #2505
- Added deprecated type aliases for mill.define.Target by @lefou in #2507
- Format build.sc by @lefou in #2508
- Update semanticdb-java to 0.8.18 by @scala-steward in #2495
- Update coursier to 2.1.3 by @scala-steward in #2503
- More refactoring for Resolve logic by @lihaoyi in #2511
- Update coursier interface to 1.0.16 by @scala-steward in #2504
- Try to fix windows CI by @lihaoyi in #2512
- Added a deprecated type alias for removed
EvaluatorScopts
by @lefou in #2491 - Kill mill.modules package by @lihaoyi in #2513
- Re-use MillBuildRootModule for BSP by @lihaoyi in #2415
- Update mill-vcs-version to 0.3.1-5-910047 by @lefou in #2510
- Improve VSCode/BSP integration by @lihaoyi in #2514
- Cleanups for MillBuildServer by @lihaoyi in #2518
- Enable warnings in build.sc, overhaul
Agg
to avoid triggering spurious deprecation warnings by @lihaoyi in #2519 - CI: Refactor more common parts into workflow include by @lefou in #2509
- More tweaks to simplify BSP logic by @lihaoyi in #2521
- Updated mill-vcs-version for bootstrap setup by @lefou in #2524
- Print out CLI help message when inspecting commands by @lihaoyi in #2522
- Update zinc to 1.8.1 by @lefou in #2515
- Reviewed and updated some target types by @lefou in #2494
- Make mill-build folder opt in via
import $meta._
by @lihaoyi in #2527
Full Changelog: 0.11.0-M8...0.11.0-M9
0.11.0-M8
Merged Pull Requests
- Post release chore by @lefou in #2395
- Updated scalafmt to 3.7.3 and reformatted code base by @lefou in #2397
- Update scalafmt-dynamic to 3.7.3 by @lefou in #2398
- Update play version to 2.8.19 by @lefou in #2399
- Remove Ammonite as a dependency, handle script running and bootstrapping ourselves by @lihaoyi in #2377
- Add error if you define other modules outside top level root module by @lihaoyi in #2401
- Combine Router and Discover, add some docs by @lihaoyi in #2403
- Add 1-persistent-targets and 2-worker-task examples by @lihaoyi in #2404
- Make
Target
type abstract to allow overriding by different concrete implementations by @lihaoyi in #2402 - Update ammonite, ammonite-terminal to 3.0.0-M0-6-34034262 by @scala-steward in #2400
- Reformat source code by @lefou in #2408
- Reenabled CI checks: bin-compat and formatting by @lefou in #2407
- Update coursier interface to 1.0.14 by @scala-steward in #2410
- Rename CI jobs to reduce boilerplate in PR checks UI by @lihaoyi in #2411
- Make use of MainArgs in example/basic/ by @lihaoyi in #2409
- Bump Cask to 0.9.1 in example/web/ by @lihaoyi in #2413
- Properly use sig of millBootClasspath if there is no meta build by @lefou in #2421
- Update uPickle to 3.1.0 by @lihaoyi in #2423
- Move BuildInfo from sources into resources, defer use of resources during compilation by @lihaoyi in #2425
- Add some helpers to simplify cross-version/cross-platform modules by @lihaoyi in #2406
- Cleanup stream handling in PrintLogger to try and avoid over-written lines by @lihaoyi in #2428
- Pre compile zinc compiler interface for common Scala versions by @lihaoyi in #2424
- Fix BSP regressions and improved resource file handling by @lefou in #2420
- Add zio-test to TestModule by @carlosedp in #2432
- enforce stdout/stderr contents in
.local
example/integration tests by @lihaoyi in #2435 - Add example.web[webapp-cache-busting] by @lihaoyi in #2436
- CI: Separate format and bincompat checks by @lefou in #2438
- CI: Reused a shared workflow for building by @lefou in #2440
- CI: ignore failing bincompat reports by @lefou in #2443
- Update windows-ansi to 0.0.5 by @alexarchambault in #2442
- Docs & Changelog for 0.11.0-M8 by @lihaoyi in #2439
- Update coursier to 2.1.2 and coursier-interface to 1.0.15 by @lefou in #2445
- Removed unused asciidoctorj dependency by @lefou in #2446
- Allow
Cross
module types to be traits for greater regularity and less boilerplate at callsite by @lihaoyi in #2427 - Fix uploadToGithub command by @lihaoyi in #2447
- Fix spurious
T.command
definitions must have 1 parameter list error by @lihaoyi in #2451 - Consolidate Docsite/Examples/Scaladoc/Giter8 by @lihaoyi in #2448
Full Changelog: 0.11.0-M7...0.11.0-M8
0.11.0-M7
Merged Pull Requests
- Set new MiMa baseline: 0.11.0-M6 by @lefou in #2351
- Update Ammonite to 3.0.0-M0-5 and uPickle to 3.0.0 by @lihaoyi in #2354
- Support automatic
PathRef
validation for cached targets by @lefou in #2328 - Update coursier to 2.1.0 by @lefou in #2357
- Process ivy dependency includes in MillBuildModule by @lefou in #2362
- Doc: Added JMH plugin to navigation bar by @lefou in #2363
- Update scalameta trees and semanticdb to 4.7.6 by @lefou in #2364
- Update nir, test-runner, tools, util to 0.4.11 by @scala-steward in #2367
- Integrated changelog for release 0.10.12 and build docs for it by @lefou in #2373
- Update Mill to 0.10.12 by @lefou in #2375
- CI: cancel older running jobs for pull requests by @lefou in #2378
- Added a task to install Mill into ~/.cache/mill/download by @lefou in #2384
- Update scala native tools to 0.4.12 by @scala-steward in #2382
- Add boolean flag to search for proto files in dependencies. Update docs. by @carlosedp in #2380
- Improve binary compatibility by @lefou in #2379
- CI: only auto-build main and pull requests by @lefou in #2385
- Use scala-parser-combinators:1.1.2 on scala 2, 2.1.0 otherwise by @mrdziuban in #2389
- BSP: Support
mainClasses
in run and test environments by @lefou in #2387 - Reworked
PathRef.revalidate
handling based onDynamicVariable
by @lefou in #2392 - Add nativeDump to ScalaNativeModule by @lolgab in #2391
- Force a newer transitive snakeyaml version by @lefou in #2335
- BSP: Remove query part from target identitfier URI and some cleanups by @lefou in #2394
ScalaJSModule
: DeprecatefastOpt
andfullOpt
by @lefou in #2326
Full Changelog: 0.11.0-M6...0.11.0-M7
0.10.12
Merged Pull Requests
- Added another retry candidate for coursier resolution (Backport of #2287) by @lefou in #2296
- Disabled tests that always fail CI recently by @lefou in #2369
ScalaJSModule
: DeprecatefastOpt
andfullOpt
by @lefou in #2324- Fix concurrency issue with test event reporting (Backport of #2314) by @lefou in #2366
- Update Mill 0.10.11 by @lefou in #2370
- Tooling and dependency updates by @lefou in #2372
Full Changelog: 0.10.11...0.10.12