[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

@@ -155,7 +155,7 @@ Future<void> run(List<String> args) async {
concurrency: math.max(1, globals.platform.numberOfProcessors - 2),
icudtlPath: globals.fs.path.absolute(argResults[_kOptionIcudtl] as String),
coverageDirectory: coverageDirectory,
dartExperiments: <String>[],
extraFrontEndOptions: <String>[],
);
if (collector != null) {

View File

@@ -82,7 +82,7 @@ RunCommand "${FLUTTER_ROOT}/bin/flutter" \
-dTrackWidgetCreation="${TRACK_WIDGET_CREATION}" \
--DartDefines="${DART_DEFINES}" \
--ExtraGenSnapshotOptions="${EXTRA_GEN_SNAPSHOT_OPTIONS}" \
-dExtraFrontEndOptions="${EXTRA_FRONT_END_OPTIONS}" \
--ExtraFrontEndOptions="${EXTRA_FRONT_END_OPTIONS}" \
--build-inputs="${build_inputs_path}" \
--build-outputs="${build_outputs_path}" \
--output="${ephemeral_dir}" \

View File

@@ -69,7 +69,7 @@ or
if (extraGenSnapshotOptions != null)
'--ExtraGenSnapshotOptions=$extraGenSnapshotOptions',
if (extraFrontEndOptions != null)
'-dExtraFrontEndOptions=$extraFrontEndOptions',
'--ExtraFrontEndOptions=$extraFrontEndOptions',
target,
],
);

View File

@@ -168,7 +168,7 @@ is set to release or run \"flutter build ios --release\", then re-run Archive fr
-dEnableBitcode="${bitcode_flag}" \
--ExtraGenSnapshotOptions="${EXTRA_GEN_SNAPSHOT_OPTIONS}" \
--DartDefines="${DART_DEFINES}" \
-dExtraFrontEndOptions="${EXTRA_FRONT_END_OPTIONS}" \
--ExtraFrontEndOptions="${EXTRA_FRONT_END_OPTIONS}" \
"${build_mode}_ios_bundle_flutter_assets"
if [[ $? -ne 0 ]]; then