-
-
Notifications
You must be signed in to change notification settings - Fork 219
Closed
Closed
Copy link
Description
So I just did the live webinar on Rcpp and got to show live how package generation now fails (from RStudio) for both Rcpp and RcppArmadillo 😢
It looks the NAMESPACE
file now gets an 'echo' from a temp function we create but which is no longer there when the package is finished. And misses an actual exportPatter()
.
So a simple first fix for RcppArmadillo could be (done and tested)
modified R/RcppArmadillo.package.skeleton.R
@@ -78,6 +78,8 @@ RcppArmadillo.package.skeleton <- function(name="anRpackage", list=character(),
## add a useDynLib to NAMESPACE,
NAMESPACE <- file.path( root, "NAMESPACE")
lines <- readLines( NAMESPACE )
+ lines <- lines[!grepl("^export.*fake", lines)]
+ lines <- c(lines, "exportPattern(\"^[[:alpha:]]+\")")
if (! grepl("useDynLib", lines)) {
lines <- c(sprintf("useDynLib(%s, .registration=TRUE)", name),
"importFrom(Rcpp, evalCpp)", ## ensures Rcpp instantiation
do not print the fake
one but add the pattern. Is my fear justified that the RStudio generator may need this too? Paging @kevinushey ....
Metadata
Metadata
Assignees
Labels
No labels