Closed pianiel closed 6 years ago
@pianiel , can you help me reproduce the issue? I'm not seeing these errors on my machine.
Sure. I think it should only depend on the version of dart. I have mine set up through flutter and dart --version
returns
Dart VM version: 2.1.0-dev.3.1.flutter-760a9690c2 (Wed Aug 29 07:29:38 2018 +0000) on "linux_x64"
and starting the server like dart-mode
is doing:
$ dart $DART_SDK_PATH/bin/snapshots/analysis_server.dart.snapshot --no-error-notification
Unhandled exception:
FormatException: Could not find an option named "error-notification".
#0 Parser.validate (package:args/src/parser.dart:261:21)
#1 Parser.parseLongOption (package:args/src/parser.dart:239:9)
#2 Parser.parse (package:args/src/parser.dart:90:11)
#3 ArgParser.parse (package:args/src/arg_parser.dart:307:45)
As far as I understand, the issues should occur beginning from the commit linked above (so version 1.23.0?). What version are you using @bradyt ?
Thank you @pianiel.
I can reproduce the issue now,
$ brew switch dart 2.0.0
$ export DART_SDK_PATH=$(dirname "$(dirname "$(greadlink -f "$(which dart)")")")
$ dart $DART_SDK_PATH/bin/snapshots/analysis_server.dart.snapshot --no-error-notification
{"event":"server.connected","params":{"version":"1.20.3","pid":27010,"sessionId":""}}
^C
versus
$ brew switch dart 2.1.0-dev.6.0
$ export DART_SDK_PATH=$(dirname "$(dirname "$(greadlink -f "$(which dart)")")")
$ dart $DART_SDK_PATH/bin/snapshots/analysis_server.dart.snapshot --no-error-notification
Unhandled exception:
FormatException: Could not find an option named "error-notification".
#0 Parser.validate (package:args/src/parser.dart:261:21)
#1 Parser.parseLongOption (package:args/src/parser.dart:239:9)
#2 Parser.parse (package:args/src/parser.dart:90:11)
#3 ArgParser.parse (package:args/src/arg_parser.dart:307:45)
#4 CommandLineParser.parse (package:analysis_server/src/server/driver.dart:96:15)
#5 Driver.start (package:analysis_server/src/server/driver.dart:319:33)
#6 main (file:///b/build/slave/dart-sdk-mac-dev/build/sdk/pkg/analysis_server/bin/server.dart:12:11)
<asynchronous suspension>
#7 _startIsolate.<anonymous closure> (dart:isolate/runtime/libisolate_patch.dart:287:32)
#8 _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12)
The option was actually removed in https://github.com/dart-lang/sdk/commit/0f7fc43df5b56d5a50d7a7bfe1e11c33f846f789 and it's causing the server to crash as seen in #35 and potentially also in #69