Hardening Scoverage Support in Scala 3
Briefly

Hardening Scoverage Support in Scala 3
"A crucial requirement for Scoverage's wide industry adoption is that Scoverage itself is reliable and well-tested. The tool is already tested via its own dedicated test suite - however, that is not enough. Most tricky bugs happen not in isolation but at intersections of language features. Therefore, Scoverage needs to be tested in interaction with all of the language features to be truly considered reliable."
"To guarantee such a level of reliability, we have recently started a systematic rework of the testing strategy for Scoverage. The first step was mapping out the current failures of Scoverage in interaction with other language features. The strategy for that was to enable Scoverage on the existing compiler test suite. This means, in addition to the usual CI run of the tests that we do for each new PR, now we run the same tests again, but with Scoverage enabled."
Scoverage is the standard code coverage tool for Scala, integrated directly into the Scala 3 compiler. Code coverage is essential for organizations, particularly in regulated sectors, to ensure solution reliability. While Scoverage has its own test suite, true reliability requires testing interactions with all language features and ensuring compatibility with future compiler changes. A systematic rework of Scoverage's testing strategy began in 2026. The initial approach involved enabling Scoverage on the existing compiler test suite, running tests with coverage instrumentation to verify the compiler doesn't crash, coverage output files are produced, and output files are valid and deserializable. This process discovered 97 failing tests when coverage instrumentation was enabled.
Read at Scala-lang
Unable to calculate read time
[
|
]