[Rcpp-devel] How to manage testing code for Rcpp based project?

Douglas Bates bates at stat.wisc.edu
Sat Aug 4 18:59:12 CEST 2012


On Sat, Aug 4, 2012 at 11:48 AM, Peng Yu <pengyu.ut at gmail.com> wrote:
>> Seriously:  please think through what you are suggesting here. We are talking
>> about __compiled language__ and outside of a time machine I see very few
>> tools that would permit you to __test before installation__.
>
> You clearly exaggerated my point.
>
> For example, if you have 100 Rcpp based files in your package. But you
> just changed 1 file. To test this 1 file, you have to compile the
> whole package which take the time to compile all the 100 Rcpp files. A
> more efficient way is just to compile the file that was changed and
> possibly other files that depends on it.

But this is a matter of how you do the installation.  If you install
directly from the development directory and don't clean the object
files

R CMD INSTALL ~/Rpkgs/myPackage

then only the changed source files will be recompiled.  I prefer not
to do this because I don't want object files left lying around but
then I don't have 100 source files in any of my packages.


More information about the Rcpp-devel mailing list