-
Notifications
You must be signed in to change notification settings - Fork 696
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deprecation info support in RuntimeMetadataIR (#4851)
### Description: * Adds `DeprecationStatusIR` enum to sp_metadata_ir. Deprecation info for simple items. * Adds `DeprecationInfoIR` enum to sp_metadata_ir. It is a deprecation info for an enums/errors/calls. Contains `DeprecationStatusIR`. Denotes full/partial deprecation of the type or its variants/calls * Adds `deprecation_info` field to - `RuntimeApiMetadataIR` - `RuntimeApiMethodMetadataIR` - `StorageEntryMetadataIR` - `PalletConstantMetadataIR` - `PalletCallMetadataIR` - `PalletMetadataIR` - `PalletEventMetadataIR` - `PalletErrorMetadataIR` ### Testing done: - Unit tests to check whether or not correct `note`/`since` texts are getting propagated to the metadata structs. - UI test to check for error message in case of incorrect attribute usage. There's also some test updates to make sure that deprecation attributes are getting propagated to the relevant structs. see: #4098, Solution: A ### Examples of produced deprecation info metadata They can be found in: - Tests for `frame-support` - hackmd link https://hackmd.io/@Zett98/Bys0YgbcR --------- Co-authored-by: GitHub Action <[email protected]> Co-authored-by: command-bot <> Co-authored-by: Bastian Köcher <[email protected]>
- Loading branch information
1 parent
8f6699b
commit ec9a734
Showing
44 changed files
with
1,319 additions
and
207 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Schema: Polkadot SDK PRDoc Schema (prdoc) v1.0.0 | ||
# See doc at https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/prdoc/schema_user.json | ||
|
||
title: Add support for deprecation metadata in `RuntimeMetadataIr` entries. | ||
|
||
doc: | ||
- audience: | ||
- Runtime dev | ||
- Runtime user | ||
description: | | ||
Changes introduced are listed below. | ||
Adds `DeprecationStatusIR` enum to sp_metadata_ir. | ||
- Is a deprecation info for simple items. | ||
Adds `DeprecationInfoIR` enum to sp_metadata_ir. | ||
- It is a deprecation info for an enums/errors/calls. Contains `DeprecationStatusIR`. | ||
Also denotes full/partial deprecation of the type or its variants/calls. | ||
Adds `deprecation_info` field to | ||
- `RuntimeApiMetadataIR` | ||
- `RuntimeApiMethodMetadataIR` | ||
- `StorageEntryMetadataIR` | ||
- `PalletConstantMetadataIR` | ||
- `PalletCallMetadataIR` | ||
- `PalletMetadataIR` | ||
- `PalletEventMetadataIR` | ||
- `PalletErrorMetadataIR` | ||
Examples of the deprecation info produced can be seen inside | ||
- Tests for `frame-support` | ||
- hackmd link https://hackmd.io/@Zett98/Bys0YgbcR | ||
|
||
crates: | ||
- name: frame-support-procedural | ||
bump: patch | ||
- name: frame-support | ||
bump: major | ||
- name: sp-api-proc-macro | ||
bump: patch | ||
- name: sp-api | ||
bump: patch | ||
- name: sp-metadata-ir | ||
bump: major |
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
Oops, something went wrong.