-
Notifications
You must be signed in to change notification settings - Fork 675
Extract solana-nonce crate #3082
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
Conversation
9a7fac8
to
5951285
Compare
77d3e88
to
7dd9377
Compare
24f67a7
to
aa15407
Compare
b9b4d8d
to
43c4f26
Compare
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.
The change looks good as is, while we're here, I'd like to do a little reorg for these files, since I always get lost in them. Could you:
- rename
state/mod.rs
toversions.rs
, remove the re-export from current - rename
state/current.rs
tostate.rs
This makes some of the re-exports in solana-program a little gnarly, but I hope it'll be clearer at the base crate level. I believe we'll need to:
- re-export solana_nonce::state::State in nonce/mod.rs
- re-export
solana_nonce::versions::*
andsolana_nonce::state as current
in nonce/state/mod.rs - remove nonce/state/current.rs
Or if it's too annoying, I can push those changes to your branch. Let me know!
061550c
to
c921891
Compare
Backports to the beta branch are to be avoided unless absolutely necessary for fixing bugs, security issues, and perf regressions. Changes intended for backport should be structured such that a minimum effective diff can be committed separately from any refactoring, plumbing, cleanup, etc that are not strictly necessary to achieve the goal. Any of the latter should go only into master and ride the normal stabilization schedule. Exceptions include CI/metrics changes, CLI improvements and documentation updates on a case by case basis. |
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! @yihau, please accept ownership of solana-nonce
once it's passed
* extract solana-nonce crate * activate solana-nonce/serde in solana-program * update lock file * post-rebase fixes * add docsrs metadata Co-authored-by: Jon C <me@jonc.dev> * add doc_auto_cfg * reorganise modules --------- Co-authored-by: Jon C <me@jonc.dev> (cherry picked from commit 1cde3d5) # Conflicts: # Cargo.toml
is this not missing deprecation warnings for the old locations? |
Nice catch! Yeah we can add them. Since the deprecation warnings on re-exports don't actually do anything, it's not a big deal if they're missing. It's like forgetting comments. |
It might be the case that clippy will actually start complaining about having them. 😅 |
yeah i've been thinking that we've been doing this backwards. we should be deprecating the symbols in their original location, then allowing deprecated on the new location/reexport. when we remove the deprecated code, that's when we actually move the symbols. |
Wouldn't that mean we'd be stuck with solana-program as a dependency everywhere until 3.0? |
* extract solana-nonce crate * activate solana-nonce/serde in solana-program * update lock file * post-rebase fixes * add docsrs metadata Co-authored-by: Jon C <me@jonc.dev> * add doc_auto_cfg * reorganise modules --------- Co-authored-by: Jon C <me@jonc.dev>
Problem
solana_program::nonce
imposes asolana_program
dependency onsolana_svm
Summary of Changes
This branches off #2969 so that needs to be merged first