You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pekko.apache.org by en...@apache.org on 2024/10/07 12:10:46 UTC

(pekko) branch main updated: Update scala3-library to 3.3.4 (#1506)

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

engelen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pekko.git


The following commit(s) were added to refs/heads/main by this push:
     new fd9a0a4fc0 Update scala3-library to 3.3.4 (#1506)
fd9a0a4fc0 is described below

commit fd9a0a4fc0808b7dd890a4769705a0840c1ea9ae
Author: scala-steward-asf[bot] <14...@users.noreply.github.com>
AuthorDate: Mon Oct 7 14:10:40 2024 +0200

    Update scala3-library to 3.3.4 (#1506)
    
    * Update scala3-library to 3.3.4
    
    * correctly determine logger class for Scala 3.3.4 stacktraces
    
    Co-Authored-By: Wojciech Mazur <wm...@virtuslab.com>
    
    ---------
    
    Co-authored-by: scala-steward-asf[bot] <14...@users.noreply.github.com>
    Co-authored-by: Arnout Engelen <ar...@bzzt.net>
    Co-authored-by: Wojciech Mazur <wm...@virtuslab.com>
---
 .../apache/pekko/actor/typed/internal/LoggerClass.scala  | 16 +++++++++++++++-
 project/Dependencies.scala                               |  2 +-
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/LoggerClass.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/LoggerClass.scala
index 6fd02e3560..6d0074aafc 100644
--- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/LoggerClass.scala
+++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/LoggerClass.scala
@@ -58,7 +58,21 @@ private[pekko] object LoggerClass {
         if (!skip(name)) suitableClass = OptionVal.Some(clazz)
         idx += 1
       }
-      suitableClass.getOrElse(default)
+      suitableClass match {
+        case OptionVal.Some(cls) =>
+          // Fix start
+          val lambdaClsOwner = for {
+            nextCaller <- trace.lift(idx)
+            nextName = nextCaller.getName()
+            lambdaNameIdx = nextName.indexOf("$$Lambda$")
+            if nextName.startsWith(cls.getName()) && lambdaNameIdx > 0
+            lambdaClsOwner = nextName.substring(0, lambdaNameIdx)
+          } yield Class.forName(lambdaClsOwner)
+          // TODO: can potentially guard for ClassNotFoundException, but seems unlikely
+          lambdaClsOwner.getOrElse(cls)
+        case _ =>
+          default
+      }
     } catch {
       case NonFatal(_) => default
     }
diff --git a/project/Dependencies.scala b/project/Dependencies.scala
index ca1365d4a6..b49fd47268 100644
--- a/project/Dependencies.scala
+++ b/project/Dependencies.scala
@@ -43,7 +43,7 @@ object Dependencies {
 
   val scala212Version = "2.12.20"
   val scala213Version = "2.13.14"
-  val scala3Version = "3.3.3"
+  val scala3Version = "3.3.4"
   val allScalaVersions = Seq(scala213Version, scala212Version, scala3Version)
 
   val reactiveStreamsVersion = "1.0.4"


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pekko.apache.org
For additional commands, e-mail: commits-help@pekko.apache.org