mirror of
https://github.com/flutter/flutter
synced 2024-08-27 12:00:58 +00:00
Prevent bots/analyze.dart crashing on circular dependencies (#123802)
Prevent bots/analyze.dart crashing on circular dependencies
This commit is contained in:
parent
587b9fc448
commit
d163620f1f
|
@ -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]!);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue