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

Allow access to the artifact path in a relocatable way #32

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

lcontento
Copy link

@lcontento lcontento commented Oct 29, 2024

Half of a possible solution to JuliaTime/TimeZones.jl#467. The other half is at JuliaTime/TimeZones.jl#479.

Allows accessing the correct artifact path even if the depot has been relocated (e.g. when including the package in a system image).

In theory artifact_dir() should always be preferred to ARTIFACT_DIR for the above reason, so one would ideally remove ARTIFACT_DIR all together. That would be a breaking change though.

src/TZJData.jl Show resolved Hide resolved
@omus
Copy link
Member

omus commented Oct 31, 2024

Should a issue or a PR be made to inform uses of @artifact_str that it shouldn't be used in a const? https://docs.julialang.org/en/v1/stdlib/Artifacts/#Artifacts.@artifact_str

src/TZJData.jl Show resolved Hide resolved
@lcontento
Copy link
Author

I applied the suggested changes and added a precompilation statement (it's not really making things faster, but it's not going to hurt).

@lcontento lcontento requested a review from omus November 4, 2024 14:25
src/TZJData.jl Outdated Show resolved Hide resolved
Co-authored-by: Curtis Vogt <curtis.vogt@gmail.com>
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

Successfully merging this pull request may close these issues.

2 participants