Remove tokio dev-dependency

This commit is contained in:
Michael Vines 2021-03-15 22:38:47 -07:00
parent c63d854ac7
commit 995d4a029f
32 changed files with 60 additions and 64 deletions

View File

@ -18,7 +18,6 @@ spl-token = { version = "3.1", path = "../../token/program", features = ["no-ent
[dev-dependencies]
solana-program-test = "1.5.11"
solana-sdk = "1.5.11"
tokio = { version = "0.3", features = ["macros"]}
[lib]
crate-type = ["cdylib", "lib"]

View File

@ -18,7 +18,6 @@ solana-program = "1.5.11"
[dev-dependencies]
solana-program-test = "1.5.11"
solana-sdk = "1.5.11"
tokio = { version = "0.3", features = ["macros"]}
[lib]
crate-type = ["cdylib", "lib"]

View File

@ -1,16 +1,18 @@
// Mark this test as BPF-only due to current `ProgramTest` limitations when CPIing into the system program
#![cfg(feature = "test-bpf")]
use solana_program::{
instruction::{AccountMeta, Instruction},
pubkey::Pubkey,
rent::Rent,
system_program,
use {
solana_program::{
instruction::{AccountMeta, Instruction},
pubkey::Pubkey,
rent::Rent,
system_program,
},
solana_program_test::*,
solana_sdk::{account::Account, signature::Signer, transaction::Transaction},
spl_example_cross_program_invocation::processor::{process_instruction, SIZE},
std::str::FromStr,
};
use solana_program_test::{processor, ProgramTest};
use solana_sdk::{account::Account, signature::Signer, transaction::Transaction};
use spl_example_cross_program_invocation::processor::{process_instruction, SIZE};
use std::str::FromStr;
#[tokio::test]
async fn test_cross_program_invocation() {

View File

@ -20,7 +20,6 @@ solana-program = "1.5.11"
[dev-dependencies]
solana-program-test = "1.5.11"
solana-sdk = "1.5.11"
tokio = { version = "0.3", features = ["macros"]}
[lib]
crate-type = ["cdylib", "lib"]

View File

@ -1,8 +1,10 @@
use solana_program::{instruction::Instruction, pubkey::Pubkey};
use solana_program_test::{processor, ProgramTest};
use solana_sdk::{signature::Signer, transaction::Transaction};
use spl_example_custom_heap::processor::process_instruction;
use std::str::FromStr;
use {
solana_program::{instruction::Instruction, pubkey::Pubkey},
solana_program_test::*,
solana_sdk::{signature::Signer, transaction::Transaction},
spl_example_custom_heap::processor::process_instruction,
std::str::FromStr,
};
#[tokio::test]
async fn test_custom_heap() {

View File

@ -18,7 +18,6 @@ solana-program = "1.5.11"
[dev-dependencies]
solana-program-test = "1.5.11"
solana-sdk = "1.5.11"
tokio = { version = "0.3", features = ["macros"]}
[lib]
crate-type = ["cdylib", "lib"]

View File

@ -1,11 +1,13 @@
use solana_program::{
instruction::{AccountMeta, Instruction},
pubkey::Pubkey,
use {
solana_program::{
instruction::{AccountMeta, Instruction},
pubkey::Pubkey,
},
solana_program_test::*,
solana_sdk::{signature::Signer, transaction::Transaction},
spl_example_logging::processor::process_instruction,
std::str::FromStr,
};
use solana_program_test::{processor, ProgramTest};
use solana_sdk::{signature::Signer, transaction::Transaction};
use spl_example_logging::processor::process_instruction;
use std::str::FromStr;
#[tokio::test]
async fn test_logging() {

View File

@ -18,7 +18,6 @@ solana-program = "1.5.11"
[dev-dependencies]
solana-program-test = "1.5.11"
solana-sdk = "1.5.11"
tokio = { version = "0.3", features = ["macros"]}
[lib]
crate-type = ["cdylib", "lib"]

View File

@ -1,12 +1,14 @@
use solana_program::{
instruction::{AccountMeta, Instruction},
pubkey::Pubkey,
sysvar::{self},
use {
solana_program::{
instruction::{AccountMeta, Instruction},
pubkey::Pubkey,
sysvar::{self},
},
solana_program_test::*,
solana_sdk::{signature::Signer, transaction::Transaction},
spl_example_sysvar::processor::process_instruction,
std::str::FromStr,
};
use solana_program_test::{processor, ProgramTest};
use solana_sdk::{signature::Signer, transaction::Transaction};
use spl_example_sysvar::processor::process_instruction;
use std::str::FromStr;
#[tokio::test]
async fn test_sysvar() {

View File

@ -17,7 +17,6 @@ solana-program = "1.5.11"
[dev-dependencies]
solana-program-test = "1.5.11"
solana-sdk = "1.5.11"
tokio = { version = "0.3", features = ["macros"]}
[lib]
crate-type = ["cdylib", "lib"]

View File

@ -1,11 +1,13 @@
use solana_program::{
instruction::{AccountMeta, Instruction},
pubkey::Pubkey,
use {
solana_program::{
instruction::{AccountMeta, Instruction},
pubkey::Pubkey,
},
solana_program_test::*,
solana_sdk::{account::Account, signature::Signer, transaction::Transaction},
spl_example_transfer_lamports::processor::process_instruction,
std::str::FromStr,
};
use solana_program_test::{processor, ProgramTest};
use solana_sdk::{account::Account, signature::Signer, transaction::Transaction};
use spl_example_transfer_lamports::processor::process_instruction;
use std::str::FromStr;
#[tokio::test]
async fn test_lamport_transfer() {

View File

@ -21,7 +21,6 @@ spl-token = { version = "3.1", path = "../../token/program", features = ["no-ent
futures = "0.3"
solana-program-test = "1.5.11"
solana-sdk = "1.5.11"
tokio = { version = "0.3", features = ["macros"]}
[lib]
crate-type = ["cdylib", "lib"]

View File

@ -24,7 +24,6 @@ uint = "0.8"
proptest = "0.10"
solana-program-test = "1.5.11"
solana-sdk = "1.5.11"
tokio = { version = "0.3", features = ["macros"]}
[lib]
crate-type = ["cdylib", "lib"]

View File

@ -3,7 +3,7 @@
use {
solana_program::pubkey::Pubkey,
solana_program_test::{processor, ProgramTest},
solana_program_test::*,
solana_sdk::{signature::Signer, transaction::Transaction},
spl_math::{id, instruction, processor::process_instruction},
};

View File

@ -17,7 +17,6 @@ solana-program = "1.5.11"
[dev-dependencies]
solana-program-test = "1.5.11"
solana-sdk = "1.5.11"
tokio = { version = "0.3", features = ["macros"]}
[lib]
crate-type = ["cdylib", "lib"]

View File

@ -26,7 +26,6 @@ cd "$(dirname "$0")"
source "$solana_dir"/scripts/read-cargo-variable.sh
solana_ver=$(readCargoVariable version "$solana_dir"/sdk/Cargo.toml)
tokio_ver=$(sed -n "s#^tokio.*version *= *\"\([^\"]*\).*#\1#p" "$solana_dir"/program-test/Cargo.toml)
echo "Patching in $solana_ver from $solana_dir"
echo
@ -57,4 +56,4 @@ PATCH
fi
done
./update-solana-dependencies.sh "$solana_ver" "$tokio_ver"
./update-solana-dependencies.sh "$solana_ver"

View File

@ -22,7 +22,6 @@ thiserror = "1.0"
[dev-dependencies]
solana-program-test = "1.5.11"
solana-sdk = "1.5.11"
tokio = { version = "0.3", features = ["macros"]}
[lib]
crate-type = ["cdylib", "lib"]

View File

@ -10,7 +10,7 @@ use {
rent::Rent,
system_instruction,
},
solana_program_test::{processor, ProgramTest, ProgramTestContext},
solana_program_test::*,
solana_sdk::{
signature::{Keypair, Signer},
transaction::{Transaction, TransactionError},

View File

@ -27,7 +27,6 @@ bincode = "1.3.1"
solana-program-test = "1.5.11"
solana-sdk = "1.5.11"
solana-vote-program = "1.5.11"
tokio = { version = "0.3", features = ["macros"]}
[lib]
crate-type = ["cdylib", "lib"]

View File

@ -5,7 +5,7 @@ mod helpers;
use helpers::*;
use solana_program::hash::Hash;
use solana_program_test::BanksClient;
use solana_program_test::*;
use solana_sdk::{
instruction::InstructionError,
signature::{Keypair, Signer},

View File

@ -9,7 +9,7 @@ use solana_program::{
program_pack::Pack,
system_instruction, sysvar,
};
use solana_program_test::BanksClient;
use solana_program_test::*;
use solana_sdk::{
instruction::InstructionError, signature::Keypair, signature::Signer, transaction::Transaction,
transaction::TransactionError, transport::TransportError,

View File

@ -6,7 +6,7 @@ use helpers::*;
use solana_program::hash::Hash;
use solana_program::instruction::AccountMeta;
use solana_program::instruction::Instruction;
use solana_program_test::BanksClient;
use solana_program_test::*;
use solana_sdk::{
instruction::InstructionError, signature::Keypair, signature::Signer, transaction::Transaction,
transaction::TransactionError, transport::TransportError,

View File

@ -8,7 +8,7 @@ use solana_program::hash::Hash;
use solana_program::instruction::AccountMeta;
use solana_program::instruction::Instruction;
use solana_program::sysvar;
use solana_program_test::BanksClient;
use solana_program_test::*;
use solana_sdk::{
instruction::InstructionError, signature::Keypair, signature::Signer, transaction::Transaction,
transaction::TransactionError, transport::TransportError,

View File

@ -6,7 +6,7 @@ use {
crate::helpers::TEST_STAKE_AMOUNT,
helpers::*,
solana_program::{native_token, pubkey::Pubkey},
solana_program_test::BanksClient,
solana_program_test::*,
solana_sdk::signature::Signer,
spl_stake_pool::*,
};

View File

@ -3,6 +3,7 @@
mod helpers;
use helpers::*;
use solana_program_test::*;
use solana_sdk::{
instruction::InstructionError, signature::Keypair, signature::Signer, transaction::Transaction,
transaction::TransactionError, transport::TransportError,

View File

@ -9,7 +9,7 @@ use solana_program::hash::Hash;
use solana_program::instruction::AccountMeta;
use solana_program::instruction::Instruction;
use solana_program::sysvar;
use solana_program_test::BanksClient;
use solana_program_test::*;
use solana_sdk::{
instruction::InstructionError,
signature::{Keypair, Signer},

View File

@ -6,6 +6,7 @@ use crate::solana_program::pubkey::Pubkey;
use helpers::*;
use bincode::deserialize;
use solana_program_test::*;
use solana_sdk::{
instruction::InstructionError,
signature::{Keypair, Signer},

View File

@ -9,7 +9,7 @@ use solana_program::instruction::AccountMeta;
use solana_program::instruction::Instruction;
use solana_program::pubkey::Pubkey;
use solana_program::sysvar;
use solana_program_test::BanksClient;
use solana_program_test::*;
use solana_sdk::{
instruction::InstructionError,
signature::{Keypair, Signer},

View File

@ -6,7 +6,7 @@ use helpers::*;
use solana_program::pubkey::Pubkey;
use solana_program::hash::Hash;
use solana_program_test::BanksClient;
use solana_program_test::*;
use solana_sdk::{
instruction::InstructionError,
signature::{Keypair, Signer},

View File

@ -31,7 +31,6 @@ solana-program-test = "1.5.11"
solana-sdk = "1.5.11"
serde = "1.0"
serde_yaml = "0.8"
tokio = { version = "0.3", features = ["macros"]}
[lib]
crate-type = ["cdylib", "lib"]

View File

@ -3,6 +3,7 @@
mod helpers;
use helpers::*;
use solana_program_test::*;
use solana_sdk::signature::Keypair;
use spl_token_lending::{
instruction::BorrowAmountType,

View File

@ -4,7 +4,6 @@
#
solana_ver=$1
tokio_ver=$2
if [[ -z $solana_ver ]]; then
echo "Usage: $0 <new-solana-version>"
exit 1
@ -37,6 +36,3 @@ set -x
for crate in "${crates[@]}"; do
sed -i -e "s#\(${crate} = \"\).*\(\"\)#\1$solana_ver\2#g" "${tomls[@]}"
done
if [[ -n $tokio_ver ]]; then
sed -i -e "s#\(tokio.*version *= *\"\)[^\"]*\(\".*$\)#\1$tokio_ver\2#g" "${tomls[@]}"
fi