Closed dmurdoch closed 1 year ago
Yes, that's intentional, to get the same results independently of what is in your library.
installed::...
should in theory work for this, but it does not, which is a bug, probably.
local::...
works, though, kind of accidentally, if you give the path where the package is installed:
❯ pak::pkg_deps_explain("installed::/Users/gaborcsardi/Library/R/arm64/4.2/library/tibble", "rlang")
Error:
! error in pak subprocess
Caused by error:
! Could not solve package dependencies:
...
❯ pak::pkg_deps_explain("local::/Users/gaborcsardi/Library/R/arm64/4.2/library/tibble", "rlang")
tibble -> lifecycle -> rlang
tibble -> pillar -> lifecycle -> rlang
tibble -> pillar -> rlang
tibble -> pillar -> vctrs -> lifecycle -> rlang
tibble -> pillar -> vctrs -> rlang
tibble -> rlang
tibble -> vctrs -> lifecycle -> rlang
tibble -> vctrs -> rlang
Thanks. The justification probably makes sense, but you might want to expand the error message a little bit for newbies like me, e.g. "mypkg: Can't find package called mypkg in the standard repositories. Use local::mypkg for a local directory."
This may be intentional, but I don't see a reason for it.
I have a local package which is not on CRAN. Let's call it
mypkg
. It is installed in the current R version, and it does depend onxts
, butfails with the error
Why not use
packageDescription("mypkg")
to retrieve the dependencies?