1

Because a package (feather) for R 3.5.0 is only available from source, my current AppVeyor builds are failing.

I've determined that using PKGTYPE: source will fix the builds, however it takes about 5x as long since it's building all packages from source, when in reality it only needs to build one package from source. PKGTYPE: both results in the builds failing.

In RStudio, install.packages(c("feather", "tidyr"), type = "both")) will install tidyr from binary and feather from source, which is the behavior I want to replicate on AppVeyor. However it requires user input in the form of a popup asking the user if it should attempt to install from source. I assume this UI requirement is why using PKGTYPE: both fails.

Is there a way to not require user input to install packages from source when type = "both"?

r_alanb
  • 873
  • 8
  • 21

1 Answers1

1

You can not require user input from install.packages(..., type = "both") by setting the install.packages.compile.from.source option to "always". See: How to not need user input for install.packages(type = "both")

However, currently, R-AppVeyor uses remotes::install_deps(), which according to the man pages automatically switches "both" to "binary", so the above option is moot, and PKGTYPE: both appears to work the same as PKGTYPE: binary for the AppVeyor yaml.

So, instead of using PKGTYPE: both, or building all packages, if you know which package needs to be built, you can do so by adding a call to Rscript in the AppVeyor yaml. I added the following to appveyor.yml to build feather from source, before the additional packages are loaded with the call to install_deps:

build_script:
    - Rscript -e install.packages('feather',type='source',repos='https://cran.rstudio.com')
    - travis-tool.sh install_deps

Note, the second bullet already existed

r_alanb
  • 873
  • 8
  • 21