Open achubaty opened 1 year ago
What is the expected behaviour in these cases, when there is a conflict between branch and SHA?
It should always use the SHA, never the branch name, to install the specific version of the package in the snapshot.
Are you able to provide the actual error/fail and how you detect that there was a problem in one of those examples?
tmplib <- file.path(tempdir(), "reprexlib")
dir.create(tmplib)
.libPaths(tmplib, include.site = FALSE)
.libPaths()
## NOTE: needs R 4.1 !!
snpsht <- tempfile("packageVersions_", fileext = ".txt")
download.file("https://raw.githubusercontent.com/PredictiveEcology/WBI_forecasts/development/packageVersions_clean.txt", snpsht)
install.packages(c("Require", "remotes"))
library(Require)
tmpcache <- file.path(tempdir(), "reprexcache")
dir.create(tmpcache)
options(Require.RPackageCache = tmpcache)
Require(packageVersionFile = snpsht)
Getting dependencies for 307 packages on CRAN; 16 packages on GitHub
available.packages() does not have correct information on package dependencies for BH (==1.78.0-0); checking CRAN archives
available.packages() does not have correct information on package dependencies for DBI (==1.1.2); checking CRAN archives
available.packages() does not have correct information on package dependencies for DEoptim (==2.2-6); checking CRAN archives
available.packages() does not have correct information on package dependencies for DEoptimR (==1.0-10); checking CRAN archives
available.packages() does not have correct information on package dependencies for EnvStats (==2.5.0); checking CRAN archives
Using GITHUB_PAT to access files on GitHub
available.packages() does not have correct information on package dependencies for MatrixModels (==0.5-0); checking CRAN archives
available.packages() does not have correct information on package dependencies for MuMIn; checking CRAN archives
available.packages() does not have correct information on package dependencies for R.methodsS3 (==1.8.1); checking CRAN archives
available.packages() does not have correct information on package dependencies for R.oo (==1.24.0); checking CRAN archives
available.packages() does not have correct information on package dependencies for R.utils (==2.11.0); checking CRAN archives
available.packages() does not have correct information on package dependencies for RApiSerialize (==0.1.0); checking CRAN archives
available.packages() does not have correct information on package dependencies for RColorBrewer (==1.1-2); checking CRAN archives
available.packages() does not have correct information on package dependencies for RCurl (==1.98-1.6); checking CRAN archives
available.packages() does not have correct information on package dependencies for RPostgres (==1.4.3); checking CRAN archives
available.packages() does not have correct information on package dependencies for RSQLite (==2.2.9); checking CRAN archives
available.packages() does not have correct information on package dependencies for Rcpp (==1.0.8); checking CRAN archives
available.packages() does not have correct information on package dependencies for RcppArmadillo (==0.10.8.1.0); checking CRAN archives
available.packages() does not have correct information on package dependencies for RcppEigen (==0.3.3.9.1); checking CRAN archives
available.packages() does not have correct information on package dependencies for RcppParallel (==5.1.5); checking CRAN archives
available.packages() does not have correct information on package dependencies for Require (==0.0.13); checking CRAN archives
available.packages() does not have correct information on package dependencies for RhpcBLASctl (==0.21-247.1); checking CRAN archives
available.packages() does not have correct information on package dependencies for SpaDES.tools (==0.3.10); checking CRAN archives
available.packages() does not have correct information on package dependencies for XML (==3.99-0.8); checking CRAN archives
available.packages() does not have correct information on package dependencies for archive (==1.1.4); checking CRAN archives
available.packages() does not have correct information on package dependencies for arm (==1.12-2); checking CRAN archives
available.packages() does not have correct information on package dependencies for bit (==4.0.4); checking CRAN archives
available.packages() does not have correct information on package dependencies for blob (==1.2.2); checking CRAN archives
available.packages() does not have correct information on package dependencies for brew (==1.0-7); checking CRAN archives
available.packages() does not have correct information on package dependencies for broom (==0.7.12); checking CRAN archives
available.packages() does not have correct information on package dependencies for broom.mixed (==0.2.7); checking CRAN archives
available.packages() does not have correct information on package dependencies for bslib (==0.3.1); checking CRAN archives
available.packages() does not have correct information on package dependencies for cachem (==1.0.6); checking CRAN archives
available.packages() does not have correct information on package dependencies for callr (==3.7.0); checking CRAN archives
available.packages() does not have correct information on package dependencies for car (==3.0-12); checking CRAN archives
available.packages() does not have correct information on package dependencies for checkmate (==2.0.0); checking CRAN archives
available.packages() does not have correct information on package dependencies for classInt (==0.4-3); checking CRAN archives
available.packages() does not have correct information on package dependencies for cli (==3.2.0); checking CRAN archives
available.packages() does not have correct information on package dependencies for clipr (==0.7.1); checking CRAN archives
available.packages() does not have correct information on package dependencies for colorspace (==2.0-2); checking CRAN archives
available.packages() does not have correct information on package dependencies for commonmark (==1.7); checking CRAN archives
available.packages() does not have correct information on package dependencies for cpp11 (==0.4.2); checking CRAN archives
available.packages() does not have correct information on package dependencies for crayon (==1.5.0); checking CRAN archives
available.packages() does not have correct information on package dependencies for curl (==4.3.2); checking CRAN archives
available.packages() does not have correct information on package dependencies for data.table (==1.14.2); checking CRAN archives
available.packages() does not have correct information on package dependencies for desc (==1.4.0); checking CRAN archives
available.packages() does not have correct information on package dependencies for devtools (==2.4.3); checking CRAN archives
available.packages() does not have correct information on package dependencies for digest (==0.6.29); checking CRAN archives
available.packages() does not have correct information on package dependencies for dismo (==1.3-5); checking CRAN archives
available.packages() does not have correct information on package dependencies for dplyr (==1.0.8); checking CRAN archives
available.packages() does not have correct information on package dependencies for e1071 (==1.7-9); checking CRAN archives
available.packages() does not have correct information on package dependencies for evaluate (==0.14); checking CRAN archives
available.packages() does not have correct information on package dependencies for evd (==2.3-3); checking CRAN archives
available.packages() does not have correct information on package dependencies for exactextractr (==0.7.2); checking CRAN archives
available.packages() does not have correct information on package dependencies for fansi (==1.0.2); checking CRAN archives
available.packages() does not have correct information on package dependencies for farver (==2.1.0); checking CRAN archives
available.packages() does not have correct information on package dependencies for fasterize (==1.0.3); checking CRAN archives
available.packages() does not have correct information on package dependencies for fastmap (==1.1.0); checking CRAN archives
available.packages() does not have correct information on package dependencies for fontawesome (==0.2.2); checking CRAN archives
available.packages() does not have correct information on package dependencies for fpCompare (==0.2.3); checking CRAN archives
available.packages() does not have correct information on package dependencies for fs (==1.5.2); checking CRAN archives
available.packages() does not have correct information on package dependencies for future (==1.23.0); checking CRAN archives
available.packages() does not have correct information on package dependencies for future.apply (==1.8.1); checking CRAN archives
available.packages() does not have correct information on package dependencies for gamlss (==5.4-1); checking CRAN archives
available.packages() does not have correct information on package dependencies for gamlss.dist (==6.0-1); checking CRAN archives
available.packages() does not have correct information on package dependencies for gargle (==1.2.0); checking CRAN archives
available.packages() does not have correct information on package dependencies for gbm (==2.1.8); checking CRAN archives
available.packages() does not have correct information on package dependencies for gdalUtilities (==1.2.0); checking CRAN archives
available.packages() does not have correct information on package dependencies for gdalUtils; checking CRAN archives
available.packages() does not have correct information on package dependencies for generics (==0.1.2); checking CRAN archives
available.packages() does not have correct information on package dependencies for geometry (==0.4.5); checking CRAN archives
available.packages() does not have correct information on package dependencies for gert (==1.5.0); checking CRAN archives
available.packages() does not have correct information on package dependencies for ggfun (==0.0.5); checking CRAN archives
available.packages() does not have correct information on package dependencies for ggimage (==0.3.0); checking CRAN archives
available.packages() does not have correct information on package dependencies for ggplot2 (==3.3.5); checking CRAN archives
available.packages() does not have correct information on package dependencies for ggpubr (==0.4.0); checking CRAN archives
available.packages() does not have correct information on package dependencies for ggrepel (==0.9.1); checking CRAN archives
available.packages() does not have correct information on package dependencies for ggsci (==2.9); checking CRAN archives
available.packages() does not have correct information on package dependencies for ggsignif (==0.6.3); checking CRAN archives
available.packages() does not have correct information on package dependencies for ggspatial (==1.1.5); checking CRAN archives
available.packages() does not have correct information on package dependencies for gh (==1.3.0); checking CRAN archives
available.packages() does not have correct information on package dependencies for gitcreds (==0.1.1); checking CRAN archives
available.packages() does not have correct information on package dependencies for glmm (==1.4.2); checking CRAN archives
available.packages() does not have correct information on package dependencies for globals (==0.14.0); checking CRAN archives
available.packages() does not have correct information on package dependencies for glue (==1.6.1); checking CRAN archives
available.packages() does not have correct information on package dependencies for googledrive (==2.0.0); checking CRAN archives
available.packages() does not have correct information on package dependencies for gtable (==0.3.0); checking CRAN archives
available.packages() does not have correct information on package dependencies for gtools (==3.9.2); checking CRAN archives
available.packages() does not have correct information on package dependencies for hexbin (==1.28.2); checking CRAN archives
available.packages() does not have correct information on package dependencies for highr (==0.9); checking CRAN archives
available.packages() does not have correct information on package dependencies for hms (==1.1.1); checking CRAN archives
available.packages() does not have correct information on package dependencies for htmltools (==0.5.2); checking CRAN archives
available.packages() does not have correct information on package dependencies for httpuv (==1.6.5); checking CRAN archives
available.packages() does not have correct information on package dependencies for httr (==1.4.2); checking CRAN archives
available.packages() does not have correct information on package dependencies for igraph (==1.2.11); checking CRAN archives
available.packages() does not have correct information on package dependencies for isoband (==0.2.5); checking CRAN archives
available.packages() does not have correct information on package dependencies for jpeg (==0.1-9); checking CRAN archives
available.packages() does not have correct information on package dependencies for jsonlite (==1.7.3); checking CRAN archives
available.packages() does not have correct information on package dependencies for knitr (==1.37); checking CRAN archives
available.packages() does not have correct information on package dependencies for latticeExtra (==0.6-29); checking CRAN archives
available.packages() does not have correct information on package dependencies for lifecycle (==1.0.1); checking CRAN archives
available.packages() does not have correct information on package dependencies for linprog (==0.9-2); checking CRAN archives
available.packages() does not have correct information on package dependencies for listenv (==0.8.0); checking CRAN archives
available.packages() does not have correct information on package dependencies for lme4 (==1.1-28); checking CRAN archives
available.packages() does not have correct information on package dependencies for lobstr (==1.1.1); checking CRAN archives
available.packages() does not have correct information on package dependencies for lpSolve (==5.6.15); checking CRAN archives
available.packages() does not have correct information on package dependencies for lubridate (==1.8.0); checking CRAN archives
available.packages() does not have correct information on package dependencies for magic (==1.6-0); checking CRAN archives
available.packages() does not have correct information on package dependencies for magick (==2.7.3); checking CRAN archives
available.packages() does not have correct information on package dependencies for magrittr (==2.0.2); checking CRAN archives
available.packages() does not have correct information on package dependencies for maptools (==1.1-2); checking CRAN archives
available.packages() does not have correct information on package dependencies for matrixStats (==0.61.0); checking CRAN archives
available.packages() does not have correct information on package dependencies for mclust (==5.4.9); checking CRAN archives
available.packages() does not have correct information on package dependencies for merTools (==0.5.2); checking CRAN archives
available.packages() does not have correct information on package dependencies for minqa (==1.2.4); checking CRAN archives
available.packages() does not have correct information on package dependencies for mvnfast (==0.2.7); checking CRAN archives
available.packages() does not have correct information on package dependencies for nloptr (==2.0.0); checking CRAN archives
available.packages() does not have correct information on package dependencies for openssl (==1.4.6); checking CRAN archives
available.packages() does not have correct information on package dependencies for parallelly (==1.30.0); checking CRAN archives
available.packages() does not have correct information on package dependencies for pbkrtest (==0.5.1); checking CRAN archives
available.packages() does not have correct information on package dependencies for pillar (==1.7.0); checking CRAN archives
available.packages() does not have correct information on package dependencies for pkgbuild (==1.3.1); checking CRAN archives
available.packages() does not have correct information on package dependencies for pkgload (==1.2.4); checking CRAN archives
available.packages() does not have correct information on package dependencies for plyr (==1.8.6); checking CRAN archives
available.packages() does not have correct information on package dependencies for png (==0.1-7); checking CRAN archives
available.packages() does not have correct information on package dependencies for polyclip (==1.10-0); checking CRAN archives
available.packages() does not have correct information on package dependencies for polynom (==1.4-0); checking CRAN archives
available.packages() does not have correct information on package dependencies for prettymapr (==0.2.2); checking CRAN archives
available.packages() does not have correct information on package dependencies for processx (==3.5.2); checking CRAN archives
available.packages() does not have correct information on package dependencies for proj4 (==1.0-11); checking CRAN archives
available.packages() does not have correct information on package dependencies for proxy (==0.4-26); checking CRAN archives
available.packages() does not have correct information on package dependencies for pryr (==0.1.5); checking CRAN archives
available.packages() does not have correct information on package dependencies for ps (==1.6.0); checking CRAN archives
available.packages() does not have correct information on package dependencies for purrr (==0.3.4); checking CRAN archives
available.packages() does not have correct information on package dependencies for qs (==0.25.2); checking CRAN archives
available.packages() does not have correct information on package dependencies for quadmesh (==0.5.0); checking CRAN archives
available.packages() does not have correct information on package dependencies for quantreg (==5.88); checking CRAN archives
available.packages() does not have correct information on package dependencies for quickPlot (==0.1.6); checking CRAN archives
available.packages() does not have correct information on package dependencies for raster (==3.5-15); checking CRAN archives
available.packages() does not have correct information on package dependencies for rasterVis (==0.51.2); checking CRAN archives
available.packages() does not have correct information on package dependencies for reproducible (==1.2.8); checking CRAN archives
available.packages() does not have correct information on package dependencies for reproj (==0.4.2); checking CRAN archives
available.packages() does not have correct information on package dependencies for rgdal (==1.5-28); checking CRAN archives
available.packages() does not have correct information on package dependencies for rgeos (==0.5-9); checking CRAN archives
available.packages() does not have correct information on package dependencies for rlang (==1.0.1); checking CRAN archives
available.packages() does not have correct information on package dependencies for robustbase (==0.93-9); checking CRAN archives
available.packages() does not have correct information on package dependencies for rosm (==0.2.5); checking CRAN archives
available.packages() does not have correct information on package dependencies for roxygen2 (==7.1.2); checking CRAN archives
available.packages() does not have correct information on package dependencies for rprojroot (==2.0.2); checking CRAN archives
available.packages() does not have correct information on package dependencies for rstatix (==0.7.0); checking CRAN archives
available.packages() does not have correct information on package dependencies for rstudioapi (==0.13); checking CRAN archives
available.packages() does not have correct information on package dependencies for rsyncrosim (==1.3.2); checking CRAN archives
available.packages() does not have correct information on package dependencies for rversions (==2.1.1); checking CRAN archives
available.packages() does not have correct information on package dependencies for s2 (==1.0.7); checking CRAN archives
available.packages() does not have correct information on package dependencies for sass (==0.4.0); checking CRAN archives
available.packages() does not have correct information on package dependencies for scales (==1.1.1); checking CRAN archives
available.packages() does not have correct information on package dependencies for sf (==1.0-6); checking CRAN archives
available.packages() does not have correct information on package dependencies for shiny (==1.7.1); checking CRAN archives
available.packages() does not have correct information on package dependencies for simstudy (==0.4.0); checking CRAN archives
available.packages() does not have correct information on package dependencies for slackr (==3.2.0); checking CRAN archives
available.packages() does not have correct information on package dependencies for sourcetools (==0.1.7); checking CRAN archives
available.packages() does not have correct information on package dependencies for sp (==1.4-6); checking CRAN archives
available.packages() does not have correct information on package dependencies for spData (==2.0.1); checking CRAN archives
available.packages() does not have correct information on package dependencies for spatialEco (==1.3-7); checking CRAN archives
available.packages() does not have correct information on package dependencies for spatstat.core; checking CRAN archives
available.packages() does not have correct information on package dependencies for spatstat.data (==2.1-2); checking CRAN archives
available.packages() does not have correct information on package dependencies for spatstat.geom (==2.3-2); checking CRAN archives
available.packages() does not have correct information on package dependencies for spatstat.sparse (==2.1-0); checking CRAN archives
available.packages() does not have correct information on package dependencies for spatstat.utils (==2.3-0); checking CRAN archives
available.packages() does not have correct information on package dependencies for spdep (==1.2-2); checking CRAN archives
available.packages() does not have correct information on package dependencies for stringfish (==0.15.5); checking CRAN archives
available.packages() does not have correct information on package dependencies for stringi (==1.7.6); checking CRAN archives
available.packages() does not have correct information on package dependencies for stringr (==1.4.0); checking CRAN archives
available.packages() does not have correct information on package dependencies for sys (==3.4); checking CRAN archives
available.packages() does not have correct information on package dependencies for sysfonts (==0.8.5); checking CRAN archives
available.packages() does not have correct information on package dependencies for terra (==1.5-21); checking CRAN archives
available.packages() does not have correct information on package dependencies for testthat (==3.1.2); checking CRAN archives
available.packages() does not have correct information on package dependencies for tibble (==3.1.6); checking CRAN archives
available.packages() does not have correct information on package dependencies for tictoc (==1.0.1); checking CRAN archives
available.packages() does not have correct information on package dependencies for tidyr (==1.2.0); checking CRAN archives
available.packages() does not have correct information on package dependencies for tidyselect (==1.1.1); checking CRAN archives
available.packages() does not have correct information on package dependencies for units (==0.8-0); checking CRAN archives
available.packages() does not have correct information on package dependencies for usethis (==2.1.5); checking CRAN archives
available.packages() does not have correct information on package dependencies for utf8 (==1.2.2); checking CRAN archives
available.packages() does not have correct information on package dependencies for uuid (==1.0-3); checking CRAN archives
available.packages() does not have correct information on package dependencies for vctrs (==0.3.8); checking CRAN archives
available.packages() does not have correct information on package dependencies for viridisLite (==0.4.0); checking CRAN archives
available.packages() does not have correct information on package dependencies for waldo (==0.3.1); checking CRAN archives
available.packages() does not have correct information on package dependencies for whisker (==0.4); checking CRAN archives
available.packages() does not have correct information on package dependencies for withr (==2.4.3); checking CRAN archives
available.packages() does not have correct information on package dependencies for wk (==0.6.0); checking CRAN archives
available.packages() does not have correct information on package dependencies for xfun (==0.29); checking CRAN archives
available.packages() does not have correct information on package dependencies for yaml (==2.2.2); checking CRAN archives
available.packages() does not have correct information on package dependencies for yulab.utils (==0.0.4); checking CRAN archives
available.packages() does not have correct information on package dependencies for zip (==2.2.0); checking CRAN archives
available.packages() does not have correct information on package dependencies for zoo (==1.8-9); checking CRAN archives
... 232 of these have recursive dependencies
1 of 232
2 of 232
3 of 232
4 of 232
5 of 232
available.packages() does not have correct information on package dependencies for MuMIn (>= 1.42.5); checking CRAN archives
MuMIn (>= 1.42.5) dependencies not found on CRAN; perhaps incomplete description? On GitHub?
6 of 232
LandR dependencies not found on CRAN; perhaps incomplete description? On GitHub?
7 of 232
8 of 232
9 of 232
10 of 232
11 of 232
12 of 232
13 of 232
14 of 232
15 of 232
16 of 232
17 of 232
18 of 232
19 of 232
20 of 232
21 of 232
22 of 232
available.packages() does not have correct information on package dependencies for SpaDES.core; checking CRAN archives
23 of 232
24 of 232
25 of 232
26 of 232
27 of 232
28 of 232
29 of 232
30 of 232
31 of 232
32 of 232
33 of 232
34 of 232
35 of 232
36 of 232
37 of 232
38 of 232
39 of 232
40 of 232
41 of 232
42 of 232
43 of 232
44 of 232
45 of 232
Error in getSHAfromGitHub(...) :
Can't find terraInProjectInputs on GitHub repo PredictiveEcology/reproducible;
-- does it exist? --
missing branch case is easy to spot ^^
In other cases, I see it downloading and attempting to install from HEAD instead of using specific SHA, or there are other flat out errors.
Working through these... there are issues that I do not know if they can be addressed.
The error that is posted (terraInProjectInputs
) is listed as a Remotes
within the package climateData
...
> readLines(a$DESCFile)
[1] "Package: climateData"
[2] "Title: Utilities For Working With North American Climate Data"
[3] "Description: Utilities for working with North American climate data from"
[4] " 'ClimateNA' <http://climatena.ca/>."
[5] "URL: https://github.com/PredictiveEcology/climateData"
[6] "Date: 2022-01-27"
[7] "Version: 0.0.0.9005"
[8] "Authors@R: c("
[9] " person(\"Alex M\", \"Chubaty\", email = \"achubaty@for-cast.ca\","
[10] " role = c(\"aut\", \"cre\"), comment = c(ORCID = \"0000-0001-7146-8135\")),"
[11] " person(\"Ian\", \"Eddy\", email = \"ian.eddy@nrcan-rncan.gc.ca\","
[12] " role = c(\"aut\"), comment = c(ORCID = \"0000-0001-7397-2116\")),"
[13] " person(\"Eliot\", \"McIntire\", email = \"eliot.mcintire@nrcan-rncan.gc.ca\","
[14] " role = c(\"aut\"), comment = c(ORCID = \"0000-0002-6914-8316\"))"
[15] " )"
[16] "Depends:"
[17] " R (>= 3.6)"
[18] "Imports:"
[19] " data.table,"
[20] " magrittr,"
[21] " raster,"
[22] " reproducible (>= 1.2.8.9014),"
[23] " sp,"
[24] " stats,"
[25] " utils"
[26] "Remotes:"
[27] " PredictiveEcology/reproducible@terraInProjectInputs"
[28] "BugReports: https://github.com/PredictiveEcology/climateData/issues"
[29] "Encoding: UTF-8"
[30] "Language: en-CA"
[31] "License: GPL-3"
[32] "ByteCompile: yes"
[33] "LazyData: true"
[34] "RoxygenNote: 7.1.2"
[35] "Suggests: "
[36] " knitr,"
[37] " rmarkdown"
[38] "VignetteBuilder: knitr"
There is nothing in this that specifies a SHA for the package reproducible
that is the one failing -- and it is not failing during "install"... but during the assessment of the recursive package dependencies of climateData
, which it can't do. Where would Require
be able to find the SHA
that was installed. In this case, the packageSnapshot.txt
file does have a listing for reproducible
that is NOT the one that would have been installed from that feature branch (terraInProjectInputs
) because it has no SHA associated with it in the file. So, in this case, is the correct behaviour to "not fail" when it is looking for the recursive dependencies of climateData
when one of the dependencies doesn't exist? I think the only way this would be "ok" behaviour is because the call to pkgDep
is inside a call to Require
where all dependencies are supposed to be described (which they aren't).
I will look at the other 4 examples, but my hunch is they are related fails...
I have made this scenario not fail, but give a warning. Essentially, one package that is specified with a SHA has a dependency on GitHub that is specified in the Remotes
section of the DESCRIPTION
file. Now if that branch does not exist, it will revert to the main
branch to evaluate the required dependencies, with a warning.
I have not made it through the other 3 examples.
It does seem, however, that these and all other examples of "failing" snapshots is due to the organic nature of installations in the first place ... that allow for violations to occur incrementally, but then taking a snapshot will create version violations that are illegal. Thus, restoring from those requires a series of rules that allow for (accommodate by changing the requested package versions) these violations.
@achubaty can you please test these again with new Require 1.0.0
first WBI example fails using latest Require (v1.0.1)
Error in getDepsGH(pkgDTCached[["FALSE"]][isGH], verbose, which = which, :
Error in getSHAfromGitHub(...) :
Can't find PredictiveEcology/reproducible@terraInProjectInputs;
-- does it exist? --
In addition: Warning messages:
1: partial match of 'installed' to 'installedSha'
2: partial match of 'installed' to 'installedSha'
See the following examples:
There are several points of failure, including using the branch name instead of the SHA to restore GitHub packages. Branches may have been deleted (so it will fail outright), or may have been updated since the snapshot (so instead of getting the commit requested, it's installing the latest from that branch).