Commits

Daniel Dunbar committed fb6975effa0
[DependencyResolver] Add initial cut at primary resolution loop. This is the beginnings of a bottom-up constraint solver, but backtracking is unimplemented. I plan to document the motivations for taking this resolution strategy in more detail, but for now the jist is below. The assumption based on the problem domain is that the most logical notion to the user is that of resolving the dependencies for an individual package in isolation, simply because each dependency is presumably developed by someone, and that is the situation that that developer is in. Given that assumption, it is useful to frame the dependency resolver in terms of solving individual packages with some amount of additional constraints imposed (those additional constraints represent the impact of other dependencies in the graph on that individual package). I believe this will allow us to give good diagnostics of the form: Dependency A: 1.0.0 ..< 2.0.0 could not be resolved with the following additional constraints: B_0: ... ... B_N: ... and then we can provide tools so that the author of `A` can trial the resolution of their package with those additional constraints active. This is designed to allow the *author* of the dependency which is causing dependency resolution issues to be in a good position to resolve the dependency problem (without needing to necessarily examine the client package, which may not be accessible to them). It remains to be seen how efficiently we can implement this strategy, but my motivation is to build an algorithm which gives good diagnostics first, and focus on performance second.