You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pekko.apache.org by he...@apache.org on 2026/06/14 10:26:09 UTC
(pekko-connectors) branch add-future-lazy-vals created (now 35c09ebf1)
This is an automated email from the ASF dual-hosted git repository.
He-Pin pushed a change to branch add-future-lazy-vals
in repository https://gitbox.apache.org/repos/asf/pekko-connectors.git
at 35c09ebf1 feat: Add -Yfuture-lazy-vals for Scala 3.3.x builds
This branch includes the following new commits:
new 35c09ebf1 feat: Add -Yfuture-lazy-vals for Scala 3.3.x builds
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pekko.apache.org
For additional commands, e-mail: commits-help@pekko.apache.org
(pekko-connectors) 01/01: feat: Add -Yfuture-lazy-vals for Scala 3.3.x builds
Posted by he...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
He-Pin pushed a commit to branch add-future-lazy-vals
in repository https://gitbox.apache.org/repos/asf/pekko-connectors.git
commit 35c09ebf10db110be276d86277ee15aaecff5a26
Author: 虎鸣 <he...@alibaba-inc.com>
AuthorDate: Sun Jun 14 18:25:49 2026 +0800
feat: Add -Yfuture-lazy-vals for Scala 3.3.x builds
Motivation:
The Scala 3.3.8 compiler introduced the -Yfuture-lazy-vals flag to
optionally use VarHandle instead of sun.misc.Unsafe for lazy val
implementation. This prepares libraries for upcoming JDK releases
that restrict sun.misc.Unsafe access.
Modification:
Add -Yfuture-lazy-vals to scalacOptions, conditionally applied only
for Scala 3.3.x via CrossVersion.partialVersion or scalaBinaryVersion.
Result:
Scala 3.3.x build uses the future-proof VarHandle-based lazy val
implementation, compatible with all JDK 9+ versions including future
releases that restrict sun.misc.Unsafe.
References:
Refs scala/scala3-lts#637
Refs apache/pekko#3059
---
project/Common.scala | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/project/Common.scala b/project/Common.scala
index d75a307cd..61391a98a 100644
--- a/project/Common.scala
+++ b/project/Common.scala
@@ -67,6 +67,10 @@ object Common extends AutoPlugin {
"-Wconf:cat=unused-nowarn:s",
"-Wconf:msg=Prefer the Scala annotation over Java's `@Deprecated`:s",
"-release:17"),
+ scalacOptions ++= {
+ if (isScala3.value) Seq("-Yfuture-lazy-vals")
+ else Seq.empty
+ },
Compile / doc / scalacOptions := scalacOptions.value ++ Seq(
"-doc-title",
"Apache Pekko Connectors",
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pekko.apache.org
For additional commands, e-mail: commits-help@pekko.apache.org