[Rd] R CMD build errors if files cannot be moved, even if they are in Rbuildignore

2017-09-21 Thread Hugh Parsonage
When a package is built it is first moved to a temporary directory (lines 962-980 in build.R). However, this moves *all* files to the temporary directory, even those in Rbuildignore; only later (lines 997-1024) are Rbuildignore files excluded. The problem with this approach is that some files in t

Re: [Rd] calling R API functions after engine shutdown

2017-09-21 Thread Tomas Kalibera
Calling R_ReleaseObject in a C++ destructor is not reliable - it can be bypassed by a non-local return, such as an error. Generally in R one cannot use C++ destructors reliably for anything that the R runtime wouldn't do on its own in case of a non-local return. A destructor that calls just

[Rd] calling R API functions after engine shutdown

2017-09-21 Thread Lukas Stadler
Hi! We’ve recently come across an example where a package (minqa) creates an Rcpp Function object in a static variable. This causes R_ReleaseObject to be called by the destructor at a very late point in time - as part of the system exit function: static Function cf("c"); I’m wondering if that

Re: [Rd] unpackPkgZip: "unable to move temporary installation" due to antivirus

2017-09-21 Thread Tomas Kalibera
This windows/anti-virus problem has been worked around in R-devel 73329. Thanks to Mike for reporting this and testing the changes. Best Tomas On 09/13/2017 01:40 AM, Mike Toews wrote: Hi, Me and an office colleague on Microsoft Windows 10 PCs are having difficulty installing any package. This