Skip to content

SYSTEM Cited by 1 source

Metals v2

Metals v2 is Databricks' fork-and-rework of Metals, the widely-used open-source Scala language server, extended with first-class Java support and re-architected to deliver low-latency code intelligence across a 26M-line Bazel monorepo. It is open-sourced under Apache 2.0 and ships in Cursor, VS Code, and Neovim; ongoing development is led by VirtusLab. Early external adoption includes Stripe. (Source: sources/2026-08-11-databricks-open-sourcing-metals-v2)

Why it exists

Most code at Databricks is now written by agents; when engineers go hands-on they want lightweight editors with fast startup, not IntelliJ. But Scala/Java navigation at monorepo scale was IntelliJ's last stronghold. Metals v2 targets a single north-star metric — time-to-initial-intelligence (TTII) — because agent-heavy workflows need fast codebase orientation more than exhaustive completion/refactoring coverage.

Three reworked layers

  1. Build-free repo index — removes the Build Server Protocol (BSP) from the startup critical path by indexing workspace sources directly with its own mbt index. Metals now owns the initial project model instead of waiting for the build server (build-free-repo-index).
  2. Compiler-backed interactive pipelines — a single Scala presentation compiler holds the full 24M lines in scope; the Java pipeline is implemented directly on javac APIs plus Turbine. Both use a Metals-provided sourcepath so diagnostics reflect on-disk code, not a stale last-good compilation.
  3. Metadata-first build integration — still uses BSP, but with a narrower contract: routine diagnostics leave the build server, which is queried mostly for metadata (dependencies, generated sources, test discovery, debug launchers) (metadata-first-build-integration).

Operating envelope (Databricks monorepo)

Metric Value
Codebase 26M lines (24M Scala) across 142k+ files
Symbols indexed 2.9M
Persisted mbt index size 936MB uncompressed
Clean index build 22s @ 32 cores
Parse pre-built index from disk 5s
TTII p50 8.7s, p90 36.7s
Fuzzy symbol search (2.9M symbols) p50 10ms, p90 95ms
Scala diagnostics p50 0.9s, p90 8.9s
Scala jump-to-definition p50 7ms, p90 575ms
Bazel targets queried via BSP 285k

Adoption

By July 2026, 92% of weekly active IDE users open Cursor vs 12% for IntelliJ; Cursor's share of Scala/Java file-open events rose from 40% → 78%. Databricks did not renew most IntelliJ seats this year.

Seen in

Last updated · 766 distilled / 2,225 read