[Rd] Possible bug in help file name generation

Iñaki Ucar |uc@r @end|ng |rom |edor@project@org
Thu Jun 24 15:09:08 CEST 2021


On Thu, 24 Jun 2021 at 14:21, Kurt Hornik <Kurt.Hornik using wu.ac.at> wrote:
>
> >>>>> Deepayan Sarkar writes:
>
> > On Thu, Jun 24, 2021 at 5:31 PM Iñaki Ucar <iucar using fedoraproject.org> wrote:
> >>
> >> Hi,
> >>
> >> I noticed that R 4.1 places html files into the packages' help
> >> directory, compared to previous versions, which used an RDS. I found a
> >> possible bug in the code that processes the aliases from the Rd files
> >> and generates the names for these html files (I haven't identified
> >> where this happens though).
> >>
> >> To reproduce this, install e.g. the 'caper' package from CRAN and
> >> inspect the help directory. I find the following file:
> >>
> >> 'pgls.confint'$'\n''.html'
> >>
> >> which contains a special character. This comes from the fact that the
> >> file caper/man/pgls.profile.Rd in caper's source code contains a
> >> newline in the corresponding alias:
> >>
> >> \name{pgls.profile}
> >> \alias{pgls.profile}
> >> \alias{plot.pgls.profile}
> >> \alias{pgls.confint
> >> }
> >>
> >> and this ends up in the file name.
>
> > Yes, the code should probably do a trimws() somewhere, but this also
> > looks like something that maybe R CMD check should identify and
> > complain about.
>
> I'll take a look ...

Thanks. FYI, I was able to detect this thanks to build errors in
cran2copr, because RPM tools make this kind of checks. See the
complete log here:
https://download.copr.fedorainfracloud.org/results/iucar/cran/fedora-rawhide-x86_64/02296763-R-CRAN-caper/builder-live.log.gz

-- 
Iñaki Úcar



More information about the R-devel mailing list