[R-pkg-devel] Formatting .Rbuildignore
Ivan Krylov
kry|ov@r00t @end|ng |rom gm@||@com
Mon Aug 17 18:46:58 CEST 2020
On Mon, 17 Aug 2020 15:56:07 +0200
Thierry Onkelinx <thierry.onkelinx using inbo.be> wrote:
> Can we add blank lines in .Rbuildignore? Or lines with only comments
> (line starting with #)?
.Rbuildignore is not documented [1] to allow comments, but the
current implementation does skip empty lines [2] since 2010 [3]
(otherwise empty regular expressions would match all file names).
It could be possible to get away with comment lines, since the
resulting regular expressions are unlikely to ever match anything, but
it would cost CPU cycles to match every file name against every
regular expression, and some regular expressions may turn out to be
really expensive on some inputs [4].
I think that it's best not to try to add comments to .Rbuildignore, and
to avoid blank lines unless not having them becomes really inconvenient.
--
Best regards,
Ivan
[1]
https://cran.r-project.org/doc/manuals/R-exts.html#Building-package-tarballs
[2]
https://github.com/wch/r-source/blob/9d13622f41cfa0f36db2595bd6a5bf93e2010e21/src/library/tools/R/build.R#L85
[3]
https://github.com/wch/r-source/commit/b2065b2c36235b876977e405f567afec6ab644b3
[4] https://en.wikipedia.org/wiki/ReDoS
More information about the R-package-devel
mailing list