-
Notifications
You must be signed in to change notification settings - Fork 160
frozen-abi: add re-exports / patch to support rust edition 2021/2024 #466
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
frozen-abi: add re-exports / patch to support rust edition 2021/2024 #466
Conversation
… changed api) - make default implementation of random in StableAbi trait, compatible with rust edition 2024 - add re-exports to rand, rand_chacha and bincode (narrows StableAbi strict versions)
|
Hey @joncinque, sorry to come back with another PR on this, but i missed one detail when working on #443.. the fact that agave was in the middle of migrating to a different In the previous PR I assumed that consumer crates would keep using compatible versions of Im really sorry, but could i please you to have a look again? 🙏 this small patch resolved issue in the solana-sdk and agave examples linked in the PR description. |
09faf62 to
8f5b4c9
Compare
8f5b4c9 to
026aefc
Compare
alexpyattaev
left a comment
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.
Generally LGTM, but I think it would be prudent to add rust 2024 compat lints to frozen-abi to ensure we are not missing anything.
alexpyattaev
left a comment
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.
LGTM.
joncinque
left a comment
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.
Looks great, thanks! It might be easier to just bump rand in this repo too, but we can do that separately
|
Thank you guys 🙏 |
Problem
Using
StableAbirequired consumer crates to depend directly onrand,rand_chacha, andbincode, which made ABI digests sensitive to the exact versions used in each crate.In addition, the use of
rng.gen()conflicted with thegenkeyword in Rust 2024 edition to which agave is currently migrating, preventingStableAbifrom being used in edition 2024 crates.Related to anza-xyz/agave#8091
Summary of changes
frozen-abifor all crates on whichStableAbidependsfrozen-abi-macroto reference these re-exportsrng.r#gen()in theStableAbitrait to enable usage in crates 2021/2024 editionExample
solana-sdk/account
solana-sdk/transaction
solana-sdk/vote-interface
agave/accounts-db
agave/votor-messages