"Generating tzdb..." occurs on every build
SandroGrzicic opened this issue · 2 comments
Hi, according to the docs, the tzdb should only be generated once: "This should only happen once on your build"
However, whenever I do a sbt compile
, I get the following message for each of my subprojects:
[info] Generating tzdb from db at (... local file path ...)\target\scala-2.13\resource_managed\main\tzdb to (... local file path ...)\target\scala-2.13\src_managed\main
The process adds approx. 2 seconds per compile. Can this be eliminated somehow, or am I misunderstanding how the plugin works?
I am using SBT 1.5.1, Scala 2.13.5, Scala.js 1.5.1, sbt-tzdb 1.0.1, scala-java-time 2.2.2, AdoptOpenJDK 15 on Windows 10.
Thanks!
The strategy is to put the generation of tzdb in a separate project. I have e.g this https://github.com/gemini-hlsw/gemini-locales project, which I publish and then use on the "applications" project..
What you're seeing is correct but it can be avoided with the strategy indicated above
Thanks. I'll add a TZDB subproject in my build that my scala.js subprojects will depend on.
[EDIT] This doesn't appear to work - I added a TZDB subproject that one of my scala.js subprojects depends on, but if I compile
my scala.js subproject, it also shows the `Generating tzdb ..." line for my TZDB subproject.
Perhaps the only solution is to have a completely separate project, that I then publishLocal
and add as a project dependency to my scala.js subprojects (instead of adding it as a subproject within the same build)?