Skip to content

Commit

Permalink
Bump Move version (MystenLabs#1235)
Browse files Browse the repository at this point in the history
* Bump Move version

- Brings in adapter changes and fileformat V5 (WIP)
- Various Move packages  now use clap instead of structopt
  • Loading branch information
Todd Nowacki authored Apr 6, 2022
1 parent 2e10bbc commit ddd825e
Show file tree
Hide file tree
Showing 23 changed files with 148 additions and 201 deletions.
13 changes: 7 additions & 6 deletions sui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ serde-value = "0.7.0"
serde-name = "0.2.0"
log = "0.4.14"
dirs = "4.0.0"
clap = { version = "3", features = ["derive"] }
telemetry_subscribers = { git = "https://github.com/MystenLabs/mysten-infra", rev = "a45af6dc28aa12c8cc13521d118c24aadd4c6adf" }

bcs = "0.1.3"
Expand All @@ -53,12 +54,12 @@ http = "0.2.6"
hyper = "0.14.17"
schemars = "0.8.8"

move-package = { git = "https://github.com/diem/move", rev = "2ef516919d5bbc728a57a2c0073b85c46d9fcf5a" }
move-core-types = { git = "https://github.com/diem/move", rev = "2ef516919d5bbc728a57a2c0073b85c46d9fcf5a", features = ["address20"] }
move-bytecode-verifier = { git = "https://github.com/diem/move", rev = "2ef516919d5bbc728a57a2c0073b85c46d9fcf5a" }
move-binary-format = { git = "https://github.com/diem/move", rev = "2ef516919d5bbc728a57a2c0073b85c46d9fcf5a" }
move-bytecode-utils = { git = "https://github.com/diem/move", rev = "2ef516919d5bbc728a57a2c0073b85c46d9fcf5a" }
move-unit-test = { git = "https://github.com/diem/move", rev = "2ef516919d5bbc728a57a2c0073b85c46d9fcf5a" }
move-package = { git = "https://github.com/diem/move", rev = "63bd52e0f5b02711d29a678e6f946b3d429f2090" }
move-core-types = { git = "https://github.com/diem/move", rev = "63bd52e0f5b02711d29a678e6f946b3d429f2090", features = ["address20"] }
move-bytecode-verifier = { git = "https://github.com/diem/move", rev = "63bd52e0f5b02711d29a678e6f946b3d429f2090" }
move-binary-format = { git = "https://github.com/diem/move", rev = "63bd52e0f5b02711d29a678e6f946b3d429f2090" }
move-bytecode-utils = { git = "https://github.com/diem/move", rev = "63bd52e0f5b02711d29a678e6f946b3d429f2090" }
move-unit-test = { git = "https://github.com/diem/move", rev = "63bd52e0f5b02711d29a678e6f946b3d429f2090" }

once_cell = "1.9.0"
reqwest = { version = "0.11.10", features=["json","serde_json", "blocking"]}
Expand Down
26 changes: 12 additions & 14 deletions sui/src/sui-move.rs
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
// Copyright (c) 2022, Mysten Labs, Inc.
// SPDX-License-Identifier: Apache-2.0

use clap::*;
use colored::Colorize;
use move_unit_test::UnitTestingConfig;
use std::path::Path;
use structopt::clap::App;
use structopt::StructOpt;

#[derive(StructOpt)]
#[structopt(rename_all = "kebab-case")]
#[derive(Parser)]
#[clap(rename_all = "kebab-case")]
pub enum MoveCommands {
/// Build and verify Move project
#[structopt(name = "build")]
#[clap(name = "build")]
Build {
/// Whether we are printing in hex.
#[structopt(long)]
#[clap(long)]
dump_bytecode_as_hex: bool,
},

/// Run all Move unit tests
#[structopt(name = "test")]
#[clap(name = "test")]
Test(UnitTestingConfig),
}

Expand Down Expand Up @@ -57,27 +56,26 @@ impl MoveCommands {
}
}

#[derive(StructOpt)]
#[structopt(
#[derive(Parser)]
#[clap(
name = "Sui Move Development Tool",
about = "Tool to build and test Move applications",
rename_all = "kebab-case"
)]
struct MoveOpt {
/// Path to the Move project root.
#[structopt(long, default_value = "./")]
#[clap(long, default_value = "./")]
path: String,
/// Whether we are building/testing the std/framework code.
#[structopt(long)]
#[clap(long)]
std: bool,
/// Subcommands.
#[structopt(subcommand)]
#[clap(subcommand)]
cmd: MoveCommands,
}

fn main() -> Result<(), anyhow::Error> {
let app: App = MoveOpt::clap();
let options = MoveOpt::from_clap(&app.get_matches());
let options = MoveOpt::parse();
let path = options.path;
options.cmd.execute(path.as_ref(), options.std)
}
3 changes: 0 additions & 3 deletions sui/src/unit_tests/data/custom_genesis_package_1/Move.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,3 @@ Sui = { local = "../../../../../sui_programmability/framework" }

[addresses]
Examples = "0x0"

[dev-addresses]
Examples = "0x0"
3 changes: 0 additions & 3 deletions sui/src/unit_tests/data/dummy_modules_publish/Move.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,3 @@ Sui = { local = "../../../../../sui_programmability/framework" }

[addresses]
Examples = "0x0"

[dev-addresses]
Examples = "0x0"
17 changes: 9 additions & 8 deletions sui_core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,17 @@ sui-framework = { path = "../sui_programmability/framework" }
sui-network = { path = "../network_utils" }
sui-types = { path = "../sui_types" }

move-binary-format = { git = "https://github.com/diem/move", rev = "2ef516919d5bbc728a57a2c0073b85c46d9fcf5a" }
move-bytecode-utils = { git = "https://github.com/diem/move", rev = "2ef516919d5bbc728a57a2c0073b85c46d9fcf5a" }
move-core-types = { git = "https://github.com/diem/move", rev = "2ef516919d5bbc728a57a2c0073b85c46d9fcf5a", features = ["address20"] }
move-package = { git = "https://github.com/diem/move", rev = "2ef516919d5bbc728a57a2c0073b85c46d9fcf5a" }
move-vm-runtime = { git = "https://github.com/diem/move", rev = "2ef516919d5bbc728a57a2c0073b85c46d9fcf5a" }
move-vm-types = { git = "https://github.com/diem/move", rev = "2ef516919d5bbc728a57a2c0073b85c46d9fcf5a" }
move-binary-format = { git = "https://github.com/diem/move", rev = "63bd52e0f5b02711d29a678e6f946b3d429f2090" }
move-bytecode-utils = { git = "https://github.com/diem/move", rev = "63bd52e0f5b02711d29a678e6f946b3d429f2090" }
move-core-types = { git = "https://github.com/diem/move", rev = "63bd52e0f5b02711d29a678e6f946b3d429f2090", features = ["address20"] }
move-package = { git = "https://github.com/diem/move", rev = "63bd52e0f5b02711d29a678e6f946b3d429f2090" }
move-vm-runtime = { git = "https://github.com/diem/move", rev = "63bd52e0f5b02711d29a678e6f946b3d429f2090" }
move-vm-types = { git = "https://github.com/diem/move", rev = "63bd52e0f5b02711d29a678e6f946b3d429f2090" }

typed-store = { git = "https://github.com/MystenLabs/mysten-infra", rev = "e44bca4513a6ff6c97399cd79e82e4bc00571ac3"}

[dev-dependencies]
fdlimit = "0.2.1"
naughty-strings = "0.2.4"
similar-asserts = "1.2.0"
serde-reflection = "0.3.5"
serde_yaml = "0.8.23"
pretty_assertions = "1.2.0"
Expand All @@ -55,3 +53,6 @@ test_utils = { path = "../test_utils" }
name = "generate-format"
path = "src/generate_format.rs"
test = false

[package.metadata.cargo-udeps.ignore]
normal = ["structopt"]
3 changes: 0 additions & 3 deletions sui_core/src/unit_tests/data/hero/Move.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,3 @@ Sui = { local = "../../../../../sui_programmability/framework" }

[addresses]
Examples = "0x0"

[dev-addresses]
Examples = "0x0"
3 changes: 0 additions & 3 deletions sui_core/src/unit_tests/data/object_owner/Move.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,3 @@ Sui = { local = "../../../../../sui_programmability/framework" }

[addresses]
ObjectOwner = "0x0"

[dev-addresses]
ObjectOwner = "0x0"
3 changes: 0 additions & 3 deletions sui_core/src/unit_tests/data/object_wrapping/Move.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,3 @@ Sui = { local = "../../../../../sui_programmability/framework" }

[addresses]
ObjectWrapping = "0x0"

[dev-addresses]
ObjectWrapping = "0x0"
17 changes: 8 additions & 9 deletions sui_programmability/adapter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,19 @@ edition = "2021"
anyhow = "1.0.55"
bcs = "0.1.3"
once_cell = "1.9.0"
structopt = "0.3.26"
parking_lot = "0.12.0"

move-binary-format = { git = "https://github.com/diem/move", rev = "2ef516919d5bbc728a57a2c0073b85c46d9fcf5a" }
move-bytecode-utils = { git = "https://github.com/diem/move", rev = "2ef516919d5bbc728a57a2c0073b85c46d9fcf5a" }
move-bytecode-verifier = { git = "https://github.com/diem/move", rev = "2ef516919d5bbc728a57a2c0073b85c46d9fcf5a" }
move-core-types = { git = "https://github.com/diem/move", rev = "2ef516919d5bbc728a57a2c0073b85c46d9fcf5a", features = ["address20"] }
move-cli = { git = "https://github.com/diem/move", rev = "2ef516919d5bbc728a57a2c0073b85c46d9fcf5a" }
move-vm-runtime = { git = "https://github.com/diem/move", rev = "2ef516919d5bbc728a57a2c0073b85c46d9fcf5a" }
move-vm-types = { git = "https://github.com/diem/move", rev = "2ef516919d5bbc728a57a2c0073b85c46d9fcf5a" }
move-binary-format = { git = "https://github.com/diem/move", rev = "63bd52e0f5b02711d29a678e6f946b3d429f2090" }
move-bytecode-utils = { git = "https://github.com/diem/move", rev = "63bd52e0f5b02711d29a678e6f946b3d429f2090" }
move-bytecode-verifier = { git = "https://github.com/diem/move", rev = "63bd52e0f5b02711d29a678e6f946b3d429f2090" }
move-core-types = { git = "https://github.com/diem/move", rev = "63bd52e0f5b02711d29a678e6f946b3d429f2090", features = ["address20"] }
move-cli = { git = "https://github.com/diem/move", rev = "63bd52e0f5b02711d29a678e6f946b3d429f2090" }
move-vm-runtime = { git = "https://github.com/diem/move", rev = "63bd52e0f5b02711d29a678e6f946b3d429f2090" }
move-vm-types = { git = "https://github.com/diem/move", rev = "63bd52e0f5b02711d29a678e6f946b3d429f2090" }

sui-framework = { path = "../framework" }
sui-verifier = { path = "../verifier" }
sui-types = { path = "../../sui_types" }

[dev-dependencies]
move-package = { git = "https://github.com/diem/move", rev = "2ef516919d5bbc728a57a2c0073b85c46d9fcf5a" }
move-package = { git = "https://github.com/diem/move", rev = "63bd52e0f5b02711d29a678e6f946b3d429f2090" }
Loading

0 comments on commit ddd825e

Please sign in to comment.