You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that repeatedly runnning `sbt compile` in dotty lead to the
same files being compiled over and over even though nothing changed,
running `sbt "debug; compile"` revealed messages like this:
[debug] Invalidating '${BASE}/compiler/target/scala-3.0.0-RC1/classes/dotty/tools/dotc/typer/Namer.class' because could not find class dotty.tools.dotc.typer.Namer$ on the classpath.
Indeed, Namer does not have a companion object so there's no
`Namer$.class` file, but sbt was looking for one because we registered
such a companion with `ctx.sbtCallback.binaryDependency`, this happened
because we created a fake companion object for the purpose of holding
constructor proxies (fake apply methods that forward to a constructor).
The fix is to special-case such references, just like we already
special-cased references to the fake companion of Java classes.
0 commit comments