---
title: "Open-sourcing Metals v2: Databricks’ Java and Scala language server for multi‑million line codebases"
description: "Databricks open-sourced Metals v2, a Scala and Java language server designed to provide low-latency code intelligence for multi-million-line Bazel monorepos, including its 26M-line repository. The project extends Metals v1 by reworking three layers: a build-free, content-addressed mbt repository index; compiler-backed Scala and Java pipelines using a Metals-provided sourcepath; and metadata-first BSP integration that keeps build synchronization off the startup path. Its Java implementation uses javac APIs and a modified Turbine header compiler, which processes close to one million Java lines per second on one thread and supports interactive analysis at nearly 100,000 lines per second in benchmarks. Metals v2 is available in Cursor, VS Code, and Neovim under Apache 2.0, while Databricks reports Cursor’s share of Scala and Java file-open events rising from 40% to 78%."
---

# Open-sourcing Metals v2: Databricks’ Java and Scala language server for multi‑million line codebases

[Databricks](https://yomu.fyi/company/databricks) · Ólafur Páll Geirsson, Iulian Dragos, Alessandro Patti · Aug 11, 2026

**Type:** Announcement

## Summary

Databricks open-sourced Metals v2, a Scala and Java language server designed to provide low-latency code intelligence for multi-million-line Bazel monorepos, including its 26M-line repository. The project extends Metals v1 by reworking three layers: a build-free, content-addressed mbt repository index; compiler-backed Scala and Java pipelines using a Metals-provided sourcepath; and metadata-first BSP integration that keeps build synchronization off the startup path. Its Java implementation uses javac APIs and a modified Turbine header compiler, which processes close to one million Java lines per second on one thread and supports interactive analysis at nearly 100,000 lines per second in benchmarks. Metals v2 is available in Cursor, VS Code, and Neovim under Apache 2.0, while Databricks reports Cursor’s share of Scala and Java file-open events rising from 40% to 78%.

## Context

Databricks wanted to standardize on a lightweight editor while retaining effective navigation for Scala and Java in its large monorepo. Existing JVM language-server approaches did not provide a credible path at multi-million-line monorepo scale, and fast codebase orientation was prioritized because agents write most of the code.

## Approach / What changed

Metals v2 forks Metals v1 and reworks its repository index, Scala and Java compiler pipelines, and build integration boundary. It uses a build-free mbt index for initial project modeling, a Metals-provided sourcepath for interactive compiler features, and BSP primarily for build metadata such as dependencies, generated sources, tests, and debug launchers.

## Takeaways

- The mbt index lets Metals own the initial project model and provide workspace intelligence before build synchronization.
- The Java pipeline uses javac APIs and a default turbine-classpath mode based on a modified Turbine header compiler to avoid pathological symbol loading.
- Databricks’ internal BSP server queries metadata for 285k Bazel JVM targets; build synchronization is user-initiated and stored in incrementally updated JSON snapshots.

**Tags:** [Bazel](https://yomu.fyi/topic/bazel), [Java](https://yomu.fyi/topic/java), [Language Server](https://yomu.fyi/topic/language-server), [Scala](https://yomu.fyi/topic/scala)

- Source: [Databricks](https://www.databricks.com/blog/open-sourcing-metals-v2-databricks-java-and-scala-language-server-multi-million-line-codebases)
- Source URL: https://www.databricks.com/blog/open-sourcing-metals-v2-databricks-java-and-scala-language-server-multi-million-line-codebases
- Ingested by Yomu: 2026-08-30T16:51:38.539Z

[Read original post](https://www.databricks.com/blog/open-sourcing-metals-v2-databricks-java-and-scala-language-server-multi-million-line-codebases)
