DesiQuintans / librarian

Install, Update, Load Packages from CRAN, Bioconductor, and GitHub in One Step.
GNU General Public License v3.0
54 stars 1 forks source link

librarian v1.8.0 won't install GitHub packages unless update_all = TRUE #27

Closed DesiQuintans closed 3 years ago

DesiQuintans commented 3 years ago

System info

Librarian version : v1.8.0
R Version         : 4.1.0

What problem do you get?

librarian::stock() and librarian::shelf() will not install GitHub packages unless update_all = TRUE.

Notes for maintainer

Problem 1: It looks like stock() is passing the value of the package vector (TRUE) instead of the names (emptyRpackage). It's correctly accessed in the vector that's passed to the warning message, but not in the vector that's passed to the installer.

update_all = TRUE short-circuits this by passing the original package vector (a character vector) without modification, whereas update_all = FALSE checks if each package is installed and returns a named logical vector, which is what you're seeing.

Extra unit tests are needed after fixing this.

> librarian::stock(DesiQuintans/emptyRpackage, lib = tempdir(), quiet = TRUE)

##   These packages will be installed:
## 
##   'TRUE'
## 
##   It may take some time.
## Warning message:
## In librarian::stock(DesiQuintans/emptyRpackage, lib = tempdir(),  : 
##   These packages failed to install:
## 
##   'emptyRpackage'
## 
##   Check the spelling and capitalisation of the names.
## 
##   Are they Bioconductor packages? If so, please install Bioconductor
##   (BiocManager and BiocBase).
## 
##   Are they from GitHub? If so, please supply both the GitHub
##   username and package name, e.g. DesiQuintans/librarian
DesiQuintans commented 3 years ago

Fixed in v1.8.1, CRAN and GitHub.