From 5b7557402c58d2675df1d8142611985780b0e0d3 Mon Sep 17 00:00:00 2001 From: Ondra Pelech Date: Fri, 16 Oct 2026 09:10:20 +0200 Subject: [PATCH 1/3] build: unreleased Mill and dapr4s from build/mill-upstream-snapshot .mill-version is Mill 1.3.0-18-28026a (main + com-lihaoyi/mill#7783), the Mill the dapr4s plugin of https://github.com/sideeffffect/dapr4s/pull/47 is built against. Its scripts/upstream-snapshot.sh installs it (publish-dapr4s-wasm.sh runs it; CI caches it by the script's hash). The plugin now links components with Mill's ModuleKind.WasmComponent on dapr4s-wasm-linker_2.13. Also pull the dapr-wasm-components providers under their new OCI names (the flat packages were deleted on 2026-10-15). Co-Authored-By: Claude Opus 5.5 --- .github/actions/dapr4s-mill-plugin/action.yml | 27 +++++++++++++++- .github/workflows/e2e.yml | 32 ++++++++++++++++--- .mill-version | 2 +- AGENTS.md | 9 ++++-- README.md | 2 +- build.mill | 2 +- wasm/dapr4s-wasm.env | 7 ++-- wasm/scripts/compose.sh | 12 ++++++- wasm/scripts/publish-dapr4s-wasm.sh | 6 ++-- 9 files changed, 81 insertions(+), 18 deletions(-) diff --git a/.github/actions/dapr4s-mill-plugin/action.yml b/.github/actions/dapr4s-mill-plugin/action.yml index edb3082..8b2ead8 100644 --- a/.github/actions/dapr4s-mill-plugin/action.yml +++ b/.github/actions/dapr4s-mill-plugin/action.yml @@ -1,13 +1,38 @@ name: dapr4s Mill plugin description: >- publishLocal the mill-dapr4s-wasm plugin that build.mill's header loads, from the dapr4s commit pinned in - wasm/dapr4s-wasm.env (cached per commit). Every job that runs ./mill needs it until the plugin is released. + wasm/dapr4s-wasm.env (cached per commit), and the unreleased Mill it is built against (.mill-version). Every + job that runs ./mill needs both until they are released. runs: using: composite steps: - name: Read the dapr4s pin (wasm/dapr4s-wasm.env) shell: bash run: grep -E '^[A-Z0-9_]+=' wasm/dapr4s-wasm.env >> "$GITHUB_ENV" + # dapr4s (and so .mill-version here) is on an unreleased Mill + mill-scalablytyped: dapr4s's + # scripts/upstream-snapshot.sh (at the pinned commit) builds them from pinned upstream commits and installs + # them locally. Cached by the script's hash. + - name: Fetch dapr4s's upstream-snapshot.sh + id: snapshot + shell: bash + run: | + f="$RUNNER_TEMP/upstream-snapshot.sh" + curl -fsSL --retry 3 -o "$f" \ + "https://raw.githubusercontent.com/sideeffffect/dapr4s/$DAPR4S_COMMIT/scripts/upstream-snapshot.sh" + chmod +x "$f" + echo "script=$f" >> "$GITHUB_OUTPUT" + echo "hash=$(sha256sum "$f" | cut -c1-16)" >> "$GITHUB_OUTPUT" + - name: Cache the upstream Mill + mill-scalablytyped snapshots + uses: actions/cache@v5 + with: + path: | + ~/.cache/mill/download + ~/.ivy2/local/com.lihaoyi + ~/.ivy2/local/com.github.lolgab + key: upstream-snapshot-${{ steps.snapshot.outputs.hash }} + - name: Build the upstream Mill + mill-scalablytyped snapshots + shell: bash + run: ${{ steps.snapshot.outputs.script }} - name: Cache the dapr4s Mill plugin (~/.ivy2/local) id: cache uses: actions/cache@v5 diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 78e44e0..ee2c317 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -9,7 +9,7 @@ on: jobs: format: runs-on: ubuntu-latest - timeout-minutes: 15 + timeout-minutes: 45 steps: - uses: actions/checkout@v5 @@ -246,14 +246,14 @@ jobs: # Mill plugin mill-dapr4s-wasm. dapr4s itself comes from Maven Central (dapr4s_sjs1_3 3.0.0); the plugin and the # small dapr4s wasm artifacts (dapr4s-wasm, dapr4s-wasm-glue(-exports), dapr4s-wasm-scalalib-overlay, # dapr4s-wasm-linker) come from a publishLocal of the dapr4s commit PINNED in wasm/dapr4s-wasm.env (a commit of - # https://github.com/sideeffffect/dapr4s/pull/45). Once they are released, the pin becomes a release version and + # https://github.com/sideeffffect/dapr4s/pull/47). Once they are released, the pin becomes a release version and # the dapr4s publish step goes away. # The components are composed with dapr-wasm-components 0.7.2 (compose.sh at the v0.7.2 tag) and run # in `wasmtime serve` next to a real daprd (dapr CLI, slim) + Redis (Docker); the e2e asserts their # real output, including 04's unchanged JVM caller calling the Wasm greeting-service. e2e-wasm: runs-on: ubuntu-latest - timeout-minutes: 45 + timeout-minutes: 90 name: e2e (wasm components) steps: @@ -319,7 +319,29 @@ jobs: dapr init --slim --runtime-version 1.17.7 echo "$HOME/.dapr/bin" >> "$GITHUB_PATH" - # The plugin + the five dapr4s wasm artifacts (incl. dapr4s-wasm-linker, compiled from scala-wasm's release + # dapr4s (and .mill-version here) is on an unreleased Mill + mill-scalablytyped: dapr4s's + # scripts/upstream-snapshot.sh (at the pinned commit) builds and installs them, cached by its hash. + - name: Fetch dapr4s's upstream-snapshot.sh + id: snapshot + run: | + f="$RUNNER_TEMP/upstream-snapshot.sh" + curl -fsSL --retry 3 -o "$f" \ + "https://raw.githubusercontent.com/sideeffffect/dapr4s/$DAPR4S_COMMIT/scripts/upstream-snapshot.sh" + chmod +x "$f" + echo "script=$f" >> "$GITHUB_OUTPUT" + echo "hash=$(sha256sum "$f" | cut -c1-16)" >> "$GITHUB_OUTPUT" + - name: Cache the upstream Mill + mill-scalablytyped snapshots + uses: actions/cache@v5 + with: + path: | + ~/.cache/mill/download + ~/.ivy2/local/com.lihaoyi + ~/.ivy2/local/com.github.lolgab + key: upstream-snapshot-${{ steps.snapshot.outputs.hash }} + - name: Build the upstream Mill + mill-scalablytyped snapshots + run: ${{ steps.snapshot.outputs.script }} + + # The plugin + the five dapr4s wasm artifacts (incl. dapr4s-wasm-linker_2.13, compiled from scala-wasm's release # commit + dapr4s's patch) land in ~/.ivy2/local and are a pure function of the pinned dapr4s commit: cache # them under it. On a miss, wasm/scripts/publish-dapr4s-wasm.sh clones dapr4s at that commit and runs its # Mill publishLocal. It must run before the first ./mill here (build.mill's header loads the plugin). @@ -347,7 +369,7 @@ jobs: slides: runs-on: ubuntu-latest - timeout-minutes: 20 + timeout-minutes: 45 steps: - uses: actions/checkout@v5 diff --git a/.mill-version b/.mill-version index f0bb29e..b00fb88 100644 --- a/.mill-version +++ b/.mill-version @@ -1 +1 @@ -1.3.0 +1.3.0-18-28026a-jvm diff --git a/AGENTS.md b/AGENTS.md index 3321809..6a29f64 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -120,8 +120,11 @@ Source files live under `src//` within each module directory, e.g.: - **Dapr CLI** and runtime: https://docs.dapr.io/getting-started/install-dapr-cli/ - **Redis** on `localhost:6379` — `docker run -d -p 6379:6379 redis:7` - **JVM ≥ 21** — `java -version` -- **Mill 1.3.x** — use the `./mill` launcher (it reads `.mill-version`). Mill >= 1.3.0 is required - for the Scala.js JSPI switch (see "Scala.js examples"). +- **Mill 1.3.0-18-28026a (unreleased)** — use the `./mill` launcher (it reads `.mill-version`). It is + Mill main + [com-lihaoyi/mill#7783](https://github.com/com-lihaoyi/mill/pull/7783), the Mill the dapr4s + plugin is built against. `wasm/scripts/publish-dapr4s-wasm.sh` installs it (it runs dapr4s's + `scripts/upstream-snapshot.sh`); without it, run that dapr4s script once yourself. Mill >= 1.3.0 is + required for the Scala.js JSPI switch (see "Scala.js examples"). - **dapr4s published locally** (run once from the dapr4s repo): ``` cd ../scala-safe-dapr @@ -423,7 +426,7 @@ whole repository is one Mill build. directly) + `dapr4s-wasm` (the adapters), `dapr4s-wasm-glue(-exports)`, `dapr4s-wasm-scalalib-overlay`, `dapr4s-wasm-linker` and the plugin `mill-dapr4s-wasm`, which are **not released yet**: they come from a `publishLocal` of the dapr4s commit pinned in `wasm/dapr4s-wasm.env` (a commit of - [dapr4s PR #45](https://github.com/sideeffffect/dapr4s/pull/45)), at the version `build.mill`'s header pins. + [dapr4s PR #47](https://github.com/sideeffffect/dapr4s/pull/47)), at the version `build.mill`'s header pins. **Bootstrapping**: the header loads the plugin, so EVERY `./mill` command fails until it is in `~/.ivy2/local`. Run `wasm/scripts/publish-dapr4s-wasm.sh` (`plugin`, the default: only the plugin, needs git + Java) once after cloning; `all` also publishes the wasm artifacts `./mill wasm.e2e` needs diff --git a/README.md b/README.md index 1cf3a6e..b66b740 100644 --- a/README.md +++ b/README.md @@ -107,7 +107,7 @@ published `dapr4s_sjs1_3` 3.0.0, whose Scala.js IR is linked into the component) (+ `-exports`; the Scala 2.13 WIT glue), `dapr4s-wasm-scalalib-overlay` and `dapr4s-wasm-linker`. **Prototype status.** The plugin and the artifacts are in -[dapr4s PR #45](https://github.com/sideeffffect/dapr4s/pull/45) (not released yet), hence the +[dapr4s PR #47](https://github.com/sideeffffect/dapr4s/pull/47) (not released yet), hence the `publishLocal` of the dapr4s commit pinned in `wasm/dapr4s-wasm.env` (at the version `build.mill`'s header pins). Because `build.mill`'s header loads the plugin, **every** `./mill` command needs it: `wasm/scripts/publish-dapr4s-wasm.sh` (default `plugin`: only the plugin, needs just git and Java) once diff --git a/build.mill b/build.mill index da1be07..72dfe93 100644 --- a/build.mill +++ b/build.mill @@ -1,4 +1,4 @@ -//| mvnDeps: ["com.github.sideeffffect::mill-dapr4s-wasm::3.0.0+25-11e158da-SNAPSHOT"] +//| mvnDeps: ["com.github.sideeffffect::mill-dapr4s-wasm::3.0.0+27-acb519fb-SNAPSHOT"] // The dapr4s Mill plugin for WASI components (examples 18/19, `object wasm` below). Pinned to a dapr4s commit // (wasm/dapr4s-wasm.env) until it is released: run wasm/scripts/publish-dapr4s-wasm.sh once before the first // `./mill` (it publishLocal's the plugin from that commit; `all` also the wasm artifacts the components need). diff --git a/wasm/dapr4s-wasm.env b/wasm/dapr4s-wasm.env index 24c765f..89551cc 100644 --- a/wasm/dapr4s-wasm.env +++ b/wasm/dapr4s-wasm.env @@ -1,6 +1,7 @@ # The dapr4s commit the Mill plugin mill-dapr4s-wasm (build.mill's header) and the dapr4s wasm artifacts come from, -# until they are released: a commit of dapr4s PR #45 (https://github.com/sideeffffect/dapr4s/pull/45, branch -# build/mill). wasm/scripts/publish-dapr4s-wasm.sh publishLocal's them from it, at the version build.mill's header +# until they are released: a commit of dapr4s PR #47 (https://github.com/sideeffffect/dapr4s/pull/47, branch +# build/mill-upstream-snapshot: dapr4s on the unreleased Mill + mill-scalablytyped that its +# scripts/upstream-snapshot.sh installs; this repository's .mill-version uses the same Mill). wasm/scripts/publish-dapr4s-wasm.sh publishLocal's them from it, at the version build.mill's header # pins (dapr4s derives it from git: +--SNAPSHOT), so the classpath is "Central dapr4s # + the local wasm artifacts": # - dapr4s itself: com.github.sideeffffect::dapr4s_sjs1_3:$DAPR4S_CORE_RELEASE from Maven Central (Scala.js IR, @@ -9,5 +10,5 @@ # glue), dapr4s-wasm-scalalib-overlay and dapr4s-wasm-linker. # Once released, this file goes away: the header pins a Maven Central release and CI stops building dapr4s. # Read by wasm/scripts/publish-dapr4s-wasm.sh and CI (.github/workflows/e2e.yml, .github/actions/dapr4s-mill-plugin). -DAPR4S_COMMIT=11e158da7bbcb3b993f057b8109306f467f371b5 +DAPR4S_COMMIT=acb519fb0831ceb2c86042911c5854e4fca9bb2c DAPR4S_CORE_RELEASE=3.0.0 diff --git a/wasm/scripts/compose.sh b/wasm/scripts/compose.sh index 6af45a9..e808e38 100755 --- a/wasm/scripts/compose.sh +++ b/wasm/scripts/compose.sh @@ -14,6 +14,16 @@ for f in compose.sh compose.wac; do "https://raw.githubusercontent.com/sideeffffect/dapr-wasm-components/$ref/$f" done chmod +x "$dir/compose.sh" +# The providers are pulled here and passed by path: since 2026-10-15 dapr-wasm-components publishes every +# version under ghcr.io/sideeffffect/dapr-wasm-components/ and the flat +# ghcr.io/sideeffffect/dapr-wasm-components- packages, which compose.sh (every tag up to v0.7.4) pulls, +# are deleted. +for d in outbound inbound; do + f="$dir/dapr_wasm_components_wasi_http_$d.wasm" + [[ -s "$f" ]] || wkg oci pull "ghcr.io/sideeffffect/dapr-wasm-components/wasi-http-$d:0.7.2" -o "$f" >&2 +done rm -f "$out" -"$dir/compose.sh" "$app" -o "$out" --tag 0.7.2 +"$dir/compose.sh" "$app" -o "$out" \ + --outbound "$dir/dapr_wasm_components_wasi_http_outbound.wasm" \ + --inbound "$dir/dapr_wasm_components_wasi_http_inbound.wasm" wasm-tools validate "$out" diff --git a/wasm/scripts/publish-dapr4s-wasm.sh b/wasm/scripts/publish-dapr4s-wasm.sh index faa8515..d2f38e8 100755 --- a/wasm/scripts/publish-dapr4s-wasm.sh +++ b/wasm/scripts/publish-dapr4s-wasm.sh @@ -33,9 +33,9 @@ artifacts=(mill-dapr4s-wasm_mill1_3) case "$what" in plugin) ;; all) - modules+=('wasm.lib[release].wall' wasm.glue wasm.glueExports wasm.scalalibOverlay wasm.linker) + modules+=('wasm.lib[release].wall' wasm.glue wasm.glueExports wasm.scalalibOverlay 'wasm.linker[2.13.18]') artifacts+=(dapr4s-wasm_sjs1_3 dapr4s-wasm-glue_sjs1_2.13 dapr4s-wasm-glue-exports_sjs1_2.13 - dapr4s-wasm-scalalib-overlay dapr4s-wasm-linker_2.12) + dapr4s-wasm-scalalib-overlay dapr4s-wasm-linker_2.13) ;; *) echo "usage: $0 [plugin|all]" >&2 @@ -58,6 +58,8 @@ if [[ ! -d "$dir/.git" ]]; then fi git -C "$dir" fetch --quiet --tags origin "$DAPR4S_COMMIT" 2>/dev/null || git -C "$dir" fetch --quiet --tags origin git -C "$dir" checkout --quiet --force "$DAPR4S_COMMIT" +# dapr4s builds with an unreleased Mill + mill-scalablytyped: install them first (idempotent). +"$dir/scripts/upstream-snapshot.sh" args=() for m in "${modules[@]}"; do [[ ${#args[@]} -gt 0 ]] && args+=(+) From ab1574920daa402df515544d3edca895dc2d403d Mon Sep 17 00:00:00 2001 From: Ondra Pelech Date: Fri, 16 Oct 2026 09:21:09 +0200 Subject: [PATCH 2/3] ci: run on every pull request, also stacked ones Co-Authored-By: Claude Opus 5.5 --- .github/workflows/e2e.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index ee2c317..027715d 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -3,8 +3,8 @@ name: E2E Tests on: push: branches: [main, master] + # Every pull request, also those stacked on another PR's branch. pull_request: - branches: [main, master] jobs: format: From 496f57579902807eb72d9105459ccefba6c97cce Mon Sep 17 00:00:00 2001 From: Ondra Pelech Date: Sun, 18 Oct 2026 18:54:16 +0200 Subject: [PATCH 3/3] build: Mill at the upstream merge of mill#7783; pin dapr4s fdcd67a com-lihaoyi/mill#7783 and lolgab/mill-scalablytyped#50 are merged. Use the same Mill as dapr4s (1.3.0-20-56dcdf) and pin the dapr4s commit fdcd67a of https://github.com/sideeffffect/dapr4s/pull/47 (3.0.0+42-fdcd67a2-SNAPSHOT). Co-Authored-By: Claude Opus 5.5 --- .mill-version | 2 +- AGENTS.md | 6 +++--- README.md | 2 +- build.mill | 2 +- wasm/dapr4s-wasm.env | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.mill-version b/.mill-version index b00fb88..79b9b31 100644 --- a/.mill-version +++ b/.mill-version @@ -1 +1 @@ -1.3.0-18-28026a-jvm +1.3.0-20-56dcdf-jvm diff --git a/AGENTS.md b/AGENTS.md index efe0db7..21defa4 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -120,8 +120,8 @@ Source files live under `src//` within each module directory, e.g.: - **Dapr CLI** and runtime: https://docs.dapr.io/getting-started/install-dapr-cli/ - **Redis** on `localhost:6379` — `docker run -d -p 6379:6379 redis:7` - **JVM ≥ 21** — `java -version` -- **Mill 1.3.0-18-28026a (unreleased)** — use the `./mill` launcher (it reads `.mill-version`). It is - Mill main + [com-lihaoyi/mill#7783](https://github.com/com-lihaoyi/mill/pull/7783), the Mill the dapr4s +- **Mill 1.3.0-20-56dcdf (unreleased)** — use the `./mill` launcher (it reads `.mill-version`). It is + Mill main at the merge of [com-lihaoyi/mill#7783](https://github.com/com-lihaoyi/mill/pull/7783), the Mill the dapr4s plugin is built against. `wasm/scripts/publish-dapr4s-wasm.sh` installs it (it runs dapr4s's `scripts/upstream-snapshot.sh`); without it, run that dapr4s script once yourself. Mill >= 1.3.0 is required for the Scala.js JSPI switch (see "Scala.js examples"). @@ -464,7 +464,7 @@ whole repository is one Mill build. re-embed, [scala-wasm#269](https://github.com/scala-wasm/scala-wasm/pull/269)); the fork's and mainline's core libraries do not evict each other (exclusions, [scala-wasm#271](https://github.com/scala-wasm/scala-wasm/pull/271)); the nightly stdlib uses JS interop (`dapr4s-wasm-scalalib-overlay`); Mill has no Scala.js organization - setting / `ModuleKind.WasmComponent` ([mill#7783](https://github.com/com-lihaoyi/mill/pull/7783)) or + setting / `ModuleKind.WasmComponent` ([mill#7783](https://github.com/com-lihaoyi/mill/pull/7783), merged but not released) or WIT-bindings task ([mill#7784](https://github.com/com-lihaoyi/mill/pull/7784)); no `main` in a reactor (`ComponentRoot`). diff --git a/README.md b/README.md index 44b1ba0..4990cb4 100644 --- a/README.md +++ b/README.md @@ -121,7 +121,7 @@ plugin re-embeds the WIT world, [scala-wasm#269](https://github.com/scala-wasm/s fork's and mainline's core libraries do not evict each other (the exclusions, [scala-wasm#271](https://github.com/scala-wasm/scala-wasm/pull/271)); JS interop in the nightly's Scala.js stdlib (`dapr4s-wasm-scalalib-overlay`); Mill knows neither the fork's organization nor -`ModuleKind.WasmComponent` ([mill#7783](https://github.com/com-lihaoyi/mill/pull/7783)) nor WIT bindings +`ModuleKind.WasmComponent` ([mill#7783](https://github.com/com-lihaoyi/mill/pull/7783), merged but not released) nor WIT bindings ([mill#7784](https://github.com/com-lihaoyi/mill/pull/7784)). **Prerequisites**: JDK 25, Docker, the dapr CLI 1.15.1 + daprd 1.17.7 (`dapr init --slim`), diff --git a/build.mill b/build.mill index ec8c90c..62a5b76 100644 --- a/build.mill +++ b/build.mill @@ -1,4 +1,4 @@ -//| mvnDeps: ["com.github.sideeffffect::mill-dapr4s-wasm::3.0.0+40-ec5ad2a1-SNAPSHOT"] +//| mvnDeps: ["com.github.sideeffffect::mill-dapr4s-wasm::3.0.0+42-fdcd67a2-SNAPSHOT"] // The dapr4s Mill plugin for WASI components (examples 18/19, `object wasm` below). Pinned to a dapr4s commit // (wasm/dapr4s-wasm.env) until it is released: run wasm/scripts/publish-dapr4s-wasm.sh once before the first // `./mill` (it publishLocal's the plugin from that commit; `all` also the wasm artifacts the components need). diff --git a/wasm/dapr4s-wasm.env b/wasm/dapr4s-wasm.env index 5981f1b..d461954 100644 --- a/wasm/dapr4s-wasm.env +++ b/wasm/dapr4s-wasm.env @@ -10,5 +10,5 @@ # glue), dapr4s-wasm-scalalib-overlay and dapr4s-wasm-linker. # Once released, this file goes away: the header pins a Maven Central release and CI stops building dapr4s. # Read by wasm/scripts/publish-dapr4s-wasm.sh and CI (.github/workflows/e2e.yml, .github/actions/dapr4s-mill-plugin). -DAPR4S_COMMIT=ec5ad2a1557865e289926ab1ff16fd039a18fbe1 +DAPR4S_COMMIT=fdcd67a2d906cb129fc153e6f2466b7905e1ca17 DAPR4S_CORE_RELEASE=3.0.0