pak previously supported a vector of packages in all of pkg_status(), pkg_deps(), pkg_deps_tree(), which was extremely useful for some private-package functions despite being (maybe?) unintentional due to a bug in a stopifnot() assertion (#333)
I've tested out the following with this branch and they return expected output for a vector of packages:
pkg_err <- c("nflreadr", "memose")
pkg_status(pkg_err)
#> # A data frame: 1 × 36
#> library package version title depends imports license needscompilation
#> * <chr> <chr> <chr> <chr> <chr> <chr> <chr> <lgl>
#> 1 C:/Users/Tan/A… nflrea… 1.3.2.… Down… R (>= … "cache… MIT + … FALSE
#> # ℹ 28 more variables: repository <chr>, built <chr>, remotetype <chr>, {...}
pkg_deps(pkg_err)
#> ℹ Loading metadata database✔ Loading metadata database ... done
#> Error: ! error in pak subprocess
#> Caused by error:
#> ! Could not solve package dependencies:
#> * nflreadr: dependency conflict
#> * memose: Can't find package called memose.
pkg_deps_tree(pkg_err)
#> Error: ! error in pak subprocess
#> Caused by error:
#> ! Could not solve package dependencies:
#> * nflreadr: dependency conflict
#> * memose: Can't find package called memose.
The latter two errors look fine to me, I think pkg_status() should probably check to make sure the packages requested are actually returned and maybe stop/warn if missing? This isn't a current feature even for one package as the arg:
R> pak::pkg_status("memose")
# A data frame: 0 × 36
# ℹ 36 variables: library <chr>, package <chr>, version <chr>, title <chr>, depends <chr>, imports <chr>, {...}
pak previously supported a vector of packages in all of
pkg_status()
,pkg_deps()
,pkg_deps_tree()
, which was extremely useful for some private-package functions despite being (maybe?) unintentional due to a bug in astopifnot()
assertion (#333)I've tested out the following with this branch and they return expected output for a vector of packages:
pkg_status seems to return the rows in question
pkg_deps also returns all dependencies
pkg_deps_tree returns two separate trees
I also briefly checked the errors thrown here.
The latter two errors look fine to me, I think pkg_status() should probably check to make sure the packages requested are actually returned and maybe stop/warn if missing? This isn't a current feature even for one package as the arg: