Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dependency: Convert to a discrete type
A major issue when dealing with the 'Dependency' type is that it evolved from a simple type, which stored a version range and perhaps one or two boolean, to one that stores 4 kinds of dependencies: version range (including exact version), branches, repository + hash, and path. Instead of using a discrete type (e.g. a tagged union), the type is a mix of style, and repository and branch are piggybacking on the field used for the version range. Switching to std.sumtype makes interaction between fields more obvious. Most importantly, it forces the programmer to answer the hard questions, such as how do we compare completely different dependency (version vs repository). Hopefully this will make the code easier to understand, and in the future, make it easier to add a new kind of dependency.
- Loading branch information