sdk!: Remove program feature#249
Conversation
#### Problem The `program` feature has existed since v1.3 so that people can use solana-sdk in on-chain programs. `cargo-build-sbf` even had a special case where it would enable the `program` feature when building solana-sdk, but it was removed in anza-xyz/agave#5870. This means that our current build-sbf script fails when using v2.3 of the tools. #### Summary of changes Remove the `program` feature from the sdk, and fix the build-sbf script to exclude the sdk, and then try to build without default features. Rather than adding more excludes, I also changes the build-sbf script to use `cargo hack`, which is a bit cleaner.
|
Well, this actually shows that it's dangerous to remove the What do you think is a better approach? |
Newer versions of Perhaps, it would be worth it to add a comment explaining that the flag is deprecated. |
That probably makes more sense, since we're essentially saying "don't use solana-sdk on-chain" by removing the "program" feature. Done! |
* sdk!: Remove `program` feature #### Problem The `program` feature has existed since v1.3 so that people can use solana-sdk in on-chain programs. `cargo-build-sbf` even had a special case where it would enable the `program` feature when building solana-sdk, but it was removed in anza-xyz/agave#5870. This means that our current build-sbf script fails when using v2.3 of the tools. #### Summary of changes Remove the `program` feature from the sdk, and fix the build-sbf script to exclude the sdk, and then try to build without default features. Rather than adding more excludes, I also changes the build-sbf script to use `cargo hack`, which is a bit cleaner. * Exclude solana-sdk
Problem
The
programfeature has existed since v1.3 so that people can use solana-sdk in on-chain programs.cargo-build-sbfeven had a special case where it would enable theprogramfeature when building solana-sdk, but it was removed in anza-xyz/agave#5870.This means that our current build-sbf script fails when using v2.3 of the tools.
Summary of changes
Remove the
programfeature from the sdk, and fix the build-sbf script to exclude the sdk, and then try to build without default features.Rather than adding more excludes, I also changes the build-sbf script to use
cargo hack, which is a bit cleaner.