-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Prevent bots/analyze.dart crashing on circular dependencies #123802
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you link to dart-lang/test#1979 with a TODO to re-evaluate this once that issue is closed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
goderbauer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
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.