make Gadfly "relocatable" by not loading files at runtime #1530
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 simpleinclude
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.