Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

[FRAME/Meta/PM] "experimental" FRAME features #14345

Closed
@ggwpez

Description

@ggwpez

Analogous to the deprecation process it would be nice to have an on-ramp for new features in FRAME.
This could be used to introduce new feature in a non-semver way, so that we can start integrating them before stabilizing the design.
I think it could increase our development velocity since we can iterate quicker on features without having to worry too much of breaking downstream. Currently I often try to keep breaking changes to a minimum - even when a feature is not used outside of Parity yet…

Possible implementations

There were some internal discussions about how to achieve this. Some ideas:

  • A) Some attribute macro like frame_unstable(id) or similar and a matching allow_unstable(id) where ID is the identifier of the issue, similar to rust nightly features. This would be the more fine-grained and elegant solution - although not sure how achievable without something like allow(deprecated) is too coarse-grained, should take a path rust-lang/rust#62398
  • B) Rust compiler features where we have one feature that guards all unstable features. This would need to be propagated to all dependencies… we already have enough problems just from try-runtime and runtime-benchmarks though.
  • C) Simplest would be to have a frame_support::unstable module, that export all unstable types. Or in the future just frame::unstable. The unstable features should not be accessible through another path. We can do this in frame_support since the modules can be made pub(super), such that the unstable module can export them.

Inside of pallets we have more control and could opt for a better DevEx. For example with the upcoming Task API we could mark that as unstable and emit a warning that can be silenced through pallet(unstable) or something.

Process

Without making this too cooperate-style bureaucratic I think we should still have some kind of process. For example:

  1. Put new non-trivial traits and types, where future changes are expected, into the unstable module. For example we could use that for the VersionedRuntimeUpgrade or the Multi Block Migrations.
  2. Start integrating the feature to discover sharp edges and improvements.
  3. Set a deadline for further changes and move it out to the normal FRAME crates afterwards.
  4. Maybe announce the feature somehow.

cc @kianenigma @sam0x17 @juangirini

Metadata

Metadata

Assignees

No one assigned

    Labels

    J1-metaA specific issue for grouping tasks or bugs of a specific category.T1-runtimeThis PR/Issue is related to the topic “runtime”.

    Type

    No type

    Projects

    Status

    Done

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions