Skip to content

[R-pkg-devel] NOTE about lack of prebuilt manual

6 messages · Iris Simmons, Uwe Ligges, Wolfgang Viechtbauer +2 more

#
Short version

I have recently tried to update two of my CRAN packages and I am getting 
the NOTE from R CMD check --as-cran

Package has help file(s) containing install/render-stage \Sexpr{} 
expressions but no prebuilt PDF manual.

(It comes on one line in the check.log)

What am I doing wrong?

===================

More details

Both packages have lived successfuly on CRAN for some time but my recent 
attempts to update lead to the NOTE shown above. I notice that the 
version currently on CRAN do have in the tarball a directory called 
build which amongst other thing does contain the package manual. However 
when I build the updated versions the tarball still contains a build 
directory but without the manual.

I am using 4.4.1 under Windows 10. I open a command line and do 
everything from there with R CMD, I do not use any helper package. The 
help files do not explicitly contain any instance of \Sexpr{} but they 
do contain macros. Both of them use mathjaxr and Rdpack and one also has 
some macros written by me. They have been like that for some while. The 
Rd files are hand-written, I do not use any package to generate 
documentation.

I notice that R CMD build has an option to turn off the manual but I do 
not set that and there does not seem to be a turn on option. I have 
looked at the NEWS for R4.4.0 and 4.4.1 but withou enlightenment. The 
versions on CRAN were probably generated with R 4.3.3 judgin by the date 
when I made them.

I know it is only a NOTE but I would like to know why it is happening.

I hope that is enough detail to be helpful but I can expand on any 
unclear areas.
#
This is something I'd run into recently as well.

The R devs changed the default from building the manual to not building the
manual. Now if you want (or need) to build the manual, you should add

BuildManual: TRUE

to your DESCRIPTION.
On Mon, Jul 8, 2024, 10:05 Michael Dewey <lists at dewey.myzen.co.uk> wrote:

            

  
  
#
On 08.07.2024 16:08, Iris Simmons wrote:
Well, not really, we still build manuals unless file(s) containing 
install/render-stage \Sexpr{}  are present (as in this case).

Best,
Uwe Ligges
#
Hi Michael,

I assume you are getting this note because you are using mathjaxr. I am also getting this and others have reported the same:

https://github.com/wviechtb/mathjaxr/issues/15

(my response on the forum was a bit premature, since this note eventually did show up for me as well).

This appears to be related to this change (https://cran.r-project.org/doc/manuals/r-devel/NEWS.html):

- tools::checkRd() (used by R CMD check) detects more problems with ?\Sexpr?-based dynamic content, including bad nesting of ?\Sexpr?s and invalid arguments.

which was made in R version 4.4.0. I have submitted an updated metafor version in the meantime despite this note and it was accepted without any problems. Also, while I am getting this note locally, this note does not show up on the CRAN check results:

https://cran.r-project.org/web/checks/check_results_metafor.html

The manual is also available on the CRAN website:

https://cran.r-project.org/package=metafor

and also in the build directory of the tarball (https://cran.r-project.org/src/contrib/metafor_4.6-0.tar.gz).

So, unless CRAN states otherwise, I would suggest to submit the updated versions, burn some incense, pray twenty vectorized hail Rs, and hope for the best.

Best,
Wolfgang
#
? Tue, 9 Jul 2024 08:54:22 +0000
"Viechtbauer, Wolfgang (NP)"
<wolfgang.viechtbauer at maastrichtuniversity.nl> ?????:
The exact change was:

r85348 | hornik | 2023-10-18 08:13:46 +0000 (Wed, 18 Oct 2023) | 1 line
Build PDF refman only when explicitly asked for.

--- src/library/tools/R/build.R (revision 85347)
+++ src/library/tools/R/build.R (revision 85348)
@@ -633,7 +633,7 @@
         }

        needRefman <- manual &&
-            parse_description_field(desc, "BuildManual", TRUE) &&
+            parse_description_field(desc, "BuildManual", FALSE) &&
             any(btinfo[, "later"])
        if (needRefman) {
            messageLog(Log, "building the PDF package manual")

So now R CMD build only builds the manual when both BuildManual is set
to yes _and_ there are \Sexpr{}s with [stage=install or render].
(Previously BuildManual: yes was assumed by default.)

Was the motivation for this change to make R CMD build faster for
everyone, with the expectation that the relatively rare package
maintainers with non-[stage=build] \Sexpr{}s will set BuildManual: yes
to adapt?
#
Thank you to, in alphabetical order of given names, Iris, Ivan, Uwe and 
Wolfgang for your responses. I implemented Iris' suggestion and have 
successfully uploaded one of the packages to CRAN.

Michael
On 09/07/2024 10:06, Ivan Krylov wrote: