R-devel Error on Travis-CI and Appveyor

Background

I am in the final stages of preparing a CRAN submission with a student, and we are trying to figure out an issue with both Travis-CI and Appveyor. The package, which is available on GitHub, passes R CMD check on all three of the macOS computers we've used to write the package with no errors, warnings, or notes.

We have continuous integration set up on both Travis-CI and Appveyor. We pass tests on the services for the following:

  • Linux on Travis-CI - all three versions of R (devel, release, oldrel)
  • macOS on Travis-CI - release and oldrel
  • Windows on Appveyor - patched, release, and oldrel on both i386 and x64

However, on the development builds of R on both macOS and Windows, we have had persistent errors. I've done quite a bit of googling and have not found a solid solution, so I'm hoping @jimhester, @Hadley, @krlmlr, or someone else can help!

Travis-CI

If we include the devel build in Travis-CI, we get the following error on the macOS (but not the Linux) part of the job:

$ Rscript -e 'deps <- devtools::dev_package_deps(dependencies = NA);devtools::install_deps(dependencies = TRUE);if (!all(deps$package %in% installed.packages())) { message("missing: ", paste(setdiff(deps$package, installed.packages()), collapse=", ")); q(status = 1, save = "no")}'
missing: dplyr, ggplot2, glue, magrittr, readr, rlang, stringr, tibble

The command "Rscript -e 'deps <- devtools::dev_package_deps(dependencies = NA);devtools::install_deps(dependencies = TRUE);if (!all(deps$package %in% installed.packages())) { message("missing: ", paste(setdiff(deps$package, installed.packages()), collapse=", ")); q(status = 1, save = "no")}'" failed and exited with 1 during .

Following @jimhester and @hadley's responses a similar GitHub issue, we tried adding the packages listed above as "missing" to an install block, which resulted in a different error (again, only on the devel version of R on macOS):

Error in loadVignetteBuilder(pkgdir, TRUE) : 
  vignette builder 'knitr' not found
Execution halted
The command "R CMD build  ." failed and exited with 1 during .

Appveyor

Over on Appveyor, we've had a different error with the devel version of R. Our jobs there result in the following error for both i386 and x64 versions:

* checking tests ...
  Running 'testthat.R'
 ERROR
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  Error: package 'testthat' was installed by an R version with different internals; it needs to be reinstalled for use with this R version
  Execution halted
* DONE

We came across this similar GitHub issue that @krlmlr and Dirk both provided some ideas on. We tried including the PKGTYPE=source following their advice, but are still coming up with errors:

* checking package dependencies ... ERROR
Packages required but not available:
  'dplyr' 'ggplot2' 'readr' 'stringr' 'rlang' 'tibble' 'glue'
Packages suggested but not available: 'testthat' 'knitr' 'rmarkdown' 'covr'
The suggested packages are required for a complete check.
Checking can be attempted without them by setting the environment
variable _R_CHECK_FORCE_SUGGESTS_ to a false value.

I understand that there has been a change in what the devel version of R requires, but I'm not sure how to appropriately address it, nor am I positive that change is at the root of what is happening here (since we can pass tests on Travis using devel on Linux). We'd love to find a solution to both of these, so thanks for your ideas!

You should just need to flush the package caches to fix the issue on both Travis and Appveyor.

https://docs.travis-ci.com/user/caching/#Clearing-Caches

Thanks for the quick response @jimhester - I really appreciate it. I deleted the cache from the Travis ui and commented out the cache my appveyor.yml file but the errors are persisting on both CI services.

https://travis-ci.org/shaughnessyar/driftR

https://ci.appveyor.com/project/shaughnessyar/driftR

Any other ideas or thoughts?

I would not worry about either error, I seriously doubt they are caused by your package. The Appveyor failure looks to me like the CRAN testthat binary is just old. The R-devel Travis failure only occurs on MacOS and is likely spurious. You can mark that build as an allowed failure if it continues to fail.

1 Like

Thanks for your guidance @jimhester - we've marked them as allowed failures for now. Is the testthat issue worth opening a GitHub issue over?