-
Notifications
You must be signed in to change notification settings - Fork 2.3k
instruction-padding: Remove solana-program dependency #7436
Conversation
#### Problem The instruction-padding program still has an explicit dependency on solana-program, but it isn't needed. #### Summary of changes Use the component crates instead. Some of the syscall consts aren't available yet outside of solana-program, but it was easy to add a static assertion for those.
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.
⚡️ ⚡️
@@ -2,5 +2,4 @@ mod entrypoint; | |||
pub mod instruction; | |||
pub mod processor; | |||
|
|||
pub use solana_program; |
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.
Breaking change, right?
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.
Ah oops! I thought I pushed up the latest change, which re-exports the new solana crates. But yes, this is otherwise breaking
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 guess if it's a breaking change anyway, do we want to still have the re-exports? Or should we just do away with them?
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.
It can't hurt in case someone needs to access it
#[cfg(test)] | ||
static_assertions::const_assert_eq!( | ||
MAX_CPI_ACCOUNT_INFOS, | ||
solana_program::syscalls::MAX_CPI_ACCOUNT_INFOS | ||
); | ||
#[cfg(test)] | ||
static_assertions::const_assert_eq!( | ||
MAX_CPI_INSTRUCTION_DATA_LEN, | ||
solana_program::syscalls::MAX_CPI_INSTRUCTION_DATA_LEN | ||
); |
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.
Nice!
Pull request has been modified.
Problem
The instruction-padding program still has an explicit dependency on solana-program, but it isn't needed.
Summary of changes
Use the component crates instead. Some of the syscall consts aren't available yet outside of solana-program, but it was easy to add a static assertion for those.
The program build is lightning fast with this!