Skip to content

Add a binary-compatibility check (MiMa), adapted for Mill - #497

Merged
halotukozak merged 3 commits into
mainfrom
add-mima-binary-check
Aug 28, 2026
Merged

Add a binary-compatibility check (MiMa), adapted for Mill#497
halotukozak merged 3 commits into
mainfrom
add-mima-binary-check

Conversation

@halotukozak

@halotukozak halotukozak commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

Mirrors the setup validated on halotukozak-com/commons#38, adapted for Mill (alpaca doesn't get this via the halotukozak-com/.github sync — that group only covers the scala-cli repos). Report-only: manages a needs-major PR label on a real backward binary break, never fails the build.

Differences from the scala-cli version

  • New JAR comes from ./mill show jvm.jar instead of scala-cli package --library. Mill 1.x's show wraps paths as ref:v0:<hash>:<path> — stripped with sed.
  • Shared classpath comes from ./mill show jvm.compileClasspath (alpaca's actual deps: regex, made, commons) plus scala3-library pulled in via the old-artifact resolution (scala-cli's coursier shim), since Mill's compileClasspath doesn't list the Scala standard library separately.

The check script itself (.mima/bin-compat-check.scala, mima-core's API) is identical to the scala-cli version.

Namespace note (resolved)

Originally baselined against io.github.halotukozak — that's where alpaca was actually publishing (confirmed via Sonatype logs), even though the README said com.halotukozak::alpaca. Fixed upstream in the meantime: v0.2.0 now publishes to com.halotukozak (confirmed live on Maven Central), so this now baselines against com.halotukozak:alpaca_3 like the README always claimed.

Verified locally against the real com.halotukozak:alpaca_3:0.2.0: backward/forward both OK.

🤖 Generated with Claude Code

halotukozak and others added 3 commits August 28, 2026 20:05
Mirrors the setup validated on halotukozak-com/commons#38 (which alpaca
doesn't get automatically — no scala-cli, no `com.halotukozak::` sync
group applies here). Report-only: manages a needs-major PR label on a
real *backward* binary break, never fails the build.

Differences from the scala-cli version:
- New JAR comes from `./mill show jvm.jar` instead of
  `scala-cli package --library`. Mill 1.x's `show` wraps paths as
  `ref:v0:<hash>:<path>` / `qref:v1:<hash>:<path>` — stripped with sed.
- Shared classpath comes from `./mill show jvm.compileClasspath` (alpaca's
  actual deps: regex, made, commons) plus scala3-library from the
  old-artifact resolution (scala-cli's coursier shim), since Mill's
  compileClasspath doesn't list the Scala standard library separately.
- Baseline org is `io.github.halotukozak`, not `com.halotukozak`: alpaca's
  publish.yml actually publishes there (confirmed from Sonatype logs —
  "Successfully published io.github.halotukozak.alpaca_3-0.1.4"), even
  though the README says `com.halotukozak::alpaca`. `com.halotukozak:alpaca_3`
  doesn't exist on Maven Central at all. That mismatch is a separate issue
  worth fixing on its own.

The check itself (.mima/bin-compat-check.scala, mima-core's API) is
identical to the scala-cli version — no alpaca-specific logic needed there.

Verified locally: v0.1.4 -> HEAD correctly reports 192 backward problems
(the internal.parser package has been substantially reworked since).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019awuXm5QZgXajLw3PvGo1s
alpaca now publishes under com.halotukozak (confirmed live on Maven
Central: com.halotukozak:alpaca_3:0.2.0). Drop the io.github.halotukozak
workaround and its explanatory comment.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019awuXm5QZgXajLw3PvGo1s
@codecov

codecov Bot commented Aug 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions

github-actions Bot commented Aug 28, 2026

Copy link
Copy Markdown

📊 Test Compilation Benchmark

Branch Average Time
Base (main) 630.466s
Current (add-mima-binary-check) 631.313s

Result: Current branch is 0.847s unchanged (0.13%) ℹ️

@halotukozak
halotukozak merged commit 86df91c into main Aug 28, 2026
5 checks passed
@halotukozak
halotukozak deleted the add-mima-binary-check branch August 28, 2026 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant