anchor.diff:    String vmEntryPoints = path.join(entryPointsDir, 'dart_vm_entry_points.txt');
     String ioEntryPoints = path.join(dartEntryPointsDir, 'dart_io_entries.txt');
   
  -  String packagesPath = path.absolute(Directory.current.path, 'packages');
  -  if (!FileSystemEntity.isDirectorySync(packagesPath)) {
  -    printStatus('Missing packages directory; running `pub get` (to work around https://github.com/dart-lang/sdk/issues/26362).');
  -    // We don't use [pubGet] because we explicitly want to avoid --no-package-symlinks.
  -    runCheckedSync(<String>[sdkBinaryName('pub'), 'get', '--no-precompile']);
  -  }
  -  if (!FileSystemEntity.isDirectorySync(packagesPath)) {
  -    printError('Could not find packages directory: $packagesPath\n' +
  -               'Did you run `pub get` in this directory?');
  -    printError('This is needed to work around ' +
  -               'https://github.com/dart-lang/sdk/issues/26362');
  -    return null;
  -  }
  -
  -  String mojoPkg = _getSdkExtensionPath(packagesPath, 'mojo');
  +  PackageMap packageMap = new PackageMap(PackageMap.globalPackagesPath);
  +  String packageMapError = packageMap.checkValid();
  +  if (packageMapError != null) {
  +    printError(packageMapError);
  +    return null;
  +  }
  +
  +  String mojoPkg = _getSdkExtensionPath(packageMap, 'mojo');
     String mojoInternalPath = path.join(mojoPkg, 'sdk_ext', 'internal.dart');
   
  -  String skyEnginePkg = _getSdkExtensionPath(packagesPath, 'sky_engine');
  +  String skyEnginePkg = _getSdkExtensionPath(packageMap, 'sky_engine');
     String uiPath = path.join(skyEnginePkg, 'dart_ui', 'ui.dart');
     String jniPath = path.join(skyEnginePkg, 'dart_jni', 'jni.dart');
     String vmServicePath = path.join(skyEnginePkg, 'sdk_ext', 'dart', 'runtime', 'bin', 'vmservice', 'vmservice_io.dart');
  
positive.code:     genSnapshot,
      '--vm_isolate_snapshot=$vmIsolateSnapshot',
      '--isolate_snapshot=$isolateSnapshot',
      '--package_root=$packagesPath',
      '--url_mapping=dart:mojo.internal,$mojoInternalPath',
      '--url_mapping=dart:ui,$uiPath',
      '--url_mapping=dart:jni,$jniPath',
  
negative.code: import '../base/process.dart';
  import '../base/utils.dart';
  import '../build_info.dart';
  import '../dart/package_map.dart';
  import '../globals.dart';
  import '../run.dart';
  import '../runner/flutter_command.dart';
  