This repository has been archived by the owner on May 4, 2024. It is now read-only.
sui-move: [13/x][move-package/lock] Externally resolved dependencies #860
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds support for dependencies that are resolved by calling out to third-party binaries. The invocation is expected to return the transitive dependency sub-graph as a lock file, which is deserialized and merged into the main graph.
Externally resolved dependencies can appear in manifests but not lock files, and it is an error for a package to appear in the outputs of multiple resolvers (including the internal resolver). To differentiate this case from the previous case where the internal resolver encounters the same package via another path, packages in the
DependencyGraph
track their resolver via an optional field (None
for internally resolved packages).Another consequence of this change is that the check that a dependency's name matches its package name moves from the creation of
DependencyGraph
to the creation ofResolvedGraph
, to pick up cases where the name mismatch occurs in an externally resolved dependency.Clean-ups
rev
field is supplied for a local dependency and other similar cases.Test Plan
New tests, including unit tests for the merging operation, and snapshot tests for external resolution lock file and resolved graph output:
Stack
See also: #789 for main.