multipack icon indicating copy to clipboard operation
multipack copied to clipboard

Add support for circular dependencies

Open smkhalsa opened this issue 5 years ago • 4 comments
trafficstars

currently, I get the following error

Unhandled exception:
NoSuchMethodError: The getter 'reversed' was called on null.
Receiver: null
Tried calling: reversed
#0      Object.noSuchMethod (dart:core-patch/object_patch.dart:53:5)
#1      main (file:///Users/smkhalsa/.pub-cache/hosted/pub.dartlang.org/multipack-0.1.3/bin/multipack.dart:10:69)
<asynchronous suspension>
#2      _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:299:32)
#3      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)

when running multipack pubspec override if I have a circular dependency.

smkhalsa avatar Aug 24 '20 00:08 smkhalsa

@klavs do you have any insight on this?

smkhalsa avatar Sep 27 '20 03:09 smkhalsa

I do not know how to universally handle circular dependencies in a directed graph. I'd imagine user would have to define how to break the cycle so that we can figure out what's the topological order.

I think lerna handles circular dependencies, there might be hints in their source code.

klavs avatar Sep 27 '20 07:09 klavs

https://github.com/huang12zheng/multipack

I just had done a test with multipack pubspec override

  • test workflow
# step1
# file /Users/huangzheng/.pub-cache/bin/multipack
# change to
dart "/Users/huangzheng/frontend/multipack/bin/multipack.dart" "$@"
# step2
run `multipack pubspec override` in ferry

huang12zheng avatar Feb 12 '21 02:02 huang12zheng

And, I don't know how to deal with InfoCommand

huang12zheng avatar Feb 12 '21 02:02 huang12zheng