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

solana-address-lookup-table-program compile error in program environment #34352

Closed
acheroncrypto opened this issue Dec 7, 2023 · 0 comments · Fixed by #34353
Closed

solana-address-lookup-table-program compile error in program environment #34352

acheroncrypto opened this issue Dec 7, 2023 · 0 comments · Fixed by #34353
Labels
community Community contribution

Comments

@acheroncrypto
Copy link
Contributor

Problem

solana-address-lookup-table-program ^1.17 is broken in programs after #33165.

It uses solana_sdk crate instead of solana_program which cause compile errors for programs:

#[deprecated(
since = "1.17.0",
note = "Please use `solana_sdk::address_lookup_table` instead"
)]
pub use solana_sdk::address_lookup_table::{
error, instruction,
program::{check_id, id, ID},
state,
};

   Compiling solana-address-lookup-table-program v1.17.0
error[E0433]: failed to resolve: use of undeclared crate or module `solana_sdk`
  --> src/lib.rs:11:9
   |
11 | pub use solana_sdk::address_lookup_table::{
   |         ^^^^^^^^^^ use of undeclared crate or module `solana_sdk`

To be specific, the above error is about solana-sdk is not being declared as a dependency in program environment but it would still fail if it was declared:

[target.'cfg(not(target_os = "solana"))'.dependencies]
solana-program-runtime = { workspace = true }
solana-sdk = { workspace = true }

Proposed Solution

Export it from solana-program instead of solana-sdk for program compilation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Community contribution
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant