-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add deprecation checklist document for Substrate #1583
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
Changes from 4 commits
20c84cb
01bdc53
46a7f52
2e38826
00f4fc4
93bbecc
c477bea
752209b
1a1b74f
94f200a
b01bed7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,62 @@ | ||||||
| # Deprecation Process | ||||||
|
|
||||||
| This deprecation process makes sense while we don’t use [SemVer](https://semver.org/). | ||||||
| After that, this process will most likely change. | ||||||
| As deprecation and removal of existing features can happen on any release, we need to be mindful that external builders could be impacted by the changes we make. | ||||||
| The deprecation process tries to mitigate this impact, while still keeping the developer experience, the DevEx, as smooth as possible. | ||||||
|
|
||||||
| First of all we, need to create a new issue with the label `I11-deprecation` and add it to the [Runtime / FRAME](https://github.com/orgs/paritytech/projects/40) project. This will make sure that the issue is added to the [Deprecation board](https://github.com/orgs/paritytech/projects/40/views/12) for correct tracking. | ||||||
|
|
||||||
| These are the actions to take: | ||||||
|
|
||||||
| ### Hard deprecate by adding a warning message | ||||||
|
Contributor
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.
Suggested change
|
||||||
|
|
||||||
| The warning message should include a removal month and year, which is suggested to be 6 months after the deprecation notice is released. | ||||||
|
juangirini marked this conversation as resolved.
Outdated
|
||||||
| This means that the feature will be removed in a release within that month (or after, but never before). Something along these lines: | ||||||
|
|
||||||
| ```rust | ||||||
| #[deprecated(note = "`GenesisConfig` is planned to be removed in December 2023. | ||||||
| Use `RuntimeGenesisConfig` instead.")] | ||||||
|
|
||||||
| ``` | ||||||
|
|
||||||
| Some features cannot be labeled as deprecated, like [reexports](https://github.com/rust-lang/rust/issues/30827) or [dispatchables](https://github.com/paritytech/polkadot-sdk/issues/182#issuecomment-1691684159), for instance. | ||||||
| On cases like that we can only make a visible enough comment, and make sure that we [announce the deprecation properly](#announce-the-deprecation-and-removal). | ||||||
|
juangirini marked this conversation as resolved.
Outdated
|
||||||
|
|
||||||
| ### Remove usage of the deprecated feature in the code base | ||||||
|
Contributor
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. I'd probably use |
||||||
|
|
||||||
| Just make sure that we are not using the deprecated feature ourselves. | ||||||
| If you added the deprecation warning from the previous step, this can be done by making sure that warning is not shown when building the code. | ||||||
|
|
||||||
| ### Update examples and tutorials | ||||||
|
|
||||||
| Make sure that the rust docs are updated. | ||||||
| We also want [https://docs.substrate.io/](https://docs.substrate.io/) to be updated, you can open an issue on [https://github.com/substrate-developer-hub/substrate-docs](https://github.com/substrate-developer-hub/substrate-docs). | ||||||
|
juangirini marked this conversation as resolved.
Outdated
|
||||||
|
|
||||||
| ### Announce the deprecation and removal | ||||||
|
|
||||||
| **At minimum they should be noted in the release log.** | ||||||
| Sometimes the release note is not enough. | ||||||
|
Contributor
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. do we want to say here where else this should be mentioned then?
Contributor
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. You should tie this into https://forum.parity.io/t/pr-documentation-prdoc/2065?
Contributor
Author
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.
that post isn't public, that's why I have linked to the documentation section of the CONTRIBUTING doc, which is a summary of it
Contributor
Author
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.
good point, maybe someone from devrel can help us here? @sacha-l @aaronbassett |
||||||
| Make sure you are as loud as you need to be for the magnitude of the breaking change. Some breaking changes have a bigger impact than others. | ||||||
|
|
||||||
| ### Removal version is planned | ||||||
|
|
||||||
| Depending on the removal date indicated in the deprecation warning in the [first step](#hard-deprecate-by-adding-a-warning-message), the nature and the importance of the change, it might make sense to coordinate the release with other developers and with the Release team. | ||||||
|
|
||||||
| ### Deprecated feature is removed | ||||||
|
|
||||||
| The deprecated feature finally gets removed. | ||||||
| Don’t forget to [announce this accordingly](#announce-the-deprecation-and-removal). | ||||||
|
|
||||||
| ✅ In order to not forget any of these steps, consider using this template in your deprecation issue: | ||||||
| ``` | ||||||
| ### Tasks | ||||||
|
|
||||||
| - [ ] Deprecate feature by adding a warning message | ||||||
| - [ ] Remove usage of the deprecated feature in the code base | ||||||
| - [ ] Update examples and tutorials | ||||||
| - [ ] Announce feature deprecation | ||||||
| - [ ] Plan removal version | ||||||
| - [ ] Announce feature removal | ||||||
| - [ ] Remove deprecated feature | ||||||
| ``` | ||||||
Uh oh!
There was an error while loading. Please reload this page.