OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 import 'dart:async'; | 5 import 'dart:async'; |
6 import 'dart:collection'; | 6 import 'dart:collection'; |
7 import 'dart:convert'; | 7 import 'dart:convert'; |
8 import 'dart:io'; | 8 import 'dart:io'; |
9 | 9 |
10 import 'package:analysis_server/protocol/protocol_constants.dart'; | 10 import 'package:analysis_server/protocol/protocol_constants.dart'; |
(...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
687 if (checked) { | 687 if (checked) { |
688 arguments.add('--checked'); | 688 arguments.add('--checked'); |
689 } | 689 } |
690 // | 690 // |
691 // Add the server executable. | 691 // Add the server executable. |
692 // | 692 // |
693 arguments.add(serverPath); | 693 arguments.add(serverPath); |
694 // | 694 // |
695 // Add server arguments. | 695 // Add server arguments. |
696 // | 696 // |
| 697 arguments.add('--suppress-analytics'); |
697 if (diagnosticPort != null) { | 698 if (diagnosticPort != null) { |
698 arguments.add('--port'); | 699 arguments.add('--port'); |
699 arguments.add(diagnosticPort.toString()); | 700 arguments.add(diagnosticPort.toString()); |
700 } | 701 } |
701 if (instrumentationLogFile != null) { | 702 if (instrumentationLogFile != null) { |
702 arguments.add('--instrumentation-log-file=$instrumentationLogFile'); | 703 arguments.add('--instrumentation-log-file=$instrumentationLogFile'); |
703 } | 704 } |
704 if (sdkPath != null) { | 705 if (sdkPath != null) { |
705 arguments.add('--sdk=$sdkPath'); | 706 arguments.add('--sdk=$sdkPath'); |
706 } | 707 } |
707 if (useAnalysisHighlight2) { | 708 if (useAnalysisHighlight2) { |
708 arguments.add('--useAnalysisHighlight2'); | 709 arguments.add('--useAnalysisHighlight2'); |
709 } | 710 } |
710 // print('Launching $serverPath'); | |
711 // print('$dartBinary ${arguments.join(' ')}'); | |
712 // TODO(devoncarew): We could experiment with instead launching the analysis | 711 // TODO(devoncarew): We could experiment with instead launching the analysis |
713 // server in a separate isolate. This would make it easier to debug the | 712 // server in a separate isolate. This would make it easier to debug the |
714 // integration tests, and would likely speed the tests up as well. | 713 // integration tests, and would likely speed up the tests as well. |
715 _process = await Process.start(dartBinary, arguments); | 714 _process = await Process.start(dartBinary, arguments); |
716 _process.exitCode.then((int code) { | 715 _process.exitCode.then((int code) { |
717 if (code != 0) { | 716 if (code != 0) { |
718 _badDataFromServer('server terminated with exit code $code'); | 717 _badDataFromServer('server terminated with exit code $code'); |
719 } | 718 } |
720 }); | 719 }); |
721 } | 720 } |
722 | 721 |
723 /** | 722 /** |
724 * Deal with bad data received from the server. | 723 * Deal with bad data received from the server. |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
982 void populateMismatches(item, List<MismatchDescriber> mismatches); | 981 void populateMismatches(item, List<MismatchDescriber> mismatches); |
983 | 982 |
984 /** | 983 /** |
985 * Create a [MismatchDescriber] describing a mismatch with a simple string. | 984 * Create a [MismatchDescriber] describing a mismatch with a simple string. |
986 */ | 985 */ |
987 MismatchDescriber simpleDescription(String description) => | 986 MismatchDescriber simpleDescription(String description) => |
988 (Description mismatchDescription) { | 987 (Description mismatchDescription) { |
989 mismatchDescription.add(description); | 988 mismatchDescription.add(description); |
990 }; | 989 }; |
991 } | 990 } |
OLD | NEW |