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

make Gadfly "relocatable" by not loading files at runtime #1530

Merged
merged 1 commit into from
Apr 1, 2021

Conversation

KristofferC
Copy link
Contributor

@KristofferC KristofferC commented Apr 1, 2021

Gadfly currently loads two source files at runtime using Requires to add extra functionality when some packages are loaded. One issue with this is that if you compile Gadfly into a sysimage and move the sysimage somewhere else, these files will not exist and Gadfly will not work. An example of when this happens is when using PackageCompiler (JuliaLang/PackageCompiler.jl#498).

Requires.jl has since JuliaPackaging/Requires.jl#85 the capability of storing the source code that would be included inside the package. When the @requires block runs, there is then no need to actually read the file for the code, instead, the code saved inside the package is used. However, this functionality only works if the @requires block is a simple include statement. Therefore, this PR does the small changes to allow this to work and allowed Gadfly to be used with sysimage and not have those sysimages depend on paths on the local machine.

@bjarthur
Copy link
Member

bjarthur commented Apr 1, 2021

LGTM. @Mattriks ?

and @KristofferC -- thanks so much for all the work you've put into PackageCompiler. it's a joy to use now!

@Mattriks Mattriks merged commit ac19807 into GiovineItalia:master Apr 1, 2021
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.

3 participants