Skip to content

fix: remove DecodeError from trait impls #79

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

therealdannzor
Copy link

@therealdannzor therealdannzor commented Apr 15, 2025

Summary

Resolves #73 and continues with similar work, in the same spirit, as the PR in solana-sdk (anza-xyz/solana-sdk#104).

The changes have been specifically targeted to the trait implementations in order to make the consumption of the crate easier.

Motivation

Unless DecodeError has a particular use-case that I've missed to appreciate, this satisfies the much stricter trait solver introduced in Rust 1.84.0, and helps when implementing error traits.

As it stands now, the issue above is a blocker for upgrading to more recent Solana crates in aggregate, i.e. having dependencies which in turn imports other crates, where spl-pod is a common denominator in the dependency forest.

Note

DecodeError is still left (and used) as a dependency due to necessary for the (current) PrintProgramError and in the macro impls, together with the unit tests. Removing it entirely, like in the PR above, requires further work with adjusting the dependency tree.

This should not be breaking, rather the opposite, in allowing newer Rust compilers to interact with the crate (directly or in-directly), and not hit the error as referenced in the issue above.

@therealdannzor
Copy link
Author

Tagging some maintainers and usual suspects, hopefully not too intrusive ping 🥹

cc @2501babe @joncinque @kevinheavey @febo

therealdannzor added a commit to Blueprint-Finance/solana-program-libraries that referenced this pull request Apr 16, 2025
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.

[pod] unable to compile with other newer dependencies
1 participant