R CMD INSTALL warning for S4 replacement functions on R 4.1.0-alpha

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

R CMD INSTALL warning for S4 replacement functions on R 4.1.0-alpha

Felix Ernst
Hi all,

Since R 4.1, R CMD INSTALL throws warning during building the man pages, when installing from source.

We noticed this first on Windows for man pages involving S4 replacement function:

  *   http://bioconductor.org/checkResults/devel/bioc-LATEST/Modstrings/riesling1-checksrc.html
  *   http://bioconductor.org/checkResults/devel/bioc-LATEST/GenomicAlignments/riesling1-checksrc.html

However, it's also showing up on linux with a slight twist (file not found instead of invalid argument) for other functions:

  *   https://cran.r-project.org/web/checks/check_results_Matrix.html (right at the end)

From the messages and the involved offending filenames, we hypothesize that this is triggered by invalid filenames specific to the OS.
Please note, that the warning is not issued during R CMD CHECK for a given package.

Can anyone comment on this? Is more information needed? If it is a bug, I am happy to post on the bug tracker.

Thanks for any advice.

Best regards,
Felix

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: R CMD INSTALL warning for S4 replacement functions on R 4.1.0-alpha

Sebastian Meyer-4
I can confirm this Rd warning in R-devel (2021-04-23 r80216), but not in
R 4.0.5. It happens when installing the static help (INSTALL option --html).

The following R code reproduces the warning by creating a tiny test
package and then calling relevant internal functions from 'tools':

```R

## create test package
dir.create(pkgdir <- tempfile())
tools:::.write_description(  # need a DESCRIPTION
    unlist(head(packageDescription("tools"), -1)),
    file.path(pkgdir, "DESCRIPTION"))
dir.create(file.path(pkgdir, "man"))
cat(r"(\name{test-package}
\title{Test Package}
\alias{\%/\%}
\description{Test alias.}
)", file = file.path(pkgdir, "man", "test-package.Rd"))

## build HTML help
dir.create(outDir <- tempfile())
tools:::.install_package_description(pkgdir, outDir)
tools:::.writePkgIndices(pkgdir, outDir)
tools:::.convertRdfiles(pkgdir, outDir, types = "html")


```

The output is

  converting help for package ‘tools’
    finding HTML links ... done
    test-package                            html
REDIRECT:topic %/% -> test-package.html [ FAIL ]
REDIRECT:file test-package.html -> test-package.html [ SUCCESS ]
Rd warning: cannot open file
'/tmp/RtmpasTPyq/fileb3d72f4ea1cf/help/%/%.html': No such file or directory


A workaround (if needed) is to set the environment variable
_R_HELP_LINKS_TO_TOPICS_ to a false value.

Best regards,

        Sebastian


Am 23.04.21 um 19:01 schrieb Felix Ernst:

> Hi all,
>
> Since R 4.1, R CMD INSTALL throws warning during building the man pages, when installing from source.
>
> We noticed this first on Windows for man pages involving S4 replacement function:
>
>   *   http://bioconductor.org/checkResults/devel/bioc-LATEST/Modstrings/riesling1-checksrc.html
>   *   http://bioconductor.org/checkResults/devel/bioc-LATEST/GenomicAlignments/riesling1-checksrc.html
>
> However, it's also showing up on linux with a slight twist (file not found instead of invalid argument) for other functions:
>
>   *   https://cran.r-project.org/web/checks/check_results_Matrix.html (right at the end)
>
> From the messages and the involved offending filenames, we hypothesize that this is triggered by invalid filenames specific to the OS.
> Please note, that the warning is not issued during R CMD CHECK for a given package.
>
> Can anyone comment on this? Is more information needed? If it is a bug, I am happy to post on the bug tracker.
>
> Thanks for any advice.
>
> Best regards,
> Felix
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: R CMD INSTALL warning for S4 replacement functions on R 4.1.0-alpha

Martin Maechler
In reply to this post by Felix Ernst
>>>>> Felix Ernst
>>>>>     on Fri, 23 Apr 2021 17:01:05 +0000 writes:

    > Hi all,
    > Since R 4.1, R CMD INSTALL throws warning during building the man pages, when installing from source.

    > We noticed this first on Windows for man pages involving S4 replacement function:

    > *   http://bioconductor.org/checkResults/devel/bioc-LATEST/Modstrings/riesling1-checksrc.html
    > *   http://bioconductor.org/checkResults/devel/bioc-LATEST/GenomicAlignments/riesling1-checksrc.html

    > However, it's also showing up on linux with a slight twist (file not found instead of invalid argument) for other functions:

    > *   https://cran.r-project.org/web/checks/check_results_Matrix.html (right at the end)

    >> From the messages and the involved offending filenames, we hypothesize that this is triggered by invalid filenames specific to the OS.
    > Please note, that the warning is not issued during R CMD CHECK for a given package.

    > Can anyone comment on this? Is more information needed? If it is a bug, I am happy to post on the bug tracker.

    > Thanks for any advice.

    > Best regards,
    > Felix

Thanks a lot, Felix,  for the heads up -- and for using the
pre-release versions of R ---- you should be role model to the
many readers of 'R-devel'   and other R developers -- even doing
it for a living and who are *still* not help the R project by
the relatively simple act of starting to work with
 'R x.y.0 alpha'

To the topic,  yes, I think there's something we (the R core
team) has not considered when implementing some of the changes
in static help page creation.

This will now get technical .... but that should always be ok /
even desirable for the  R-devel  list :


The CRAN check on Matrix (with R 4.1.0 alpha, called "R-patched") you mention,
here more directly
     https://www.r-project.org/nosvn/R.check/r-patched-linux-x86_64/Matrix-00check.html
has the relevant lines

---------------------------------------------------------------------------------------
checking whether package ‘Matrix’ can be installed ... WARNING
Found the following significant warnings:
  Rd warning: Previous alias or file overwritten by alias: chol,dsCMatrix-method
  Rd warning: Previous alias or file overwritten by alias: chol,lsCMatrix-method
  Rd warning: Previous alias or file overwritten by alias: chol,nsCMatrix-method
  Rd warning: cannot open file ‘/home/hornik/tmp/R.check/r-patched-gcc/Work/build/Packages/00LOCK-Matrix/00new/Matrix/help/%/%,ddiMatrix,ddenseMatrix-method.html’: No such file or directory
  Rd warning: cannot open file ‘/home/hornik/tmp/R.check/r-patched-gcc/Work/build/Packages/00LOCK-Matrix/00new/Matrix/help/%/%,ddiMatrix,ldenseMatrix-method.html’: No such file or directory
  Rd warning: cannot open file ‘/home/hornik/tmp/R.check/r-patched-gcc/Work/build/Packages/00LOCK-Matrix/00new/Matrix/help/%/%,ddiMatrix,ndenseMatrix-method.html’: No such file or directory
  Rd warning: cannot open file ‘/home/hornik/tmp/R.check/r-patched-gcc/Work/build/Packages/00LOCK-Matrix/00new/Matrix/help/%/%,ldiMatrix,ddenseMatrix-method.html’: No such file or directory
  Rd warning: cannot open file ‘/home/hornik/tmp/R.check/r-patched-gcc/Work/build/Packages/00LOCK-Matrix/00new/Matrix/help/%/%,ldiMatrix,ldenseMatrix-method.html’: No such file or directory
  Rd warning: cannot open file ‘/home/hornik/tmp/R.check/r-patched-gcc/Work/build/Packages/00LOCK-Matrix/00new/Matrix/help/%/%,ldiMatrix,ndenseMatrix-method.html’: No such file or directory
  Rd warning: cannot open file ‘/home/hornik/tmp/R.check/r-patched-gcc/Work/build/Packages/00LOCK-Matrix/00new/Matrix/help/%/%,ddiMatrix,Matrix-method.html’: No such file or directory
  Rd warning: cannot open file ‘/home/hornik/tmp/R.check/r-patched-gcc/Work/build/Packages/00LOCK-Matrix/00new/Matrix/help/%/%,ldiMatrix,Matrix-method.html’: No such file or directory
  Rd warning: Previous alias or file overwritten by alias: expand
  Rd warning: Previous alias or file overwritten by alias: crossprod-methods
  Rd warning: Previous alias or file overwritten by alias: tcrossprod-methods
See https://www.r-project.org/nosvn/R.check/r-patched-linux-x86_64/Matrix-00install.html for details.
---------------------------------------------------------------------------------------

and the (quite large, from many C compilation warnings (from
         SuiteSparse, not Matrix directly))
00install.html then gives the details:

*** installing help indices
  converting help for package ‘Matrix’
    finding HTML links ... done
    BunchKaufman-methods                    html  
    CAex                                    html  

 [...............]

    bandSparse                              html  
    bdiag                                   html  
    boolean-matprod                         html  
REDIRECT:file boolean-matprod.html -> boolean-matprod.html [ SUCCESS ]
    cBind                                   html  
    chol                                    html  
Rd warning: Previous alias or file overwritten by alias: chol,dsCMatrix-method
Rd warning: Previous alias or file overwritten by alias: chol,lsCMatrix-method
Rd warning: Previous alias or file overwritten by alias: chol,nsCMatrix-method
    chol2inv-methods                        html  
    colSums                                 html  
    compMatrix-class                        html  
    condest                                 html  
    dMatrix-class                           html  
    ddenseMatrix-class                      html  
    ddiMatrix-class                         html  
    denseMatrix-class                       html  
    dgCMatrix-class                         html  
    dgRMatrix-class                         html  
    dgTMatrix-class                         html  
    dgeMatrix-class                         html  
    diagU2N                                 html  
    diagonalMatrix-class                    html  
REDIRECT:topic %/%,ddiMatrix,ddenseMatrix-method -> diagonalMatrix-class.html [ FAIL ]
REDIRECT:topic %/%,ddiMatrix,ldenseMatrix-method -> diagonalMatrix-class.html [ FAIL ]
REDIRECT:topic %/%,ddiMatrix,ndenseMatrix-method -> diagonalMatrix-class.html [ FAIL ]
REDIRECT:topic %/%,ldiMatrix,ddenseMatrix-method -> diagonalMatrix-class.html [ FAIL ]
REDIRECT:topic %/%,ldiMatrix,ldenseMatrix-method -> diagonalMatrix-class.html [ FAIL ]
REDIRECT:topic %/%,ldiMatrix,ndenseMatrix-method -> diagonalMatrix-class.html [ FAIL ]
REDIRECT:topic %/%,ddiMatrix,Matrix-method -> diagonalMatrix-class.html [ FAIL ]
REDIRECT:topic %/%,ldiMatrix,Matrix-method -> diagonalMatrix-class.html [ FAIL ]
Rd warning: cannot open file ‘/home/hornik/tmp/R.check/r-patched-gcc/Work/build/Packages/00LOCK-Matrix/00new/Matrix/help/%/%,ddiMatrix,ddenseMatrix-method.html’: No such file or directory
Rd warning: cannot open file ‘/home/hornik/tmp/R.check/r-patched-gcc/Work/build/Packages/00LOCK-Matrix/00new/Matrix/help/%/%,ddiMatrix,ldenseMatrix-method.html’: No such file or directory
Rd warning: cannot open file ‘/home/hornik/tmp/R.check/r-patched-gcc/Work/build/Packages/00LOCK-Matrix/00new/Matrix/help/%/%,ddiMatrix,ndenseMatrix-method.html’: No such file or directory
Rd warning: cannot open file ‘/home/hornik/tmp/R.check/r-patched-gcc/Work/build/Packages/00LOCK-Matrix/00new/Matrix/help/%/%,ldiMatrix,ddenseMatrix-method.html’: No such file or directory
Rd warning: cannot open file ‘/home/hornik/tmp/R.check/r-patched-gcc/Work/build/Packages/00LOCK-Matrix/00new/Matrix/help/%/%,ldiMatrix,ldenseMatrix-method.html’: No such file or directory
Rd warning: cannot open file ‘/home/hornik/tmp/R.check/r-patched-gcc/Work/build/Packages/00LOCK-Matrix/00new/Matrix/help/%/%,ldiMatrix,ndenseMatrix-method.html’: No such file or directory
Rd warning: cannot open file ‘/home/hornik/tmp/R.check/r-patched-gcc/Work/build/Packages/00LOCK-Matrix/00new/Matrix/help/%/%,ddiMatrix,Matrix-method.html’: No such file or directory
Rd warning: cannot open file ‘/home/hornik/tmp/R.check/r-patched-gcc/Work/build/Packages/00LOCK-Matrix/00new/Matrix/help/%/%,ldiMatrix,Matrix-method.html’: No such file or directory
    dpoMatrix-class                         html  
    drop0                                   html  
    dsCMatrix-class                         html  
    dsRMatrix-class                         html  
    dsparseMatrix-class                     html  
    dsyMatrix-class                         html  
    dtCMatrix-class                         html  
    dtRMatrix-class-def                     html  
REDIRECT:file dtRMatrix-class-def.html -> dtRMatrix-class-def.html [ SUCCESS ]
    dtpMatrix-class                         html  
    dtrMatrix-class                         html  

 [...................]

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

What I am really puzzled about is why this only shows for
R 4.1.0 alpha  -- which was split off R-devel only Tuesday (Apr
20) .... and we had never seen this issue on R-devel,  where
indeed we did change help page HTML link creations  on purpose
but really many months ago, starting around here (which has been
a big improvement liked by many who had wished for it!):

---------------------------------------------------------------------------
r79075 | deepayan | 2020-08-25 08:32:39 +0200 (Tue, 25 Aug 2020) | 1 line
Changed paths:
   M doc/NEWS.Rd
   M doc/manual/R-exts.texi
   M src/library/tools/R/Rd2HTML.R
   M src/library/tools/R/dynamicHelp.R

help system now prefers topic over filename in external package help links
----------------------------------------------------------------------------

and there quite a few tweaks and improvements to

   src/library/tools/R/Rd2HTML.R

after that ... but none happened the last couple of weeks,  so
R 4.1.0 and R-devel should be identical here.... but the CRAN
checks using R-devel don't seem to show anything.
...
... hence my deep puzzlement.

Thank you once more for the report,
Martin

--
Martin Maechler
ETH Zurich and R Core team

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: R CMD INSTALL warning for S4 replacement functions on R 4.1.0-alpha

Martin Maechler
In reply to this post by Sebastian Meyer-4
>>>>> Sebastian Meyer
>>>>>     on Fri, 23 Apr 2021 23:23:16 +0200 writes:

    > I can confirm this Rd warning in R-devel (2021-04-23 r80216), but not in
    > R 4.0.5. It happens when installing the static help (INSTALL option --html).

    > The following R code reproduces the warning by creating a tiny test
    > package and then calling relevant internal functions from 'tools':

    [...................]

Thanks a lot, Sebastian,
for some reason I did not see your reply when I wrote mine...

So at least you indirectly solved my puzzlement on that this was
not visible with CRAN checks using R-devel  :  Almost surely
they all do *not* create static HTML pages.

So this really is a bug in R > 4.0.z   and we are happy if you
report it, just referring to your  R-devel post ... and then we
all will be really grateful for whomever provides a (careful,
minimal, ..) patch,  presumably to
    src/library/tools/R/Rd2HTML.R

Martin

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel