pkgdepends icon indicating copy to clipboard operation
pkgdepends copied to clipboard

<simpleError: Cannot install packages: .... values must be length 1, but FUN(X[[1]]) result is length 0>

Open kapsner opened this issue 3 years ago • 0 comments

As initially reported here, solve() fails when the Remotes section of the package DESCRIPTION includes a url such as url::https://gitlab.miracum.org/miracum/misc/dizutils/-/archive/development/dizutils-development.zip.

A reproducible example:

repo_path <- file.path(tempdir(), "reproduce-issue")
git2r::clone(
  url = "https://github.com/miracum/dqa-dqastats",
  local_path = repo_path
)
#> cloning into '/tmp/RtmpFfEfQ8/reproduce-issue'...
#> Receiving objects:   1% (46/4578),   40 kb
#> Receiving objects:  11% (504/4578),  152 kb
#> Receiving objects:  21% (962/4578),  248 kb
#> Receiving objects:  31% (1420/4578),  304 kb
#> Receiving objects:  41% (1877/4578),  352 kb
#> Receiving objects:  51% (2335/4578),  448 kb
#> Receiving objects:  61% (2793/4578),  504 kb
#> Receiving objects:  71% (3251/4578),  576 kb
#> Receiving objects:  81% (3709/4578),  624 kb
#> Receiving objects:  91% (4166/4578),  671 kb
#> Receiving objects: 100% (4578/4578),  860 kb, done.
#> Local:    master /tmp/RtmpFfEfQ8/reproduce-issue
#> Remote:   master @ origin (https://github.com/miracum/dqa-dqastats)
#> Head:     [025d3b9] 2022-08-30: chore: news.md now with autonewsmd package
repo <- git2r::repository(repo_path)
git2r::checkout(repo, branch = "025d3b942c")

prop <- pkgdepends::new_pkg_installation_proposal(
  paste0("deps::", repo_path),
  config = list(library = .libPaths()[1], dependencies = TRUE)
)
prop$solve()
prop$stop_for_solution_error()
#> Error: Cannot install packages:
#> * deps::/tmp/RtmpFfEfQ8/reproduce-issue: values must be length 1,
#>  but FUN(X[[1]]) result is length 0

kapsner avatar Sep 06 '22 10:09 kapsner