-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Static forwarder for local method is not consistently generated #18248
Comments
Unfortunately I haven't managed to create a minimal reproducer, however I can fairly reliably reproduce the problem building Pekko. I'm noticing something strange in (also: it's confusing that there are two methods named 'loadExtensions' here. the problem is with the 'inner' method and reproduces when the names are different as well) |
Interestingly, it turns out the fact that both methods were named private[pekko] trait ExtensionsImpl extends Extensions { self: ActorSystem[_] with InternalRecipientRef[_] =>
def loadExtensions(): Unit = {
def loadExtensionsFor(key: String, throwOnLoadFail: Boolean): Unit = {
(...)
}
(...)
loadExtensionsFor("pekko.actor.typed.library-extensions", throwOnLoadFail = true)
loadExtensionsFor("pekko.actor.typed.extensions", throwOnLoadFail = false)
}
(...)
} we encountered the problem again in our 1.1.0-M1 release |
Compiler version
3.3.2-RC1-bin-20230718-da16f43-NIGHTLY
Minimized code
I have not minimized this yet, I will improve the issue later, but encountered it when building https://github.com/apache/incubator-pekko/blob/v1.0.1-RC1/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/ExtensionsImpl.scala#L32-L138 with sbt:
Output
The resulting
ExtensionsImpl.class
sometimes has apublic static void loadExtensions$1$(org.apache.pekko.actor.typed.internal.ExtensionsImpl, java.lang.String, boolean);
, and sometimes doesn't.This method cannot be called from 'outside' so this forwarder likely isn't needed, but it would be good to either consistently generate it or consistently not generate it.
Expectation
Produce exactly the same class for the same source each time.
The text was updated successfully, but these errors were encountered: