-
Notifications
You must be signed in to change notification settings - Fork 22
2.13.12 regression? Third-party macro gives NoSuchMethodError in void Trees$TypeTreeWithDeferredRefCheck #12862
Description
Reproduction steps
- Have a Play project that depends on
"ai.x" %% "play-json-extensions" % "0.42.0" - Use the dependency to serialize a case class with more than 22 parameters (its primary use), e.g.
implicit val format: OFormat[MyBigCaseClass] = ai.x.play.json.Jsonx.formatCaseClass[MyBigCaseClass]- Upgrade to Scala 2.13.12
Problem
The project no longer compiles. Relevant stack trace:
[error] java.lang.NoSuchMethodError: 'void scala.tools.nsc.ast.Trees$TypeTreeWithDeferredRefCheck.(scala.tools.nsc.Global, scala.Function0)'
[error] ai.x.play.json.Macros.verifyKnownDirectSubclassesPostTyper(play-json.scala:353)
[error] ai.x.play.json.Macros.formatSealedInternal(play-json.scala:444)
[error] ai.x.play.json.Macros.formatSealed(play-json.scala:396)
[error] java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error] java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[error] java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[error] java.base/java.lang.reflect.Method.invoke(Method.java:566)
[error] scala.reflect.macros.runtime.JavaReflectionRuntimes$JavaReflectionResolvers.$anonfun$resolveJavaReflectionRuntime$5(JavaReflectionRuntimes.scala:45)
[error] scala.tools.nsc.typechecker.Macros.macroExpandWithRuntime(Macros.scala:796)
This looks like a breaking change with a method that was removed (or renamed, replaced...).