-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Compiler crash in compileIncremental on Dotty project #6460
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
Comments
smarter
added a commit
to dotty-staging/dotty
that referenced
this issue
May 10, 2019
checkNonCyclic was forcing too many infos because it didn't account for the case where the prefix is a ModuleVal and not a ModuleClass. Fixing this solves the incremental compilation issue in the Dotty build reported in scala#6460 were the root cause was a completion cycle when jointly compiling SymbolLoaders and Types that looked like this: Complete `object tpd` Complete its parent `Trees.Instance` Complete its type parameter `T >: Untyped <: Type` run `checkNonCyclic` on the the type parameter definition Complete `Type` Complete `import ast.tpd._` in `Types.scala` Eventually this requires unpickling the selection `Trees.Instance#T` which gets a `NoDenotation` since `T` hasn't been entered yet. As a side-effect this also means that the neg/toplevel-cyclic test no longer leads to an "illegal cyclic reference" error, instead it now causes "recursion limit exceeded" errors, which are less nice but still acceptable.
smarter
added a commit
to dotty-staging/dotty
that referenced
this issue
May 10, 2019
checkNonCyclic was forcing too many infos because it didn't account for the case where the prefix is a ModuleVal and not a ModuleClass. Fixing this solves the incremental compilation issue in the Dotty build reported in scala#6460 were the root cause was a completion cycle when jointly compiling SymbolLoaders and Types that looked like this: Complete `object tpd` Complete its parent `Trees.Instance` Complete its type parameter `T >: Untyped <: Type` run `checkNonCyclic` on the the type parameter definition Complete `Type` Complete `import ast.tpd._` in `Types.scala` Eventually this requires unpickling the selection `Trees.Instance#T` which gets a `NoDenotation` since `T` hasn't been entered yet. As a side-effect this also means that the neg/toplevel-cyclic test no longer leads to an "illegal cyclic reference" error, instead it now causes "recursion limit exceeded" errors, which are less nice but still acceptable.
smarter
added a commit
to dotty-staging/dotty
that referenced
this issue
May 10, 2019
checkNonCyclic was forcing too many infos because it didn't account for the case where the prefix is a ModuleVal and not a ModuleClass. Fixing this solves the incremental compilation issue in the Dotty build reported in scala#6460 were the root cause was a completion cycle when jointly compiling SymbolLoaders and Types that looked like this: Complete `object tpd` Complete its parent `Trees.Instance` Complete its type parameter `T >: Untyped <: Type` run `checkNonCyclic` on the the type parameter definition Complete `Type` Complete `import ast.tpd._` in `Types.scala` Eventually this requires unpickling the selection `Trees.Instance#T` which gets a `NoDenotation` since `T` hasn't been entered yet. As a side-effect this also means that the neg/toplevel-cyclic test no longer leads to an "illegal cyclic reference" error, instead it now causes "recursion limit exceeded" errors, which are less nice but still acceptable.
smarter
added a commit
to dotty-staging/dotty
that referenced
this issue
May 10, 2019
checkNonCyclic was forcing too many infos because it didn't account for the case where the prefix is a ModuleVal and not a ModuleClass. Fixing this solves the incremental compilation issue in the Dotty build reported in scala#6460 were the root cause was a completion cycle when jointly compiling SymbolLoaders and Types that looked like this: Complete `object tpd` Complete its parent `Trees.Instance` Complete its type parameter `T >: Untyped <: Type` run `checkNonCyclic` on the the type parameter definition Complete `Type` Complete `import ast.tpd._` in `Types.scala` Eventually this requires unpickling the selection `Trees.Instance#T` which gets a `NoDenotation` since `T` hasn't been entered yet. As a side-effect this also means that the neg/toplevel-cyclic test no longer leads to an "illegal cyclic reference" error, instead it now causes "recursion limit exceeded" errors, which are less nice but still acceptable.
smarter
added a commit
to dotty-staging/dotty
that referenced
this issue
May 11, 2019
checkNonCyclic was forcing too many infos because it didn't account for the case where the prefix is a ModuleVal and not a ModuleClass. Fixing this solves the incremental compilation issue in the Dotty build reported in scala#6460 were the root cause was a completion cycle when jointly compiling SymbolLoaders and Types that looked like this: Complete `object tpd` Complete its parent `Trees.Instance` Complete its type parameter `T >: Untyped <: Type` run `checkNonCyclic` on the the type parameter definition Complete `Type` Complete `import ast.tpd._` in `Types.scala` Eventually this requires unpickling the selection `Trees.Instance#T` which gets a `NoDenotation` since `T` hasn't been entered yet. As a side-effect this also means that the neg/toplevel-cyclic test no longer leads to an "illegal cyclic reference" error, instead it now causes "recursion limit exceeded" errors, which are less nice but still acceptable.
smarter
added a commit
to dotty-staging/dotty
that referenced
this issue
May 11, 2019
checkNonCyclic was forcing too many infos because it didn't account for the case where the prefix is a ModuleVal and not a ModuleClass. Fixing this solves the incremental compilation issue in the Dotty build reported in scala#6460 were the root cause was a completion cycle when jointly compiling SymbolLoaders and Types that looked like this: Complete `object tpd` Complete its parent `Trees.Instance` Complete its type parameter `T >: Untyped <: Type` run `checkNonCyclic` on the the type parameter definition Complete `Type` Complete `import ast.tpd._` in `Types.scala` Eventually this requires unpickling the selection `Trees.Instance#T` which gets a `NoDenotation` since `T` hasn't been entered yet. As a side-effect this also means that the neg/toplevel-cyclic test no longer leads to an "illegal cyclic reference" error, instead it now causes "recursion limit exceeded" errors, which are less nice but still acceptable.
smarter
added a commit
to dotty-staging/dotty
that referenced
this issue
May 11, 2019
checkNonCyclic was forcing too many infos because it didn't account for the case where the prefix is a ModuleVal and not a ModuleClass. Fixing this solves the incremental compilation issue in the Dotty build reported in scala#6460 were the root cause was a completion cycle when jointly compiling SymbolLoaders and Types that looked like this: Complete `object tpd` Complete its parent `Trees.Instance` Complete its type parameter `T >: Untyped <: Type` run `checkNonCyclic` on the the type parameter definition Complete `Type` Complete `import ast.tpd._` in `Types.scala` Eventually this requires unpickling the selection `Trees.Instance#T` which gets a `NoDenotation` since `T` hasn't been entered yet. As a side-effect this also means that the neg/toplevel-cyclic test no longer leads to an "illegal cyclic reference" error, instead it now causes "recursion limit exceeded" errors, which are less nice but still acceptable.
smarter
added a commit
to dotty-staging/dotty
that referenced
this issue
May 11, 2019
checkNonCyclic was forcing too many infos because it didn't account for the case where the prefix is a ModuleVal and not a ModuleClass. Fixing this solves the incremental compilation issue in the Dotty build reported in scala#6460 were the root cause was a completion cycle when jointly compiling SymbolLoaders and Types that looked like this: Complete `object tpd` Complete its parent `Trees.Instance` Complete its type parameter `T >: Untyped <: Type` run `checkNonCyclic` on the the type parameter definition Complete `Type` Complete `import ast.tpd._` in `Types.scala` Eventually this requires unpickling the selection `Trees.Instance#T` which gets a `NoDenotation` since `T` hasn't been entered yet. As a side-effect this also means that the neg/toplevel-cyclic test no longer leads to an "illegal cyclic reference" error, instead it now causes "recursion limit exceeded" errors, which are less nice but still acceptable.
smarter
added a commit
that referenced
this issue
May 11, 2019
Fix #6460: less forcing in checkNonCyclic
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Steps to reproduce:
final val tracingEnabled = false
tofinal val tracingEnabled = true
Here's the log I see:
[info] Compiling 1 Scala source to /Users/odersky/workspace/dotty/compiler/target/scala-0.14/classes ...
[info] Done compiling.
[info] Compiling 2 Scala sources to /Users/odersky/workspace/dotty/compiler/target/scala-0.14/classes ...
[info] Done compiling.
[info] Compiling 22 Scala sources to /Users/odersky/workspace/dotty/compiler/target/scala-0.14/classes ...
dotty.tools.FatalError:
at dotty.tools.dotc.typer.ErrorReporting$Errors.takesNoParamsStr(ErrorReporting.scala:84)
at dotty.tools.dotc.typer.TypeAssigner.fail$2$$anonfun$1(TypeAssigner.scala:394)
at dotty.tools.dotc.reporting.diagnostic.MessageContainer.contained(MessageContainer.scala:59)
at dotty.tools.dotc.reporting.diagnostic.MessageContainer.message(MessageContainer.scala:42)
at dotty.tools.dotc.reporting.diagnostic.MessageContainer.isNonSensical(MessageContainer.scala:71)
at dotty.tools.dotc.reporting.HideNonSensicalMessages.isHidden(HideNonSensicalMessages.scala:17)
at dotty.tools.dotc.reporting.AbstractReporter.isHidden(AbstractReporter.scala:8)
at dotty.tools.dotc.reporting.Reporter.report(Reporter.scala:225)
at dotty.tools.dotc.reporting.Reporting.error(Reporter.scala:105)
at dotty.tools.dotc.core.Contexts$Context.error(Contexts.scala:71)
at dotty.tools.dotc.typer.ErrorReporting$.errorType(ErrorReporting.scala:26)
at dotty.tools.dotc.typer.TypeAssigner.fail$1(TypeAssigner.scala:394)
at dotty.tools.dotc.typer.TypeAssigner.assignType(TypeAssigner.scala:460)
at dotty.tools.dotc.typer.Typer.assignType(Typer.scala:87)
at dotty.tools.dotc.ast.tpd$.TypeApply(tpd.scala:51)
at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.readLengthTerm$1(TreeUnpickler.scala:1086)
at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.readTerm(TreeUnpickler.scala:1203)
at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.readLengthTerm$1(TreeUnpickler.scala:1083)
at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.readTerm(TreeUnpickler.scala:1203)
The text was updated successfully, but these errors were encountered: