From fea5f6d8521f233f4f80700817c4d52620566e13 Mon Sep 17 00:00:00 2001 From: nk_ysg Date: Wed, 9 Oct 2024 13:13:17 +0800 Subject: [PATCH] tmp fix stdlib errors --- Cargo.lock | 22 ++++++++++++++++++---- Cargo.toml | 2 +- vm/stdlib/Cargo.toml | 1 + vm/stdlib/src/lib.rs | 7 ++++--- vm/stdlib/src/main.rs | 2 +- 5 files changed, 25 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 16372a650a..0f59cde091 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -10277,7 +10277,7 @@ dependencies = [ "once_cell", "proptest", "proptest-derive 0.3.0", - "starcoin-framework", + "starcoin-framework 0.1.0", "starcoin-package-builder", "starcoin-vm-types", ] @@ -10854,6 +10854,19 @@ dependencies = [ "tiny-keccak", ] +[[package]] +name = "starcoin-framework" +version = "13.0.0" +source = "git+https://github.com/starcoinorg/starcoin-framework?rev=94bcd77e80232b169cf95754ef4e87775645afcd#94bcd77e80232b169cf95754ef4e87775645afcd" +dependencies = [ + "anyhow", + "include_dir", + "log 0.4.22", + "once_cell", + "tempfile", + "walkdir", +] + [[package]] name = "starcoin-frameworks" version = "2.0.1" @@ -11514,7 +11527,7 @@ dependencies = [ "itertools 0.10.5", "move-command-line-common", "move-package", - "starcoin-framework", + "starcoin-framework 0.1.0", "tempfile", ] @@ -11800,7 +11813,7 @@ dependencies = [ "serde-reflection 0.3.2", "serde_yaml", "starcoin-cached-packages", - "starcoin-framework", + "starcoin-framework 0.1.0", "starcoin-vm-types", "tempfile", "textwrap 0.14.2", @@ -12445,7 +12458,8 @@ dependencies = [ "sha2 0.9.9", "simplelog", "starcoin-crypto", - "starcoin-framework", + "starcoin-framework 0.1.0", + "starcoin-framework 13.0.0", "starcoin-move-compiler", "starcoin-vm-types", "tempfile", diff --git a/Cargo.toml b/Cargo.toml index 0dba6974c4..3629e04b9e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -522,7 +522,7 @@ starcoin-crypto = { git = "https://github.com/starcoinorg/starcoin-crypto", rev starcoin-decrypt = { path = "commons/decrypt" } starcoin-dev = { path = "vm/dev" } starcoin-executor = { path = "executor" } -#starcoin-framework = { git = "https://github.com/starcoinorg/starcoin-framework", rev = "94bcd77e80232b169cf95754ef4e87775645afcd" } +starcoin-framework-legacy = { git = "https://github.com/starcoinorg/starcoin-framework", rev = "94bcd77e80232b169cf95754ef4e87775645afcd" , package = "starcoin-framework" } starcoin-framework = { path = "vm/framework" } starcoin-sdk-builder = { path = "vm/starcoin-sdk-builder" } starcoin-genesis = { path = "genesis" } diff --git a/vm/stdlib/Cargo.toml b/vm/stdlib/Cargo.toml index 4ca7b1c4e7..551200cbd0 100644 --- a/vm/stdlib/Cargo.toml +++ b/vm/stdlib/Cargo.toml @@ -19,6 +19,7 @@ starcoin-move-compiler = { workspace = true } starcoin-vm-types = { workspace = true } tempfile = { workspace = true } walkdir = { workspace = true } +starcoin-framework-legacy = { workspace = true } [dev-dependencies] datatest-stable = { workspace = true } diff --git a/vm/stdlib/src/lib.rs b/vm/stdlib/src/lib.rs index 7ab1ffa87d..d6945f789b 100644 --- a/vm/stdlib/src/lib.rs +++ b/vm/stdlib/src/lib.rs @@ -31,7 +31,7 @@ use std::{ mod compat; pub use compat::*; -pub use starcoin_framework::SourceFiles; +pub use starcoin_framework_legacy::SourceFiles; pub use starcoin_move_compiler::utils::iterate_directory; pub const NO_USE_COMPILED: &str = "MOVE_NO_USE_COMPILED"; @@ -58,7 +58,8 @@ pub const ERROR_DESC_EXTENSION: &str = "errmap"; pub const ERROR_DESCRIPTIONS: &[u8] = std::include_bytes!("../compiled/latest/error_descriptions/error_descriptions.errmap"); -pub const STDLIB_DIR: Dir = starcoin_framework::SOURCES_DIR; +// XXX FIXME YSG need to remove +pub const STDLIB_DIR: Dir = starcoin_framework_legacy::SOURCES_DIR; // The current stdlib that is freshly built. This will never be used in deployment so we don't need // to pull the same trick here in order to include this in the Rust binary. @@ -104,7 +105,7 @@ pub static G_COMPILED_STDLIB: Lazy>>> = Lazy: pub const SCRIPT_HASH_LENGTH: usize = HashValue::LENGTH; -pub use starcoin_framework::STARCOIN_FRAMEWORK_SOURCES; +pub use starcoin_framework_legacy::STARCOIN_FRAMEWORK_SOURCES; /// Return all versions of stdlib, include latest. pub fn stdlib_versions() -> Vec { diff --git a/vm/stdlib/src/main.rs b/vm/stdlib/src/main.rs index 438f00816b..a868db4410 100644 --- a/vm/stdlib/src/main.rs +++ b/vm/stdlib/src/main.rs @@ -8,7 +8,7 @@ use itertools::Itertools; use log::LevelFilter; use simplelog::{Config, SimpleLogger}; use starcoin_crypto::hash::PlainCryptoHash; -use starcoin_framework::STARCOIN_FRAMEWORK_SOURCES; +use starcoin_framework_legacy::STARCOIN_FRAMEWORK_SOURCES; use starcoin_move_compiler::check_compiled_module_compat; use starcoin_vm_types::account_config::core_code_address; use starcoin_vm_types::file_format::CompiledModule;