This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Soft deprecate GenesisConfig #14210
Merged
paritytech-processbot
merged 11 commits into
master
from
jg/14065-deprecation-genesisconfig-runtimegenesisconfig
May 26, 2023
Merged
Soft deprecate GenesisConfig #14210
Changes from 1 commit
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
55632cf
soft deprecate genesisconfig
juangirini 0f37486
temporarily add a deprecation attr
juangirini 4488bbb
update tests
juangirini b104a25
update mocks
juangirini ed48623
update genesis config
juangirini b88e71b
update genesis config
juangirini 5d39b42
update genesis config
juangirini 8746719
update genesis config
juangirini 41696e8
Merge remote-tracking branch 'origin/master' into jg/14065-deprecatio…
8121a6f
remove deprecation warning
juangirini 07105ca
update deprecation comment
juangirini File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,12 +74,18 @@ pub fn expand_outer_config( | |
#[serde(rename_all = "camelCase")] | ||
#[serde(deny_unknown_fields)] | ||
#[serde(crate = "__genesis_config_serde_import__")] | ||
pub struct GenesisConfig { | ||
pub struct RuntimeGenesisConfig { | ||
#fields | ||
} | ||
|
||
// TODO [#14065] | ||
// - deprecate it | ||
// - later, remove it | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Personally I think it would be cleaner to not put TODO or deprecation steps in the code comment itself, and just list them in the issue. The code comment could say something like "GenesisConfig is in the process of being deprecated [issue link]" |
||
#[cfg(any(feature = "std", test))] | ||
impl #scrate::sp_runtime::BuildStorage for GenesisConfig { | ||
pub type GenesisConfig = RuntimeGenesisConfig; | ||
|
||
#[cfg(any(feature = "std", test))] | ||
impl #scrate::sp_runtime::BuildStorage for RuntimeGenesisConfig { | ||
fn assimilate_storage( | ||
&self, | ||
storage: &mut #scrate::sp_runtime::Storage, | ||
|
This file contains 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
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.
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.
Could you maybe temporarily put a deprecation here, to see that the CI stays green and we got all cases?
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.
Sure, that's what I did locally. Let's double check with the CI, I will remove it after being confirmed
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.
@ggwpez all green now with the deprecation attribute in place, except for the Cumulus and Polkadot companions of course, as they are throwing the deprecation warning.
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.
Yes you can do them lean without companion (since that is annoying).