rstudio / packrat

Packrat is a dependency management system for R
http://rstudio.github.io/packrat/
402 stars 90 forks source link

packrat seems to be using wrong dependency order. #661

Closed kozmaz87 closed 1 year ago

kozmaz87 commented 2 years ago

Installing source version of the foreach 1.5.2 package seems to not install iterators first... according to the package metadata the dependency is declared on iterators and it is indeed in the list of packages packrat is preparing to install but it tries to compile foreach first.... not sure what is happening there....

The full list at the beginning:

Fetching sources for AzureAuth (1.3.3) ... OK (CRAN current)
Fetching sources for AzureGraph (1.3.2) ... OK (CRAN current)
Fetching sources for AzureRMR (2.4.3) ... OK (CRAN current)
Fetching sources for AzureStor (3.6.1) ... OK (CRAN current)
Fetching sources for BBmisc (1.12) ... OK (CRAN current)
Fetching sources for BH (1.78.0-0) ... OK (CRAN current)
Fetching sources for Boruta (7.0.0) ... OK (CRAN current)
Fetching sources for DALEX (2.4.0) ... OK (CRAN current)
Fetching sources for DT (0.21) ... OK (CRAN current)
Fetching sources for DiceKriging (1.6.0) ... OK (CRAN current)
Fetching sources for EnvStats (2.7.0) ... OK (CRAN current)
Fetching sources for GGally (2.1.2) ... OK (CRAN current)
Fetching sources for ICEbox (1.1.2) ... OK (CRAN current)
Fetching sources for MASS (7.3-51.5) ... OK (CRAN archived)
Fetching sources for Matrix (1.2-18) ... OK (CRAN archived)
Fetching sources for ParamHelpers (1.14) ... OK (CRAN current)
Fetching sources for R6 (2.5.1) ... OK (CRAN current)
Fetching sources for RColorBrewer (1.1-2) ... OK (CRAN current)
Fetching sources for RJSONIO (1.3-1.6) ... OK (CRAN current)
Fetching sources for Rcpp (1.0.5) ... OK (CRAN archived)
Fetching sources for RcppArmadillo (0.10.8.1.0) ... OK (CRAN current)
Fetching sources for RcppEigen (0.3.3.9.1) ... OK (CRAN current)
Fetching sources for RcppGSL (0.3.10) ... OK (CRAN current)
Fetching sources for RcppTOML (0.1.7) ... OK (CRAN current)
Fetching sources for RcppZiggurat (0.1.6) ... OK (CRAN current)
Fetching sources for Rfast (2.0.6) ... OK (CRAN current)
Fetching sources for Rtsne (0.15) ... OK (CRAN current)
Fetching sources for TTR (0.24.3) ... OK (CRAN current)
Fetching sources for XML (3.99-0.3) ... OK (CRAN current)
Fetching sources for abind (1.4-5) ... OK (CRAN current)
Fetching sources for alluvial (0.1-2) ... OK (CRAN current)
Fetching sources for anytime (0.3.9) ... OK (CRAN current)
Fetching sources for arrow (7.0.0) ... OK (CRAN current)
Fetching sources for askpass (1.1) ... OK (CRAN current)
Fetching sources for assertthat (0.2.1) ... OK (CRAN current)
Fetching sources for backports (1.4.1) ... OK (CRAN current)
Fetching sources for base64enc (0.1-3) ... OK (CRAN current)
Fetching sources for bit (4.0.4) ... OK (CRAN current)
Fetching sources for bit64 (4.0.5) ... OK (CRAN current)
Fetching sources for boot (1.3-24) ... OK (CRAN archived)
Fetching sources for broom (0.7.12) ... OK (CRAN current)
Fetching sources for bslib (0.3.1) ... OK (CRAN current)
Fetching sources for cachem (1.0.6) ... OK (CRAN current)
Fetching sources for callr (3.7.0) ... OK (CRAN current)
Fetching sources for cellranger (1.1.0) ... OK (CRAN current)
Fetching sources for checkmate (2.0.0) ... OK (CRAN current)
Fetching sources for class (7.3-15) ... OK (CRAN archived)
Fetching sources for cli (3.2.0) ... OK (CRAN current)
Fetching sources for clipr (0.8.0) ... OK (CRAN current)
Fetching sources for cluster (2.1.0) ... OK (CRAN archived)
Fetching sources for codetools (0.2-16) ... OK (CRAN archived)
Fetching sources for colorspace (2.0-3) ... OK (CRAN current)
Fetching sources for commonmark (1.8.0) ... OK (CRAN current)
Fetching sources for config (0.3.1) ... OK (CRAN current)
Fetching sources for corrplot (0.92) ... OK (CRAN current)
Fetching sources for cpp11 (0.4.2) ... OK (CRAN current)
Fetching sources for crayon (1.5.0) ... OK (CRAN current)
Fetching sources for crosstalk (1.2.0) ... OK (CRAN current)
Fetching sources for curl (4.3.2) ... OK (CRAN current)
Fetching sources for data.table (1.14.2) ... OK (CRAN current)
Fetching sources for digest (0.6.29) ... OK (CRAN current)
Fetching sources for dplyr (1.0.8) ... OK (CRAN current)
Fetching sources for e1071 (1.7-9) ... OK (CRAN current)
Fetching sources for ellipsis (0.3.2) ... OK (CRAN current)
Fetching sources for emoa (0.5-0.1) ... OK (CRAN current)
Fetching sources for evaluate (0.15) ... OK (CRAN current)
Fetching sources for fansi (1.0.2) ... OK (CRAN current)
Fetching sources for farver (2.1.0) ... OK (CRAN current)
Fetching sources for fastmap (1.1.0) ... OK (CRAN current)
Fetching sources for fastmatch (1.1-3) ... OK (CRAN current)
Fetching sources for fastshap (0.0.7) ... OK (CRAN current)
Fetching sources for fontawesome (0.2.2) ... OK (CRAN current)
Fetching sources for forcats (0.5.1) ... OK (CRAN current)
Fetching sources for foreach (1.5.2) ... OK (CRAN current)
Fetching sources for forecast (8.16) ... OK (CRAN current)
Fetching sources for fracdiff (1.5-1) ... OK (CRAN current)
Fetching sources for fs (1.5.2) ... OK (CRAN current)
Fetching sources for generics (0.1.2) ... OK (CRAN current)
Fetching sources for ggdendro (0.1.23) ... OK (CRAN current)
Fetching sources for ggforce (0.3.3) ... OK (CRAN current)
Fetching sources for ggplot2 (3.3.5) ... OK (CRAN current)
Fetching sources for ggrepel (0.9.1) ... OK (CRAN current)
Fetching sources for glmnet (4.1-3) ... OK (CRAN current)
Fetching sources for glue (1.6.2) ... OK (CRAN current)
Fetching sources for grf (2.0.2) ... OK (CRAN current)
Fetching sources for gridExtra (2.3) ... OK (CRAN current)
Fetching sources for gtable (0.3.0) ... OK (CRAN current)
Fetching sources for gtools (3.9.2) ... OK (CRAN current)
Fetching sources for here (1.0.1) ... OK (CRAN current)
Fetching sources for hexbin (1.28.2) ... OK (CRAN current)
Fetching sources for highr (0.9) ... OK (CRAN current)
Fetching sources for hms (1.1.1) ... OK (CRAN current)
Fetching sources for htmltools (0.5.2) ... OK (CRAN current)
Fetching sources for htmlwidgets (1.5.4) ... OK (CRAN current)
Fetching sources for httpuv (1.6.5) ... OK (CRAN current)
Fetching sources for httr (1.4.2) ... OK (CRAN current)
Fetching sources for iBreakDown (2.0.1) ... OK (CRAN current)
Fetching sources for ingredients (2.2.0) ... OK (CRAN current)
Fetching sources for isoband (0.2.5) ... OK (CRAN current)
Fetching sources for iterators (1.0.14) ... OK (CRAN current)
Fetching sources for jose (1.2.0) ... OK (CRAN current)
Fetching sources for jquerylib (0.1.4) ... OK (CRAN current)
Fetching sources for jsonlite (1.8.0) ... OK (CRAN current)
Fetching sources for kableExtra (1.3.4) ... OK (CRAN current)
Fetching sources for keras (2.8.0) ... OK (CRAN current)
Fetching sources for knitr (1.37) ... OK (CRAN current)
Fetching sources for labeling (0.4.2) ... OK (CRAN current)
Fetching sources for later (1.3.0) ... OK (CRAN current)
Fetching sources for lattice (0.20-38) ... OK (CRAN archived)
Fetching sources for lazyeval (0.2.2) ... OK (CRAN current)
Fetching sources for lhs (1.1.4) ... OK (CRAN current)
Fetching sources for lifecycle (1.0.1) ... OK (CRAN current)
Fetching sources for lmtest (0.9-39) ... OK (CRAN current)
Fetching sources for magrittr (2.0.2) ... OK (CRAN current)
Fetching sources for maptree (1.4-7) ... OK (CRAN current)
Fetching sources for matrixStats (0.61.0) ... OK (CRAN current)
Fetching sources for mco (1.15.6) ... OK (CRAN current)
Fetching sources for memoise (2.0.1) ... OK (CRAN current)
Fetching sources for mgcv (1.8-31) ... OK (CRAN archived)
Fetching sources for mice (3.14.0) ... OK (CRAN current)
Fetching sources for mime (0.12) ... OK (CRAN current)
Fetching sources for misc3d (0.9-1) ... OK (CRAN current)
Fetching sources for mlr (2.19.0) ... OK (CRAN current)
Fetching sources for mlrMBO (1.1.5) ... OK (CRAN current)
Fetching sources for munsell (0.5.0) ... OK (CRAN current)
Fetching sources for nlme (3.1-144) ... OK (CRAN archived)
Fetching sources for nnet (7.3-12) ... OK (CRAN archived)
Fetching sources for nortest (1.0-4) ... OK (CRAN current)
Fetching sources for numbers (0.8-2) ... OK (CRAN current)
Fetching sources for onehot (0.1.1) ... OK (CRAN current)
Fetching sources for openssl (2.0.0) ... OK (CRAN current)
Fetching sources for openxlsx (4.2.5) ... OK (CRAN current)
Fetching sources for pROC (1.18.0) ... OK (CRAN current)
Fetching sources for packrat (0.7.0) ... OK (CRAN current)
Fetching sources for parallelMap (1.5.1) ... OK (CRAN current)
Fetching sources for pdp (0.7.0) ... OK (CRAN current)
Fetching sources for pillar (1.7.0) ... OK (CRAN current)
Fetching sources for pkgconfig (2.0.3) ... OK (CRAN current)
Fetching sources for plot3D (1.4) ... OK (CRAN current)
Fetching sources for plotly (4.10.0) ... OK (CRAN current)
Fetching sources for plyr (1.8.6) ... OK (CRAN current)
Fetching sources for png (0.1-7) ... OK (CRAN current)
Fetching sources for polyclip (1.10-0) ... OK (CRAN current)
Fetching sources for prettyunits (1.1.1) ... OK (CRAN current)
Fetching sources for processx (3.5.2) ... OK (CRAN current)
Fetching sources for progress (1.2.2) ... OK (CRAN current)
Fetching sources for promises (1.2.0.1) ... OK (CRAN current)
Fetching sources for proxy (0.4-26) ... OK (CRAN current)
Fetching sources for ps (1.6.0) ... OK (CRAN current)
Fetching sources for pso (1.0.3) ... OK (CRAN current)
Fetching sources for purrr (0.3.4) ... OK (CRAN current)
Fetching sources for quadprog (1.5-8) ... OK (CRAN current)
Fetching sources for quantmod (0.4.18) ... OK (CRAN current)
Fetching sources for randomForest (4.6-14) ... OK (CRAN archived)
Fetching sources for ranger (0.13.1) ... OK (CRAN current)
Fetching sources for rappdirs (0.3.3) ... OK (CRAN current)
Fetching sources for readr (2.1.2) ... OK (CRAN current)
Fetching sources for readxl (1.3.1) ... OK (CRAN current)
Fetching sources for rematch (1.0.1) ... OK (CRAN current)
Fetching sources for reshape (0.8.8) ... OK (CRAN current)
Fetching sources for reticulate (1.24) ... OK (CRAN current)
Fetching sources for rlang (1.0.2) ... OK (CRAN current)
Fetching sources for rmarkdown (2.13) ... OK (CRAN current)
Fetching sources for rpart (4.1-15) ... OK (CRAN archived)
Fetching sources for rprojroot (2.0.2) ... OK (CRAN current)
Fetching sources for rstudioapi (0.13) ... OK (CRAN current)
Fetching sources for rvest (1.0.2) ... OK (CRAN current)
Fetching sources for sandwich (3.0-1) ... OK (CRAN current)
Fetching sources for sass (0.4.0) ... OK (CRAN current)
Fetching sources for scales (1.1.1) ... OK (CRAN current)
Fetching sources for selectr (0.4-2) ... OK (CRAN current)
Fetching sources for sensitivity (1.27.0) ... OK (CRAN current)
Fetching sources for sfsmisc (1.1-12) ... OK (CRAN current)
Fetching sources for shape (1.4.6) ... OK (CRAN current)
Fetching sources for shiny (1.7.1) ... OK (CRAN current)
Fetching sources for shinyjqui (0.4.1) ... OK (CRAN current)
Fetching sources for smoof (1.6.0.2) ... OK (CRAN current)
Fetching sources for sourcetools (0.1.7) ... OK (CRAN current)
Fetching sources for stringi (1.7.6) ... OK (CRAN current)
Fetching sources for stringr (1.4.0) ... OK (CRAN current)
Fetching sources for survival (3.1-8) ... OK (CRAN archived)
Fetching sources for svglite (2.1.0) ... OK (CRAN current)
Fetching sources for sys (3.4) ... OK (CRAN current)
Fetching sources for systemfonts (1.0.4) ... OK (CRAN current)
Fetching sources for tensorflow (2.8.0) ... OK (CRAN current)
Fetching sources for tfautograph (0.3.2) ... OK (CRAN current)
Fetching sources for tfruns (1.5.0) ... OK (CRAN current)
Fetching sources for tgp (2.4-17) ... OK (CRAN current)
Fetching sources for tibble (3.1.6) ... OK (CRAN current)
Fetching sources for tidyr (1.2.0) ... OK (CRAN current)
Fetching sources for tidyselect (1.1.2) ... OK (CRAN current)
Fetching sources for timeDate (3043.102) ... OK (CRAN current)
Fetching sources for tinytex (0.37) ... OK (CRAN current)
Fetching sources for tseries (0.10-49) ... OK (CRAN current)
Fetching sources for tweenr (1.0.2) ... OK (CRAN current)
Fetching sources for tzdb (0.2.0) ... OK (CRAN current)
Fetching sources for urca (1.3-0) ... OK (CRAN current)
Fetching sources for utf8 (1.2.2) ... OK (CRAN current)
Fetching sources for uuid (1.0-3) ... OK (CRAN current)
Fetching sources for vctrs (0.3.8) ... OK (CRAN current)
Fetching sources for viridis (0.6.2) ... OK (CRAN current)
Fetching sources for viridisLite (0.4.0) ... OK (CRAN current)
Fetching sources for vroom (1.5.7) ... OK (CRAN current)
Fetching sources for webshot (0.5.2) ... OK (CRAN current)
Fetching sources for whisker (0.4) ... OK (CRAN current)
Fetching sources for withr (2.5.0) ... OK (CRAN current)
Fetching sources for xfun (0.30) ... OK (CRAN current)
Fetching sources for xgboost (1.5.2.1) ... OK (CRAN current)
Fetching sources for xml2 (1.3.3) ... OK (CRAN current)
Fetching sources for xtable (1.8-4) ... OK (CRAN current)
Fetching sources for xts (0.12.1) ... OK (CRAN current)
Fetching sources for yaml (2.3.5) ... OK (CRAN current)
Fetching sources for zeallot (0.1.0) ... OK (CRAN current)
Fetching sources for zip (2.2.0) ... OK (CRAN current)
Fetching sources for zoo (1.8-9) ... OK (CRAN current)

And after compiling many many packages successfully 35 mins down the line this happens seemingly in order of dependency this happens:

The command failed with output:
* installing *source* package 'foreach' ...
** package 'foreach' successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** tests
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  there is no package called 'iterators'
Calls: <Anonymous> ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
Execution halted

iterators did not precede compilation of foreach and I can't figure out why.. can anyone reproduce this?

This is the basic code I am using to trigger this error:

library(shiny)
library(plotly)
library(randomForest)
library(xgboost)
library(e1071)
library(ICEbox)
library(pdp)
library(Boruta)
library(corrplot)
library(cluster)
library(MASS)
library(RColorBrewer)
library(readxl)
library(openxlsx)
library(onehot)
library(Rtsne)
library(dplyr)
library(grf)
library(jsonlite)
library(glmnet)
library(nnet)
library(DT)
library(XML)
library(methods)
library(EnvStats)
library(DALEX)
library(tgp)
library(GGally)
library(gtools)
library(pso)
library(AzureAuth)
library(AzureStor)
library(httr)
library(readr)
library(curl)
library(ggrepel)
library(shinyjqui)
library(ggdendro)
library(stringr)
library(rpart)
library(anytime)
library(memoise)
library(forecast)
library(hexbin)
library(Rfast)
library(fastshap)
library(pROC)
library(arrow)
library(data.table)
library(viridis)
library(tensorflow)
library(keras)
library(alluvial)
library(ggforce)
library(sensitivity)
library(mlrMBO)
library(emoa)
library(kableExtra)
library(mice)
aronatkins commented 1 year ago

I am unable to recreate this situation.

  1. Created a new RStudio R project.
  2. Add the list of libraries into a load.R file.
  3. From the R session, call packrat::init().

Unfortunately, without knowing the versions of each package, it will be challenging to reproduce -- my testing used the current CRAN package versions.

Please reopen this issue if you are able to create a reproducible example.

Additionally, we recommend that folks use renv rather than packrat for new projects. https://rstudio.github.io/renv/