mirror of
https://github.com/flutter/flutter
synced 2024-08-25 02:46:31 +00:00
[flutter_tools] enable wasm compile on beta channel (#143779)
Wasm compilation is now available on `master` and `beta` channels.
This commit is contained in:
parent
6c78e36ccb
commit
bc334396db
|
@ -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}"');
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue