rstudio / packrat

Packrat is a dependency management system for R
http://rstudio.github.io/packrat/
401 stars 89 forks source link

SAT solver resolution for dependency management #585

Closed stefanoborini closed 4 years ago

stefanoborini commented 4 years ago

What is the algorithm packrat uses to resolve the dependency network? Is there a SAT solver implementation for packrat to ensure constraints have been solved appropriately or is it a naive approach?

kevinushey commented 4 years ago

Packrat doesn't include a dependency solver, because it doesn't solve dependencies -- it simply records the library state at some point in time, and assumes that the library state is already consistent. Hence, all it needs to do is record packages, their versions, and their sources and know how to retrieve and install packages from those sources.

In other words, the "dependency solver" problem is pushed upstream, to the package used by the user to install packages in the first place. That said, in general packages in the R ecosystem generally attempt to work with the latest versions of their dependencies; it's less common to see version pinning.

There are other packages (e.g. pak) that do implement proper dependency resolvers.

stefanoborini commented 4 years ago

Thank you for your reply!