-
Notifications
You must be signed in to change notification settings - Fork 15
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
Post install/update hook #121
Comments
I'm reluctant to add hooks like this because it messes with the declarative nature of CondaPkg (note that modern package managers tend not to have hooks like this). I'm not totally ruling it out but it does go against the grain. The natural way to do what you want would be to have RCall depend directly on CondaPkg (as PythonCall does) and read the Conda env directly from there. If you're using Preferences.jl you can conditionally load CondaPkg so that there is no runtime cost unless the user opts into CondaPkg. Or you could do the same but with CondaPkg being a weak dependency and using a package extension to enable this behaviour. I'm not sure if this will work (I don't know if a package extension is able to change the behaviour of the parent package's Alternatively you could create CondaPkgRCall.jl which has a Conda dependency on R and sets the libR preference either in |
Thanks for explaining this all to me. After thinking it about it a bit more, I'm not sure this would help as much as I thought. I was thinking about the case of running Having thought about my understanding of the order in which things are initialised, I'm becoming increasingly convinced that "do what PythonCall does" is the only clean option. Unfortunately this would end up with Conda.jl and CondaPkg.jl as dependencies of RCall.jl: so either splitting packages for different cases or introducing a breaking change into RCall.jl. Thanks again for helping me reflect on this. I will close this issue now. |
It would be useful if there were a way to have post-install/update hooks. Then projects which wanted to integrate CondaPkg and RCal.jll could simply install a glue package e.g.
CondaPkgRCall.jl
, which would install a hook which would listen for R to be installed, and when it was would set up alibR
preference for RCall.jl to be able to find it.I'm also interested if there are alternatives to a simple hook, so that things would work nicely with different backends e.g. Null where we would ideally want an event when were were in an environment with R in (but we could also just check for this backend in
__init__
)Related discussion at:
#6
#80
#100
JuliaInterop/RCall.jl#513
The PR which is a prerequisite for this to be useful for RCall.jl:
JuliaInterop/RCall.jl#496
The text was updated successfully, but these errors were encountered: