Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package artifacts and distribute using our standard architecture #343

Closed
ViralBShah opened this issue May 26, 2021 · 12 comments
Closed

Package artifacts and distribute using our standard architecture #343

ViralBShah opened this issue May 26, 2021 · 12 comments

Comments

@ViralBShah
Copy link

I wonder if it would be more robust to have the artifacts packaged up as a JLL and distributed like other binary artifacts.

@omus
Copy link
Member

omus commented May 26, 2021

The artifacts used by this package are just the tzdata archives provided by IANA. Currently TimeZones.jl extracts the tzsource files, compiles this information into the internal TimeZones.jl representation, and the serializes that information to disk during package build time. If we introduce a JLL I think it makes the most sense to store the serialized internal representation as the JLL artifact. Mainly the only thing holding up this work is picking a serialization method that works across Julia versions.

@KristofferC
Copy link
Contributor

One thing that could be done is to do the compilation in __init__ instead and use https://github.com/JuliaPackaging/Scratch.jl to store the resulting files (instead of storing them inside the package folder). That would make the package work with e.g. PackageCompiler.

@StefanKarpinski
Copy link

There's not really any reason for this to be a JLL, is there? It's not platform specific and doesn't require a fancy cross-compilation toolchain, it's just an artifact with a build step, right?

@ViralBShah ViralBShah changed the title Package artifacts as a JLL and distribute using Yggdrasil Package artifacts and distribute using our standard architecture May 26, 2021
@ViralBShah
Copy link
Author

I meant "bundle it in a standard way and distribute using our infrastructure, and make it more packagecompiler friendly".

@StefanKarpinski
Copy link

Might it be good enough to include a script that can be run when making a release that downloads the timezone files, processes them, bundles them up the way the package wants them, pushes that to GitHub along with the release and generates the corresponding Artifacts.toml file? That way the user can just download ready-to-use artifacts that are already in the right format?

@staticfloat
Copy link
Contributor

Is the problem that the serialization format is Julia-version-specific?

@ViralBShah
Copy link
Author

Yes: #343 (comment)

@DilumAluthge
Copy link
Contributor

DilumAluthge commented Feb 3, 2022

Can it be serialized to e.g. a JSON file?

And then we can use JSON3.jl and StructTypes.jl to deserialize it directly back to Julia types?

@KristofferC
Copy link
Contributor

Use Scratch space as a cache and serialize it during runtime to a folder based on the julia version?

@ViralBShah
Copy link
Author

ViralBShah commented Feb 4, 2022

Seems like we should do @KristofferC's suggestion right away. I do wonder if different artifacts can be made for every Julia version.

@KristofferC
Copy link
Contributor

You can just prefix the scratch folder with the julia version for example.

@omus
Copy link
Member

omus commented Aug 22, 2023

As of PR #441 this package uses typically precomputed time zones artifacts via the TZJData.jl package. For users with advanced needs scratch spaces are also used for manual time zone compilation if required. Included in TimeZones release 1.12.

@omus omus closed this as completed Aug 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants