pkgdepends icon indicating copy to clipboard operation
pkgdepends copied to clipboard

repeated versions in solution failure print

Open pawelru opened this issue 2 years ago • 1 comments

minimal reprex:

x <- pkgdepends::new_pkg_installation_proposal(c("cran/[email protected]", "cran/[email protected]", "cran/[email protected]", "cran/[email protected]", "cran/[email protected]"), config = list(library = tempfile()))
x
x$solve()
x$get_solution()

outcome:

r$> x$get_solution()
<pkg_solution>
+ result: FAILED
(...)
x failures:
* cran/[email protected]: Can't install dependency rlang (>= 0.4.0)
* rlang: Conflicts with cran/[email protected]
* cran/[email protected]:
  * Can't install dependency purrr
  * Can't install dependency tibble
* purrr:
  * Can't install dependency cli (>= 3.4.0) (>= 1.0.3) (>= 1.5.0) (>= 0.4.10)
  * Can't install dependency lifecycle (>= 1.0.3) (>= 1.5.0) (>= 0.4.10)
  * Can't install dependency magrittr (>= 1.5.0) (>= 0.4.10)
  * Can't install dependency rlang (>= 0.4.10)
* cli: Conflicts with cran/[email protected]
* lifecycle: Conflicts with cran/[email protected]
* magrittr: Conflicts with cran/[email protected]
* tibble:
  * Can't install dependency lifecycle (>= 1.0.0) (>= 1.0.2)
  * Can't install dependency rlang (>= 1.0.2)

Please have a look at the report for purr. For the very first child rows it lists all the versions (i.e. cli (>= 3.4.0) (>= 1.0.3) (>= 1.5.0) (>= 0.4.10) whereas it should be cli (>= 3.4.0) only.

pawelru avatar Jan 25 '23 16:01 pawelru

For the record, that happens because different packages have different version requirements. We could "collapse" them into a single one, it is not entirely straightforward, though.

gaborcsardi avatar Nov 01 '23 10:11 gaborcsardi