[flutter_tools] add flag for sound-null-safety, unify with experiments (#58533)

Also combines experiments into extraGenSnapshot/ExtraFrontEndOptions. Allows providing --no-sound-null-safety to allow out of order migration and running.
This commit is contained in:
Jonah Williams
2020-06-03 21:02:07 -07:00
committed by GitHub
parent 95edf28150
commit b1d75fc99d
38 changed files with 127 additions and 114 deletions

View File

@@ -28,7 +28,6 @@ Future<void> buildWeb(
BuildInfo buildInfo,
bool initializePlatform,
bool csp,
List<String> experiments,
) async {
if (!flutterProject.web.existsSync()) {
throwToolExit('Missing index.html.');
@@ -53,8 +52,8 @@ Future<void> buildWeb(
kDartDefines: encodeDartDefines(buildInfo.dartDefines),
kCspMode: csp.toString(),
kIconTreeShakerFlag: buildInfo.treeShakeIcons.toString(),
if (experiments.isNotEmpty)
kEnableExperiment: experiments?.join(','),
if (buildInfo.extraFrontEndOptions?.isNotEmpty ?? false)
kExtraFrontEndOptions: buildInfo.extraFrontEndOptions.join(',')
},
artifacts: globals.artifacts,
fileSystem: globals.fs,