JuliaTime / TimeZones.jl

IANA time zone database access for the Julia programming language
Other
86 stars 51 forks source link

Fix support for version `JULIA_TZ_VERSION=latest` #365

Closed omus closed 2 years ago

omus commented 2 years ago

Mistake introduced in https://github.com/JuliaTime/TimeZones.jl/pull/363 and results in:

ERROR: LoadError: UndefVarError: latest_version not defined
Stacktrace:
 [1] build(version::String, regions::Vector{String}, tz_source_dir::String, compiled_dir::String; verbose::Bool)
   @ TimeZones.TZData ~/.julia/dev/TimeZones/src/tzdata/build.jl:33
 [2] build(version::String)
   @ TimeZones.TZData ~/.julia/dev/TimeZones/src/tzdata/build.jl:68
 [3] build(version::String; force::Bool)
   @ TimeZones ~/.julia/dev/TimeZones/src/build.jl:11
 [4] build (repeats 2 times)
   @ ~/.julia/dev/TimeZones/src/build.jl:11 [inlined]
 [5] top-level scope
   @ ~/.julia/dev/TimeZones/deps/build.jl:3
 [6] include(fname::String)
   @ Base.MainInclude ./client.jl:444
 [7] top-level scope
   @ none:5
in expression starting at /Users/omus/.julia/dev/TimeZones/deps/build.jl:3

If the user has the env variable JULIA_TZ_VERSION=latest set. Change will be backported to 1.5

omus commented 2 years ago

Based upon the tests passing in #363 this code path is untested.

omus commented 2 years ago

~Should be backported to 1.5~

Update: Error was not present in 1.5