Skip to content
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

Frame Metadata Deprecation: Refactor enum a bit #4994

Merged

Conversation

pkhry
Copy link
Contributor

@pkhry pkhry commented Jul 10, 2024

Description

This is PR following a suggestion from previous PR to refactor some definitions.

Could we group the deprecation infos? Some initial idea would be:

enum DeprecationMetadataIr {
    Fully(DeprecationStatusIr),
    Partially(BTreeMap<usize, DeprecationStatusIr<T>>),
}

I would also rename the DeprecationStatus to DeprecationStatusIR sometime, since we'll need to convert this to a frame_metadata::DeprecationStatus

see link

depends on #4948

@pkhry pkhry added R0-silent Changes should not be mentioned in any release notes I5-enhancement An additional feature request. D1-medium Can be fixed by a coder with good Rust knowledge but little knowledge of the codebase. labels Jul 10, 2024
@pkhry pkhry requested a review from lexnv July 10, 2024 15:02
@pkhry pkhry requested a review from a team as a code owner July 10, 2024 15:02
Comment on lines 505 to 507
/// Entry is partially deprecated.
/// For Errors and Events this means that only some of the variants are deprecated
/// For Calls oncly certain call indexes are deprecated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: only

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Copy link
Contributor

@lexnv lexnv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

substrate/frame/support/procedural/src/deprecation.rs Outdated Show resolved Hide resolved
@github-actions github-actions bot requested a review from lexnv July 23, 2024 14:27
Copy link
Contributor

Review required! Latest push from author must always be reviewed

@pkhry pkhry merged commit 4fe6fbf into pkhry/frame_s_deprecation_types Jul 23, 2024
49 of 91 checks passed
@pkhry pkhry deleted the pkhry/frame_metadata_refactor_enum branch July 23, 2024 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
D1-medium Can be fixed by a coder with good Rust knowledge but little knowledge of the codebase. I5-enhancement An additional feature request. R0-silent Changes should not be mentioned in any release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants