Skip to content

Commit

Permalink
[AptosFramework] remove DPN dependency
Browse files Browse the repository at this point in the history
This commit removes all dependencies on diem-framework-releases, deletes unreleveant tests and ignores potential relevant tests.

Commented out test harness, will get back to it in followup commits.

Closes: aptos-labs#357
  • Loading branch information
zekun000 authored and aptos-bot committed Mar 31, 2022
1 parent 597b331 commit 7b92d8f
Show file tree
Hide file tree
Showing 246 changed files with 682 additions and 9,162 deletions.
52 changes: 25 additions & 27 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ resolver = "2"
members = [
"api",
"api/types",
"aptos-move/af-cli",
"aptos-move/aptos-keygen",
"aptos-move/aptos-resource-viewer",
"aptos-move/aptos-transaction-benchmarks",
"aptos-move/aptos-transactional-test-harness",
"aptos-move/aptos-validator-interface",
"aptos-move/aptos-vm",
"aptos-move/df-cli",
"aptos-move/e2e-tests",
"aptos-move/e2e-tests-replay",
"aptos-move/e2e-testsuite",
Expand Down Expand Up @@ -126,7 +126,7 @@ members = [
#
# For more, see the "Conditional compilation for tests" section in documentation/coding_guidelines.md.
default-members = [
"aptos-move/df-cli",
"aptos-move/af-cli",
"aptos-move/genesis-viewer",
"aptos-move/transaction-replay",
"aptos-node",
Expand Down
6 changes: 3 additions & 3 deletions aptos-move/df-cli/Cargo.toml → aptos-move/af-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "df-cli"
name = "af-cli"
version = "0.1.0"
authors = ["Aptos Labs <[email protected]>"]
description = "CLI frontend for the Move compiler and VM (with Diem Framework)"
Expand All @@ -19,13 +19,13 @@ move-core-types = { git = "https://github.com/diem/move", rev = "3fe033b112eae7d
move-vm-types = { git = "https://github.com/diem/move", rev = "3fe033b112eae7df2d15ab3467624165ae510caa" }
move-cli = { git = "https://github.com/diem/move", rev = "3fe033b112eae7df2d15ab3467624165ae510caa" }
aptos-vm = { path = "../aptos-vm" }
diem-framework-releases = { path = "../framework/DPN/releases" }
aptos-framework-releases = { path = "../framework/aptos-framework/releases" }

[dev-dependencies]
datatest-stable = "0.1.1"

[[bin]]
name = "df-cli"
name = "af-cli"
path = "src/main.rs"

[[test]]
Expand Down
File renamed without changes.
14 changes: 7 additions & 7 deletions aptos-move/df-cli/src/main.rs → aptos-move/af-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,27 @@ use move_core_types::errmap::ErrorMapping;
use move_vm_types::gas_schedule::INITIAL_COST_SCHEDULE;

#[derive(StructOpt)]
pub struct DfCli {
pub struct AfCli {
#[structopt(flatten)]
move_args: Move,

#[structopt(subcommand)]
cmd: DfCommands,
cmd: AfCommands,
}

#[derive(StructOpt)]
pub enum DfCommands {
pub enum AfCommands {
#[structopt(flatten)]
Command(Command),
// extra commands available only in df-cli can be added below
// extra commands available only in af-cli can be added below
}

fn main() -> Result<()> {
let error_descriptions: ErrorMapping =
bcs::from_bytes(diem_framework_releases::current_error_descriptions())?;
let args = DfCli::parse();
bcs::from_bytes(aptos_framework_releases::current_error_descriptions())?;
let args = AfCli::parse();
match &args.cmd {
DfCommands::Command(cmd) => move_cli::run_cli(
AfCommands::Command(cmd) => move_cli::run_cli(
aptos_vm::natives::aptos_natives(),
&INITIAL_COST_SCHEDULE,
&error_descriptions,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ fn run_all(args_path: &Path) -> datatest_stable::Result<()> {
let use_temp_dir = !args_path.parent().unwrap().join("NO_TEMPDIR").exists();
test::run_one(
args_path,
&PathBuf::from("../../target/debug/df-cli"),
&PathBuf::from("../../target/debug/af-cli"),
/* use_temp_dir */ use_temp_dir,
/* track_cov */ false,
)?;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ name = "compare_smoke"
version = "0.0.0"

[dependencies]
DPNFramework = { local = "../../../../framework/DPN" }
AptosFramework = { local = "../../../../framework/aptos-framework" }
MoveNursery = { local = "../../../../framework/move-stdlib/nursery" }
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ address 0x2 {
// the account address of each list node is actually the address bound to the key(name)
module NameService {
use 0x2::SortedLinkedList::{Self, EntryHandle};
use DiemFramework::Block;
use CoreFramework::Block;
use Std::Signer;
use Std::Vector;

Expand Down
4 changes: 2 additions & 2 deletions aptos-move/aptos-resource-viewer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ use std::{
use move_core_types::resolver::MoveResolver;
pub use move_resource_viewer::{AnnotatedMoveStruct, AnnotatedMoveValue};

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

/// A wrapper around `MoveValueAnnotator` that adds a few aptos-specific funtionalities.
#[derive(Debug)]
pub struct AnnotatedAccountStateBlob(BTreeMap<StructTag, AnnotatedMoveStruct>);

impl<'a, T: MoveResolver> DiemValueAnnotator<'a, T> {
impl<'a, T: MoveResolver> AptosValueAnnotator<'a, T> {
pub fn new(storage: &'a T) -> Self {
Self(MoveValueAnnotator::new(storage))
}
Expand Down
1 change: 0 additions & 1 deletion aptos-move/aptos-transaction-benchmarks/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ aptos-crypto = { path = "../../crates/aptos-crypto" }
read-write-set = { git = "https://github.com/diem/move", rev = "3fe033b112eae7df2d15ab3467624165ae510caa" }
read-write-set-dynamic = { git = "https://github.com/diem/move", rev = "3fe033b112eae7df2d15ab3467624165ae510caa" }
aptos-vm = { path = "../aptos-vm" }
diem-framework-releases = { path = "../framework/DPN/releases" }

[[bench]]
name = "transaction_benches"
Expand Down
6 changes: 3 additions & 3 deletions aptos-move/aptos-transactional-test-harness/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ aptos-workspace-hack = { version = "0.1", path = "../../crates/aptos-workspace-h
[dev-dependencies]
datatest-stable = "0.1.1"

[[test]]
name = "tests"
harness = false
#[[test]]
#name = "tests"
#harness = false
Loading

0 comments on commit 7b92d8f

Please sign in to comment.