Skip to content

Commit

Permalink
remove dependency on near-sdk entirely
Browse files Browse the repository at this point in the history
  • Loading branch information
miraclx committed Aug 23, 2022
1 parent 5202fc5 commit 43fe4da
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
1 change: 1 addition & 0 deletions integration-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ publish = false

[dev-dependencies]
anyhow = "1.0"
borsh = "0.9"
cargo-near = { path = "../cargo-near" }
function_name = "0.3"
git2 = "0.14"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ serde = { version = "1", features = ["derive"] }
schemars = "0.8"

[patch.crates-io]
near-sdk = { git = "https://github.com/near/near-sdk-rs.git", rev = "2b3a8a0a68208c5cf3fa88fd566daa107f782e26" }
near-sdk = { git = "https://github.com/near/near-sdk-rs.git", rev = "49d521c01033757b01bacf40d8713fe738bbe1cf" }

[workspace]
members = []
Expand Down
6 changes: 3 additions & 3 deletions integration-tests/tests/cargo/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ fn clone_git_repo(version: &str) -> anyhow::Result<TempDir> {
#[test]
#[named]
fn test_dependency_local_path() -> anyhow::Result<()> {
let near_sdk_dir = clone_git_repo("2b3a8a0a68208c5cf3fa88fd566daa107f782e26")?;
let near_sdk_dir = clone_git_repo("49d521c01033757b01bacf40d8713fe738bbe1cf")?;
let near_sdk_dep_path = near_sdk_dir.path().join("near-sdk");

// near-sdk = { path = "::path::", features = ["abi"] }
Expand All @@ -40,7 +40,7 @@ fn test_dependency_local_path() -> anyhow::Result<()> {
#[test]
#[named]
fn test_dependency_local_path_with_version() -> anyhow::Result<()> {
let near_sdk_dir = clone_git_repo("2b3a8a0a68208c5cf3fa88fd566daa107f782e26")?;
let near_sdk_dir = clone_git_repo("49d521c01033757b01bacf40d8713fe738bbe1cf")?;
let near_sdk_dep_path = near_sdk_dir.path().join("near-sdk");

// near-sdk = { path = "::path::", version = "4.1.0-pre.1", features = ["abi"] }
Expand Down Expand Up @@ -172,7 +172,7 @@ fn test_dependency_patch() -> anyhow::Result<()> {
// near-sdk = { version = "4.1.0-pre.1", features = ["abi"] }
//
// [patch.crates-io]
// near-sdk = { git = "https://github.com/near/near-sdk-rs.git", rev = "2b3a8a0a68208c5cf3fa88fd566daa107f782e26" }
// near-sdk = { git = "https://github.com/near/near-sdk-rs.git", rev = "49d521c01033757b01bacf40d8713fe738bbe1cf" }
let abi_root = generate_abi_fn! {
with Cargo "/templates/sdk-dependency/_Cargo_patch.toml";

Expand Down
6 changes: 2 additions & 4 deletions integration-tests/tests/tests/borsh_schema.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
use borsh::schema::{BorshSchemaContainer, Definition, Fields};
use cargo_near_integration_tests::{generate_abi, generate_abi_fn};
use function_name::named;
use near_sdk::{
__private::{AbiParameter, AbiType},
borsh::schema::{BorshSchemaContainer, Definition, Fields},
};
use near_abi::{AbiParameter, AbiType};
use std::{collections::HashMap, fs};

trait AsBorshSchema {
Expand Down

0 comments on commit 43fe4da

Please sign in to comment.