This repository was archived by the owner on Jan 22, 2025. It is now read-only.
sdk: add "everything" feature#12985
Merged
mvines merged 1 commit intosolana-labs:masterfrom Oct 20, 2020
Merged
Conversation
247659e to
fa32a1a
Compare
a685366 to
caf6a5e
Compare
Codecov Report
@@ Coverage Diff @@
## master #12985 +/- ##
=========================================
- Coverage 81.9% 81.9% -0.1%
=========================================
Files 361 361
Lines 85272 85272
=========================================
- Hits 69890 69877 -13
- Misses 15382 15395 +13 |
mvines
commented
Oct 19, 2020
| digest = { version = "0.9.0", optional = true } | ||
|
|
||
| [target.'cfg(not(target_arch = "bpf"))'.dependencies] | ||
| curve25519-dalek = { version = "2.1.0" } |
Contributor
Author
There was a problem hiding this comment.
freebie: this fixes a compile error when using Pubkey::create_program_address() from a program when not targeting BPF
Contributor
Author
|
@jackcmay - care to give this a quick 👀? |
jackcmay
reviewed
Oct 19, 2020
| #[cfg(feature = "program")] | ||
| use crate::info; | ||
| #[cfg(not(feature = "program"))] | ||
| #[cfg(all(feature = "everything", not(feature = "program")))] |
Contributor
There was a problem hiding this comment.
Was this the underlying motivation for this change?
Contributor
Author
There was a problem hiding this comment.
Not directly. When trying to test stuff over in SPL land, the semantics of enabling "program" causing code to be removed was generating confusing errors.
mvines
commented
Oct 19, 2020
| #[cfg(not(all(feature = "program", target_arch = "bpf")))] | ||
| { | ||
| let mut hasher = Hasher::default(); | ||
| let mut hasher = crate::hash::Hasher::default(); |
Contributor
Author
jackcmay
approved these changes
Oct 19, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cargo features are intended to be additive. Once the "program" feature is added there's no way to get back to the feature set of solana-sdk that includes everything. To avoid this add an explicit "everything" feature (enabled by default).