-
-
Notifications
You must be signed in to change notification settings - Fork 208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
failure if pkgPath is not valid #1026
Comments
I glanced at (my installed version of) |
You are correct; IMHO the interface of That said, aren't you going to have even bigger problems if a package required for LinkingTo is not found or installed? Presumedly an error there implies the requisite package is not installed, or not on the library paths... |
As I said, in my case, an interactive session run OK through the tests, so all packages are well in place. |
It could start to bite suddenly not because of Rcpp but because, e.g. the variable |
Seems like this issue bites at the
That said, #include <Rcpp.h>
// [[Rcpp::depends(fakepkg)]]
// [[Rcpp::export]]
void my_test() { Rcpp::Rcout << "testing"; }
|
Fix in progress says R> Rcpp::cppFunction('void my_test() { Rcpp::Rcout << "testing"; }', depends = "fakepkg")
Error: Package 'fakepkg' referenced from LinkingTo directive is not available.
R> Good enough? Edit: Now in 83f6ef8 |
test for and report unavailable package in linkingto (closes #1026)
Just to tell the end of the story. |
For some obscure reason, a variable pkgPath is returned as character(0) in my unit tests run on R-devel (win10) under CMD check (in interactive session they run OK, as well as on R-3.6.1). Anyway, if this line:
Rcpp/R/Attributes.R
Line 964 in d6594ba
returns character(0) the .linkingToIncludes() ends up with an error "argument is of length zero" in the line
if (file.exists(pkgHeaderPath)) {
. It would be great to add a test forlength(pkgPath)
and if it is zero, to stop with a meaningfull error message "package 'pkg' is not found" or alike.The text was updated successfully, but these errors were encountered: