Proposal: Subdivide “Experimental” Status #45900
Replies: 8 comments 22 replies
-
I'm not a fan of introducing the additional complexity here. I don't believe it's going to add any actual value for users or make anything easier overall. |
Beta Was this translation helpful? Give feedback.
-
Anything that we don't backport makes the overall maintenance of LTS lines very difficult, because conflicts accumulate quickly. |
Beta Was this translation helpful? Give feedback.
-
I'll also comment that if we removed |
Beta Was this translation helpful? Give feedback.
-
I’m curious what clarification you have in mind. More detail in the docs of the relative statuses of experimental features? More clarity on when a feature advances from one stage of experimental to another, or to stable? Several people have noted the concern about this process slowing the pace of development. Which I feel like could only mean that there are teams that aren’t following this process, for example by adding experimental features without flags or warnings. I can’t think of anything I’ve worked on in modules or loaders that hasn’t followed the process in this proposal, so for me there’s no additional work; even the within-experimental transitions like dropping flags or dropping warnings are noted in the docs, so it’s not like there’s even an additional documentation burden. So this raises a few questions:
I think it helps to point to real-world examples. |
Beta Was this translation helpful? Give feedback.
-
I like the idea of having more specific stages of the experimental status, but I am not a fan of mandating warnings or flags as the ways to communicate this:
I think flags and warnings should be added on a case-by-case basis, and not tied to the experimentation. Making them part of the experimentation process can create problems of their own, and they don't make that big of a difference in solving the experimentation dilemma for the reasons above. |
Beta Was this translation helpful? Give feedback.
-
About the stage names: can we use more readable names than Alpha and Beta? e.g. |
Beta Was this translation helpful? Give feedback.
-
Per TSC meeting today, the next steps on this:
Once the above is complete, this would become the process for new experimental features going forward, that would be considered the “default” process unless we decide to grant exceptions on a case-by-case basis. |
Beta Was this translation helpful? Give feedback.
-
I did a survey of modules features added since 12.0.0 (when we merged in the new ESM implementation) and what their trajectories looked like. This was compiled from our docs and a few searches of PRs, so could be incomplete; we also haven’t been good about documenting warnings (whether added or dropped) so I don’t have that data.
So of all the new features that I could find, it seems like only the I think this starts to suggest a few guidelines: flags are important for core/vital APIs, like modules; and improvements can be small enough to not need to go through an experimental process at all. I also don’t think that all these flags contributed to any reduced velocity for modules development. If anything I think they accelerated it, as we would have been too nervous to land many of these features without flags. |
Beta Was this translation helpful? Give feedback.
-
Building off of the discussion in #45711, I think we should split “experimental” status into a few distinct levels to reflect how we actually behave in practice:
Experimental: Alpha. Early stage features that may be incomplete and subject to substantial change. Both a build flag and a runtime flag are required to enable and a warning is printed. Not all new experimental features need to start as alpha; this is only for unfinished work that isn’t yet ready for end users to test, but for which we want to land PRs iteratively.
Experimental: Beta. Features that are complete enough for MVP for potential stability, with only minor changes expected. A runtime flag is required to enable and a warning is printed.
Experimental: Release Candidate. Features that we think are ready to become stable, that we want to allow time to “bake”; only bugfixes are expected. No flags are necessary to enable but a warning is printed.
What problems this solves:
Currently what would be considered “alpha” or unfinished features are very difficult or impossible to land in reasonably sized PRs. Such features either never land at all or need to gestate somewhere else such as in a
node
fork (for the case ofexperimental-modules
) or as a library (such asundici
forfetch
). This high barrier to entry discourages contributions.Because we have no gating requirements around experimental features currently, experimental features that land without enabling flags run the risk of becoming popular and entrenched before we’re ready for them to be such; and then these unfinished features become difficult to remove or ship breaking changes for. The classic example of this is
async_hooks.createHooks
, the focus of Async hooks and CommonJS loaders #45711. By requiring flags at early stages of development, we ensure some level of maturity before features can become popular.Because all experimental features are presented as having the same level of stability in our docs, we don’t get as much real-world testing from users for nearly-stable experimental features. Many users presumably ignore all experimental features, rather than draw inferences from whether flags are required or not; but there likely exists some subset of users out there willing to use both stable and “release candidate” features, who could help us shore up nearly-stable features during their “baking” phase.
If a warning can’t be removed before a feature graduates to “stable,” contributors have an incentive to actually finish their features rather than letting them languish as experimental forever.
What this would mean in practice is that any new experimental features would use the rubric above to decide whether to initially land as alpha or beta with appropriate flags; and we would need to review all existing experimental features and and classify them and update the docs accordingly. I think just about all existing experimental features would be classified as “beta” (the ones that require a flag) or “release candidate” (the ones that don’t require a flag). I can’t think of any current experimental features that we would classify as “alpha;”
async_hooks.createHooks
is a special case in that it lacks flags or warnings but isn’t “release candidate” and never will be. We would have to decide case-by-case for other exceptions whether a flag or warning should be added.Beta Was this translation helpful? Give feedback.
All reactions