Skip to content
CAI
Software that uses CAICheck a score

scala/scala-java8-compat

61.6

Adequate · 20 September 2026

8.8k

lines of production code

Scala

with Java

1

measurement over time

CAI band scale
CAI lens gauges

What this system is

This system is a compatibility library that enables seamless interoperability between Scala collections and Java 8 APIs. It provides utilities for converting Scala types such as Option, Future, and collections into their Java counterparts like Optional, CompletableFuture, and Streams. The library supports multiple Scala versions, including 2.11, 2.12, 2.13, and 3, with specific implementations to handle differences in the standard library.

Features

Added Java 8 Streams compatibility benchmark suite

The benchmark module now includes a complete JMH-based suite for semi-manually benchmarking the Java 8 streams compatibility layer in Scala collections. This addition introduces code generation tools (CodeGen.scala) to create benchmark targets, source generators (CollectionSource.scala) for various collection types (including Java ArrayList/LinkedList and Scala collections), and operation definitions (Operations.scala) for metrics like sum, filter/map/sum, and trigonometry. It also provides a log parser (ParseJmhLog.scala) to visualize performance comparisons between base collections, iterators, steppers, and streams. Initial benchmark results and documentation are included to guide users through the computationally expensive process.

benchmark · high confidence

New Java 8 Stream and Iterator conversion utilities for Scala collections

This release adds comprehensive support for converting Scala collections to Java 8 Streams and primitive iterators, enabling seamless interoperability with Java's Stream API. For Scala 2.13+, the \scala.compat.java8.StreamConverters\ trait provides extension methods like \seqStream\ and \parStream\ on \IterableOnce\, \Map\, and \Stepper\ types, leveraging the new \Stepper\ infrastructure for efficient parallel processing. For Scala 2.12 and earlier, \ScalaStreamSupport\ offers static utility methods to create streams from specific collection types (e.g., \IndexedSeq\, \HashMap\, \Vector\), with specialized handling for keys and values. Additionally, new wrapper classes (\IteratorPrimitiveIntWrapper\, \IteratorPrimitiveLongWrapper\, \IteratorPrimitiveDoubleWrapper\) implement \java.util.PrimitiveIterator\ interfaces, allowing Scala iterators to be used directly with Java's primitive stream operations. These changes are located in \src/main/scala-2.13+/scala/compat/java8/\ and \src/main/scala-2.13-/scala/compat/java8/\, providing version-specific implementations for the conversion layer.

src/main · high confidence

Behavioural changes

Library rebranded to scala-java8-compat with expanded documentation and license change

The project has been renamed to scala-java8-compat and its license changed to Apache 2.0, accompanied by a comprehensive update to the README that clarifies the library's purpose as a Java 8 compatibility kit for Scala 2.11 and 2.12 (noting that Scala 2.13+ users should use scala.jdk). The documentation now details the full suite of converters, including those for scala.Option to java.util.Optional, scala.concurrent.Future to java.util.concurrent, and Scala collections to Java 8 Streams, along with usage examples for both Scala and Java.

(repo-wide) · high confidence

Replaced build infrastructure with new code generation and sbt 1.13

The build definition has been restructured to use sbt 1.13.0 and the sbt-scala-module plugin 3.4.1. The previous code generation approach, which relied on scala-compiler and scala-reflect dependencies, has been removed and replaced with new Scala source files (CodeGen.scala and WrapFnGen.scala) that generate specialized functional interfaces and Java/Scala converters directly. This change simplifies the build by eliminating heavy compiler dependencies and updates the underlying build tooling.

project · high confidence

Test coverage

Added test coverage for Java 8 compatibility converters; Added test coverage for Java 8 compatibility library; Added tests for Java 8 Stream and Stepper converters; Added tests for Java 8 lambda deserialization.

Dependencies

Upgrade to Scala 2.13.18, 2.12.21, 3.3.8 and update test dependencies

The project has updated its supported Scala versions to 2.13.18, 2.12.21, 2.11.12, and 3.3.8. Additionally, test dependencies have been updated, including JUnit to 4.13.2, Commons Lang3 to 3.12.0, and JUnit Interface to 0.13.3.

(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 62.

Lenses

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

Changes since last survey

  • 300 commits — 294 feature/other, 6 fixes

By area

  • (root) — 105 commits
  • project/build.properties — 83 commits
  • (repo) — 73 commits
  • project/plugins.sbt — 18 commits
  • src/main — 9 commits
  • .github/workflows — 8 commits
  • fnGen/WrapFnGen.scala — 3 commits
  • src/test — 1 commit

Notable commits

  • fix: Fix the DurationConverters import in README
  • fix: Fixed NPE in VectorStepper due to dirty display vector.
  • fix: Merge pull request #122 from SethTisue/fix-string-lines
  • fix: another publishing fix (#223)
  • fix: fix backpublishing (copy changes from scala-xml repo) (#222)
  • fix: use .linesIterator to work around scala/bug#11125
  • change: Add build status icon
  • change: Add java 21 to build matrix (#301)
  • change: Add java 25 to build matrix
  • change: Add maven release badge for 2.13 in README.md
  • change: Add test case for issue #247
  • change: AdoptOpenJDK is now Temurin (#249)
  • change: CI: do full publishLocal in checks
  • change: Extend copyright into 2026 (#344)
  • change: Fix a typo
  • change: Import travis caching config and JDK install from scala-dev
  • change: Import travis caching config and JDK install from scala-dev (#171)
  • change: Integrate 2.13.x branch into master
  • change: Merge branch 'main' into update/sbt-scala-module-2.3.0
  • change: Merge branch 'master' into update/genjavadoc-plugin-0.14
  • …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/scala-java8-compat 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 74b3cbdd84fda7277e7c31ec5660cb1dc6d0bb42 — 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.