move icon indicating copy to clipboard operation
move copied to clipboard

[7/x][move-package/lock] Move addr_subst and digest to dependency edge

Open amnn opened this issue 3 years ago • 0 comments

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_subst for different packages P, Q depending on R allows the same address in R to appear as different addresses in P and Q.
  • If R is a dependency of P and a dev-dependency of Q, 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 move table that contains all the transitive dependencies is now called package rather than dependency (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

amnn avatar Dec 22 '22 14:12 amnn