Prevent bots/analyze.dart crashing on circular dependencies#123802
Prevent bots/analyze.dart crashing on circular dependencies#123802auto-submit[bot] merged 2 commits intoflutter:masterfrom
Conversation
Will that circular dependency cause any other trouble? It seems like a smell, but I don't know what (negative) effects it could have. If circular dependencies like that are undesirable, the script should probably fail gracefully instead of OOMing or just ignoring this. |
Mostly it causes pain while publishing those packages. There are potential impacts on modular builds, but we are sure with these packages that we never introduce module cycles. |
|
@natebosch said on the other issue:
@natebosch Do you have an issue for breaking that cycle that we can link here to remove this workaround and instead fail the check gracefully if a cycle is detected? |
I can file, one... dart-lang/test#1979
It's not clear to me why we'd specifically want to fail. Package cycles are not intended to cause pain for anyone outside of the publisher. |
| 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 |
There was a problem hiding this comment.
Can you link to dart-lang/test#1979 with a TODO to re-evaluate this once that issue is closed?
|
auto label is removed for flutter/flutter, pr: 123802, due to - The status or check suite Linux firebase_release_smoke_test has failed. Please fix the issues identified (or deflake) before re-applying this label.
|
…123802) Prevent bots/analyze.dart crashing on circular dependencies
The bot rolling packages is failing here:
#123350 (comment).
It appears that there's a circular dependency between
test_apiandmatcherwhich this script gets stuck following until it runs out of memory.This change preferences adding packages that have already been added, and prevents the crash in my local machine.