uv
44c9ef6a - uv-resolver: add new ResolverEnvironment type

Commit
1 year ago
uv-resolver: add new ResolverEnvironment type This type is intended to replace `ResolverMarkers`. The main difference between them is that this type encapsulates more decision making by un-exporting the different cases. So instead of callers needing to do explicit case analysis depending on the type of resolver environment, callers instead use methods that know how to do the right thing. In the next commit, there are at least a few cases where this greatly simplifies case analysis on the caller side. The motivation for this type is to centralize decision making about forking. In particular, we want to expand forking to include conflicting groups instead of just `MarkerTree`. So to a certain extent, the refactor here is about removing bare use of `MarkerTree` in favor of a more purpose built type that encapsulates the forking logic. The encapsulation is not quite perfect here. I expect to improve on it a bit once we add support for conflicting groups. This is split off from the subsequent commit (that makes use of `ResolverEnvironment`) so that it's a bit easier to review the addition in isolation.
Author
Committer
Parents
Loading