| 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 library driver; | 5 library driver; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:io'; | 8 import 'dart:io'; |
| 9 import 'dart:math'; | 9 import 'dart:math'; |
| 10 | 10 |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 static const String INCREMENTAL_RESOLUTION_VALIDATION = | 242 static const String INCREMENTAL_RESOLUTION_VALIDATION = |
| 243 "incremental-resolution-validation"; | 243 "incremental-resolution-validation"; |
| 244 | 244 |
| 245 /** | 245 /** |
| 246 * The name of the option used to disable using the new analysis driver. | 246 * The name of the option used to disable using the new analysis driver. |
| 247 */ | 247 */ |
| 248 static const String DISABLE_NEW_ANALYSIS_DRIVER = | 248 static const String DISABLE_NEW_ANALYSIS_DRIVER = |
| 249 'disable-new-analysis-driver'; | 249 'disable-new-analysis-driver'; |
| 250 | 250 |
| 251 /** | 251 /** |
| 252 * The name of the option used to enable fined grained invalidation. | |
| 253 */ | |
| 254 static const String FINER_GRAINED_INVALIDATION = 'finer-grained-invalidation'; | |
| 255 | |
| 256 /** | |
| 257 * The name of the option used to cause instrumentation to also be written to | 252 * The name of the option used to cause instrumentation to also be written to |
| 258 * a local file. | 253 * a local file. |
| 259 */ | 254 */ |
| 260 static const String INSTRUMENTATION_LOG_FILE = "instrumentation-log-file"; | 255 static const String INSTRUMENTATION_LOG_FILE = "instrumentation-log-file"; |
| 261 | 256 |
| 262 /** | 257 /** |
| 263 * The name of the option used to specify if [print] should print to the | 258 * The name of the option used to specify if [print] should print to the |
| 264 * console instead of being intercepted. | 259 * console instead of being intercepted. |
| 265 */ | 260 */ |
| 266 static const String INTERNAL_DELAY_FREQUENCY = 'internal-delay-frequency'; | 261 static const String INTERNAL_DELAY_FREQUENCY = 'internal-delay-frequency'; |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 } | 384 } |
| 390 } | 385 } |
| 391 | 386 |
| 392 AnalysisServerOptions analysisServerOptions = new AnalysisServerOptions(); | 387 AnalysisServerOptions analysisServerOptions = new AnalysisServerOptions(); |
| 393 analysisServerOptions.enableIncrementalResolutionApi = | 388 analysisServerOptions.enableIncrementalResolutionApi = |
| 394 results[ENABLE_INCREMENTAL_RESOLUTION_API]; | 389 results[ENABLE_INCREMENTAL_RESOLUTION_API]; |
| 395 analysisServerOptions.enableIncrementalResolutionValidation = | 390 analysisServerOptions.enableIncrementalResolutionValidation = |
| 396 results[INCREMENTAL_RESOLUTION_VALIDATION]; | 391 results[INCREMENTAL_RESOLUTION_VALIDATION]; |
| 397 analysisServerOptions.enableNewAnalysisDriver = | 392 analysisServerOptions.enableNewAnalysisDriver = |
| 398 !results[DISABLE_NEW_ANALYSIS_DRIVER]; | 393 !results[DISABLE_NEW_ANALYSIS_DRIVER]; |
| 399 analysisServerOptions.finerGrainedInvalidation = | |
| 400 results[FINER_GRAINED_INVALIDATION]; | |
| 401 analysisServerOptions.noIndex = results[NO_INDEX]; | 394 analysisServerOptions.noIndex = results[NO_INDEX]; |
| 402 analysisServerOptions.useAnalysisHighlight2 = | 395 analysisServerOptions.useAnalysisHighlight2 = |
| 403 results[USE_ANALYSIS_HIGHLIGHT2]; | 396 results[USE_ANALYSIS_HIGHLIGHT2]; |
| 404 analysisServerOptions.fileReadMode = results[FILE_READ_MODE]; | 397 analysisServerOptions.fileReadMode = results[FILE_READ_MODE]; |
| 405 analysisServerOptions.newAnalysisDriverLog = | 398 analysisServerOptions.newAnalysisDriverLog = |
| 406 results[NEW_ANALYSIS_DRIVER_LOG]; | 399 results[NEW_ANALYSIS_DRIVER_LOG]; |
| 407 analysisServerOptions.enableVerboseFlutterCompletions = | 400 analysisServerOptions.enableVerboseFlutterCompletions = |
| 408 results[VERBOSE_FLUTTER_COMPLETIONS]; | 401 results[VERBOSE_FLUTTER_COMPLETIONS]; |
| 409 | 402 |
| 410 _initIncrementalLogger(results[INCREMENTAL_RESOLUTION_LOG]); | 403 _initIncrementalLogger(results[INCREMENTAL_RESOLUTION_LOG]); |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 552 parser.addOption(INCREMENTAL_RESOLUTION_LOG, | 545 parser.addOption(INCREMENTAL_RESOLUTION_LOG, |
| 553 help: "set a destination for the incremental resolver's log"); | 546 help: "set a destination for the incremental resolver's log"); |
| 554 parser.addFlag(INCREMENTAL_RESOLUTION_VALIDATION, | 547 parser.addFlag(INCREMENTAL_RESOLUTION_VALIDATION, |
| 555 help: "enable validation of incremental resolution results (slow)", | 548 help: "enable validation of incremental resolution results (slow)", |
| 556 defaultsTo: false, | 549 defaultsTo: false, |
| 557 negatable: false); | 550 negatable: false); |
| 558 parser.addFlag(DISABLE_NEW_ANALYSIS_DRIVER, | 551 parser.addFlag(DISABLE_NEW_ANALYSIS_DRIVER, |
| 559 help: "disable using new analysis driver", | 552 help: "disable using new analysis driver", |
| 560 defaultsTo: false, | 553 defaultsTo: false, |
| 561 negatable: false); | 554 negatable: false); |
| 562 parser.addFlag(FINER_GRAINED_INVALIDATION, | |
| 563 help: "enable finer grained invalidation", | |
| 564 defaultsTo: false, | |
| 565 negatable: false); | |
| 566 parser.addOption(INSTRUMENTATION_LOG_FILE, | 555 parser.addOption(INSTRUMENTATION_LOG_FILE, |
| 567 help: | 556 help: |
| 568 "the path of the file to which instrumentation data will be written"
); | 557 "the path of the file to which instrumentation data will be written"
); |
| 569 parser.addFlag(INTERNAL_PRINT_TO_CONSOLE, | 558 parser.addFlag(INTERNAL_PRINT_TO_CONSOLE, |
| 570 help: "enable sending `print` output to the console", | 559 help: "enable sending `print` output to the console", |
| 571 defaultsTo: false, | 560 defaultsTo: false, |
| 572 negatable: false); | 561 negatable: false); |
| 573 parser.addOption(NEW_ANALYSIS_DRIVER_LOG, | 562 parser.addOption(NEW_ANALYSIS_DRIVER_LOG, |
| 574 help: "set a destination for the new analysis driver's log"); | 563 help: "set a destination for the new analysis driver's log"); |
| 575 parser.addOption(VERBOSE_FLUTTER_COMPLETIONS, | 564 parser.addOption(VERBOSE_FLUTTER_COMPLETIONS, |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 676 | 665 |
| 677 _DiagnosticServerImpl(); | 666 _DiagnosticServerImpl(); |
| 678 | 667 |
| 679 @override | 668 @override |
| 680 Future<int> getServerPort() => httpServer.serveHttp(); | 669 Future<int> getServerPort() => httpServer.serveHttp(); |
| 681 | 670 |
| 682 Future startOnPort(int port) { | 671 Future startOnPort(int port) { |
| 683 return httpServer.serveHttp(port); | 672 return httpServer.serveHttp(port); |
| 684 } | 673 } |
| 685 } | 674 } |
| OLD | NEW |