-
Notifications
You must be signed in to change notification settings - Fork 220
Description
pub.dart.snapshot was removed from the SDK starting from SDK version 2.15.0-49.0.dev
SDK commit: dart-lang/sdk@ae81cd5
Webdev is using dart pub.dart.snapshot build_runner build command to make sure we can communicate to the build daemon - see:
In particular, the comment:
// On Windows we need to call the snapshot directly otherwise
// the process will start in a disjoint cmd without access to
// STDIO. We also want to ensure the version of pub is consistent with
// the SDK that was used to launch webdev.
I tried using dart pub or dart dartdev.dart.snapshot pub instead of the original command, but unfortunately the disjoint cmd still happens and prevents the daemon from communicating to webdev correctly, see test failures on windows in:
Changing the process start mode to ProcessStartMode.normal in the code below seems to solve the problem in my experiments (in tests at via VSCode) - is there anything preventing us from changing that?
build/build_daemon/lib/client.dart
Line 171 in 2159c90
| mode: ProcessStartMode.detachedWithStdio, |
- Dart SDK version: 2.15.0-51.0.dev
- Webdev version: 2.7.5
- build 2.1.0
- build_config 1.0.0
- build_daemon 3.0.0
- build_resolvers 2.0.4
- build_runner 2.1.1
- build_runner_core 7.1.0
- build_verify 2.0.0
- build_version 2.1.0
TL;DR the crash:
Building
[INFO] Connecting to the build daemon...
[SEVERE] Could not find a command named "/Users/annagrin/.dart-sdks/2.15.0-51.0.dev/bin/snapshots/pub.dart.snapshot".
[SEVERE]
[SEVERE] Usage: dart [vm-options] <command|dart-file> [arguments]
[SEVERE]
[SEVERE] Global options:
[SEVERE] -h, --help Print this usage information.
[SEVERE] -v, --verbose Show additional command output.
[SEVERE] --version Print the Dart SDK version.
[SEVERE] --enable-analytics Enable analytics.
[SEVERE] --disable-analytics Disable analytics.
[SEVERE] --diagnostics Show tool diagnostic output.
[SEVERE]
[SEVERE] Available commands:
[SEVERE] analyze Analyze Dart code in a directory.
[SEVERE] compile Compile Dart to various formats.
[SEVERE] create Create a new Dart project.
[SEVERE] devtools Open DevTools (optionally connecting to an existing application).
[SEVERE] fix Apply automated fixes to Dart source code.
[SEVERE] format Idiomatically format Dart source code.
[SEVERE] language-server Start Dart's analysis server.
[SEVERE] migrate Perform null safety migration on a project.
[SEVERE] pub Work with packages.
[SEVERE] run Run a Dart program.
[SEVERE] test Run tests for a project.
[SEVERE]
[SEVERE] Run "dart help <command>" for more information about a command.
[SEVERE] See https://dart.dev/tools/dart-tool for detailed documentation.
Unhandled exception:
Bad state: Unable to start build daemon.
#0 _handleDaemonStartup.<anonymous closure>
#1 _runUserCode (dart:async/stream_pipe.dart:11:23)
#2 Stream.firstWhere.<anonymous closure> (dart:async/stream.dart:1338:9)
#3 _RootZone.runGuarded (dart:async/zone.dart:1608:10)
#4 _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:394:13)
#5 _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:404:7)
#6 _BufferingStreamSubscription._close (dart:async/stream_impl.dart:291:7)
#7 _SyncBroadcastStreamController._sendDone.<anonymous closure> (dart:async/broadcast_stream_controller.dart:400:22)
#8 _BroadcastStreamController._forEachListener (dart:async/broadcast_stream_controller.dart:323:15)
#9 _SyncBroadcastStreamController._sendDone (dart:async/broadcast_stream_controller.dart:399:7)
#10 _BroadcastStreamController.close (dart:async/broadcast_stream_controller.dart:269:5)
#11 _AsBroadcastStreamController.close (dart:async/broadcast_stream_controller.dart:505:27)
#12 _RootZone.runGuarded (dart:async/zone.dart:1608:10)
#13 _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:394:13)
#14 _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:404:7)
#15 _BufferingStreamSubscription._close (dart:async/stream_impl.dart:291:7)
#16 _SinkTransformerStreamSubscription._close (dart:async/stream_transformers.dart:87:11)
#17 _EventSinkWrapper.close (dart:async/stream_transformers.dart:21:11)
#18 _StringAdapterSink.close (dart:convert/string_conversion.dart:251:11)
#19 _LineSplitterSink.close (dart:convert/line_splitter.dart:135:11)
#20 _SinkTransformerStreamSubscription._handleDone (dart:async/stream_transformers.dart:132:24)
#21 _RootZone.runGuarded (dart:async/zone.dart:1608:10)
#22 _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:394:13)
#23 _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:404:7)
#24 _BufferingStreamSubscription._close (dart:async/stream_impl.dart:291:7)
#25 _SinkTransformerStreamSubscription._close (dart:async/stream_transformers.dart:87:11)
#26 _EventSinkWrapper.close (dart:async/stream_transformers.dart:21:11)
#27 _StringAdapterSink.close (dart:convert/string_conversion.dart:251:11)
#28 _Utf8ConversionSink.close (dart:convert/string_conversion.dart:305:20)
#29 _ConverterStreamEventSink.close (dart:convert/chunked_conversion.dart:81:18)
#30 _SinkTransformerStreamSubscription._handleDone (dart:async/stream_transformers.dart:132:24)
#31 _RootZone.runGuarded (dart:async/zone.dart:1608:10)
#32 _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:394:13)
#33 _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:404:7)
#34 _BufferingStreamSubscription._close (dart:async/stream_impl.dart:291:7)
#35 _SyncStreamControllerDispatch._sendDone (dart:async/stream_controller.dart:741:19)
#36 _StreamController._closeUnchecked (dart:async/stream_controller.dart:596:7)
#37 _StreamController.close (dart:async/stream_controller.dart:589:5)
#38 _Socket._onData (dart:io-patch/socket_patch.dart:2173:21)
#39 _RootZone.runUnaryGuarded (dart:async/zone.dart:1620:10)
#40 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)
#41 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
#42 _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:733:19)
#43 _StreamController._add (dart:async/stream_controller.dart:607:7)
#44 _StreamController.add (dart:async/stream_controller.dart:554:5)
#45 new _RawSocket.<anonymous closure> (dart:io-patch/socket_patch.dart:1709:35)
#46 _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:1206:18)
#47 _microtaskLoop (dart:async/schedule_microtask.dart:40:21)
#48 _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)
#49 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:119:13)
#50 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:188:5)
Exited (255)