| 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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 static const String INCREMENTAL_RESOLUTION_VALIDATION = | 241 static const String INCREMENTAL_RESOLUTION_VALIDATION = |
| 242 "incremental-resolution-validation"; | 242 "incremental-resolution-validation"; |
| 243 | 243 |
| 244 /** | 244 /** |
| 245 * The name of the option used to disable using the new analysis driver. | 245 * The name of the option used to disable using the new analysis driver. |
| 246 */ | 246 */ |
| 247 static const String DISABLE_NEW_ANALYSIS_DRIVER = | 247 static const String DISABLE_NEW_ANALYSIS_DRIVER = |
| 248 'disable-new-analysis-driver'; | 248 'disable-new-analysis-driver'; |
| 249 | 249 |
| 250 /** | 250 /** |
| 251 * The name of the option used to enable using pub summary manager. | |
| 252 */ | |
| 253 static const String ENABLE_PUB_SUMMARY_MANAGER = 'enable-pub-summary-manager'; | |
| 254 | |
| 255 /** | |
| 256 * The name of the option used to enable fined grained invalidation. | 251 * The name of the option used to enable fined grained invalidation. |
| 257 */ | 252 */ |
| 258 static const String FINER_GRAINED_INVALIDATION = 'finer-grained-invalidation'; | 253 static const String FINER_GRAINED_INVALIDATION = 'finer-grained-invalidation'; |
| 259 | 254 |
| 260 /** | 255 /** |
| 261 * The name of the option used to cause instrumentation to also be written to | 256 * The name of the option used to cause instrumentation to also be written to |
| 262 * a local file. | 257 * a local file. |
| 263 */ | 258 */ |
| 264 static const String INSTRUMENTATION_LOG_FILE = "instrumentation-log-file"; | 259 static const String INSTRUMENTATION_LOG_FILE = "instrumentation-log-file"; |
| 265 | 260 |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 } | 383 } |
| 389 } | 384 } |
| 390 | 385 |
| 391 AnalysisServerOptions analysisServerOptions = new AnalysisServerOptions(); | 386 AnalysisServerOptions analysisServerOptions = new AnalysisServerOptions(); |
| 392 analysisServerOptions.enableIncrementalResolutionApi = | 387 analysisServerOptions.enableIncrementalResolutionApi = |
| 393 results[ENABLE_INCREMENTAL_RESOLUTION_API]; | 388 results[ENABLE_INCREMENTAL_RESOLUTION_API]; |
| 394 analysisServerOptions.enableIncrementalResolutionValidation = | 389 analysisServerOptions.enableIncrementalResolutionValidation = |
| 395 results[INCREMENTAL_RESOLUTION_VALIDATION]; | 390 results[INCREMENTAL_RESOLUTION_VALIDATION]; |
| 396 analysisServerOptions.enableNewAnalysisDriver = | 391 analysisServerOptions.enableNewAnalysisDriver = |
| 397 !results[DISABLE_NEW_ANALYSIS_DRIVER]; | 392 !results[DISABLE_NEW_ANALYSIS_DRIVER]; |
| 398 analysisServerOptions.enablePubSummaryManager = | |
| 399 results[ENABLE_PUB_SUMMARY_MANAGER]; | |
| 400 analysisServerOptions.finerGrainedInvalidation = | 393 analysisServerOptions.finerGrainedInvalidation = |
| 401 results[FINER_GRAINED_INVALIDATION]; | 394 results[FINER_GRAINED_INVALIDATION]; |
| 402 analysisServerOptions.noErrorNotification = results[NO_ERROR_NOTIFICATION]; | 395 analysisServerOptions.noErrorNotification = results[NO_ERROR_NOTIFICATION]; |
| 403 analysisServerOptions.noIndex = results[NO_INDEX]; | 396 analysisServerOptions.noIndex = results[NO_INDEX]; |
| 404 analysisServerOptions.useAnalysisHighlight2 = | 397 analysisServerOptions.useAnalysisHighlight2 = |
| 405 results[USE_ANALISYS_HIGHLIGHT2]; | 398 results[USE_ANALISYS_HIGHLIGHT2]; |
| 406 analysisServerOptions.fileReadMode = results[FILE_READ_MODE]; | 399 analysisServerOptions.fileReadMode = results[FILE_READ_MODE]; |
| 407 analysisServerOptions.newAnalysisDriverLog = | 400 analysisServerOptions.newAnalysisDriverLog = |
| 408 results[NEW_ANALYSIS_DRIVER_LOG]; | 401 results[NEW_ANALYSIS_DRIVER_LOG]; |
| 409 | 402 |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 541 parser.addOption(INCREMENTAL_RESOLUTION_LOG, | 534 parser.addOption(INCREMENTAL_RESOLUTION_LOG, |
| 542 help: "set a destination for the incremental resolver's log"); | 535 help: "set a destination for the incremental resolver's log"); |
| 543 parser.addFlag(INCREMENTAL_RESOLUTION_VALIDATION, | 536 parser.addFlag(INCREMENTAL_RESOLUTION_VALIDATION, |
| 544 help: "enable validation of incremental resolution results (slow)", | 537 help: "enable validation of incremental resolution results (slow)", |
| 545 defaultsTo: false, | 538 defaultsTo: false, |
| 546 negatable: false); | 539 negatable: false); |
| 547 parser.addFlag(DISABLE_NEW_ANALYSIS_DRIVER, | 540 parser.addFlag(DISABLE_NEW_ANALYSIS_DRIVER, |
| 548 help: "disable using new analysis driver", | 541 help: "disable using new analysis driver", |
| 549 defaultsTo: false, | 542 defaultsTo: false, |
| 550 negatable: false); | 543 negatable: false); |
| 551 parser.addFlag(ENABLE_PUB_SUMMARY_MANAGER, | |
| 552 help: "enable using summaries for pub cache packages", | |
| 553 defaultsTo: false, | |
| 554 negatable: false); | |
| 555 parser.addFlag(FINER_GRAINED_INVALIDATION, | 544 parser.addFlag(FINER_GRAINED_INVALIDATION, |
| 556 help: "enable finer grained invalidation", | 545 help: "enable finer grained invalidation", |
| 557 defaultsTo: false, | 546 defaultsTo: false, |
| 558 negatable: false); | 547 negatable: false); |
| 559 parser.addOption(INSTRUMENTATION_LOG_FILE, | 548 parser.addOption(INSTRUMENTATION_LOG_FILE, |
| 560 help: | 549 help: |
| 561 "the path of the file to which instrumentation data will be written"
); | 550 "the path of the file to which instrumentation data will be written"
); |
| 562 parser.addFlag(INTERNAL_PRINT_TO_CONSOLE, | 551 parser.addFlag(INTERNAL_PRINT_TO_CONSOLE, |
| 563 help: "enable sending `print` output to the console", | 552 help: "enable sending `print` output to the console", |
| 564 defaultsTo: false, | 553 defaultsTo: false, |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 655 */ | 644 */ |
| 656 static void _rollLogFiles(String path, int numOld) { | 645 static void _rollLogFiles(String path, int numOld) { |
| 657 for (int i = numOld - 1; i >= 0; i--) { | 646 for (int i = numOld - 1; i >= 0; i--) { |
| 658 try { | 647 try { |
| 659 String oldPath = i == 0 ? path : '$path.$i'; | 648 String oldPath = i == 0 ? path : '$path.$i'; |
| 660 new File(oldPath).renameSync('$path.${i+1}'); | 649 new File(oldPath).renameSync('$path.${i+1}'); |
| 661 } catch (e) {} | 650 } catch (e) {} |
| 662 } | 651 } |
| 663 } | 652 } |
| 664 } | 653 } |
| OLD | NEW |