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

Open
#284 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
git, r

Research direction

Start with the reproducible example using pkgdepends::new_pkg_installation_proposal() and inspect how the Remotes entry with a url:: GitLab archive is processed. Reproduce the failure against the referenced dqa-dqastats checkout; done means solve() handles that URL without the length-1 error.

Written by the indexing model from the issue text.

Description

bug

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
Dominant language
C
Stars
135
Forks
47
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from r-lib/pkgdepends

All issues in r-lib/pkgdepends

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.