Closed
Description
Compiler version
ScalaVersion: 3.0.0
but also on 3.0.2-RC1-bin-20210706-6011847-NIGHTLY
dependency: io.circe:circe-generic_3:0.14.1
Minimized code
File1.scala
object DDD
case class AAA(a: DDD.type)
//case class AAA(a: Int)
File2.scala
import io.circe.generic.auto._
val test = summon[io.circe.Decoder[AAA]]
First compile with case class AAA(a: Int)
on File1.
Then compile File1.scala as above.
The recompilation should fail and it did not fail!
I also create a branch with the minimal amount of code: https://github.com/FabioPinheiro/fmgp-threejs/tree/dotty_IncrementalCompilation_inconsistent/src/main/scala
Output
sbt:fmgp-geometry> clean
[success] Total time: 0 s, completed Jul 7, 2021 3:33:49 PM
sbt:fmgp-geometry> compile
[info] compiling 2 Scala sources to /home/fabio/workspace/fmgp-threejs/target/scala-3.0.0/classes ...
Change code back to case class AAA(a: DDD.type)
[success] Total time: 1 s, completed Jul 7, 2021 3:33:52 PM
sbt:fmgp-geometry> compile
[info] compiling 1 Scala source to /home/fabio/workspace/fmgp-threejs/target/scala-3.0.0/classes ...
[success] Total time: 0 s, completed Jul 7, 2021 3:34:02 PM
sbt:fmgp-geometry> clean
[success] Total time: 0 s, completed Jul 7, 2021 3:34:05 PM
sbt:fmgp-geometry> compile
[info] compiling 2 Scala sources to /home/fabio/workspace/fmgp-threejs/target/scala-3.0.0/classes ...
[error] -- Error: /home/fabio/workspace/fmgp-threejs/src/main/scala/File2.scala:3:40 ---
[error] 3 |val test = summon[io.circe.Decoder[AAA]]
[error] | ^
[error] | cannot reduce summonFrom with
[error] | patterns : case given decodeA @ _:io.circe.Decoder[DDD.type]
[error] | case given evidence$2 @ _:deriving.Mirror.Of[DDD.type]
[error] | This location contains code that was inlined from Derivation.scala:19
[error] | This location contains code that was inlined from Derivation.scala:32
[error] | This location contains code that was inlined from Derivation.scala:11
[error] | This location contains code that was inlined from Derivation.scala:70
[error] | This location contains code that was inlined from auto.scala:16
[error] one error found
[error] one error found
[error] (Compile / compileIncremental) Compilation failed
[error] Total time: 0 s, completed Jul 7, 2021 3:34:07 PM
Note: Just File1 was recompiled.
The expectation was for File2 to be recompiled also
Expectation
The recompilation should fail and it did not fail!
It needed a clean
compilation to show the error.