Solver fails with Config/Needs/... indirect dependency configuration
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Reproduce the failure with the supplied deps_3 example, starting at new_pkg_installation_proposal(), solve(), and get_solution(). Trace how the solver handles the indirect config/needs/bar dependency and the value that triggers the coercion error; done means the example completes without the error and returns a valid solution.
Written by the indexing model from the issue text.
Description
library(pkgdepends)
deps_1 <- c("config/needs/foo", pkg_dep_types_hard())
deps_2 <- list(
direct = c("config/needs/foo", pkg_dep_types_hard()),
indirect = pkg_dep_types()
)
deps_3 <- list(
direct = c("config/needs/foo", pkg_dep_types_hard()),
indirect = c("config/needs/bar", pkg_dep_types()) # <- here!
)
foo <- function(deps) {
ip <- new_pkg_installation_proposal("r-lib/rlang", config = list(dependencies = deps))
ip$solve()
ip$get_solution()
}
foo(deps_1) # OK
#> ℹ Loading metadata database
#> ✔ Loading metadata database ... done
#>
#> <pkg_solution>
#> + result: OK
#> + refs:
#> - r-lib/rlang
#> + constraints (2):
#> - select rlang exactly once
#> - `r-lib/rlang` is not satisfied by `installed::/Users/ruckip/Library/R/arm64/4.3/library/rlang`
#> + solution:
#> - r-lib/rlang
foo(deps_2) # OK
#> <pkg_solution>
#> + result: OK
#> + refs:
#> - r-lib/rlang
#> + constraints (27915):
#> - `rnaturalearthhires` resolution failed
#> - `starsdata` resolution failed
#> - `cmdstanr` resolution failed
#> - `glmmADMB` resolution failed
#> - `ffbase` resolution failed
#> - `spDataLarge` resolution failed
#> - `mnlogit` resolution failed
#> - `Zelig` resolution failed
#> - `ergm.userterms` resolution failed
#> - `corpus.useR.2008.abstracts` resolution failed
#> ...
#> + solution:
#> - r-lib/rlang
foo(deps_3) # FAIL
#> Error in value$ref %in% private$state$ref && !value$direct: 'length = 18' in coercion to 'logical(1)'
Created on 2024-01-04 with reprex v2.0.2
- 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from r-lib/pkgdepends
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
r-lib/pkgdepends#485 · 3 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
r-lib/pkgdepends#477 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
r-lib/pkgdepends#484 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
r-lib/pkgdepends#483 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
r-lib/pkgdepends#471 · 9 comments ·
All issues in r-lib/pkgdepends
Similar issues
-
[adam] AdamNet network read doesn't cap to MAX_ADAM_PACKET_LEN, overflows client receive buffers Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
FujiNetWIFI/fujinet-firmware#1649 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
HarbourMasters/Shipwright#7229 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
riscv-software-src/riscv-isa-sim#2435 · 1 comment ·
-
bug Self Built Image SNAPSHOT Supported Device target/ramips
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100