You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We'd like users to not have to manually make the transitive closure of dependencies. We should provide some helper code to do this.
Rough sketch:
Set<String> transitiveDeps(String dylib) {
final all =<String>{};
final worklist = [dylib];
while (worklist.isNotEmpty) {
final current = worklist.removeLast();
for (final path indepsOfDylib(current)) {
if (all.add(path)) {
worklist.add(path);
}
}
}
return all;
}
Set<String> depsOfDylib(String dylib) {
final result =Process.runSync('otool', ['-L', dylib]);
return regexp
.allMatches(result.stdout)
.map((match) => match.namedGroup('path')!)
.toSet();
}
final regexp =RegExp(r'^\s+(?<path>[^\s]*)\s+', multiLine:true);
final homebrewDir ='${Platform.environment['HOME']}/.homebrew';
When dealing with:
We'd like users to not have to manually make the transitive closure of dependencies. We should provide some helper code to do this.
Rough sketch:
We'd need something for all OSes.
Thanks @mkustermann for reporting and the sketch!
The text was updated successfully, but these errors were encountered: