forked from MystenLabs/sui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[client/publish] Add ability to publish --with-unpublished-dependenci…
…es (MystenLabs#7426) If a package depends on other packages that haven't been published yet, this flag offers a convenience to publish them as part of the same transaction (or to include them in the base64 dump when building). This is not ideal from the perspective of code re-use, but does help while wipes are more common. This also has implications for source validation, which needs to support validating packages that have other packages embedded in them: - Now, on-chain modules in the root package could be matched against multiple source packages, so they are fetched all in one go. - This also means there is no longer a 1:1 correspondence between numerical address and on-chain address, so the `LocalDependencyNotFound` error now identifies a package by its address. ## Test Plan New source-validation and move integration tests: ``` $ cargo simtest $ cargo nextest run ``` Co-authored-by: Brandon Williams <[email protected]>
- Loading branch information
Showing
17 changed files
with
404 additions
and
161 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
crates/sui-core/src/unit_tests/data/depends_on_basics/Move.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[package] | ||
name = "DependsOnBasics" | ||
version = "0.0.0" | ||
|
||
[dependencies] | ||
Examples = { local = "../object_basics" } | ||
Sui = { local = "../../../../../sui-framework" } | ||
|
||
[addresses] | ||
depends = "0x0" |
13 changes: 13 additions & 0 deletions
13
crates/sui-core/src/unit_tests/data/depends_on_basics/sources/depends_on_basics.move
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Copyright (c) Mysten Labs, Inc. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
/// Test depending on another unpublished package, which is published | ||
/// along with your own. | ||
module depends::depends_on_basics { | ||
use examples::object_basics; | ||
use sui::tx_context::{Self, TxContext}; | ||
|
||
public entry fun delegate(ctx: &mut TxContext) { | ||
object_basics::share(ctx); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.