USCbiostats / slurmR

slurmR: A Lightweight Wrapper for Slurm
https://uscbiostats.github.io/slurmR/
Other
58 stars 12 forks source link

Incompatible with `renv` projects #43

Open mjz1 opened 9 months ago

mjz1 commented 9 months ago

libPaths are not properly parsed into the rscript's library calls when using an renv project.

The function list_loaded_pkgs attempts to parse package directory information passed from sessionInfo(), which for renv projects using a cache is the base directory of the cache (which does not have a library tree structure), rather than the project specific renv libPath (which is a library tree with symlinks to the cached packages).

Is there a particular reason why the libPaths variable is not respected when loading packages from the parent environment?

I have forked the repo and made a change here to ensure that the library calls always respect the specified libPaths variable. Is there a situation where this is not desirable?

gvegayon commented 7 months ago

I think I suggested creating a PR based of your patch. LMK if you need any help with that.