DUB - call to arms

Paul Backus snarwin at gmail.com
Wed Apr 17 23:29:39 UTC 2019


On 4/17/19 12:18 PM, H. S. Teoh wrote:
> On Wed, Apr 17, 2019 at 07:03:33PM +0300, drug via Digitalmars-d wrote:
>> To be more correct I mean version constraints.
> 
> Ah, I see what you mean.  So package xyz may have, say, 10 different
> versions, and each version could potentially have different dependencies
> (since dependencies can change over time).  So after narrowing down to
> the subset of xyz versions that satisfy the given version criteria, you
> still have to decide which of the remaining versions to use, since they
> may depend on other packages that are subject to other version
> constraints.  So you'll need some graph algorithms to resolve these
> constraints.
> 
> Interesting, I've never thought about this before.  I'll have to think
> about this some more.  Thanks!
> 
> 
> T

Dependency resolution is actually NP-complete in the general case:

https://research.swtch.com/version-sat

Of course, in practice, there are solutions that work well enough to be
usable; several are discussed in the linked article.


More information about the Digitalmars-d mailing list