From df6230caffe601963792f5034120bebd0ce1a32d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?dj8yf0=CE=BCl?= <26653921+dj8yfo@users.noreply.github.com> Date: Fri, 15 Nov 2024 15:41:00 +0200 Subject: [PATCH] chore!: reexport `cargo-near-build` for configurable build if needed (#386) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR addresses this TODO https://github.com/near/near-sdk-rs/pull/1253#discussion_r1833629296 , which later ~will be~ has been removed from `near-sdk` code, for cases: 1. when non-async function is required in `static std::sync::OnceLock/LazyLock` creation like here https://github.com/dj8yfo/near-sdk-rs/blob/7be211e1b2991f6c5b4db78972784dac2f066e32/examples/fungible-token/tests/workspaces.rs#L47 2. when non-default build is required like with `no-abi` here https://github.com/dj8yfo/abstract-dao/blob/fe9d16797bf582f0ea24380c1e4ad6bdb8c97283/tests/common.rs#L33 PR avoids necessity to import `cargo-near-build` separately as a dependency PR should best be published with a major release, to avoid weird breakage `0.14.1 -> 0.14.x` Co-authored-by: dj8yf0μl --- workspaces/Cargo.toml | 2 +- workspaces/src/lib.rs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/workspaces/Cargo.toml b/workspaces/Cargo.toml index 1119c5e2..7c3fc976 100644 --- a/workspaces/Cargo.toml +++ b/workspaces/Cargo.toml @@ -13,7 +13,7 @@ Library for automating workflows and testing NEAR smart contracts. async-trait = "0.1" base64 = "0.22" bs58 = "0.5" -cargo-near-build = { version = "0.2.0", optional = true } +cargo-near-build = { version = "0.3.0", optional = true } chrono = "0.4.19" fs2 = "0.4" rand = "0.8.4" diff --git a/workspaces/src/lib.rs b/workspaces/src/lib.rs index 12bb2c56..0256ddd7 100644 --- a/workspaces/src/lib.rs +++ b/workspaces/src/lib.rs @@ -10,6 +10,8 @@ mod cargo; #[cfg(feature = "unstable")] pub use cargo::compile_project; +#[cfg(feature = "unstable")] +pub use cargo_near_build; mod worker;