From e1432d5d666c16877d6b72c77a136714e88a0ae6 Mon Sep 17 00:00:00 2001 From: Tyera Eulberg Date: Tue, 2 Jul 2024 12:05:08 -0600 Subject: [PATCH 1/3] Remove deprecated re-export --- sdk/program/src/lib.rs | 8 -------- sdk/program/src/message/compiled_keys.rs | 2 +- sdk/program/src/message/versions/v0/mod.rs | 2 +- sdk/src/lib.rs | 4 ++-- 4 files changed, 4 insertions(+), 12 deletions(-) diff --git a/sdk/program/src/lib.rs b/sdk/program/src/lib.rs index 1a0a7537f70dec..1b7e27810ce258 100644 --- a/sdk/program/src/lib.rs +++ b/sdk/program/src/lib.rs @@ -536,14 +536,6 @@ pub mod sysvar; pub mod vote; pub mod wasm; -#[deprecated( - since = "1.17.0", - note = "Please use `solana_sdk::address_lookup_table::AddressLookupTableAccount` instead" -)] -pub mod address_lookup_table_account { - pub use crate::address_lookup_table::AddressLookupTableAccount; -} - #[deprecated(since = "2.1.0", note = "Use `solana-sanitize` crate instead")] pub use solana_sanitize as sanitize; #[cfg(target_arch = "wasm32")] diff --git a/sdk/program/src/message/compiled_keys.rs b/sdk/program/src/message/compiled_keys.rs index 7e9b19a10591e1..a9964c33448be2 100644 --- a/sdk/program/src/message/compiled_keys.rs +++ b/sdk/program/src/message/compiled_keys.rs @@ -1,6 +1,6 @@ #[cfg(not(target_os = "solana"))] use crate::{ - address_lookup_table_account::AddressLookupTableAccount, + address_lookup_table::AddressLookupTableAccount, message::v0::{LoadedAddresses, MessageAddressTableLookup}, }; use { diff --git a/sdk/program/src/message/versions/v0/mod.rs b/sdk/program/src/message/versions/v0/mod.rs index 76c866bf6a602a..7d78b4d1d8f6d5 100644 --- a/sdk/program/src/message/versions/v0/mod.rs +++ b/sdk/program/src/message/versions/v0/mod.rs @@ -12,7 +12,7 @@ pub use loaded::*; use { crate::{ - address_lookup_table_account::AddressLookupTableAccount, + address_lookup_table::AddressLookupTableAccount, bpf_loader_upgradeable, hash::Hash, instruction::{CompiledInstruction, Instruction}, diff --git a/sdk/src/lib.rs b/sdk/src/lib.rs index 9c97a2c3d9a2ed..93e99fb769c22d 100644 --- a/sdk/src/lib.rs +++ b/sdk/src/lib.rs @@ -41,6 +41,8 @@ pub use signer::signers; pub use solana_program::program_stubs; // These solana_program imports could be *-imported, but that causes a bunch of // confusing duplication in the docs due to a rustdoc bug. #26211 +#[allow(deprecated)] +pub use solana_program::sdk_ids; #[cfg(target_arch = "wasm32")] pub use solana_program::wasm_bindgen; pub use solana_program::{ @@ -55,8 +57,6 @@ pub use solana_program::{ stake_history, syscalls, system_instruction, system_program, sysvar, unchecked_div_by_const, vote, }; -#[allow(deprecated)] -pub use solana_program::{address_lookup_table_account, sdk_ids}; #[cfg(feature = "borsh")] pub use solana_program::{borsh, borsh0_10, borsh1}; From 36eefc2d0418d9c7838a81053ad4b92b0dae1912 Mon Sep 17 00:00:00 2001 From: Tyera Eulberg Date: Tue, 2 Jul 2024 12:09:43 -0600 Subject: [PATCH 2/3] Remove deprecated stuff from example_mocks --- sdk/program/src/example_mocks.rs | 41 +--------------------- sdk/program/src/message/versions/v0/mod.rs | 2 +- 2 files changed, 2 insertions(+), 41 deletions(-) diff --git a/sdk/program/src/example_mocks.rs b/sdk/program/src/example_mocks.rs index ebde291ced11bd..b528812e36f6b3 100644 --- a/sdk/program/src/example_mocks.rs +++ b/sdk/program/src/example_mocks.rs @@ -274,44 +274,5 @@ pub mod solana_sdk { } } - #[deprecated( - since = "1.17.0", - note = "Please use `solana_sdk::address_lookup_table` instead" - )] - pub use crate::address_lookup_table as address_lookup_table_account; -} - -#[deprecated( - since = "1.17.0", - note = "Please use `solana_sdk::address_lookup_table` instead" -)] -pub mod solana_address_lookup_table_program { - pub use crate::address_lookup_table::program::{check_id, id, ID}; - - pub mod state { - use { - crate::{instruction::InstructionError, pubkey::Pubkey}, - std::borrow::Cow, - }; - - pub struct AddressLookupTable<'a> { - pub addresses: Cow<'a, [Pubkey]>, - } - - impl<'a> AddressLookupTable<'a> { - pub fn serialize_for_tests(self) -> Result, InstructionError> { - let mut data = vec![]; - self.addresses.iter().for_each(|address| { - data.extend_from_slice(address.as_ref()); - }); - Ok(data) - } - - pub fn deserialize(data: &'a [u8]) -> Result, InstructionError> { - Ok(Self { - addresses: Cow::Borrowed(bytemuck::try_cast_slice(data).unwrap()), - }) - } - } - } + pub use crate::address_lookup_table; } diff --git a/sdk/program/src/message/versions/v0/mod.rs b/sdk/program/src/message/versions/v0/mod.rs index 7d78b4d1d8f6d5..19970604559c26 100644 --- a/sdk/program/src/message/versions/v0/mod.rs +++ b/sdk/program/src/message/versions/v0/mod.rs @@ -200,7 +200,7 @@ impl Message { /// use solana_rpc_client::rpc_client::RpcClient; /// use solana_program::address_lookup_table::{self, state::{AddressLookupTable, LookupTableMeta}}; /// use solana_sdk::{ - /// address_lookup_table_account::AddressLookupTableAccount, + /// address_lookup_table::AddressLookupTableAccount, /// instruction::{AccountMeta, Instruction}, /// message::{VersionedMessage, v0}, /// pubkey::Pubkey, From 5432a7f48fbcb50086d894f34f9faa6472144816 Mon Sep 17 00:00:00 2001 From: Tyera Eulberg Date: Tue, 2 Jul 2024 17:10:58 -0600 Subject: [PATCH 3/3] Remove deprecated programs/alt re-export --- programs/address-lookup-table/src/lib.rs | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/programs/address-lookup-table/src/lib.rs b/programs/address-lookup-table/src/lib.rs index 737c35e4c4b2f4..e146dd184b5385 100644 --- a/programs/address-lookup-table/src/lib.rs +++ b/programs/address-lookup-table/src/lib.rs @@ -3,13 +3,3 @@ #[cfg(not(target_os = "solana"))] pub mod processor; - -#[deprecated( - since = "1.17.0", - note = "Please use `solana_program::address_lookup_table` instead" -)] -pub use solana_program::address_lookup_table::{ - error, instruction, - program::{check_id, id, ID}, - state, -};