krlmlr / r-appveyor

Tools for using R with AppVeyor (https://appveyor.com)
132 stars 60 forks source link

Slow response to updated CRAN builds #103

Closed wlandau-lilly closed 6 years ago

wlandau-lilly commented 6 years ago

This check originally failed because Appveyor could not get the R-release Windows build of listenv from CRAN.

  There are binary versions available (and will be installed) but the
  source versions are later:
        binary source
listenv  0.6.0  0.7.0
tibble   1.4.1  1.4.2
Error in download.file(url, destfile, method, mode = "wb", ...) : 
  cannot open URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/listenv_0.6.0.zip

At the time, listenv 0.7.0 was already built for R-release.

listenv

In my experience, this is not the first time Appveyor/r-appeyor was slow to react.

wlandau-lilly commented 6 years ago

An easy workaround might be to tell Appveyor to install packages from the source when it thinks the binaries lag behind. How do I do that?

krlmlr commented 6 years ago

The CRAN mirrors might lag a bit, AppVeyor doesn't do any caching itself. Set the CRAN env var to the main website to eliminate these lags.

Installing from source might needs Rtools, please check the USE_RTOOLS and PKGTYPE environment variables in the README. This also might mean that all packages are installed from source.

wlandau-lilly commented 6 years ago

Thanks, Kirill. So I could try some of these options?

environment:
  global:
    CRAN: https://ftp.ussg.iu.edu/CRAN/ # Pick a CRAN mirror that updates more quickly.
    USE_RTOOLS: true                    # For building packages with low-level code from the source.
    PKG_TYPE: "source"                  # install.packages(..., type = "source")
krlmlr commented 6 years ago

Looks good, but installation from source will be way slower than from binary.

wlandau-lilly commented 6 years ago

Yes, that is a tradeoff I may need to make. Hopefully at some point there will be a way to automatically install from the source when the binaries are out of date, hopefully without any prompt. Maybe INSTALL_opts in install.packages() already covers this. Maybe it belongs in @HenrikBengtsson's wishlist for R.