Skip to content

[BUG] Some failures in vignettes when running tests #1167

Open
@barracuda156

Description

@barracuda156

Describe the bug
Some vignettes code fails to run.

To Reproduce
Run sudo port -v test R-golem on macOS.

Expected behavior
Ideally, checks should pass cleanly.

--->  Testing R-golem
Executing:  cd "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-golem/R-golem/work/golem" && /opt/local/bin/R CMD check ./golem_0.5.0.tar.gz --no-manual --no-build-vignettes 
* using log directory ‘/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-golem/R-golem/work/golem/golem.Rcheck’
* using R version 4.4.1 (2024-06-14)
* using platform: powerpc-apple-darwin10.0.0d2 (32-bit)
* R was compiled by
    gcc-mp-13 (MacPorts gcc13 13.3.0_0+stdlib_flag) 13.3.0
    GNU Fortran (MacPorts gcc13 13.3.0_0+stdlib_flag) 13.3.0
* running under: OS X Snow Leopard 10.6
* using session charset: UTF-8
* using options ‘--no-manual --no-build-vignettes’
* checking for file ‘golem/DESCRIPTION’ ... OK
* this is package ‘golem’ version ‘0.5.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 ‘golem’ can be installed ... OK
* checking installed package size ... OK
* checking package directory ... OK
* checking ‘build’ 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 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 installed files from ‘inst/doc’ ... OK
* checking files in ‘vignettes’ ... OK
* checking examples ... OK
* checking for unstated dependencies in ‘tests’ ... OK
* checking tests ...
  Running ‘spelling.R’
  Running ‘testthat.R’
 OK
* checking for unstated dependencies in vignettes ... OK
* checking package vignettes ... OK
* checking running R code from vignettes ...
  ‘a_start.Rmd’ using ‘UTF-8’... failed
  ‘b_dev.Rmd’ using ‘UTF-8’... failed
  ‘c_deploy.Rmd’ using ‘UTF-8’... failed
  ‘d_js.Rmd’ using ‘UTF-8’... OK
  ‘e_config.Rmd’ using ‘UTF-8’... OK
  ‘f_extending_golem.Rmd’ using ‘UTF-8’... failed
  ‘z_golem_cheatsheet.Rmd’ using ‘UTF-8’... OK
 ERROR
Errors in running code in vignettes:
when running code in ‘a_start.Rmd’
  ...
> knitr::opts_chunk$set(collapse = TRUE, comment = "#>", 
+     eval = FALSE)

> install.packages("golem")
Installing package into ‘/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-golem/R-golem/work/golem/golem.Rcheck’
(as ‘lib’ is unspecified)

  When sourcing ‘a_start.R’:
Error: trying to use CRAN without setting a mirror
Execution halted
when running code in ‘b_dev.Rmd’
  ...
A new path.n =/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-golem/R-golem/work/.tmp/Rtmph1bczF/file8412dbe817d/vignettes/NAMESPACE was added to the directory. 
Updating vignettes documentation
ℹ Loading vignettes
ℹ Loading vignettes

> golem::add_module(name = "my_first_module")

  When sourcing ‘b_dev.R’:
Error: The golem-config.yml file doesn't exist.
Execution halted
when running code in ‘c_deploy.Rmd’
  ...
> run_app <- function(...) {
+     with_golem_options(app = shinyApp(ui = app_ui, server = app_server), 
+         golem_opts = list(...))
+ }

> run_app(this = "that")

  When sourcing ‘c_deploy.R’:
Error: could not find function "with_golem_options"
Execution halted
when running code in ‘f_extending_golem.Rmd’
  ...

> no_dev <- function(path, package_name, ...) {
+     fs::dir_delete("dev")
+ }

> create_golem("ici", project_hook = no_dev)

  When sourcing ‘f_extending_golem.R’:
Error: could not find function "create_golem"
Execution halted

* checking re-building of vignette outputs ... SKIPPED
* DONE

Status: 1 ERROR
See
  ‘/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-golem/R-golem/work/golem/golem.Rcheck/00check.log’
for details.

Command failed:  cd "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-golem/R-golem/work/golem" && /opt/local/bin/R CMD check ./golem_0.5.0.tar.gz --no-manual --no-build-vignettes 
Exit code: 1

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions