This is an automated email from the ASF dual-hosted git repository.

He-Pin pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pekko-grpc.git


The following commit(s) were added to refs/heads/main by this push:
     new b8664150 fix: remove -Yfuture-lazy-vals for Scala 3.9+ (#732)
b8664150 is described below

commit b8664150d63d3acc05396f475de40b32e3912712
Author: He-Pin(kerr) <[email protected]>
AuthorDate: Fri Jun 19 01:15:48 2026 +0800

    fix: remove -Yfuture-lazy-vals for Scala 3.9+ (#732)
    
    * fix: remove -Yfuture-lazy-vals for Scala 3.9+
    
    Motivation:
    Scala 3.9.0-RC1 removed the -Yfuture-lazy-vals compiler option (the
    behavior is now the default). Under -Werror, the "bad option" warning
    becomes a compilation error.
    
    Modification:
    Conditionally include -Yfuture-lazy-vals only for Scala 3.x where x < 9.
    
    Result:
    pekko-grpc codegen module compiles cleanly with Scala 3.9.0-RC1.
    
    Tests:
    - sbt "++3.9.0-RC1!; codegen/compile" passes
    
    References: None - Scala 3.9 forward compatibility
    
    * chore: apply scalafmt to project/Common.scala
    
    Motivation:
    CI scalafmt check failed because project/Common.scala was not formatted.
    
    Modification:
    Ran scalafmt on the build file.
    
    Result:
    scalafmtSbtCheck and Code is formatted CI checks should pass.
    
    Tests:
    Not run - formatting only
---
 project/Common.scala | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/project/Common.scala b/project/Common.scala
index e70ba605..eb9a904c 100644
--- a/project/Common.scala
+++ b/project/Common.scala
@@ -54,14 +54,9 @@ object Common extends AutoPlugin {
            "-encoding",
            "UTF-8")
        else
-         Seq(
-           "-unchecked",
-           "-deprecation",
-           "-Werror",
-           "-Wunused:imports",
-           "-Yfuture-lazy-vals",
-           "-encoding",
-           "UTF-8")),
+         Seq("-unchecked", "-deprecation", "-Werror", "-Wunused:imports", 
"-encoding", "UTF-8") ++
+         (if (CrossVersion.partialVersion(scalaVersion.value).exists(_._2 < 
9)) Seq("-Yfuture-lazy-vals")
+          else Seq.empty)),
     Compile / scalacOptions ++=
       (if (!isScala3.value)
          Seq(


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to