I create an R package using devtools, but find that it load_all()performs functions, even if they are included in .Rbuildignorethrough use_build_ignore(). I created a minimal package https://github.com/adsteen/loadallfail/tree/master/R to illustrate the problem.
I created this package using devtools::create("loadallfail"). Then added one file R/syntax_error.Rwith the following contents:
syntax_error <- function{
Then I opened the package project in RStudio and launched devtools::use_build_ignore("syntax_error")
When I run load_all(), I get the following error:
Loading loadallfail
Error in parse(text = lines, n = -1, srcfile = srcfile) :
/Users/andrewsteen/Documents/Rpkgs/loadallfail/R/syntax_error.R:1:26: unexpected '{'
1: syntax_error <- function {
I would expect the package to load successfully, because anything that matches the pattern in .Rbuildignorewill not load, and therefore will not cause problems. What? I do not understand?
: Rbuildignore , RStudio. RStudio, devtools RStudio ( , .Rbuildignore , ).