Revert "Remove unused --packages argument to gen_snapshot. (#28101)" (#28265)

This reverts commit 1c021506df.

The pre-commit tests never actually ran, so it looked green when it wasn't. This breaks 16 tests that depend on the argument existing, even though it isn't actually used.
This commit is contained in:
Greg Spencer
2019-02-21 08:47:24 -08:00
committed by GitHub
parent 5169ab5974
commit b45a8f464d

View File

@@ -46,11 +46,13 @@ class GenSnapshot {
Future<int> run({
@required SnapshotType snapshotType,
@required String packagesPath,
IOSArch iosArch,
Iterable<String> additionalArgs = const <String>[],
}) {
final List<String> args = <String>[
'--causal_async_stacks',
'--packages=$packagesPath',
]..addAll(additionalArgs);
final String snapshotterPath = getSnapshotterPath(snapshotType);
@@ -191,6 +193,7 @@ class AOTSnapshotter {
final SnapshotType snapshotType = SnapshotType(platform, buildMode);
final int genSnapshotExitCode = await genSnapshot.run(
snapshotType: snapshotType,
packagesPath: packageMap.packagesPath,
additionalArgs: genSnapshotArgs,
iosArch: iosArch,
);
@@ -534,6 +537,7 @@ class JITSnapshotter {
final SnapshotType snapshotType = SnapshotType(platform, buildMode);
final int genSnapshotExitCode = await genSnapshot.run(
snapshotType: snapshotType,
packagesPath: packagesPath,
additionalArgs: genSnapshotArgs,
);
if (genSnapshotExitCode != 0) {