move
move copied to clipboard
[7/x][move-package/lock] Move addr_subst and digest to dependency edge
The initial design of DependencyGraph only allowed for one addr_subst and digest per package in the transitive dependency graph, but in actuality there can be as many of these as there are dependency edges to that package:
- Different
addr_substfor different packagesP,Qdepending onRallows the same address inRto appear as different addresses inPandQ. - If
Ris a dependency ofPand a dev-dependency ofQ, then its source digest may differ between the two.
Fixed by moving the subst and digest to be edge labels in the graph, rather than node labels.
Note that this also changes the lock file format in the following ways:
- A package's dependencies are now no longer just the name of the dependency, but an inline table containing the name and optionally the digest and address substitution.
- The key within the
movetable that contains all the transitive dependencies is now calledpackagerather thandependency(this was mainly driven by the naming within the schema, which required a name for the new, richer format for a package's dependencies.)
Test Plan
move/language/tools/move-cli$ cargo nextest
move/language/tools/move-package$ cargo nextest
Stack
- #741
- #745
- #753
- #754
- #759
- #760