PredictiveEcology / Require

Simple R package to install and load packages conducive to a reproducible workflow
https://require.predictiveecology.org/
19 stars 5 forks source link

Installation failures with `SpaDES.experiment` and `NLMR` #98

Closed CeresBarros closed 1 year ago

CeresBarros commented 1 year ago

I'm working from an empty library and noticed strange installation failures that seemed to be linked with trying to install SpaDES.experiment@development and NLMR at the same time. Could it be related to the fact that NLMR is in Suggests of SpaDES.tools and in Imports of SpaDES.experiment (that commit) with a different Remote?

And if so, I wonder why this fails, given that 1) SpaDES.experiment depends on both NLMR and SpaDES.tools and therefore should be installed last 2) the install of NLMR and SpaDES.tools alone works fine (see bellow) and so it's dependencies should be resolved prior to it's

Notably, this fails:

remotes::install_github("PredictiveEcology/Require@development", upgrade = FALSE)

remove.packages(c("SpaDES.tools", "SpaDES.experiment", "NLMR"))
Require::clearRequirePackageCache(ask = FALSE)
Require::Require(c(
                   "PredictiveEcology/SpaDES.experiment@a681fb525c6f38616ff02311c7ba16cdae34c418",
                   "ropensci/NLMR",
                   "SpaDES.tools"
                   ), 
                 require = FALSE,   ## don't load packages
                 upgrade = FALSE,   ## don't upgrade dependencies
                 standAlone = TRUE, purge = TRUE) ## install all dependencies in proj-lib (ignore user/system lib)

but these work:

remove.packages(c("SpaDES.tools", "SpaDES.experiment", "NLMR"))
Require::clearRequirePackageCache(ask = FALSE)
Require::Require(c("ropensci/NLMR",
                   "SpaDES.tools"
                   ), 
                 require = FALSE,   ## don't load packages
                 upgrade = FALSE,   ## don't upgrade dependencies
                 standAlone = TRUE, purge = TRUE)

remove.packages(c("SpaDES.tools", "SpaDES.experiment", "NLMR"))
Require::clearRequirePackageCache(ask = FALSE)
Require::Require(c(
                   "ropensci/NLMR",
                   "PredictiveEcology/SpaDES.experiment@a681fb525c6f38616ff02311c7ba16cdae34c418",
                   ), 
                 require = FALSE,   ## don't load packages
                 upgrade = FALSE,   ## don't upgrade dependencies
                 standAlone = TRUE, purge = TRUE) ## install all dependencies in proj-lib (ignore user/system lib)
CeresBarros commented 1 year ago

Changing the remote source of NLMR on SpaDES.experiment solved the problem. See https://github.com/PredictiveEcology/SpaDES.experiment/pull/15