Add a binary-compatibility check (MiMa), adapted for Mill - #497
Merged
Conversation
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
…cript) 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 Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
📊 Test Compilation Benchmark
Result: Current branch is 0.847s unchanged (0.13%) ℹ️ |
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
./mill show jvm.jarinstead ofscala-cli package --library. Mill 1.x'sshowwraps paths asref:v0:<hash>:<path>— stripped withsed../mill show jvm.compileClasspath(alpaca's actual deps: regex, made, commons) plusscala3-librarypulled in via the old-artifact resolution (scala-cli's coursier shim), since Mill'scompileClasspathdoesn'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 saidcom.halotukozak::alpaca. Fixed upstream in the meantime:v0.2.0now publishes tocom.halotukozak(confirmed live on Maven Central), so this now baselines againstcom.halotukozak:alpaca_3like the README always claimed.Verified locally against the real
com.halotukozak:alpaca_3:0.2.0: backward/forward both OK.🤖 Generated with Claude Code