Skip to content

Commit

Permalink
fix starcoin-time-services errors (#4220)
Browse files Browse the repository at this point in the history
  • Loading branch information
nkysg authored Sep 30, 2024
1 parent a8f9ce5 commit 46ef5fa
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 12 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

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

3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -480,12 +480,11 @@ rustyline-derive = "0.6.0"
sc-peerset = { path = "network-p2p/peerset" }
schemars = { git = "https://github.com/starcoinorg/schemars", rev = "9b3705780b8fe9c8676ff82919869ba7405b1062" }
scmd = { path = "commons/scmd" }
serde = "1.0.130"
serde = { version = "1.0.130", features = ["derive"] }
serde-generate = { git = "https://github.com/starcoinorg/serde-reflection", rev = "eb95fd4e3b67e08d71432b522c53833a0b855d80" }
serde-helpers = { path = "commons/serde-helpers" }
serde-reflection = { git = "https://github.com/starcoinorg/serde-reflection", rev = "eb95fd4e3b67e08d71432b522c53833a0b855d80" }
serde_bytes = "0.11"
serde_derive = "1.0"
serde_json = "~1"
serde_yaml = "0.8.26"
serde_with = "3.4.0"
Expand Down
1 change: 0 additions & 1 deletion txpool/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ parking_lot = { workspace = true }
rand = { workspace = true }
rand_core = { default-features = false, workspace = true }
serde = { workspace = true }
serde_derive = { workspace = true }
starcoin-config = { workspace = true }
starcoin-crypto = { workspace = true }
starcoin-executor = { workspace = true }
Expand Down
4 changes: 2 additions & 2 deletions vm/framework/src/built_package.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ use crate::{
docgen::DocgenOptions,
extended_checks,
natives::code::{ModuleMetadata, MoveOption, PackageDep, PackageMetadata, UpgradePolicy},
zip_metadata, zip_metadata_str, RuntimeModuleMetadataV1, STARCOIN_METADATA_KEY,
STARCOIN_METADATA_KEY_V1, METADATA_V1_MIN_FILE_FORMAT_VERSION,
zip_metadata, zip_metadata_str, RuntimeModuleMetadataV1, METADATA_V1_MIN_FILE_FORMAT_VERSION,
STARCOIN_METADATA_KEY, STARCOIN_METADATA_KEY_V1,
};
use anyhow::{anyhow, bail};
use clap::Parser;
Expand Down
2 changes: 1 addition & 1 deletion vm/framework/tests/move_unit_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Parts of the project are originally copyright © Meta Platforms, Inc.
// SPDX-License-Identifier: Apache-2.0

use starcoin_vm::natives;
use move_cli::base::test::{run_move_unit_tests, UnitTestResult};
use move_command_line_common::env::get_move_compiler_v2_from_env;
use move_model::metadata::CompilerVersion;
Expand All @@ -11,6 +10,7 @@ use move_unit_test::UnitTestingConfig;
use move_vm_runtime::native_functions::NativeFunctionTable;
use starcoin_framework::{extended_checks, path_in_crate};
use starcoin_gas_schedule::{MiscGasParameters, NativeGasParameters, LATEST_GAS_FEATURE_VERSION};
use starcoin_vm::natives;
use starcoin_vm_types::on_chain_config::{
starcoin_test_feature_flags_genesis, Features, TimedFeaturesBuilder,
};
Expand Down
4 changes: 3 additions & 1 deletion vm/starcoin-sdk-builder/src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,9 @@ pub(crate) fn mangle_type(type_tag: &TypeTag) -> String {
}
}

pub(crate) fn get_external_definitions(starcoin_types: &str) -> serde_generate::ExternalDefinitions {
pub(crate) fn get_external_definitions(
starcoin_types: &str,
) -> serde_generate::ExternalDefinitions {
let definitions = vec![(
starcoin_types,
vec!["AccountAddress", "TypeTag", "Script", "TransactionArgument"],
Expand Down
3 changes: 2 additions & 1 deletion vm/starcoin-sdk-builder/src/golang.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ where
crate::common::get_external_definitions(&starcoin_types_package);
// We need BCS for argument encoding and decoding
external_definitions.insert(
"github.com/starcoin-labs/serde-reflection/serde-generate/runtime/golang/bcs".to_string(),
"github.com/starcoin-labs/serde-reflection/serde-generate/runtime/golang/bcs"
.to_string(),
Vec::new(),
);
// Add standard imports
Expand Down
5 changes: 4 additions & 1 deletion vm/starcoin-sdk-builder/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ enum Language {
}

#[derive(Debug, Parser)]
#[clap(name = "Starcoin SDK Builder", about = "Generate boilerplate Starcoin SDKs")]
#[clap(
name = "Starcoin SDK Builder",
about = "Generate boilerplate Starcoin SDKs"
)]
struct Options {
/// Path to the directory containing ABI files in BCS encoding.
abi_directories: Vec<PathBuf>,
Expand Down
4 changes: 2 additions & 2 deletions vm/starcoin-sdk-builder/tests/generation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
// Parts of the project are originally copyright © Meta Platforms, Inc.
// SPDX-License-Identifier: Apache-2.0

use starcoin_sdk_builder as buildgen;
use starcoin_types::transaction::EntryABI;
use serde_generate as serdegen;
use serde_generate::SourceInstaller as _;
use serde_reflection::Registry;
use starcoin_sdk_builder as buildgen;
use starcoin_types::transaction::EntryABI;
use std::{io::Write, process::Command};
use tempfile::tempdir;

Expand Down

0 comments on commit 46ef5fa

Please sign in to comment.