Scala3 doesn't work with slinky-hot in some cases
AlexITC opened this issue · 2 comments
AlexITC commented
It is common to see this piece of code in Slinky projects, unfortunately, this causes problems with Scala3, the website doesn't load at all:
if (LinkingInfo.developmentMode) {
hot.initialize()
}
shadaj commented
@AlexITC do you see any crashes in the console? There shouldn't be anything Scala 3 specific in the hot-reloading implementation.
AlexITC commented
I was able to isolate the problem, which occurs when rendering this ErrorBoundaryComponent:
Uncaught org.scalajs.linker.runtime.UndefinedBehaviorError: java.lang.ClassCastException: undefined is not an instance of slinky.readwrite.Reader
If I remove that, hot-reloading works.