JuliaTime / TimeZones.jl

IANA time zone database access for the Julia programming language
Other
85 stars 54 forks source link

Usage of Package Server for binary dependencies/option to specify server. #266

Closed racinmat closed 4 years ago

racinmat commented 4 years ago

Hi, I see some packages are being downloaded from https://www.iana.org/ at https://github.com/JuliaTime/TimeZones.jl/blob/master/src/tzdata/download.jl#L89 would it be possible to use Artifacts https://julialang.github.io/Pkg.jl/v1/artifacts/ for this, so during installation, client would reach only to package server instead of iana.org directly?

Or, as a simpler solution, would it be possible to have some environment variable to specify the domain/base URI to use for binaries? For Julia behind corporate firewall which can reach only whitelisted domains, it would be useful to have an option to specify this.

omus commented 4 years ago

Duplicate of: https://github.com/JuliaTime/TimeZones.jl/issues/63. The only real blocker at the moment is the time to do this

racinmat commented 4 years ago

My bad, I didn't notice that one.

omus commented 4 years ago

No problem. That issue is rather old now. I'll leave this one open for now so it's easier for people to find it.

racinmat commented 4 years ago

And just for reference, if somwone was to do the PR, which files exactly need to be packaged? I see there is multiple versions of the timezone data, but I don't know if the latest one will suffice of if there is list of files that need to be turned into artifacts so this library works properly.

racinmat commented 4 years ago

https://data.iana.org/time-zones/releases/ contains over 150 files starting with tzdata, although some portion of that is just PGP. Should that result in ~150 artifacts?

racinmat commented 4 years ago

@omus is there some list of files which should be included as artifacts? From the source code I didn't understand of all archives in the release website need to be iincluded or only some subset.

omus commented 4 years ago

The files that definitely need to be included in the artifacts would: africa, antarctica, asia, australasia, europe, northamerica, southamerica, pacificnew, etcetera, backward. There are some other files we should probably also consider including.

I'd at least go as far back as 2016j as this is what the current tests are based around. Additionally, one of the motivations around moving to artifacts would be to no longer mutate the state of the package anymore. With this in mind we should probably be doing the translation of TZDATA into Julia time zones as part of the artifact. This means we need to move away from the current Julia serialization that is currently used which makes this a bit more complicated to deal with.