---
title: "Postmortem of scala/scala3#24994"
url: https://daily.dev/posts/postmortem-of-scala-scala3-24994-rpajlyqik
source_url: https://www.scala-lang.org/blog/post-mortem-3.8.0.html
type: article
source: "The Scala Programming Language"
published: 2026-08-23T12:17:51.863Z
updated: 2026-08-23T12:25:54.899Z
tags: ["scala"]
reading_time: 7
upvotes: 0
comments: 0
language: 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.

# Postmortem of scala/scala3#24994

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

## Summary

The Scala 3.8.0 release shipped with a bug causing NoSuchFieldError exceptions at runtime, traced to invalid references to private fields in specialized standard library classes copied from Scala 2.13. The bug stemmed from the JVM Bytecode Optimizer inlining private field references differently than Scala 3 compiles them. A hotfix landed in 3.8.1, and both versions were announced together with guidance to upgrade directly to 3.8.1. The core team detailed the timeline, root causes (missing JUnit test porting, a two-month gap before discovery despite a long RC period), the fix (skipping bytecode optimization on copied class files and building them within the compiler repo), and new dedicated tests to prevent recurrence.

## Full article

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

## Questions this post answers

### Why does Scala 3.8.0 throw NoSuchFieldError at runtime for things like Range.grouped or ArrayOps.reverseIterator?

Scala 3.8.0's standard library copied .class files for @specialized members from the Scala 2.13 build that had been processed by the JVM Bytecode Optimizer, which inlines direct references to private fields such as private[this] val _empty. Those inlined references use a qualified name that differs under Scala 3 compilation, causing NoSuchFieldError. It affects a limited set of specialized collection methods and is fixed in 3.8.1.

_Track JVM compatibility bugs like this Scala 3.8.0 issue by following daily.dev for language ecosystem updates._

### Should I upgrade to Scala 3.8.0 or skip straight to 3.8.1?

Upgrade directly to Scala 3.8.1, or 3.8.2 once available, and avoid 3.8.0. Scala 3.8.0 contains a bug where specialized standard library methods throw NoSuchFieldError at runtime due to invalid private field references, though the compiler does not flag it. Libraries already compiled and published with 3.8.0 are not corrupted and remain safe to use.

_Developers planning a Scala upgrade can follow release advisories like this on daily.dev before rolling out._

### How was the Scala 3.8.0 NoSuchFieldError bug fixed in 3.8.1?

The fix stopped running the JVM Bytecode Optimizer on the copied .class files for @specialized standard library members, and those Scala 2 library class files are now built within the Scala 3 compiler repository for full control over their production. This resolved the mismatch in private field references that caused runtime NoSuchFieldError exceptions in 3.8.0.

_Engineers debugging toolchain regressions can follow fixes like this Scala 3.8.1 patch on daily.dev._

---

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

[View this post on daily.dev](https://daily.dev/posts/postmortem-of-scala-scala3-24994-rpajlyqik)
