Re: [Rd] Possible bug in help file name generation

2021-06-24 Thread Iñaki Ucar
On Thu, 24 Jun 2021 at 14:21, Kurt Hornik  wrote:
>
> > Deepayan Sarkar writes:
>
> > On Thu, Jun 24, 2021 at 5:31 PM Iñaki Ucar  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

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Possible bug in help file name generation

2021-06-24 Thread Kurt Hornik
> Deepayan Sarkar writes:

> On Thu, Jun 24, 2021 at 5:31 PM Iñaki Ucar  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 ...

-k

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Possible bug in help file name generation

2021-06-24 Thread Deepayan Sarkar
On Thu, Jun 24, 2021 at 5:31 PM Iñaki Ucar  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.

Best,
-Deepayan

> --
> Iñaki Úcar
>
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] Possible bug in help file name generation

2021-06-24 Thread Iñaki Ucar
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.

-- 
Iñaki Úcar

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel