diff --git a/bin/internal/engine.version b/bin/internal/engine.version index d81a1e533d..726c5f6e5f 100644 --- a/bin/internal/engine.version +++ b/bin/internal/engine.version @@ -1 +1 @@ -f9c1f5fa539fdfcbcae65a1dd09d1d05949da459 \ No newline at end of file +6e54f5e31f084d2e54a510959f68b89e4d2fdffd diff --git a/packages/flutter_tools/lib/src/artifacts.dart b/packages/flutter_tools/lib/src/artifacts.dart index a311e0fe50..ada47c8dd3 100644 --- a/packages/flutter_tools/lib/src/artifacts.dart +++ b/packages/flutter_tools/lib/src/artifacts.dart @@ -18,7 +18,6 @@ enum Artifact { dartVmEntryPointsAndroidTxt, genSnapshot, skyShell, - skySnapshot, snapshotDart, flutterFramework, vmSnapshotData, @@ -43,8 +42,6 @@ String _artifactToFileName(Artifact artifact) { return 'dart_vm_entry_points_android.txt'; case Artifact.genSnapshot: return 'gen_snapshot'; - case Artifact.skySnapshot: - return 'sky_snapshot'; case Artifact.skyShell: return 'sky_shell'; case Artifact.snapshotDart: @@ -144,18 +141,17 @@ class CachedArtifacts extends Artifacts { String _getHostArtifactPath(Artifact artifact, TargetPlatform platform) { switch (artifact) { + case Artifact.genSnapshot: + // For script snapshots any gen_snapshot binary will do. Returning gen_snapshot for + // android_arm in profile mode because it is available on all supported host platforms. + return _getAndroidArtifactPath(artifact, TargetPlatform.android_arm, BuildMode.profile); case Artifact.skyShell: - case Artifact.skySnapshot: if (platform == TargetPlatform.windows_x64) throw new UnimplementedError('Artifact $artifact not available on platfrom $platform.'); - continue returnResourcePath; - case Artifact.genSnapshot: + continue fallThrough; + fallThrough: case Artifact.vmSnapshotData: case Artifact.isolateSnapshotData: - if (platform != TargetPlatform.windows_x64) - throw new UnimplementedError('Artifact $artifact not available on platfrom $platform.'); - continue returnResourcePath; - returnResourcePath: case Artifact.icudtlDat: final String engineArtifactsPath = cache.getArtifactDirectory('engine').path; final String platformDirName = getNameForTargetPlatform(platform); @@ -228,8 +224,6 @@ class LocalEngineArtifacts extends Artifacts { return _genSnapshotPath(platform); case Artifact.skyShell: return _skyShellPath(platform); - case Artifact.skySnapshot: - return _skySnapshotPath(); case Artifact.isolateSnapshotData: case Artifact.vmSnapshotData: return fs.path.join(engineOutPath, 'gen', 'flutter', 'lib', 'snapshot', _artifactToFileName(artifact)); @@ -256,13 +250,6 @@ class LocalEngineArtifacts extends Artifacts { return fs.path.join(engineOutPath, clang, _artifactToFileName(Artifact.genSnapshot)); } - String _skySnapshotPath() { - final String clangPath = fs.path.join(engineOutPath, 'clang_x64', _artifactToFileName(Artifact.skySnapshot)); - if (fs.isFileSync(clangPath)) - return clangPath; - return fs.path.join(engineOutPath, _artifactToFileName(Artifact.skySnapshot)); - } - String _skyShellPath(TargetPlatform platform) { if (getCurrentHostPlatform() == HostPlatform.linux_x64) { return fs.path.join(engineOutPath, _artifactToFileName(Artifact.skyShell)); diff --git a/packages/flutter_tools/lib/src/flx.dart b/packages/flutter_tools/lib/src/flx.dart index fa4a75b45c..f79b308101 100644 --- a/packages/flutter_tools/lib/src/flx.dart +++ b/packages/flutter_tools/lib/src/flx.dart @@ -8,7 +8,6 @@ import 'artifacts.dart'; import 'asset.dart'; import 'base/common.dart'; import 'base/file_system.dart'; -import 'base/platform.dart'; import 'base/process.dart'; import 'build_info.dart'; import 'dart/package_map.dart'; @@ -33,52 +32,6 @@ Future createSnapshot({ String snapshotPath, String depfilePath, String packages -}) { - if (platform.isWindows) { - return _creteScriptSnapshotWithGenSnapshot( - mainPath: mainPath, - snapshotPath: snapshotPath, - depfilePath: depfilePath, - packages: packages - ); - } - return _createScriptSnapshotWithSkySnapshot( - mainPath: mainPath, - snapshotPath: snapshotPath, - depfilePath: depfilePath, - packages: packages - ); -} - -Future _createScriptSnapshotWithSkySnapshot({ - String mainPath, - String snapshotPath, - String depfilePath, - String packages -}) { - assert(mainPath != null); - assert(snapshotPath != null); - assert(packages != null); - final String snapshotterPath = artifacts.getArtifactPath(Artifact.skySnapshot); - - final List args = [ - snapshotterPath, - '--packages=$packages', - '--snapshot=$snapshotPath' - ]; - if (depfilePath != null) { - args.add('--depfile=$depfilePath'); - args.add('--build-output=$snapshotPath'); - } - args.add(mainPath); - return runCommandAndStreamOutput(args); -} - -Future _creteScriptSnapshotWithGenSnapshot({ - String mainPath, - String snapshotPath, - String depfilePath, - String packages }) { assert(mainPath != null); assert(snapshotPath != null);