Add Scala as the third JVM language, bridged to Java and Kotlin
- Dominant language
- C++
- Stars
- 2.1k
- Forks
- 125
- Avg merge
- 5h 42m
- Merged PRs (30d)
- 136
Description
## What is missing
ripwire cannot see a line of Scala. On `main`, a `.scala` file is a `--skipped` row with
`why="unsupported-ext"`, which leaves the Spark, Kafka and Akka/Pekko ecosystems outside every verb.
Scala is the largest language in apache/spark and apache/pekko, and Kafka's `core/src/main` keeps
Java and Scala side by side. This kit adds Scala by the path `prompts/add-a-language.md` documents,
then joins it to the Java/Kotlin call graph.
## The evidence
The grammar facts were read at a pinned tag: tree-sitter-scala is MIT-licensed and ABI 15, inside
the vendored runtime's supported range. The kit records the commit, size, node fields and external
scanner alongside each target repository's license and language breakdown.
The bridge comes with an invariant that must hold and is gated: **adding `.scala` files never
changes a Java-only or Kotlin-only edge.**
The kit also lists plainly what is hard, rather than discovering it later: implicits, extension
methods, companion objects, trait linearization, calls with no call node, arity, and lexically
scoped imports. A Scala-specific STEP 0 measures Scala 2 and Scala 3 separately, and is allowed to
say "not yet".
## Size
**Large**, and best split into two pull requests:
1. the grammar, extraction, disclosure and the collapse family, with Scala outside the bridge;
2. the ordered JVM bridge with its invariant arms.
Expect a vendored grammar of about 27 MB of generated parser, a new extraction module, every
language-registration surface, and a new `test/scalacheck.sh`.
The STEP 0 parse-rate measurement is a useful contribution on its own, before committing to the
rest.
## Prerequisite
PR #126 (Kotlin support), still open — the JVM bridge this kit extends is #126's. STEP 0 needs
nothing from it.
## Where to start
`prompts/help-wanted/scala-jvm-bridge.md` is a self-contained prompt for a coding agent (it has the
agent read `prompts/add-a-language.md` first). It covers the target repositories, the grammar facts
at a pinned tag, the registration surfaces a language must reach, the JVM bridge as #126 leaves it
with a reproduction, the Scala-specific STEP 0, the hard list above, the design space for an ordered
three-language fallback and a third collapse family, the non-negotiables, the acceptance arms, the
traps, and what the PR description must contain. Like every prompt in `prompts/`, **it ends by
writing a plan and stopping** — a maintainer agrees the plan before any code is written.
Comment here to claim it.
Contributor guide
Research direction
Read prompts/add-a-language.md first, then use prompts/help-wanted/scala-jvm-bridge.md as the self-contained map. Start with the Scala 2 and Scala 3 STEP 0 parse-rate measurement; done requires an approved plan before implementation, followed by the documented registration surfaces, test/scalacheck.sh, and acceptance arms including the Java/Kotlin edge invariant.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, java, kotlin, scala
- Domain
- cli, devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100