Closed JamesMcIntosh closed 4 months ago
Hi @cquiroz, could you give me a quick point in the right direction to what generates these lines of code? Thanks! James
Interesting, I can't easily think why it would do that At any rate the generating code is at https://github.com/cquiroz/kuyfi/blob/master/src/main/scala/kuyfi/TZDBCodeGenerator.scala
Thanks @cquiroz, I looked through the code and also the source for treehugger which is used to do the codegen.
The Type.toString
method seems like a likely candidate, if it recurses 50 times then it will return "..."
The abstract class Type
is a child of the Types
trait which has the tostringRecursions
count.
I wonder if toString is being called in parallel thus intermittently blowing out the recursive check. I need to check if our build is building TZDB in parallel too as it is contained in two Scala.js modules.
Hi @cquiroz,
The two modules were being generated in parallel each with their own TZDB plugin. I've moved the TZDB generation to a parent CrossProject so it is only generated once, this appears to have fixed the issue. Thanks for such a helpful project and for pointing me in the right direction for the codegen!
Many thanks James
Oh that's interesting, would it be possible to add a comment to the README about this?
I've submitted a PR which makes a basic dependant configuration suggestion, feel free to change it round as there's a few ways to write that up. https://github.com/cquiroz/sbt-tzdb/pull/271
We have been having intermittent issues with the tzdb plugin where it generates the
tzdb_java.scala
using the spread operator.Seems it might be related to: https://github.com/cquiroz/scala-java-time/issues/66
The spread operator is some times even being referenced as the val type.
When there is no spread operator it compiles correctly.
Our build environment is
I have also tried with an older scala-js 1.3.0.