-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Incremental Compilation inconsistent #13028
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 I minimized the code but it still depends on circe-generic. |
A self-contained example: Foo.scalacase class Foo(x: Int) // (1) first compile with this definition of Foo
//case class Foo(x: Int, y: String) // (2) ...then incrementally compile with this one Test.scalaimport scala.deriving.Mirror
import scala.compiletime.{erasedValue, summonInline}
trait Decoder[A]
object Decoder:
given Decoder[Int] = ???
inline def derived[A](using m: Mirror.Of[A]): Decoder[A] =
val elemDecoders = summonDecodersRec[m.MirroredElemTypes]
new Decoder[A] {}
inline def summonDecodersRec[T <: Tuple]: List[Decoder[_]] =
inline erasedValue[T] match
case _: EmptyTuple => Nil
case _: (t *: ts) => summonInline[Decoder[t]] :: summonDecodersRec[ts]
end Decoder
object Test:
val d: Decoder[Foo] = Decoder.derived[Foo]
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Compiler version
ScalaVersion:
3.0.0
but also on3.0.2-RC1-bin-20210706-6011847-NIGHTLY
dependency:
io.circe:circe-generic_3:0.14.1
Minimized code
File1.scala
File2.scala
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
Change code back to
case class AAA(a: DDD.type)
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.The text was updated successfully, but these errors were encountered: