anchor.diff:      }
     }
   
  -  Future<bool> _resolveDependencies(ToolEnvironment toolEnv, Job job,
  -      String pkgPath, bool usesFlutter, StringBuffer logFileOutput) async {
  +  Future<bool> _resolveDependencies(
  +      Logger logger,
  +      ToolEnvironment toolEnv,
  +      Job job,
  +      String pkgPath,
  +      bool usesFlutter,
  +      StringBuffer logFileOutput) async {
       logFileOutput.write('Running pub upgrade:\n');
       final pr = await toolEnv.runUpgrade(pkgPath, usesFlutter);
       _appendLog(logFileOutput, pr);
  
positive.code:     final sw = Stopwatch()..start();
      DartdocResult r = await runDartdoc(true);
      sw.stop();
      _logger.info('Running dartdoc for ${job.packageName} ${job.packageVersion} '
          'completed in ${sw.elapsed}.');
      if (r.wasTimeout) {
        r = await runDartdoc(false);
  
negative.code: 
        // Resolve dependencies only for non-legacy package versions.
        if (!status.isLegacy) {
          depsResolved = await _resolveDependencies(logger, toolEnvRef.toolEnv,
              job, pkgPath, usesFlutter, logFileOutput);
        } else {
          logFileOutput.write(
              'Package version does not allow current SDK, skipping pub upgrade.\n\n');
  