Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Packages with outdated binaries on CRAN cause package installation to fail #262

Closed
schloerke opened this issue Jan 28, 2021 · 1 comment
Closed

Comments

@schloerke
Copy link

schloerke commented Jan 28, 2021

If a CRAN package binary is not the latest version, I would expect pak to install the latest source version or the latest binary version. Currently, pac is failing to install.

Workflow: https://github.com/rstudio/promises/pull/62/checks?check_run_id=1785516935#step:8:61

GHA step log
 pak::pkg_install(c("rcmdcheck", "sessioninfo"))
  pak::local_install_dev_deps(upgrade = TRUE)
  pak::local_install(upgrade = TRUE)
  shell: /usr/local/bin/Rscript {0}
  env:
    R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
    RSPM: 
    GITHUB_PAT: ***
    R_LIBS_USER: /Users/runner/work/_temp/Library
    TZ: UTC
    _R_CHECK_SYSTEM_CLOCK_: FALSE
    NOT_CRAN: true
ℹ Loading global cached package metadata
✔ Loading global cached package metadata ... done

 
→ Will install 18 packages.
→ Will download 17 CRAN packages (3.67 MB).
→ Will download 1 package with unknown size.
+ assertthat    0.2.1   ⬇ (52.47 kB)
+ callr         3.5.1   ⬇ (385.44 kB)
+ cli           2.2.0   ⬇ (442.11 kB)
+ crayon        1.3.4   ⬇ (748.25 kB)
+ desc          1.2.0   ⬇ (279.60 kB)
+ digest        0.6.27  ⬇ (300.37 kB)
+ fansi         0.4.2   ⬇ (212.15 kB)
+ glue          1.4.2   ⬇ (139.02 kB)
+ pkgbuild      1.2.0   ⬇ (140.59 kB)
+ prettyunits   1.1.1   ⬇ (34.79 kB)
+ processx      3.4.5   ⬇ (279.43 kB)
+ ps            1.5.0   ⬇ (276.26 kB)
+ R6            2.5.0   ⬇ (82.45 kB)
+ rcmdcheck     1.3.3   ⬇ (131.99 kB)
+ rprojroot     2.0.2   ⬇ (96.29 kB)
+ sessioninfo   1.1.1   ⬇ (44.03 kB)
+ withr         2.4.1   ⬇
+ xopen         1.0.0   ⬇ (22.41 kB)
ℹ Getting 17 pkgs (3.67 MB) and 1 pkg with unknown size

✔ Got assertthat 0.2.1 (macos) (52.57 kB)
✔ Got callr 3.5.1 (macos) (385.44 kB)
✔ Got cli 2.2.0 (macos) (442.11 kB)
✔ Got crayon 1.3.4 (macos) (748.90 kB)
✔ Got R6 2.5.0 (macos) (82.45 kB)
✔ Got desc 1.2.0 (macos) (285.23 kB)
✔ Got digest 0.6.27 (macos) (300.37 kB)
✔ Got prettyunits 1.1.1 (macos) (34.70 kB)
✔ Got pkgbuild 1.2.0 (macos) (140.59 kB)
✔ Got processx 3.4.5 (macos) (279.43 kB)
✖ Failed to download withr 2.4.1 (macos)
✔ Got rcmdcheck 1.3.3 (macos) (132.62 kB)
✔ Got xopen 1.0.0 (macos) (22.44 kB)
✔ Got sessioninfo 1.1.1 (macos) (44.34 kB)
✔ Got rprojroot 2.0.2 (macos) (96.29 kB)
✔ Got glue 1.4.2 (macos) (139.02 kB)
✔ Got fansi 0.4.2 (macos) (212.15 kB)
✔ Got ps 1.5.0 (macos) (276.26 kB)
✖ Failed to download 1 package. 

Error: Error: <callr_remote_error: Failed to download withr from `https://cloud.r-project.org/bin/macosx/contrib/4.0/withr_2.4.1.tgz`.>
 in process 1740 
-->
<error: Failed to download withr from `https://cloud.r-project.org/bin/macosx/contrib/4.0/withr_2.4.1.tgz`.>

 Stack trace:

 12. (function (...)  ...
 13. base:::withCallingHandlers(cli_message = function(msg) { ...
 14. get("pkg_install_do_plan", asNamespace("pak"))(...)
 15. proposal$stop_for_download_error()
 16. private$plan$stop_for_solution_download_error()
 17. pkgdepends:::pkgplan_stop_for_solution_download_error(self, private)
 18. base:::stop(err)
 19. (function (e)  ...
 20. base:::stop(e)
 21. (function (e)  ...

 x Failed to download withr from `https://cloud.r-project.org/bin/macosx/contrib/4.0/withr_2.4.1.tgz`. 

Execution halted
Error: Process completed with exit code 1.

Command: pak::pkg_install(c("rcmdcheck", "sessioninfo"))
I do not believe there was any deviation from the usethis pak actions setup.

At the time of writing this issue, pak is attempting to download withr 2.4.1 on macOS. withr was updated 2 days ago and the mac binary has not been built. So the source for 2.4.0 exists, but 2.4.1 does not.

pak is trying to install https://cloud.r-project.org/bin/macosx/contrib/4.0/withr_2.4.1.tgz which does not currently exist. ..../withr_2.4.1.tar.gz does exist.

CRAN:
Screen Shot 2021-01-28 at 11 24 47 AM

@schloerke schloerke changed the title Missing binary Packages with outdated binaries on CRAN cause package installation to fail Jan 28, 2021
@gaborcsardi
Copy link
Member

The metadata at https://cloud.r-project.org/bin/macosx/contrib/4.0/PACKAGES has withr 2.4.1, so this is a CRAN bug:

Package: withr
Version: 2.4.1
Depends: R (>= 3.2.0)
Imports: graphics, grDevices, stats
Suggests: covr, DBI, knitr, lattice, methods, rmarkdown, RSQLite,
        testthat (>= 2.1.0)
License: MIT + file LICENSE

These mismatches are seemingly becoming more frequent, so we might try to work around them...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants