Closed keynmol closed 1 week ago
Closes #518
It seems that this used to work, but relied on the fact that ZoneOffset.UTC will put "Z" in ID_CACHE when object is initialised.
ZoneOffset.UTC
This no longer works because ZoneOffset.UTC was made into a lazy val, so invoking ZoneOffset.of("Z") will not trigger the ZoneOffset.UTC calculation.
ZoneOffset.of("Z")
To confirm, just touching ZoneOffset.UTC is enough to make repro work:
scala-cli -e 'java.time.ZoneOffset.UTC;java.time.ZoneOffset.of("Z")' --js --dep io.github.cquiroz::scala-java-time::2.6.0 # succeeds
I feel like relying on this cache behaviour is too brittle, so I decided to explictly special-case "Z" as it's a special case in java docs as well.
Note that this case is already tested, but one of the previous tests refers to ZoneOffset.UTC, triggering the cache update.
Closes #518
It seems that this used to work, but relied on the fact that
ZoneOffset.UTC
will put "Z" in ID_CACHE when object is initialised.This no longer works because ZoneOffset.UTC was made into a lazy val, so invoking
ZoneOffset.of("Z")
will not trigger theZoneOffset.UTC
calculation.To confirm, just touching ZoneOffset.UTC is enough to make repro work:
I feel like relying on this cache behaviour is too brittle, so I decided to explictly special-case "Z" as it's a special case in java docs as well.
Note that this case is already tested, but one of the previous tests refers to ZoneOffset.UTC, triggering the cache update.