These are chat archives for klmr/modules

11th
Dec 2017
Holger Brandl
@holgerbrandl
Dec 11 2017 08:05
Thanks @klmr for this nice explanation about inst. Indeed loading the packages seemed not correct in the first place.
Holger Brandl
@holgerbrandl
Dec 11 2017 08:57
If packages are not the intended mode for code deployment when using modules, what other mechanism would you suggest to allow some user to install my modules? To me, (ab)using the r package system for installation, and modules for fine-grained namespace control seemed like a nice combo.
Holger Brandl
@holgerbrandl
Dec 11 2017 09:34
One downside of the suggested solution is that there is no meaningful error. When saying modules::import(‘datautils/inst/bio/bioinfo_commons’), it should fail with Error: ‘datautils' is not installed! Install first if datautils is not yet installed. This would be more consistent with import_packageerror behavior.
However, I guess without an additional verb (such as import_from_package('datautils/inst/bio/bioinf_commons')there is no easy way to overcome that problem.
Holger Brandl
@holgerbrandl
Dec 11 2017 10:04
On a more general note, I’d love if import could somehow recurse into sub-directories. So in my case modules::import(‘datautils/inst/bio’, attach=T) should import and attach all methods under bio. But maybe this defeats the purpose of having a module system?