evaluatePreconditions method Null safety

Future<Iterable<Precondition>> evaluatePreconditions(
  1. {bool ignoreCache = false}

Run evaluation of all preconditions registered in this repository. Run order respects dependencies but when possible, tests are evaluated in parallel.

In case the previous evaluation is still running, only the already finished tests are evaluated again. The registerPrecondition.satisfiedCache and registerPrecondition.notSatisfiedCache allow usage of previously obtained result of evaluation.


Future<Iterable<Precondition>> evaluatePreconditions({bool ignoreCache: false}) async {
  _thisRunCache ??= _RunCache();
  var list = _known.values.toList();
  _log.info("Evaluating ${list.length} preconditions");
  try {
    var results = list.map((p) => p._evaluate(ignoreCache: ignoreCache));
    await Future.wait(results);
  } finally {
  await _releaseRunCache();
  return List.unmodifiable(list);