-
Notifications
You must be signed in to change notification settings - Fork 65
remove solana-program from program/src #26
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
remove solana-program from program/src #26
Conversation
|
Ok, tests should pass now as I've switched to an updated fork of mollusk |
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 good to me, just the question about whether we should break the re-exports
| /// Export current sdk types for downstream users building with a different sdk | ||
| /// version | ||
| pub mod solana_program { | ||
| #![allow(missing_docs)] | ||
| pub mod entrypoint { | ||
| pub use solana_program_error::ProgramResult; | ||
| } | ||
| pub mod instruction { | ||
| pub use solana_instruction::{AccountMeta, Instruction}; | ||
| } | ||
| pub mod program_error { | ||
| pub use solana_program_error::{PrintProgramError, ProgramError}; | ||
| } | ||
| pub mod program_option { | ||
| pub use solana_program_option::COption; | ||
| } | ||
| pub mod program_pack { | ||
| pub use solana_program_pack::{IsInitialized, Pack, Sealed}; | ||
| } | ||
| pub mod pubkey { | ||
| pub use solana_pubkey::{Pubkey, PUBKEY_BYTES}; | ||
| } | ||
| } |
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.
Do you think this is needed? With the crates now split up and following semver, I hope that we can stop doing these re-exports in program crates generally.
We can do a new major version for spl-token no problem.
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 would still like to break fewer things in a major release. This way hopefully very few people will need to change code
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.
Fair enough! We can revisit then
#### Problem The token-2022 program still uses solana-program and solana-sdk, which are heavy dependencies. #### Summary of changes The component crates exist to do everything needed in token-2022, so we can remove solana-program usage entirely. NOTE: since some spl-token-2022's dependencies still use solana-program, there is no huge gain just yet. That will happen when we upgrade the upstream dependencies and then upgrade token-2022 to use those. Also NOTE: this is a breaking change since we've removed the re-export of the sdk types. Considering we're now respecting semver, this shouldn't be a problem, but we did add a version of re-exports in solana-program/token#26, so maybe we should do the same thing here. Let me know!
* program: Remove solana-program / sdk #### Problem The token-2022 program still uses solana-program and solana-sdk, which are heavy dependencies. #### Summary of changes The component crates exist to do everything needed in token-2022, so we can remove solana-program usage entirely. NOTE: since some spl-token-2022's dependencies still use solana-program, there is no huge gain just yet. That will happen when we upgrade the upstream dependencies and then upgrade token-2022 to use those. Also NOTE: this is a breaking change since we've removed the re-export of the sdk types. Considering we're now respecting semver, this shouldn't be a problem, but we did add a version of re-exports in solana-program/token#26, so maybe we should do the same thing here. Let me know! * Fixup tests to run program in bpf mode
This is a draft PR for now as it needs a mollusk updateReady for reviewOne breaking change: the re-export of solana-program is replaced by a re-export of a few types. Hopefully for most users the re-export works as before