Unverified Commit 4b2e8289 authored by Christopher Fujino's avatar Christopher Fujino Committed by GitHub

[flutter_tools] deprecate the dev branch from the feature system (#98689)

parent 74881c12
...@@ -79,10 +79,6 @@ const Feature flutterWebFeature = Feature( ...@@ -79,10 +79,6 @@ const Feature flutterWebFeature = Feature(
available: true, available: true,
enabledByDefault: true, enabledByDefault: true,
), ),
dev: FeatureChannelSetting(
available: true,
enabledByDefault: true,
),
beta: FeatureChannelSetting( beta: FeatureChannelSetting(
available: true, available: true,
enabledByDefault: true, enabledByDefault: true,
...@@ -102,9 +98,6 @@ const Feature flutterMacOSDesktopFeature = Feature( ...@@ -102,9 +98,6 @@ const Feature flutterMacOSDesktopFeature = Feature(
master: FeatureChannelSetting( master: FeatureChannelSetting(
available: true, available: true,
), ),
dev: FeatureChannelSetting(
available: true,
),
beta: FeatureChannelSetting( beta: FeatureChannelSetting(
available: true, available: true,
), ),
...@@ -122,9 +115,6 @@ const Feature flutterLinuxDesktopFeature = Feature( ...@@ -122,9 +115,6 @@ const Feature flutterLinuxDesktopFeature = Feature(
master: FeatureChannelSetting( master: FeatureChannelSetting(
available: true, available: true,
), ),
dev: FeatureChannelSetting(
available: true,
),
beta: FeatureChannelSetting( beta: FeatureChannelSetting(
available: true, available: true,
), ),
...@@ -142,10 +132,6 @@ const Feature flutterWindowsDesktopFeature = Feature( ...@@ -142,10 +132,6 @@ const Feature flutterWindowsDesktopFeature = Feature(
available: true, available: true,
enabledByDefault: true, enabledByDefault: true,
), ),
dev: FeatureChannelSetting(
available: true,
enabledByDefault: true,
),
beta: FeatureChannelSetting( beta: FeatureChannelSetting(
available: true, available: true,
enabledByDefault: true, enabledByDefault: true,
...@@ -164,10 +150,6 @@ const Feature flutterAndroidFeature = Feature( ...@@ -164,10 +150,6 @@ const Feature flutterAndroidFeature = Feature(
available: true, available: true,
enabledByDefault: true, enabledByDefault: true,
), ),
dev: FeatureChannelSetting(
available: true,
enabledByDefault: true,
),
beta: FeatureChannelSetting( beta: FeatureChannelSetting(
available: true, available: true,
enabledByDefault: true, enabledByDefault: true,
...@@ -187,10 +169,6 @@ const Feature flutterIOSFeature = Feature( ...@@ -187,10 +169,6 @@ const Feature flutterIOSFeature = Feature(
available: true, available: true,
enabledByDefault: true, enabledByDefault: true,
), ),
dev: FeatureChannelSetting(
available: true,
enabledByDefault: true,
),
beta: FeatureChannelSetting( beta: FeatureChannelSetting(
available: true, available: true,
enabledByDefault: true, enabledByDefault: true,
...@@ -218,9 +196,6 @@ const Feature flutterCustomDevicesFeature = Feature( ...@@ -218,9 +196,6 @@ const Feature flutterCustomDevicesFeature = Feature(
master: FeatureChannelSetting( master: FeatureChannelSetting(
available: true, available: true,
), ),
dev: FeatureChannelSetting(
available: true,
)
); );
/// The fast hot reload feature for https://github.com/flutter/flutter/issues/61407. /// The fast hot reload feature for https://github.com/flutter/flutter/issues/61407.
...@@ -232,9 +207,6 @@ const Feature singleWidgetReload = Feature( ...@@ -232,9 +207,6 @@ const Feature singleWidgetReload = Feature(
available: true, available: true,
enabledByDefault: true, enabledByDefault: true,
), ),
dev: FeatureChannelSetting(
available: true,
),
beta: FeatureChannelSetting( beta: FeatureChannelSetting(
available: true, available: true,
), ),
...@@ -247,9 +219,6 @@ const Feature windowsUwpEmbedding = Feature( ...@@ -247,9 +219,6 @@ const Feature windowsUwpEmbedding = Feature(
master: FeatureChannelSetting( master: FeatureChannelSetting(
available: true, available: true,
), ),
dev: FeatureChannelSetting(
available: true,
),
); );
/// A [Feature] is a process for conditionally enabling tool features. /// A [Feature] is a process for conditionally enabling tool features.
...@@ -268,7 +237,6 @@ class Feature { ...@@ -268,7 +237,6 @@ class Feature {
this.configSetting, this.configSetting,
this.extraHelpText, this.extraHelpText,
this.master = const FeatureChannelSetting(), this.master = const FeatureChannelSetting(),
this.dev = const FeatureChannelSetting(),
this.beta = const FeatureChannelSetting(), this.beta = const FeatureChannelSetting(),
this.stable = const FeatureChannelSetting() this.stable = const FeatureChannelSetting()
}); });
...@@ -279,9 +247,6 @@ class Feature { ...@@ -279,9 +247,6 @@ class Feature {
/// The settings for the master branch and other unknown channels. /// The settings for the master branch and other unknown channels.
final FeatureChannelSetting master; final FeatureChannelSetting master;
/// The settings for the dev branch.
final FeatureChannelSetting dev;
/// The settings for the beta branch. /// The settings for the beta branch.
final FeatureChannelSetting beta; final FeatureChannelSetting beta;
...@@ -316,7 +281,6 @@ class Feature { ...@@ -316,7 +281,6 @@ class Feature {
'This setting will take effect on '); 'This setting will take effect on ');
final List<String> channels = <String>[ final List<String> channels = <String>[
if (master.available) 'master', if (master.available) 'master',
if (dev.available) 'dev',
if (beta.available) 'beta', if (beta.available) 'beta',
if (stable.available) 'stable', if (stable.available) 'stable',
]; ];
...@@ -342,8 +306,6 @@ class Feature { ...@@ -342,8 +306,6 @@ class Feature {
return stable; return stable;
case 'beta': case 'beta':
return beta; return beta;
case 'dev':
return dev;
case 'master': case 'master':
default: default:
return master; return master;
......
...@@ -56,19 +56,16 @@ void main() { ...@@ -56,19 +56,16 @@ void main() {
testWithoutContext('retrieves the correct setting for each branch', () { testWithoutContext('retrieves the correct setting for each branch', () {
const FeatureChannelSetting masterSetting = FeatureChannelSetting(available: true); const FeatureChannelSetting masterSetting = FeatureChannelSetting(available: true);
const FeatureChannelSetting devSetting = FeatureChannelSetting(available: true);
const FeatureChannelSetting betaSetting = FeatureChannelSetting(available: true); const FeatureChannelSetting betaSetting = FeatureChannelSetting(available: true);
const FeatureChannelSetting stableSetting = FeatureChannelSetting(available: true); const FeatureChannelSetting stableSetting = FeatureChannelSetting(available: true);
const Feature feature = Feature( const Feature feature = Feature(
name: 'example', name: 'example',
master: masterSetting, master: masterSetting,
dev: devSetting,
beta: betaSetting, beta: betaSetting,
stable: stableSetting, stable: stableSetting,
); );
expect(feature.getSettingForChannel('master'), masterSetting); expect(feature.getSettingForChannel('master'), masterSetting);
expect(feature.getSettingForChannel('dev'), devSetting);
expect(feature.getSettingForChannel('beta'), betaSetting); expect(feature.getSettingForChannel('beta'), betaSetting);
expect(feature.getSettingForChannel('stable'), stableSetting); expect(feature.getSettingForChannel('stable'), stableSetting);
expect(feature.getSettingForChannel('unknown'), masterSetting); expect(feature.getSettingForChannel('unknown'), masterSetting);
...@@ -87,41 +84,40 @@ void main() { ...@@ -87,41 +84,40 @@ void main() {
testWithoutContext('Flutter web help string', () { testWithoutContext('Flutter web help string', () {
expect(flutterWebFeature.generateHelpMessage(), expect(flutterWebFeature.generateHelpMessage(),
'Enable or disable Flutter for web. ' 'Enable or disable Flutter for web. '
'This setting will take effect on the master, dev, beta, and stable channels.'); 'This setting will take effect on the master, beta, and stable channels.');
}); });
testWithoutContext('Flutter macOS desktop help string', () { testWithoutContext('Flutter macOS desktop help string', () {
expect(flutterMacOSDesktopFeature.generateHelpMessage(), expect(flutterMacOSDesktopFeature.generateHelpMessage(),
'Enable or disable beta-quality support for desktop on macOS. ' 'Enable or disable beta-quality support for desktop on macOS. '
'This setting will take effect on the master, dev, beta, and stable channels. ' 'This setting will take effect on the master, beta, and stable channels. '
'Newer beta versions are available on the beta channel.'); 'Newer beta versions are available on the beta channel.');
}); });
testWithoutContext('Flutter Linux desktop help string', () { testWithoutContext('Flutter Linux desktop help string', () {
expect(flutterLinuxDesktopFeature.generateHelpMessage(), expect(flutterLinuxDesktopFeature.generateHelpMessage(),
'Enable or disable beta-quality support for desktop on Linux. ' 'Enable or disable beta-quality support for desktop on Linux. '
'This setting will take effect on the master, dev, beta, and stable channels. ' 'This setting will take effect on the master, beta, and stable channels. '
'Newer beta versions are available on the beta channel.'); 'Newer beta versions are available on the beta channel.');
}); });
testWithoutContext('Flutter Windows desktop help string', () { testWithoutContext('Flutter Windows desktop help string', () {
expect(flutterWindowsDesktopFeature.generateHelpMessage(), expect(flutterWindowsDesktopFeature.generateHelpMessage(),
'Enable or disable support for desktop on Windows. ' 'Enable or disable support for desktop on Windows. '
'This setting will take effect on the master, dev, beta, and stable channels.'); 'This setting will take effect on the master, beta, and stable channels.');
}); });
testWithoutContext('help string on multiple channels', () { testWithoutContext('help string on multiple channels', () {
const Feature testWithoutContextFeature = Feature( const Feature testWithoutContextFeature = Feature(
name: 'example', name: 'example',
master: FeatureChannelSetting(available: true), master: FeatureChannelSetting(available: true),
dev: FeatureChannelSetting(available: true),
beta: FeatureChannelSetting(available: true), beta: FeatureChannelSetting(available: true),
stable: FeatureChannelSetting(available: true), stable: FeatureChannelSetting(available: true),
configSetting: 'foo', configSetting: 'foo',
); );
expect(testWithoutContextFeature.generateHelpMessage(), 'Enable or disable example. ' expect(testWithoutContextFeature.generateHelpMessage(), 'Enable or disable example. '
'This setting will take effect on the master, dev, beta, and stable channels.'); 'This setting will take effect on the master, beta, and stable channels.');
}); });
/// Flutter Web /// Flutter Web
...@@ -146,26 +142,6 @@ void main() { ...@@ -146,26 +142,6 @@ void main() {
expect(featureFlags.isWebEnabled, true); expect(featureFlags.isWebEnabled, true);
}); });
testWithoutContext('Flutter web off by default on dev', () {
final FeatureFlags featureFlags = createFlags('dev');
expect(featureFlags.isWebEnabled, false);
});
testWithoutContext('Flutter web enabled with config on dev', () {
final FeatureFlags featureFlags = createFlags('dev');
testConfig.setValue('enable-web', true);
expect(featureFlags.isWebEnabled, true);
});
testWithoutContext('Flutter web enabled with environment variable on dev', () {
final FeatureFlags featureFlags = createFlags('dev');
platform.environment = <String, String>{'FLUTTER_WEB': 'true'};
expect(featureFlags.isWebEnabled, true);
});
testWithoutContext('Flutter web off by default on beta', () { testWithoutContext('Flutter web off by default on beta', () {
final FeatureFlags featureFlags = createFlags('beta'); final FeatureFlags featureFlags = createFlags('beta');
...@@ -229,26 +205,6 @@ void main() { ...@@ -229,26 +205,6 @@ void main() {
expect(featureFlags.isMacOSEnabled, true); expect(featureFlags.isMacOSEnabled, true);
}); });
testWithoutContext('Flutter macos desktop off by default on dev', () {
final FeatureFlags featureFlags = createFlags('dev');
expect(featureFlags.isMacOSEnabled, false);
});
testWithoutContext('Flutter macos desktop enabled with config on dev', () {
final FeatureFlags featureFlags = createFlags('dev');
testConfig.setValue('enable-macos-desktop', true);
expect(featureFlags.isMacOSEnabled, true);
});
testWithoutContext('Flutter macos desktop enabled with environment variable on dev', () {
final FeatureFlags featureFlags = createFlags('dev');
platform.environment = <String, String>{'FLUTTER_MACOS': 'true'};
expect(featureFlags.isMacOSEnabled, true);
});
testWithoutContext('Flutter macos desktop off by default on beta', () { testWithoutContext('Flutter macos desktop off by default on beta', () {
final FeatureFlags featureFlags = createFlags('beta'); final FeatureFlags featureFlags = createFlags('beta');
...@@ -310,26 +266,6 @@ void main() { ...@@ -310,26 +266,6 @@ void main() {
expect(featureFlags.isLinuxEnabled, true); expect(featureFlags.isLinuxEnabled, true);
}); });
testWithoutContext('Flutter linux desktop off by default on dev', () {
final FeatureFlags featureFlags = createFlags('dev');
expect(featureFlags.isLinuxEnabled, false);
});
testWithoutContext('Flutter linux desktop enabled with config on dev', () {
final FeatureFlags featureFlags = createFlags('dev');
testConfig.setValue('enable-linux-desktop', true);
expect(featureFlags.isLinuxEnabled, true);
});
testWithoutContext('Flutter linux desktop enabled with environment variable on dev', () {
final FeatureFlags featureFlags = createFlags('dev');
platform.environment = <String, String>{'FLUTTER_LINUX': 'true'};
expect(featureFlags.isLinuxEnabled, true);
});
testWithoutContext('Flutter linux desktop off by default on beta', () { testWithoutContext('Flutter linux desktop off by default on beta', () {
final FeatureFlags featureFlags = createFlags('beta'); final FeatureFlags featureFlags = createFlags('beta');
...@@ -391,26 +327,6 @@ void main() { ...@@ -391,26 +327,6 @@ void main() {
expect(featureFlags.isWindowsEnabled, true); expect(featureFlags.isWindowsEnabled, true);
}); });
testWithoutContext('Flutter Windows desktop off by default on dev', () {
final FeatureFlags featureFlags = createFlags('dev');
expect(featureFlags.isWindowsEnabled, false);
});
testWithoutContext('Flutter Windows desktop enabled with config on dev', () {
final FeatureFlags featureFlags = createFlags('dev');
testConfig.setValue('enable-windows-desktop', true);
expect(featureFlags.isWindowsEnabled, true);
});
testWithoutContext('Flutter Windows desktop not enabled with environment variable on dev', () {
final FeatureFlags featureFlags = createFlags('dev');
platform.environment = <String, String>{'FLUTTER_WINDOWS': 'true'};
expect(featureFlags.isWindowsEnabled, true);
});
testWithoutContext('Flutter Windows desktop off by default on beta', () { testWithoutContext('Flutter Windows desktop off by default on beta', () {
final FeatureFlags featureFlags = createFlags('beta'); final FeatureFlags featureFlags = createFlags('beta');
...@@ -466,19 +382,6 @@ void main() { ...@@ -466,19 +382,6 @@ void main() {
expect(featureFlags.isWindowsUwpEnabled, true); expect(featureFlags.isWindowsUwpEnabled, true);
}); });
testWithoutContext('Flutter Windows UWP desktop off by default on dev', () {
final FeatureFlags featureFlags = createFlags('dev');
expect(featureFlags.isWindowsUwpEnabled, false);
});
testWithoutContext('Flutter Windows UWP desktop enabled with config on dev', () {
final FeatureFlags featureFlags = createFlags('dev');
testConfig.setValue('enable-windows-uwp-desktop', true);
expect(featureFlags.isWindowsUwpEnabled, true);
});
testWithoutContext('Flutter Windows UWP desktop off by default on stable', () { testWithoutContext('Flutter Windows UWP desktop off by default on stable', () {
final FeatureFlags featureFlags = createFlags('stable'); final FeatureFlags featureFlags = createFlags('stable');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment