[R-pkg-devel] Formatting .Rbuildignore

Thierry Onkelinx th|erry@onke||nx @end|ng |rom |nbo@be
Tue Aug 18 10:12:04 CEST 2020


Thanks for the feedback. It seems like I was under the impression that
.Rbuildignore would follow similar rules as .gitignore.

Best regards,

ir. Thierry Onkelinx
Statisticus / Statistician

Vlaamse Overheid / Government of Flanders
INSTITUUT VOOR NATUUR- EN BOSONDERZOEK / RESEARCH INSTITUTE FOR NATURE AND
FOREST
Team Biometrie & Kwaliteitszorg / Team Biometrics & Quality Assurance
thierry.onkelinx using inbo.be
Havenlaan 88 bus 73, 1000 Brussel
www.inbo.be

///////////////////////////////////////////////////////////////////////////////////////////
To call in the statistician after the experiment is done may be no more
than asking him to perform a post-mortem examination: he may be able to say
what the experiment died of. ~ Sir Ronald Aylmer Fisher
The plural of anecdote is not data. ~ Roger Brinner
The combination of some data and an aching desire for an answer does not
ensure that a reasonable answer can be extracted from a given body of data.
~ John Tukey
///////////////////////////////////////////////////////////////////////////////////////////

<https://www.inbo.be>


Op ma 17 aug. 2020 om 20:12 schreef William Dunlap <wdunlap using tibco.com>:

> I just tried this out with R-4.0.2 on Linux and it looks like
> .Rbuildignore does not treat lines with '#'s as comments.  E.g.,
>
> % mkdir test test/inst
> % touch 'test/inst/#octothorp.txt' 'test/inst/normal.txt'
> % echo > test/DESCRIPTION 'Package: test\nVersion: 0.1\nTitle:
> test\nDescription: A test of .Rbuildignore'
> % touch test/NAMESPACE
> % R CMD build test > /dev/null
>
> % tar ztf test_0.1.tar.gz | grep '\.txt$'
> test/inst/#octothorp.txt
> test/inst/normal.txt
> % echo '#.*[.]txt' > test/.Rbuildignore
> % R CMD build test > /dev/null
>
> % tar ztf test_0.1.tar.gz | grep '\.txt$'
> test/inst/normal.txt
>
> Bill Dunlap
> TIBCO Software
> wdunlap tibco.com
>
> On Mon, Aug 17, 2020 at 9:47 AM Ivan Krylov <krylov.r00t using gmail.com> wrote:
> >
> > 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
> >
> > ______________________________________________
> > R-package-devel using r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-package-devel
>

	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list