<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/hardening-scoverage-support-in-scala-3-olua4u30p" -->

---
title: Hardening Scoverage Support in Scala 3 | daily.dev
description: The Scala Center reports progress on hardening Scoverage, the standard code coverage tool built into the Scala 3 compiler, under a Sovereign Tech Fund-funded...
canonical: https://daily.dev/posts/hardening-scoverage-support-in-scala-3-olua4u30p
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Hardening Scoverage Support in Scala 3 | daily.dev
og:description: The Scala Center reports progress on hardening Scoverage, the standard code coverage tool built into the Scala 3 compiler, under a Sovereign Tech Fund-funded...
og:url: https://daily.dev/posts/hardening-scoverage-support-in-scala-3-olua4u30p
og:image: https://api.daily.dev/og/posts/oluA4U30p.png
og:image:alt: Hardening Scoverage Support in Scala 3
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Hardening Scoverage Support in Scala 3

**[The Scala Programming Language](https://daily.dev/sources/scala-lang)** · 5 min read · 0 upvotes · 0 comments

## Summary

The Scala Center reports progress on hardening Scoverage, the standard code coverage tool built into the Scala 3 compiler, under a Sovereign Tech Fund-funded effort. Enabling coverage testing across the compiler's own test suite uncovered 97 failing tests. A major root cause was traced to interaction between coverage instrumentation and Scala 3's capability system, where erased values must remain pure; the fix skips instrumentation for erased values, fixing 23 tests. Expanding testing to more suites uncovered 13 further breakages, with work ongoing and community feedback requested.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.scala-lang.org/blog/2026/03/11/scoverage.html>

## Questions this post answers

### Why does Scoverage coverage instrumentation break Scala 3 code that uses capabilities and erased values?

Coverage instrumentation injects calls into compiled code to record executed expressions, and these injected calls introduce side effects. Since Scala 3's capability system represents capabilities as erased values that must be pure with no side effects, the compiler's erasure phase rejected instrumented code with a compilation error. The fix makes the coverage instrumentation phase check whether a value is erased and skip instrumenting it, fixing 23 previously failing tests.

_Developers hardening test coverage on Scala 3 capability-based code can follow tooling fixes like this via daily.dev._

### How many compiler tests failed when Scoverage coverage instrumentation was enabled on the Scala 3 compiler test suite?

97 tests failed when coverage instrumentation was switched on across the existing Scala 3 compiler test suite, checking that the compiler doesn't crash, that a coverage output file is produced, and that the file is valid and deserializable. Those failing tests were temporarily disabled to let validation logic merge early while fixes are prioritized by impact.

_Teams relying on Scoverage for regulated or enterprise Scala projects can track this hardening effort on daily.dev._

## Similar posts on daily.dev

- [The Sovereign Tech Fund invests in Scala](https://daily.dev/posts/the-sovereign-tech-fund-invests-in-scala-lxykvgrao) · Hacker News · 1 upvotes · 0 comments
- [Scala 3.9 LTS released\!](https://daily.dev/posts/scala-3-9-lts-released--qzsoaklif) · The Scala Programming Language · 0 upvotes · 0 comments
- [The IntelliJ Scala Plugin Blog](https://daily.dev/posts/the-intellij-scala-plugin-blog-dj1ylblme) · JetBrains · 0 upvotes · 0 comments
- [Scala 3 slowed us down?](https://daily.dev/posts/scala-3-slowed-us-down--a2y88frfv) · Hacker News · 2 upvotes · 0 comments
- [How We Increased Code Coverage by 28% Without Writing a Single Test](https://daily.dev/posts/how-we-increased-code-coverage-by-28-without-writing-a-single-test-cupckwgud) · Salesforce Engineering · 25 upvotes · 1 comments

---

Tags: [#testing](https://daily.dev/tags/testing), [#scala](https://daily.dev/tags/scala)

[View this post on daily.dev](https://daily.dev/posts/hardening-scoverage-support-in-scala-3-olua4u30p)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Hardening Scoverage Support in Scala 3","url":"https://daily.dev/posts/hardening-scoverage-support-in-scala-3-olua4u30p","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/hardening-scoverage-support-in-scala-3-olua4u30p"},"datePublished":"2026-08-23T12:17:17.599Z","dateModified":"2026-08-23T12:21:26.043Z","description":"The Scala Center reports progress on hardening Scoverage, the standard code coverage tool built into the Scala 3 compiler, under a Sovereign Tech Fund-funded...","image":"https://media.daily.dev/image/upload/s--ZrL_HSsR--/f_auto/v1722860399/public/Placeholder%2006","thumbnailUrl":"https://media.daily.dev/image/upload/s--ZrL_HSsR--/f_auto/v1722860399/public/Placeholder%2006","isAccessibleForFree":true,"articleSection":"The Scala Programming Language","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"The Scala Programming Language","logo":"https://media.daily.dev/image/upload/s--4Bql-UcX--/f_auto,q_auto/v1787487426/logos/scala-lang?_a=BAMAMicg0","url":"https://daily.dev/sources/scala-lang"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/hardening-scoverage-support-in-scala-3-olua4u30p","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"testing,scala","timeRequired":"PT5M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"The Scala Programming Language","item":"https://daily.dev/sources/scala-lang"},{"@type":"ListItem","position":3,"name":"Hardening Scoverage Support in Scala 3"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/hardening-scoverage-support-in-scala-3-olua4u30p#faq","mainEntity":[{"@type":"Question","name":"Why does Scoverage coverage instrumentation break Scala 3 code that uses capabilities and erased values?","acceptedAnswer":{"@type":"Answer","text":"Coverage instrumentation injects calls into compiled code to record executed expressions, and these injected calls introduce side effects. Since Scala 3's capability system represents capabilities as erased values that must be pure with no side effects, the compiler's erasure phase rejected instrumented code with a compilation error. The fix makes the coverage instrumentation phase check whether a value is erased and skip instrumenting it, fixing 23 previously failing tests. Developers hardening test coverage on Scala 3 capability-based code can follow tooling fixes like this via daily.dev."}},{"@type":"Question","name":"How many compiler tests failed when Scoverage coverage instrumentation was enabled on the Scala 3 compiler test suite?","acceptedAnswer":{"@type":"Answer","text":"97 tests failed when coverage instrumentation was switched on across the existing Scala 3 compiler test suite, checking that the compiler doesn't crash, that a coverage output file is produced, and that the file is valid and deserializable. Those failing tests were temporarily disabled to let validation logic merge early while fixes are prioritized by impact. Teams relying on Scoverage for regulated or enterprise Scala projects can track this hardening effort on daily.dev."}}]}
```

