-
Notifications
You must be signed in to change notification settings - Fork 28
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
Problem with loading optional dependencies #52
Comments
Here's the commit where I'm trying to get the optional dependency stuff working: GiovineItalia/Compose.jl@4e20db6 The key bit: function link_cairo()
@info "Loading Cairo backend into Compose.jl"
include("cairo_backends.jl")
end
function __init__()
@require Cairo="159f3aea-2a34-519c-b102-8c37f9878175" link_cairo()
end |
Thoughts @timholy @MikeInnes @jmert? |
You probably have a Note that Requires is not really designed for this kind of use case. It'll mean that users will have to explicitly do |
Currently we rely on detecting whether Cairo is installed at compile-time which is pretty fragile (and the code to do that is broken on v0.7). We have to tell the user to manual delete the precompiled file to force recompilation of It might be better to force the user to explicitly import Cairo if they want to do PNG or PDF output and load the Cairo-hooks then. This is not as convenient as the current pseudo-magical approach, but should transition nicely when Pkg3 adds this ability in the future and would make @bjarthur, thoughts? Also, @vtjnash since you originally suggested switching over to |
i have no problem with instructing the user to import Cairo. |
@tlnagy we've resolved this, right? if so we should close this issue. |
Yeah, it would be nice if users could do |
@tlnagy i don't understand. are you saying users of Compose.jl have to |
I'm updating
Compose.jl
in GiovineItalia/Compose.jl#282 to useRequires.jl
to allow for loading of optional backends at runtime instead of the error-prone precompilation time approach that we're currently using.I'm running into a problem that appears to be related to #48, but has the extra rub of importing an optional dependencies that is not in Compose's dependencies. This seems to trigger issues with
Pkg.resolve
too. It's a little difficult building a minimal example since thePkg.resolve
error doesn't happen unless you're editing the package file in~/.julia/dev/Compose
The text was updated successfully, but these errors were encountered: