You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The existing ThreadPoolConfigCopyAdvice kamon-pekko doesn't work for Pekko 1.1 when Scala 2.13 is used. Pekko 1.1 has Scala 2 compiler inlining enabled. ThreadPoolConfig is a final case class and the copy function is derived by the Scala compiler. When a class is final, all its functions are final and can be inlined. Since the copy function is not explicitly declared, I haven't found a way to mark it as @noinline. I even tried adding the annotation to the case class.
I guess where I went wrong is that I assumed you needed to do an override def if you wanted to replace the copy function but apache/pekko#1489 appears to show that you don't need the override. The override causes compilation issues.
@pjfanning Had just finished getting the test suite to pass when I saw this message 🤦 Indeed the solution I went for was to override the copy method, although the other solution seems to be instrumenting every copy callsite with @noinline which is... even less elegant, and anyway didn't seem to work for me. It would probably be better to try something else, as you say...
Relates to #1352
The existing ThreadPoolConfigCopyAdvice kamon-pekko doesn't work for Pekko 1.1 when Scala 2.13 is used. Pekko 1.1 has Scala 2 compiler inlining enabled. ThreadPoolConfig is a final case class and the copy function is derived by the Scala compiler. When a class is final, all its functions are final and can be inlined. Since the copy function is not explicitly declared, I haven't found a way to mark it as
@noinline
. I even tried adding the annotation to the case class.Would it be feasible to try replacing this instrumentation point and concentrating on the PinnedDispatcher constructor instead?
https://github.com/apache/pekko/blob/22a738511375baa23c5b84c87d44a065c0401e0e/actor/src/main/scala/org/apache/pekko/dispatch/PinnedDispatcher.scala#L28
fyi @hughsimpson
The text was updated successfully, but these errors were encountered: