rcmdcheck icon indicating copy to clipboard operation
rcmdcheck copied to clipboard

Warnings during installation are not shown

Open gaborcsardi opened this issue 4 years ago • 2 comments

E.g. https://github.com/r-lib/sessioninfo/runs/3748776702?check_suite_focus=true

One way to trigger this is to unset DISPLAY and then check some package imports tcltk on macOS:

~/works/sessioninfo d611a4f...
❯ R CMD INSTALL .
* installing to library ‘/Users/gaborcsardi/Library/R/x86_64/4.1/library’
* installing *source* package ‘sessioninfo’ ...
** using staged installation
** R
** byte-compile and prepare package for lazy loading
Warning in fun(libname, pkgname) :
  no display name and no $DISPLAY environment variable
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
Warning in fun(libname, pkgname) :
  no display name and no $DISPLAY environment variable
** testing if installed package can be loaded from final location
Warning in fun(libname, pkgname) :
  no display name and no $DISPLAY environment variable
** testing if installed package keeps a record of temporary installation path
* DONE (sessioninfo)

gaborcsardi avatar Sep 29 '21 20:09 gaborcsardi

Maybe I'm misunderstanding something, but rcmdcheck doesn't invoke R CMD INSTALL -- it just uses R CMD build and R CMD check, so these installation errors are normally never seen.

For example, with a dummy package:

==> R CMD INSTALL --preclean --no-multiarch --with-keep.source where.errors

* installing to library ‘/Users/kevin/Library/R/arm64/4.4/library’
* installing *source* package ‘where.errors’ ...
** using staged installation
** R
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
Warning in fun(libname, pkgname) :
  no display name and no $DISPLAY environment variable
** testing if installed package can be loaded from final location
Warning in fun(libname, pkgname) :
  no display name and no $DISPLAY environment variable
** testing if installed package keeps a record of temporary installation path
* DONE (where.errors)

But, with build + check:

kevin@MBP-P2MQ:~/projects
$ R CMD build where.errors
* checking for file ‘where.errors/DESCRIPTION’ ... OK
* preparing ‘where.errors’:
* checking DESCRIPTION meta-information ... OK
* checking for LF line-endings in source and make files and shell scripts
* checking for empty or unneeded directories
Omitted ‘LazyData’ from DESCRIPTION
* building ‘where.errors_0.1.0.tar.gz’

kevin@MBP-P2MQ:~/projects
$ R CMD check where.errors_0.1.0.tar.gz
* using log directory ‘/Users/kevin/projects/where.errors.Rcheck’
* using R version 4.4.1 (2024-06-14)
* using platform: aarch64-apple-darwin20
* R was compiled by
    Apple clang version 14.0.0 (clang-1400.0.29.202)
    GNU Fortran (GCC) 12.2.0
* running under: macOS Sonoma 14.5
* using session charset: UTF-8
* checking for file ‘where.errors/DESCRIPTION’ ... OK
* checking extension type ... Package
* this is package ‘where.errors’ version ‘0.1.0’
* package encoding: UTF-8
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for executable files ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking for sufficient/correct file permissions ... OK
* checking whether package ‘where.errors’ can be installed ... OK
* checking installed package size ... OK
* checking package directory ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking code files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies ... OK
* checking whether the package can be unloaded cleanly ... OK
* checking whether the namespace can be loaded with stated dependencies ... OK
* checking whether the namespace can be unloaded cleanly ... OK
* checking loading without being on the library search path ... OK
* checking whether startup messages can be suppressed ... OK
* checking dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... OK
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking examples ... OK
* checking PDF version of manual ... OK
* DONE

Status: OK

So even R never reports these warnings. Or am I missing something?

kevinushey avatar Aug 15 '24 18:08 kevinushey

So maybe there is nothing to do here. Or maybe we could show the installation output from 00install.out, still? Although it would be potentially difficult to decide when to do that.

gaborcsardi avatar Aug 18 '24 07:08 gaborcsardi