Skip to content
Prev 60592 / 63424 Next

. Re: stage=install in \doi definition could lead to problems

\doi (and if needed revert to \RdOpts{stage=install} afterwards).

This works but R-devel CMD check then gives the warning that "Found the following URL's which should use doi ...".
For a reprex, see the package at https://github.com/GeoBosh/reprexes/tree/master/redundantDots (man/fun_3.Rd contains the \doi's).
Building that package with R-devel throws one warning, building it with non-R-devel throws two (my R-devel is from yesterday, r81914). The latter seems logical since with older R's \doi is expanded and therefore contains the expanded URL about which R-devel complains. The warnings do seem somewhat unpredictable in that I tried different examples and sometimes got warnings sometimes didn't.  

I may be missing something but would it be reasonable not to apply this check to packages submitted to CRAN until this is made stable?

Georgi Boshnakov











------------------------------

Message: 4
Date: Wed, 16 Mar 2022 01:07:54 +0100
From: Sebastian Meyer <seb.meyer at fau.de>
To: Ivan Krylov <krylov.r00t at gmail.com>
Cc: <r-devel at r-project.org>
Subject: Re: [Rd] stage=install in \doi definition could lead to
	problems
Message-ID: <3ca49400-0f53-708b-72b2-017d2f173aed at fau.de>
Content-Type: text/plain; charset="utf-8"; Format="flowed"

Am 15.03.22 um 21:38 schrieb Ivan Krylov:
Thank you for your feedback! I think this is the right place (but note 
that such very recent changes *could* still be work in progress and may 
sometimes need a bit more time to be worth discussing here).
Yes, that certainly is one of the advantages of the change, affecting 
more than 1000 packages on CRAN that currently ship a partial Rd db just 
because they use the \doi macro. Besides considerably speeding up R CMD 
build for these packages, the change also slightly reduces the size of 
the tarballs.

I think the most probable reason for the previous use of stage=build for 
that Sexpr was to avoid shipping the PDF package manual with the 
package, as generally triggered by install or render time Sexprs. This 
has now been addressed.
Thank you for the example. I think there is another solution: you could 
set \RdOpts{stage=build} before the Rd section containing that "scary" 
\doi (and if needed revert to \RdOpts{stage=install} afterwards). Then 
the corresponding Sexpr would get evaluated during the build stage as 
before and the correctly escaped hyperlink from building with 
R-devel/4.2.0 would be available also in older R versions.

	Sebastian




------------------------------

Message: 5
Date: Wed, 16 Mar 2022 13:14:32 +0300
From: Ivan Krylov <krylov.r00t at gmail.com>
To: Sebastian Meyer <seb.meyer at fau.de>
Cc: <r-devel at r-project.org>
Subject: Re: [Rd] stage=install in \doi definition could lead to
	problems
Message-ID: <20220316131432.5fe64185 at arachnoid>
Content-Type: text/plain; charset="us-ascii"

On Wed, 16 Mar 2022 01:07:54 +0100
Sebastian Meyer <seb.meyer at fau.de> wrote:

            
Thanks for the solution! I didn't realise that \RdOpts could be used
here. I can confirm that it works for me.