Skip to content

REPL still prints LazyVal warnings (because of fansi+pprint) #25508

Description

@jrlawson

Compiler version

3.8.2
JDK 25

Minimized example

given theMagicNumber: Int = 3

Output Error/Warning message

WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
WARNING: sun.misc.Unsafe::objectFieldOffset has been called by scala.runtime.LazyVals$ (file:/home/jamielawson/.cache/coursier/arc/https/github.com/scala/scala3/releases/download/3.8.2/scala3-3.8.2-x86_64-pc-linux.tar.gz/scala3-3.8.2-x86_64-pc-linux/maven2/org/scala-lang/scala-library/3.8.2/scala-library-3.8.2.jar)
WARNING: Please consider reporting this to the maintainers of class scala.runtime.LazyVals$
WARNING: sun.misc.Unsafe::objectFieldOffset will be removed in a future release
lazy val magicNumber: Int


## Why this Error/Warning was not helpful
 
Per my understanding, this was supposed to have been fixed in scala 3.8.0. But it's still there. Supposedly will throw exceptions in JDK 26, so it needs to get resolved.


## Suggested improvement

It could be made more helpful by...
There is supposedly a fix that was introduced in scala 3.8.0. If so, the error has made its way back into scala 3.8.2. 

Metadata

Metadata

Labels

area:jdkIssues tied to artifacts published under a particular jdkarea:replarea:reportingError reporting including formatting, implicit suggestions, etcbetter-errorsIssues concerned with improving confusing/unhelpful diagnostic messagescompat:javaitype:enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions