Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:

- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.4.0
bun-version: 1.4.1

- name: Check formatting
run: $MILL --no-server mill.scalalib.scalafmt.ScalafmtModule/checkFormatAll __.sources
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Set up Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.4.0
bun-version: 1.4.1

- name: Cache Coursier
uses: actions/cache@v4
Expand Down
2 changes: 1 addition & 1 deletion .mill-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1.5
1.1.8
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,29 @@ All notable changes to `mill-bun-plugin` will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.3.1] - Scala 3.9.0 LTS validation, Mill 1.1.8 (2026-09-04)

### Changed

- Every Scala.js integration fixture, `example-scalajs`, `examples`, and the README snippets now
build with **Scala 3.9.0 LTS** on Scala.js 1.22.0. Scala 3.9.0 emits Scala.js 1.22 IR, which the
linker bundled by Mill 1.1.x's `ScalaJSConfigModule` (IR ≤ 1.20) rejects; the explicit
`scalaJSVersion` route introduced in 0.3.0 is the supported way to build Scala 3.9 code, and the
suite now proves that exact combination.
- The plugin builds and runs its unit, integration, and example suites on **Mill 1.1.8**:
`.mill-version`, the launcher defaults, every fixture/example `//| mill-version` header, and —
the part that actually decides which Mill the fixtures run in-process — `mill-testkit` is now
pinned separately (`millTestkitVersion = "1.1.8"`). The compile target stays at Mill 1.1.5, so
the supported floor is unchanged and the jar under test is the real consumer shape.
- The plugin's own `scalaVersion` stays at 3.8.2 on purpose and now says why in `build.mill`: it
must match the Scala that Mill 1.1.x compiles build files with, or consumers hit a TASTy version
error at build-script compile time.
- Managed Bun default **1.4.0 → 1.4.1** (released 2026-09-04), with checksums for all twelve
release assets; 1.4.1 writes `lockfileVersion` 2, so committed locks stay valid. 1.4.0 stays in
the table for explicit `bunVersion` pins. `@types/bun` has not reached 1.4.1 on npm yet, so the
shipped default pairs with `DefaultBunTypesVersion = "1.4.0"` rather than tracking Bun blindly
(a 404 on every TypeScript frozen install); modules that override `bunVersion` keep lockstep.

## [0.3.0] - Managed toolchain, strict lockfiles, canonical vocabulary (2026-08-27)

### Added
Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ It keeps Mill's task graph, caching, module relationships, Scala.js linker, and

## Requirements

- Mill 1.1.5+
- Mill 1.1.5+ (compiled against 1.1.5; the test suite and examples run on 1.1.8)
- JDK 17+

Bun does not need to be installed. The plugin downloads and checksum-verifies Bun 1.4.0 by default on macOS, Linux, and Windows x64/arm64. musl-based Linux (Alpine) is detected automatically; on x64 CPUs without AVX2, set `bunUseBaseline`. Set `MILL_BUN_USE_SYSTEM=true` to opt into the Bun on `PATH` instead.
Bun does not need to be installed. The plugin downloads and checksum-verifies Bun 1.4.1 by default on macOS, Linux, and Windows x64/arm64. musl-based Linux (Alpine) is detected automatically; on x64 CPUs without AVX2, set `bunUseBaseline`. Set `MILL_BUN_USE_SYSTEM=true` to opt into the Bun on `PATH` instead.

## Scala.js quick start

```scala
//| mill-version: 1.1.5
//| mill-version: 1.1.8
//| mill-jvm-version: system
//| mvnDeps:
//| - com.tjclp::mill-bun_mill1:0.3.0
//| - com.tjclp::mill-bun_mill1:0.3.1

package build

Expand All @@ -29,7 +29,7 @@ import mill.scalajslib.bun.*

object app extends BunScalaJSModule {
override def moduleDir = build.moduleDir
def scalaVersion = "3.8.2"
def scalaVersion = "3.9.0"
def scalaJSVersion = "1.22.0"

override def moduleKind = Task { ModuleKind.ESModule }
Expand Down Expand Up @@ -57,10 +57,10 @@ Scala.js versions are explicit: choose the version your application tests agains
## TypeScript quick start

```scala
//| mill-version: 1.1.5
//| mill-version: 1.1.8
//| mill-jvm-version: system
//| mvnDeps:
//| - com.tjclp::mill-bun_mill1:0.3.0
//| - com.tjclp::mill-bun_mill1:0.3.1

package build

Expand Down Expand Up @@ -89,7 +89,7 @@ Use the paired web traits when HTML and static assets are part of the applicatio

```scala
object frontend extends BunScalaJSWebModule {
def scalaVersion = "3.8.2"
def scalaVersion = "3.9.0"
def scalaJSVersion = "1.22.0"
override def moduleKind = Task { ModuleKind.ESModule }
}
Expand Down Expand Up @@ -133,7 +133,7 @@ Resolution order is:

1. `bunExecutableOverride`
2. system `PATH` when `bunUseSystem` or `MILL_BUN_USE_SYSTEM=true`
3. checksum-verified managed Bun 1.4.0
3. checksum-verified managed Bun 1.4.1

Use `./mill app.bunDoctor` to print and validate the resolved executable, version, revision, mode, selected release asset, and linker.

Expand All @@ -156,7 +156,7 @@ import mill.javascriptlib.bun.*
import mill.scalajslib.bun.*

object scalaApp extends BunScalaJSModule {
def scalaVersion = "3.8.2"
def scalaVersion = "3.9.0"
def scalaJSVersion = "1.22.0"
override def bunWorkspaceInstall = Task { Some(workspace.bunInstall()) }
}
Expand All @@ -178,7 +178,7 @@ Mix `BunPublishModule` into a published Scala.js library to emit `META-INF/bun/b

```scala
object ui extends BunScalaJSModule with BunPublishModule {
def scalaVersion = "3.8.2"
def scalaVersion = "3.9.0"
def scalaJSVersion = "1.22.0"
override def npmPeerDeps = Task { Seq("react@^19.0.0") }
}
Expand Down
13 changes: 12 additions & 1 deletion build.mill
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,18 @@ import mill.*, scalalib.*, publish.*
import mill.api.BuildCtx

object millbun extends ScalaModule, PublishModule {
// Compile target = the minimum Mill the plugin supports; Mill 1.x keeps plugin binary
// compatibility forwards, so the floor stays where it is while the suite below runs on
// the latest stable release.
def millVersion = "1.1.5"
// The integration fixtures run Mill in-process via mill-testkit, so THIS is the Mill the
// plugin is tested against (fixture `//| mill-version` headers are only read for the
// mismatch warning). Kept at the latest stable Mill; the plugin jar under test is still
// the one compiled against millVersion above, i.e. the real consumer shape.
def millTestkitVersion = "1.1.8"
// Must match the Scala that Mill 1.1.x compiles build files with (3.8.2): a plugin built
// with a newer Scala emits TASTy that consumers' Mill cannot read. Fixtures and examples
// are free to use newer Scala (they are on 3.9.0 LTS); this pin is not.
def scalaVersion = "3.8.2"
def jvmVersion = "25"
def platformSuffix = "_mill1"
Expand All @@ -24,7 +35,7 @@ object millbun extends ScalaModule, PublishModule {

object integration extends ScalaTests, TestModule.Utest {
def mvnDeps = Seq(
mvn"com.lihaoyi::mill-testkit:$millVersion",
mvn"com.lihaoyi::mill-testkit:$millTestkitVersion",
mvn"com.lihaoyi::utest:0.8.5"
)
override def resources = Task.Sources()
Expand Down
6 changes: 3 additions & 3 deletions example-scalajs/build.mill
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//| mill-version: 1.1.5
//| mill-version: 1.1.8
//| mill-jvm-version: system
//| mvnDeps:
//| - com.tjclp::mill-bun_mill1:0.3.0
//| - com.tjclp::mill-bun_mill1:0.3.1

package build

Expand All @@ -14,7 +14,7 @@ import mill.bun.bun

object app extends BunScalaJSModule {
override def moduleDir = build.moduleDir
def scalaVersion = "3.8.2"
def scalaVersion = "3.9.0"
def scalaJSVersion = "1.22.0"

override def moduleKind = Task { ModuleKind.ESModule }
Expand Down
2 changes: 1 addition & 1 deletion example-scalajs/mill
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

if [ -z "${DEFAULT_MILL_VERSION}" ] ; then DEFAULT_MILL_VERSION="1.1.5"; fi
if [ -z "${DEFAULT_MILL_VERSION}" ] ; then DEFAULT_MILL_VERSION="1.1.8"; fi

if [ -z "${GITHUB_RELEASE_CDN}" ] ; then GITHUB_RELEASE_CDN=""; fi

Expand Down
2 changes: 1 addition & 1 deletion example-scalajs/mill.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setlocal enabledelayedexpansion

if [!DEFAULT_MILL_VERSION!]==[] ( set "DEFAULT_MILL_VERSION=1.1.5" )
if [!DEFAULT_MILL_VERSION!]==[] ( set "DEFAULT_MILL_VERSION=1.1.8" )

if [!MILL_GITHUB_RELEASE_CDN!]==[] ( set "MILL_GITHUB_RELEASE_CDN=" )

Expand Down
4 changes: 2 additions & 2 deletions example-typescript/build.mill
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//| mill-version: 1.1.5
//| mill-version: 1.1.8
//| mill-jvm-version: system
//| mvnDeps:
//| - com.tjclp::mill-bun_mill1:0.3.0
//| - com.tjclp::mill-bun_mill1:0.3.1

package build

Expand Down
2 changes: 1 addition & 1 deletion example-typescript/mill
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

if [ -z "${DEFAULT_MILL_VERSION}" ] ; then DEFAULT_MILL_VERSION="1.1.5"; fi
if [ -z "${DEFAULT_MILL_VERSION}" ] ; then DEFAULT_MILL_VERSION="1.1.8"; fi

if [ -z "${GITHUB_RELEASE_CDN}" ] ; then GITHUB_RELEASE_CDN=""; fi

Expand Down
2 changes: 1 addition & 1 deletion example-typescript/mill.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setlocal enabledelayedexpansion

if [!DEFAULT_MILL_VERSION!]==[] ( set "DEFAULT_MILL_VERSION=1.1.5" )
if [!DEFAULT_MILL_VERSION!]==[] ( set "DEFAULT_MILL_VERSION=1.1.8" )

if [!MILL_GITHUB_RELEASE_CDN!]==[] ( set "MILL_GITHUB_RELEASE_CDN=" )

Expand Down
14 changes: 7 additions & 7 deletions examples/build.mill
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//| mill-version: 1.1.5
//| mill-version: 1.1.8
//| mill-jvm-version: system
//| mvnDeps:
//| - com.tjclp::mill-bun_mill1:0.3.0
//| - com.tjclp::mill-bun_mill1:0.3.1

package build

Expand All @@ -22,7 +22,7 @@ import mill.javascriptlib.bun.*
// ./mill webServer.compileExecutable
object webServer extends BunScalaJSModule {
override def sources = Task.Sources(build.moduleDir / "web-server" / "src")
def scalaVersion = "3.8.2"
def scalaVersion = "3.9.0"
def scalaJSVersion = "1.22.0"
override def moduleKind = Task { ModuleKind.ESModule }
override def bunBundleTarget = Task { "bun" }
Expand All @@ -32,7 +32,7 @@ object webServer extends BunScalaJSModule {
// ./mill todoApp.bundle
object todoApp extends BunScalaJSModule {
override def sources = Task.Sources(build.moduleDir / "frontend" / "src")
def scalaVersion = "3.8.2"
def scalaVersion = "3.9.0"
def scalaJSVersion = "1.22.0"
def mvnDeps = Seq(mvn"org.scala-js::scalajs-dom::2.8.1")
override def moduleKind = Task { ModuleKind.ESModule }
Expand All @@ -46,7 +46,7 @@ object todoApp extends BunScalaJSModule {
object fullstack extends Module {
object shared extends BunScalaJSModule {
override def sources = Task.Sources(build.moduleDir / "fullstack" / "shared")
def scalaVersion = "3.8.2"
def scalaVersion = "3.9.0"
def scalaJSVersion = "1.22.0"
override def moduleKind = Task { ModuleKind.ESModule }
}
Expand Down Expand Up @@ -107,7 +107,7 @@ object client extends BunTypeScriptModule {

// --- Scala.js browser frontend (alternative client) ---
object scalaClient extends BunScalaJSModule {
def scalaVersion = "3.8.2"
def scalaVersion = "3.9.0"
def scalaJSVersion = "1.22.0"
def mvnDeps = Seq(mvn"org.scala-js::scalajs-dom::2.8.1")
override def moduleKind = Task { ModuleKind.ESModule }
Expand All @@ -116,7 +116,7 @@ object scalaClient extends BunScalaJSModule {

// --- JVM backend (Scala/Cask HTTP server, serves TS client bundle) ---
object backend extends ScalaModule {
def scalaVersion = "3.8.2"
def scalaVersion = "3.9.0"
def mvnDeps = Seq(
mvn"com.lihaoyi::cask:0.10.2",
mvn"com.lihaoyi::upickle:4.3.0"
Expand Down
2 changes: 1 addition & 1 deletion mill
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

if [ -z "${DEFAULT_MILL_VERSION}" ] ; then DEFAULT_MILL_VERSION="1.1.5"; fi
if [ -z "${DEFAULT_MILL_VERSION}" ] ; then DEFAULT_MILL_VERSION="1.1.8"; fi

if [ -z "${GITHUB_RELEASE_CDN}" ] ; then GITHUB_RELEASE_CDN=""; fi

Expand Down
2 changes: 1 addition & 1 deletion mill.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setlocal enabledelayedexpansion

if [!DEFAULT_MILL_VERSION!]==[] ( set "DEFAULT_MILL_VERSION=1.1.5" )
if [!DEFAULT_MILL_VERSION!]==[] ( set "DEFAULT_MILL_VERSION=1.1.8" )

if [!MILL_GITHUB_RELEASE_CDN!]==[] ( set "MILL_GITHUB_RELEASE_CDN=" )

Expand Down
4 changes: 2 additions & 2 deletions millbun/integration/resources/invalid-bun-literal/build.mill
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//| mill-version: 1.1.5
//| mill-version: 1.1.8
//| mill-jvm-version: system
//| mvnDeps:
//| - com.tjclp::mill-bun_mill1:0.0.0-NIGHTLY
Expand All @@ -13,7 +13,7 @@ import mill.scalajslib.bun.*

object app extends BunScalaJSModule {
override def moduleDir = build.moduleDir
def scalaVersion = "3.8.2"
def scalaVersion = "3.9.0"
def scalaJSVersion = "1.22.0"

override def moduleKind = Task { ModuleKind.CommonJSModule }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//| mill-version: 1.1.5
//| mill-version: 1.1.8
//| mill-jvm-version: system
//| mvnDeps:
//| - com.tjclp::mill-bun_mill1:0.0.0-NIGHTLY
Expand All @@ -13,7 +13,7 @@ import mill.scalajslib.bun.*

object app extends BunScalaJSModule {
override def moduleDir = build.moduleDir
def scalaVersion = "3.8.2"
def scalaVersion = "3.9.0"
def scalaJSVersion = "1.22.0"

override def moduleKind = Task { ModuleKind.CommonJSModule }
Expand Down
2 changes: 1 addition & 1 deletion millbun/integration/resources/managed-bun/build.mill
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//| mill-version: 1.1.5
//| mill-version: 1.1.8
//| mill-jvm-version: system
//| mvnDeps:
//| - com.tjclp::mill-bun_mill1:0.0.0-NIGHTLY
Expand Down
4 changes: 2 additions & 2 deletions millbun/integration/resources/mixed-workspace/build.mill
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//| mill-version: 1.1.5
//| mill-version: 1.1.8
//| mill-jvm-version: system
//| mvnDeps:
//| - com.tjclp::mill-bun_mill1:0.0.0-NIGHTLY
Expand All @@ -15,7 +15,7 @@ object scalaApp extends BunScalaJSModule {
// Renamed deliberately: the layout's directory naming, duplicate guard, AND the generated
// member manifest must all follow this name, or bun sees a different identity than Mill.
override def bunWorkspacePackageName = Task { "scala-app-renamed" }
def scalaVersion = "3.8.2"
def scalaVersion = "3.9.0"
def scalaJSVersion = "1.22.0"
override def moduleKind = Task { ModuleKind.ESModule }
override def npmDeps = Task { Seq("is-even@1.0.0") }
Expand Down
4 changes: 2 additions & 2 deletions millbun/integration/resources/scalajs-bundle/build.mill
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//| mill-version: 1.1.5
//| mill-version: 1.1.8
//| mill-jvm-version: system
//| mvnDeps:
//| - com.tjclp::mill-bun_mill1:0.0.0-NIGHTLY
Expand All @@ -12,7 +12,7 @@ import mill.scalajslib.bun.*

object app extends BunScalaJSModule {
override def moduleDir = build.moduleDir
def scalaVersion = "3.8.2"
def scalaVersion = "3.9.0"
def scalaJSVersion = "1.22.0"

override def mainClass = Some("Main")
Expand Down
4 changes: 2 additions & 2 deletions millbun/integration/resources/scalajs-bunfig/build.mill
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//| mill-version: 1.1.5
//| mill-version: 1.1.8
//| mill-jvm-version: system
//| mvnDeps:
//| - com.tjclp::mill-bun_mill1:0.0.0-NIGHTLY
Expand All @@ -13,7 +13,7 @@ import mill.scalajslib.bun.*

object app extends BunScalaJSModule {
override def moduleDir = build.moduleDir
def scalaVersion = "3.8.2"
def scalaVersion = "3.9.0"
def scalaJSVersion = "1.22.0"

override def mainClass = Some("Main")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//| mill-version: 1.1.5
//| mill-version: 1.1.8
//| mill-jvm-version: system
//| mvnDeps:
//| - com.tjclp::mill-bun_mill1:0.0.0-NIGHTLY
Expand All @@ -13,7 +13,7 @@ import mill.scalajslib.bun.*

trait StubBunModule extends BunScalaJSModule {
override def moduleDir = build.moduleDir
def scalaVersion = "3.8.2"
def scalaVersion = "3.9.0"
def scalaJSVersion = "1.22.0"
override def moduleKind = Task { ModuleKind.CommonJSModule }
override def bunExecutable = Task { "stub-bun" }
Expand Down
Loading
Loading