Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix solana-address-lookup-table-program compilation #34353

Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions programs/address-lookup-table/src/lib.rs
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could probably just export from solana-program to avoid extra cfg checks since solana-sdk just re-exports from solana-program but seperation seems more organized.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, this is the way.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 2bce424

Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
#![cfg_attr(RUSTC_WITH_SPECIALIZATION, feature(specialization))]
#![cfg_attr(RUSTC_NEEDS_PROC_MACRO_HYGIENE, feature(proc_macro_hygiene))]

#[cfg(not(target_os = "solana"))]
pub mod processor;

#[cfg(not(target_os = "solana"))]
#[deprecated(
since = "1.17.0",
note = "Please use `solana_sdk::address_lookup_table` instead"
Expand All @@ -13,3 +15,14 @@ pub use solana_sdk::address_lookup_table::{
program::{check_id, id, ID},
state,
};

#[cfg(target_os = "solana")]
#[deprecated(
since = "1.17.0",
note = "Please use `solana_program::address_lookup_table` instead"
)]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The #[deprecated] attribute doesn't seem to be doing anything for use statements as I don't get any warnings about depreciation for these re-exports. Still, it could be useful to see it when looking at the source code.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this is an annoyance with Rust... I really wish these did something, but I agree these are useful

pub use solana_program::address_lookup_table::{
error, instruction,
program::{check_id, id, ID},
state,
};
Loading