Rework docs for Pubkey::find_program_address and friends#21528
Rework docs for Pubkey::find_program_address and friends#21528mergify[bot] merged 5 commits intosolana-labs:masterfrom
Conversation
|
CI doesn't like the circular dependency. I'll remove it. |
|
Circular dependency removed at the expense of ignoring an example. |
|
CI failure looks unrelated |
CriesofCarrots
left a comment
There was a problem hiding this comment.
This looks great to me, and your verbiage seems correct. I'll ask @jackcmay to take a pass also.
A few nits, most of which are on text predating your changes, if you would be so kind? (I know commas are the nittiest of nits, but I only included spots I actually got hung up)
jackcmay
left a comment
There was a problem hiding this comment.
lgtm after @CriesofCarrots suggestions, thanks!
Codecov Report
@@ Coverage Diff @@
## master #21528 +/- ##
=========================================
+ Coverage 81.4% 81.6% +0.1%
=========================================
Files 540 505 -35
Lines 143840 141768 -2072
Branches 296 0 -296
=========================================
- Hits 117162 115685 -1477
+ Misses 26577 26083 -494
+ Partials 101 0 -101 |
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
Pull request has been modified.
|
@CriesofCarrots applied your suggestions, alphabetized the dev-dependencies, and fixed a bogus commit message. |
|
CI failure looks unrelated. |
* Rework docs for Pubkey::find_program_address and friends * Remove circular dependency * Minor tweaks * Apply suggestions from code review Co-authored-by: Tyera Eulberg <teulberg@gmail.com> * Sort solana-program dev-dependencies Co-authored-by: Tyera Eulberg <teulberg@gmail.com> (cherry picked from commit d1c101c)
…1637) * Rework docs for Pubkey::find_program_address and friends * Remove circular dependency * Minor tweaks * Apply suggestions from code review Co-authored-by: Tyera Eulberg <teulberg@gmail.com> * Sort solana-program dev-dependencies Co-authored-by: Tyera Eulberg <teulberg@gmail.com> (cherry picked from commit d1c101c) Co-authored-by: Brian Anderson <andersrb@gmail.com>
|
why it says this for create_program_address: |
I was not aware of this use of create_program_address. Thanks for informing me. I'll produce a follow up patch. |
Problem
This is a crucial function to understand, but learning how to use it correctly took me a long time.
Summary of Changes
This adds anyhow and solana-sdk as dev-dependencies to solana-program. The solana-sdk is a weird semi-circular dependency but it works because compiling for tests results in a technically different crate than normal compilation.
Please read these carefully for accuracy, particularly this passage:
As well as any instances of language like "commonly", "typically", "conventionally", etc.