diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 0dcc448d0b0..01555578586 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -220,4 +220,7 @@ jobs: uses: ./.github/workflows/post-build-raw.yml with: java-version: '17' - buildcmd: ./mill -i mill.scalalib.scalafmt.ScalafmtModule/checkFormatAll __.sources + __.mimaReportBinaryIssues + __.fix --check + mill.javalib.palantirformat.PalantirFormatModule/ --check + mill.kotlinlib.ktlint.KtlintModule/checkFormatAll + buildcmd: | + set -eux + ./mill -i mill.scalalib.scalafmt.ScalafmtModule/checkFormatAll + __.mimaReportBinaryIssues + __.fix --check + mill.javalib.palantirformat.PalantirFormatModule/ --check + mill.kotlinlib.ktlint.KtlintModule/checkFormatAll + ./mill -i --meta-level 1 mill.scalalib.scalafmt.ScalafmtModule/checkFormatAll diff --git a/build.mill b/build.mill index 894c0e1c1bf..778a8b97aec 100644 --- a/build.mill +++ b/build.mill @@ -16,8 +16,7 @@ import mill.define.Cross // plugins and dependencies import $meta._ -import $file.ci.shared -import $file.ci.upload + import $packages._ object Settings { @@ -271,8 +270,7 @@ def millVersion: T[String] = Task.Input { // Ignore local changes when computing the VCS version string, // since we make those in CI and can promise they are safe VcsVersion.calcVcsState(Task.log).copy(dirtyHash = None).format() - } - else "SNAPSHOT" + } else "SNAPSHOT" } def millLastTag: T[String] = Task { @@ -596,8 +594,12 @@ trait MillStableScalaModule extends MillPublishScalaModule with Mima { ), // Overrides added for new methods, ought to be safe - ProblemFilter.exclude[ReversedMissingMethodProblem]("mill.scalalib.JavaModule.mill$scalalib$JavaModule$$super$internalRepositories"), - ProblemFilter.exclude[ReversedMissingMethodProblem]("mill.scalanativelib.ScalaNativeModule.mill$scalanativelib$ScalaNativeModule$$super$coursierProject"), + ProblemFilter.exclude[ReversedMissingMethodProblem]( + "mill.scalalib.JavaModule.mill$scalalib$JavaModule$$super$internalRepositories" + ), + ProblemFilter.exclude[ReversedMissingMethodProblem]( + "mill.scalanativelib.ScalaNativeModule.mill$scalanativelib$ScalaNativeModule$$super$coursierProject" + ), // https://github.com/com-lihaoyi/mill/pull/3503 ProblemFilter.exclude[ReversedMissingMethodProblem]( diff --git a/changelog.adoc b/changelog.adoc new file mode 100644 index 00000000000..912868319e6 --- /dev/null +++ b/changelog.adoc @@ -0,0 +1,2462 @@ +// tag::changelog[] +== Changelog +ifndef::link-github[] +:link-github: https://github.com/com-lihaoyi/mill +endif::[] +:link-compare: {link-github}/compare +:link-pr: {link-github}/pull +:link-issue: {link-github}/issues +:link-milestone: {link-github}/milestone +// find-replace-regex: https://github.com/com-lihaoyi/mill/pull/(\d*) -> {link-pr}/$1[#$1] + + +[#0-12-5] +=== 0.12.5 - 2025-01-01 +:version: 0.12.5 +:milestone-name: 0.12.5 +:milestone: 108 +:prev-version: 0.12.4 + +* Optimize Mill startup overhead by not blocking on stdin {link-pr}/4159[#4159] + +* Fix system console detection on JDK >=22 {link-pr}/4178[#4178] + +* Fix thread leak when spawning JVM subprocesses, which caused instability and unresponsiveness +in long-lived Mill processes {link-pr}/4185[#4185] + +* Fix crash in `mill -i` on Windows ARM64 {link-pr}/4196[#4196] + +* Fix log rendering in terminals where `\t` does not clear existing text {link-pr}/4173[#4173] + +* Fix generation of unnecessary `rt.jar` files in home folder {link-pr}/4206[#4206] + +* Addition of several experimental language toolchains, to support using Mill to build +projects in other languages + +** https://mill-build.org/mill/main-branch/pythonlib/intro.html[Experimental Python Support] + +** https://mill-build.org/mill/main-branch/javascriptlib/intro.html[Experimental Javascript/Typescript Support] + +* Lots of doc improvements: + +** Overhaul of https://mill-build.org/mill/depth/execution-model.html[The Mill Execution Model] +{link-pr}/4156[#4156] + +** Fix missing text in Java Module Configuration docs {link-pr}/4172[#4172] + +* New posts to the https://mill-build.org/blog/index.html[Mill Engineering Blog]: +https://mill-build.org/blog/1-java-compile.html[How Fast does Java Compile?], +https://mill-build.org/blog/2-monorepo-build-tool.html[Why Use a Monorepo Build Tool?], +https://mill-build.org/blog/3-selective-testing.html[Faster CI with Selective Testing], +and https://mill-build.org/blog/4-flaky-tests.html[How to Manage Flaky Tests], + +[#0-12-4] +=== 0.12.4 - 2024-12-16 +:version: 0.12.4 +:milestone-name: 0.12.4 +:milestone: 107 +:prev-version: 0.12.3 + +* Mill now supports https://mill-build.org/mill/large/selective-execution.html[Selective Execution], +allowing you to run tests and other tasks only if they are downstream of a code change. +This can be used to greatly speed up pull-request validation and other CI workflows +by skipping unrelated tests that cannot possibly be broken by the code change in question + +* Mill now generates https://mill-build.org/mill/fundamentals/out-dir.html#_mill_dependency_tree_json[dependency-tree.json] +and https://mill-build.org/mill/main-branch/fundamentals/out-dir.html#_mill_invalidation_tree_json[invalidation-tree.json] +metadata for every run, which should help make it easier for a user to figure out why a task +is being selected and run. + +* Support for Bill-Of-Materials/Dependency-Management when downloading third-party JVM dependencies +(https://mill-build.org/mill/main-branch/javalib/dependencies.html#_dependency_management[Documentation]) + +* Built-in support for `mill.bat` launcher to run Mill natively on a Windows environment +https://github.com/com-lihaoyi/mill/pull/4052[#4052] + +* Added documentation for https://mill-build.org/mill/migrating/migrating.html[Migrating to Mill], +to try and help people who may be trying to move their existing codebase onto Mill from other build tools + +* Significant speedups for task resolution logic https://github.com/com-lihaoyi/mill/pull/4132[#4132], +which should speed up cached-build workflows in particular + +* Improve precision of code signature task invalidation, reducing the amount of spurious +task invalidations in the presence of multi-file builds https://github.com/com-lihaoyi/mill/pull/4113[#4113] +https://github.com/com-lihaoyi/mill/pull/4116[#4116] + +* Reduced overhead of terminal prompt UI https://github.com/com-lihaoyi/mill/pull/4095[#4095] +https://github.com/com-lihaoyi/mill/pull/4110[#4110] + +* Launch of the https://mill-build.org/blog[Mill Build Engineering Blog], where we will post articles +discussing topics around JVM build tooling + +[#0-12-3] +=== 0.12.3 - 2024-11-24 +:version: 0.12.3 +:milestone-name: 0.12.3 +:milestone: 106 +:prev-version: 0.12.2 + +* Set context classloader during Mill evaluation {link-pr}/3940[#3940] +* Extended `mill init` to support importing an existing Maven project {link-pr}/3756[#3756] +* Avoid running subsequent meta-level builds after reaching the desired meta-level in MillBuildBootstrap {link-pr}/3960[#3960] +* Improvements to `KtlintModule` {link-pr}/3961[#3961] {link-pr}/3966[#3966] +* Fixes for `runBackground` mutex and log management {link-pr}/3971[#3971] +* Added support for Revapi {link-pr}/3974[#3974] +* Fix redundant logging in junit5 test runner {link-pr}/3983[#3983] +* align SonatypeCentralPublishModule with SonatypePublisher {link-pr}/3987[#3987] +* Make JVM version configurable per-module {link-pr}/3716[#3716] +* Overhaul worker concurrency helpers with `mill.api.CacheFactory` {link-pr}/4001[#4001] +* Optimize startup time using TCP sockets instead of junixsocket and `tput` instead of jline {link-pr}/4009[#4009] +* Improvements to TUI build prompt https://github.com/com-lihaoyi/mill/pull/3933[#3933] https://github.com/com-lihaoyi/mill/pull/4014[#4014] +* Lots of improvements to documentation, including a new https://github.com/com-lihaoyi/mill/pull/3965[Kotlin Spring-Boot Example #3965], +a new page https://github.com/com-lihaoyi/mill/pull/3990[How Fast Does Java Compile? #3990], and +https://github.com/com-lihaoyi/mill/pull/3938[Stable Links To Older Doc-site Versions #3938] + + + + +[#0-12-2] +=== 0.12.2 - 2024-11-11 +:version: 0.12.2 +:milestone-name: 0.12.2 +:milestone: 105 +:prev-version: 0.12.1 + +_Changes since {prev-version}:_ + +* Show correct build file name in progress prompt {link-pr}/3847[#3847] +* Fix target name when reporting cycles in `runModuleDeps` {link-pr}/3860[#3860] +* Properly escape imported submodule names when the name is a Scala identifier {link-pr}/3865[#3865] +* Report an error when module dependency cycles are detected {link-pr}/3878[#3878] +* Drop incremental compilation state for Mill modules when version changes to try and mitigate cache invalidation issues {link-pr}/3884[#3884] +* Share profile loggers between nested evaluations to avoid ensure commands like `show` now have a proper profile {link-pr}/3885[#3885] +* Add `nativeMultithreading` flag in ScalaNativeModule {link-pr}/3896[#3896] +* Add nice error when non-exclusive task depends on exclusive task {link-pr}/3887[#3887] +* Filter out anonymous classes during test discovery to mitigate spurious test reports {link-pr}/3911[#3911] +* Fix `MavenTests` deprecation message {link-pr}/3915[#3915] +* Improve `inspect` command to show more detailed metadata on modules and tasks {link-pr}/3916[#3916] +* Fix prompt updating logic to ensure the timestamp updates while tasks are running {link-pr}/3933[#3933] +* Fix scoverage report generation for Scala 3 {link-pr}/3936[#3936] +* Tons of documentation improvements: autoformatted all https://github.com/com-lihaoyi/mill/pull/3919[Java] +and https://github.com/com-lihaoyi/mill/pull/3903[Scala] example files, +[Scala-Native example builds]https://github.com/com-lihaoyi/mill/pull/3657, +https://github.com/com-lihaoyi/mill/pull/3897[Scala-JS WASM example build], +https://github.com/com-lihaoyi/mill/pull/3918[Re-run Maven comparison using proper flags] +added https://mill-build.org/mill/comparisons/why-mill.html[Why Use Mill?] and +https://mill-build.org/mill/comparisons/unique.html[What Makes Mill Unique?] Sections + +_For details refer to +{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] +and the {link-compare}/{prev-version}\...{version}[list of commits]._ + + +[#0-12-1] +=== 0.12.1 - 2024-10-27 +:version: 0.12.1 +:milestone-name: 0.12.1 +:milestone: 104 +:prev-version: 0.12.0 + +_Changes since {prev-version}:_ + +* Fix updating of prompt to match terminal width in client-server mode {link-pr}/3833[#3833] +* Allow `.mill-jvm-opts` to interpolate environment variables, add `.mill-opts` {link-pr}/3841[#3841] + +_For details refer to +{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] +and the {link-compare}/{prev-version}\...{version}[list of commits]._ + + +[#0-12-0] +=== 0.12.0 - 2024-10-23 + +The Mill 0.12.0 release focuses on improving the scalability of Mill builds: in terms +of performance, code organization, adherence to best practices, and community. + +Major changes: + +1. Mill now runs tasks parallel by default, rather than opt-in. This includes a +new parallel-friendly terminal UI, https://mill-build.org/mill/Mill_Sandboxing.html[task + and test sandboxing] to guard against race conditions, +xref:javalib/testing.adoc#_test_grouping[parallelization of test suites], +and other measures optimizing for parallel builds + +2. Mill now uses `build.mill` rather than `build.sc` as the primary file extension, to avoid +confusion with Scala-CLI or Ammonite scripts, and the `T`/`T.worker`/`T.input` syntax +has been deprecated in favor of `Task`/`Task.Worker`/`T.Input` for a more idiomatic style + +3. Mill now supports for https://mill-build.org/mill/Structuring_Large_Builds.html[Modularizing Large Builds] +into multiple `package.mill` files, to help support large codebases and incremental compilation +of the build files. + +4. Mill now provides official support for https://mill-build.org/mill/Writing_Mill_Plugins.html[Writing Mill Plugins], +with tested workflows and an official testkit to help you write and publish your own Mill +plugins for others to use + +5. Mill now supports other JVM langauges: https://mill-build.org/mill/javalib/intro.html[Java], +experimental support for https://mill-build.org/mill/kotlinlib/intro.html[Kotlin/KotlinJs], +and https://mill-build.org/mill/android/kotlin.html[even-more-experimental support for Android]. +This includes IDE integrations, tooling integrations (docs, autoformatters, linters, testing +frameworks, etc.) + +6. The Mill doc-site at https://mill-build.org/ has undergone a massive overhaul. +New comparisons with other build tools of (https://mill-build.org/mill/comparisons/maven.html[Maven], +https://mill-build.org/mill/comparisons/gradle.html[Gradle], +https://mill-build.org/mill/comparisons/sbt.html[SBT]), documentation for +https://mill-build.org/mill/extending/new-language.html[adding new language toolchains] +and https://mill-build.org/mill/extending/running-jvm-code.html[running dynamic JVM code], +and re-organized the pages for Scala/Java/Kotlin by-use-case to make them more navigable + +For a more detailed view of Mill changes since 0.11.12, along with migration instructions, +see the sections below on: + +* <<0-12-0-RC1>> +* <<0-12-0-RC2>> +* <<0-12-0-RC3>> +* <<0-12-0-since-rc2>> + +0.12.x is binary compatible with 0.11.x, and so Mill plugins published for Mill 0.11.x can +continue to be used without updating them. Although binary compatible, Mill 0.12.x does +have breaking changes listed below with instructions provided on how to either disable the +breaking change with a flag or adjust your code to accommodate it. You should download the +latest version of the https://github.com/com-lihaoyi/mill/blob/main/mill[Mill Bootstrap Script] +if you are upgrading from a prior version. + +If you need help upgrading from 0.11.x or hit any issues, please visit the +https://discord.com/invite/xJCYRVMS[#mill Discord Channel] or +https://github.com/com-lihaoyi/mill/discussions/3349[0.12.x Github Discussion Thread]. We'd +love to hear from you on your experience with Mill in general and Mil 0.12.x in particular + +* *Example Upgrade PRs* + +** The following PRs are example upgrades of Mill from 0.11.x to 0.12.0-RC1 for various +projects in the `com.lihaoyi` ecosystem. + +*** Trivial upgrades that just needed to bump a version: https://github.com/com-lihaoyi/geny/pull/87 , +https://github.com/com-lihaoyi/sourcecode/pull/175, https://github.com/com-lihaoyi/fansi/pull/107, +https://github.com/com-lihaoyi/PPrint/pull/141, https://github.com/com-lihaoyi/mainargs/pull/159/files, +https://github.com/com-lihaoyi/fastparse/pull/319, https://github.com/com-lihaoyi/scalatags/pull/284 +https://github.com/com-lihaoyi/castor/pull/64, https://github.com/com-lihaoyi/utest/pull/351 + +*** Less trivial upgrades, needing to make use of `MILL_TEST_RESOURCE_DIR` or other explicit path references to +be compatible with test sandboxing: https://github.com/com-lihaoyi/requests-scala/pull/174, +https://github.com/com-lihaoyi/upickle/pull/627, https://github.com/com-lihaoyi/os-lib/pull/300, +https://github.com/com-lihaoyi/scalasql/pull/30, https://github.com/com-lihaoyi/Ammonite/pull/1575 + +*** More involved upgrades: https://github.com/com-lihaoyi/cask/pull/143 + +[#0-12-0-since-rc2] +==== 0.12.0 Changes since RC3 + +* Mill now takes a lock on the `out/` folder whenver evaluating it to avoid race conditions on disk. +{link-pr}/3599[#3599]. Pass in `--no-build-lock` to disable it at your own risk + +* Update Zinc to 0.10.3 to fix issues with over-compilation {link-pr}/3748[#3748] + +* `runIvyDeps` is now transitive, as is the newly-introduced `runModuleDeps`, +to try and match the semantics of runtime deps in Maven{link-pr}/3774[#3774] + +[#0-12-0-RC3] +==== 0.12.0-RC3 - 2024-10-04 + +Changes since 0.12.0-RC2 + +* `-j`/`--jobs` now allows computed values of the form `-j 0.5C` (half as many jobs as cores) or +`-j C-2` (two less jobs than cores) to allow for automatic scaling based on the number of cores available +{link-pr}/3554[#3554] + + +* Fix `testOnly` handling of ScalaTest tagged tests {link-pr}/3557[#3557] + +* Make `./mill` without any arguments point you towards --help, flesh out --help into a cheat sheet {link-pr}/3556[#3556] + +* Use `Task` instead of `T` when constructing targets and other tasks {link-pr}/3565[#3565]. The new syntax +(given below) is intended to be more idiomatic Scala and less idiosyncratic. The old syntax will continue +to work for backwards compatibility, but using the new syntax is recommended +** `T {...}` -> `Task {...}` +** `T.command {...}` -> `Task.Command {...}` +** `T.input {...}` -> `Task.Input {...}` +** `T.source {...}` -> `Task.Source {...}` +** `T.sources {...}` -> `Task.Sources {...}` +** `T.persistent {...}` -> `Task(persistent = true) {...}` +** `T.task {...}` -> `Task.Anon {...}` + +* Introduced `Task.Command(exclusive = true)` to allow explicit annotation of which +commands need to run without parallelism, allowing `.test` and other commands +to run parallel by default {link-pr}/3617[#3617] + +* Lots of added docs for Building Kotlin with Mill: +** Kotlin Build Examples and Linting {link-pr}/3555[#3555], with KtLint and Detekt support +** Kotlin Module Configuration {link-pr}/3585[#3585] +** Publishing and Testing Kotlin with Mill {link-pr}/3589[#3589] +** Using Mill to build a Ktor web server {link-pr}/3621[#3621] + +* Additional support for Kotlin tools and frameworks +** KtFmt support {link-pr}/3620[#3620] +** Kover support {link-pr}/3624[#3624] + +* Show Worker tasks in `resolve`/`show`/`inspect` {link-pr}/3580[#3580] + +* `mill clean` now terminates Worker tasks {link-pr}/3579[#3579] + +* Overhaul of the terminal "ticker" UI for displaying task progress to better support +parallel builds {link-pr}/3577[#3577] +** Mill now shows all active tasks and their duration at the bottom of your terminal +** Stream task logs are now prefixed with the task index on the left and the task +name above, so you can attribute each line of logs to the task that generated it + +``` +... +[3861/4712] main.client.publishLocalCached +[3861] Publishing Artifact(com.lihaoyi,mill-main-client,0.12.0-RC2-67-a566d8-DIRTY875bcbb1) to ivy repo /Users/lihaoyi/.ivy2/local +[3868/4712] runner.client.publishLocalCached +[3868] Publishing Artifact(com.lihaoyi,mill-runner-client,0.12.0-RC2-67-a566d8-DIRTY875bcbb1) to ivy repo /Users/lihaoyi/.ivy2/local + [3869/4712] ======================================= installLocalCache ============================================== 4s +[3676] scalajslib.worker-api.docJar 1s +[3688] scalanativelib.worker-api.docJar 1s +[3706] contrib.playlib.worker[2.9].docJar 1s +[3707] contrib.playlib.worker[2.6].docJar 1s +... and 3 more threads +``` + +* Add API for tasks to spawn concurrent and parallel futures via `Task.fork.{async,await}` {link-pr}/3478[#3478] + +* Allow large test modules with many classes to be broken up to use multiple concurrent JVMs +by overriding `def testForkGrouping` {link-pr}/3478[#3478] + +* Use coursier thread pool to run coursier-related tasks to avoid deadlocks {link-pr}/3614[#3614] + +* `inspect` now shows useful information when used on modules, not just tasks {link-pr}/3532[#3532] + +``` +$ ./mill inspect dist0 +dist0(build.mill:745) + Version of [[dist]] meant for local integration testing within the Mill + repo. Looks mostly the same as [[dist]], except it does not have a reference + to itself in its [[testTransitiveDeps]], to avoid a circular dependency. + +Inherited Modules: MillPublishJavaModule + +Module Dependencies: runner, idea + +Default Task: dist0.run + +Tasks: dist0.fix, dist0.testTransitiveDeps +``` + +* `mill init` now supports creating a project based on examples from Mill's documentation {link-pr}/3583[#3583], +and unpacks the example into the current folder rather than a subfolder {link-pr}/3626[#3626] + +* `MILL_TEST_RESOURCE_FOLDER` has been renamed to `MILL_TEST_RESOURCE_DIR` for consistency with other +environment variable names {link-pr}/3637[#3637] + +[#0-12-0-RC2] +==== 0.12.0-RC2 - 2024-09-16 + +Changes since 0.12.0-RC1 + +* Support `exclude` attribute in `Dep` parser. You can give exclusions with `;exclude=org:name` +or `;exclude=org:*` or `;exclude=*:name` {link-pr}/3492[#3492] + +* Fix `ScalaModule#console` by properly inheriting streams {link-pr}/3500[#3500] + +* Adjust codegen to allow custom ``mainargs.TokensReader``s, and include a +`mainargs.TokensReader[os.Path]` by default for convenience {link-pr}/3504[#3504] + +* Update to https://github.com/com-lihaoyi/os-lib?tab=readme-ov-file#0-10-7[OS-Lib 0.10.7] to +allow concise multi-segment sub-paths; you can now write `os.pwd / "foo/bar/qux"` rather than +`os.pwd / "foo" / "bar" / "qux"` + +* Add `JavaModule.mandatoryJavacOptions`. Those are not propagated to the inner test +traits intentionally, since those options are typically configured by other means, +e.g. dedicated targets. {link-pr}/3503[#3503] + +* Add plugins to run Checkstyle and generate reports {link-pr}/3516[#3516] + +* Simplified ``PublishModule``'s publishing setup via {link-pr}/3523[#3523]. You can now +run `mill mill.scalalib.PublishModule/` with the proper environment variables (below) and +it should do the right thing by default + +** Prefix all environment variables with `MILL_`: +`MILL_SONATYPE_USERNAME`, `MILL_SONATYPE_PASSWORD`, +`MILL_PGP_SECRET_BASE64`, `MILL_PGP_PASSPHRASE` to try and add some +rudimentary ownership and namespacing + +* Allow external modules to have a `defaultCommandName` {link-pr}/3545[#3545]. This has +been applied to `ScalafmtModule` and `PublishModule`, so you can +now autoformat your code via `mill mill.scalalib.ScalafmtModule/` and publish it via +`mill mill.scalalib.PublishModule/` without needing the `/reformatAll __.sources` +or `/publishAll __.publishArtifacts` suffix + +* Integrated Kotlin integration as a first partly module and add example documentation +{link-pr}/3514[#3514]. This is still pretty spartan, but we expect to flesh it out over time + +* Move `.mill.sc` alternate file extension to `.mill.scala` {link-pr}/3521[#3521] + +[#0-12-0-RC1] +==== 0.12.0-RC1 - 2024-09-09 + +* *Breaking Changes* + +** Build file overhaul: Mill's build file management has been overhauled to better support +large projects. See https://mill-build.org/mill/Structuring_Large_Builds.html[Structuring Large Builds] +for details + +*** Mill now uses `.mill` as its file extension, with some semantic changes +from the old `.sc` files to allow better IDE support. The `.sc` extension is still supported +and its semantics are largely unchanged the ease the migration, but you should convert your Mill +configs to `.mill` files to benefit from Mill's improved IDE experience going forward. + +*** The `build.sc` file has been renamed `build.mill` to prevent confusion with Ammonite/Scala-CLI scripts, +and all associated `.sc` files have been renamed to `.mill`. + +**** Until IntelliJ-Scala adds support for `.mill` files built in, you can add it yourself via +`Settings / Editor / File Types / Scala` and add the pattern `*.mill` + +*** All `.mill` files must have a `package` declaration, +with `package build` for `.mill` files in the root folder and `package build.foo.bar` for `.mill` files in `foo/bar/`. + +**** The package declaration remains optional for legacy `.sc` files + +*** Only `foo.mill` files in folders directly containing a `build.mill` or `package.mill` can +be imported via `import $file`. + +**** You need to create empty `package.mill` files in any folder containing scripts if they are not already +adjacent to your `build.mill` in the root folder + +**** `foo.sc` files can continue to be imported from arbitrary paths, to ease in the migration + +*** Builds can now be modularized into per-folder definitions by defining `package.mill` files in subfolders +{link-pr}/3213[#3213]. You can no longer define targets and modules in arbitrary `foo.sc` files + +**** All target and module definitions must be moved into `package.mill` files in each folder. + +*** `$file` references in `.mill` files are now absolute from the project root, and thus `.^` to +refer to parent package is no longer supported, for consistency with other programming environments + +**** `$file` references in old `.sc` files are unchanged and continue being relative, preserving the +current behavior. + +** ``RootModule``s can only be named `package`, e.g. `object foo extends RootModule` must now be +named ``object `package` extends RootModule``. + +*** If you have an existing `RootModule`, you need to rename it ``object `package` extends RootModule`` + +** Turn on parallelism for task evaluation by default, except for commands +which always run serially at the end {link-pr}/3265[#3265] + +*** This can be disabled by passing `--jobs 1` + +** Mill uses empty sandbox folders as the working directory for running its own code and +{link-pr}/3367[#3367] and test suites {link-pr}/3347[#3347], to avoid accidental interference +between tasks and tests due to parallelism. See https://mill-build.org/mill/Mill_Sandboxing.html[Mill Sandboxing] +for details + +*** This can be disabled by adding `def testSandboxWorkingDir = false` in your test module + +** Mill commands now require arguments to be passed named via `./mill mycommand --key value`, rather than +allowing just `./mill mycommand value`. {link-pr}/3431[#3431]. + +*** You can pass in +`--allow-positional-command-args` to fall back to the old behavior, or use `@mainargs.arg(positional = true)` +on individual parameters + +** Dropped support for Java 8, Scala 2.11.x/3.1.x, and Scala-Native 0.4.x, following suit with the rest of the +com-lihaoyi ecosystem. We now expect a minimum of Java 11, Scala 2.12.x/3.2.x, and Scala-Native 0.5.x + +** `--disable-callgraph-invalidation` is no longer supported. The flag is still accepted but is +now a no-op. + +* *Other Changes* + +** Overhaul the Mill client-server protocol to improve robustness +{link-pr}/3363[#3363] {link-pr}/3366[#3366] {link-pr}/3368[#3368] {link-pr}/3370[#3370] + +** Mill now has explicitly supported workflows for third-party plugin authors, and +publishes unit, integration, and example test fixtures for writing plugins as `mill-testkit` +{link-pr}/3398[#3398] for downstream plugin authors to use in testing their own Mill extensions. + +*** See https://mill-build.org/mill/Writing_Mill_Plugins.html[Writing Mill Plugins] for more details. + +*** `mill-testkit` is experimental and does not provide the same stability or binary-compatibility +guarantees as the rest of Mill. Nevertheless, if you are writing Mill plugins, please try it out +and let us know what you think! + +** Bump default Sonatype Maven Central publishing timeouts to 10 minutes to avoid +timeouts due to slowness https://github.com/com-lihaoyi/mill/commit/b4c9386b0233fab53a312426715e226e4a7f6302 + +** Importing Mill projects into IntelliJ via BSP now properly marks the `out/`, `.idea/`, and `.bsp/` folders +as excluded {link-pr}/3329[#3329] + +** Optimizations to Mill evaluation logic to reduce fixed overhead of running Mill +on large projects {link-pr}/3388[#3388] + +** Improvements to `visualize` and `visualizePlan` such that they no longer need to be +prefixed with `show` and no longer need a separate `graphviz`/`dot` install on Mac-OSX +{link-pr}/3438[#3438] + +[#0-11-13] +=== 0.11.13 - 2024-01-14 +:version: 0.11.13 +:milestone-name: 0.11.13 +:milestone: 100 +:prev-version: 0.11.12 + +_Changes since {prev-version}:_ + + +* Security Fix: Update protobuf-java to 3.25.5 {link-pr}/3639[#3639] +* Backport: Fixed property handling when using `--define`/`-D` from the Mill CLI. {link-pr}/3795[#3795] +* Backport: GenIdea: Handle failure when evaluating module sources/resources {link-pr}/3755[#3755] +* Update asm from 9.7 to 9.7.1 for Java 24 support {link-pr}/3745[#3745] + + +_For details refer to +{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] +and the {link-compare}/{prev-version}\...{version}[list of commits]._ + + +[#0-11-12] +=== 0.11.12 - 2024-08-20 +:version: 0.11.12 +:milestone-name: 0.11.12 +:milestone: 99 +:prev-version: 0.11.11 + +_Changes since {prev-version}:_ + +* Bump uTest to 0.8.4 {link-pr}/3340[#3340] +* Manage TestModule dependencies via `build.sc` {link-pr}/3320[#3320] +* Fix the warning not being printed when -i/--interactive/--no-server/--bsp are not the first argument {link-pr}/3346[#3346] +* GenIdea: Make Scala SDK specific for JS / Native {link-pr}/3348[#3348] +* CI: Adapt CI for 0.11.x branch {link-pr}/3350[#3350] +* GenIdea: unroll module dependencies {link-pr}/3358[#3358] +* Print pretty error message when Result.Failure is thrown {link-pr}/3393[#3393] +* Avoid spurious deprecation warnings in generated code {link-pr}/3400[#3400] + +_For details refer to +{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] +and the {link-compare}/{prev-version}\...{version}[list of commits]._ + +[#0-11-11] +=== 0.11.11 - 2024-08-05 +:version: 0.11.11 +:milestone-name: 0.11.11 +:milestone: 98 +:prev-version: 0.11.10 + +*_We initially tagged `0.11.11` on 2024-11-31 but never published the released due to technical issues. On 2024-08-05 we re-tagged and published `0.11.11`._* + +_Changes since {prev-version}:_ + +* Workaround issue in Sonatype which started failing on double slashes in URLs +(even though they previously worked) https://github.com/com-lihaoyi/mill/commit/a293b46e80e37572bae46ef6225f41f547a5b238[Link] +* Overhaul of the documentation site at https://mill-build.org +* New Java- and Scala-specific sections on the documentation, with more detailed +comparisons to existing build tools +* Added graphviz diagrams throughout to help the user in visualizing the concepts involved +* Update versions of JUnit sbt-test-interface libraries that Mill uses +{link-pr}/3296[#3296] +* Make it simpler to resolve dependencies in custom tasks via `defaultResolver().resolveDeps` +{link-pr}/3330[#3330] + + +_For details refer to +{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] +and the {link-compare}/{prev-version}\...{version}[list of commits]._ + +[#0-11-10] +=== 0.11.10 - 2024-07-23 +:version: 0.11.10 +:milestone-name: 0.11.10 +:milestone: 95 +:prev-version: 0.11.9 + +_Changes since {prev-version}:_ + +__Fixes and Improvements__ + +* Improvements in Java docs and user experience {link-pr}/3278[#3278] +* Automatically pump os.proc streams when SystemStreams are redirected {link-pr}/3275[#3275] +* Fix resolution of children of override lazy val modules {link-pr}/3270[#3270] + +_For details refer to +{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] +and the {link-compare}/{prev-version}\...{version}[list of commits]._ + + +[#0-11-9] +=== 0.11.9 - 2024-07-18 +:version: 0.11.9 +:milestone-name: 0.11.9 +:milestone: 94 +:prev-version: 0.11.8 + +_Changes since {prev-version}:_ + +__New features__ + +* First class support for Java projects {link-pr}/3261[#3261] + +__Fixes and Improvements__ + +* Add coarse grained lock around BSP request to avoid deadlocks {link-pr}/3243[#3243] + +_For details refer to +{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] +and the {link-compare}/{prev-version}\...{version}[list of commits]._ + +[#0-11-8] +=== 0.11.8 - 2024-06-21 +:version: 0.11.8 +:milestone-name: 0.11.8 +:milestone: 93 +:prev-version: 0.11.7 + +_Changes since {prev-version}:_ + +__New features__ + +* Support Scala Native 0.5.0 {link-pr}/3054[#3054] {link-pr}/3107[#3107] {link-pr}/3120[#3120] +* Add `jvmOptions` to docker contrib configuration {link-pr}/3079[#3079] +* Pass auxiliary class files to zinc, so they are deleted together {link-pr}/3072[#3072] +* BSP: Handle new `JvmCompileClasspath` request {link-pr}/3086[#3086] +* Add support for Cobertura XML report task to help integration {link-pr}/3093[#3093] +* Support Scala.js minify via `scalaJSMinify: T[String]` {link-pr}/3094[#3094] +* Restructure `TestModule`, add `RunModule` {link-pr}/3064[#3064] +* Move `run`-targets into `RunModule` {link-pr}/3090[#3090] +* `TestModule`: Support generation of JUnit-compatible xml report {link-pr}/3099[#3099] {link-pr}/3172[#3172] {link-pr}/3135[#3135] {link-pr}/3184[#3184] +* Use docker image hash to determine if build should rerun {link-pr}/3124[#3124] +* Add multi platform support to contrib.docker through docker buildx {link-pr}/3143[#3143] +* Add ability to re-write ESModule imports at link time {link-pr}/3109[#3109] +* Adding sonatype central support {link-pr}/3130[#3130] {link-pr}/3187[#3187] +* Add `TestModule.discoveredTestClasses` target to ease test inspection {link-pr}/3191[#3191] +* Support "pom" packaging type in `PublishModule` {link-pr}/3222[#3222] + + +__Fixes and Improvements__ + +* Restructure `VersionFinder`, increase speed, added ticker messages {link-pr}/3014[#3014] +* Fix bsp compile classpath inconsistencies {link-pr}/3017[#3017] +* Bring more bsp-specific targets in line with their non-bsp versions {link-pr}/3018[#3018] +* Make BSP task processing more resilient {link-pr}/3022[#3022] +* Update example `build.sc` with current library versions {link-pr}/3055[#3055] +* Scoverage: Do not include the scalac plugin in the reporting classpath {link-pr}/3060[#3060] +* Add Scala 2.13.13 and 2.12.19 to supported bridges list {link-pr}/3066[#3066] +* Fix BuildInfo static Java file generator {link-pr}/3074[#3074] +* Scoverage inner module defaults to `skipIdea = outer.skipIdea` {link-pr}/3098[#3098] +* Deduplicate input tasks in `inspect` command {link-pr}/3102[#3102] +* CI: add scalafix-check to precondition to publish {link-pr}/3095[#3095] +* Docs for Continuous cache invalidation {link-pr}/3096[#3096] +* Isolate scoverage modules from their parent modules {link-pr}/3118[#3118] +* Scoverage improve classpath override to the minimal {link-pr}/3122[#3122] +* Improve internal BSP API and docs, fix a match error condition {link-pr}/3111[#3111] +* Retry example integration tests that didn't finish after 5 minutes {link-pr}/3125[#3125] +* Fix mill script for parameter starting with -i {link-pr}/3127[#3127] +* Fixed semanticdb file copying issue, added more tests {link-pr}/3080[#3080] +* Detect assemblies with too many entries to fail shell script prepending {link-pr}/3140[#3140] +* Exclude mill provided dependencies in meta builds {link-pr}/3189[#3189] {link-pr}/3221[#3221] +* Fix Scala.js toolchain logs in server-client mode {link-pr}/3196[#3196] +* Fix compiler bridge build setup and build essential versions in CI {link-pr}/3179[#3179] +* Add Scala 2.13.14 to bridgeScalaVersions {link-pr}/3166[#3166] +* GenIdea improvements {link-pr}/3153[#3153] +* GenIdea: Use synthetic scala-SDK entry for compiler setup {link-pr}/3154[#3154] +* Fix classpath regression in Bloop export #1918 {link-pr}/3211[#3211] +* Support `build.sc` in Bloop {link-pr}/3208[#3208] +* Fail if `testOnly` does not match any test case {link-pr}/3224[#3224] + + +__Updates and internal changes__ + +* Code cleanups +* Documentation updates and fixes +* Test and CI improvements +* Updates: acyclic 0.3.12, Ammonite 3.0.0-M2-11-713b6963, asm 9.7, +commons-compress 1.26.2, commons-io 2.16.1, coursier 2.1.10, +fastparse 3.1.0, fansi 0.5.0, +guava 33.2.1, +jarjar-abrams-core 1.14.0, jline 3.26.2, junixsocket 2.9.1, +log4j-core 2.23.1, +mainargs 0.7.0 mill-mima 0.1.1, mill-scalafix 0.4.0, +os-lib 0.10.2, +Play 2.8.22 / 2.9.4 / 3.0.4, pprint 0.9.0, protobuf-java 3.25.3, +Scala 2.12.19 / 2.13.14, +Scala Native 0.4.17 / 0.5.3, +scala-xml 2.3.0, +scalacheck 1.18.0, scalatest 3.2.18, scoverage 2.1.1, +semanticdb-java 0.9.10, semanticdb-scalac 4.9.7 +requests 0.8.3, +upickle 3.3.1, utest 0.8.3, +zinc 1.10.0 + +_For details refer to +{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] +and the {link-compare}/{prev-version}\...{version}[list of commits]._ + + + +[#0-11-7] +=== 0.11.7 - 2024-02-05 +:version: 0.11.7 +:milestone-name: 0.11.7 +:milestone: 91 +:prev-version: 0.11.6 + +_Changes since {prev-version}:_ + +__New features__ + +* Support type selectors as path selection syntax in resolve {link-pr}/2997[#2997], {link-pr}/2998[#2998] +* Read coursier default config files to set up repositories and support mirror configuration {link-pr}/2886[#2886], {link-pr}/2917[#2917] +* Added support for `type` attribute when parsing dependencies {link-pr}/2994[#2994] +* Add new `ScalaModule.scalacHelp` command {link-pr}/2921[#2921] +* Add a `ScalaModule.consoleScalacOptions` target {link-pr}/2948[#2948] +* Enable colored output for Scala 2 compiler output {link-pr}/2950[#2950] +* Add `publishLocalCached` and `publishM2LocalCached` targets to `PublishModule` {link-pr}/2976[#2976] +* Support Scala Native build target. This allows to build static and dynamic libraries other than binaries {link-pr}/2898[#2898] +* Prepare the Scala.js integration for SIP-51 {link-pr}/2988[#2988] + +__Fixes and Improvements__ + +* Better detect Windows Subsystem for Linux environments {link-pr}/2901[#2901] +* Avoid evaluating `Task.Input`s twice {link-pr}/2952[#2952] +* Deduplicate (anonymous) tasks in results {link-pr}/2959[#2959] +* Synchronize `evaluateGroupCached` to avoid concurrent access to cache {link-pr}/2980[#2980] +* Properly sanitize Windows reserved names and symbols in evaluator paths {link-pr}/2964[#2964], {link-pr}/2965[#2965] +* Detect colliding cross module values {link-pr}/2984[#2984] +* Mask forward slashes in cross values to fix their cache locations {link-pr}/2986[#2986] +* Re-enable test result summary (print `done` message from test framework to stdout) {link-pr}/2993[#2993] +* Fix overeager caching of `cliImports` value in `generatedScriptSources` {link-pr}/2977[#2977] +* Allow resolving moduleDeps with older Scala 3 versions {link-pr}/2877[#2877] +* GenIdea: Put module dependencies after library dependencies {link-pr}/2925[#2925] +* BSP: do not filter clean-requests for meta-builds {link-pr}/2931[#2931] +* BSP: Add `JavaModule.bspBuildTargetData` to make `JavaModule` reports workable `BuildTarget` {link-pr}/2930[#2930] +* BSP: Send `logMessage` instead of diagnostics when `textDocument` is unknown {link-pr}/2979[#2979] +* Scoverage inner module defaults new to `skipIdea = true` {link-pr}/2989[#2989] + +__Updates and internal changes__ + +* Dependency updates: asm-tree 9.6, bsp4j 2.2.0-M1, coursier 2.1.8, jline 3.25.0, jna 5.14.0, junixsocket-core 2.8.3, log4j-core 2.22.1, mainargs 0.6.1, os-lib 0.9.3, scalafmt 3.7.15, Scala.js 1.15.0, scala-native 8.4.16, semanticdb-java 0.9.8, semanticdb-scala 4.8.15, upickle 3.1.4, zinc 1.9.6 + +* Contrib dependency updates: Play 2.8.21, Play 2.9.1, Play 3.0.1 + +* Documentation updates and new sections +* More code cleanups, explicit result types and enforcement of some code quality metrics via mill-scalafix + + +_For details refer to +{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] +and the {link-compare}/{prev-version}\...{version}[list of commits]._ + + + +[#0-11-6] +=== 0.11.6 - 2023-11-21 +:version: 0.11.6 +:milestone-name: 0.11.6 +:milestone: 90 +:prev-version: 0.11.5 + + +_Changes since {prev-version}:_ + +* Make `PathRef` robust against concurrent filesyste modifications {link-pr}/2832[#2832] + +* Use logger error stream for informational messages {link-pr}/2839[#2839] + +* Harden assembly logic against Zip-Slip vulnerabilities {link-pr}/2847[#2847] + +* Add an option to disable incremental compilation with zinc {link-pr}/2851[#2851] + +* Add check for right Tests traits in ScalaJS and Native {link-pr}/2874[#2874] + +* Attempt to recover from client/server connection errors to {link-pr}/2879[#2879] + +* Fix discovery of targets whose names get mangled {link-pr}/2883[#2883] + +* Make `mill show` skip `-j` prefixes to ensure machine readability {link-pr}/2884[#2884] + +_For details refer to +{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] +and the {link-compare}/{prev-version}\...{version}[list of commits]._ + + +[#0-11-5] +=== 0.11.5 - 2023-10-04 +:version: 0.11.5 +:milestone-name: 0.11.5 +:milestone: 89 +:prev-version: 0.11.4 + +_Changes since {prev-version}:_ + +* Support for Java 21 {link-pr}/2768[#2768] + +* Various BSP improvements {link-pr}/2814[#2814], {link-pr}/2813[#2813], {link-pr}/2810[#2810], {link-pr}/2771[#2771] + +* The `T.workspace` context path now always points to the top-level project directory, also for meta builds {link-pr}/2809[#2809] + +* Mill now better detects and reports logical cycles in inter-module dependencies {link-pr}/2790[#2790] + +* Fixed semanticDB data generation for meta builds {link-pr}/2809[#2809] + +* The `prepareOffline` command also fetches relevant compiler-bridges for Scala modules {link-pr}/2791[#2791] + +* Improved `ScalaJSModule` and added support for `IRFileCache` {link-pr}/2783[#2783] + +* The `JavaModule.zincReportCachedProblems` configuration can now also customized via a Java system property {link-pr}/2775[#2775] + +* Fixed a file truncation issue in protobuf module and print a warning when proto file get overwritten {link-pr}/2800[#2800] + +* Documentation improvements + +* Dependency updates: bsp4j 2.1.0-M7, castor 0.3.0, coursier-interface 1.0.19, jarjarabrams 1.9.0, jline 3.23.0, junitsocket 2.8.1, mainargs 0.5.4, scalafmt 3.7.14, Scala.js 1.14.0, semanticdb-java 0.9.6, semanticdb-scala 4.8.10 + +* Various other improvements and cleanups + +_For details refer to +{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] +and the {link-compare}/{prev-version}\...{version}[list of commits]._ + + +[#0-11-4] +=== 0.11.4 - 2023-09-19 +:version: 0.11.4 +:milestone-name: 0.11.4 +:milestone: 88 +:prev-version: 0.11.3 + +_Changes since {prev-version}:_ + +* Fix binary incompatibility issue with `Discover` macro's generated generic code {link-pr}/2749[#2749] +* Support the `release-size` mode in `ScalaNativeModule` {link-pr}/2754[#2754] + +_For details refer to +{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] +and the {link-compare}/{prev-version}\...{version}[list of commits]._ + +[#0-11-3] +=== 0.11.3 - 2023-09-17 +:version: 0.11.3 +:milestone-name: 0.11.3 +:milestone: 87 +:prev-version: 0.11.2 + +_Changes since {prev-version}:_ + +* Allow Mill CLI to select the meta-build frame it operates on via `--meta-level ` {link-pr}/2719[#2719] + +* Improve the `mill resolve` suggestion when a user specifies a target in the wrong module {link-pr}/2731[#2731] + +* Fix conflicting dependencies between upstream JavaModules {link-pr}/2735[#2735] + +* Fix the scala-library dependency for (generic) platform modules {link-pr}/2739[#2739] + +* Fix terminal forwarding in `.console` and `.repl` commands {link-pr}/2743[#2743] + +_For details refer to +{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] +and the {link-compare}/{prev-version}\...{version}[list of commits]._ + + +[#0-11-2] +=== 0.11.2 - 2023-08-28 +:version: 0.11.2 +:milestone-name: 0.11.2 +:milestone: 86 +:prev-version: 0.11.1 + +_Changes since {prev-version}:_ + +* Target invalidation after making changes to `build.sc` is now done at a fine-grained method-level granularity, using callgraph reachability analysis to see which targets depend on the code that was changed. +See {link-pr}/2417[#2417] for more details + +* Fix redirection of stdout stream to stderr when using `show` +{link-pr}/2689[#2689] + +* Fix line numbers in errors for scripts starting with leading comments or whitespace {link-pr}/2686[#2686] + +* Fix `init` command and support runnig Mill without existing `build.sc` file +{link-pr}/2662[#2662] + +* Fixes for BSP editor integration sometimes using the wrong output folder for meta-build metadata, causing subsequent builds from the command line to fail {link-pr}/2692[#2692] + +* Added a new `mill.idea.GenIdea/idea` command to generate IntelliJ IDE metadata, improving-upon and replacing the older `mill.scalalib.GenIdea/idea` +command which is now deprecated {link-pr}/2638[#2638] + +* Update Coursier to 2.1.6 to mitigate CVE CVE-2022-46751 +{link-pr}/2705[#2705] + +_For details refer to +{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] +and the {link-compare}/{prev-version}\...{version}[list of commits]._ + +[#0-11-1] +=== 0.11.1 - 2023-06-23 +:version: 0.11.1 +:milestone-name: 0.11.1 +:milestone: 85 +:prev-version: 0.11.0 + +_Changes since {prev-version}:_ + +* `mill.define.Cross`: Introduced default cross segments and some CLI convenience +* `mill.testrunner`: Fixed exception when running ScalaTest or ZIOTest frameworks +* `mill.runner`: Removed some obsolete / defunct cli options +* `mill.runner`: Properly distinct-ify commands when resolving wide matching target patterns +* `mill.scalajslib`: Restored correct defaults for `esFeature` +* `mill.bsp`: Fixed a `MatchError` in the `buildtarget/scalaTestClasses` request +* `mill.contrib.bloop`: Corrected accidentally changed package name resulting in non-functional plugin +* `mill.contrib.scoverage`: Fixed defunct plugin due to a missing type annotation +* Various internal improvements +* Dependency updates: Ammonite 3.3.0-M0-32-96e851cb, bsp4j 2.1.0-M5, zinc 1.9.1 +* Mill is now build with Mill 0.11 + +_For details refer to +{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] +and the {link-compare}/{prev-version}\...{version}[list of commits]._ + +[#0-11-0] +=== 0.11.0 - 2023-06-06 +:version: 0.11.0 +:milestone-name: 0.11.0 +:milestone: 84 +:prev-version: 0.11.0-M11 + +*This release is binary incompatible to {prev-version}.* + +_Changes since {prev-version}:_ + +* 0.11.0 is the next breaking version after the 0.10.x series, with a large number of improvements. +See the changelog below for 0.11.0-M1 to 0.11.0-M11 for a full list of user-facing changes. + +_For details refer to +{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] +and the {link-compare}/{prev-version}\...{version}[list of commits]._ + +// end::changelog[] + +=== Older releases +:leveloffset: +1 + +// tag::changelogOld[] + +[#0-11-0-M11] +=== 0.11.0-M11 - 2023-06-04 +:version: 0.11.0-M11 +:milestone-name: 0.11.0-M11 +:milestone: 83 +:prev-version: 0.11.0-M10 + +*This release is binary incompatible to {prev-version}.* + +_Changes since {prev-version}:_ + +* Make `foo.test` command run tests with user code in the boot classloader, rather than in a sub-classloader +{link-pr}/2561[#2561] + +* Mill backend server timeout is now configurable +{link-pr}/2550[#2550] + +* Mill assembly is now distributed via Maven Central, rather than Github release assets, to remove an unnecessary single point of failure +{link-pr}/2560[#2560] + +* `Tests` inner trait was removed, to avoid trait shadowing which will be removed in Scala 3. Please use `ScalaTests`, `ScalaJSTests`, or +`ScalaNativeTests` instead +{link-pr}/2558[#2558] + +_For details refer to +{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] +and the {link-compare}/{prev-version}\...{version}[list of commits]._ + +[#0-11-0-M10] +=== 0.11.0-M10 - 2023-05-24 +:version: 0.11.0-M10 +:milestone-name: 0.11.0-M10 +:milestone: 82 +:prev-version: 0.11.0-M9 + +*This release is binary incompatible to {prev-version}.* + +_Changes since {prev-version}:_ + +* Make `mill.define.Module` a `trait` to allow abstract/virtual modules to be ``trait``s rather than ``class``es +{link-pr}/2536[#2536] + +* Move `mill.BuildInfo` to `mill.main.BuildInfo` to avoid name conflicts with +`mill.contrib.buildinfo.BuildInfo` +{link-pr}/2537[#2537] + +* `PlatformScalaModule` now exposes `platformScalaSuffix` for user code to use +{link-pr}/2534[#2534] + +* Add `Agg.when` operator to simplify common workflow of adding optional flags or command line parameters {link-pr}/2535[#2353] + +* Generalize handling of test module source folder layout, such that they always match the folder layout of the enclosing module +{link-pr}/2531[#2531] + +_For details refer to +{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] +and the {link-compare}/{prev-version}\...{version}[list of commits]._ + +[#0-11-0-M9] +=== 0.11.0-M9 - 2023-05-18 +:version: 0.11.0-M9 +:milestone-name: 0.11.0-M9 +:milestone: 80 +:prev-version: 0.11.0-M8 + +*This release is binary incompatible to {prev-version}.* + +_Changes since {prev-version}:_ + +* Overhauled target resolution logic. +It is now significantly lazier, resulting in less of the module tree being un-necessarily instantiated, and also more precise and predictable {link-pr}/2453[#2453] +{link-pr}/2511[#2511] + +* Allow tasks to be passed as the CLI parameters of the `run` command, allowing +`run` to be easily used in the implementation of other tasks +{link-pr}/2452[#2452] + +* ``Task.Input``s are now watched properly with `--watch`, and trigger re-evaluations when the watched value changes {link-pr}/2489[#2489] + +* Support for Java 20 {link-pr}/2501[#2501] + +* Broke up `mill.modules` package {link-pr}/2513[#2513], with functionality re-distributed to `mill.util` and `mill.scalalib` + +* Overhaul BSP-related code, for improved fidelity and correctness +{link-pr}/2415[#2415] +{link-pr}/2414[#2414] +{link-pr}/2518[#2518] +{link-pr}/2521[#2521] + +* Enabled compilation warnings in `build.sc` +{link-pr}/2519[#2519] + +* Print out the CLI flags when inspecting ``Task.Command``s +{link-pr}/2522[#2522] + +_For details refer to +{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] +and the {link-compare}/{prev-version}\...{version}[list of commits]._ + +[#0-11-0-M8] +=== 0.11.0-M8 - 2023-04-24 +:version: 0.11.0-M8 +:milestone-name: 0.11.0-M8 +:milestone: 79 +:prev-version: 0.11.0-M7 + +*This release is binary incompatible to {prev-version}.* + +_Changes since {prev-version}:_ + +* Added an https://github.com/com-lihaoyi/mill/tree/main/example[example/] +folder in the Mill repo, containing common build setups demonstrating Mill features with explanations of how each feature works + +* Pre-compiled Scala incremental compiler interface +{link-pr}/2424[#2424], to speed up clean builds + +* Add some helpers to simplify cross-version/cross-platform modules {#2406}[{link-pr}/2406] + +* You can now override `T{...}` ``Target``s with `Task.Source` or `Task.Sources`, and vice versa {link-pr}/2402[#2402] + +* Removed the Ammonite script runner dependency used to evaluate `build.sc` +files and instead compile them using Mill {link-pr}/2377[#2377] + +* Add `TestModule.ZioTest` {link-pr}/2432[#2432] + +* Caching fixes for external modules https://github.com/com-lihaoyi/mill/issues/2419[#2419] + +* Overhaul of the Mill `BuildInfo` plugin, moving the key-value into resources to avoid needing to re-compile your module when the values change, adding +`JavaModule` support, and allowing Javadoc/Scaladoc comments to be associated with the generated `BuildInfo` constants {link-pr}/2425[#2425] + +* Global Configuration via `~/.mill/ammonite/predefScript.sc` is no longer supported in this version. +If that breaks your workflow, please report and tell us your use case so we can provide sufficient replacement or support for your use case before Mill 0.11. + +* Overhaul of the documentation. +Created many executable example projects which are included in the documentation and run/tested on CI + +* Change cross module definitions to be traits instead of classes, for greater regularity and less builerplate at call sites. _This change requires slight modification to existing build scripts that define cross modules._ + +_For details refer to +{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] +and the {link-compare}/{prev-version}\...{version}[list of commits]._ + +[#0-11-0-M7] +=== 0.11.0-M7 - 2023-03-30 +:version: 0.11.0-M7 +:milestone-name: 0.11.0-M7 +:milestone: 78 +:prev-version: 0.11.0-M6 + +*This release is binary incompatible to {prev-version}.* + +_Changes since {prev-version}:_ + +* Introduced automatic `PathRef` validation for cached targets; default-enabled it for `CoursierModule.resolveDeps` and various `resolvedIvyDeps` targets +* `bsp`: Update Protocol version to 2.1.0-M4 +* `bsp`: Support new `mainClasses` field in run and test environments +* `bsp`: Fixed handling of Mill plugins and other improvements +* `scalanativelib`: new `nativeDump` setting in `ScalaNativeModule` +* `contrib.twirllib`: Use newer scala-parser-combinators version when used with Scala 3 +* `contrib.scalapblib`: Added new flag to search for proto files in dependencies +* Various refactorings to improve binary compatibility +* Updated dependencies: Ammonite 3.0.0-M0-5 coursier 2.1.0, scala native tools 0.4.12, semanticdb 4.7.6, trees 4.7.6, upickle 3.0.0 +* DX improvements + +_For details refer to +{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] +and the {link-compare}/{prev-version}\...{version}[list of commits]._ + +[#0-11-0-M6] +=== 0.11.0-M6 - 2023-03-09 +:version: 0.11.0-M6 +:milestone-name: 0.11.0-M6 +:milestone: 77 +:prev-version: 0.11.0-M5 + +*This release is binary incompatible to {prev-version}.* + +_Changes since {prev-version}:_ + +* `main`: Re-added missing `--color` and `predef` cli arguments. + +_For details refer to +{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] +and the {link-compare}/{prev-version}\...{version}[list of commits]._ + +[#0-11-0-M5] +=== 0.11.0-M5 - 2023-03-09 +:version: 0.11.0-M5 +:milestone-name: 0.11.0-M5 +:milestone: 76 +:prev-version: 0.11.0-M4 + +*This release is binary incompatible to {prev-version}.* + +_Changes since {prev-version}:_ + +* `Cross` is no longer adding the cross parameters to the `millSourcePath`. ++ +_You should review your cross modules setups to avoid build issues like incorrect source paths or missing files. ``CrossScalaModule`` is not affected by this change._ +* API refactorings: `PathRef`, moved `JarManifest` to `mill.main` +* No longer inherit the Ammonite CLI config +* `scalalib`: Fixed loosing customized `mapDependencies` when `ScalaModule` get mixed in after +* `scalalib`: New `TestModule.Weaver` +* `scalajslib`: New `JsEnvConfig.Selenium` +* `testrunner`: Fixed concurrency issue with test event reporting +* Updated dependencies: ammonite 3.0.0-M0-3, coursier 2.1.0-RC6, jarajar-abrams-core 1.8.2, lambdatest 0.8.0, log4j-core 2.20.0, os-lib 0.9.1, scoverage 2.0.8, semanticdb-scalac 4.7.5, trees 4.7.5 +* Documentation updates + +_For details refer to +{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] +and the {link-compare}/{prev-version}\...{version}[list of commits]._ + +[#0-11-0-M4] +=== 0.11.0-M4 - 2023-02-10 +:version: 0.11.0-M4 +:milestone-name: 0.11.0-M4 +:milestone: 74 +:prev-version: 0.11.0-M3 + +*This release is binary incompatible to {prev-version}.* + +_Changes since {prev-version}:_ + +* `scalalib`: New configuration target `zincReportCachedProblems` which, when `true`, enables reporting of all found problems, even for files which were not re-compiled +* `scalalib`: Improved SemanticDB support for Java and Scala +* `scalalib`: Mitigate another coursier download issue +* `scalajslib`: Fetch more tooling dependencies in `prepareOffline` +* `scalanativelib`: Fetch more tooling dependencies in `prepareOffline` +* `scalanativelib`: Updated tools to version 0.4.10 +* `bsp`: Improved support for the `mill-build` module which should improve the editing experience for `build.sc` and other build files +* Cleanups and internal improvements +* Updated dependencies: Ammonite 3.0.0-M0-1, junixsocket 2.6.2, semanticdb-java 0.8.13, upickle 3.0.0-M2 + +_For details refer to +{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] +and the {link-compare}/{prev-version}\...{version}[list of commits]._ + +[#0-11-0-M3] +=== 0.11.0-M3 - 2023-01-23 +:version: 0.11.0-M3 +:milestone-name: 0.11.0-M3 +:milestone: 73 +:prev-version: 0.11.0-M2 + +*This release is binary incompatible to {prev-version}.* + +_Changes since {prev-version}:_ + +* Slightly changed the `out/` folder layout for overridden and private tasks. +Instead of `foo.overridden` we now use a `foo.super` path to hold the metadata and scratch files. +* Fixed the caching for private targets with same name but defined in different super traits. +* Fixed non-functional `clean` command when used with arguments denoting modules. +* `scalalib`: Fixed `GenIdea` issues on Windows, when the build uses plugins or additional libraries. +* `scalajslib`: `ScalaJSModule.ScalaJSTests` now extends `ScalaModule.ScalaTests` which improves consistency, better default values and compatibility with other modules like `ScoverageModule`. +* `scalanativelib`: `ScalaNativeModule.ScalaNativeTests` now extends `ScalaModule.ScalaTests` which improves consistency, better default values and compatibility with other modules. +* `contrib.gitlab`: Improved error handling for token lookup and documentation. +* Updated dependencies: coursier 2.1.0-RC5, jna 5.13.0, semanticdb-scala 4.7.3, trees 4.7.3 +* Documentation improvements + +_For details refer to +{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] +and the {link-compare}/{prev-version}\...{version}[list of commits]._ + +[#0-11-0-M2] +=== 0.11.0-M2 - 2023-01-13 +:version: 0.11.0-M2 +:milestone-name: 0.11.0-M2 +:milestone: 72 +:prev-version: 0.11.0-M1 + +*This release is binary incompatible to {prev-version}.* + +_Changes since {prev-version}:_ + +* Splitted BSP module into `mill.bsp` and `mill.bsp.worker` and removed various dependencies (guava, bsp4j, xtends, lsp4j, ...) from Mill API +* `scalalib`: Added support to generate semanticdb data for Java source files +* `scalajslib`: Added support for `scalaJSOutputPattern` +* `scalajslib`: Added suport for `scalaJSSourceMap` +* `scalajslib`: Dropped support for Scala.js 0.6 +* Updated dependencies: ammonite 2.5.6, coursier 2.1.0-RC4, semanticdb 4.7.1, requests 0.8.0, scalafmt 3.6.1, trees 4.7.1, upickle 3.0.0-M1, utest 0.8.1 +* Various internal cleanups and improvements +* Documentation improvements + +_For details refer to +{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] +and the {link-compare}/{prev-version}\...{version}[list of commits]._ + +[#0-11-0-M1] +=== 0.11.0-M1 - 2022-12-17 +:version: 0.11.0-M1 +:prev-version: 0.10.10 +:milestone: 70 +:milestone-name: 0.11.0-M1 + +*This release is binary incompatible to {prev-version}.* + +_Changes since {prev-version}:_ + +* Greatly improved dependency resolution between modules, making it possible to mix Java and Scala modules +* `main`: Restrict `Cross` parameter to be of type `Module` +* `scalalib`: Performance improvements in Zinc worker module +* `scalalib`: Resources are no longer added to `compileClasspath`. +* `scalalib`: Added new `compileResources` which will end up in `compileClasspath` +* `scalalib`: Consolidated artifact and platform suffix handling +* `scalajslib` : Performance improvements in worker module +* `scalanativelib` : Performance improvements in worker module +* Updated dependencies: coursier 2.1.0-RC3, os-lib 0.9, scala 2.12.17, trees 4.7.0 +* Removed lots of deprecated API +* Various internal cleanups and improvements + +_For details refer to +{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] +and the {link-compare}/{prev-version}\...{version}[list of commits]._ + +[#0-10-15] +=== 0.10.15 - 2024-01-07 +:version: 0.10.15 +:milestone-name: 0.10.15 +:milestone: 92 +:prev-version: 0.10.13 + +_Changes since {prev-version}:_ + +* Make `semanticDbEnablePluginScalacOptions` protected and thus accessible for downstream use and customization + +_For details refer to +{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] +and the {link-compare}/{prev-version}\...{version}[list of commits]._ + + +[#0-10-13] +=== 0.10.13 - 2023-11-12 +:version: 0.10.13 +:milestone-name: 0.10.13 +:milestone: 81 +:prev-version: 0.10.12 + +_Changes since {prev-version}:_ + +This version especially aids the transition from Mill 0.10 to Mill 0.11. + +* Backport of Java 20 compatibility +* Deprecated `mill.define.SelectMode.Single` +* Backport of `mill.eval.Evaluator.evalOrThrow` +* Deprecated all inner `Tests` traits of modules derived from `JavaModule` and provide type aliases to use their successors +* Dependency updates: Ammonite 2.5.11, Coursier 2.1.7, jarjar-abrams 1.9.0, Junixxocket 2.8.2, Play 2.8.21, Scalameta Trees 4.8.12, Scala Native 0.4.16, Scoverage 2.0.11, Zinc 1.9.5 + +_For details refer to +{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] +and the {link-compare}/{prev-version}\...{version}[list of commits]._ + + +[#0-10-12] +=== 0.10.12 - 2023-03-20 +:version: 0.10.12 +:milestone-name: 0.10.12 +:milestone: 75 +:prev-version: 0.10.11 + +_Changes since {prev-version}:_ + +* `scalalib`: Mitigate another coursier download issue (backported from 0.11.0-M4) +* `testrunner`: Fixed a concurrency issue with test event reporting (backported from 0.11.0-M5) +* `scalajslib`: Deprecated `fastOpt` and `fullOpt` +* Updated dependencies: coursier 2.1.0, jarjar-abrams 1.8.2, jna 5.13.0, junixsocket 2.6.2, log4j-core 2.20.0, scalafmt-dynamic 3.6.1, trees 4.7.6 + +_For details refer to +{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] +and the {link-compare}/{prev-version}\...{version}[list of commits]._ + + +[#0-10-11] +=== 0.10.11 - 2023-01-24 +:version: 0.10.11 +:milestone-name: 0.10.11 +:milestone: 71 +:prev-version: 0.10.10 + +_Changes since {prev-version}:_ + +* Fixed non-functional `clean` command when used with arguments denoting modules. +* `scalalib`: Fixed `GenIdea` issues on Windows, when the build uses plugins or additional libraries. +* `scalajslib`: Performance improvements in worker module +* `scalajslib`: Pass more settings from `ScalaJSModule` to its `Tests` ++ +_If you have issues after the update (like `org.scalajs.jsenv.UnsupportedInputException`, https://github.com/com-lihaoyi/mill/issues/2300), check your settings in the test modules for consistency._ +* Some internal improvements backported from `0.11.0-M3` + +_For details refer to +{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] +and the {link-compare}/{prev-version}\...{version}[list of commits]._ + + +[#0-10-10] +=== 0.10.10 - 2022-12-06 +:version: 0.10.10 +:prev-version: 0.10.9 +:milestone: 69 +:milestone-name: 0.10.10 + +After this release, the `main` branch is open for development of the next major version of Mill, which is probably `0.11`. +Further maintenance work will happen in the `0.10.x` branch. + +_Changes since {prev-version}:_ + +* Lots of documentation improvements, additions and restructurings +* `core`: Fixed some rare issues with reading the `.mill-jvm-opts` file +* `core`: We made slight adaptions to the `T.dest` location of target defined in included files, to fix potential colliding cache locations +* `scalalib`: JAR archives created by Mill now by default contain directory entries +* `scalalib`: Updated zinc to 1.8.0 +* `scalajslib`: Added support for more `JsEnv` providers ++ +_If you get some issues (like `connect ECONNREFUSED`, https://github.com/com-lihaoyi/mill/issues/2204) after the update, review your settings for `JsEnv` providers._ +* `scalanativelib`: Support for incremental compilation since Scala Native 0.4.9 +* `contrib.testng`: The TestNG library is no longer provided transitively; you need to provide it explicitly +* `contrib.bloop`: Fixed re-generation of bloop config dir; previously, it could happen, that there where no config files at all +* `BSP`: implement `buildTarget/OutputPaths` request +* Various version bumps and internal improvements + +_For details refer to +{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] +and the {link-compare}/{prev-version}\...{version}[list of commits]._ + + +[#0-10-9] +=== 0.10.9 - 2022-11-10 +:version: 0.10.9 +:prev-version: 0.10.8 +:milestone: 68 +:milestone-name: 0.10.9 + +_Changes since {prev-version}:_ + +* **Hardened Maven and Ivy artifact handling to prevent path-traversal attacks** (see https://github.com/advisories/GHSA-wv7w-rj2x-556x[CVE-2022-37866]), also updated coursier dependency to a non-vulnerable version +* Decoupled `mill-moduledefs` module into a {link-mill-moduledefs}[separate project], to better suite compiler plugin packaging and improve support for various Scala versions +* Applied more workarounds to coursier concurrency issues to make parallel builds more robust +* Added support for newer Scala versions in `GenIdea` (2.2 and 2.3) +* Fixed an issue where `PublishModule` dropped module dependencies when mixed-in after other trait which overrode `moduleDeps` +* new `JMH` contrib plugin +* Lots of internal improvements and dependency updates + +_For details refer to +{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] +and the {link-compare}/{prev-version}\...{version}[list of commits]._ + + +[#0-10-8] +=== 0.10.8 - 2022-10-10 +:version: 0.10.8 +:prev-version: 0.10.7 +:milestone: 67 +:milestone-name: 0.10.8 + +_Changes since {prev-version}:_ + +* Improvements for better Scala 3.2 support +* Fixed non-working default commands in cross modules +* `CoursierModule`: mitigate more download failure situations (e.g. checksum failures) +* `PublishModule`: properly show `gpg` output in server mode +* `BSP`: Better compiler message handling (`logMessage` instead of `showMessage`) and support for diagnostic code +* `ScoverageModule`: Support for Scoverage 2.x +* New contrib module `GitlabPublishModule` +* Various internal improvements and version bumps +* Documentation improvements + +_For details refer to +{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] +and the {link-compare}/{prev-version}\...{version}[list of commits]._ + + +[#0-10-7] +=== 0.10.7 - 2022-08-24 +:version: 0.10.7 +:prev-version: 0.10.6 +:milestone: 66 +:milestone-name: 0.10.7 + +_Changes since {prev-version}:_ + +* Don't print unwanted debug messages from zinc + +_For details refer to +{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] +and the {link-compare}/{prev-version}\...{version}[list of commits]._ + + +[#0-10-6] +=== 0.10.6 - 2022-08-24 +:version: 0.10.6 +:prev-version: 0.10.5 +:milestone: 64 +:milestone-name: 0.10.6 + +_Changes since {prev-version}:_ + +* ``PathRef``s sigs are now more reproducible and independent of the used filesystem +* `JavaModule` can now use a non-local Java Compiler to support all options +* `Logger`: new `debugEnabled` to detect whether debug logging is enabled +* New `testkit` module, to use `UnitTester` in external projects +* Fixed reading of `.mill-jvm-opts` in server mode +* BSP: Automatic SemanticDB enablement to improve Metals support +* `mill.twirllib.TwirlModule` - new mandatory target `twirlScalaVersion` to configure the Scala version used by Twirl compiler, and support for newer versions +* Lots of documentation updates and additions +* Upgraded to Zinc 1.7.1 and various other dependency updates + +_For details refer to +{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] +and the {link-compare}/{prev-version}\...{version}[list of commits]._ + + +[#0-10-5] +=== 0.10.5 - 2022-07-01 +:version: 0.10.5 +:prev-version: 0.10.4 +:milestone: 63 +:milestone-name: 0.10.5 + +_Changes since {prev-version}:_ + +* New `init` command, to create new Mill projects from Gitter8 (g8) templates +* `PathRef` now gracefully ignores socket files. +This also fixes an annoying issue when Mill was previously ran in a source directory. +* Fixed a bug with using `mill --repl` without any further arguments, which was introduced in Mill 0.10.2 and prevented proper no-server mode +* Fixed the `visualize` command which wasn't working on some newer JREs +* Improved Mill server support for Windows 11 and some Windows Server versions + +* `ScalaModule` / `ZincWorkerModule`: Fixed incremental compilation issue with JRE 17 (and probably others) +* `TestModule` now better supports JUnit5 test suites +* `ScalaJsModule`: internal improvements to the stability of the Scala.js linker +* `ScalaNativeModule`: Added support for `nativeEmbedResources` +* `BSP`: improved handling of the `mill-build` module when the BSP client is IntelliJ IDEA + +* Documentation updates and link fixes +* Various dependency updates + +_For details refer to +{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] +and the {link-compare}/{prev-version}\...{version}[list of commits]._ + + +[#0-10-4] +=== 0.10.4 - 2022-05-06 +:version: 0.10.4 +:prev-version: 0.10.3 +:milestone: 62 +:milestone-name: 0.10.4 + +_Changes since {prev-version}:_ + +* Switched from ipcsocket to junixsocket library to enhance the robustness of Mill client server communication. +This should greatly improve the user experience on Windows. +* Internal improvements and better support of GraalVM +* The Mill Documentation site has now built-in search functionality + +* `ScalaJsModule`: New targets `fastLinkJS` and `fullLinkJS` and deprecated `fastOpt` and `fullOpt` +* `ScalaJsModule`: Support for `ModuleSplitStyle` +* `BSP`: Updated to protocol version 2.1.0-M1, added support for test framework names and support for the JVM extension +* `GenIdea`: More consistent ordering of libraries and dependent modules and support for Scala 3.1 language level +* `Bloop`: Added support for runtime dependencies + +* Enhanced test suite to cover Mill client server scenarios +* Various dependency updates + +_For details refer to +{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] +and the {link-compare}/{prev-version}\...{version}[list of commits]._ + + +[#0-10-3] +=== 0.10.3 - 2022-04-11 +:version: 0.10.3 +:prev-version: 0.10.2 +:milestone: 61 +:milestone-name: 0.10.3 + +_Changes since {prev-version}:_ + +* Fixed `import $file` for files with hyphens and other symbols in its name +* Fixed an issues with truncated output just before Mill finishes + +* Mill commands now support arguments of type `Task[T]`, which can improve writing re-usable commands, especially, they can be called from other tasks more easily + +* `JavaModule`: Improved correctness and performance of `compileClasspath` and `bspCompileClasspath` targets. +This fixes an issue with BSP for large projects. +Also, compile-time dependencies no longer sneak into the classpath transitively. +* `JavaModule`: Added `docJarUseArgsFile` target and fix issue with Windows command length restrictions in `docJar` + +* `BSP` and `Bloop`: Better detect foreign modules + +* Various internal API refinements and improvements +* Reorganized integration test suite and build setup + +_For details refer to +{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] +and the {link-compare}/{prev-version}\...{version}[list of commits]._ + + +[#0-10-2] +=== 0.10.2 - 2022-03-18 +:version: 0.10.2 +:prev-version: 0.10.1 +:milestone: 60 +:milestone-name: 0.10.2 + +_Changes since {prev-version}:_ + +* Mill workers can now implement `AutoCloseable` to properly free resources +* `ScalaModule`: Fixed `repl` start +* `CoursierModule`: Fixed concurrent download issues with coursier (we detect and retry) +* `MainModule`: Fixed potential match error with `show` and `showNamed` +* Restructured contrib module documentation +* Internal improvements + +_For details refer to +{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] +and the {link-compare}/{prev-version}\...{version}[list of commits]._ + + +[#0-10-1] +=== 0.10.1 - 2022-03-08 +:version: 0.10.1 +:prev-version: 0.10.0 +:milestone: 59 +:milestone-name: 0.10.1 + +_Changes since {prev-version}:_ + +* `MillClienMain` can now act as universal main to start mill with or without a server process +* Improved `show` command that always returns valid JSON +* Added `showNamed` command that includes the task names in the output +* Implemented more granular cache invalidation which keeps more caches intact when you split your build setup over multiple `.sc` files with `import $file`. +* The local `.mill-jvm-opts` file is no longer restricted to `-X` options + +* `CoursierModule`: Added `coursierCacheCustomizer` to support a `FileCache` customizers +* `JavaModule`: the `docJar` target no longer includes hidden files +* `ScalaModule`: Updated to latest zinc version +* `ScalaModule`: Reworked scalac plugins handling for the better and to support Scala 3 +* `ScalaNativeModule`: fixed `Dep.withDottyCompat` behavior +* `ScalaJSModule`: support for linking multiple modules +* `ScalafmtModule`: Support for newer Scalafmt versions + +* Tool chain: Update to Mill 0.10.0 +* Tool chain: we no longer create files outside the mill project directory (e.g. `~/mill-release` is now under `target/mill-release`) +* Various dependency updates +* Lots of internal improvements + +_For details refer to +{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] +and the {link-compare}/{prev-version}\...{version}[list of commits]._ + + +[#0-10-0] +=== 0.10.0 - 2022-01-14 +:version: 0.10.0 +:prev-version: 0.10.0-M5 +:milestone: 57 +:milestone-name: 0.10.0 + +_Changes since {prev-version}:_ + +* Changed structure of `out` directory, `out/foo/dest` is now `out/foo.dest` +* Fixed issues with loading of predef scripts +* `--watch` now supports manual re-runs by pressing enter +* Improved subprocess handling +* Published poms can now contain properties and `versionScheme` information +* Improved Scala.js support, including more target configuration options and support for Node 17 +* Improved Scala Native for version > 0.4.2 and support Scala 3 +* Internal improvements, fixes and dependency version updates + +_For details refer to +{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] +and the {link-compare}/{prev-version}\...{version}[list of commits]._ + + +[#0-10-0-M5] +=== 0.10.0-M5 - 2021-12-18 +:version: main +:prev-version: 0.10.0-M4 +:milestone: 55 +:milestone-name: 0.10.0-M5 + +*This release breaks binary compatibility for external plugins.* + +_Changes since {prev-version}:_ + +* Fixed Log4Shell security vulnerability in `ZincWorkerModule` (CVE-2021-44228) +* Factored out the testrunner into a new module, which also fixes some potential classloader issues when executing tests (e.g. with JNA) +* Removed the limitation of max 22 inputs for tasks +* `--watched` commands can now re-run when pressing enter-key +* task and arguments of commands can now have hyphens in their name +* Reworked and decluttered the out-folder structure +* `prepareOffline` now has a `all` flag to control if all or only some dependency should be prefetched +* Made caching more effective for targets overridden in stackable-traits +* Further BSP improvements, esp. for Metals and Scala 3 +* Lots of other internal improvements and fixes +* Various dependency updates + +_For details refer to +{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] +and the {link-compare}/{prev-version}\...{version}[list of commits]._ + + +[#0-10-0-M4] +=== 0.10.0-M4 - 2021-11-08 +:version: 0.10.0-M4 +:prev-version: 0.10.0-M3 +:milestone: 54 +:milestone-name: 0.10.0-M4 + +_Changes since {prev-version}:_ + +* BSP support rework and overhaul of built-in BSP server +* GenIdea: failures when inspecting and resolving the build are not properly reported +* Coursier: we now implemented a workaround to tackle concurrent downloads issues +* New `+` separator to provide multiple targets (with parameters) via cmdline +* New `--import` cmdline option to run ad-hoc plugins without editing of `build.sc` +* New `T.ctx().workspace` API to access the project root directory +* Various internal improvements and bug fixes +* Various refactorings and cleanups + +_For details refer to +{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] +and the {link-compare}/{prev-version}\...{version}[list of commits]._ + + +[#0-1-0-M3] +=== 0.10.0-M3 - 2021-09-29 +:version: 0.10.0-M3 +:prev-version: 0.10.0-M2 +:milestone: 53 +:milestone-name: 0.10.0-M3 + +*This is a milestone release. +This release breaks binary compatibility for external plugins build for mill 0.9.x. +The API is suspected to change before a 0.10.0 releae.* + +_Changes since {prev-version}:_ + +* `ScalaModule with PublishModule`: the `scala-library` artifact is now always part of the dependencies in published `pom.xml`s and `ivy.xml`s +* New `JavaModule.mandatoryIvyDeps` target to provide essential dependencies like scala-library without forcing the user to call `super.ivyDeps` +* `ScalaJSModule.scalaLibraryIvyDeps` no longer contains the scala-js-library, but only the scala-library; if you need that, use `ScalaJSModule.mandatoryIvyDeps` instead. +* `import $ivy` support `$MILL_BIN_PLATFORM` variable and a new sort notations for external plugins +* We fixed and enabled lots of tests to run on Windows +* Some generic targets like `plan` or `path` now also return their output +* `GenIdea`: improved support for Scala 3 projects * + +_For details refer to +{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] +and the {link-compare}/{prev-version}\...{version}[list of commits]._ + + +[#0-10-0-M2] +=== 0.10.0-M2 - 2021-09-17 +:version: 0.10.0-M2 +:prev-version: 0.9.9 +:milestone: 51 +:milestone-name: 0.10.0-M2 + +*This is a early milestone release. +This release breaks binary compatibility for external plugins build for mill 0.9.x. +The API is suspected to change before a 0.10.0 releae.* + +_Changes since {prev-version}:_ + +* Removed deprecated API +* `ScalaModule`: added `mandatoryScalacOptions` to avoid the common issue that users forget to include mandatory options when defining their own. +* Renamed `toolsClasspath` targets found in various modules to avoid hard to resolve clashes when mixing traits +* Fixed and improved our test suite on Windows +* Various fixes and improvements +* Various dependency updates + +_For details refer to +{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] +and the {link-compare}/{prev-version}\...{version}[list of commits]._ + + +[#0-9-12] +=== 0.9.12 - 2022-01-07 +:version: 0.9.12 +:prev-version: 0.9.11 +:milestone: 58 +:milestone-name: 0.9.12 + +* fixed parsing of command parameters in `show` command +* zinc worker: Updated log4j2 to 2.17.1 + +_For details refer to +{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] +and the {link-compare}/{prev-version}\...{version}[list of commits]._ + + +[#0-9-11] +=== 0.9.11 - 2021-12-15 +:version: 0.9.11 +:prev-version: 0.9.10 +:milestone: 56 +:milestone-name: 0.9.11 + +* zinc worker: Updated log4j2 to 2.16.0 to fix Log4Shell (CVE-2021-44228) vulnerability + +_For details refer to +{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] +and the {link-compare}/{prev-version}\...{version}[list of commits]._ + + +[#0-9-10] +=== 0.9.10 - 2021-11-13 +:version: 0.9.10 +:prev-version: 0.9.9 +:milestone: 52 +:milestone-name: 0.9.10 + +* Some feature backports from mill 0.10 +* New `+` separator to provide multiple targets (with parameters) via cmdline +* New `--import` cmdline option to run ad-hoc plugins without editing of `build.sc` +* `import $ivy` support `$MILL_BIN_PLATFORM` variable and a new sort notations for external plugins + +_For details refer to +{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] +and the {link-compare}/{prev-version}\...{version}[list of commits]._ + + +[#0-9-9] +=== 0.9.9 - 2021-07-15 +:version: 0.9.9 +:prev-version: 0.9.8 +:milestone: 50 +:milestone-name: 0.9.9 + +_Changes since {prev-version}:_ + +* BSP: Fixed/improved source item for root project +* Bloop: Prevent compilation during bloop config generation +* GenIdea: Fix content path of root project (mill-build) +* Various version bumps + +_For details refer to +{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] +and the {link-compare}/{prev-version}\...{version}[list of commits]._ + + +[#0-9-8] +=== 0.9.8 - 2021-05-27 +:version: 0.9.8 +:prev-version: 0.9.7 +:milestone: 49 +:milestone-name: 0.9.8 + +_Changes since {prev-version}:_ + +* Fixed some potential binary incompatibilities with external plugins (builds against older os-lib versions) +* Fixed location and configuration of mills home path (used for caching of build scripts) +* Properly close jar resources - should fix issues in `assembly`, esp. on Windows where open resources are locked +* BSP: Repaired mills BSP server +* playlib: Fixed issues with the play-contrib module and added support for Play 2.8 +* GenIdea: changed dir for generated mill modules to `.idea/mill_modules` +* Various version bumps, including Scala 2.13.5 + +_For details refer to +{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] +and the {link-compare}/{prev-version}\...{version}[list of commits]._ + + +[#0-9-7] +=== 0.9.7 - 2021-05-14 +:version: 0.9.7 +:prev-version: 0.9.6 +:milestone: 48 +:milestone-name: 0.9.7 + +_Changes since {prev-version}:_ + +* `ScalaModule`: Support for Scala 3 +* `CoursierModule`: Support customized dependency resolution (needed to work with ScalaFX) +* `TestModule`: Added new `testFramework` target and only support one test framework. +Deprecated `testFrameworks` targets. +* `TestModule`: Added new convenience traits to configure popular test frameworks, e.g. `TestModule.Junit4`, `TestModule.ScalaTest`, `TestModule.Utest` and many more +* `Bloop`: Added support for foreign modules +* Better support for Windows environments +* Various internal improvements, cleanups, and deprecations +* Various dependencies updates +* Removed tut contrib module because of unmaintained/archived upstream dependency + +_For details refer to +{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] +and the {link-compare}/{prev-version}\...{version}[list of commits]._ + + +[#0-9-6] +=== 0.9.6 - 2021-04-03 + +_The mill project home and repository has been moved to https://github.com/com-lihaoyi/mill._ + +* `repl` and `console` targets now support `forkArgs` and `forkEnv` +* Support for Scala 3 release candidates and new Scaladoc 3 tool +* Support for Scala.js on Scala 3 +* Scala Native improvements +* Test runner now uses an args file to support running tests on Windows +* GenIdea: better supports source jars, full config contributions and provided/runtime dependencies +* Various dependency updates +* Documentation site reworked to support multiple release versions +* Improved CI setup to better test mill on Windows + +_For details refer to +{link-milestone}/47?closed=1[milestone 0.9.6] +and the {link-compare}/0.9.5\...0.9.6[list of commits]._ + + +[#0-9-5] +=== 0.9.5 - 2021-01-26 + +* Updated zinc to 1.4.4 +* Support for Scala Native 0.4.0 +* Support for Scala.js ESModule (including Bloop support) +* Inner `Tests` traits in modules like `JavaModule`, `ScalaModule` and others now have unique names (`JavaModuleTests`, `ScalaTests`, etc), to allow for easier customization +* Various version bumps of dependencies +* CI now runs all tests, it did miss some before + +_For details refer to {link-milestone}/46?closed=1[milestone 0.9.5] +and the link:{link-compare}/0.9.4\...0.9.5[list of commits]._ + + +[#0-9-4] +=== 0.9.4 - 2020-12-21 + +* Implemented more BSP protocol commands and fixed some glitches with IntelliJ +* Stabilized CI builds +* Various fixes and improvements +* Various version bumps + +_For details refer to {link-milestone}/45?closed=1[milestone 0.9.4] +and the {link-compare}/0.9.3\...0.9.4[list of commits]._ + + +[#0-9-3] +=== 0.9.3 - 2020-11-26 + +_(We also tagged `0.9.0`, `0.9.1`, and `0.9.2`, but due to release difficulties, we ask you not to use them.)_ + +* Replace the built in `@main` method functionality with the +https://github.com/lihaoyi/mainargs[MainArgs] library +* Note that the MainArgs replacement has some backwards incompatibilities: Short flags like `-i` can no longer be passed via `--i`, the `@doc("")` is now `@arg(doc = "")`, `Seq[T]` parameters are now passed via repeated `--foo` +flags rather than comma-separated. +* Add the ability to relocate/shade files in `.assembly` {link-pr}/947[#947] +* Twirl enhancements {link-pr}/952[#952] +* Add `scalacPluginClasspath` to Tests {link-pr}/956[#956] +* Add `toMap` methods to `BuildInfo` {link-pr}/958[#958] +* Bump coursier to version 2.0.0 {link-pr}/973[#973] +* Make BSP support a first-class citizen {link-pr}/969[#969] +* Omit the suffix in `artifactName` in cross modules {link-pr}/953[#953] +* Allow test classes with constructor parameters {link-pr}/982[#982] +* Proguard contrib module {link-pr}/972[#972] +* Support Scala.js useECMAScript2015 option and ModuleKind.ESModule +{link-pr}/1004[#1004] +* Support Scala.js incremental linking +{link-pr}/1007[#1007] + +_For details refer to {link-milestone}/44?closed=1[milestone 0.9.3] +and the {link-compare}/0.8.0\...0.9.3[list of commits]._ + + +[#0-8-0] +=== 0.8.0 - 2020-07-20 + +* Bump external dependencies: uPickle 1.2.0, Ammonite 2.2.0, etc. +* Use default coursier repos (#931) +* Work around relative paths issue on windows (#936) +* Support Scala.js versions >1.0.0 (#934) + +_For details refer to {link-milestone}/43?closed=1[milestone 0.8.0] +and the {link-compare}/0.7.4\...0.8.0[list of commits]._ + + +[#0-7-4] +=== 0.7.4 - 2020-07-03 + +* new command line options `--repl` and `--no-server`, deprecated `--interactive` option +* Support for Scala.js 1.1 +* Fixed missing source maps for Scala.js 1.0 and 1.1 +* Improved BSP contrib module + +_For details refer to {link-milestone}/42?closed=1[milestone 0.7.4] +and the {link-compare}/0.7.3\...0.7.4[list of commits]._ + + +[#0-7-3] +=== 0.7.3 + +_For details refer to {link-milestone}/41?closed=1[milestone 0.7.3] +and the {link-compare}/0.7.2\...0.7.3[list of commits]._ + + +[#0-7-2] +=== 0.7.2 - 2020-05-19 + + +_For details refer to {link-milestone}/40?closed=1[milestone 0.7.2] +and the {link-compare}/0.7.1\...0.7.2[list of commits]._ + + +[#0-7-1] +=== 0.7.1 - 2020-05-17 + +_For details refer to {link-milestone}/39?closed=1[milestone 0.7.1] +and the {link-compare}/0.7.0\...0.7.1[list of commits]._ + + +[#0-7-0] +=== 0.7.0 - 2020-05-15 + +* Greatly improved parallel builds via `-j <n>`/`--jobs <n>`, with better scheduling and utilization of multiple cores +* `build.sc` files now uses Scala 2.13.2 +* Avoid duplicate target resolution with `mill resolve __` +* Add ability to pass GPG arguments to publish via `--gpgArgs` +* `-w`/`--watch` now works for `Task.Source` targets + +_For details refer to {link-milestone}/37?closed=1[milestone 0.7.0] +and the {link-compare}/0.6.3\...0.7.0[list of commits]._ + + +[#0-6-3] +=== 0.6.3 - 2020-05-10 + +* Finished incomplete support to publish extra artifacts to IVY repositories (`publishLocal`) +* Improved Sonatype uploads +* `GenIdea`: improvements for shared source dirs and skipped modules +* `ScoverageModule`: Some refactorings to allow better customization +* More robust classpath handling under Windows + +_For details refer to {link-milestone}/38?closed=1[milestone 0.6.3] +and the {link-compare}/0.6.2\...0.6.3[list of commits]._ + + +[#0-6-2] +=== 0.6.2 - 2020-04-22 + +* Mill can now execute targets in parallel. +This is experimental and need to be enabled with `--jobs <n>` option. +* `PublishModule`: new `publishM2Local` to publish into local Maven repositories +* `PublishModule`: enhanced `publishLocal` to specify to ivy repository location +* Windows: Fixed windows launcher and more robust classpath handling +* `ScalaNativeModule`: improved compiling and linking support +* new contrib module `VersionFile` +* `Dependency`: improved dependency update checker and expose results for programmatic use +* ǹew contrib module `Bintray` +* ǹew contrib module `Artifactory` +* fixed testCached support in various modules +* `GenIdea`: improvements, esp. related to source jars + +_For details refer to {link-milestone}/36?closed=1[milestone 0.6.2] +and the {link-compare}/0.6.1\...0.6.2[list of commits]._ + + +[#0-6-1] +=== 0.6.1 - 2020-02-24 + +* Bugfix: Mill now no longer leaks open files (version bump to uPickle 1.0.0) +* New `--version` option +* Added Support for Scala.js 1.0.0+ +* Added Support for Scala Native 0.4.0-M2 +* `JavaModule`: Enhanced `ivyDepsTree` to optionally include compile-time and runtime-time dependencies +* `JavaModule`: `allSourceFiles` no longer include Scala sources +* `JavaModule`: assembly supports configurable separator when merging resources +* `ScoverageModule`: respect `unmanagedClasspath`, added console reporter +* `ScalaPBModule`: added more configuration options +* Bloop: Fixed inconsistent working directory when executing tests via bloop (forces `-Duser.dir` when generating bloop config) + +_For details refer to {link-milestone}/35?closed=1[milestone 0.6.1] +and the {link-compare}/0.6.0\...0.6.1[list of commits]._ + + +[#0-6-0] +=== 0.6.0 - 2020-01-20 + +* Support for METALS 0.8.0 in VSCode + +_For details refer to {link-milestone}/34?closed=1[milestone 0.6.0] +and the {link-compare}/0.5.9\...0.6.0[list of commits]._ + + +[#0-5-9] +=== 0.5.9 - 2020-01-14 + +* Bump library versions again +* Alias `T.ctx.*` functions to `T.*`: `T.dest`, `T.log`, etc. +* Bump Mill's client-connect-to-server timeout, to reduce flakiness when the server is taking a moment to start up + +_For details refer to the {link-compare}/0.5.7\...0.5.9[list of commits]._ + +*Version 0.5.8 has some binary compatibility issues in requests-scala/geny and should not be used.* + +=== 0.5.7 - 2019-12-28 + +* Bump library versions: Ammonite 2.0.1, uPickle 0.9.6, Scalatags 0.8.3, OS-Lib 0.6.2, Requests 0.4.7, Geny 0.4.2 + +_For details refer to {link-milestone}/33?closed=1[milestone 0.5.7] +and the {link-compare}/0.5.5\...0.5.7[list of commits]._ + +[#0-5-6] +[#0-5-5] +=== 0.5.5 / 0.5.6 - 2019-12-20 + +_(we skipped version 0.5.4 as we had some publishing issues)_ + +* Bump library versions: Ammonite 1.9.2, uPickle 0.9.0, Scalatags 0.8.2, OS-Lib 0.5.0, Requests 0.3.0, Geny 0.2.0, uTest 0.7.1 +* Fixed a long standing issue that output of sub-processes are only shown when `-i` option was used. +Now, you will always seen output of sub-process. +* Mill now properly restarts it's server after it's version has changed +* `PublishModule`: added ability to publish into non-staging repositories +* `ScalaPBModule`: added extra include path option + +_For details refer to {link-milestone}/32?closed=1[milestone 0.5.5] +and the {link-compare}/0.5.3\...0.5.5[list of commits]._ + +[#0-5-3] +=== 0.5.3 - 2019-12-07 + +* `GenIdea/idea`: improved support for generated sources and use/download sources in more cases +* ScalaJS: improvements and support for ScalaJS 0.6.29+ and 1.0.1.RC1 +* Introduced new `CoursierModule` to use dependency management independent from a compiler +* `ScoverageModule`: better handling of report directories +* `ScalaPBModule`: more configuration options +* various other fixes and improvements + +_For details refer to {link-milestone}/31?closed=1[milestone 0.5.3] +and the {link-compare}/0.5.2\...0.5.3[list of commits]._ + +[#0-5-2] +=== 0.5.2 - 2019-10-17 + +* `TestModule`: new `testCached`target, which only re-runs tests after relevant changes +* `TestModule.test`: fixed issue when stacktraces have no filename info +* `Dependency/updates`: fixed issue with reading stale dependencies +* `GenIdea/idea`: no longer shared output directories between mill and IntelliJ IDEA +* support for Dotty >= 0.18.1 +* Fixed backwards compatibility of mill wrapper script +* Mill now support the Build Server Protocol 2.0 (BSP) and can act as a build server +* bloop: removed semanticDB dependency +* Documentation updates + +_For details refer to {link-milestone}/30?closed=1[milestone 0.5.2] +and the {link-compare}/0.5.1\...0.5.2[list of commits]._ + +[#0-5-1] +=== 0.5.1 - 2019-09-05 + +* GenIdea: Bug fixes +* GenIdea: Support for module specific extensions (Facets) and additional config files +* Add ability to define JAR manifests +* Dotty support: Updates and support for binary compiler bridges +* Ivy: improved API to create optional dependendies +* Interpolate `$MILL_VERSION` in ivy imports +* Zinc: Fixed logger output +* Scoverage: Upgrade to Scoverage 1.4.0 +* Flyway: Upgrade to Flyway 6.0.1 +* Bloop: Updated semanticDB version to 4.2.2 +* Documentation updates +* Improved robustness in release/deployment process + +_For details refer to {link-milestone}/29?closed=1[milestone 0.5.1] +and the {link-compare}/0.5.0\...0.5.1[list of commits]._ + +[#0-5-0] +=== 0.5.0 - 2019-08-08 + +* Mill now supports a `./mill` +{link-current-doc-site}/#bootstrap-scripts-linuxos-x-only[bootstrap script], allowing a project to pin the version of Mill it requires, as well as letting contributors use `./mill ...` to begin development without needing to install Mill beforehand. + +* Support for a `.mill-version` file or `MILL_VERSION` environment variable for +{link-current-doc-site}/#overriding-mill-versions[Overriding Mill Versions] + +* Fix scoverage: inherit repositories from outer project {link-pr}/645[#645] + +[#0-4-2] +=== 0.4.2 - 2019-06-30 + +* Improvements to IntelliJ project generation {link-pr}/616[#616] + +* Allow configuration of Scala.js' JsEnv {link-pr}/628[#628] + +[#0-4-1] +=== 0.4.1 - 2019-06-13 + +* Fixes for scala native test suites without test frameworks {link-issue}/627[#627] + +* Fix publication of artifacts by increasing sonatype timeouts + +* Bug fixes for Scoverage integration {link-issue}/623[#623] + +[#0-4-0] +=== 0.4.0 - 2019-05-20 + +* Publish `compileIvyDeps` as provided scope ({link-issue}/535[535]) + +* Added contrib modules to integrate +{link-current-doc-site}/page/contrib-modules.html#bloop[Bloop], +{link-current-doc-site}/page/contrib-modules.html#flyway[Flyway], +{link-current-doc-site}/page/contrib-modules.html#play-framework[Play Framework], +{link-current-doc-site}/page/contrib-modules.html#scoverage[Scoverage] + +* Allow configuration of GPG key names when publishing ({link-pr}/530[530]) + +* Bump Ammonite version to 1.6.7, making +https://github.com/lihaoyi/requests-scala[Requests-Scala] available to use in your `build.sc` + +* Support for Scala 2.13.0-RC2 + +* ScalaFmt support now uses the version specified in `.scalafmt.conf` + +[#0-3-6] +=== 0.3.6 - 2019-01-17 + +* Started to splitting out mill.api from mill.core + +* Avoid unnecessary dependency downloading by providing fetches per cache policy + +* Added detailed dependency download progress to the progress ticker + +* Fixed internal code generator to support large projects + +* Zinc worker: compiler bridge can be either pre-compiled or on-demand-compiled + +* Zinc worker: configurable scala library/compiler jar discovery + +* Zinc worker: configurable compiler cache supporting parallelism + +* Version bumps: ammonite 1.6.0, scala 2.12.8, zinc 1.2.5 + +* Mill now by default fails fast, so in case a build tasks fails, it exits immediately + +* Added new `-k`/`--keep-going` commandline option to disable fail fast behaviour and continue build as long as possible in case of a failure + +[#0-3-5] +=== 0.3.5 - 2018-11-18 + +* Bump uPickle to 0.7.1 + +[#0-3-4] +=== 0.3.4 - 2018-11-06 + +* Mill is now bundled with https://github.com/lihaoyi/os-lib[OS-Lib], providing a simpler way of dealing with filesystem APIs and subprocesses + +[#0-3-3] +=== 0.3.3 - 2018-11-02 + +* Added new `debug` method to context logger, to log additional debug info into the task specific output dir (`out/<task>/log`) + +* Added `--debug` option to enable debug output to STDERR + +* Fix `ScalaModule#docJar` task when Scala minor versions differ {link-issue}/475[475] + +[#0-3-2] +=== 0.3.2 - 2018-10-19 + +* Automatically detect main class to make `ScalaModule#assembly` self-executable + +[#0-3-0] +=== 0.3.0 - 2018-10-19 + +* Bump Ammonite to 1.3.2, Fastparse to 2.0.4 + +* Sped up `ScalaModule#docJar` task by about 10x, greatly speeding up publishing + +* Add a flag `JavaModule#skipIdea` you can override to disable Intellij project generation {link-pr}/458[#458] + +* Allow sub-domains when publishing {link-pr}/441[#441] + +[#0-2-8] +=== 0.2.8 - 2018-09-21 + +* `mill inspect` now displays out the doc-comment documentation for a task. + +* Avoid shutdown hook failures in tests {link-pr}/422[#422] + +* Ignore unreadable output files rather than crashing {link-pr}/423[#423] + +* Don't compile hidden files {link-pr}/428[#428] + +[#0-2-7] +=== 0.2.7 - 2018-08-27 + +* Add `visualizePlan` command + +* Basic build-info plugin in `mill-contrib-buildinfo` + +* ScalaPB integration in `mill-contrib-scalapblib` + +* Fixes for Twirl support, now in `mill-contrib-twirllib` + +* Support for building Dotty projects +{link-pr}/397[#397] + +* Allow customization of `run`/`runBackground` working directory via +`forkWorkingDir` + +* Reduced executable size, improved incremental compilation in +{link-pr}/414[#414] + +[#0-2-6] +=== 0.2.6 - 2018-07-30 + +* Improve incremental compilation to work with transitive module dependencies + +* Speed up hot compilation performance by properly re-using classloaders + +* Speed up compilation time of `build.sc` files by removing duplicate macro generated routing code + +[#0-2-5] +=== 0.2.5 - 2018-07-22 + +* Add `.runBackground` and `.runMainBackground` commands, to run something in the background without waiting for it to return. +The process will keep running until it exits normally, or until the same `.runBackground` command is run a second time to spawn a new version of the process. +Can be used with `-w` for auto-reloading of long-running servers. + +* {link-current-doc-site}/page/common-project-layouts.html#scala-native-modules[Scala-Native support]. +Try it out! + +* Add `--disable-ticker` to reduce spam in CI + +* Fix propagation of `--color` flag + +[#0-2-4] +=== 0.2.4 - 2018-07-07 + +* Fix resolution of `scala-{library,compiler,reflect}` in case of conflict + +* Allow configuration of `JavaModule` and `ScalafmtModule` scala workers + +* Allow hyphens in module and task names + +* Fix publishing of ScalaJS modules to properly handle upstream ScalaJS dependencies + +[#0-2-3] +=== 0.2.3 - 2018-06-03 + +* Added the {link-current-doc-site}/#visualize[mill visualize] +command, making it easy to visualize the relationships between various tasks and modules in your Mill build. + +* Improve Intellij support ({link-pr}/351[351]): +better jump-to-definition for third-party libraries, no longer stomping over manual configuration, and better handling of `import $ivy` in your build file. + +* Support for un-signed publishing and cases where your GPG key has no passphrase ({link-pr}/346[346]) + +* Basic support for Twirl, Play Framework's templating language ({link-pr}/271[271]) + +* Better performance for streaming large amounts of stdout from Mill's daemon process. + +* Allow configuration of append/exclude rules in `ScalaModule#assembly` +({link-pr}/309[309]) + +[#0-2-2] +=== 0.2.2 - 2018-05-20 + +* Preserve caches when transitioning between `-i`/`--interactive` and the fast client/server mode ({link-issue}/329[329]) + +* Keep Mill daemon running if you Ctrl-C during `-w`/`--watch` mode ({link-issue}/327[327]) + +* Allow `mill version` to run without a build file ({link-issue}/328[328]) + +* Make `docJar` (and thus publishing) robust against scratch files in the source directories ({link-issue}/334[334]) and work with Scala compiler options ({link-issue}/336[336]) + +* Allow passing Ammonite command-line options to the `foo.repl` command ({link-pr}/333[333]) + +* Add `mill clean` ({link-pr}/315[315]) to easily delete the Mill build caches for specific targets + +* Improve IntelliJ integration of `MavenModule`s/`SbtModule`s' test folders ({link-pr}/298[298]) + +* Avoid showing useless stack traces when `foo.test` result-reporting fails or +`foo.run` fails + +* ScalaFmt support ({link-pr}/308[308]) + +* Allow `ScalaModule#generatedSources` to allow single files (previous you could only pass in directories) + +[#0-2-0] +=== 0.2.0 - 2018-04-10 + +* Universal (combined batch/sh) script generation for launcher, assembly, and release ({link-issue}/264[#264]) + +* Windows client/server improvements ({link-issue}/262[#262]) + +* Windows repl support (note: MSYS2 subsystem/shell will be supported when jline3 v3.6.3 is released) + +* Fixed Java 9 support + +* Remove need for running `publishAll` using `--interactive` when on OSX and your GPG key has a passphrase + +* First-class support for `JavaModule`s + +* Properly pass compiler plugins to Scaladoc ({link-issue}/282[#282]) + +* Support for ivy version-pinning via `ivy"...".forceVersion()` + +* Support for ivy excludes via `ivy"...".exclude()` ({link-pr}/254[#254]) + +* Make `ivyDepsTree` properly handle transitive dependencies ({link-issue}/226[#226]) + +* Fix handling of `runtime`-scoped ivy dependencies ({link-issue}/173[#173]) + +* Make environment variables available to Mill builds ({link-issue}/257[#257]) + +* Support ScalaCheck test runner ({link-issue}/286[#286]) + +* Support for using Typelevel Scala ({link-issue}/275[#275]) + +* If a module depends on multiple submodules with different versions of an ivy dependency, only one version is resolved ({link-issue}/273[#273]) + +[#0-1-7] +=== 0.1.7 - 2018-03-26 + +* Support for non-interactive (client/server) mode on Windows. + +* More fixes for Java 9 + +* Bumped the Mill daemon timeout from 1 minute to 5 minutes of inactivity before it shuts down. + +* Avoid leaking Node.js subprocesses when running `ScalaJSModule` tests + +* Passing command-line arguments with spaces in them to tests no longer parses wrongly + +* `ScalaModule#repositories`, `scalacPluginIvyDeps`, `scalacOptions`, +`javacOptions` are now automatically propagated to `Tests` modules + +* `ScalaJSModule` linking errors no longer show a useless stack trace + +* `ScalaModule#docJar` now properly uses the compileClasspath rather than runClasspath + +* Bumped underlying Ammonite version to http://ammonite.io/#1.1.0[1.1.0], which provides the improved Windows and Java 9 support + +[0-1-6] +=== 0.1.6 - 2018-03-13 + +* Fixes for non-interactive (client/server) mode on Java 9 + +* Windows batch (.bat) generation for launcher, assembly, and release + +[#0-1-5] +=== 0.1.5 - 2018-03-13 + +* Introduced the `mill plan foo.bar` command, which shows you what the execution plan of running the `foo.bar` task looks like without actually evaluating it. + +* Mill now generates an `out/mill-profile.json` file containing task-timings, to make it easier to see where your mill evaluation time is going + +* Introduced `ScalaModule#ivyDepsTree` command to show dependencies tree + +* Rename `describe` to `inspect` for consistency with SBT + +* `mill resolve` now prints results sorted alphabetically + +* Node.js configuration can be customised with `ScalaJSModule#nodeJSConfig` + +* Scala.js `fullOpt` now uses Google Closure Compiler after generating the optimized Javascript output + +* Scala.js now supports `NoModule` and `CommonJSModule` module kinds + +* Include `compileIvyDeps` when generating IntelliJ projects + +* Fixed invalid POM generation + +* Support for Java 9 (and 10) + +* Fixes for Windows support + +* Fixed test classes discovery by skipping interfaces + +* Include "optional" artifacts in dependency resolution if they exist + +* `out/{module_name}` now added as a content root in generated IntelliJ project + +[#0-1-4] +=== 0.1.4 - 2018-03-04 + +* Speed up Mill client initialization by another 50-100ms + +* Speed up incremental `assembly`s in the common case where upstream dependencies do not change. + +* Make `ScalaJSModule#run` work with main-method discovery + +* Make `ScalaWorkerModule` user-defineable, so you can use your own custom coursier resolvers when resolving Mill's own jars + +* Simplify definitions of `SCM` strings + +* Make the build REPL explicitly require `-i`/`--interactive` to run + +* Log a message when Mill is initializing the Zinc compiler interface + +[#0-1-3] +=== 0.1.3 - 2018-02-26 + +* Greatly reduced the overhead of evaluating Mill tasks, with a warm already-cached `mill dev.launcher` now taking ~450ms instead of ~1000ms + +* Mill now saves compiled build files in `~/.mill/ammonite`, which is configurable via the `--home` CLI arg. + +* Fixed linking of multi-module Scala.js projects + +[#0-1-2] +=== 0.1.2 - 2018-02-25 + +* Mill now keeps a long-lived work-daemon around in between commands; this should improve performance of things like `compile` which benefit from the warm JVM. +You can use `-i`/`--interactive` for interactive consoles/REPLs and for running commands without the daemon + +* Implemented the `ScalaModule#launcher` target for easily creating command-line launchers you can run outside of Mill + +* `ScalaModule#docJar` no longer fails if you don't have `scala-compiler` on classpath + +* Support for multiple `testFrameworks` in a test module. + +[#0-1-1] +=== 0.1.1 - 2018-02-19 + +* Fixes for `foo.console` +* Enable Ammonite REPL integration via `foo.repl` + +[#0-1-0] +=== 0.1.0 - 2018-02-18 + +* First public release + +// end::changelogOld[] diff --git a/ci/package.mill b/ci/package.mill deleted file mode 100644 index 5449995b6dc..00000000000 --- a/ci/package.mill +++ /dev/null @@ -1 +0,0 @@ -package build.ci diff --git a/ci/shared.mill b/ci/shared.mill deleted file mode 100644 index d28af501855..00000000000 --- a/ci/shared.mill +++ /dev/null @@ -1,8 +0,0 @@ -package build.ci - - - -def downloadTestRepo(label: String, commit: String, dest: os.Path) = { - os.unzip.stream(requests.get.stream(s"https://github.com/$label/archive/$commit.zip"), dest) - dest -} diff --git a/ci/upload.mill b/ci/upload.mill deleted file mode 100644 index afd59c359cc..00000000000 --- a/ci/upload.mill +++ /dev/null @@ -1,45 +0,0 @@ -package build.ci - -def apply( - uploadedFile: os.Path, - tagName: String, - uploadName: String, - authKey: String, - githubOrg: String, - githubRepo: String -): String = { - - val response = requests.get( - s"https://api.github.com/repos/${githubOrg}/${githubRepo}/releases/tags/${tagName}", - headers = Seq( - "Authorization" -> s"token $authKey", - "Accept" -> "application/vnd.github.v3+json" - ) - ) - - val parsed = ujson.read(response) - - println("Response code: " + response.statusCode) - println(response.text()) - - val snapshotReleaseId = parsed("id").num.toInt - - val uploadUrl = - s"https://uploads.github.com/repos/${githubOrg}/${githubRepo}/releases/" + - s"$snapshotReleaseId/assets?name=$uploadName" - - val res = requests.post( - uploadUrl, - headers = Seq( - "Content-Type" -> "application/octet-stream", - "Authorization" -> s"token $authKey" - ), - data = os.read.stream(uploadedFile) - ) - - println(res.text()) - val longUrl = ujson.read(res)("browser_download_url").str - - println("Long Url " + longUrl) - longUrl -} diff --git a/contrib/package.mill b/contrib/package.mill index e5ff1c1dce3..6c5251489c1 100644 --- a/contrib/package.mill +++ b/contrib/package.mill @@ -20,8 +20,6 @@ import build.Deps // plugins and dependencies import $meta._ -import $file.ci.shared -import $file.ci.upload object `package` extends RootModule { def contribModules: Seq[ContribModule] = @@ -115,7 +113,7 @@ object `package` extends RootModule { def testArgs = Task { super.testArgs() ++ Seq( - s"-DMILL_SCOVERAGE2_VERSION=${build.Deps.scalacScoverage2Plugin.dep.version}", + s"-DMILL_SCOVERAGE2_VERSION=${build.Deps.scalacScoverage2Plugin.dep.version}" ) } diff --git a/developer.adoc b/developer.adoc new file mode 100644 index 00000000000..e38bd37de5c --- /dev/null +++ b/developer.adoc @@ -0,0 +1,328 @@ + +== Developer Documentation + +The remainder of this readme is developer-documentation targeted at people who wish to work +on Mill's own codebase. The developer docs assume you have read through the user-facing +documentation linked above. It's also worth spending a few minutes reading the following +blog posts to get a sense of Mill's design & motivation: + + + +Mill is built using Mill. To begin, you just need a JVM installed, and the +`./mill` script will be sufficient to bootstrap the project. + +== IntelliJ Setup + +If you are using IntelliJ IDEA to edit Mill's Scala code, IntelliJ's built in BSP support should +be sufficient to load the Mill project, but you need to set up the file association from +`*.mill` as Scala source files manually in the following settings: + +* `Settings` / `Editor` / `File Types` / `Scala`, add the pattern `*.mill` + +== Manual & Automated Testing + +The following table contains the main ways you can test the code in +`com-lihaoyi/mill`, via manual testing or automated tests: + +|=== +| Config | Automated Testing | Manual Testing | Manual Testing CI +| In-Process Tests | `main.__.test`, `scalalib.test`, `contrib.buildinfo.test`, etc. | | +| Sub-Process w/o packaging/publishing| `example.\\__.local.server`, `integration.__.local.server` | `dist.run` | `test-mill-dev.sh` +| Sub-Process w/ packaging/publishing | `example.\\__.packaged.server`, `integration.__.packaged.server` | `dist.assembly` | `test-mill-release.sh` +| Bootstrapping: Building Mill with your current checkout of Mill | | `dist.installLocal` | `test-mill-bootstrap.sh` +|=== + +In general, `println` or `pprint.log` should work in most places and be sufficient for +instrumenting and debugging the Mill codebase. In the occasional spot where `println` +doesn't work you can use `mill.main.client.DebugLog.println` which writes to a file +`~/mill-debug-log.txt` in your home folder. `DebugLog` is useful for scenarios like +debugging Mill's terminal UI (where `println` would mess things up) or subprocesses +(where stdout/stderr may get captured or used and cannot be used to display your own +debug statements). + +=== In-Process Tests + +In-process tests live in the `.test` sub-modules of the various Mill modules. +These range from tiny unit tests, to larger integration tests that instantiate a +`mill.testkit.BaseModule` in-process and a `UnitTester` to evaluate tasks on it. + +Most "core" tests live in `main.__test`; these should run almost instantly, and cover +most of Mill's functionality that is not specific to Scala/Scala.js/etc.. +Tests specific to Scala/Scala.js/Scala-Native live in +`scalalib.test`/`scalajslib.test`/`scalanativelib.test` respectively, and take a lot longer +to run because running them involves actually compiling Scala code. + +The various `contrib` modules also have tests in this style, e.g. +`contrib.buildinfo.test` + +Note that the in-memory tests compile the `BaseModule` together with the test suite, +and do not exercise the Mill script-file bootstrapping, transformation, and compilation process. + +=== Sub-Process Tests *without* Packaging/Publishing + +`example.\\__.local.server` and `integration.__.local.server` tests run Mill end-to-end in a subprocess, +but *without* the expensive/slow steps of packaging the core packages into an assembly jar +and publishing the remaining packages to +`~/.ivy2/local`. +You can reproduce these tests manually using +`./mill dist.run `. + +`example` tests are written in a single `build.mill` file, with the test commands written +in a comment with a bash-like syntax together with the build code and comments that explain +the example. +These serve three purposes: + +1. Basic smoke-tests to make sure the functionality works at all, without covering every +edge case + +2. User-facing documentation, with the test cases, test commands, and explanatory comments +included in the Mill documentation site + +3. Example repositories, that Mill users can download to bootstrap their own projects + +The `integration` tests are similar to `example` tests and share most of their test +infrastructure, but with differences: + +1. `integration` tests are meant to test features more thoroughly then +`example` tests, covering more and deeper edge cases even at the expense of readability + +2. `integration` tests are written using a Scala test suite extending +`IntegrationTestSuite`, giving more flexibility at the expense of readability + +You can reproduce any of the tests manually using `dist.run`, e.g. + +**Automated Test** + +[source,bash] +---- +./mill "example.javalib.basic[1-simple].local.server" +---- + +**Manual Test** + +[source,bash] +---- +./mill dist.run example/javalib/basic/1-simple foo.run --text hello +---- + +**Manual Test using Launcher Script** + +[source,bash] +---- +./mill dist.launcher && (cd example/javalib/basic/1-simple && ../../../../out/dist/launcher.dest/run foo.run --text hello) +---- + +=== Sub-Process Tests *with* Packaging/Publishing + +`example.\\__.server`, `integration.__.server`, `example.\\__.fork` and +`integration.__.fork` cover the same test cases as the `.local.server` tests described above, but +they perform packaging of the Mill core modules into an assembly jar, and publish the +remaining modules to `~/.ivy2/local`. +This results in a more realistic test environment, but at the cost of taking tens-of-seconds +more to run a test after making a code change. + +You can reproduce these tests manually using `dist.installLocal`: + +[source,bash] +---- +./mill dist.installLocal && (cd example/basic/1-simple && ../../../mill-assembly.jar run --text hello) +---- + +You can also use `dist.native.installLocal` for a Graal Native Image executable, +which is slower to create but faster to start than the default executable assembly. + +There are two six of these tests, `.{local,assembly,native}.{server,fork}`. + +The first label specifies how the Mill code is packaged before testing + +1. `.local` runs using all compiled Mill code directly in the `out/` folder. This is the fastest +and should be used for most testing + +2. `.assembly` runs using the compiled Mill code either packaged into an assembly (for the Mill executable). +This is slower than `.local`, and normally isn't necessary unless you are debugging issues in the Mill +packaging logic. + +3. `.native` runs using the compiled Mill code packaged into an assembly with a Graal native binary launcher. +This is the slowest mode is only really necessary for debugging Mill's Graal native binary configuration. + +The second label specifies how the Mill process is managed during the test: + + +1. `.server` test run the test cases with the default configuration, so consecutive commands +run in the same long-lived background server process + +2. `.fork` test run the test cases with `--no-server`, meaning each command runs in a newly +spawned Mill process + +In general you should spend most of your time working with the `.local.server` version of the +`example` and `integration` tests to save time, and only run the others if you have a specific +thing you want to test that needs those code paths to run. + +=== Bootstrapping: Building Mill with your current checkout of Mill + +To test bootstrapping of Mill's own Mill build using a version of Mill built from your checkout, you can run + +[source,bash] +---- +./mill dist.installLocal +ci/patch-mill-bootstrap.sh +---- + +This creates a standalone assembly at `target/mill-release` you can use, which references jars +published locally in your `~/.ivy2/local` cache, and applies any necessary patches to +`build.mill` to deal with changes in Mill between the version specified in `.config/mill-version` +that is normally used to build Mill and the `HEAD` version your assembly was created from. +You can then use this standalone assembly to build & re-build your current Mill checkout without +worrying about stomping over compiled code that the assembly is using. + +You can also use `./mill dist.installLocalCache` to provide a "stable" version of Mill that +can be used locally in bootstrap scripts. + +This assembly is design to work on bash, bash-like shells and Windows Cmd. +If you have another default shell like zsh or fish, you probably need to invoke it with +`sh ~/mill-release` or prepend the file with a proper shebang. + +If you want to install into a different location or a different Ivy repository, you can set its optional parameters. + +.Install into `/tmp` +[source,bash] +---- +$ ./mill dist.installLocal --binFile /tmp/mill --ivyRepo /tmp/millRepo +... +Published 44 modules and installed /tmp/mill +---- +=== Testing Documentation Changes + +For testing documentation changes locally, you can generate documentation for the current checkout via + +[source,bash] +---- +$ ./mill docs.fastPages +---- + +To generate documentation for both the current checkout and earlier versions, you can use + + +[source,bash] +---- +$ ./mill docs.localPages +---- + +=== Troubleshooting + +In case of troubles with caching and/or incremental compilation, you can always restart from scratch removing the `out` directory: + +[source,bash] +---- +rm -rf out/ +---- + +=== Autofix and Autoformatting + +To run all autofixes and autoformatters: + +```bash +./mill __.fix + mill.javalib.palantirformat.PalantirFormatModule/ + mill.scalalib.scalafmt.ScalafmtModule/ + mill.kotlinlib.ktlint.KtlintModule/ +./mill --meta-level 1 mill.scalalib.scalafmt.ScalafmtModule/ +``` + +== Continuous Integration & Testing + +* Mill's pull-request validation runs with +https://mill-build.org/mill/large/selective-execution.html[Selective Test Execution] +enabled; this automatically selects the tests to run based on the code or build configuration +that changed in that PR. To disable this, you can label your PR with `run-all-tests`, which +will run all tests on a PR regardless of what code was changed + +* Mill tests draft PRs _on contributor forks_ of the repository, so please make sure Github +Actions are enabled on your fork. Once you are happy with your draft, mark it `ready_for_review` +and it will run CI on Mill's repository before merging + +* If you need to debug things in CI, you can comment/uncomment the two sections of +`.github/workflows/run-tests.yml` in order to skip the main CI jobs and only run the command(s) +you need, on the OS you want to test on. This can greatly speed up the debugging process +compared to running the full suite every time you make a change. + +== Project Layout + +The Mill project is organized roughly as follows: + +=== Core modules that are included in the main assembly + +* `runner`, `main.*`, `scalalib`, `scalajslib`, `scalanativelib`. + +These are general lightweight and dependency-free: mostly configuration & wiring of a Mill +build and without the heavy lifting. + +Heavy lifting is delegated to the worker modules (described below), which the core modules +resolve from Maven Central (or from the local filesystem in dev) and load into isolated +classloaders. + +=== Worker modules that are resolved from Maven Central + +* `scalalib.worker`, `scalajslib.worker[0.6]`, `scalajslib.worker[1.0]` + +These modules are where the heavy-lifting happens, and include heavy dependencies like the +Scala compiler, Scala.js optimizer, etc.. Rather than being bundled in the main assembly & +classpath, these are resolved separately from Maven Central (or from the local filesystem +in dev) and kept in isolated classloaders. + +This allows a single Mill build to use multiple versions of e.g. the Scala.js optimizer +without classpath conflicts. + +=== Contrib modules + +* `contrib/bloop/`, `contrib/flyway/`, `contrib/scoverage/`, etc. + +These are modules that help integrate Mill with the wide variety of different tools and +utilities available in the JVM ecosystem. + +These modules are not as stringently reviewed as the main Mill core/worker codebase, and +are primarily maintained by their individual contributors. +These are maintained as part of the primary Mill Github repo for easy testing/updating as +the core Mill APIs evolve, ensuring that they are always tested and passing against the +corresponding version of Mill. + +== Compatibility & Stability + +Mill maintains backward binary compatibility for each major version (`major.minor.point`), +enforced with Mima, for the following packages: + +- `mill.api` +- `mill.util` +- `mill.define` +- `mill.eval` +- `mill.resolve` +- `mill.scalalib` +- `mill.scalajslib` +- `mill.scalanativelib` + +Other packages like `mill.runner`, `mill.bsp`, etc. are on the classpath but offer no +compatibility guarantees. + +Currently, Mill does not offer compatibility guarantees for `mill.contrib` +packages, although they tend to evolve slowly. +This may change over time as these packages mature over time. + +== Project Maintenance + +=== Pull Requests + +* Changes to the main branch need a pull request. +Exceptions are preparation commits for releases, which are meant to be pushed with tags in one go +* Merged pull request (and closed issues) need to be assigned to a Milestone +* Pull requests are typically merged via "Squash and merge", so we get a linear and useful history +* Larger pull request, where it makes sense to keep single commits, or with multiple authors may be committed via merge commits. + +=== Commit Messages + +* The title should be meaningful and may contain the pull request number in parentheses (typically automatically generated on GitHub) +* The description should contain additional required details, which typically reflect the content of the first PR comment +* A full link to the pull request should be added via a line: `Pull request: ` +* If the PR has multiple authors but is merged as merge commit, those authors should be included via a line for each co-author: `Co-authored-by: ` +* If the message contains links to other issues or pull requests, you should use full URLs to reference them + +== Misc + +Mill is profiled using the +https://www.ej-technologies.com/products/jprofiler/overview.html[JProfiler Java Profiler], by courtesy of EJ Technologies. \ No newline at end of file diff --git a/dist/package.mill b/dist/package.mill index 0efefbb4424..df608dd2326 100644 --- a/dist/package.mill +++ b/dist/package.mill @@ -4,11 +4,10 @@ import mill.define.ModuleRef import mill.util.Jvm import mill.api.JarManifest import de.tobiasroeser.mill.vcs.version.VcsVersion -import $file.ci.upload import scala.util.Using -trait InstallModule extends build.MillPublishJavaModule{ +trait InstallModule extends build.MillPublishJavaModule { // All modules that we want to aggregate as part of this `dev` assembly. // Excluding itself, and the `dist` module that uses it lazy val allPublishModules = build.millInternal.modules.collect { @@ -18,7 +17,7 @@ trait InstallModule extends build.MillPublishJavaModule{ def executableRaw: T[PathRef] - def executable = Task{ + def executable = Task { Task.traverse(allPublishModules)(m => m.publishLocalCached)() executableRaw() } @@ -40,7 +39,9 @@ trait InstallModule extends build.MillPublishJavaModule{ def installLocalCache() = Task.Command { val path = installLocalTask( - Task.Anon((os.home / ".cache" / "mill" / "download" / (build.millVersion() + batExt)).toString()) + Task.Anon( + (os.home / ".cache" / "mill" / "download" / (build.millVersion() + batExt)).toString() + ) )() Task.log.outputStream.println(path.toString()) PathRef(path) @@ -51,12 +52,14 @@ trait InstallModule extends build.MillPublishJavaModule{ if (os.exists(targetFile)) Task.log.info(s"Overwriting existing local Mill binary at ${targetFile}") os.copy.over(executable().path, targetFile, createFolders = true) - Task.log.info(s"Published ${build.dist.allPublishModules.size} modules and installed ${targetFile}") + Task.log.info( + s"Published ${build.dist.allPublishModules.size} modules and installed ${targetFile}" + ) targetFile } } -object `package` extends RootModule with InstallModule { +object `package` extends RootModule with InstallModule { /** * Version of [[dist]] meant for local integration testing within the Mill @@ -91,7 +94,6 @@ object `package` extends RootModule with InstallModule { def genTask(m: ScalaModule) = Task.Anon { Seq(m.jar(), m.sourceJar()) ++ m.runClasspath() } - def localBinName = "mill-assembly.jar" def launcher = Task { @@ -112,16 +114,17 @@ object `package` extends RootModule with InstallModule { val launcherForkArgs = testArgs() ++ Seq( "-DMILL_CLASSPATH=" + runClasspath().map(_.path.toString).mkString(","), - "-DMILL_BUILD_LIBRARIES=" + genIdeaArgs.map(_.path).mkString(","), - + "-DMILL_BUILD_LIBRARIES=" + genIdeaArgs.map(_.path).mkString(",") ) val (millArgs, otherArgs) = - launcherForkArgs.partition(arg => arg.startsWith("-DMILL") && !arg.startsWith("-DMILL_VERSION")) + launcherForkArgs.partition(arg => + arg.startsWith("-DMILL") && !arg.startsWith("-DMILL_VERSION") + ) // Pass Mill options via file, due to small max args limit in Windows val vmOptionsFile = Task.dest / "mill.properties" val millOptionsContent = millArgs - .map(_.drop(2).replace("\\", "/")) // drop -D prefix, replace \ with / + .map(_.drop(2).replace("\\", "/")) // drop -D prefix, replace \ with / .mkString("\r\n") os.write(vmOptionsFile, millOptionsContent) @@ -134,7 +137,7 @@ object `package` extends RootModule with InstallModule { mainClass = "mill.runner.client.MillClientMain", shellClassPath = classpath, cmdClassPath = Agg(classpathJar.toString()), - jvmArgs = jvmArgs, + jvmArgs = jvmArgs ) os.write(outputPath, script) @@ -192,7 +195,12 @@ object `package` extends RootModule with InstallModule { def millBootstrap = Task.Source(Task.workspace / "mill") def millBootstrapBat = Task.Source(Task.workspace / "mill.bat") - def prepareBootstrapLauncher(bootstrap: os.Path, dest: os.Path, buildVersion: String, fileName: String) = { + def prepareBootstrapLauncher( + bootstrap: os.Path, + dest: os.Path, + buildVersion: String, + fileName: String + ) = { val outputPath = dest / fileName val millBootstrapGrepPrefix = "(\n *DEFAULT_MILL_VERSION=)" @@ -216,7 +224,7 @@ object `package` extends RootModule with InstallModule { prepareBootstrapLauncher(millBootstrapBat().path, Task.dest, build.millVersion(), "mill.bat") } - def examplePathsWithArtifactName:Task[Seq[(os.Path,String)]] = Task.Anon{ + def examplePathsWithArtifactName: Task[Seq[(os.Path, String)]] = Task.Anon { for { exampleMod <- build.example.exampleModules path = exampleMod.millSourcePath @@ -227,9 +235,8 @@ object `package` extends RootModule with InstallModule { } } - def exampleZips: T[Seq[PathRef]] = Task { - examplePathsWithArtifactName().map{ case (examplePath, exampleStr) => + examplePathsWithArtifactName().map { case (examplePath, exampleStr) => os.copy(examplePath, Task.dest / exampleStr, createFolders = true) os.write(Task.dest / exampleStr / ".mill-version", build.millLastTag()) os.copy(bootstrapLauncher().path, Task.dest / exampleStr / "mill") @@ -266,7 +273,7 @@ object `package` extends RootModule with InstallModule { ) for ((zip, name) <- zips) { - upload.apply( + upload( zip, releaseTag, name, @@ -277,15 +284,59 @@ object `package` extends RootModule with InstallModule { } } + def upload( + uploadedFile: os.Path, + tagName: String, + uploadName: String, + authKey: String, + githubOrg: String, + githubRepo: String + ): String = { + + val response = requests.get( + s"https://api.github.com/repos/${githubOrg}/${githubRepo}/releases/tags/${tagName}", + headers = Seq( + "Authorization" -> s"token $authKey", + "Accept" -> "application/vnd.github.v3+json" + ) + ) + + val parsed = ujson.read(response) + + println("Response code: " + response.statusCode) + println(response.text()) + + val snapshotReleaseId = parsed("id").num.toInt + + val uploadUrl = + s"https://uploads.github.com/repos/${githubOrg}/${githubRepo}/releases/" + + s"$snapshotReleaseId/assets?name=$uploadName" + + val res = requests.post( + uploadUrl, + headers = Seq( + "Content-Type" -> "application/octet-stream", + "Authorization" -> s"token $authKey" + ), + data = os.read.stream(uploadedFile) + ) + + println(res.text()) + val longUrl = ujson.read(res)("browser_download_url").str + + println("Long Url " + longUrl) + longUrl + } + object native extends mill.scalalib.NativeImageModule with InstallModule { - def artifactOsSuffix = T{ + def artifactOsSuffix = T { val osName = System.getProperty("os.name").toLowerCase if (osName.contains("mac")) "mac" else if (osName.contains("windows")) "windows" else "linux" } - def artifactCpuSuffix = T{ System.getProperty("os.arch") } + def artifactCpuSuffix = T { System.getProperty("os.arch") } def artifactName = s"${super.artifactName()}-${artifactOsSuffix()}-${artifactCpuSuffix()}" def mainClass = Some("mill.runner.client.MillClientMain") diff --git a/docs/modules/ROOT/pages/reference/changelog.adoc b/docs/modules/ROOT/pages/reference/changelog.adoc index 23d23d39850..b19731564a6 100644 --- a/docs/modules/ROOT/pages/reference/changelog.adoc +++ b/docs/modules/ROOT/pages/reference/changelog.adoc @@ -3,8 +3,8 @@ :page-aliases: Changelog.adoc -include::partial$project-readme.adoc[tag=changelog,leveloffset=-1] +include::partial$project-changelog.adoc[tag=changelog,leveloffset=-1] -include::partial$project-readme.adoc[tag=changelogOld,leveloffset=-1] +include::partial$project-changelog.adoc[tag=changelogOld,leveloffset=-1] include::partial$gtag-config.adoc[] \ No newline at end of file diff --git a/docs/package.mill b/docs/package.mill index 13e706d0ef6..0d5d09202b5 100644 --- a/docs/package.mill +++ b/docs/package.mill @@ -41,7 +41,7 @@ object `package` extends RootModule { "@antora/cli@3.1.9", "@antora/site-generator-default@3.1.9", "gitlab:antora/xref-validator", - "@antora/lunr-extension@v1.0.0-alpha.6", + "@antora/lunr-extension@v1.0.0-alpha.6" ), envArgs = Map(), workingDir = npmDir @@ -65,14 +65,14 @@ object `package` extends RootModule { } def source0 = T.source(millSourcePath) - def projectReadme = T.source(T.workspace / "readme.adoc") + def projectChangelog = T.source(T.workspace / "changelog.adoc") def source = Task { os.copy(source0().path, T.dest, mergeFolders = true) val pagesWd = T.dest / "modules" / "ROOT" / "pages" val partialsWd = T.dest / "modules" / "ROOT" / "partials" - os.copy(projectReadme().path, partialsWd / "project-readme.adoc", createFolders = true) + os.copy(projectChangelog().path, partialsWd / "project-changelog.adoc", createFolders = true) val renderedExamples: Seq[(os.SubPath, PathRef)] = T.traverse(build.example.exampleModules)(m => @@ -104,22 +104,22 @@ object `package` extends RootModule { PathRef(T.dest) } - def expandDiagramsInDirectoryAdocFile(dest: os.Path, - visualizeClassPath: Agg[os.Path]) - (implicit ctx: mill.api.Ctx) = { + def expandDiagramsInDirectoryAdocFile(dest: os.Path, visualizeClassPath: Agg[os.Path])(implicit + ctx: mill.api.Ctx + ) = { // Walk all files to render graphviz templates ourselves because the only Antora graphviz // plugin (Kroki) relies on an online web service that is super slow and flaky def walkAllFiles(inputs: Map[(os.Path, Int), String]): Map[(os.Path, Int), String] = { val output = collection.mutable.Map.empty[(os.Path, Int), String] - for (p <- os.walk(dest) if p.ext == "adoc"){ + for (p <- os.walk(dest) if p.ext == "adoc") { val outputLines = collection.mutable.ArrayDeque.empty[String] val graphvizLines = collection.mutable.ArrayDeque.empty[String] var isGraphViz = false var isGraphViz0 = false - for((line, i) <- os.read.lines(p).zipWithIndex){ - line match{ + for ((line, i) <- os.read.lines(p).zipWithIndex) { + line match { case "[graphviz]" => isGraphViz0 = true case "...." if isGraphViz0 => isGraphViz0 = false; isGraphViz = true case "```graphviz" => isGraphViz = true @@ -148,15 +148,19 @@ object `package` extends RootModule { val diagrams = walkAllFiles(Map()) // Batch the rendering so later it can be done in one call to a single subprocess, // minimizing per-subprocess overhead needed to spawn them over and over - val orderedDiagrams = diagrams.toSeq.map{case ((p, i), s) => (p, i, os.temp(s), os.temp.dir())} + val orderedDiagrams = diagrams.toSeq.map { case ((p, i), s) => + (p, i, os.temp(s), os.temp.dir()) + } mill.util.Jvm.runSubprocess( "mill.main.graphviz.GraphvizTools", visualizeClassPath, - mainArgs = orderedDiagrams.map{case (p, i, src, dest) => s"$src;$dest;svg"} + mainArgs = orderedDiagrams.map { case (p, i, src, dest) => s"$src;$dest;svg" } ) - walkAllFiles(orderedDiagrams.map{case (p, i, src, dest) => ((p, i), os.read(dest / "out.svg"))}.toMap) + walkAllFiles(orderedDiagrams.map { case (p, i, src, dest) => + ((p, i), os.read(dest / "out.svg")) + }.toMap) } @@ -201,7 +205,7 @@ object `package` extends RootModule { } def blogFolder0 = Task.Source(build.millSourcePath / "blog") - def blogFolder = Task{ + def blogFolder = Task { os.copy(blogFolder0().path, Task.dest, mergeFolders = true) expandDiagramsInDirectoryAdocFile(Task.dest, mill.main.VisualizeModule.classpath().map(_.path)) PathRef(Task.dest) @@ -224,7 +228,9 @@ object `package` extends RootModule { | sources: | - url: ${if (authorMode) build.baseDir else build.Settings.projectUrl} | branches: [] - | tags: ${build.Settings.legacyDocTags.filter(_ => !authorMode).map("'" + _ + "'").mkString("[", ",", "]")} + | tags: ${build.Settings.legacyDocTags.filter(_ => !authorMode).map( + "'" + _ + "'" + ).mkString("[", ",", "]")} | edit_url: false | start_path: docs/antora | @@ -262,12 +268,12 @@ object `package` extends RootModule { def oldDocSources: T[Seq[PathRef]] = Task { val versionLabels = - build.Settings.docTags.map{v => + build.Settings.docTags.map { v => val xVersion = v.split('.').dropRight(1).mkString(".") + ".x" (v, xVersion, xVersion) } ++ - // Set the latest stable branch as the "master" docs that people default to - Seq((build.Settings.docTags.last, "master", s"latest-${build.Settings.docTags.last}")) + // Set the latest stable branch as the "master" docs that people default to + Seq((build.Settings.docTags.last, "master", s"latest-${build.Settings.docTags.last}")) for ((millLastTag, version, displayVersion) <- versionLabels) yield { val checkout = T.dest / displayVersion @@ -275,7 +281,10 @@ object `package` extends RootModule { os.proc("git", "checkout", millLastTag).call(cwd = checkout, stdout = os.Inherit) val outputFolder = checkout / "out" / "docs" / "source.dest" os.proc("./mill", "-i", "docs.source").call(cwd = checkout, stdout = os.Inherit) - expandDiagramsInDirectoryAdocFile(outputFolder, mill.main.VisualizeModule.classpath().map(_.path)) + expandDiagramsInDirectoryAdocFile( + outputFolder, + mill.main.VisualizeModule.classpath().map(_.path) + ) sanitizeAntoraYml(outputFolder, version, displayVersion, millLastTag) PathRef(outputFolder) @@ -381,53 +390,54 @@ object `package` extends RootModule { } } - def allLinksAndAnchors: T[IndexedSeq[(os.Path, Seq[(String, String)], Seq[(String, String)], Set[String])]] = Task { + def allLinksAndAnchors + : T[IndexedSeq[(os.Path, Seq[(String, String)], Seq[(String, String)], Set[String])]] = Task { val base = fastPages().path val validExtensions = Set("html", "scala") for (path <- os.walk(base) if validExtensions(path.ext)) - yield { - val parsed = Jsoup.parse(os.read(path)) - val (remoteLinks, localLinks) = parsed - .select("a") - .asScala - .map(e => (e.toString, e.attr("href"))) - .toSeq - .filter(!_._2.startsWith("mailto:")) - .partition{case (e, l) => l.startsWith("http://") || l.startsWith("https://")} - ( - path, - remoteLinks, - localLinks.map{case (e, l) => (e, l.stripPrefix("file:"))}, - parsed.select("*").asScala.map(_.attr("id")).filter(_.nonEmpty).toSet, - ) - } + yield { + val parsed = Jsoup.parse(os.read(path)) + val (remoteLinks, localLinks) = parsed + .select("a") + .asScala + .map(e => (e.toString, e.attr("href"))) + .toSeq + .filter(!_._2.startsWith("mailto:")) + .partition { case (e, l) => l.startsWith("http://") || l.startsWith("https://") } + ( + path, + remoteLinks, + localLinks.map { case (e, l) => (e, l.stripPrefix("file:")) }, + parsed.select("*").asScala.map(_.attr("id")).filter(_.nonEmpty).toSet + ) + } } - def brokenRemoteLinks: T[Map[os.Path, Seq[(String, String, Int)]]] = Task{ + def brokenRemoteLinks: T[Map[os.Path, Seq[(String, String, Int)]]] = Task { val allLinks = allLinksAndAnchors() .flatMap { case (path, remoteLinks, localLinks, ids) => remoteLinks } .map(_._2) - .filter{l => + .filter { l => // ignore example links since those are expected to be unresolved until // a stable version is published and artifacts are uploaded to github !l.contains("/example/") && - !l.contains("/releases/download/") && - // Ignore internal repo links in the changelog because there are a lot - // of them, and they're not very interesting to check and verify. - !l.contains("https://github.com/com-lihaoyi/mill/pull/") && - !l.contains("https://github.com/com-lihaoyi/mill/milestone/") && - !l.contains("https://github.com/com-lihaoyi/mill/compare/") && - // Link meant for API configuration, not for clicking - !l.contains("https://s01.oss.sonatype.org/service/local") && - // Somehow this server doesn't respond properly to HEAD requests even though GET works - !l.contains("https://marketplace.visualstudio.com/items") + !l.contains("/releases/download/") && + // Ignore internal repo links in the changelog because there are a lot + // of them, and they're not very interesting to check and verify. + !l.contains("https://github.com/com-lihaoyi/mill/pull/") && + !l.contains("https://github.com/com-lihaoyi/mill/milestone/") && + !l.contains("https://github.com/com-lihaoyi/mill/compare/") && + // Link meant for API configuration, not for clicking + !l.contains("https://s01.oss.sonatype.org/service/local") && + // Somehow this server doesn't respond properly to HEAD requests even though GET works + !l.contains("https://marketplace.visualstudio.com/items") } .toSet // Try to fetch all the links serially. It isn't worth trying to parallelize it // because if we go too fast the remote websites tend to rate limit us anyway val linksToStatusCodes = allLinks.toSeq.zipWithIndex - .map{ case (link, i) => + .map { case (link, i) => val key = s"$i/${allLinks.size}" println(s"Checking link $link $key") val start = System.currentTimeMillis() @@ -440,14 +450,14 @@ object `package` extends RootModule { .toMap allLinksAndAnchors() - .map{case (path, remoteLinks, localLinks, ids) => + .map { case (path, remoteLinks, localLinks, ids) => ( path, - remoteLinks.collect{ + remoteLinks.collect { case (e, l) - if allLinks.contains(l) - && !linksToStatusCodes(l).toString.startsWith("2") => - (e, l, linksToStatusCodes(l)) + if allLinks.contains(l) + && !linksToStatusCodes(l).toString.startsWith("2") => + (e, l, linksToStatusCodes(l)) } ) } @@ -455,10 +465,12 @@ object `package` extends RootModule { .toMap } - - def checkBrokenLinks() = Task.Command{ - if (brokenLocalLinks().nonEmpty){ - throw new Exception("Broken Local Links: " + upickle.default.write(brokenLocalLinks(), indent = 2)) + def checkBrokenLinks() = Task.Command { + if (brokenLocalLinks().nonEmpty) { + throw new Exception("Broken Local Links: " + upickle.default.write( + brokenLocalLinks(), + indent = 2 + )) } // This is flaky due to rate limits so ignore it for now @@ -467,10 +479,10 @@ object `package` extends RootModule { // } } - def brokenLocalLinks: T[Map[os.Path, Seq[(String, String)]]] = Task{ + def brokenLocalLinks: T[Map[os.Path, Seq[(String, String)]]] = Task { val allLinksAndAnchors0 = allLinksAndAnchors() val pathsToIds = allLinksAndAnchors0 - .map{case (path, remoteLinks, localLinks, ids) => (path, ids)} + .map { case (path, remoteLinks, localLinks, ids) => (path, ids) } .toMap val brokenLinksPerPath: Seq[(os.Path, Seq[(String, String)])] = @@ -479,10 +491,10 @@ object `package` extends RootModule { // Skip scaladoc files when scanning for broken links because some // of those are scaladoc bugs outside of our control. if !path.segments.contains("api") - } yield{ + } yield { ( path, - localLinks.flatMap{case (elementString, url) => + localLinks.flatMap { case (elementString, url) => val (baseUrl, anchorOpt) = url match { case s"#$anchor" => (path.toString, Some(anchor)) case s"$prefix#$anchor" => (prefix, Some(anchor)) @@ -492,17 +504,19 @@ object `package` extends RootModule { val dest0 = os.Path(baseUrl, path / "..") val possibleDests = Seq(dest0, dest0 / "index.html") - possibleDests.find(os.exists(_)) match{ + possibleDests.find(os.exists(_)) match { case None => Some((elementString, url)) case Some(dest) => - anchorOpt.collect{case a if !pathsToIds.getOrElse(dest, Set()).contains(a) => (elementString, url)} + anchorOpt.collect { + case a if !pathsToIds.getOrElse(dest, Set()).contains(a) => (elementString, url) + } } } ) } val nonEmptyBrokenLinksPerPath = brokenLinksPerPath - .filter{ case (path, items) => path.last != "404.html" && items.nonEmpty } + .filter { case (path, items) => path.last != "404.html" && items.nonEmpty } nonEmptyBrokenLinksPerPath.toMap } diff --git a/example/package.mill b/example/package.mill index dcbf2d0af15..d3adf67aded 100644 --- a/example/package.mill +++ b/example/package.mill @@ -19,8 +19,6 @@ import mill.define.Cross // plugins and dependencies import $meta._ -import $file.ci.shared -import $file.ci.upload object `package` extends RootModule with Module { def exampleModules: Seq[ExampleCrossModule] = millInternal @@ -29,32 +27,39 @@ object `package` extends RootModule with Module { object android extends Module { object javalib extends Cross[ExampleCrossModuleJava](build.listIn(millSourcePath / "javalib")) - object kotlinlib extends Cross[ExampleCrossModuleJava](build.listIn(millSourcePath / "kotlinlib")) + object kotlinlib + extends Cross[ExampleCrossModuleJava](build.listIn(millSourcePath / "kotlinlib")) } object javalib extends Module { object basic extends Cross[ExampleCrossModuleJava](build.listIn(millSourcePath / "basic")) object module extends Cross[ExampleCrossModuleJava](build.listIn(millSourcePath / "module")) - object dependencies extends Cross[ExampleCrossModuleJava](build.listIn(millSourcePath / "dependencies")) + object dependencies + extends Cross[ExampleCrossModuleJava](build.listIn(millSourcePath / "dependencies")) object testing extends Cross[ExampleCrossModuleJava](build.listIn(millSourcePath / "testing")) object linting extends Cross[ExampleCrossModuleJava](build.listIn(millSourcePath / "linting")) - object migrating extends Cross[ExampleCrossModuleJava](build.listIn(millSourcePath / "migrating")) - object publishing extends Cross[ExampleCrossModuleJava](build.listIn(millSourcePath / "publishing")) + object migrating + extends Cross[ExampleCrossModuleJava](build.listIn(millSourcePath / "migrating")) + object publishing + extends Cross[ExampleCrossModuleJava](build.listIn(millSourcePath / "publishing")) object web extends Cross[ExampleCrossModule](build.listIn(millSourcePath / "web")) } object kotlinlib extends Module { object basic extends Cross[ExampleCrossModuleKotlin](build.listIn(millSourcePath / "basic")) object module extends Cross[ExampleCrossModuleKotlin](build.listIn(millSourcePath / "module")) - object dependencies extends Cross[ExampleCrossModuleKotlin](build.listIn(millSourcePath / "dependencies")) + object dependencies + extends Cross[ExampleCrossModuleKotlin](build.listIn(millSourcePath / "dependencies")) object testing extends Cross[ExampleCrossModuleKotlin](build.listIn(millSourcePath / "testing")) object linting extends Cross[ExampleCrossModuleKotlin](build.listIn(millSourcePath / "linting")) - object publishing extends Cross[ExampleCrossModuleKotlin](build.listIn(millSourcePath / "publishing")) + object publishing + extends Cross[ExampleCrossModuleKotlin](build.listIn(millSourcePath / "publishing")) object web extends Cross[ExampleCrossModuleKotlin](build.listIn(millSourcePath / "web")) } object scalalib extends Module { object basic extends Cross[ExampleCrossModule](build.listIn(millSourcePath / "basic")) object module extends Cross[ExampleCrossModule](build.listIn(millSourcePath / "module")) - object dependencies extends Cross[ExampleCrossModule](build.listIn(millSourcePath / "dependencies")) + object dependencies + extends Cross[ExampleCrossModule](build.listIn(millSourcePath / "dependencies")) object testing extends Cross[ExampleCrossModule](build.listIn(millSourcePath / "testing")) object linting extends Cross[ExampleCrossModule](build.listIn(millSourcePath / "linting")) object publishing extends Cross[ExampleCrossModule](build.listIn(millSourcePath / "publishing")) @@ -65,30 +70,34 @@ object `package` extends RootModule with Module { object basic extends Cross[ExampleCrossModule](build.listIn(millSourcePath / "basic")) object testing extends Cross[ExampleCrossModule](build.listIn(millSourcePath / "testing")) object module extends Cross[ExampleCrossModule](build.listIn(millSourcePath / "module")) - object dependencies extends Cross[ExampleCrossModule](build.listIn(millSourcePath / "dependencies")) + object dependencies + extends Cross[ExampleCrossModule](build.listIn(millSourcePath / "dependencies")) } object pythonlib extends Module { object basic extends Cross[ExampleCrossModule](build.listIn(millSourcePath / "basic")) - object dependencies extends Cross[ExampleCrossModule](build.listIn(millSourcePath / "dependencies")) + object dependencies + extends Cross[ExampleCrossModule](build.listIn(millSourcePath / "dependencies")) object publishing extends Cross[ExampleCrossModule](build.listIn(millSourcePath / "publishing")) object module extends Cross[ExampleCrossModule](build.listIn(millSourcePath / "module")) object web extends Cross[ExampleCrossModule](build.listIn(millSourcePath / "web")) object testing extends Cross[ExampleCrossModule](build.listIn(millSourcePath / "testing")) } - object cli extends Module{ + object cli extends Module { object builtins extends Cross[ExampleCrossModule](build.listIn(millSourcePath / "builtins")) } object fundamentals extends Module { - object dependencies extends Cross[ExampleCrossModule](build.listIn(millSourcePath / "dependencies")) + object dependencies + extends Cross[ExampleCrossModule](build.listIn(millSourcePath / "dependencies")) object tasks extends Cross[ExampleCrossModule](build.listIn(millSourcePath / "tasks")) object modules extends Cross[ExampleCrossModule](build.listIn(millSourcePath / "modules")) object cross extends Cross[ExampleCrossModule](build.listIn(millSourcePath / "cross")) object `out-dir` extends Cross[ExampleCrossModule](build.listIn(millSourcePath / "out-dir")) object libraries extends Cross[ExampleCrossModule](build.listIn(millSourcePath / "libraries")) - object `library-deps` extends Cross[ExampleCrossModule](build.listIn(millSourcePath / "library-deps")) + object `library-deps` + extends Cross[ExampleCrossModule](build.listIn(millSourcePath / "library-deps")) } object depth extends Module { @@ -115,8 +124,11 @@ object `package` extends RootModule with Module { override def lineTransform(line: String) = this.millModuleSegments.parts.last match { case "1-test-suite" => line - .replace("mill bar.test bar.BarTests.hello", "kotest_filter_tests='hello' kotest_filter_specs='bar.BarTests' ./mill bar.test") - .replace("compiling 1 ... source...", "Compiling 1 ... source...") + .replace( + "mill bar.test bar.BarTests.hello", + "kotest_filter_tests='hello' kotest_filter_specs='bar.BarTests' ./mill bar.test" + ) + .replace("compiling 1 ... source...", "Compiling 1 ... source...") case _ => line } } @@ -137,7 +149,7 @@ object `package` extends RootModule with Module { def testRepoRoot = Task { os.copy(super.testRepoRoot().path, T.dest, mergeFolders = true) - for(suffix <- Seq("build.sc", "build.mill", "build.mill.scala")){ + for (suffix <- Seq("build.sc", "build.mill", "build.mill.scala")) { for (lines <- buildScLines() if os.exists(T.dest / suffix)) { os.write.over(T.dest / suffix, lines.mkString("\n")) } @@ -146,51 +158,51 @@ object `package` extends RootModule with Module { } def resources = upstreamOpt match { - case None => T{ Seq(super.testRepoRoot()) } - case Some(upstream) => T{ - os.copy.over(super.testRepoRoot().path, T.dest) - val upstreamRoot = upstream.testRepoRoot().path - val suffix = Seq("build.sc", "build.mill").find(s => os.exists(upstreamRoot / s)).head - for(lines <- buildScLines()) { - os.write.over(T.dest / suffix, lines.mkString("\n")) + case None => T { Seq(super.testRepoRoot()) } + case Some(upstream) => T { + os.copy.over(super.testRepoRoot().path, T.dest) + val upstreamRoot = upstream.testRepoRoot().path + val suffix = Seq("build.sc", "build.mill").find(s => os.exists(upstreamRoot / s)).head + for (lines <- buildScLines()) { + os.write.over(T.dest / suffix, lines.mkString("\n")) + } + Seq(PathRef(T.dest)) } - Seq(PathRef(T.dest)) - } } def buildScLines = upstreamOpt match { case None => T { None } case Some(upstream) => T { - Some { - val upstreamRoot = upstream.testRepoRoot().path - val suffix = Seq("build.sc", "build.mill").find(s => os.exists(upstreamRoot / s)).head - val upstreamLines = os.read.lines(upstream.testRepoRoot().path / suffix) - val lines = os.read.lines(super.testRepoRoot().path / suffix) - - import collection.mutable - val groupedLines = mutable.Map.empty[String, mutable.Buffer[String]] - var current = Option.empty[String] - lines.foreach { - case s"//// SNIPPET:$name" => - current = Some(name) - groupedLines(name) = mutable.Buffer() - case s => current.foreach(groupedLines(_).append(lineTransform(s))) - } + Some { + val upstreamRoot = upstream.testRepoRoot().path + val suffix = Seq("build.sc", "build.mill").find(s => os.exists(upstreamRoot / s)).head + val upstreamLines = os.read.lines(upstream.testRepoRoot().path / suffix) + val lines = os.read.lines(super.testRepoRoot().path / suffix) - current = None - upstreamLines.flatMap { - case s"//// SNIPPET:$name" => - if (name != "END") { + import collection.mutable + val groupedLines = mutable.Map.empty[String, mutable.Buffer[String]] + var current = Option.empty[String] + lines.foreach { + case s"//// SNIPPET:$name" => current = Some(name) - groupedLines(name) - } else { - current = None - Nil - } + groupedLines(name) = mutable.Buffer() + case s => current.foreach(groupedLines(_).append(lineTransform(s))) + } + + current = None + upstreamLines.flatMap { + case s"//// SNIPPET:$name" => + if (name != "END") { + current = Some(name) + groupedLines(name) + } else { + current = None + Nil + } - case s => if (current.nonEmpty) None else Some(lineTransform(s)) + case s => if (current.nonEmpty) None else Some(lineTransform(s)) + } } } - } } def lineTransform(line: String) = line @@ -201,7 +213,7 @@ object `package` extends RootModule with Module { def testRepoRoot: T[PathRef] = Task.Source(millSourcePath) def sources0 = Task.Sources(millSourcePath) - def sources = Task{ + def sources = Task { sources0() .flatMap(pathRef => os.walk(pathRef.path)) .filter(os.isFile) @@ -290,8 +302,13 @@ object `package` extends RootModule with Module { val (repoPath, repoHash) = repoInfo(crossValue) def repoSlug = repoPath.split("/").last - def downloadedRepo = Task{ - shared.downloadTestRepo(repoPath, repoHash, T.dest) + def downloadTestRepo(label: String, commit: String, dest: os.Path) = { + os.unzip.stream(requests.get.stream(s"https://github.com/$label/archive/$commit.zip"), dest) + dest + } + + def downloadedRepo = Task { + downloadTestRepo(repoPath, repoHash, T.dest) val wrapperFolder = T.dest / s"$repoSlug-$repoHash" PathRef(wrapperFolder) } diff --git a/integration/package.mill b/integration/package.mill index 809ff066cb9..dba76e4f4ad 100644 --- a/integration/package.mill +++ b/integration/package.mill @@ -19,8 +19,6 @@ import mill.define.Cross // plugins and dependencies import $meta._ -import $file.ci.shared -import $file.ci.upload object `package` extends RootModule { // We compile the test code once and then offer multiple modes to @@ -51,7 +49,6 @@ object `package` extends RootModule { "MILL_INTEGRATION_LAUNCHER" -> millIntegrationLauncher().path.toString ) - def millIntegrationLauncher: T[PathRef] def forkArgs = Task { super.forkArgs() ++ build.dist.forkArgs() } @@ -77,10 +74,10 @@ object `package` extends RootModule { } trait IntegrationLauncherModule extends Module { def millIntegrationLauncher: T[PathRef] - object fork extends ModeModule{ + object fork extends ModeModule { def millIntegrationLauncher = IntegrationLauncherModule.this.millIntegrationLauncher } - object server extends ModeModule{ + object server extends ModeModule { def millIntegrationLauncher = IntegrationLauncherModule.this.millIntegrationLauncher } } diff --git a/javascriptlib/package.mill b/javascriptlib/package.mill index 41d40772b00..57d9413238b 100644 --- a/javascriptlib/package.mill +++ b/javascriptlib/package.mill @@ -7,4 +7,4 @@ import mill._ // because currently there is no previous artifact version object `package` extends RootModule with build.MillPublishScalaModule { def moduleDeps = Seq(build.main) -} \ No newline at end of file +} diff --git a/kotlinlib/package.mill b/kotlinlib/package.mill index 50df85efc6f..5ab4ecb899b 100644 --- a/kotlinlib/package.mill +++ b/kotlinlib/package.mill @@ -22,10 +22,22 @@ object `package` extends RootModule with build.MillPublishScalaModule with Build BuildInfo.Value("koverVersion", build.Deps.RuntimeDeps.koverVersion, "Version of Kover."), BuildInfo.Value("ktfmtVersion", build.Deps.RuntimeDeps.ktfmt.version, "Version of Ktfmt."), BuildInfo.Value("ktlintVersion", build.Deps.RuntimeDeps.ktlint.version, "Version of ktlint."), - BuildInfo.Value("detektVersion", build.Deps.RuntimeDeps.detektCli.version, "Version of Detekt."), + BuildInfo.Value( + "detektVersion", + build.Deps.RuntimeDeps.detektCli.version, + "Version of Detekt." + ), BuildInfo.Value("dokkaVersion", build.Deps.RuntimeDeps.dokkaVersion, "Version of Dokka."), - BuildInfo.Value("kotlinxHtmlJvmDep", Dep.unparse(build.Deps.RuntimeDeps.kotlinxHtmlJvm).get, "kotlinx-html-jvm dependency (used for Dokka)"), - BuildInfo.Value("freemarkerDep", Dep.unparse(build.Deps.RuntimeDeps.freemarker).get, "freemarker dependency (used for Dokka)") + BuildInfo.Value( + "kotlinxHtmlJvmDep", + Dep.unparse(build.Deps.RuntimeDeps.kotlinxHtmlJvm).get, + "kotlinx-html-jvm dependency (used for Dokka)" + ), + BuildInfo.Value( + "freemarkerDep", + Dep.unparse(build.Deps.RuntimeDeps.freemarker).get, + "freemarker dependency (used for Dokka)" + ) ) trait MillKotlinModule extends build.MillPublishScalaModule { diff --git a/main/init/package.mill b/main/init/package.mill index b23012dd01a..247672bc237 100644 --- a/main/init/package.mill +++ b/main/init/package.mill @@ -26,13 +26,16 @@ object `package` extends RootModule with build.MillPublishScalaModule { case None => "0.0.0" } - val data: Seq[(os.SubPath, String)] = build.dist.examplePathsWithArtifactName().map { case (path, str) => - val downloadUrl = build.Settings.projectUrl + "/releases/download/" + lastTag + "/" + str + ".zip" - val subPath = path.subRelativeTo(T.workspace / "example") - (subPath, downloadUrl) - } + val data: Seq[(os.SubPath, String)] = + build.dist.examplePathsWithArtifactName().map { case (path, str) => + val downloadUrl = + build.Settings.projectUrl + "/releases/download/" + lastTag + "/" + str + ".zip" + val subPath = path.subRelativeTo(T.workspace / "example") + (subPath, downloadUrl) + } - val libsSortOrder = List("scalalib", "javalib", "kotlinlib", "extending", "external", "thirdparty", "depth") + val libsSortOrder = + List("scalalib", "javalib", "kotlinlib", "extending", "external", "thirdparty", "depth") val categoriesSortOrder = List("basic", "builds", "web") def sortCriterium(strOpt: Option[String], sortOrderList: List[String]): Int = @@ -49,14 +52,16 @@ object `package` extends RootModule with build.MillPublishScalaModule { val libSortCriterium = sortCriterium(libOpt, libsSortOrder) val categorySortCriterium = sortCriterium(categoryOpt, categoriesSortOrder) - val nameSortCriterium = nameOpt.flatMap(_.takeWhile(_.isDigit).toIntOption).getOrElse(Int.MinValue) + val nameSortCriterium = + nameOpt.flatMap(_.takeWhile(_.isDigit).toIntOption).getOrElse(Int.MinValue) (libSortCriterium, libOpt, categorySortCriterium, categoryOpt, nameSortCriterium, nameOpt) } val stream = os.write.outputStream(T.dest / "exampleList.txt") val writer = new java.io.OutputStreamWriter(stream) try { - val json = upickle.default.writeTo(sortedData.map { case (p, s) => (p.toString(), s) }, writer) + val json = + upickle.default.writeTo(sortedData.map { case (p, s) => (p.toString(), s) }, writer) PathRef(T.dest) } catch { case ex: Throwable => T.log.error(ex.toString); throw ex diff --git a/main/package.mill b/main/package.mill index 3dbbc2ee72b..e650886d7b5 100644 --- a/main/package.mill +++ b/main/package.mill @@ -21,7 +21,8 @@ object `package` extends RootModule with build.MillStableScalaModule with BuildI ) def compileIvyDeps = T { - if (ZincWorkerUtil.isScala3(scalaVersion())) Agg.empty else Agg(build.Deps.scalaReflect(scalaVersion())) + if (ZincWorkerUtil.isScala3(scalaVersion())) Agg.empty + else Agg(build.Deps.scalaReflect(scalaVersion())) } def buildInfoPackageName = "mill.main" @@ -61,8 +62,8 @@ object `package` extends RootModule with build.MillStableScalaModule with BuildI Some(T.ctx()), build.dist.coursierCacheCustomizer() )._2.minDependencies.toSeq - // change to this when bumping Mill - // ).getOrThrow.minDependencies.toSeq + // change to this when bumping Mill + // ).getOrThrow.minDependencies.toSeq .map(d => s"${d.module.organization.value}:${d.module.name.value}:${d.version}") ) // T.traverse(dev.moduleDeps)(_.publishSelfDependency)() diff --git a/pythonlib/package.mill b/pythonlib/package.mill index 8e9f58da976..435806645af 100644 --- a/pythonlib/package.mill +++ b/pythonlib/package.mill @@ -9,5 +9,6 @@ object `package` extends RootModule with build.MillPublishScalaModule { // we depend on scalalib for re-using some common infrastructure (e.g. License // management of projects), NOT for reusing build logic def moduleDeps = Seq(build.main, build.scalalib) - def testTransitiveDeps = super.testTransitiveDeps() ++ Seq(build.scalalib.backgroundwrapper.testDep()) + def testTransitiveDeps = + super.testTransitiveDeps() ++ Seq(build.scalalib.backgroundwrapper.testDep()) } diff --git a/readme.adoc b/readme.adoc index e87d00ad3fc..11d25a9f69a 100644 --- a/readme.adoc +++ b/readme.adoc @@ -46,2798 +46,7 @@ object bar extends ScalaModule { } ---- -If you use Mill and like it, you will probably enjoy the following book by the Author: +* developer.adoc[Developer Documentation] +* changelog.adoc[Changelog] -* https://www.handsonscala.com/[_Hands-on Scala Programming_] - -== Developer Documentation - -The remainder of this readme is developer-documentation targeted at people who wish to work -on Mill's own codebase. The developer docs assume you have read through the user-facing -documentation linked above. It's also worth spending a few minutes reading the following -blog posts to get a sense of Mill's design & motivation: - -* http://www.lihaoyi.com/post/SowhatswrongwithSBT.html["So, what's wrong with SBT?"] -* http://www.lihaoyi.com/post/BuildToolsasPureFunctionalPrograms.html[Build Tools as Pure Functional Programs] -* http://www.lihaoyi.com/post/MillBetterScalaBuilds.html[Mill: Better Scala Builds] - -Mill is profiled using the -https://www.ej-technologies.com/products/jprofiler/overview.html[JProfiler Java Profiler], by courtesy of EJ Technologies. - -Mill is built using Mill. -To begin, you just need a JVM installed, and the -`./mill` script will be sufficient to bootstrap the project. - -== IntelliJ Setup - -If you are using IntelliJ IDEA to edit Mill's Scala code, IntelliJ's built in BSP support should -be sufficient to load the Mill project, but you need to set up the file association from -`*.mill` as Scala source files manually in the following settings: - -* `Settings` / `Editor` / `File Types` / `Scala`, add the pattern `*.mill` - -== Manual & Automated Testing - -The following table contains the main ways you can test the code in -`com-lihaoyi/mill`, via manual testing or automated tests: - -|=== -| Config | Automated Testing | Manual Testing | Manual Testing CI -| In-Process Tests | `main.__.test`, `scalalib.test`, `contrib.buildinfo.test`, etc. | | -| Sub-Process w/o packaging/publishing| `example.\\__.local.server`, `integration.__.local.server` | `dist.run` | `test-mill-dev.sh` -| Sub-Process w/ packaging/publishing | `example.\\__.packaged.server`, `integration.__.packaged.server` | `dist.assembly` | `test-mill-release.sh` -| Bootstrapping: Building Mill with your current checkout of Mill | | `dist.installLocal` | `test-mill-bootstrap.sh` -|=== - -In general, `println` or `pprint.log` should work in most places and be sufficient for -instrumenting and debugging the Mill codebase. In the occasional spot where `println` -doesn't work you can use `mill.main.client.DebugLog.println` which writes to a file -`~/mill-debug-log.txt` in your home folder. `DebugLog` is useful for scenarios like -debugging Mill's terminal UI (where `println` would mess things up) or subprocesses -(where stdout/stderr may get captured or used and cannot be used to display your own -debug statements). - -=== In-Process Tests - -In-process tests live in the `.test` sub-modules of the various Mill modules. -These range from tiny unit tests, to larger integration tests that instantiate a -`mill.testkit.BaseModule` in-process and a `UnitTester` to evaluate tasks on it. - -Most "core" tests live in `main.__test`; these should run almost instantly, and cover -most of Mill's functionality that is not specific to Scala/Scala.js/etc.. -Tests specific to Scala/Scala.js/Scala-Native live in -`scalalib.test`/`scalajslib.test`/`scalanativelib.test` respectively, and take a lot longer -to run because running them involves actually compiling Scala code. - -The various `contrib` modules also have tests in this style, e.g. -`contrib.buildinfo.test` - -Note that the in-memory tests compile the `BaseModule` together with the test suite, -and do not exercise the Mill script-file bootstrapping, transformation, and compilation process. - -=== Sub-Process Tests *without* Packaging/Publishing - -`example.\\__.local.server` and `integration.__.local.server` tests run Mill end-to-end in a subprocess, -but *without* the expensive/slow steps of packaging the core packages into an assembly jar -and publishing the remaining packages to -`~/.ivy2/local`. -You can reproduce these tests manually using -`./mill dist.run `. - -`example` tests are written in a single `build.mill` file, with the test commands written -in a comment with a bash-like syntax together with the build code and comments that explain -the example. -These serve three purposes: - -1. Basic smoke-tests to make sure the functionality works at all, without covering every - edge case - -2. User-facing documentation, with the test cases, test commands, and explanatory comments - included in the Mill documentation site - -3. Example repositories, that Mill users can download to bootstrap their own projects - -The `integration` tests are similar to `example` tests and share most of their test -infrastructure, but with differences: - -1. `integration` tests are meant to test features more thoroughly then -`example` tests, covering more and deeper edge cases even at the expense of readability - -2. `integration` tests are written using a Scala test suite extending -`IntegrationTestSuite`, giving more flexibility at the expense of readability - -You can reproduce any of the tests manually using `dist.run`, e.g. - -**Automated Test** - -[source,bash] ----- -./mill "example.javalib.basic[1-simple].local.server" ----- - -**Manual Test** - -[source,bash] ----- -./mill dist.run example/javalib/basic/1-simple foo.run --text hello ----- - -**Manual Test using Launcher Script** - -[source,bash] ----- -./mill dist.launcher && (cd example/javalib/basic/1-simple && ../../../../out/dist/launcher.dest/run foo.run --text hello) ----- - -=== Sub-Process Tests *with* Packaging/Publishing - -`example.\\__.server`, `integration.__.server`, `example.\\__.fork` and -`integration.__.fork` cover the same test cases as the `.local.server` tests described above, but -they perform packaging of the Mill core modules into an assembly jar, and publish the -remaining modules to `~/.ivy2/local`. -This results in a more realistic test environment, but at the cost of taking tens-of-seconds -more to run a test after making a code change. - -You can reproduce these tests manually using `dist.installLocal`: - -[source,bash] ----- -./mill dist.installLocal && (cd example/basic/1-simple && ../../../mill-assembly.jar run --text hello) ----- - -You can also use `dist.native.installLocal` for a Graal Native Image executable, -which is slower to create but faster to start than the default executable assembly. - -There are two six of these tests, `.{local,assembly,native}.{server,fork}`. - -The first label specifies how the Mill code is packaged before testing - -1. `.local` runs using all compiled Mill code directly in the `out/` folder. This is the fastest - and should be used for most testing - -2. `.assembly` runs using the compiled Mill code either packaged into an assembly (for the Mill executable). - This is slower than `.local`, and normally isn't necessary unless you are debugging issues in the Mill - packaging logic. - -3. `.native` runs using the compiled Mill code packaged into an assembly with a Graal native binary launcher. - This is the slowest mode is only really necessary for debugging Mill's Graal native binary configuration. - -The second label specifies how the Mill process is managed during the test: - - -1. `.server` test run the test cases with the default configuration, so consecutive commands - run in the same long-lived background server process - -2. `.fork` test run the test cases with `--no-server`, meaning each command runs in a newly - spawned Mill process - -In general you should spend most of your time working with the `.local.server` version of the -`example` and `integration` tests to save time, and only run the others if you have a specific -thing you want to test that needs those code paths to run. - -=== Bootstrapping: Building Mill with your current checkout of Mill - -To test bootstrapping of Mill's own Mill build using a version of Mill built from your checkout, you can run - -[source,bash] ----- -./mill dist.installLocal -ci/patch-mill-bootstrap.sh ----- - -This creates a standalone assembly at `target/mill-release` you can use, which references jars -published locally in your `~/.ivy2/local` cache, and applies any necessary patches to -`build.mill` to deal with changes in Mill between the version specified in `.config/mill-version` -that is normally used to build Mill and the `HEAD` version your assembly was created from. -You can then use this standalone assembly to build & re-build your current Mill checkout without -worrying about stomping over compiled code that the assembly is using. - -You can also use `./mill dist.installLocalCache` to provide a "stable" version of Mill that -can be used locally in bootstrap scripts. - -This assembly is design to work on bash, bash-like shells and Windows Cmd. -If you have another default shell like zsh or fish, you probably need to invoke it with -`sh ~/mill-release` or prepend the file with a proper shebang. - -If you want to install into a different location or a different Ivy repository, you can set its optional parameters. - -.Install into `/tmp` -[source,bash] ----- -$ ./mill dist.installLocal --binFile /tmp/mill --ivyRepo /tmp/millRepo -... -Published 44 modules and installed /tmp/mill ----- -=== Testing Documentation Changes - -For testing documentation changes locally, you can generate documentation for the current checkout via - -[source,bash] ----- -$ ./mill docs.fastPages ----- - -To generate documentation for both the current checkout and earlier versions, you can use - - -[source,bash] ----- -$ ./mill docs.localPages ----- - -=== Troubleshooting - -In case of troubles with caching and/or incremental compilation, you can always restart from scratch removing the `out` directory: - -[source,bash] ----- -rm -rf out/ ----- - -=== Autofix and Autoformatting - -To run all autofixes and autoformatters: - -```bash -./mill __.fix + mill.javalib.palantirformat.PalantirFormatModule/ + mill.scalalib.scalafmt.ScalafmtModule/ + mill.kotlinlib.ktlint.KtlintModule/ -``` - -== Continuous Integration & Testing - -* Mill's pull-request validation runs with - https://mill-build.org/mill/large/selective-execution.html[Selective Test Execution] - enabled; this automatically selects the tests to run based on the code or build configuration - that changed in that PR. To disable this, you can label your PR with `run-all-tests`, which - will run all tests on a PR regardless of what code was changed - -* Mill tests draft PRs _on contributor forks_ of the repository, so please make sure Github - Actions are enabled on your fork. Once you are happy with your draft, mark it `ready_for_review` - and it will run CI on Mill's repository before merging - -* If you need to debug things in CI, you can comment/uncomment the two sections of - `.github/workflows/run-tests.yml` in order to skip the main CI jobs and only run the command(s) - you need, on the OS you want to test on. This can greatly speed up the debugging process - compared to running the full suite every time you make a change. - -== Project Layout - -The Mill project is organized roughly as follows: - -=== Core modules that are included in the main assembly - -* `runner`, `main.*`, `scalalib`, `scalajslib`, `scalanativelib`. - -These are general lightweight and dependency-free: mostly configuration & wiring of a Mill -build and without the heavy lifting. - -Heavy lifting is delegated to the worker modules (described below), which the core modules -resolve from Maven Central (or from the local filesystem in dev) and load into isolated -classloaders. - -=== Worker modules that are resolved from Maven Central - -* `scalalib.worker`, `scalajslib.worker[0.6]`, `scalajslib.worker[1.0]` - -These modules are where the heavy-lifting happens, and include heavy dependencies like the -Scala compiler, Scala.js optimizer, etc.. Rather than being bundled in the main assembly & -classpath, these are resolved separately from Maven Central (or from the local filesystem -in dev) and kept in isolated classloaders. - -This allows a single Mill build to use multiple versions of e.g. the Scala.js optimizer -without classpath conflicts. - -=== Contrib modules - -* `contrib/bloop/`, `contrib/flyway/`, `contrib/scoverage/`, etc. - -These are modules that help integrate Mill with the wide variety of different tools and -utilities available in the JVM ecosystem. - -These modules are not as stringently reviewed as the main Mill core/worker codebase, and -are primarily maintained by their individual contributors. -These are maintained as part of the primary Mill Github repo for easy testing/updating as -the core Mill APIs evolve, ensuring that they are always tested and passing against the -corresponding version of Mill. - -== Compatibility & Stability - -Mill maintains backward binary compatibility for each major version (`major.minor.point`), -enforced with Mima, for the following packages: - -- `mill.api` -- `mill.util` -- `mill.define` -- `mill.eval` -- `mill.resolve` -- `mill.scalalib` -- `mill.scalajslib` -- `mill.scalanativelib` - -Other packages like `mill.runner`, `mill.bsp`, etc. are on the classpath but offer no -compatibility guarantees. - -Currently, Mill does not offer compatibility guarantees for `mill.contrib` -packages, although they tend to evolve slowly. -This may change over time as these packages mature over time. - -== Project Maintenance - -=== Pull Requests - -* Changes to the main branch need a pull request. -Exceptions are preparation commits for releases, which are meant to be pushed with tags in one go -* Merged pull request (and closed issues) need to be assigned to a Milestone -* Pull requests are typically merged via "Squash and merge", so we get a linear and useful history -* Larger pull request, where it makes sense to keep single commits, or with multiple authors may be committed via merge commits. - -=== Commit Messages - -* The title should be meaningful and may contain the pull request number in parentheses (typically automatically generated on GitHub) -* The description should contain additional required details, which typically reflect the content of the first PR comment -* A full link to the pull request should be added via a line: `Pull request: ` -* If the PR has multiple authors but is merged as merge commit, those authors should be included via a line for each co-author: `Co-authored-by: ` -* If the message contains links to other issues or pull requests, you should use full URLs to reference them - -// tag::changelog[] -== Changelog -ifndef::link-github[] -:link-github: https://github.com/com-lihaoyi/mill -endif::[] -:link-compare: {link-github}/compare -:link-pr: {link-github}/pull -:link-issue: {link-github}/issues -:link-milestone: {link-github}/milestone -// find-replace-regex: https://github.com/com-lihaoyi/mill/pull/(\d*) -> {link-pr}/$1[#$1] - - -[#0-12-5] -=== 0.12.5 - 2025-01-01 -:version: 0.12.5 -:milestone-name: 0.12.5 -:milestone: 108 -:prev-version: 0.12.4 - -* Optimize Mill startup overhead by not blocking on stdin {link-pr}/4159[#4159] - -* Fix system console detection on JDK >=22 {link-pr}/4178[#4178] - -* Fix thread leak when spawning JVM subprocesses, which caused instability and unresponsiveness - in long-lived Mill processes {link-pr}/4185[#4185] - -* Fix crash in `mill -i` on Windows ARM64 {link-pr}/4196[#4196] - -* Fix log rendering in terminals where `\t` does not clear existing text {link-pr}/4173[#4173] - -* Fix generation of unnecessary `rt.jar` files in home folder {link-pr}/4206[#4206] - -* Addition of several experimental language toolchains, to support using Mill to build - projects in other languages - -** https://mill-build.org/mill/main-branch/pythonlib/intro.html[Experimental Python Support] - -** https://mill-build.org/mill/main-branch/javascriptlib/intro.html[Experimental Javascript/Typescript Support] - -* Lots of doc improvements: - -** Overhaul of https://mill-build.org/mill/depth/execution-model.html[The Mill Execution Model] - {link-pr}/4156[#4156] - -** Fix missing text in Java Module Configuration docs {link-pr}/4172[#4172] - -* New posts to the https://mill-build.org/blog/index.html[Mill Engineering Blog]: - https://mill-build.org/blog/1-java-compile.html[How Fast does Java Compile?], - https://mill-build.org/blog/2-monorepo-build-tool.html[Why Use a Monorepo Build Tool?], - https://mill-build.org/blog/3-selective-testing.html[Faster CI with Selective Testing], - and https://mill-build.org/blog/4-flaky-tests.html[How to Manage Flaky Tests], - -[#0-12-4] -=== 0.12.4 - 2024-12-16 -:version: 0.12.4 -:milestone-name: 0.12.4 -:milestone: 107 -:prev-version: 0.12.3 - -* Mill now supports https://mill-build.org/mill/large/selective-execution.html[Selective Execution], - allowing you to run tests and other tasks only if they are downstream of a code change. - This can be used to greatly speed up pull-request validation and other CI workflows - by skipping unrelated tests that cannot possibly be broken by the code change in question - -* Mill now generates https://mill-build.org/mill/fundamentals/out-dir.html#_mill_dependency_tree_json[dependency-tree.json] - and https://mill-build.org/mill/main-branch/fundamentals/out-dir.html#_mill_invalidation_tree_json[invalidation-tree.json] - metadata for every run, which should help make it easier for a user to figure out why a task - is being selected and run. - -* Support for Bill-Of-Materials/Dependency-Management when downloading third-party JVM dependencies - (https://mill-build.org/mill/main-branch/javalib/dependencies.html#_dependency_management[Documentation]) - -* Built-in support for `mill.bat` launcher to run Mill natively on a Windows environment - https://github.com/com-lihaoyi/mill/pull/4052[#4052] - -* Added documentation for https://mill-build.org/mill/migrating/migrating.html[Migrating to Mill], - to try and help people who may be trying to move their existing codebase onto Mill from other build tools - -* Significant speedups for task resolution logic https://github.com/com-lihaoyi/mill/pull/4132[#4132], - which should speed up cached-build workflows in particular - -* Improve precision of code signature task invalidation, reducing the amount of spurious - task invalidations in the presence of multi-file builds https://github.com/com-lihaoyi/mill/pull/4113[#4113] - https://github.com/com-lihaoyi/mill/pull/4116[#4116] - -* Reduced overhead of terminal prompt UI https://github.com/com-lihaoyi/mill/pull/4095[#4095] - https://github.com/com-lihaoyi/mill/pull/4110[#4110] - -* Launch of the https://mill-build.org/blog[Mill Build Engineering Blog], where we will post articles - discussing topics around JVM build tooling - -[#0-12-3] -=== 0.12.3 - 2024-11-24 -:version: 0.12.3 -:milestone-name: 0.12.3 -:milestone: 106 -:prev-version: 0.12.2 - -* Set context classloader during Mill evaluation {link-pr}/3940[#3940] -* Extended `mill init` to support importing an existing Maven project {link-pr}/3756[#3756] -* Avoid running subsequent meta-level builds after reaching the desired meta-level in MillBuildBootstrap {link-pr}/3960[#3960] -* Improvements to `KtlintModule` {link-pr}/3961[#3961] {link-pr}/3966[#3966] -* Fixes for `runBackground` mutex and log management {link-pr}/3971[#3971] -* Added support for Revapi {link-pr}/3974[#3974] -* Fix redundant logging in junit5 test runner {link-pr}/3983[#3983] -* align SonatypeCentralPublishModule with SonatypePublisher {link-pr}/3987[#3987] -* Make JVM version configurable per-module {link-pr}/3716[#3716] -* Overhaul worker concurrency helpers with `mill.api.CacheFactory` {link-pr}/4001[#4001] -* Optimize startup time using TCP sockets instead of junixsocket and `tput` instead of jline {link-pr}/4009[#4009] -* Improvements to TUI build prompt https://github.com/com-lihaoyi/mill/pull/3933[#3933] https://github.com/com-lihaoyi/mill/pull/4014[#4014] -* Lots of improvements to documentation, including a new https://github.com/com-lihaoyi/mill/pull/3965[Kotlin Spring-Boot Example #3965], - a new page https://github.com/com-lihaoyi/mill/pull/3990[How Fast Does Java Compile? #3990], and - https://github.com/com-lihaoyi/mill/pull/3938[Stable Links To Older Doc-site Versions #3938] - - - - -[#0-12-2] -=== 0.12.2 - 2024-11-11 -:version: 0.12.2 -:milestone-name: 0.12.2 -:milestone: 105 -:prev-version: 0.12.1 - -_Changes since {prev-version}:_ - -* Show correct build file name in progress prompt {link-pr}/3847[#3847] -* Fix target name when reporting cycles in `runModuleDeps` {link-pr}/3860[#3860] -* Properly escape imported submodule names when the name is a Scala identifier {link-pr}/3865[#3865] -* Report an error when module dependency cycles are detected {link-pr}/3878[#3878] -* Drop incremental compilation state for Mill modules when version changes to try and mitigate cache invalidation issues {link-pr}/3884[#3884] -* Share profile loggers between nested evaluations to avoid ensure commands like `show` now have a proper profile {link-pr}/3885[#3885] -* Add `nativeMultithreading` flag in ScalaNativeModule {link-pr}/3896[#3896] -* Add nice error when non-exclusive task depends on exclusive task {link-pr}/3887[#3887] -* Filter out anonymous classes during test discovery to mitigate spurious test reports {link-pr}/3911[#3911] -* Fix `MavenTests` deprecation message {link-pr}/3915[#3915] -* Improve `inspect` command to show more detailed metadata on modules and tasks {link-pr}/3916[#3916] -* Fix prompt updating logic to ensure the timestamp updates while tasks are running {link-pr}/3933[#3933] -* Fix scoverage report generation for Scala 3 {link-pr}/3936[#3936] -* Tons of documentation improvements: autoformatted all https://github.com/com-lihaoyi/mill/pull/3919[Java] - and https://github.com/com-lihaoyi/mill/pull/3903[Scala] example files, - [Scala-Native example builds]https://github.com/com-lihaoyi/mill/pull/3657, - https://github.com/com-lihaoyi/mill/pull/3897[Scala-JS WASM example build], - https://github.com/com-lihaoyi/mill/pull/3918[Re-run Maven comparison using proper flags] - added https://mill-build.org/mill/comparisons/why-mill.html[Why Use Mill?] and - https://mill-build.org/mill/comparisons/unique.html[What Makes Mill Unique?] Sections - -_For details refer to -{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] -and the {link-compare}/{prev-version}\...{version}[list of commits]._ - - -[#0-12-1] -=== 0.12.1 - 2024-10-27 -:version: 0.12.1 -:milestone-name: 0.12.1 -:milestone: 104 -:prev-version: 0.12.0 - -_Changes since {prev-version}:_ - -* Fix updating of prompt to match terminal width in client-server mode {link-pr}/3833[#3833] -* Allow `.mill-jvm-opts` to interpolate environment variables, add `.mill-opts` {link-pr}/3841[#3841] - -_For details refer to -{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] -and the {link-compare}/{prev-version}\...{version}[list of commits]._ - - -[#0-12-0] -=== 0.12.0 - 2024-10-23 - -The Mill 0.12.0 release focuses on improving the scalability of Mill builds: in terms -of performance, code organization, adherence to best practices, and community. - -Major changes: - -1. Mill now runs tasks parallel by default, rather than opt-in. This includes a - new parallel-friendly terminal UI, https://mill-build.org/mill/Mill_Sandboxing.html[task - and test sandboxing] to guard against race conditions, - xref:javalib/testing.adoc#_test_grouping[parallelization of test suites], - and other measures optimizing for parallel builds - -2. Mill now uses `build.mill` rather than `build.sc` as the primary file extension, to avoid - confusion with Scala-CLI or Ammonite scripts, and the `T`/`T.worker`/`T.input` syntax - has been deprecated in favor of `Task`/`Task.Worker`/`T.Input` for a more idiomatic style - -3. Mill now supports for https://mill-build.org/mill/Structuring_Large_Builds.html[Modularizing Large Builds] - into multiple `package.mill` files, to help support large codebases and incremental compilation - of the build files. - -4. Mill now provides official support for https://mill-build.org/mill/Writing_Mill_Plugins.html[Writing Mill Plugins], - with tested workflows and an official testkit to help you write and publish your own Mill - plugins for others to use - -5. Mill now supports other JVM langauges: https://mill-build.org/mill/javalib/intro.html[Java], - experimental support for https://mill-build.org/mill/kotlinlib/intro.html[Kotlin/KotlinJs], - and https://mill-build.org/mill/android/kotlin.html[even-more-experimental support for Android]. - This includes IDE integrations, tooling integrations (docs, autoformatters, linters, testing - frameworks, etc.) - -6. The Mill doc-site at https://mill-build.org/ has undergone a massive overhaul. - New comparisons with other build tools of (https://mill-build.org/mill/comparisons/maven.html[Maven], - https://mill-build.org/mill/comparisons/gradle.html[Gradle], - https://mill-build.org/mill/comparisons/sbt.html[SBT]), documentation for - https://mill-build.org/mill/extending/new-language.html[adding new language toolchains] - and https://mill-build.org/mill/extending/running-jvm-code.html[running dynamic JVM code], - and re-organized the pages for Scala/Java/Kotlin by-use-case to make them more navigable - -For a more detailed view of Mill changes since 0.11.12, along with migration instructions, -see the sections below on: - -* <<0-12-0-RC1>> -* <<0-12-0-RC2>> -* <<0-12-0-RC3>> -* <<0-12-0-since-rc2>> - -0.12.x is binary compatible with 0.11.x, and so Mill plugins published for Mill 0.11.x can -continue to be used without updating them. Although binary compatible, Mill 0.12.x does -have breaking changes listed below with instructions provided on how to either disable the -breaking change with a flag or adjust your code to accommodate it. You should download the -latest version of the https://github.com/com-lihaoyi/mill/blob/main/mill[Mill Bootstrap Script] -if you are upgrading from a prior version. - -If you need help upgrading from 0.11.x or hit any issues, please visit the -https://discord.com/invite/xJCYRVMS[#mill Discord Channel] or -https://github.com/com-lihaoyi/mill/discussions/3349[0.12.x Github Discussion Thread]. We'd -love to hear from you on your experience with Mill in general and Mil 0.12.x in particular - -* *Example Upgrade PRs* - -** The following PRs are example upgrades of Mill from 0.11.x to 0.12.0-RC1 for various -projects in the `com.lihaoyi` ecosystem. - -*** Trivial upgrades that just needed to bump a version: https://github.com/com-lihaoyi/geny/pull/87 , - https://github.com/com-lihaoyi/sourcecode/pull/175, https://github.com/com-lihaoyi/fansi/pull/107, - https://github.com/com-lihaoyi/PPrint/pull/141, https://github.com/com-lihaoyi/mainargs/pull/159/files, - https://github.com/com-lihaoyi/fastparse/pull/319, https://github.com/com-lihaoyi/scalatags/pull/284 -https://github.com/com-lihaoyi/castor/pull/64, https://github.com/com-lihaoyi/utest/pull/351 - -*** Less trivial upgrades, needing to make use of `MILL_TEST_RESOURCE_DIR` or other explicit path references to - be compatible with test sandboxing: https://github.com/com-lihaoyi/requests-scala/pull/174, - https://github.com/com-lihaoyi/upickle/pull/627, https://github.com/com-lihaoyi/os-lib/pull/300, - https://github.com/com-lihaoyi/scalasql/pull/30, https://github.com/com-lihaoyi/Ammonite/pull/1575 - -*** More involved upgrades: https://github.com/com-lihaoyi/cask/pull/143 - -[#0-12-0-since-rc2] -==== 0.12.0 Changes since RC3 - -* Mill now takes a lock on the `out/` folder whenver evaluating it to avoid race conditions on disk. - {link-pr}/3599[#3599]. Pass in `--no-build-lock` to disable it at your own risk - -* Update Zinc to 0.10.3 to fix issues with over-compilation {link-pr}/3748[#3748] - -* `runIvyDeps` is now transitive, as is the newly-introduced `runModuleDeps`, - to try and match the semantics of runtime deps in Maven{link-pr}/3774[#3774] - -[#0-12-0-RC3] -==== 0.12.0-RC3 - 2024-10-04 - -Changes since 0.12.0-RC2 - -* `-j`/`--jobs` now allows computed values of the form `-j 0.5C` (half as many jobs as cores) or - `-j C-2` (two less jobs than cores) to allow for automatic scaling based on the number of cores available - {link-pr}/3554[#3554] - - -* Fix `testOnly` handling of ScalaTest tagged tests {link-pr}/3557[#3557] - -* Make `./mill` without any arguments point you towards --help, flesh out --help into a cheat sheet {link-pr}/3556[#3556] - -* Use `Task` instead of `T` when constructing targets and other tasks {link-pr}/3565[#3565]. The new syntax - (given below) is intended to be more idiomatic Scala and less idiosyncratic. The old syntax will continue - to work for backwards compatibility, but using the new syntax is recommended -** `T {...}` -> `Task {...}` -** `T.command {...}` -> `Task.Command {...}` -** `T.input {...}` -> `Task.Input {...}` -** `T.source {...}` -> `Task.Source {...}` -** `T.sources {...}` -> `Task.Sources {...}` -** `T.persistent {...}` -> `Task(persistent = true) {...}` -** `T.task {...}` -> `Task.Anon {...}` - -* Introduced `Task.Command(exclusive = true)` to allow explicit annotation of which - commands need to run without parallelism, allowing `.test` and other commands - to run parallel by default {link-pr}/3617[#3617] - -* Lots of added docs for Building Kotlin with Mill: -** Kotlin Build Examples and Linting {link-pr}/3555[#3555], with KtLint and Detekt support -** Kotlin Module Configuration {link-pr}/3585[#3585] -** Publishing and Testing Kotlin with Mill {link-pr}/3589[#3589] -** Using Mill to build a Ktor web server {link-pr}/3621[#3621] - -* Additional support for Kotlin tools and frameworks -** KtFmt support {link-pr}/3620[#3620] -** Kover support {link-pr}/3624[#3624] - -* Show Worker tasks in `resolve`/`show`/`inspect` {link-pr}/3580[#3580] - -* `mill clean` now terminates Worker tasks {link-pr}/3579[#3579] - -* Overhaul of the terminal "ticker" UI for displaying task progress to better support - parallel builds {link-pr}/3577[#3577] -** Mill now shows all active tasks and their duration at the bottom of your terminal -** Stream task logs are now prefixed with the task index on the left and the task - name above, so you can attribute each line of logs to the task that generated it - -``` -... -[3861/4712] main.client.publishLocalCached -[3861] Publishing Artifact(com.lihaoyi,mill-main-client,0.12.0-RC2-67-a566d8-DIRTY875bcbb1) to ivy repo /Users/lihaoyi/.ivy2/local -[3868/4712] runner.client.publishLocalCached -[3868] Publishing Artifact(com.lihaoyi,mill-runner-client,0.12.0-RC2-67-a566d8-DIRTY875bcbb1) to ivy repo /Users/lihaoyi/.ivy2/local - [3869/4712] ======================================= installLocalCache ============================================== 4s -[3676] scalajslib.worker-api.docJar 1s -[3688] scalanativelib.worker-api.docJar 1s -[3706] contrib.playlib.worker[2.9].docJar 1s -[3707] contrib.playlib.worker[2.6].docJar 1s -... and 3 more threads -``` - -* Add API for tasks to spawn concurrent and parallel futures via `Task.fork.{async,await}` {link-pr}/3478[#3478] - -* Allow large test modules with many classes to be broken up to use multiple concurrent JVMs - by overriding `def testForkGrouping` {link-pr}/3478[#3478] - -* Use coursier thread pool to run coursier-related tasks to avoid deadlocks {link-pr}/3614[#3614] - -* `inspect` now shows useful information when used on modules, not just tasks {link-pr}/3532[#3532] - -``` -$ ./mill inspect dist0 -dist0(build.mill:745) - Version of [[dist]] meant for local integration testing within the Mill - repo. Looks mostly the same as [[dist]], except it does not have a reference - to itself in its [[testTransitiveDeps]], to avoid a circular dependency. - -Inherited Modules: MillPublishJavaModule - -Module Dependencies: runner, idea - -Default Task: dist0.run - -Tasks: dist0.fix, dist0.testTransitiveDeps -``` - -* `mill init` now supports creating a project based on examples from Mill's documentation {link-pr}/3583[#3583], - and unpacks the example into the current folder rather than a subfolder {link-pr}/3626[#3626] - -* `MILL_TEST_RESOURCE_FOLDER` has been renamed to `MILL_TEST_RESOURCE_DIR` for consistency with other -environment variable names {link-pr}/3637[#3637] - -[#0-12-0-RC2] -==== 0.12.0-RC2 - 2024-09-16 - -Changes since 0.12.0-RC1 - -* Support `exclude` attribute in `Dep` parser. You can give exclusions with `;exclude=org:name` - or `;exclude=org:*` or `;exclude=*:name` {link-pr}/3492[#3492] - -* Fix `ScalaModule#console` by properly inheriting streams {link-pr}/3500[#3500] - -* Adjust codegen to allow custom ``mainargs.TokensReader``s, and include a - `mainargs.TokensReader[os.Path]` by default for convenience {link-pr}/3504[#3504] - -* Update to https://github.com/com-lihaoyi/os-lib?tab=readme-ov-file#0-10-7[OS-Lib 0.10.7] to - allow concise multi-segment sub-paths; you can now write `os.pwd / "foo/bar/qux"` rather than - `os.pwd / "foo" / "bar" / "qux"` - -* Add `JavaModule.mandatoryJavacOptions`. Those are not propagated to the inner test - traits intentionally, since those options are typically configured by other means, - e.g. dedicated targets. {link-pr}/3503[#3503] - -* Add plugins to run Checkstyle and generate reports {link-pr}/3516[#3516] - -* Simplified ``PublishModule``'s publishing setup via {link-pr}/3523[#3523]. You can now - run `mill mill.scalalib.PublishModule/` with the proper environment variables (below) and - it should do the right thing by default - -** Prefix all environment variables with `MILL_`: - `MILL_SONATYPE_USERNAME`, `MILL_SONATYPE_PASSWORD`, - `MILL_PGP_SECRET_BASE64`, `MILL_PGP_PASSPHRASE` to try and add some - rudimentary ownership and namespacing - -* Allow external modules to have a `defaultCommandName` {link-pr}/3545[#3545]. This has - been applied to `ScalafmtModule` and `PublishModule`, so you can - now autoformat your code via `mill mill.scalalib.ScalafmtModule/` and publish it via - `mill mill.scalalib.PublishModule/` without needing the `/reformatAll __.sources` - or `/publishAll __.publishArtifacts` suffix - -* Integrated Kotlin integration as a first partly module and add example documentation - {link-pr}/3514[#3514]. This is still pretty spartan, but we expect to flesh it out over time - -* Move `.mill.sc` alternate file extension to `.mill.scala` {link-pr}/3521[#3521] - -[#0-12-0-RC1] -==== 0.12.0-RC1 - 2024-09-09 - -* *Breaking Changes* - -** Build file overhaul: Mill's build file management has been overhauled to better support -large projects. See https://mill-build.org/mill/Structuring_Large_Builds.html[Structuring Large Builds] -for details - -*** Mill now uses `.mill` as its file extension, with some semantic changes -from the old `.sc` files to allow better IDE support. The `.sc` extension is still supported -and its semantics are largely unchanged the ease the migration, but you should convert your Mill -configs to `.mill` files to benefit from Mill's improved IDE experience going forward. - -*** The `build.sc` file has been renamed `build.mill` to prevent confusion with Ammonite/Scala-CLI scripts, -and all associated `.sc` files have been renamed to `.mill`. - -**** Until IntelliJ-Scala adds support for `.mill` files built in, you can add it yourself via -`Settings / Editor / File Types / Scala` and add the pattern `*.mill` - -*** All `.mill` files must have a `package` declaration, -with `package build` for `.mill` files in the root folder and `package build.foo.bar` for `.mill` files in `foo/bar/`. - -**** The package declaration remains optional for legacy `.sc` files - -*** Only `foo.mill` files in folders directly containing a `build.mill` or `package.mill` can -be imported via `import $file`. - -**** You need to create empty `package.mill` files in any folder containing scripts if they are not already -adjacent to your `build.mill` in the root folder - -**** `foo.sc` files can continue to be imported from arbitrary paths, to ease in the migration - -*** Builds can now be modularized into per-folder definitions by defining `package.mill` files in subfolders -{link-pr}/3213[#3213]. You can no longer define targets and modules in arbitrary `foo.sc` files - -**** All target and module definitions must be moved into `package.mill` files in each folder. - -*** `$file` references in `.mill` files are now absolute from the project root, and thus `.^` to -refer to parent package is no longer supported, for consistency with other programming environments - -**** `$file` references in old `.sc` files are unchanged and continue being relative, preserving the -current behavior. - -** ``RootModule``s can only be named `package`, e.g. `object foo extends RootModule` must now be -named ``object `package` extends RootModule``. - -*** If you have an existing `RootModule`, you need to rename it ``object `package` extends RootModule`` - -** Turn on parallelism for task evaluation by default, except for commands -which always run serially at the end {link-pr}/3265[#3265] - -*** This can be disabled by passing `--jobs 1` - -** Mill uses empty sandbox folders as the working directory for running its own code and -{link-pr}/3367[#3367] and test suites {link-pr}/3347[#3347], to avoid accidental interference -between tasks and tests due to parallelism. See https://mill-build.org/mill/Mill_Sandboxing.html[Mill Sandboxing] -for details - -*** This can be disabled by adding `def testSandboxWorkingDir = false` in your test module - -** Mill commands now require arguments to be passed named via `./mill mycommand --key value`, rather than - allowing just `./mill mycommand value`. {link-pr}/3431[#3431]. - -*** You can pass in - `--allow-positional-command-args` to fall back to the old behavior, or use `@mainargs.arg(positional = true)` - on individual parameters - -** Dropped support for Java 8, Scala 2.11.x/3.1.x, and Scala-Native 0.4.x, following suit with the rest of the -com-lihaoyi ecosystem. We now expect a minimum of Java 11, Scala 2.12.x/3.2.x, and Scala-Native 0.5.x - -** `--disable-callgraph-invalidation` is no longer supported. The flag is still accepted but is -now a no-op. - -* *Other Changes* - -** Overhaul the Mill client-server protocol to improve robustness -{link-pr}/3363[#3363] {link-pr}/3366[#3366] {link-pr}/3368[#3368] {link-pr}/3370[#3370] - -** Mill now has explicitly supported workflows for third-party plugin authors, and -publishes unit, integration, and example test fixtures for writing plugins as `mill-testkit` -{link-pr}/3398[#3398] for downstream plugin authors to use in testing their own Mill extensions. - -*** See https://mill-build.org/mill/Writing_Mill_Plugins.html[Writing Mill Plugins] for more details. - -*** `mill-testkit` is experimental and does not provide the same stability or binary-compatibility -guarantees as the rest of Mill. Nevertheless, if you are writing Mill plugins, please try it out -and let us know what you think! - -** Bump default Sonatype Maven Central publishing timeouts to 10 minutes to avoid -timeouts due to slowness https://github.com/com-lihaoyi/mill/commit/b4c9386b0233fab53a312426715e226e4a7f6302 - -** Importing Mill projects into IntelliJ via BSP now properly marks the `out/`, `.idea/`, and `.bsp/` folders -as excluded {link-pr}/3329[#3329] - -** Optimizations to Mill evaluation logic to reduce fixed overhead of running Mill -on large projects {link-pr}/3388[#3388] - -** Improvements to `visualize` and `visualizePlan` such that they no longer need to be -prefixed with `show` and no longer need a separate `graphviz`/`dot` install on Mac-OSX -{link-pr}/3438[#3438] - -[#0-11-13] -=== 0.11.13 - 2024-01-14 -:version: 0.11.13 -:milestone-name: 0.11.13 -:milestone: 100 -:prev-version: 0.11.12 - -_Changes since {prev-version}:_ - - -* Security Fix: Update protobuf-java to 3.25.5 {link-pr}/3639[#3639] -* Backport: Fixed property handling when using `--define`/`-D` from the Mill CLI. {link-pr}/3795[#3795] -* Backport: GenIdea: Handle failure when evaluating module sources/resources {link-pr}/3755[#3755] -* Update asm from 9.7 to 9.7.1 for Java 24 support {link-pr}/3745[#3745] - - -_For details refer to -{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] -and the {link-compare}/{prev-version}\...{version}[list of commits]._ - - -[#0-11-12] -=== 0.11.12 - 2024-08-20 -:version: 0.11.12 -:milestone-name: 0.11.12 -:milestone: 99 -:prev-version: 0.11.11 - -_Changes since {prev-version}:_ - -* Bump uTest to 0.8.4 {link-pr}/3340[#3340] -* Manage TestModule dependencies via `build.sc` {link-pr}/3320[#3320] -* Fix the warning not being printed when -i/--interactive/--no-server/--bsp are not the first argument {link-pr}/3346[#3346] -* GenIdea: Make Scala SDK specific for JS / Native {link-pr}/3348[#3348] -* CI: Adapt CI for 0.11.x branch {link-pr}/3350[#3350] -* GenIdea: unroll module dependencies {link-pr}/3358[#3358] -* Print pretty error message when Result.Failure is thrown {link-pr}/3393[#3393] -* Avoid spurious deprecation warnings in generated code {link-pr}/3400[#3400] - -_For details refer to -{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] -and the {link-compare}/{prev-version}\...{version}[list of commits]._ - -[#0-11-11] -=== 0.11.11 - 2024-08-05 -:version: 0.11.11 -:milestone-name: 0.11.11 -:milestone: 98 -:prev-version: 0.11.10 - -*_We initially tagged `0.11.11` on 2024-11-31 but never published the released due to technical issues. On 2024-08-05 we re-tagged and published `0.11.11`._* - -_Changes since {prev-version}:_ - -* Workaround issue in Sonatype which started failing on double slashes in URLs - (even though they previously worked) https://github.com/com-lihaoyi/mill/commit/a293b46e80e37572bae46ef6225f41f547a5b238[Link] -* Overhaul of the documentation site at https://mill-build.org -* New Java- and Scala-specific sections on the documentation, with more detailed - comparisons to existing build tools -* Added graphviz diagrams throughout to help the user in visualizing the concepts involved -* Update versions of JUnit sbt-test-interface libraries that Mill uses - {link-pr}/3296[#3296] -* Make it simpler to resolve dependencies in custom tasks via `defaultResolver().resolveDeps` - {link-pr}/3330[#3330] - - -_For details refer to -{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] -and the {link-compare}/{prev-version}\...{version}[list of commits]._ - -[#0-11-10] -=== 0.11.10 - 2024-07-23 -:version: 0.11.10 -:milestone-name: 0.11.10 -:milestone: 95 -:prev-version: 0.11.9 - -_Changes since {prev-version}:_ - -__Fixes and Improvements__ - -* Improvements in Java docs and user experience {link-pr}/3278[#3278] -* Automatically pump os.proc streams when SystemStreams are redirected {link-pr}/3275[#3275] -* Fix resolution of children of override lazy val modules {link-pr}/3270[#3270] - -_For details refer to -{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] -and the {link-compare}/{prev-version}\...{version}[list of commits]._ - - -[#0-11-9] -=== 0.11.9 - 2024-07-18 -:version: 0.11.9 -:milestone-name: 0.11.9 -:milestone: 94 -:prev-version: 0.11.8 - -_Changes since {prev-version}:_ - -__New features__ - -* First class support for Java projects {link-pr}/3261[#3261] - -__Fixes and Improvements__ - -* Add coarse grained lock around BSP request to avoid deadlocks {link-pr}/3243[#3243] - -_For details refer to -{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] -and the {link-compare}/{prev-version}\...{version}[list of commits]._ - -[#0-11-8] -=== 0.11.8 - 2024-06-21 -:version: 0.11.8 -:milestone-name: 0.11.8 -:milestone: 93 -:prev-version: 0.11.7 - -_Changes since {prev-version}:_ - -__New features__ - -* Support Scala Native 0.5.0 {link-pr}/3054[#3054] {link-pr}/3107[#3107] {link-pr}/3120[#3120] -* Add `jvmOptions` to docker contrib configuration {link-pr}/3079[#3079] -* Pass auxiliary class files to zinc, so they are deleted together {link-pr}/3072[#3072] -* BSP: Handle new `JvmCompileClasspath` request {link-pr}/3086[#3086] -* Add support for Cobertura XML report task to help integration {link-pr}/3093[#3093] -* Support Scala.js minify via `scalaJSMinify: T[String]` {link-pr}/3094[#3094] -* Restructure `TestModule`, add `RunModule` {link-pr}/3064[#3064] -* Move `run`-targets into `RunModule` {link-pr}/3090[#3090] -* `TestModule`: Support generation of JUnit-compatible xml report {link-pr}/3099[#3099] {link-pr}/3172[#3172] {link-pr}/3135[#3135] {link-pr}/3184[#3184] -* Use docker image hash to determine if build should rerun {link-pr}/3124[#3124] -* Add multi platform support to contrib.docker through docker buildx {link-pr}/3143[#3143] -* Add ability to re-write ESModule imports at link time {link-pr}/3109[#3109] -* Adding sonatype central support {link-pr}/3130[#3130] {link-pr}/3187[#3187] -* Add `TestModule.discoveredTestClasses` target to ease test inspection {link-pr}/3191[#3191] -* Support "pom" packaging type in `PublishModule` {link-pr}/3222[#3222] - - -__Fixes and Improvements__ - -* Restructure `VersionFinder`, increase speed, added ticker messages {link-pr}/3014[#3014] -* Fix bsp compile classpath inconsistencies {link-pr}/3017[#3017] -* Bring more bsp-specific targets in line with their non-bsp versions {link-pr}/3018[#3018] -* Make BSP task processing more resilient {link-pr}/3022[#3022] -* Update example `build.sc` with current library versions {link-pr}/3055[#3055] -* Scoverage: Do not include the scalac plugin in the reporting classpath {link-pr}/3060[#3060] -* Add Scala 2.13.13 and 2.12.19 to supported bridges list {link-pr}/3066[#3066] -* Fix BuildInfo static Java file generator {link-pr}/3074[#3074] -* Scoverage inner module defaults to `skipIdea = outer.skipIdea` {link-pr}/3098[#3098] -* Deduplicate input tasks in `inspect` command {link-pr}/3102[#3102] -* CI: add scalafix-check to precondition to publish {link-pr}/3095[#3095] -* Docs for Continuous cache invalidation {link-pr}/3096[#3096] -* Isolate scoverage modules from their parent modules {link-pr}/3118[#3118] -* Scoverage improve classpath override to the minimal {link-pr}/3122[#3122] -* Improve internal BSP API and docs, fix a match error condition {link-pr}/3111[#3111] -* Retry example integration tests that didn't finish after 5 minutes {link-pr}/3125[#3125] -* Fix mill script for parameter starting with -i {link-pr}/3127[#3127] -* Fixed semanticdb file copying issue, added more tests {link-pr}/3080[#3080] -* Detect assemblies with too many entries to fail shell script prepending {link-pr}/3140[#3140] -* Exclude mill provided dependencies in meta builds {link-pr}/3189[#3189] {link-pr}/3221[#3221] -* Fix Scala.js toolchain logs in server-client mode {link-pr}/3196[#3196] -* Fix compiler bridge build setup and build essential versions in CI {link-pr}/3179[#3179] -* Add Scala 2.13.14 to bridgeScalaVersions {link-pr}/3166[#3166] -* GenIdea improvements {link-pr}/3153[#3153] -* GenIdea: Use synthetic scala-SDK entry for compiler setup {link-pr}/3154[#3154] -* Fix classpath regression in Bloop export #1918 {link-pr}/3211[#3211] -* Support `build.sc` in Bloop {link-pr}/3208[#3208] -* Fail if `testOnly` does not match any test case {link-pr}/3224[#3224] - - -__Updates and internal changes__ - -* Code cleanups -* Documentation updates and fixes -* Test and CI improvements -* Updates: acyclic 0.3.12, Ammonite 3.0.0-M2-11-713b6963, asm 9.7, - commons-compress 1.26.2, commons-io 2.16.1, coursier 2.1.10, - fastparse 3.1.0, fansi 0.5.0, - guava 33.2.1, - jarjar-abrams-core 1.14.0, jline 3.26.2, junixsocket 2.9.1, - log4j-core 2.23.1, - mainargs 0.7.0 mill-mima 0.1.1, mill-scalafix 0.4.0, - os-lib 0.10.2, - Play 2.8.22 / 2.9.4 / 3.0.4, pprint 0.9.0, protobuf-java 3.25.3, - Scala 2.12.19 / 2.13.14, - Scala Native 0.4.17 / 0.5.3, - scala-xml 2.3.0, - scalacheck 1.18.0, scalatest 3.2.18, scoverage 2.1.1, - semanticdb-java 0.9.10, semanticdb-scalac 4.9.7 - requests 0.8.3, - upickle 3.3.1, utest 0.8.3, - zinc 1.10.0 - -_For details refer to -{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] -and the {link-compare}/{prev-version}\...{version}[list of commits]._ - - - -[#0-11-7] -=== 0.11.7 - 2024-02-05 -:version: 0.11.7 -:milestone-name: 0.11.7 -:milestone: 91 -:prev-version: 0.11.6 - -_Changes since {prev-version}:_ - -__New features__ - -* Support type selectors as path selection syntax in resolve {link-pr}/2997[#2997], {link-pr}/2998[#2998] -* Read coursier default config files to set up repositories and support mirror configuration {link-pr}/2886[#2886], {link-pr}/2917[#2917] -* Added support for `type` attribute when parsing dependencies {link-pr}/2994[#2994] -* Add new `ScalaModule.scalacHelp` command {link-pr}/2921[#2921] -* Add a `ScalaModule.consoleScalacOptions` target {link-pr}/2948[#2948] -* Enable colored output for Scala 2 compiler output {link-pr}/2950[#2950] -* Add `publishLocalCached` and `publishM2LocalCached` targets to `PublishModule` {link-pr}/2976[#2976] -* Support Scala Native build target. This allows to build static and dynamic libraries other than binaries {link-pr}/2898[#2898] -* Prepare the Scala.js integration for SIP-51 {link-pr}/2988[#2988] - -__Fixes and Improvements__ - -* Better detect Windows Subsystem for Linux environments {link-pr}/2901[#2901] -* Avoid evaluating `Task.Input`s twice {link-pr}/2952[#2952] -* Deduplicate (anonymous) tasks in results {link-pr}/2959[#2959] -* Synchronize `evaluateGroupCached` to avoid concurrent access to cache {link-pr}/2980[#2980] -* Properly sanitize Windows reserved names and symbols in evaluator paths {link-pr}/2964[#2964], {link-pr}/2965[#2965] -* Detect colliding cross module values {link-pr}/2984[#2984] -* Mask forward slashes in cross values to fix their cache locations {link-pr}/2986[#2986] -* Re-enable test result summary (print `done` message from test framework to stdout) {link-pr}/2993[#2993] -* Fix overeager caching of `cliImports` value in `generatedScriptSources` {link-pr}/2977[#2977] -* Allow resolving moduleDeps with older Scala 3 versions {link-pr}/2877[#2877] -* GenIdea: Put module dependencies after library dependencies {link-pr}/2925[#2925] -* BSP: do not filter clean-requests for meta-builds {link-pr}/2931[#2931] -* BSP: Add `JavaModule.bspBuildTargetData` to make `JavaModule` reports workable `BuildTarget` {link-pr}/2930[#2930] -* BSP: Send `logMessage` instead of diagnostics when `textDocument` is unknown {link-pr}/2979[#2979] -* Scoverage inner module defaults new to `skipIdea = true` {link-pr}/2989[#2989] - -__Updates and internal changes__ - -* Dependency updates: asm-tree 9.6, bsp4j 2.2.0-M1, coursier 2.1.8, jline 3.25.0, jna 5.14.0, junixsocket-core 2.8.3, log4j-core 2.22.1, mainargs 0.6.1, os-lib 0.9.3, scalafmt 3.7.15, Scala.js 1.15.0, scala-native 8.4.16, semanticdb-java 0.9.8, semanticdb-scala 4.8.15, upickle 3.1.4, zinc 1.9.6 - -* Contrib dependency updates: Play 2.8.21, Play 2.9.1, Play 3.0.1 - -* Documentation updates and new sections -* More code cleanups, explicit result types and enforcement of some code quality metrics via mill-scalafix - - -_For details refer to -{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] -and the {link-compare}/{prev-version}\...{version}[list of commits]._ - - - -[#0-11-6] -=== 0.11.6 - 2023-11-21 -:version: 0.11.6 -:milestone-name: 0.11.6 -:milestone: 90 -:prev-version: 0.11.5 - - -_Changes since {prev-version}:_ - -* Make `PathRef` robust against concurrent filesyste modifications {link-pr}/2832[#2832] - -* Use logger error stream for informational messages {link-pr}/2839[#2839] - -* Harden assembly logic against Zip-Slip vulnerabilities {link-pr}/2847[#2847] - -* Add an option to disable incremental compilation with zinc {link-pr}/2851[#2851] - -* Add check for right Tests traits in ScalaJS and Native {link-pr}/2874[#2874] - -* Attempt to recover from client/server connection errors to {link-pr}/2879[#2879] - -* Fix discovery of targets whose names get mangled {link-pr}/2883[#2883] - -* Make `mill show` skip `-j` prefixes to ensure machine readability {link-pr}/2884[#2884] - -_For details refer to -{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] -and the {link-compare}/{prev-version}\...{version}[list of commits]._ - - -[#0-11-5] -=== 0.11.5 - 2023-10-04 -:version: 0.11.5 -:milestone-name: 0.11.5 -:milestone: 89 -:prev-version: 0.11.4 - -_Changes since {prev-version}:_ - -* Support for Java 21 {link-pr}/2768[#2768] - -* Various BSP improvements {link-pr}/2814[#2814], {link-pr}/2813[#2813], {link-pr}/2810[#2810], {link-pr}/2771[#2771] - -* The `T.workspace` context path now always points to the top-level project directory, also for meta builds {link-pr}/2809[#2809] - -* Mill now better detects and reports logical cycles in inter-module dependencies {link-pr}/2790[#2790] - -* Fixed semanticDB data generation for meta builds {link-pr}/2809[#2809] - -* The `prepareOffline` command also fetches relevant compiler-bridges for Scala modules {link-pr}/2791[#2791] - -* Improved `ScalaJSModule` and added support for `IRFileCache` {link-pr}/2783[#2783] - -* The `JavaModule.zincReportCachedProblems` configuration can now also customized via a Java system property {link-pr}/2775[#2775] - -* Fixed a file truncation issue in protobuf module and print a warning when proto file get overwritten {link-pr}/2800[#2800] - -* Documentation improvements - -* Dependency updates: bsp4j 2.1.0-M7, castor 0.3.0, coursier-interface 1.0.19, jarjarabrams 1.9.0, jline 3.23.0, junitsocket 2.8.1, mainargs 0.5.4, scalafmt 3.7.14, Scala.js 1.14.0, semanticdb-java 0.9.6, semanticdb-scala 4.8.10 - -* Various other improvements and cleanups - -_For details refer to -{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] -and the {link-compare}/{prev-version}\...{version}[list of commits]._ - - -[#0-11-4] -=== 0.11.4 - 2023-09-19 -:version: 0.11.4 -:milestone-name: 0.11.4 -:milestone: 88 -:prev-version: 0.11.3 - -_Changes since {prev-version}:_ - -* Fix binary incompatibility issue with `Discover` macro's generated generic code {link-pr}/2749[#2749] -* Support the `release-size` mode in `ScalaNativeModule` {link-pr}/2754[#2754] - -_For details refer to -{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] -and the {link-compare}/{prev-version}\...{version}[list of commits]._ - -[#0-11-3] -=== 0.11.3 - 2023-09-17 -:version: 0.11.3 -:milestone-name: 0.11.3 -:milestone: 87 -:prev-version: 0.11.2 - -_Changes since {prev-version}:_ - -* Allow Mill CLI to select the meta-build frame it operates on via `--meta-level ` {link-pr}/2719[#2719] - -* Improve the `mill resolve` suggestion when a user specifies a target in the wrong module {link-pr}/2731[#2731] - -* Fix conflicting dependencies between upstream JavaModules {link-pr}/2735[#2735] - -* Fix the scala-library dependency for (generic) platform modules {link-pr}/2739[#2739] - -* Fix terminal forwarding in `.console` and `.repl` commands {link-pr}/2743[#2743] - -_For details refer to -{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] -and the {link-compare}/{prev-version}\...{version}[list of commits]._ - - -[#0-11-2] -=== 0.11.2 - 2023-08-28 -:version: 0.11.2 -:milestone-name: 0.11.2 -:milestone: 86 -:prev-version: 0.11.1 - -_Changes since {prev-version}:_ - -* Target invalidation after making changes to `build.sc` is now done at a fine-grained method-level granularity, using callgraph reachability analysis to see which targets depend on the code that was changed. -See {link-pr}/2417[#2417] for more details - -* Fix redirection of stdout stream to stderr when using `show` -{link-pr}/2689[#2689] - -* Fix line numbers in errors for scripts starting with leading comments or whitespace {link-pr}/2686[#2686] - -* Fix `init` command and support runnig Mill without existing `build.sc` file -{link-pr}/2662[#2662] - -* Fixes for BSP editor integration sometimes using the wrong output folder for meta-build metadata, causing subsequent builds from the command line to fail {link-pr}/2692[#2692] - -* Added a new `mill.idea.GenIdea/idea` command to generate IntelliJ IDE metadata, improving-upon and replacing the older `mill.scalalib.GenIdea/idea` -command which is now deprecated {link-pr}/2638[#2638] - -* Update Coursier to 2.1.6 to mitigate CVE CVE-2022-46751 -{link-pr}/2705[#2705] - -_For details refer to -{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] -and the {link-compare}/{prev-version}\...{version}[list of commits]._ - -[#0-11-1] -=== 0.11.1 - 2023-06-23 -:version: 0.11.1 -:milestone-name: 0.11.1 -:milestone: 85 -:prev-version: 0.11.0 - -_Changes since {prev-version}:_ - -* `mill.define.Cross`: Introduced default cross segments and some CLI convenience -* `mill.testrunner`: Fixed exception when running ScalaTest or ZIOTest frameworks -* `mill.runner`: Removed some obsolete / defunct cli options -* `mill.runner`: Properly distinct-ify commands when resolving wide matching target patterns -* `mill.scalajslib`: Restored correct defaults for `esFeature` -* `mill.bsp`: Fixed a `MatchError` in the `buildtarget/scalaTestClasses` request -* `mill.contrib.bloop`: Corrected accidentally changed package name resulting in non-functional plugin -* `mill.contrib.scoverage`: Fixed defunct plugin due to a missing type annotation -* Various internal improvements -* Dependency updates: Ammonite 3.3.0-M0-32-96e851cb, bsp4j 2.1.0-M5, zinc 1.9.1 -* Mill is now build with Mill 0.11 - -_For details refer to -{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] -and the {link-compare}/{prev-version}\...{version}[list of commits]._ - -[#0-11-0] -=== 0.11.0 - 2023-06-06 -:version: 0.11.0 -:milestone-name: 0.11.0 -:milestone: 84 -:prev-version: 0.11.0-M11 - -*This release is binary incompatible to {prev-version}.* - -_Changes since {prev-version}:_ - -* 0.11.0 is the next breaking version after the 0.10.x series, with a large number of improvements. -See the changelog below for 0.11.0-M1 to 0.11.0-M11 for a full list of user-facing changes. - -_For details refer to -{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] -and the {link-compare}/{prev-version}\...{version}[list of commits]._ - -// end::changelog[] - -=== Older releases -:leveloffset: +1 - -// tag::changelogOld[] - -[#0-11-0-M11] -=== 0.11.0-M11 - 2023-06-04 -:version: 0.11.0-M11 -:milestone-name: 0.11.0-M11 -:milestone: 83 -:prev-version: 0.11.0-M10 - -*This release is binary incompatible to {prev-version}.* - -_Changes since {prev-version}:_ - -* Make `foo.test` command run tests with user code in the boot classloader, rather than in a sub-classloader -{link-pr}/2561[#2561] - -* Mill backend server timeout is now configurable -{link-pr}/2550[#2550] - -* Mill assembly is now distributed via Maven Central, rather than Github release assets, to remove an unnecessary single point of failure -{link-pr}/2560[#2560] - -* `Tests` inner trait was removed, to avoid trait shadowing which will be removed in Scala 3. Please use `ScalaTests`, `ScalaJSTests`, or -`ScalaNativeTests` instead -{link-pr}/2558[#2558] - -_For details refer to -{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] -and the {link-compare}/{prev-version}\...{version}[list of commits]._ - -[#0-11-0-M10] -=== 0.11.0-M10 - 2023-05-24 -:version: 0.11.0-M10 -:milestone-name: 0.11.0-M10 -:milestone: 82 -:prev-version: 0.11.0-M9 - -*This release is binary incompatible to {prev-version}.* - -_Changes since {prev-version}:_ - -* Make `mill.define.Module` a `trait` to allow abstract/virtual modules to be ``trait``s rather than ``class``es -{link-pr}/2536[#2536] - -* Move `mill.BuildInfo` to `mill.main.BuildInfo` to avoid name conflicts with -`mill.contrib.buildinfo.BuildInfo` -{link-pr}/2537[#2537] - -* `PlatformScalaModule` now exposes `platformScalaSuffix` for user code to use -{link-pr}/2534[#2534] - -* Add `Agg.when` operator to simplify common workflow of adding optional flags or command line parameters {link-pr}/2535[#2353] - -* Generalize handling of test module source folder layout, such that they always match the folder layout of the enclosing module -{link-pr}/2531[#2531] - -_For details refer to -{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] -and the {link-compare}/{prev-version}\...{version}[list of commits]._ - -[#0-11-0-M9] -=== 0.11.0-M9 - 2023-05-18 -:version: 0.11.0-M9 -:milestone-name: 0.11.0-M9 -:milestone: 80 -:prev-version: 0.11.0-M8 - -*This release is binary incompatible to {prev-version}.* - -_Changes since {prev-version}:_ - -* Overhauled target resolution logic. -It is now significantly lazier, resulting in less of the module tree being un-necessarily instantiated, and also more precise and predictable {link-pr}/2453[#2453] -{link-pr}/2511[#2511] - -* Allow tasks to be passed as the CLI parameters of the `run` command, allowing -`run` to be easily used in the implementation of other tasks -{link-pr}/2452[#2452] - -* ``Task.Input``s are now watched properly with `--watch`, and trigger re-evaluations when the watched value changes {link-pr}/2489[#2489] - -* Support for Java 20 {link-pr}/2501[#2501] - -* Broke up `mill.modules` package {link-pr}/2513[#2513], with functionality re-distributed to `mill.util` and `mill.scalalib` - -* Overhaul BSP-related code, for improved fidelity and correctness -{link-pr}/2415[#2415] -{link-pr}/2414[#2414] -{link-pr}/2518[#2518] -{link-pr}/2521[#2521] - -* Enabled compilation warnings in `build.sc` -{link-pr}/2519[#2519] - -* Print out the CLI flags when inspecting ``Task.Command``s -{link-pr}/2522[#2522] - -_For details refer to -{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] -and the {link-compare}/{prev-version}\...{version}[list of commits]._ - -[#0-11-0-M8] -=== 0.11.0-M8 - 2023-04-24 -:version: 0.11.0-M8 -:milestone-name: 0.11.0-M8 -:milestone: 79 -:prev-version: 0.11.0-M7 - -*This release is binary incompatible to {prev-version}.* - -_Changes since {prev-version}:_ - -* Added an https://github.com/com-lihaoyi/mill/tree/main/example[example/] -folder in the Mill repo, containing common build setups demonstrating Mill features with explanations of how each feature works - -* Pre-compiled Scala incremental compiler interface -{link-pr}/2424[#2424], to speed up clean builds - -* Add some helpers to simplify cross-version/cross-platform modules {#2406}[{link-pr}/2406] - -* You can now override `T{...}` ``Target``s with `Task.Source` or `Task.Sources`, and vice versa {link-pr}/2402[#2402] - -* Removed the Ammonite script runner dependency used to evaluate `build.sc` -files and instead compile them using Mill {link-pr}/2377[#2377] - -* Add `TestModule.ZioTest` {link-pr}/2432[#2432] - -* Caching fixes for external modules https://github.com/com-lihaoyi/mill/issues/2419[#2419] - -* Overhaul of the Mill `BuildInfo` plugin, moving the key-value into resources to avoid needing to re-compile your module when the values change, adding -`JavaModule` support, and allowing Javadoc/Scaladoc comments to be associated with the generated `BuildInfo` constants {link-pr}/2425[#2425] - -* Global Configuration via `~/.mill/ammonite/predefScript.sc` is no longer supported in this version. -If that breaks your workflow, please report and tell us your use case so we can provide sufficient replacement or support for your use case before Mill 0.11. - -* Overhaul of the documentation. -Created many executable example projects which are included in the documentation and run/tested on CI - -* Change cross module definitions to be traits instead of classes, for greater regularity and less builerplate at call sites. _This change requires slight modification to existing build scripts that define cross modules._ - -_For details refer to -{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] -and the {link-compare}/{prev-version}\...{version}[list of commits]._ - -[#0-11-0-M7] -=== 0.11.0-M7 - 2023-03-30 -:version: 0.11.0-M7 -:milestone-name: 0.11.0-M7 -:milestone: 78 -:prev-version: 0.11.0-M6 - -*This release is binary incompatible to {prev-version}.* - -_Changes since {prev-version}:_ - -* Introduced automatic `PathRef` validation for cached targets; default-enabled it for `CoursierModule.resolveDeps` and various `resolvedIvyDeps` targets -* `bsp`: Update Protocol version to 2.1.0-M4 -* `bsp`: Support new `mainClasses` field in run and test environments -* `bsp`: Fixed handling of Mill plugins and other improvements -* `scalanativelib`: new `nativeDump` setting in `ScalaNativeModule` -* `contrib.twirllib`: Use newer scala-parser-combinators version when used with Scala 3 -* `contrib.scalapblib`: Added new flag to search for proto files in dependencies -* Various refactorings to improve binary compatibility -* Updated dependencies: Ammonite 3.0.0-M0-5 coursier 2.1.0, scala native tools 0.4.12, semanticdb 4.7.6, trees 4.7.6, upickle 3.0.0 -* DX improvements - -_For details refer to -{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] -and the {link-compare}/{prev-version}\...{version}[list of commits]._ - -[#0-11-0-M6] -=== 0.11.0-M6 - 2023-03-09 -:version: 0.11.0-M6 -:milestone-name: 0.11.0-M6 -:milestone: 77 -:prev-version: 0.11.0-M5 - -*This release is binary incompatible to {prev-version}.* - -_Changes since {prev-version}:_ - -* `main`: Re-added missing `--color` and `predef` cli arguments. - -_For details refer to -{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] -and the {link-compare}/{prev-version}\...{version}[list of commits]._ - -[#0-11-0-M5] -=== 0.11.0-M5 - 2023-03-09 -:version: 0.11.0-M5 -:milestone-name: 0.11.0-M5 -:milestone: 76 -:prev-version: 0.11.0-M4 - -*This release is binary incompatible to {prev-version}.* - -_Changes since {prev-version}:_ - -* `Cross` is no longer adding the cross parameters to the `millSourcePath`. -+ -_You should review your cross modules setups to avoid build issues like incorrect source paths or missing files. ``CrossScalaModule`` is not affected by this change._ -* API refactorings: `PathRef`, moved `JarManifest` to `mill.main` -* No longer inherit the Ammonite CLI config -* `scalalib`: Fixed loosing customized `mapDependencies` when `ScalaModule` get mixed in after -* `scalalib`: New `TestModule.Weaver` -* `scalajslib`: New `JsEnvConfig.Selenium` -* `testrunner`: Fixed concurrency issue with test event reporting -* Updated dependencies: ammonite 3.0.0-M0-3, coursier 2.1.0-RC6, jarajar-abrams-core 1.8.2, lambdatest 0.8.0, log4j-core 2.20.0, os-lib 0.9.1, scoverage 2.0.8, semanticdb-scalac 4.7.5, trees 4.7.5 -* Documentation updates - -_For details refer to -{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] -and the {link-compare}/{prev-version}\...{version}[list of commits]._ - -[#0-11-0-M4] -=== 0.11.0-M4 - 2023-02-10 -:version: 0.11.0-M4 -:milestone-name: 0.11.0-M4 -:milestone: 74 -:prev-version: 0.11.0-M3 - -*This release is binary incompatible to {prev-version}.* - -_Changes since {prev-version}:_ - -* `scalalib`: New configuration target `zincReportCachedProblems` which, when `true`, enables reporting of all found problems, even for files which were not re-compiled -* `scalalib`: Improved SemanticDB support for Java and Scala -* `scalalib`: Mitigate another coursier download issue -* `scalajslib`: Fetch more tooling dependencies in `prepareOffline` -* `scalanativelib`: Fetch more tooling dependencies in `prepareOffline` -* `scalanativelib`: Updated tools to version 0.4.10 -* `bsp`: Improved support for the `mill-build` module which should improve the editing experience for `build.sc` and other build files -* Cleanups and internal improvements -* Updated dependencies: Ammonite 3.0.0-M0-1, junixsocket 2.6.2, semanticdb-java 0.8.13, upickle 3.0.0-M2 - -_For details refer to -{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] -and the {link-compare}/{prev-version}\...{version}[list of commits]._ - -[#0-11-0-M3] -=== 0.11.0-M3 - 2023-01-23 -:version: 0.11.0-M3 -:milestone-name: 0.11.0-M3 -:milestone: 73 -:prev-version: 0.11.0-M2 - -*This release is binary incompatible to {prev-version}.* - -_Changes since {prev-version}:_ - -* Slightly changed the `out/` folder layout for overridden and private tasks. -Instead of `foo.overridden` we now use a `foo.super` path to hold the metadata and scratch files. -* Fixed the caching for private targets with same name but defined in different super traits. -* Fixed non-functional `clean` command when used with arguments denoting modules. -* `scalalib`: Fixed `GenIdea` issues on Windows, when the build uses plugins or additional libraries. -* `scalajslib`: `ScalaJSModule.ScalaJSTests` now extends `ScalaModule.ScalaTests` which improves consistency, better default values and compatibility with other modules like `ScoverageModule`. -* `scalanativelib`: `ScalaNativeModule.ScalaNativeTests` now extends `ScalaModule.ScalaTests` which improves consistency, better default values and compatibility with other modules. -* `contrib.gitlab`: Improved error handling for token lookup and documentation. -* Updated dependencies: coursier 2.1.0-RC5, jna 5.13.0, semanticdb-scala 4.7.3, trees 4.7.3 -* Documentation improvements - -_For details refer to -{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] -and the {link-compare}/{prev-version}\...{version}[list of commits]._ - -[#0-11-0-M2] -=== 0.11.0-M2 - 2023-01-13 -:version: 0.11.0-M2 -:milestone-name: 0.11.0-M2 -:milestone: 72 -:prev-version: 0.11.0-M1 - -*This release is binary incompatible to {prev-version}.* - -_Changes since {prev-version}:_ - -* Splitted BSP module into `mill.bsp` and `mill.bsp.worker` and removed various dependencies (guava, bsp4j, xtends, lsp4j, ...) from Mill API -* `scalalib`: Added support to generate semanticdb data for Java source files -* `scalajslib`: Added support for `scalaJSOutputPattern` -* `scalajslib`: Added suport for `scalaJSSourceMap` -* `scalajslib`: Dropped support for Scala.js 0.6 -* Updated dependencies: ammonite 2.5.6, coursier 2.1.0-RC4, semanticdb 4.7.1, requests 0.8.0, scalafmt 3.6.1, trees 4.7.1, upickle 3.0.0-M1, utest 0.8.1 -* Various internal cleanups and improvements -* Documentation improvements - -_For details refer to -{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] -and the {link-compare}/{prev-version}\...{version}[list of commits]._ - -[#0-11-0-M1] -=== 0.11.0-M1 - 2022-12-17 -:version: 0.11.0-M1 -:prev-version: 0.10.10 -:milestone: 70 -:milestone-name: 0.11.0-M1 - -*This release is binary incompatible to {prev-version}.* - -_Changes since {prev-version}:_ - -* Greatly improved dependency resolution between modules, making it possible to mix Java and Scala modules -* `main`: Restrict `Cross` parameter to be of type `Module` -* `scalalib`: Performance improvements in Zinc worker module -* `scalalib`: Resources are no longer added to `compileClasspath`. -* `scalalib`: Added new `compileResources` which will end up in `compileClasspath` -* `scalalib`: Consolidated artifact and platform suffix handling -* `scalajslib` : Performance improvements in worker module -* `scalanativelib` : Performance improvements in worker module -* Updated dependencies: coursier 2.1.0-RC3, os-lib 0.9, scala 2.12.17, trees 4.7.0 -* Removed lots of deprecated API -* Various internal cleanups and improvements - -_For details refer to -{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] -and the {link-compare}/{prev-version}\...{version}[list of commits]._ - -[#0-10-15] -=== 0.10.15 - 2024-01-07 -:version: 0.10.15 -:milestone-name: 0.10.15 -:milestone: 92 -:prev-version: 0.10.13 - -_Changes since {prev-version}:_ - -* Make `semanticDbEnablePluginScalacOptions` protected and thus accessible for downstream use and customization - -_For details refer to -{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] -and the {link-compare}/{prev-version}\...{version}[list of commits]._ - - -[#0-10-13] -=== 0.10.13 - 2023-11-12 -:version: 0.10.13 -:milestone-name: 0.10.13 -:milestone: 81 -:prev-version: 0.10.12 - -_Changes since {prev-version}:_ - -This version especially aids the transition from Mill 0.10 to Mill 0.11. - -* Backport of Java 20 compatibility -* Deprecated `mill.define.SelectMode.Single` -* Backport of `mill.eval.Evaluator.evalOrThrow` -* Deprecated all inner `Tests` traits of modules derived from `JavaModule` and provide type aliases to use their successors -* Dependency updates: Ammonite 2.5.11, Coursier 2.1.7, jarjar-abrams 1.9.0, Junixxocket 2.8.2, Play 2.8.21, Scalameta Trees 4.8.12, Scala Native 0.4.16, Scoverage 2.0.11, Zinc 1.9.5 - -_For details refer to -{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] -and the {link-compare}/{prev-version}\...{version}[list of commits]._ - - -[#0-10-12] -=== 0.10.12 - 2023-03-20 -:version: 0.10.12 -:milestone-name: 0.10.12 -:milestone: 75 -:prev-version: 0.10.11 - -_Changes since {prev-version}:_ - -* `scalalib`: Mitigate another coursier download issue (backported from 0.11.0-M4) -* `testrunner`: Fixed a concurrency issue with test event reporting (backported from 0.11.0-M5) -* `scalajslib`: Deprecated `fastOpt` and `fullOpt` -* Updated dependencies: coursier 2.1.0, jarjar-abrams 1.8.2, jna 5.13.0, junixsocket 2.6.2, log4j-core 2.20.0, scalafmt-dynamic 3.6.1, trees 4.7.6 - -_For details refer to -{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] -and the {link-compare}/{prev-version}\...{version}[list of commits]._ - - -[#0-10-11] -=== 0.10.11 - 2023-01-24 -:version: 0.10.11 -:milestone-name: 0.10.11 -:milestone: 71 -:prev-version: 0.10.10 - -_Changes since {prev-version}:_ - -* Fixed non-functional `clean` command when used with arguments denoting modules. -* `scalalib`: Fixed `GenIdea` issues on Windows, when the build uses plugins or additional libraries. -* `scalajslib`: Performance improvements in worker module -* `scalajslib`: Pass more settings from `ScalaJSModule` to its `Tests` -+ -_If you have issues after the update (like `org.scalajs.jsenv.UnsupportedInputException`, https://github.com/com-lihaoyi/mill/issues/2300), check your settings in the test modules for consistency._ -* Some internal improvements backported from `0.11.0-M3` - -_For details refer to -{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] -and the {link-compare}/{prev-version}\...{version}[list of commits]._ - - -[#0-10-10] -=== 0.10.10 - 2022-12-06 -:version: 0.10.10 -:prev-version: 0.10.9 -:milestone: 69 -:milestone-name: 0.10.10 - -After this release, the `main` branch is open for development of the next major version of Mill, which is probably `0.11`. -Further maintenance work will happen in the `0.10.x` branch. - -_Changes since {prev-version}:_ - -* Lots of documentation improvements, additions and restructurings -* `core`: Fixed some rare issues with reading the `.mill-jvm-opts` file -* `core`: We made slight adaptions to the `T.dest` location of target defined in included files, to fix potential colliding cache locations -* `scalalib`: JAR archives created by Mill now by default contain directory entries -* `scalalib`: Updated zinc to 1.8.0 -* `scalajslib`: Added support for more `JsEnv` providers -+ -_If you get some issues (like `connect ECONNREFUSED`, https://github.com/com-lihaoyi/mill/issues/2204) after the update, review your settings for `JsEnv` providers._ -* `scalanativelib`: Support for incremental compilation since Scala Native 0.4.9 -* `contrib.testng`: The TestNG library is no longer provided transitively; you need to provide it explicitly -* `contrib.bloop`: Fixed re-generation of bloop config dir; previously, it could happen, that there where no config files at all -* `BSP`: implement `buildTarget/OutputPaths` request -* Various version bumps and internal improvements - -_For details refer to -{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] -and the {link-compare}/{prev-version}\...{version}[list of commits]._ - - -[#0-10-9] -=== 0.10.9 - 2022-11-10 -:version: 0.10.9 -:prev-version: 0.10.8 -:milestone: 68 -:milestone-name: 0.10.9 - -_Changes since {prev-version}:_ - -* **Hardened Maven and Ivy artifact handling to prevent path-traversal attacks** (see https://github.com/advisories/GHSA-wv7w-rj2x-556x[CVE-2022-37866]), also updated coursier dependency to a non-vulnerable version -* Decoupled `mill-moduledefs` module into a {link-mill-moduledefs}[separate project], to better suite compiler plugin packaging and improve support for various Scala versions -* Applied more workarounds to coursier concurrency issues to make parallel builds more robust -* Added support for newer Scala versions in `GenIdea` (2.2 and 2.3) -* Fixed an issue where `PublishModule` dropped module dependencies when mixed-in after other trait which overrode `moduleDeps` -* new `JMH` contrib plugin -* Lots of internal improvements and dependency updates - -_For details refer to -{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] -and the {link-compare}/{prev-version}\...{version}[list of commits]._ - - -[#0-10-8] -=== 0.10.8 - 2022-10-10 -:version: 0.10.8 -:prev-version: 0.10.7 -:milestone: 67 -:milestone-name: 0.10.8 - -_Changes since {prev-version}:_ - -* Improvements for better Scala 3.2 support -* Fixed non-working default commands in cross modules -* `CoursierModule`: mitigate more download failure situations (e.g. checksum failures) -* `PublishModule`: properly show `gpg` output in server mode -* `BSP`: Better compiler message handling (`logMessage` instead of `showMessage`) and support for diagnostic code -* `ScoverageModule`: Support for Scoverage 2.x -* New contrib module `GitlabPublishModule` -* Various internal improvements and version bumps -* Documentation improvements - -_For details refer to -{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] -and the {link-compare}/{prev-version}\...{version}[list of commits]._ - - -[#0-10-7] -=== 0.10.7 - 2022-08-24 -:version: 0.10.7 -:prev-version: 0.10.6 -:milestone: 66 -:milestone-name: 0.10.7 - -_Changes since {prev-version}:_ - -* Don't print unwanted debug messages from zinc - -_For details refer to -{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] -and the {link-compare}/{prev-version}\...{version}[list of commits]._ - - -[#0-10-6] -=== 0.10.6 - 2022-08-24 -:version: 0.10.6 -:prev-version: 0.10.5 -:milestone: 64 -:milestone-name: 0.10.6 - -_Changes since {prev-version}:_ - -* ``PathRef``s sigs are now more reproducible and independent of the used filesystem -* `JavaModule` can now use a non-local Java Compiler to support all options -* `Logger`: new `debugEnabled` to detect whether debug logging is enabled -* New `testkit` module, to use `UnitTester` in external projects -* Fixed reading of `.mill-jvm-opts` in server mode -* BSP: Automatic SemanticDB enablement to improve Metals support -* `mill.twirllib.TwirlModule` - new mandatory target `twirlScalaVersion` to configure the Scala version used by Twirl compiler, and support for newer versions -* Lots of documentation updates and additions -* Upgraded to Zinc 1.7.1 and various other dependency updates - -_For details refer to -{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] -and the {link-compare}/{prev-version}\...{version}[list of commits]._ - - -[#0-10-5] -=== 0.10.5 - 2022-07-01 -:version: 0.10.5 -:prev-version: 0.10.4 -:milestone: 63 -:milestone-name: 0.10.5 - -_Changes since {prev-version}:_ - -* New `init` command, to create new Mill projects from Gitter8 (g8) templates -* `PathRef` now gracefully ignores socket files. -This also fixes an annoying issue when Mill was previously ran in a source directory. -* Fixed a bug with using `mill --repl` without any further arguments, which was introduced in Mill 0.10.2 and prevented proper no-server mode -* Fixed the `visualize` command which wasn't working on some newer JREs -* Improved Mill server support for Windows 11 and some Windows Server versions - -* `ScalaModule` / `ZincWorkerModule`: Fixed incremental compilation issue with JRE 17 (and probably others) -* `TestModule` now better supports JUnit5 test suites -* `ScalaJsModule`: internal improvements to the stability of the Scala.js linker -* `ScalaNativeModule`: Added support for `nativeEmbedResources` -* `BSP`: improved handling of the `mill-build` module when the BSP client is IntelliJ IDEA - -* Documentation updates and link fixes -* Various dependency updates - -_For details refer to -{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] -and the {link-compare}/{prev-version}\...{version}[list of commits]._ - - -[#0-10-4] -=== 0.10.4 - 2022-05-06 -:version: 0.10.4 -:prev-version: 0.10.3 -:milestone: 62 -:milestone-name: 0.10.4 - -_Changes since {prev-version}:_ - -* Switched from ipcsocket to junixsocket library to enhance the robustness of Mill client server communication. -This should greatly improve the user experience on Windows. -* Internal improvements and better support of GraalVM -* The Mill Documentation site has now built-in search functionality - -* `ScalaJsModule`: New targets `fastLinkJS` and `fullLinkJS` and deprecated `fastOpt` and `fullOpt` -* `ScalaJsModule`: Support for `ModuleSplitStyle` -* `BSP`: Updated to protocol version 2.1.0-M1, added support for test framework names and support for the JVM extension -* `GenIdea`: More consistent ordering of libraries and dependent modules and support for Scala 3.1 language level -* `Bloop`: Added support for runtime dependencies - -* Enhanced test suite to cover Mill client server scenarios -* Various dependency updates - -_For details refer to -{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] -and the {link-compare}/{prev-version}\...{version}[list of commits]._ - - -[#0-10-3] -=== 0.10.3 - 2022-04-11 -:version: 0.10.3 -:prev-version: 0.10.2 -:milestone: 61 -:milestone-name: 0.10.3 - -_Changes since {prev-version}:_ - -* Fixed `import $file` for files with hyphens and other symbols in its name -* Fixed an issues with truncated output just before Mill finishes - -* Mill commands now support arguments of type `Task[T]`, which can improve writing re-usable commands, especially, they can be called from other tasks more easily - -* `JavaModule`: Improved correctness and performance of `compileClasspath` and `bspCompileClasspath` targets. -This fixes an issue with BSP for large projects. -Also, compile-time dependencies no longer sneak into the classpath transitively. -* `JavaModule`: Added `docJarUseArgsFile` target and fix issue with Windows command length restrictions in `docJar` - -* `BSP` and `Bloop`: Better detect foreign modules - -* Various internal API refinements and improvements -* Reorganized integration test suite and build setup - -_For details refer to -{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] -and the {link-compare}/{prev-version}\...{version}[list of commits]._ - - -[#0-10-2] -=== 0.10.2 - 2022-03-18 -:version: 0.10.2 -:prev-version: 0.10.1 -:milestone: 60 -:milestone-name: 0.10.2 - -_Changes since {prev-version}:_ - -* Mill workers can now implement `AutoCloseable` to properly free resources -* `ScalaModule`: Fixed `repl` start -* `CoursierModule`: Fixed concurrent download issues with coursier (we detect and retry) -* `MainModule`: Fixed potential match error with `show` and `showNamed` -* Restructured contrib module documentation -* Internal improvements - -_For details refer to -{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] -and the {link-compare}/{prev-version}\...{version}[list of commits]._ - - -[#0-10-1] -=== 0.10.1 - 2022-03-08 -:version: 0.10.1 -:prev-version: 0.10.0 -:milestone: 59 -:milestone-name: 0.10.1 - -_Changes since {prev-version}:_ - -* `MillClienMain` can now act as universal main to start mill with or without a server process -* Improved `show` command that always returns valid JSON -* Added `showNamed` command that includes the task names in the output -* Implemented more granular cache invalidation which keeps more caches intact when you split your build setup over multiple `.sc` files with `import $file`. -* The local `.mill-jvm-opts` file is no longer restricted to `-X` options - -* `CoursierModule`: Added `coursierCacheCustomizer` to support a `FileCache` customizers -* `JavaModule`: the `docJar` target no longer includes hidden files -* `ScalaModule`: Updated to latest zinc version -* `ScalaModule`: Reworked scalac plugins handling for the better and to support Scala 3 -* `ScalaNativeModule`: fixed `Dep.withDottyCompat` behavior -* `ScalaJSModule`: support for linking multiple modules -* `ScalafmtModule`: Support for newer Scalafmt versions - -* Tool chain: Update to Mill 0.10.0 -* Tool chain: we no longer create files outside the mill project directory (e.g. `~/mill-release` is now under `target/mill-release`) -* Various dependency updates -* Lots of internal improvements - -_For details refer to -{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] -and the {link-compare}/{prev-version}\...{version}[list of commits]._ - - -[#0-10-0] -=== 0.10.0 - 2022-01-14 -:version: 0.10.0 -:prev-version: 0.10.0-M5 -:milestone: 57 -:milestone-name: 0.10.0 - -_Changes since {prev-version}:_ - -* Changed structure of `out` directory, `out/foo/dest` is now `out/foo.dest` -* Fixed issues with loading of predef scripts -* `--watch` now supports manual re-runs by pressing enter -* Improved subprocess handling -* Published poms can now contain properties and `versionScheme` information -* Improved Scala.js support, including more target configuration options and support for Node 17 -* Improved Scala Native for version > 0.4.2 and support Scala 3 -* Internal improvements, fixes and dependency version updates - -_For details refer to -{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] -and the {link-compare}/{prev-version}\...{version}[list of commits]._ - - -[#0-10-0-M5] -=== 0.10.0-M5 - 2021-12-18 -:version: main -:prev-version: 0.10.0-M4 -:milestone: 55 -:milestone-name: 0.10.0-M5 - -*This release breaks binary compatibility for external plugins.* - -_Changes since {prev-version}:_ - -* Fixed Log4Shell security vulnerability in `ZincWorkerModule` (CVE-2021-44228) -* Factored out the testrunner into a new module, which also fixes some potential classloader issues when executing tests (e.g. with JNA) -* Removed the limitation of max 22 inputs for tasks -* `--watched` commands can now re-run when pressing enter-key -* task and arguments of commands can now have hyphens in their name -* Reworked and decluttered the out-folder structure -* `prepareOffline` now has a `all` flag to control if all or only some dependency should be prefetched -* Made caching more effective for targets overridden in stackable-traits -* Further BSP improvements, esp. for Metals and Scala 3 -* Lots of other internal improvements and fixes -* Various dependency updates - -_For details refer to -{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] -and the {link-compare}/{prev-version}\...{version}[list of commits]._ - - -[#0-10-0-M4] -=== 0.10.0-M4 - 2021-11-08 -:version: 0.10.0-M4 -:prev-version: 0.10.0-M3 -:milestone: 54 -:milestone-name: 0.10.0-M4 - -_Changes since {prev-version}:_ - -* BSP support rework and overhaul of built-in BSP server -* GenIdea: failures when inspecting and resolving the build are not properly reported -* Coursier: we now implemented a workaround to tackle concurrent downloads issues -* New `+` separator to provide multiple targets (with parameters) via cmdline -* New `--import` cmdline option to run ad-hoc plugins without editing of `build.sc` -* New `T.ctx().workspace` API to access the project root directory -* Various internal improvements and bug fixes -* Various refactorings and cleanups - -_For details refer to -{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] -and the {link-compare}/{prev-version}\...{version}[list of commits]._ - - -[#0-1-0-M3] -=== 0.10.0-M3 - 2021-09-29 -:version: 0.10.0-M3 -:prev-version: 0.10.0-M2 -:milestone: 53 -:milestone-name: 0.10.0-M3 - -*This is a milestone release. -This release breaks binary compatibility for external plugins build for mill 0.9.x. -The API is suspected to change before a 0.10.0 releae.* - -_Changes since {prev-version}:_ - -* `ScalaModule with PublishModule`: the `scala-library` artifact is now always part of the dependencies in published `pom.xml`s and `ivy.xml`s -* New `JavaModule.mandatoryIvyDeps` target to provide essential dependencies like scala-library without forcing the user to call `super.ivyDeps` -* `ScalaJSModule.scalaLibraryIvyDeps` no longer contains the scala-js-library, but only the scala-library; if you need that, use `ScalaJSModule.mandatoryIvyDeps` instead. -* `import $ivy` support `$MILL_BIN_PLATFORM` variable and a new sort notations for external plugins -* We fixed and enabled lots of tests to run on Windows -* Some generic targets like `plan` or `path` now also return their output -* `GenIdea`: improved support for Scala 3 projects * - -_For details refer to -{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] -and the {link-compare}/{prev-version}\...{version}[list of commits]._ - - -[#0-10-0-M2] -=== 0.10.0-M2 - 2021-09-17 -:version: 0.10.0-M2 -:prev-version: 0.9.9 -:milestone: 51 -:milestone-name: 0.10.0-M2 - -*This is a early milestone release. -This release breaks binary compatibility for external plugins build for mill 0.9.x. -The API is suspected to change before a 0.10.0 releae.* - -_Changes since {prev-version}:_ - -* Removed deprecated API -* `ScalaModule`: added `mandatoryScalacOptions` to avoid the common issue that users forget to include mandatory options when defining their own. -* Renamed `toolsClasspath` targets found in various modules to avoid hard to resolve clashes when mixing traits -* Fixed and improved our test suite on Windows -* Various fixes and improvements -* Various dependency updates - -_For details refer to -{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] -and the {link-compare}/{prev-version}\...{version}[list of commits]._ - - -[#0-9-12] -=== 0.9.12 - 2022-01-07 -:version: 0.9.12 -:prev-version: 0.9.11 -:milestone: 58 -:milestone-name: 0.9.12 - -* fixed parsing of command parameters in `show` command -* zinc worker: Updated log4j2 to 2.17.1 - -_For details refer to -{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] -and the {link-compare}/{prev-version}\...{version}[list of commits]._ - - -[#0-9-11] -=== 0.9.11 - 2021-12-15 -:version: 0.9.11 -:prev-version: 0.9.10 -:milestone: 56 -:milestone-name: 0.9.11 - -* zinc worker: Updated log4j2 to 2.16.0 to fix Log4Shell (CVE-2021-44228) vulnerability - -_For details refer to -{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] -and the {link-compare}/{prev-version}\...{version}[list of commits]._ - - -[#0-9-10] -=== 0.9.10 - 2021-11-13 -:version: 0.9.10 -:prev-version: 0.9.9 -:milestone: 52 -:milestone-name: 0.9.10 - -* Some feature backports from mill 0.10 -* New `+` separator to provide multiple targets (with parameters) via cmdline -* New `--import` cmdline option to run ad-hoc plugins without editing of `build.sc` -* `import $ivy` support `$MILL_BIN_PLATFORM` variable and a new sort notations for external plugins - -_For details refer to -{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] -and the {link-compare}/{prev-version}\...{version}[list of commits]._ - - -[#0-9-9] -=== 0.9.9 - 2021-07-15 -:version: 0.9.9 -:prev-version: 0.9.8 -:milestone: 50 -:milestone-name: 0.9.9 - -_Changes since {prev-version}:_ - -* BSP: Fixed/improved source item for root project -* Bloop: Prevent compilation during bloop config generation -* GenIdea: Fix content path of root project (mill-build) -* Various version bumps - -_For details refer to -{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] -and the {link-compare}/{prev-version}\...{version}[list of commits]._ - - -[#0-9-8] -=== 0.9.8 - 2021-05-27 -:version: 0.9.8 -:prev-version: 0.9.7 -:milestone: 49 -:milestone-name: 0.9.8 - -_Changes since {prev-version}:_ - -* Fixed some potential binary incompatibilities with external plugins (builds against older os-lib versions) -* Fixed location and configuration of mills home path (used for caching of build scripts) -* Properly close jar resources - should fix issues in `assembly`, esp. on Windows where open resources are locked -* BSP: Repaired mills BSP server -* playlib: Fixed issues with the play-contrib module and added support for Play 2.8 -* GenIdea: changed dir for generated mill modules to `.idea/mill_modules` -* Various version bumps, including Scala 2.13.5 - -_For details refer to -{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] -and the {link-compare}/{prev-version}\...{version}[list of commits]._ - - -[#0-9-7] -=== 0.9.7 - 2021-05-14 -:version: 0.9.7 -:prev-version: 0.9.6 -:milestone: 48 -:milestone-name: 0.9.7 - -_Changes since {prev-version}:_ - -* `ScalaModule`: Support for Scala 3 -* `CoursierModule`: Support customized dependency resolution (needed to work with ScalaFX) -* `TestModule`: Added new `testFramework` target and only support one test framework. -Deprecated `testFrameworks` targets. -* `TestModule`: Added new convenience traits to configure popular test frameworks, e.g. `TestModule.Junit4`, `TestModule.ScalaTest`, `TestModule.Utest` and many more -* `Bloop`: Added support for foreign modules -* Better support for Windows environments -* Various internal improvements, cleanups, and deprecations -* Various dependencies updates -* Removed tut contrib module because of unmaintained/archived upstream dependency - -_For details refer to -{link-milestone}/{milestone}?closed=1[milestone {milestone-name}] -and the {link-compare}/{prev-version}\...{version}[list of commits]._ - - -[#0-9-6] -=== 0.9.6 - 2021-04-03 - -_The mill project home and repository has been moved to https://github.com/com-lihaoyi/mill._ - -* `repl` and `console` targets now support `forkArgs` and `forkEnv` -* Support for Scala 3 release candidates and new Scaladoc 3 tool -* Support for Scala.js on Scala 3 -* Scala Native improvements -* Test runner now uses an args file to support running tests on Windows -* GenIdea: better supports source jars, full config contributions and provided/runtime dependencies -* Various dependency updates -* Documentation site reworked to support multiple release versions -* Improved CI setup to better test mill on Windows - -_For details refer to -{link-milestone}/47?closed=1[milestone 0.9.6] -and the {link-compare}/0.9.5\...0.9.6[list of commits]._ - - -[#0-9-5] -=== 0.9.5 - 2021-01-26 - -* Updated zinc to 1.4.4 -* Support for Scala Native 0.4.0 -* Support for Scala.js ESModule (including Bloop support) -* Inner `Tests` traits in modules like `JavaModule`, `ScalaModule` and others now have unique names (`JavaModuleTests`, `ScalaTests`, etc), to allow for easier customization -* Various version bumps of dependencies -* CI now runs all tests, it did miss some before - -_For details refer to {link-milestone}/46?closed=1[milestone 0.9.5] -and the link:{link-compare}/0.9.4\...0.9.5[list of commits]._ - - -[#0-9-4] -=== 0.9.4 - 2020-12-21 - -* Implemented more BSP protocol commands and fixed some glitches with IntelliJ -* Stabilized CI builds -* Various fixes and improvements -* Various version bumps - -_For details refer to {link-milestone}/45?closed=1[milestone 0.9.4] -and the {link-compare}/0.9.3\...0.9.4[list of commits]._ - - -[#0-9-3] -=== 0.9.3 - 2020-11-26 - -_(We also tagged `0.9.0`, `0.9.1`, and `0.9.2`, but due to release difficulties, we ask you not to use them.)_ - -* Replace the built in `@main` method functionality with the -https://github.com/lihaoyi/mainargs[MainArgs] library -* Note that the MainArgs replacement has some backwards incompatibilities: Short flags like `-i` can no longer be passed via `--i`, the `@doc("")` is now `@arg(doc = "")`, `Seq[T]` parameters are now passed via repeated `--foo` -flags rather than comma-separated. -* Add the ability to relocate/shade files in `.assembly` {link-pr}/947[#947] -* Twirl enhancements {link-pr}/952[#952] -* Add `scalacPluginClasspath` to Tests {link-pr}/956[#956] -* Add `toMap` methods to `BuildInfo` {link-pr}/958[#958] -* Bump coursier to version 2.0.0 {link-pr}/973[#973] -* Make BSP support a first-class citizen {link-pr}/969[#969] -* Omit the suffix in `artifactName` in cross modules {link-pr}/953[#953] -* Allow test classes with constructor parameters {link-pr}/982[#982] -* Proguard contrib module {link-pr}/972[#972] -* Support Scala.js useECMAScript2015 option and ModuleKind.ESModule -{link-pr}/1004[#1004] -* Support Scala.js incremental linking -{link-pr}/1007[#1007] - -_For details refer to {link-milestone}/44?closed=1[milestone 0.9.3] -and the {link-compare}/0.8.0\...0.9.3[list of commits]._ - - -[#0-8-0] -=== 0.8.0 - 2020-07-20 - -* Bump external dependencies: uPickle 1.2.0, Ammonite 2.2.0, etc. -* Use default coursier repos (#931) -* Work around relative paths issue on windows (#936) -* Support Scala.js versions >1.0.0 (#934) - -_For details refer to {link-milestone}/43?closed=1[milestone 0.8.0] -and the {link-compare}/0.7.4\...0.8.0[list of commits]._ - - -[#0-7-4] -=== 0.7.4 - 2020-07-03 - -* new command line options `--repl` and `--no-server`, deprecated `--interactive` option -* Support for Scala.js 1.1 -* Fixed missing source maps for Scala.js 1.0 and 1.1 -* Improved BSP contrib module - -_For details refer to {link-milestone}/42?closed=1[milestone 0.7.4] -and the {link-compare}/0.7.3\...0.7.4[list of commits]._ - - -[#0-7-3] -=== 0.7.3 - -_For details refer to {link-milestone}/41?closed=1[milestone 0.7.3] -and the {link-compare}/0.7.2\...0.7.3[list of commits]._ - - -[#0-7-2] -=== 0.7.2 - 2020-05-19 - - -_For details refer to {link-milestone}/40?closed=1[milestone 0.7.2] -and the {link-compare}/0.7.1\...0.7.2[list of commits]._ - - -[#0-7-1] -=== 0.7.1 - 2020-05-17 - -_For details refer to {link-milestone}/39?closed=1[milestone 0.7.1] -and the {link-compare}/0.7.0\...0.7.1[list of commits]._ - - -[#0-7-0] -=== 0.7.0 - 2020-05-15 - -* Greatly improved parallel builds via `-j <n>`/`--jobs <n>`, with better scheduling and utilization of multiple cores -* `build.sc` files now uses Scala 2.13.2 -* Avoid duplicate target resolution with `mill resolve __` -* Add ability to pass GPG arguments to publish via `--gpgArgs` -* `-w`/`--watch` now works for `Task.Source` targets - -_For details refer to {link-milestone}/37?closed=1[milestone 0.7.0] -and the {link-compare}/0.6.3\...0.7.0[list of commits]._ - - -[#0-6-3] -=== 0.6.3 - 2020-05-10 - -* Finished incomplete support to publish extra artifacts to IVY repositories (`publishLocal`) -* Improved Sonatype uploads -* `GenIdea`: improvements for shared source dirs and skipped modules -* `ScoverageModule`: Some refactorings to allow better customization -* More robust classpath handling under Windows - -_For details refer to {link-milestone}/38?closed=1[milestone 0.6.3] -and the {link-compare}/0.6.2\...0.6.3[list of commits]._ - - -[#0-6-2] -=== 0.6.2 - 2020-04-22 - -* Mill can now execute targets in parallel. -This is experimental and need to be enabled with `--jobs <n>` option. -* `PublishModule`: new `publishM2Local` to publish into local Maven repositories -* `PublishModule`: enhanced `publishLocal` to specify to ivy repository location -* Windows: Fixed windows launcher and more robust classpath handling -* `ScalaNativeModule`: improved compiling and linking support -* new contrib module `VersionFile` -* `Dependency`: improved dependency update checker and expose results for programmatic use -* ǹew contrib module `Bintray` -* ǹew contrib module `Artifactory` -* fixed testCached support in various modules -* `GenIdea`: improvements, esp. related to source jars - -_For details refer to {link-milestone}/36?closed=1[milestone 0.6.2] -and the {link-compare}/0.6.1\...0.6.2[list of commits]._ - - -[#0-6-1] -=== 0.6.1 - 2020-02-24 - -* Bugfix: Mill now no longer leaks open files (version bump to uPickle 1.0.0) -* New `--version` option -* Added Support for Scala.js 1.0.0+ -* Added Support for Scala Native 0.4.0-M2 -* `JavaModule`: Enhanced `ivyDepsTree` to optionally include compile-time and runtime-time dependencies -* `JavaModule`: `allSourceFiles` no longer include Scala sources -* `JavaModule`: assembly supports configurable separator when merging resources -* `ScoverageModule`: respect `unmanagedClasspath`, added console reporter -* `ScalaPBModule`: added more configuration options -* Bloop: Fixed inconsistent working directory when executing tests via bloop (forces `-Duser.dir` when generating bloop config) - -_For details refer to {link-milestone}/35?closed=1[milestone 0.6.1] -and the {link-compare}/0.6.0\...0.6.1[list of commits]._ - - -[#0-6-0] -=== 0.6.0 - 2020-01-20 - -* Support for METALS 0.8.0 in VSCode - -_For details refer to {link-milestone}/34?closed=1[milestone 0.6.0] -and the {link-compare}/0.5.9\...0.6.0[list of commits]._ - - -[#0-5-9] -=== 0.5.9 - 2020-01-14 - -* Bump library versions again -* Alias `T.ctx.*` functions to `T.*`: `T.dest`, `T.log`, etc. -* Bump Mill's client-connect-to-server timeout, to reduce flakiness when the server is taking a moment to start up - -_For details refer to the {link-compare}/0.5.7\...0.5.9[list of commits]._ - -*Version 0.5.8 has some binary compatibility issues in requests-scala/geny and should not be used.* - -=== 0.5.7 - 2019-12-28 - -* Bump library versions: Ammonite 2.0.1, uPickle 0.9.6, Scalatags 0.8.3, OS-Lib 0.6.2, Requests 0.4.7, Geny 0.4.2 - -_For details refer to {link-milestone}/33?closed=1[milestone 0.5.7] -and the {link-compare}/0.5.5\...0.5.7[list of commits]._ - -[#0-5-6] -[#0-5-5] -=== 0.5.5 / 0.5.6 - 2019-12-20 - -_(we skipped version 0.5.4 as we had some publishing issues)_ - -* Bump library versions: Ammonite 1.9.2, uPickle 0.9.0, Scalatags 0.8.2, OS-Lib 0.5.0, Requests 0.3.0, Geny 0.2.0, uTest 0.7.1 -* Fixed a long standing issue that output of sub-processes are only shown when `-i` option was used. -Now, you will always seen output of sub-process. -* Mill now properly restarts it's server after it's version has changed -* `PublishModule`: added ability to publish into non-staging repositories -* `ScalaPBModule`: added extra include path option - -_For details refer to {link-milestone}/32?closed=1[milestone 0.5.5] -and the {link-compare}/0.5.3\...0.5.5[list of commits]._ - -[#0-5-3] -=== 0.5.3 - 2019-12-07 - -* `GenIdea/idea`: improved support for generated sources and use/download sources in more cases -* ScalaJS: improvements and support for ScalaJS 0.6.29+ and 1.0.1.RC1 -* Introduced new `CoursierModule` to use dependency management independent from a compiler -* `ScoverageModule`: better handling of report directories -* `ScalaPBModule`: more configuration options -* various other fixes and improvements - -_For details refer to {link-milestone}/31?closed=1[milestone 0.5.3] -and the {link-compare}/0.5.2\...0.5.3[list of commits]._ - -[#0-5-2] -=== 0.5.2 - 2019-10-17 - -* `TestModule`: new `testCached`target, which only re-runs tests after relevant changes -* `TestModule.test`: fixed issue when stacktraces have no filename info -* `Dependency/updates`: fixed issue with reading stale dependencies -* `GenIdea/idea`: no longer shared output directories between mill and IntelliJ IDEA -* support for Dotty >= 0.18.1 -* Fixed backwards compatibility of mill wrapper script -* Mill now support the Build Server Protocol 2.0 (BSP) and can act as a build server -* bloop: removed semanticDB dependency -* Documentation updates - -_For details refer to {link-milestone}/30?closed=1[milestone 0.5.2] -and the {link-compare}/0.5.1\...0.5.2[list of commits]._ - -[#0-5-1] -=== 0.5.1 - 2019-09-05 - -* GenIdea: Bug fixes -* GenIdea: Support for module specific extensions (Facets) and additional config files -* Add ability to define JAR manifests -* Dotty support: Updates and support for binary compiler bridges -* Ivy: improved API to create optional dependendies -* Interpolate `$MILL_VERSION` in ivy imports -* Zinc: Fixed logger output -* Scoverage: Upgrade to Scoverage 1.4.0 -* Flyway: Upgrade to Flyway 6.0.1 -* Bloop: Updated semanticDB version to 4.2.2 -* Documentation updates -* Improved robustness in release/deployment process - -_For details refer to {link-milestone}/29?closed=1[milestone 0.5.1] -and the {link-compare}/0.5.0\...0.5.1[list of commits]._ - -[#0-5-0] -=== 0.5.0 - 2019-08-08 - -* Mill now supports a `./mill` -{link-current-doc-site}/#bootstrap-scripts-linuxos-x-only[bootstrap script], allowing a project to pin the version of Mill it requires, as well as letting contributors use `./mill ...` to begin development without needing to install Mill beforehand. - -* Support for a `.mill-version` file or `MILL_VERSION` environment variable for -{link-current-doc-site}/#overriding-mill-versions[Overriding Mill Versions] - -* Fix scoverage: inherit repositories from outer project {link-pr}/645[#645] - -[#0-4-2] -=== 0.4.2 - 2019-06-30 - -* Improvements to IntelliJ project generation {link-pr}/616[#616] - -* Allow configuration of Scala.js' JsEnv {link-pr}/628[#628] - -[#0-4-1] -=== 0.4.1 - 2019-06-13 - -* Fixes for scala native test suites without test frameworks {link-issue}/627[#627] - -* Fix publication of artifacts by increasing sonatype timeouts - -* Bug fixes for Scoverage integration {link-issue}/623[#623] - -[#0-4-0] -=== 0.4.0 - 2019-05-20 - -* Publish `compileIvyDeps` as provided scope ({link-issue}/535[535]) - -* Added contrib modules to integrate -{link-current-doc-site}/page/contrib-modules.html#bloop[Bloop], -{link-current-doc-site}/page/contrib-modules.html#flyway[Flyway], -{link-current-doc-site}/page/contrib-modules.html#play-framework[Play Framework], -{link-current-doc-site}/page/contrib-modules.html#scoverage[Scoverage] - -* Allow configuration of GPG key names when publishing ({link-pr}/530[530]) - -* Bump Ammonite version to 1.6.7, making -https://github.com/lihaoyi/requests-scala[Requests-Scala] available to use in your `build.sc` - -* Support for Scala 2.13.0-RC2 - -* ScalaFmt support now uses the version specified in `.scalafmt.conf` - -[#0-3-6] -=== 0.3.6 - 2019-01-17 - -* Started to splitting out mill.api from mill.core - -* Avoid unnecessary dependency downloading by providing fetches per cache policy - -* Added detailed dependency download progress to the progress ticker - -* Fixed internal code generator to support large projects - -* Zinc worker: compiler bridge can be either pre-compiled or on-demand-compiled - -* Zinc worker: configurable scala library/compiler jar discovery - -* Zinc worker: configurable compiler cache supporting parallelism - -* Version bumps: ammonite 1.6.0, scala 2.12.8, zinc 1.2.5 - -* Mill now by default fails fast, so in case a build tasks fails, it exits immediately - -* Added new `-k`/`--keep-going` commandline option to disable fail fast behaviour and continue build as long as possible in case of a failure - -[#0-3-5] -=== 0.3.5 - 2018-11-18 - -* Bump uPickle to 0.7.1 - -[#0-3-4] -=== 0.3.4 - 2018-11-06 - -* Mill is now bundled with https://github.com/lihaoyi/os-lib[OS-Lib], providing a simpler way of dealing with filesystem APIs and subprocesses - -[#0-3-3] -=== 0.3.3 - 2018-11-02 - -* Added new `debug` method to context logger, to log additional debug info into the task specific output dir (`out/<task>/log`) - -* Added `--debug` option to enable debug output to STDERR - -* Fix `ScalaModule#docJar` task when Scala minor versions differ {link-issue}/475[475] - -[#0-3-2] -=== 0.3.2 - 2018-10-19 - -* Automatically detect main class to make `ScalaModule#assembly` self-executable - -[#0-3-0] -=== 0.3.0 - 2018-10-19 - -* Bump Ammonite to 1.3.2, Fastparse to 2.0.4 - -* Sped up `ScalaModule#docJar` task by about 10x, greatly speeding up publishing - -* Add a flag `JavaModule#skipIdea` you can override to disable Intellij project generation {link-pr}/458[#458] - -* Allow sub-domains when publishing {link-pr}/441[#441] - -[#0-2-8] -=== 0.2.8 - 2018-09-21 - -* `mill inspect` now displays out the doc-comment documentation for a task. - -* Avoid shutdown hook failures in tests {link-pr}/422[#422] - -* Ignore unreadable output files rather than crashing {link-pr}/423[#423] - -* Don't compile hidden files {link-pr}/428[#428] - -[#0-2-7] -=== 0.2.7 - 2018-08-27 - -* Add `visualizePlan` command - -* Basic build-info plugin in `mill-contrib-buildinfo` - -* ScalaPB integration in `mill-contrib-scalapblib` - -* Fixes for Twirl support, now in `mill-contrib-twirllib` - -* Support for building Dotty projects -{link-pr}/397[#397] - -* Allow customization of `run`/`runBackground` working directory via -`forkWorkingDir` - -* Reduced executable size, improved incremental compilation in -{link-pr}/414[#414] - -[#0-2-6] -=== 0.2.6 - 2018-07-30 - -* Improve incremental compilation to work with transitive module dependencies - -* Speed up hot compilation performance by properly re-using classloaders - -* Speed up compilation time of `build.sc` files by removing duplicate macro generated routing code - -[#0-2-5] -=== 0.2.5 - 2018-07-22 - -* Add `.runBackground` and `.runMainBackground` commands, to run something in the background without waiting for it to return. -The process will keep running until it exits normally, or until the same `.runBackground` command is run a second time to spawn a new version of the process. -Can be used with `-w` for auto-reloading of long-running servers. - -* {link-current-doc-site}/page/common-project-layouts.html#scala-native-modules[Scala-Native support]. -Try it out! - -* Add `--disable-ticker` to reduce spam in CI - -* Fix propagation of `--color` flag - -[#0-2-4] -=== 0.2.4 - 2018-07-07 - -* Fix resolution of `scala-{library,compiler,reflect}` in case of conflict - -* Allow configuration of `JavaModule` and `ScalafmtModule` scala workers - -* Allow hyphens in module and task names - -* Fix publishing of ScalaJS modules to properly handle upstream ScalaJS dependencies - -[#0-2-3] -=== 0.2.3 - 2018-06-03 - -* Added the {link-current-doc-site}/#visualize[mill visualize] -command, making it easy to visualize the relationships between various tasks and modules in your Mill build. - -* Improve Intellij support ({link-pr}/351[351]): -better jump-to-definition for third-party libraries, no longer stomping over manual configuration, and better handling of `import $ivy` in your build file. - -* Support for un-signed publishing and cases where your GPG key has no passphrase ({link-pr}/346[346]) - -* Basic support for Twirl, Play Framework's templating language ({link-pr}/271[271]) - -* Better performance for streaming large amounts of stdout from Mill's daemon process. - -* Allow configuration of append/exclude rules in `ScalaModule#assembly` -({link-pr}/309[309]) - -[#0-2-2] -=== 0.2.2 - 2018-05-20 - -* Preserve caches when transitioning between `-i`/`--interactive` and the fast client/server mode ({link-issue}/329[329]) - -* Keep Mill daemon running if you Ctrl-C during `-w`/`--watch` mode ({link-issue}/327[327]) - -* Allow `mill version` to run without a build file ({link-issue}/328[328]) - -* Make `docJar` (and thus publishing) robust against scratch files in the source directories ({link-issue}/334[334]) and work with Scala compiler options ({link-issue}/336[336]) - -* Allow passing Ammonite command-line options to the `foo.repl` command ({link-pr}/333[333]) - -* Add `mill clean` ({link-pr}/315[315]) to easily delete the Mill build caches for specific targets - -* Improve IntelliJ integration of `MavenModule`s/`SbtModule`s' test folders ({link-pr}/298[298]) - -* Avoid showing useless stack traces when `foo.test` result-reporting fails or -`foo.run` fails - -* ScalaFmt support ({link-pr}/308[308]) - -* Allow `ScalaModule#generatedSources` to allow single files (previous you could only pass in directories) - -[#0-2-0] -=== 0.2.0 - 2018-04-10 - -* Universal (combined batch/sh) script generation for launcher, assembly, and release ({link-issue}/264[#264]) - -* Windows client/server improvements ({link-issue}/262[#262]) - -* Windows repl support (note: MSYS2 subsystem/shell will be supported when jline3 v3.6.3 is released) - -* Fixed Java 9 support - -* Remove need for running `publishAll` using `--interactive` when on OSX and your GPG key has a passphrase - -* First-class support for `JavaModule`s - -* Properly pass compiler plugins to Scaladoc ({link-issue}/282[#282]) - -* Support for ivy version-pinning via `ivy"...".forceVersion()` - -* Support for ivy excludes via `ivy"...".exclude()` ({link-pr}/254[#254]) - -* Make `ivyDepsTree` properly handle transitive dependencies ({link-issue}/226[#226]) - -* Fix handling of `runtime`-scoped ivy dependencies ({link-issue}/173[#173]) - -* Make environment variables available to Mill builds ({link-issue}/257[#257]) - -* Support ScalaCheck test runner ({link-issue}/286[#286]) - -* Support for using Typelevel Scala ({link-issue}/275[#275]) - -* If a module depends on multiple submodules with different versions of an ivy dependency, only one version is resolved ({link-issue}/273[#273]) - -[#0-1-7] -=== 0.1.7 - 2018-03-26 - -* Support for non-interactive (client/server) mode on Windows. - -* More fixes for Java 9 - -* Bumped the Mill daemon timeout from 1 minute to 5 minutes of inactivity before it shuts down. - -* Avoid leaking Node.js subprocesses when running `ScalaJSModule` tests - -* Passing command-line arguments with spaces in them to tests no longer parses wrongly - -* `ScalaModule#repositories`, `scalacPluginIvyDeps`, `scalacOptions`, -`javacOptions` are now automatically propagated to `Tests` modules - -* `ScalaJSModule` linking errors no longer show a useless stack trace - -* `ScalaModule#docJar` now properly uses the compileClasspath rather than runClasspath - -* Bumped underlying Ammonite version to http://ammonite.io/#1.1.0[1.1.0], which provides the improved Windows and Java 9 support - -[0-1-6] -=== 0.1.6 - 2018-03-13 - -* Fixes for non-interactive (client/server) mode on Java 9 - -* Windows batch (.bat) generation for launcher, assembly, and release - -[#0-1-5] -=== 0.1.5 - 2018-03-13 - -* Introduced the `mill plan foo.bar` command, which shows you what the execution plan of running the `foo.bar` task looks like without actually evaluating it. - -* Mill now generates an `out/mill-profile.json` file containing task-timings, to make it easier to see where your mill evaluation time is going - -* Introduced `ScalaModule#ivyDepsTree` command to show dependencies tree - -* Rename `describe` to `inspect` for consistency with SBT - -* `mill resolve` now prints results sorted alphabetically - -* Node.js configuration can be customised with `ScalaJSModule#nodeJSConfig` - -* Scala.js `fullOpt` now uses Google Closure Compiler after generating the optimized Javascript output - -* Scala.js now supports `NoModule` and `CommonJSModule` module kinds - -* Include `compileIvyDeps` when generating IntelliJ projects - -* Fixed invalid POM generation - -* Support for Java 9 (and 10) - -* Fixes for Windows support - -* Fixed test classes discovery by skipping interfaces - -* Include "optional" artifacts in dependency resolution if they exist - -* `out/{module_name}` now added as a content root in generated IntelliJ project - -[#0-1-4] -=== 0.1.4 - 2018-03-04 - -* Speed up Mill client initialization by another 50-100ms - -* Speed up incremental `assembly`s in the common case where upstream dependencies do not change. - -* Make `ScalaJSModule#run` work with main-method discovery - -* Make `ScalaWorkerModule` user-defineable, so you can use your own custom coursier resolvers when resolving Mill's own jars - -* Simplify definitions of `SCM` strings - -* Make the build REPL explicitly require `-i`/`--interactive` to run - -* Log a message when Mill is initializing the Zinc compiler interface - -[#0-1-3] -=== 0.1.3 - 2018-02-26 - -* Greatly reduced the overhead of evaluating Mill tasks, with a warm already-cached `mill dev.launcher` now taking ~450ms instead of ~1000ms - -* Mill now saves compiled build files in `~/.mill/ammonite`, which is configurable via the `--home` CLI arg. - -* Fixed linking of multi-module Scala.js projects - -[#0-1-2] -=== 0.1.2 - 2018-02-25 - -* Mill now keeps a long-lived work-daemon around in between commands; this should improve performance of things like `compile` which benefit from the warm JVM. -You can use `-i`/`--interactive` for interactive consoles/REPLs and for running commands without the daemon - -* Implemented the `ScalaModule#launcher` target for easily creating command-line launchers you can run outside of Mill - -* `ScalaModule#docJar` no longer fails if you don't have `scala-compiler` on classpath - -* Support for multiple `testFrameworks` in a test module. - -[#0-1-1] -=== 0.1.1 - 2018-02-19 - -* Fixes for `foo.console` -* Enable Ammonite REPL integration via `foo.repl` - -[#0-1-0] -=== 0.1.0 - 2018-02-18 - -* First public release - -// end::changelogOld[] diff --git a/runner/package.mill b/runner/package.mill index ce77b4e4a20..63117c1afc1 100644 --- a/runner/package.mill +++ b/runner/package.mill @@ -3,7 +3,7 @@ package build.runner import mill._ import mill.contrib.buildinfo.BuildInfo object `package` extends RootModule with build.MillPublishScalaModule { - object client extends build.MillPublishScalaModule with BuildInfo{ + object client extends build.MillPublishScalaModule with BuildInfo { // Disable scalafix because it seems to misbehave and cause // spurious errors when there are mixed Java/Scala sources def fix(args: String*): Command[Unit] = T.command {}