-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Experimental Flags
When working on new features, it is common to control the availability of the feature through a flag. These features are turned off by default during the development cycle and enabled by default after there is sufficient signal that the feature is ready.
Once there is a decision to enable the flag by default in a release, we need to retire the flag.
Flags should be retired once they have been in stable for a full release cycle (~3 months) and have not caused a significant amount of issues.
- Feature is developed and hidden behind a flag in beta 1 of version n.
- Feature flag is enabled by default in beta 1 of version n+1.
- Feature flag is retired in beta 1 of version n+2.
Example:
The Dart community has been working on implementing telepathic code generation to be released in Dart 6.2. Users of the Dart 6.1 beta can try this experimental feature using the
--enable-experiment=telepathy
flag. The feature seems to be stable and successful. In dart 6.2 the feature is no longer behind an experimental flag and is enabled by default. The team now cleans up the experimental flag tests and removes the flag before launching Dart 6.3.
- Clean up tests that use experimental flags.
- Ensure non-test code does not rely on experimental flags.
- Verify that tests in
/pkg/*
directory do not rely on experimental flags. - Set
expired: true
intools/experimental_features.yaml
under the experimental flag entry. - Run the
update scripts
. - Alert the EngProd team of work completion.
- EngProd team increments the SDK version.
Important
The wiki has moved to https://github.com/dart-lang/sdk/tree/main/docs; please don't edit the pages here.