Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
Zekun Wang committed Jun 5, 2024
1 parent e2bca36 commit 5553f5b
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 10 deletions.
5 changes: 4 additions & 1 deletion aptos-move/framework/src/built_package.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ use move_model::{
};
use move_package::{
compilation::{compiled_package::CompiledPackage, package_layout::CompiledPackageLayout},
source_package::{manifest_parser::{parse_move_manifest_string, parse_source_manifest}, std_lib::StdVersion},
source_package::{
manifest_parser::{parse_move_manifest_string, parse_source_manifest},
std_lib::StdVersion,
},
BuildConfig, CompilerConfig, ModelConfig,
};
use serde::{Deserialize, Serialize};
Expand Down
5 changes: 4 additions & 1 deletion crates/aptos/src/move_tool/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ use move_cli::{self, base::test::UnitTestResult};
use move_command_line_common::env::MOVE_HOME;
use move_core_types::{identifier::Identifier, language_storage::ModuleId, u256::U256};
use move_model::metadata::{CompilerVersion, LanguageVersion};
use move_package::{source_package::{layout::SourcePackageLayout, std_lib::StdVersion}, BuildConfig, CompilerConfig};
use move_package::{
source_package::{layout::SourcePackageLayout, std_lib::StdVersion},
BuildConfig, CompilerConfig,
};
use move_unit_test::UnitTestingConfig;
pub use package_hooks::*;
use serde::{Deserialize, Serialize};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ impl ResolvingGraph {
root_package.clone(),
root_package_path,
true,
&override_std,
override_std,
writer,
)
.with_context(|| {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
// Copyright (c) Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use crate::source_package::parsed_manifest::{Dependency, GitInfo};
use crate::{
manifest_parser::git_repo_cache_path,
source_package::parsed_manifest::{Dependency, GitInfo},
};
use clap::ValueEnum;
use move_symbol_pool::symbol::Symbol;
use std::{fmt::Display, path::PathBuf};
use serde::{Deserialize, Serialize};

use crate::manifest_parser::git_repo_cache_path;
use std::{fmt::Display, path::PathBuf};

/// Represents a standard library.
pub enum StdLib {
Expand Down
9 changes: 6 additions & 3 deletions third_party/move/tools/move-package/tests/test_runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ use move_compiler::shared::known_attributes::KnownAttribute;
use move_model::metadata::{CompilerVersion, LanguageVersion};
use move_package::{
compilation::{build_plan::BuildPlan, model_builder::ModelBuilder},
package_hooks,
package_hooks::PackageHooks,
package_hooks::{self, PackageHooks},
resolution::resolution_graph as RG,
source_package::{
manifest_parser as MP,
parsed_manifest::{CustomDepInfo, PackageDigest},
std_lib::StdVersion,
},
BuildConfig, CompilerConfig, ModelConfig,
};
Expand All @@ -42,7 +42,10 @@ fn run_test_impl(
compiler_config.compiler_version = Some(compiler_version);
let override_path = path.with_extension(OVERRIDE_EXT);
let override_std = if override_path.is_file() {
Some(fs::read_to_string(override_path)?)
Some(
StdVersion::from_rev(&fs::read_to_string(override_path)?)
.expect("one of mainnet/testnet/devnet"),
)
} else {
None
};
Expand Down

0 comments on commit 5553f5b

Please sign in to comment.