Closed
Description
Incrementally recompiling leads to "Cyclic reference" while fresh compilation succeeds.
We consistently hit this issue when touching our own Typer.scala
forcing us to always clean; compile
which of course takes longer than incrementally compiling.
Compiler version
3.3.1, 3.4.1
Minimized code
I minimized our compiler to only a few lines of code in:
the full minimized example (not the diff or PR) can be found here
https://github.com/effekt-lang/effekt/tree/34b9e79126db91604df4785aaabace15d154f8cb
Output
[error] -- [E046] Cyclic Error: /private/tmp/effekt/effekt/shared/src/main/scala/effekt/Typer.scala:15:57
[error] 15 | private[typer] val unification = new Unification(using this)
[error] | ^
[error] | Cyclic reference involving class Context
[error] |
[error] | longer explanation available when compiling with `-explain`
[error] one error found
[error] (root / Compile / compileIncremental) Compilation failed
Expectation
It should consistently compile or always report the error, if this is indeed a problem.