|
private[this] val function0Property = |
|
js.Object.getOwnPropertyNames((() => ()).asInstanceOf[js.Object])(0) |
|
private[this] val function1Property = |
|
js.Object.getOwnPropertyNames(((_: Unit) => ()).asInstanceOf[js.Object])(0) |
These lines attempt to break through Scala.js abstractions. They access JS properties of a Scala.js object. That is undefined behavior.
When linking for WebAssembly, they actually crash, since Scala.js objects really don't have JS properties.
Since Tracing is always called by IO.async, it makes the latter completely unusable with Scala.js-on-Wasm.
There does not appear to be any workaround.
cats-effect/core/js/src/main/scala/cats/effect/tracing/TracingPlatform.scala
Lines 28 to 31 in 18fdf52
These lines attempt to break through Scala.js abstractions. They access JS properties of a Scala.js object. That is undefined behavior.
When linking for WebAssembly, they actually crash, since Scala.js objects really don't have JS properties.
Since
Tracingis always called byIO.async, it makes the latter completely unusable with Scala.js-on-Wasm.There does not appear to be any workaround.