-
Notifications
You must be signed in to change notification settings - Fork 231
Pub: Spawning isolate it transformer not possible #7
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
Comments
<img src="https://avatars.githubusercontent.com/u/5449880?v=3" align="left" width="48" height="48"hspace="10"> Comment by iposva-google |
<img src="https://avatars.githubusercontent.com/u/188?v=3" align="left" width="48" height="48"hspace="10"> Comment by nex3 This is caused by a VM issue (issue dart-lang/sdk#6610) wherein existing script data isn't reused for Isolate.spawn. I don't think it's worth adding additional workarounds in pub rather than just solving the underlying problem. It's worth noting that each transformer already runs in its own isolate, so it's unlikely that additional per-transformer parallelism is going to buy you a whole lot of value. Marked this as being blocked by dart-lang/sdk#6610. |
We are no longer supporting transformers going forward, so a fix for this is not planned. |
<img src="https://avatars.githubusercontent.com/u/648527?v=3" align="left" width="96" height="96"hspace="10"> Issue by Fox32
Originally opened as dart-lang/sdk#23105
What steps will reproduce the problem?
What is the expected output? What do you see instead?
I would like to spawn a new isolate but instead I get the following exception:
in ShutdownIsolate: Unhandled exception:
Uncaught Error: IsolateSpawnException: Unhandled exception:
Uncaught Error: Load Error: FileSystemException: Cannot open file, path = 'C:\Users\Oliver\AppData\Local\Temp\pub_2d41cbb2-dc5b-11e4-bec2-90e6ba20879e\runInIsolate.dart' (OS Error: Das System kann den angegebenen Pfad nicht finden., errno = 3)
Stack Trace:
0 _asyncLoadErrorCallback (dart:_builtin:268)
1 _asyncLoadError (dart:_builtin:287)
2 _loadDataAsyncLoadPort.<anonymous closure> (dart:_builtin:304)
3 _RootZone.runUnary (dart:async/zone.dart:1155)
4 _Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:494)
5 _Future._propagateToListeners (dart:async/future_impl.dart:577)
6 _Future._complete (dart:async/future_impl.dart:358)
7 _cancelAndValue (dart:async/stream_pipe.dart:62)
8 Stream.first.<anonymous closure> (dart:async/stream.dart:911)
9 _RootZone.runUnaryGuarded (dart:async/zone.dart:1093)
10 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341)
11 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:270)
12 _StreamController&&_SyncStreamControllerDispatch._sendData (dart:async/s
tream_controller.dart:698)
13 _StreamController._add (dart:async/stream_controller.dart:570)
14 _StreamController.add (dart:async/stream_controller.dart:516)
15 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:142)
0 _rootHandleUncaughtError.<anonymous closure> (dart:async/zone.dart:886)
1 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:41)
2 _asyncRunCallback (dart:async/schedule_microtask.dart:48)
3 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:96)
4 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:143)
Stack Trace:
0 Isolate._spawnFunction (dart:isolate-patch/isolate_patch.dart:347)
1 Isolate.spawn (dart:isolate-patch/isolate_patch.dart:277)
2 ImageTransformer.apply.<apply_async_body> (package:image_transformer/image_transformer.dart:76:15)
3 _RootZone.runUnary (dart:async/zone.dart:1155)
4 _Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:494)
5 _Future._propagateToListeners (dart:async/future_impl.dart:577)
6 _Future._completeWithValue (dart:async/future_impl.dart:368)
7 _Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:422)
8 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:41)
9 _asyncRunCallback (dart:async/schedule_microtask.dart:48)
10 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:96)
11 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:143)
0 _rootHandleUncaughtError.<anonymous closure> (dart:async/zone.dart:886)
1 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:41)
2 _asyncRunCallback (dart:async/schedule_microtask.dart:48)
3 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:96)
4 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:143)
What version of the product are you using?
Dart Editor version 1.10.0.dev_00_01 (DEV)
Dart SDK version 1.10.0-dev.0.1
On what operating system?
Windows 8.1 64bit
Please provide any additional information below.
Sometimes it would be useful to spawn an additional isolate to do multiple computation heavy operations in parallel. I think this problem is known and currently by design, but it the future it would be a nice addition.
Maybe it would work if pub wouldn't delete the runInIsolate.dart file in the temp folder intermediately, but on exiting pub?
The text was updated successfully, but these errors were encountered: