r-lib / pkgdepends

R Package Dependency Resolution
https://r-lib.github.io/pkgdepends/
Other
102 stars 30 forks source link

Dependency resolution fails with "dependency conflict" but doesn't clarify the exact nature of conflict #364

Closed IndrajeetPatil closed 6 months ago

IndrajeetPatil commented 6 months ago
Error: 
  ! error in pak subprocess
  Caused by error: 
  ! Could not solve package dependencies:
  * deps::.: dependency conflict
  * any::sessioninfo: dependency conflict
  * any::rcmdcheck: dependency conflict
  * any::Matrix: dependency conflict
  * any::lme4: dependency conflict
  * any::TMB: dependency conflict
  * any::BH: dependency conflict
  * any::RcppEigen: dependency conflict
  ---
  Backtrace:
  1. pak::lockfile_create(c(deps, extra_deps), lockfile = ".github/pkg.lock", …
  2. pak:::remote(function(...) { …
  3. err$throw(res$error)
  ---
  Subprocess backtrace:
  1. base::withCallingHandlers(cli_message = function(msg) { …
  2. get("lockfile_create_internal", asNamespace("pak"))(...)
  3. prop$stop_for_solution_error()
  4. private$plan$stop_for_solve_error()
  5. pkgdepends:::pkgplan_stop_for_solve_error(self, private)
  6. base::throw(new_error("Could not solve package dependencies:\n", msg, …
  7. | base::signalCondition(cond)
  8. global (function (e) …
  Execution halted
  Error: Process completed with exit code 1.
gaborcsardi commented 6 months ago

You have

performance -> quantreg -> MatrixModels -> Matrix

and MatrixModels needs Matrix >= 1.6.0, which is not available for R 4.2.x and below AFAICT.

IndrajeetPatil commented 6 months ago

Thanks. I had managed to figure this out, but I created an issue nonetheless because I was surprised that the error message didn't contain this information.

Usually, the error message does mention conflicts stemming from required R version. E.g. it can be seen in this run:

Caused by error: 
  ! Could not solve package dependencies:
  * deps::.: Can't install dependency quantreg
  * quantreg: Can't install dependency MatrixModels
  * MatrixModels: Can't install dependency Matrix (>= 1.6-0)
  * Matrix: Needs R >= 4.5
  * Matrix: Needs R >= 4.4.0
  * any::sessioninfo: dependency conflict
  * any::rcmdcheck: dependency conflict
  * any::BH: dependency conflict
  * any::RcppEigen: dependency conflict

So I wasn't sure why it failed in this context.

At any rate, feel free to close if you think it's an edge case not worth pursuing further.

gaborcsardi commented 6 months ago

This is already tracked here: https://github.com/r-lib/pkgdepends/issues/305

gaborcsardi commented 6 months ago

New containers will be build overnight.