Closed
Description
The logic for processing @include
could go for a sanity check. Using @include zoo
by mistake gives some hard-to-trace error:
Warning in normalizePath(file.path(path, "R", collate)) :
path[3]="...R/zoo": No such file or directory
Warning in file(con, "r") :
cannot open file '...R/zoo': No such file or directory
Error in file(con, "r") : cannot open the connection
Calls: Main ... parse_package -> lapply -> FUN -> read_lines -> <Anonymous> -> file
In addition: Warning message:
'Collate' must contain a list of .R files
In retrospect this makes sense, but it took quite some time to debug. Is it valid to @include
a non-R file? Couldn't we check file.exists()
for @include
directives to prevent this with a friendlier error?