[flutter_tools] enable wasm compile on beta channel (#143779)

Wasm compilation is now available on `master` and `beta` channels.
This commit is contained in:
Kevin Moore 2024-02-20 17:20:04 -08:00 committed by GitHub
parent 6c78e36ccb
commit bc334396db
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 6 additions and 2 deletions

View file

@ -149,7 +149,7 @@ class BuildWebCommand extends BuildSubCommand {
final List<WebCompilerConfig> compilerConfigs;
if (boolArg('wasm')) {
if (!featureFlags.isFlutterWebWasmEnabled) {
throwToolExit('Compiling to WebAssembly (wasm) is only available on the master channel.');
throwToolExit('Compiling to WebAssembly (wasm) is only available on the beta and master channels.');
}
if (stringArg(FlutterOptions.kWebRendererFlag) != argParser.defaultFor(FlutterOptions.kWebRendererFlag)) {
throwToolExit('"--${FlutterOptions.kWebRendererFlag}" cannot be combined with "--${FlutterOptions.kWebWasmFlag}"');

View file

@ -150,6 +150,10 @@ const Feature flutterCustomDevicesFeature = Feature(
const Feature flutterWebWasm = Feature(
name: 'WebAssembly compilation from flutter build web',
environmentOverride: 'FLUTTER_WEB_WASM',
beta: FeatureChannelSetting(
available: true,
enabledByDefault: true,
),
master: FeatureChannelSetting(
available: true,
enabledByDefault: true,

View file

@ -83,7 +83,7 @@ void main() {
testWithoutContext('Flutter web wasm only enable on master', () {
expect(flutterWebWasm.getSettingForChannel('master').enabledByDefault, isTrue);
expect(flutterWebWasm.getSettingForChannel('beta').enabledByDefault, isFalse);
expect(flutterWebWasm.getSettingForChannel('beta').enabledByDefault, isTrue);
expect(flutterWebWasm.getSettingForChannel('stable').enabledByDefault, isFalse);
});