Skip to content
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

example_code = FALSE + pkgKitten yields error #229

Closed
solivella opened this issue May 31, 2018 · 7 comments
Closed

example_code = FALSE + pkgKitten yields error #229

solivella opened this issue May 31, 2018 · 7 comments

Comments

@solivella
Copy link
Contributor

solivella commented May 31, 2018

The following sequence of commands fails :

library(RcppArmadillo)
RcppArmadillo.package.skeleton("foobar", example_code = FALSE)

with

Calling kitten to create basic package.
Error in (function (name = "anRpackage", path = ".", author, maintainer, : unused argument (example_code = FALSE)

Error in value[3L] : error while calling kitten

When pkgKitten is not available, example_code = FALSE works. When it is available, using the default example_code = TRUE works.

Session info is as follows:

sessionInfo()
R version 3.4.3 (2017-11-30)
Platform: x86_64-apple-darwin17.4.0 (64-bit)
Running under: macOS High Sierra 10.13.4

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats graphics grDevices utils datasets methods
[7] base

other attached packages:
[1] RcppArmadillo_0.8.500.0

loaded via a namespace (and not attached):
[1] compiler_3.4.3 tools_3.4.3 yaml_2.1.19 Rcpp_0.12.17
[5] pkgKitten_0.1.4

@eddelbuettel
Copy link
Member

RcppArmadillo("foobar" example_code = FALSE) is incorrect syntax, it lacks a comma.

@solivella
Copy link
Contributor Author

Apologies. I corrected the comment. Behavior is as described.

@eddelbuettel
Copy link
Member

I am not sure what your report is about then:

When pkgKitten is not available, example_code = FALSE works. When it is available, using the default example_code = TRUE works.

Seems to work in both cases.

@eddelbuettel
Copy link
Member

Are you suggesting tests for the other two cases? Maybe. Feel like proposing a simple pull request?

@solivella
Copy link
Contributor Author

Sorry, I should have been clearer. When pkgKitten is installed, I get the quoted error when I set example_code = FALSE.
The other two cases work without issues.

@solivella
Copy link
Contributor Author

Moving a couple of lines out of the ! haveKitten branch does the trick. I'll issue a simple pull request in a few minutes.

@eddelbuettel
Copy link
Member

Move, or maybe just protect with an if give the value of example_code ?

solivella added a commit to solivella/RcppArmadillo that referenced this issue May 31, 2018
eddelbuettel added a commit that referenced this issue Jun 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants