Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

instruction-padding: Remove solana-program dependency #7436

Merged
merged 2 commits into from
Nov 1, 2024

Conversation

joncinque
Copy link
Contributor

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!

#### 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.
@joncinque joncinque requested a review from buffalojoec November 1, 2024 00:54
buffalojoec
buffalojoec previously approved these changes Nov 1, 2024
Copy link
Contributor

@buffalojoec buffalojoec left a 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;
Copy link
Contributor

Choose a reason for hiding this comment

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

Breaking change, right?

Copy link
Contributor Author

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

Copy link
Contributor

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?

Copy link
Contributor Author

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

Comment on lines +14 to +23
#[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
);
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice!

@mergify mergify bot dismissed buffalojoec’s stale review November 1, 2024 10:52

Pull request has been modified.

@joncinque joncinque merged commit 9b3076f into solana-labs:master Nov 1, 2024
7 checks passed
@joncinque joncinque deleted the nosppad branch November 1, 2024 11:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants