-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
Scala 2.13.0-M4 shows the following StackOverflowError, which never happened in Scala 2.11, 2.12:
https://travis-ci.org/wvlet/airframe/builds/405575941 (Only Scala 2.13.0-M4 build fails)
https://travis-ci.org/wvlet/airframe/jobs/405575946 (StackOverflowError in Scala 2.13.0-M4):
[error] java.lang.StackOverflowError
[error] at scala.reflect.internal.tpe.TypeMaps$SubstMap.apply(TypeMaps.scala:674)
[error] at scala.reflect.internal.tpe.TypeMaps$SubstSymMap.apply(TypeMaps.scala:735)
[error] at scala.reflect.internal.Types$TypeVar.mapOver(Types.scala:3505)
[error] at scala.reflect.internal.tpe.TypeMaps$SubstMap.apply(TypeMaps.scala:674)
[error] at scala.reflect.internal.tpe.TypeMaps$SubstSymMap.apply(TypeMaps.scala:735)
[error] at scala.reflect.internal.tpe.TypeMaps$SubstSymMap.apply(TypeMaps.scala:708)
[error] at scala.reflect.internal.Types$RefinedType.mapOver(Types.scala:1687)
[error] at scala.reflect.internal.tpe.TypeMaps$SubstMap.apply(TypeMaps.scala:674)
[error] at scala.reflect.internal.tpe.TypeMaps$SubstSymMap.apply(TypeMaps.scala:735)
[error] at scala.reflect.internal.Types$TypeVar.mapOver(Types.scala:3505)
[error] at scala.reflect.internal.tpe.TypeMaps$SubstMap.apply(TypeMaps.scala:674)
[error] at scala.reflect.internal.tpe.TypeMaps$SubstSymMap.apply(TypeMaps.scala:735)
[error] at scala.reflect.internal.tpe.TypeMaps$SubstSymMap.apply(TypeMaps.scala:708)
[error] at scala.reflect.internal.Types$RefinedType.mapOver(Types.scala:1687)
How to reproduce:
$ git clone git@github.com:wvlet/airframe
$ cd airframe
$ ./sbt
> ++ 2.13.0-M4
> ~codec/compile
The cause of the error:
If I remove the following lines from the code, the error disappearred:
https://github.com/wvlet/airframe/blob/f16ea745e545b82d4b47e5725600ff325e2c6d44/airframe-codec/src/main/scala/wvlet/airframe/codec/MessageCodecFactory.scala#L60-L69
It seems there might be some cyclic references in the code, or already traversed references are not properly cached in the compiler side.