Skip to content

Handle sun.misc.Unsafe in scala3-runtime #3922

@Gedochao

Description

@Gedochao

Why do we actually use Unsafe in Scala CLI? Looks like we might need to remove it if possible

Originally posted by @tgodzik in #3920 (comment)

It seems we retain an old hack for lazy vals, which used to be necessary pre-Scala 3.3.
We need to

  • check if it's still needed for any reason
    • if yes, make sure it'll handle JDK 24+ well (no warnings)
    • if no, perhaps get rid of it altogether

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestjdkissues tied with using a particular JDK

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions