-
Notifications
You must be signed in to change notification settings - Fork 2.6k
[FRAME/Meta/PM] "experimental" FRAME
features
#14345
Comments
|
unstable doesn’t means insecure right? if that’s the case, why do we need warnings? you need to implicitly import from unstable module to use it and I think that’s enough |
I think it's more like "could change at any time" Maybe the word "experimental" would be better |
How should this work for things that require changes to any IMO, as annoying as features can be, they are probably the best way forward. |
Yeah I agree that unless this is only occurring within pallets, in which case we have outer macro pattern powers and can make up a syntax, something like a feature is unfortunately our best bet. If we're doing features, IMO an easy albeit backwards way to do this is to mark all the experimental things as deprecated, with a deprecation message saying they are experimental, but if the So to opt in to using something experimental, you simply enable the experimental feature and now you won't get deprecation warnings on any of those things. A simpler approach ofc is to just only emit those things if the experimental feature is present, but doing it this way might aid easier discovery of experimental features while they are still being worked on, which is something that I think we want |
Please don't abuse deprecation message. Only mark deprecated features deprecated. |
Independently of whether we go for the features or the modules solution, this is a very good point and it would simplify things. I guess it was meant read explicitly import, in this or in the features case the developer is already aware of the
+1 on this one, it sounds less scary |
Having thought about this a bit, I am leaning toward backing using a feature flag for this. |
Yes, me too, I think it's the best way to go. |
And consensus seems to be we call it "experimental" instead of "unstable" |
FRAME
featuresFRAME
features
So its settled then; we use an We could use #14311 as an example to try it out. |
FRAME
featuresFRAME
features
I believe we need to update the Substrate CI to run experimental tests? It seems that the test CI is configured outside of this repo, what's the way to go about tweaking that? |
No, the CI is configured in here: https://github.com/paritytech/substrate/blob/master/scripts/ci/gitlab/pipeline/test.yml There you will need to change/add a new job. |
@juangirini @ggwpez @paritytech/frame-coders any reason to not close this? |
Yea it should be good. There were some follow up discussions on how to separate feature-gates and modules, but we can reopen it then. |
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:
frame_unstable(id)
or similar and a matchingallow_unstable(id)
whereID
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#62398try-runtime
andruntime-benchmarks
though.frame_support::unstable
module, that export all unstable types. Or in the future justframe::unstable
. The unstable features should not be accessible through another path. We can do this inframe_support
since the modules can be madepub(super)
, such that theunstable
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:
unstable
module. For example we could use that for the VersionedRuntimeUpgrade or theMulti Block Migrations
.cc @kianenigma @sam0x17 @juangirini
The text was updated successfully, but these errors were encountered: