Closed m7pr closed 1 year ago
I am not sure this is the case. It seems that it is unable to install the newer dependencies: vctrs (0.6.2 -> 0.6.3 ) [CRAN]
is not updated:
package ‘vctrs’ successfully unpacked and MD5 sums checked
Warning: cannot remove prior installation of package ‘vctrs’
Warning: restored ‘vctrs’
Hence the problem is not that it reinstalls everything all the time, but more that it is not able to update them on your local machine for some reasons. We need to investigate if this is happening for others (on my ubuntu installation this does not happen)
@Melkiades still, it shouldn't try do that for every package IMHO. It might not happen on your machine, as you may have the newest versions of those packages : )
@Melkiades still, it shouldn't try do that for every package IMHO. It might not happen on your machine, as you may have the newest versions of those packages : )
I think this boils down to stopping installing dependencies in the install.packages call here in git_tools.R
:
utils::install.packages(repo_dir, repos = NULL, type = "source")
It seems too from the comments here that turning the installation of deps off is not something convenient and is not the default R
behavior. I know you suggested trying only once and then stopping it from retrying but it seems really not a problem related to staged.dependencies
, but more something that can be solved with renv
and so on. I think until someone else has this problem we can close this
I lived in a world where I assumed you can set upgrade = "never"
in install.packages, but it looks like it's a devtools::install
argument, nor install.packages
.
I am not saying we should defer from regular install.packages()
behavior. What I am saying here that this install.packages()
gets called multiple times (for every dependent package), instead of once. If it would be called once, then also the upgrade attempt would be called once.
For the upgrade
install_deps has upgrade
parameter as it uses remotes::install_deps()
for the installation. Can you open back the issue? I think there is a misunderstanding between what I planned to report and what you investigated
We can use devtools for installing, that is true. Maybe @pawelru can drive us towards a common solution ^^
Btw I think it is kinda of slow atm, so less deps installations the faster. Still I would add it as an option
Your comment was missleading and made me think we use install.packages()
for the installation. However I checked that we use remotes::install_deps()
in staged.dependencies::install_deps()
.
The primary issue that I was trying to describe is that all dependencies are installed in this loop https://github.com/openpharma/staged.dependencies/blob/fb124997306b35d44a0225bb4b400bf7258c4c75/R/dependencies_helper.R#L63
in run_package_actions
where we could combine packages into one vector if the only considered action is the install
ation so that they get installed with one call.
Anyway it's not a big issue, as it only appears when upgrade = "always"
and there is an issue with user session, where some packages are loaded and it looks like they can not be updated. I think we can close this one. As we aligned on what was the initial cause.
I just run
while being in
teal
repository. It looks like dependencies are getting installed for each package separately causing the installation process to install the same packages multiple times. This extends the time of overall installation.Maybe there is a way to change the code so that digest/Rcpp gets installed once, and not multiple times like below, e.g. during teal.slice , teal.data, scda.2022, teal.widgets, teal.transform installations.
I haven't checked the code but it looks like we are running
lapply(packages, install_)
instead ofinstall_(packages)