Unverified Commit d163620f authored by Danny Tuppeny's avatar Danny Tuppeny Committed by GitHub

Prevent bots/analyze.dart crashing on circular dependencies (#123802)

Prevent bots/analyze.dart crashing on circular dependencies
parent 587b9fc4
......@@ -1772,7 +1772,14 @@ Future<void> _checkConsumerDependencies() async {
final List<String> currentDependencies = (currentPackage['dependencies']! as List<Object?>).cast<String>();
for (final String dependency in currentDependencies) {
workset.add(dependencyTree[dependency]!);
// Don't add dependencies we've already seen or we will get stuck
// forever if there are any circular references.
// TODO(dantup): Consider failing gracefully with the names of the
// packages once the cycle between test_api and matcher is resolved.
// https://github.com/dart-lang/test/issues/1979
if (!dependencies.contains(dependency)) {
workset.add(dependencyTree[dependency]!);
}
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment