From 95a3a46ddcbba5b9b3aba8c96183420604397e98 Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Thu, 9 Jul 2020 14:25:52 +0100 Subject: [PATCH 1/2] Update CI docker image` --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5d8789bf..b8d9c37f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -16,7 +16,7 @@ variables: CARGO_HOME: "/ci-cache/${CI_PROJECT_NAME}/cargo/${CI_JOB_NAME}" CARGO_TARGET_DIR: "/ci-cache/${CI_PROJECT_NAME}/targets/${CI_COMMIT_REF_NAME}/${CI_JOB_NAME}" CI_SERVER_NAME: "GitLab CI" - REGISTRY: registry.parity.io/parity/infrastructure/scripts + REGISTRY: "paritytech" RUSTUP_TOOLCHAIN: nightly RUST_LIB_BACKTRACE: 0 -- GitLab From 95fd3f57e3e469516e3bebfe5cd471b926877b06 Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Thu, 9 Jul 2020 15:28:50 +0100 Subject: [PATCH 2/2] Rename ink_abi -> ink_metadata to fix tests --- src/workspace/manifest.rs | 4 ++-- src/workspace/metadata.rs | 12 ++++++------ templates/new/_Cargo.toml | 4 ++-- templates/tools/generate-metadata/main.rs | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/workspace/manifest.rs b/src/workspace/manifest.rs index 8c4523ff..7b850754 100644 --- a/src/workspace/manifest.rs +++ b/src/workspace/manifest.rs @@ -372,9 +372,9 @@ impl Manifest { }; let ink_lang = get_dependency("ink_lang")?; - let ink_abi = get_dependency("ink_abi")?; + let ink_metadata = get_dependency("ink_metadata")?; - metadata::generate_package(dir, name, ink_lang.clone(), ink_abi.clone())?; + metadata::generate_package(dir, name, ink_lang.clone(), ink_metadata.clone())?; } let updated_toml = toml::to_string(&self.toml)?; diff --git a/src/workspace/metadata.rs b/src/workspace/metadata.rs index 77c3ea87..2a6d69b7 100644 --- a/src/workspace/metadata.rs +++ b/src/workspace/metadata.rs @@ -28,7 +28,7 @@ pub(super) fn generate_package>( target_dir: P, contract_package_name: &str, ink_lang_dependency: value::Table, - mut ink_abi_dependency: value::Table, + mut ink_metadata_dependency: value::Table, ) -> Result<()> { let dir = target_dir.as_ref(); log::debug!( @@ -55,14 +55,14 @@ pub(super) fn generate_package>( .expect("contract dependency is a table specified in the template"); contract.insert("package".into(), contract_package_name.into()); - // make ink_abi dependency use default features - ink_abi_dependency.remove("default-features"); - ink_abi_dependency.remove("features"); - ink_abi_dependency.remove("optional"); + // make ink_metadata dependency use default features + ink_metadata_dependency.remove("default-features"); + ink_metadata_dependency.remove("features"); + ink_metadata_dependency.remove("optional"); // add ink dependencies copied from contract manifest deps.insert("ink_lang".into(), ink_lang_dependency.into()); - deps.insert("ink_abi".into(), ink_abi_dependency.into()); + deps.insert("ink_metadata".into(), ink_metadata_dependency.into()); let cargo_toml = toml::to_string(&cargo_toml)?; fs::write(dir.join("Cargo.toml"), cargo_toml)?; diff --git a/templates/new/_Cargo.toml b/templates/new/_Cargo.toml index db4f2fe3..451c54f1 100644 --- a/templates/new/_Cargo.toml +++ b/templates/new/_Cargo.toml @@ -5,7 +5,7 @@ authors = ["[your_name] <[your_email]>"] edition = "2018" [dependencies] -ink_abi = { git = "https://github.com/paritytech/ink", branch = "master", package = "ink_abi", default-features = false, features = ["derive"], optional = true } +ink_metadata = { git = "https://github.com/paritytech/ink", branch = "master", package = "ink_metadata", default-features = false, features = ["derive"], optional = true } ink_primitives = { git = "https://github.com/paritytech/ink", branch = "master", default-features = false } ink_core = { git = "https://github.com/paritytech/ink", branch = "master", package = "ink_core", default-features = false } ink_lang = { git = "https://github.com/paritytech/ink", branch = "master", package = "ink_lang", default-features = false } @@ -24,7 +24,7 @@ crate-type = [ [features] default = ["std"] std = [ - "ink_abi/std", + "ink_metadata/std", "ink_core/std", "ink_primitives/std", "scale/std", diff --git a/templates/tools/generate-metadata/main.rs b/templates/tools/generate-metadata/main.rs index 3d5eeb23..a8ecb518 100644 --- a/templates/tools/generate-metadata/main.rs +++ b/templates/tools/generate-metadata/main.rs @@ -1,7 +1,7 @@ extern crate contract; extern "Rust" { - fn __ink_generate_metadata() -> ink_abi::InkProject; + fn __ink_generate_metadata() -> ink_metadata::InkProject; } fn main() -> Result<(), std::io::Error> { -- GitLab