anchor.diff:    final String pubExecutable = '$flutterRoot/bin/cache/dart-sdk/bin/pub';
   
     // Run pub.
  -  Process process = await Process.start(
  +  ProcessWrapper process = ProcessWrapper(await Process.start(
       pubExecutable,
       <String>['get'],
       workingDirectory: kDocsRoot,
       environment: pubEnvironment,
  -  );
  +  ));
     printStream(process.stdout, prefix: 'pub:stdout: ');
     printStream(process.stderr, prefix: 'pub:stderr: ');
  -  final int code = await process.exitCode;
  +  final int code = await process.done;
     if (code != 0)
       exit(code);
   
     createFooter('$kDocsRoot/lib/footer.html');
     copyAssets();
     cleanOutSnippets();
  -  precompileSnippetsTool();
  +  await precompileSnippetsTool(pubExecutable, pubEnvironment);
   
     final List<String> dartdocBaseArgs = <String>['global', 'run'];
     if (args['checked']) {
  
positive.code:   }
  }
  
  File precompileSnippetsTool() {
    final File snapshotPath = File(path.join('bin', 'cache', 'snippets.snapshot'));
    print('Precompiling snippets tool into ${snapshotPath.absolute.path}');
    if (snapshotPath.existsSync()) {
      snapshotPath.deleteSync();
    }
    // In order to be able to optimize properly, we need to provide a training set
    // of arguments, and an input file to process.
    final Directory tempDir = Directory.systemTemp.createTempSync('dartdoc_snippet_');
    final File trainingFile = File(path.join(tempDir.path, 'snippet_training'));
    trainingFile.writeAsStringSync('```dart\nvoid foo(){}\n```');
    Process.runSync(Platform.resolvedExecutable, <String>[
      '--snapshot=${snapshotPath.absolute.path}',
      '--snapshot_kind=app-jit',
      path.join(
        'dev',
        'snippets',
        'lib',
        'main.dart',
      ),
      '--type=sample',
      '--input=${trainingFile.absolute.path}',
      '--output=${path.join(tempDir.absolute.path, 'training_output.txt')}',
    ]);
    tempDir.deleteSync(recursive: true);
    return snapshotPath;
  }
  
negative.code: import 'package:args/args.dart';
  import 'package:intl/intl.dart';
  import 'package:path/path.dart' as path;
  import 'package:process/process.dart';
  
  const String kDocsRoot = 'dev/docs';
  const String kPublishRoot = '$kDocsRoot/doc';
  const String kSnippetsRoot = 'dev/snippets';
  
  /// This script expects to run with the cwd as the root of the flutter repo. It
  /// will generate documentation for the packages in `//packages/` and write the
  