-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Fix solana-address-lookup-table-program
compilation
#34353
Conversation
#[deprecated( | ||
since = "1.17.0", | ||
note = "Please use `solana_program::address_lookup_table` instead" | ||
)] |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 2bce424
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for noticing and fixing! I agree that it's best to just re-export from solana_program
-- would you mind making that change too?
Also, I imagine this needs to be backported to 1.17, correct?
#[deprecated( | ||
since = "1.17.0", | ||
note = "Please use `solana_program::address_lookup_table` instead" | ||
)] |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
Thanks for the review!
Yes, all releases since |
Backports to the beta branch are to be avoided unless absolutely necessary for fixing bugs, security issues, and perf regressions. Changes intended for backport should be structured such that a minimum effective diff can be committed separately from any refactoring, plumbing, cleanup, etc that are not strictly necessary to achieve the goal. Any of the latter should go only into master and ride the normal stabilization schedule. Exceptions include CI/metrics changes, CLI improvements and documentation updates on a case by case basis. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking care of this, and sorry for the breakage!
* Add checks to decide which SDK crate to use * Make module only available in non-program environments * Remove `solana-sdk` export and only export from `solana-program` (cherry picked from commit 46921b3)
…t of #34353) (#34357) Fix `solana-address-lookup-table-program` compilation (#34353) * Add checks to decide which SDK crate to use * Make module only available in non-program environments * Remove `solana-sdk` export and only export from `solana-program` (cherry picked from commit 46921b3) Co-authored-by: acheron <98934430+acheroncrypto@users.noreply.github.com>
Problem
solana-address-lookup-table-program
crate causes compile errors in programs after #33165Problem explained in more detail in #34352
Summary of Changes
#[cfg(target_os = "solana")]
checks to decide which SDK crate to useprocessor
module only available in non-program environmentsFixes #34352