Skip to content
CAI
Software that uses CAICheck a score

scala-garden/mima

61.2

Adequate · 20 September 2026

5.2k

lines of production code

Scala

primary language

1

measurement over time

CAI band scale
CAI lens gauges

What this system is

This system is MiMa, a binary compatibility checker for Scala libraries that analyzes bytecode to detect breaking changes between versions. It provides an sbt plugin and a CLI tool to perform backward and forward compatibility checks on fields, methods, and class hierarchies. The system allows users to configure exclusion filters and binary API definitions to manage expected API evolutions and suppress false positives.

How it got here

2010–2012 — Modernization and CLI introduction

8 changes.

The project underwent a comprehensive modernization, migrating the build system to sbt 1.x and upgrading to Scala 3 while refactoring the core binary compatibility engine for improved accuracy. This period also saw the introduction of a new command-line interface for standalone checks and the standardization of development tooling and governance across the repository.

2016–2019 — Core analysis refactoring and test expansion

16 changes.

The project refactored its core binary compatibility engine into specialized checkers for fields, methods, and templates, while introducing forward compatibility support and configurable exclusion annotations. This structural overhaul was accompanied by a significant expansion of the test suite, including the migration of functional tests to pure Scala and the addition of comprehensive integration tests for new filtering and configuration features.

2020–2026 — Integration test expansion

6 changes.

This period focused on expanding the integration test suite to cover new environments and edge cases, including Scala 3 compatibility, platform-specific artifact resolution, and POM-only projects. Additional tests were added to validate CLI error handling and binary API filtering mechanisms, ensuring robust verification of the plugin's behavior across diverse scenarios.

Features

Introduce MiMa CLI for binary compatibility checking

A new command-line interface (CLI) has been added to MiMa, allowing users to run binary compatibility checks directly from the terminal. The \MimaCli\ tool accepts old and new binary files (JARs or directories) and supports options to filter for forward or backward compatibility issues, include generic signature problems, display bytecode names, show verbose descriptions, and print suggested exclusion filters. It provides specific exit codes (0 for compatible, 1 for incompatible, 2 for usage errors) to facilitate integration into build pipelines and scripts.

repository · high confidence

Support for loading binary compatibility filters from external files

The sbt-mima-plugin now allows users to define backward and forward compatibility exclusion filters in external text files (located in src/main/mima-filters) rather than only via build configuration. This enables filtering specific API changes—such as missing methods or signature mismatches—by listing them in dedicated exclude files, which the plugin reads during the binary compatibility check.

sbtplugin/src/sbt-test/sbt-mima-plugin/backward-filters-from-file · high confidence

Removals

Removal of legacy MiMa core implementation files

The core implementation files for the MiMa binary compatibility checker in \src/main/scala/ssol/tools/mima\ have been removed. This includes the class file parser (\ClassfileParser\), transformer (\ClassfileTransformer\), and fixer (\Fix\), as well as supporting data structures for class, package, and member information (\ClassInfo\, \PackageInfo\, \MemberInfo\) and utility classes for configuration, settings, and problem reporting. This deletion eliminates the internal logic responsible for parsing Java class files, analyzing binary compatibility differences between old and new versions, and generating fixed class files.

src/main · high confidence

Behavioural changes

Add template-level compatibility checking for class hierarchy changes

The MiMa core now includes a new TemplateChecker that validates structural compatibility between old and new class definitions. This check detects breaking changes such as modifications to the trait/interface status, visibility reductions, unexpected abstraction or finality, cyclic type references, and the removal of superclasses or interfaces. It also verifies that parent type arguments in generic signatures remain compatible, ensuring that changes to class hierarchies are caught during binary compatibility analysis.

core/src/main/scala/com/typesafe/tools/mima/lib/analyze/template · high confidence

Binary API filtering and classfile parsing engine refactored

The core analysis engine has been refactored to improve binary compatibility checking accuracy and performance. A new \BinaryApi\ system allows users to explicitly keep definitions in the API surface even if they are no longer exposed in source code, preventing false positives for definitions that clients still hold references to. The classfile parser has been rewritten to replace the previous homegrown UTF-8 decoding with a dedicated \ByteCodecs\ implementation, and the \MemberInfo\ structure has been split into distinct \MethodInfo\ and \FieldInfo\ classes to better handle member-specific logic, such as ignoring static forwarders and correctly identifying extension methods.

core/src/main/scala/com/typesafe/tools/mima/core · high confidence

Introduce dedicated field compatibility checking

A new FieldChecker component has been added to the core analysis engine to specifically validate binary compatibility of class fields. This change introduces logic to detect missing fields, inaccessible fields, incompatible field types, and incorrect static/virtual modifiers, providing more granular and accurate reporting for field-level changes compared to previous generic checks.

core/src/main/scala/com/typesafe/tools/mima/lib/analyze/field · high confidence

Logging implementation moved to internal package with new log levels

The internal logging mechanism has been refactored into a new \com.typesafe.tools.mima.core.util.log\ package, introducing a \Logging\ trait and a \ConsoleLogging\ implementation. This change adds support for \verbose\ and \debug\ log levels (with debug output disabled by default) alongside existing \warn\ and \error\ methods, and restricts the logging API to internal use only.

core/src/main/scala/com/typesafe/tools/mima/core/util · high confidence

MiMa sbt plugin refactored for Scala 3 and sbt 1.x compatibility

The MiMa sbt plugin has been rewritten as an AutoPlugin to support Scala 3 and modern sbt versions (1.x/2.x), replacing the previous implementation. This change introduces new configuration keys for managing binary compatibility checks, including support for forward compatibility checks, versioned issue filters, and configurable dependency resolution. The plugin now differentiates between unset and empty previous artifacts, allows filtering issues via files in a specified directory, and provides better error reporting and logging for build failures.

sbtplugin/src/main · high confidence

MiMa settings are now configurable at the build level

Users can now define MiMa configuration keys such as \mimaPreviousArtifacts\ and \mimaBinaryIssueFilters\ using \ThisBuild\ scope, allowing these settings to be applied globally across all projects in a multi-project build rather than being restricted to individual project scopes. The test suite also verifies that \mimaReportSignatureProblems\ is available as a build-level setting, enabling users to control signature checking behavior consistently across the entire build.

sbtplugin/src/sbt-test/sbt-mima-plugin/build-level-keys · high confidence

MiMaLib now supports forward compatibility checks and configurable exclusion annotations

The MiMaLib core class has been refactored to support forward compatibility checks via a new \forwards\ parameter in \collectProblems\, which filters out problems that only guard later releases when comparing an earlier version against a newer one. Additionally, the class now accepts a \binaryApi\ specification and configurable exclusion annotations (\excludeAnnots\), allowing users to customize which API changes are ignored during the comparison. The class also handles POM-only modules by creating empty package definitions when a directory or JAR is not found, ensuring the analysis proceeds without failure for such modules.

core/src/main/scala/com/typesafe/tools/mima/lib · high confidence

Migrate build to sbt 1.13 and modernize plugin configuration

The project build has been upgraded from sbt 0.7.4 to sbt 1.13.0, requiring a migration of the build definition from the legacy \project/build/\.scala\ structure to the modern \project/\.scala\ and \project/plugins.sbt\ layout. This change introduces \sbt-mima-plugin\ version 1.2.0 for binary compatibility checking, \sbt-ci-release\ 1.12.1 for release automation, and \sbt-scalafmt\ 2.6.2 for code formatting. The migration includes configuring MiMa to report signature problems and filtering specific binary incompatibilities related to internal class info and member info changes, while also enabling strict compiler warnings via \-Xfatal-warnings\.

project · high confidence

Migrate functional tests to pure Scala code

The functional test infrastructure in \functional-tests/src/main\ has been rewritten from HOCON-based configuration to pure Scala code. This change introduces new test runners (\UnitTests\, \IntegrationTests\) and core test components (\TestCase\, \CollectProblemsTest\, \AppRunTest\) that handle compilation, execution, and binary compatibility checks directly in Scala, replacing the previous configuration-driven approach.

functional-tests/src/main · high confidence

Project reorganization and standardization of development tooling

The repository has been restructured to standardize development workflows and clarify project organization. A new \.scalafmt.conf\ file enforces code formatting rules (version 3.11.5) and excludes generated test fixtures from formatting checks, while \.git-blame-ignore-revs\ is introduced to ignore historical formatting commits. The project structure is now explicitly documented in \CONTRIBUTING.md\, detailing the separation into \mima-core\ and \sbt-mima-plugin\ modules, and defining the functional test suite structure (\functional-tests\) with specific oracle files (\problems.txt\) and app execution fixtures. Additionally, standard OSS governance files (\CODE\_OF\_CONDUCT.md\, \LICENSE\, \NOTICE\) and a \RELEASING.md\ checklist have been added, and \.scala-steward.conf\ is configured to pin the sbt version to 1.x to maintain compatibility with the Scala 2 community build.

(repo-wide) · high confidence

Refactored core analysis into specialized checkers

The core analysis logic has been restructured to separate concerns, with the Analyzer now delegating to specific checkers for templates, fields, and methods. This change introduces configurable exclusion annotations, allowing users to filter out problems based on annotations present on the old class, its outer chain, or its companion/module classes. The analyzer also now explicitly handles cases where a class is no longer checked due to visibility changes or missing bytecode, ensuring more accurate reporting of binary compatibility issues.

core/src/main/scala/com/typesafe/tools/mima/lib/analyze · high confidence

Refined binary compatibility checks for method signatures and hierarchy changes

MiMa now performs more precise analysis of method changes by parsing and comparing signatures rather than relying solely on descriptors, which reduces false positives for generic type changes. The tool also detects when a public method is narrowed to private (binary breaking), flags when a hierarchy becomes sealed (closed), and correctly identifies incompatible result types in overridden methods. Additionally, it handles edge cases such as mixin forwarders, deferred methods in traits, and new abstract methods inherited from new supertypes, providing clearer error messages for these specific binary incompatibilities.

core/src/main/scala/com/typesafe/tools/mima/lib/analyze/method · high confidence

Test coverage

Added CLI validation tests for missing files and exit codes; Added Scala 3 compatibility test for sbt-mima-plugin; Added integration tests for Scala 2.12 binary compatibility; Added sbt-mima plugin test cases for versioned issue filters; Added test for MIMA binary compatibility on POM-only projects; Added test for Scala 3 platform-specific artifact resolution; Added test for backward compatibility of abstract methods; Added test for inherited method detection in sbt-mima-plugin; Added test for wildcard support in MiMA filter files; Added test suite for core binary compatibility analysis logic; Expanded functional tests for binary compatibility and API evolution; Test coverage for binary API filtering from external file; Test coverage for per-version backward filter directories; Test for mimaPreviousArtifacts unset vs empty behavior.

Dependencies

Upgrade to MUnit 1.3.6 and update Scala 3.3.8

The build system now uses MUnit 1.3.6 for testing across the core, CLI, and test modules, replacing previous versions. Additionally, the default Scala 3 version for the core library and CLI has been updated to 3.3.8 (LTS), while the sbt plugin continues to target Scala 3.8.4 for compatibility with sbt 2. The functional and integration test modules also leverage the new MUnit version and support Scala 2.12.21 and 2.13.18.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Baseline

  • First survey — no prior run to compare against. CAI 61.

Lenses

  • Code Health 92
  • Architecture 100
  • Maturity 56
  • Readiness 51
  • Security 75

Changes since last survey

  • 300 commits — 287 feature/other, 13 fixes

By area

  • (repo) — 121 commits
  • functional-tests/src — 62 commits
  • (root) — 41 commits
  • project/build.properties — 24 commits
  • core/src — 19 commits
  • project/plugins.sbt — 11 commits
  • sbtplugin/src — 9 commits
  • .github/workflows — 7 commits
  • cli/src — 4 commits
  • project/MimaSettings.scala — 2 commits

Notable commits

  • fix: Merge pull request #918 from halotukozak/fix/tasty-into-modifier-tag
  • fix: Merge pull request #968 from lrytz/t301-fix
  • fix: Merge pull request #976 from lrytz/fix-975
  • fix: Merge pull request #978 from mkurz/fix-escape-analysis-memory
  • fix: Merge pull request #981 from lrytz/fix-980
  • fix: Merge pull request #982 from lrytz/fix-scala3-library-reports
  • fix: Merge pull request #991 from lrytz/escape-route-fixes
  • fix: fix
  • fix: fix CI
  • fix: fix Steward config
  • fix: fix Steward config
  • fix: fix jvm/scala version matrix for publishing
  • fix: fix project names
  • change: Accept a pasted filter line in a filters file
  • change: Add CLI readme
  • change: Add Problem.isExternallyAccessible
  • change: Add new TASTy tags: TRACKED, SUBMATCH, INTO, EXPLICITtpt, ELIDED, QUOTE, SPLICE, APPLYsigpoly, QUOTEPATTERN, SPLICEPATTERN, FLEXIBLEtype
  • change: Avoid an adapted-argument warning on sbt 1
  • change: Avoid circular lazy val evaluation in TastyUnpickler
  • change: CLI: error on a non-existent oldfile/newfile
  • …and 280 more

Architecture

  • 0 containers · 1 bounded contexts · 0 dependency edges (baseline)

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

scala-garden/mima was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 20 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 9ef697cdb3e972d56e34d7690a4c21ffda5add6e — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-b51f968c9b10.