Skip to content

Alias to new solana-zero-copy types#194

Merged
grod220 merged 2 commits intomainfrom
spl-pod-alias
Apr 2, 2026
Merged

Alias to new solana-zero-copy types#194
grod220 merged 2 commits intomainfrom
spl-pod-alias

Conversation

@grod220
Copy link
Copy Markdown
Member

@grod220 grod220 commented Mar 31, 2026

With the creation of solana-zero-copy, spl-pod is effectively deprecated. This PR is attempting to ease the transition for consumers by aliasing the primitives to the new zero copy types.

Patch release to proceed this PR.

Comment on lines +178 to +180
where
L: PodLength,
PodSliceError: From<<L as TryFrom<usize>>::Error>,
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

init needs the where to preserve the old length-conversion behavior

Comment on lines +57 to +59
where
<L as TryFrom<usize>>::Error: std::fmt::Debug,
{
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Test helper has to spell out Debug now because unwrap() can no longer assume the conversion error is the old concrete type

Comment on lines +23 to +26
spl-discriminator = { version = "0.5.1", path = "../discriminator" }
spl-list-view = { version = "0.1.0", path = "../list-view" }
spl-pod = { version = "0.7.2", path = "../pod" }
spl-type-length-value = { version = "0.9.0", path = "../type-length-value" }
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Reverts #192 (comment)

@grod220 grod220 requested review from febo and joncinque March 31, 2026 17:02
Copy link
Copy Markdown
Contributor

@joncinque joncinque left a comment

Choose a reason for hiding this comment

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

Looks great!

Comment on lines +12 to +13
// Re-export the conversion macro (replaces the old #[macro_export] definition)
pub use solana_zero_copy::impl_int_conversion;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why did we export that macro 😅

@grod220 grod220 merged commit 607a4d2 into main Apr 2, 2026
51 checks passed
@grod220 grod220 deleted the spl-pod-alias branch April 2, 2026 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants