Skip to content

Commit

Permalink
[Ecosystem] add a move-crate to aggregate all move crates
Browse files Browse the repository at this point in the history
  • Loading branch information
areshand authored and aptos-bot committed May 7, 2022
1 parent 1372f1c commit a2fdec8
Show file tree
Hide file tree
Showing 72 changed files with 410 additions and 338 deletions.
103 changes: 44 additions & 59 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ members = [
"aptos-move/framework",
"aptos-move/framework/cached-packages",
"aptos-move/genesis-viewer",
"aptos-move/move-deps",
"aptos-move/move-examples",
"aptos-move/mvhashmap",
"aptos-move/parallel-executor",
Expand Down
4 changes: 1 addition & 3 deletions aptos-move/af-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ clap = "3.1.8"
aptos-vm = { path = "../aptos-vm" }
aptos-workspace-hack = { path = "../../crates/aptos-workspace-hack" }
cached-framework-packages = { path = "../framework/cached-packages" }
move-core-types = { git = "https://github.com/move-language/move", rev = "f2e7585b1ed5bd2810163d6bdebafe5a388881d3", features=["address32"] }
move-vm-types = { git = "https://github.com/move-language/move", rev = "f2e7585b1ed5bd2810163d6bdebafe5a388881d3" }
move-cli = { git = "https://github.com/move-language/move", rev = "f2e7585b1ed5bd2810163d6bdebafe5a388881d3" }
move-deps = { path = "../move-deps", features=["address32"] }

[dev-dependencies]
datatest-stable = "0.1.1"
Expand Down
10 changes: 6 additions & 4 deletions aptos-move/af-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@

use anyhow::Result;
use clap::StructOpt;
use move_cli::{Command, Move};
use move_core_types::errmap::ErrorMapping;
use move_vm_types::gas_schedule::INITIAL_COST_SCHEDULE;
use move_deps::{
move_cli::{Command, Move},
move_core_types::errmap::ErrorMapping,
move_vm_types::gas_schedule::INITIAL_COST_SCHEDULE,
};

#[derive(StructOpt)]
pub struct AfCli {
Expand All @@ -27,7 +29,7 @@ fn main() -> Result<()> {
let error_descriptions: ErrorMapping = bcs::from_bytes(cached_framework_packages::error_map())?;
let args = AfCli::parse();
match &args.cmd {
AfCommands::Command(cmd) => move_cli::run_cli(
AfCommands::Command(cmd) => move_deps::move_cli::run_cli(
aptos_vm::natives::aptos_natives(),
&INITIAL_COST_SCHEDULE,
&error_descriptions,
Expand Down
2 changes: 1 addition & 1 deletion aptos-move/af-cli/tests/cli_testsuite.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Aptos
// SPDX-License-Identifier: Apache-2.0

use move_cli::sandbox::commands::test;
use move_deps::move_cli::sandbox::commands::test;

use std::path::{Path, PathBuf};

Expand Down
4 changes: 1 addition & 3 deletions aptos-move/aptos-resource-viewer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ edition = "2018"
[dependencies]
aptos-vm = { path = "../../aptos-move/aptos-vm" }
aptos-workspace-hack = { path = "../../crates/aptos-workspace-hack" }
move-resource-viewer = { git = "https://github.com/move-language/move", rev = "f2e7585b1ed5bd2810163d6bdebafe5a388881d3" }
aptos-types = { path = "../../types" }
move-core-types = { git = "https://github.com/move-language/move", rev = "f2e7585b1ed5bd2810163d6bdebafe5a388881d3", features=["address32"] }
move-binary-format = { git = "https://github.com/move-language/move", rev = "f2e7585b1ed5bd2810163d6bdebafe5a388881d3" }
move-deps = { path = "../move-deps", features=["address32"] }

anyhow = "1.0.52"
7 changes: 4 additions & 3 deletions aptos-move/aptos-resource-viewer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ use aptos_types::{
contract_event::ContractEvent,
};
use aptos_vm::move_vm_ext::MoveResolverExt;
use move_core_types::language_storage::StructTag;
use move_resource_viewer::MoveValueAnnotator;
use move_deps::{
move_core_types::language_storage::StructTag, move_resource_viewer::MoveValueAnnotator,
};
use std::{
collections::BTreeMap,
fmt::{Display, Formatter},
};

pub use move_resource_viewer::{AnnotatedMoveStruct, AnnotatedMoveValue};
pub use move_deps::move_resource_viewer::{AnnotatedMoveStruct, AnnotatedMoveValue};

pub struct AptosValueAnnotator<'a, T>(MoveValueAnnotator<'a, T>);

Expand Down
2 changes: 1 addition & 1 deletion aptos-move/aptos-validator-interface/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ aptosdb = { path = "../../storage/aptosdb" }
aptos-workspace-hack = { path = "../../crates/aptos-workspace-hack" }
storage-interface = { path = "../../storage/storage-interface" }
aptos-state-view = { path = "../../storage/state-view" }
move-binary-format = { git = "https://github.com/move-language/move", rev = "f2e7585b1ed5bd2810163d6bdebafe5a388881d3" }
move-deps = { path = "../move-deps" }
2 changes: 1 addition & 1 deletion aptos-move/aptos-validator-interface/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use aptos_types::{
state_store::{state_key::StateKey, state_value::StateValue},
transaction::{Transaction, Version},
};
use move_binary_format::file_format::CompiledModule;
use move_deps::move_binary_format::file_format::CompiledModule;

// TODO(skedia) Clean up this interfact to remove account specific logic and move to state store
// key-value interface with fine grained storage project
Expand Down
15 changes: 3 additions & 12 deletions aptos-move/aptos-vm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,7 @@ rayon = "1.5.0"
tracing = "0.1.16"
num_cpus = "1.13.0"

move-binary-format = { git = "https://github.com/move-language/move", rev = "f2e7585b1ed5bd2810163d6bdebafe5a388881d3" }
move-bytecode-utils = { git = "https://github.com/move-language/move", rev = "f2e7585b1ed5bd2810163d6bdebafe5a388881d3" }
move-core-types = { git = "https://github.com/move-language/move", rev = "f2e7585b1ed5bd2810163d6bdebafe5a388881d3", features=["address32"] }
move-stdlib = { git = "https://github.com/move-language/move", rev = "f2e7585b1ed5bd2810163d6bdebafe5a388881d3" }
move-table-extension = { git = "https://github.com/move-language/move", rev = "f2e7585b1ed5bd2810163d6bdebafe5a388881d3" }
move-vm-runtime = { git = "https://github.com/move-language/move", rev = "f2e7585b1ed5bd2810163d6bdebafe5a388881d3" }
move-vm-types = { git = "https://github.com/move-language/move", rev = "f2e7585b1ed5bd2810163d6bdebafe5a388881d3" }
read-write-set-dynamic = { git = "https://github.com/move-language/move", rev = "f2e7585b1ed5bd2810163d6bdebafe5a388881d3"}

move-deps = { path = "../move-deps", features=["address32"] }
aptos-crypto = { path = "../../crates/aptos-crypto" }
aptos-crypto-derive = { path = "../../crates/aptos-crypto-derive" }
aptos-logger = { path = "../../crates/aptos-logger" }
Expand All @@ -41,7 +33,6 @@ mvhashmap = { path = "../mvhashmap" }
serde_json = "1.0.64"
serde = { version = "1.0.124", default-features = false }


[dev-dependencies]
proptest = "1.0.0"

Expand All @@ -50,5 +41,5 @@ aptos-types = { path = "../../types", features = ["fuzzing"] }
[features]
default = []
mirai-contracts = []
fuzzing = ["move-binary-format/fuzzing","move-vm-types/fuzzing"]
failpoints = ["fail/failpoints", "move-vm-runtime/failpoints"]
fuzzing = ["move-deps/fuzzing","move-deps/fuzzing"]
failpoints = ["fail/failpoints", "move-deps/failpoints"]
2 changes: 1 addition & 1 deletion aptos-move/aptos-vm/src/access_path_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0

use aptos_types::access_path::AccessPath;
use move_core_types::{
use move_deps::move_core_types::{
account_address::AccountAddress,
language_storage::{ModuleId, StructTag},
};
Expand Down
30 changes: 16 additions & 14 deletions aptos-move/aptos-vm/src/aptos_vm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,22 @@ use aptos_types::{
write_set::{WriteSet, WriteSetMut},
};
use fail::fail_point;
use move_binary_format::{
access::ModuleAccess,
errors::{verification_error, Location, VMResult},
CompiledModule, IndexKind,
};
use move_core_types::{
account_address::AccountAddress,
gas_schedule::{GasAlgebra, GasUnits},
language_storage::ModuleId,
transaction_argument::convert_txn_args,
value::{serialize_values, MoveValue},
use move_deps::{
move_binary_format::{
access::ModuleAccess,
errors::{verification_error, Location, VMResult},
CompiledModule, IndexKind,
},
move_core_types::{
account_address::AccountAddress,
gas_schedule::{GasAlgebra, GasUnits},
language_storage::ModuleId,
transaction_argument::convert_txn_args,
value::{serialize_values, MoveValue},
},
move_vm_runtime::session::LoadedFunctionInstantiation,
move_vm_types::{gas_schedule::GasStatus, loaded_data::runtime_types::Type},
};
use move_vm_runtime::session::LoadedFunctionInstantiation;
use move_vm_types::{gas_schedule::GasStatus, loaded_data::runtime_types::Type};
use num_cpus;
use once_cell::sync::OnceCell;
use std::{
Expand Down Expand Up @@ -112,7 +114,7 @@ impl AptosVM {
}

fn is_valid_for_constant_type(typ: &Type) -> bool {
use move_vm_types::loaded_data::runtime_types::Type::*;
use move_deps::move_vm_types::loaded_data::runtime_types::Type::*;
match typ {
Bool | U8 | U64 | U128 | Address => true,
Vector(inner) => AptosVM::is_valid_for_constant_type(&(*inner)),
Expand Down
Loading

0 comments on commit a2fdec8

Please sign in to comment.