[Rcpp-devel] devtools::load_all() fails after first call for packages with Rcpp modules

Jonathan Berrisch jonathan at berrisch.biz
Wed Dec 29 20:41:33 CET 2021


Hi,

I'm currently starting to use Rcpp modules to expose a class to R (and
this functionality is amazing btw.). However, I usually call
devtools::load_all() to compile. With modules, I have to call
load_all() 2 times for changes to take effect. This was also discussed
here: https://github.com/r-lib/devtools/issues/1653, but this issue was
closed.
In light of a growing community, I want to discuss if this problem is
worth addressing. May someone here have an idea of what's causing this
behavior?

Testing this is easy; you need a package with a module. Then expose a
.method or .field and call load_all() your .method or .field won't be
accessible after creating a new class instance using new(). Call
load_all() again and your .method / .field will appear.

Many thanks for considering my request.
Jonathan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 516 bytes
Desc: This is a digitally signed message part
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20211229/f99de759/attachment.sig>


More information about the Rcpp-devel mailing list