Closed jwmerrill closed 6 years ago
Particularly with precompilation, there's no good way to handle optional dependencies in julia packages. It's a major deficiency, but one that will be fixed eventually. Until then, I don't think there's is much I can do about this except tell people to delete their Gadfly.ji
.
It's safer to tell people to delete everything in the cache. I initially tried just deleting Gadfly.ji, but that doesn't clear Compose.ji, and ends up leaving things in an inconsistent state.
Ok, there's at least a warning now.
I suspect that things get a lot more robust if you put if ... && __precompile__()
at the top of each module that Gadfly uses.
Would that help with optional dependencies? Cairo already has a __precompile__()
.
More likely the "inconsistent state," which I'm guessing must be something like https://github.com/dcjones/Gadfly.jl/pull/667#issuecomment-133991074. Optional dependencies probably wouldn't be detect unless it has to recompile Gadfly/Compose itself. (By deleting Compose.ji, though, it should have triggered a recompile of both Compose and Gadfly.)
What do you make of this Cairo must be installed
error occurring on the julialang.org package tests but not on Travis?
This is happening too for my Mamba package, which uses Gadfly. Adding an explicit using Cairo
before using Gadfly
to my package does not seem to help. Testing on my local machines is fine, so I'm at a loss for how to fix the julialang.org failure. Any help with that would be greatly appreciated. Thanks!
Huh, looks like we missed the __precompile__
at the top of Compose. Kinda ironic, since I got all of its dependencies. Want to submit a PR, @brian-j-smith?
Eureka! Mystery solved... will gladly submit a PR.
We now do conditional loading of the Cairo code with #282. There are still some issues but those are tracked by #299
I installed Gadfly, used it once, and then installed Cairo so that I could draw to PNGs. Even after I installed Cairo, I was getting:
I was able to fix this problem by removing all the cache files in
~/.julia/lib/v0.4/
and then runningusing Gadfly
again, which recompiled everything.