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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 /** | 238 /** |
239 * The name of the option used to enable validation of incremental resolution | 239 * The name of the option used to enable validation of incremental resolution |
240 * results. | 240 * results. |
241 */ | 241 */ |
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 enable using pub summary manager. | 246 * The name of the option used to enable using pub summary manager. |
247 */ | 247 */ |
| 248 static const String ENABLE_NEW_ANALYSIS_DRIVER = 'enable-new-analysis-driver'; |
| 249 |
| 250 /** |
| 251 * The name of the option used to enable using pub summary manager. |
| 252 */ |
248 static const String ENABLE_PUB_SUMMARY_MANAGER = 'enable-pub-summary-manager'; | 253 static const String ENABLE_PUB_SUMMARY_MANAGER = 'enable-pub-summary-manager'; |
249 | 254 |
250 /** | 255 /** |
251 * The name of the option used to enable fined grained invalidation. | 256 * The name of the option used to enable fined grained invalidation. |
252 */ | 257 */ |
253 static const String FINER_GRAINED_INVALIDATION = 'finer-grained-invalidation'; | 258 static const String FINER_GRAINED_INVALIDATION = 'finer-grained-invalidation'; |
254 | 259 |
255 /** | 260 /** |
256 * The name of the option used to cause instrumentation to also be written to | 261 * The name of the option used to cause instrumentation to also be written to |
257 * a local file. | 262 * a local file. |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 exitCode = 1; | 381 exitCode = 1; |
377 return; | 382 return; |
378 } | 383 } |
379 } | 384 } |
380 | 385 |
381 AnalysisServerOptions analysisServerOptions = new AnalysisServerOptions(); | 386 AnalysisServerOptions analysisServerOptions = new AnalysisServerOptions(); |
382 analysisServerOptions.enableIncrementalResolutionApi = | 387 analysisServerOptions.enableIncrementalResolutionApi = |
383 results[ENABLE_INCREMENTAL_RESOLUTION_API]; | 388 results[ENABLE_INCREMENTAL_RESOLUTION_API]; |
384 analysisServerOptions.enableIncrementalResolutionValidation = | 389 analysisServerOptions.enableIncrementalResolutionValidation = |
385 results[INCREMENTAL_RESOLUTION_VALIDATION]; | 390 results[INCREMENTAL_RESOLUTION_VALIDATION]; |
| 391 analysisServerOptions.enableNewAnalysisDriver = |
| 392 results[ENABLE_NEW_ANALYSIS_DRIVER]; |
386 analysisServerOptions.enablePubSummaryManager = | 393 analysisServerOptions.enablePubSummaryManager = |
387 results[ENABLE_PUB_SUMMARY_MANAGER]; | 394 results[ENABLE_PUB_SUMMARY_MANAGER]; |
388 analysisServerOptions.finerGrainedInvalidation = | 395 analysisServerOptions.finerGrainedInvalidation = |
389 true /*results[FINER_GRAINED_INVALIDATION]*/; | 396 true /*results[FINER_GRAINED_INVALIDATION]*/; |
390 analysisServerOptions.noErrorNotification = results[NO_ERROR_NOTIFICATION]; | 397 analysisServerOptions.noErrorNotification = results[NO_ERROR_NOTIFICATION]; |
391 analysisServerOptions.noIndex = results[NO_INDEX]; | 398 analysisServerOptions.noIndex = results[NO_INDEX]; |
392 analysisServerOptions.useAnalysisHighlight2 = | 399 analysisServerOptions.useAnalysisHighlight2 = |
393 results[USE_ANALISYS_HIGHLIGHT2]; | 400 results[USE_ANALISYS_HIGHLIGHT2]; |
394 analysisServerOptions.fileReadMode = results[FILE_READ_MODE]; | 401 analysisServerOptions.fileReadMode = results[FILE_READ_MODE]; |
395 | 402 |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
525 parser.addFlag(HELP_OPTION, | 532 parser.addFlag(HELP_OPTION, |
526 help: "print this help message without starting a server", | 533 help: "print this help message without starting a server", |
527 defaultsTo: false, | 534 defaultsTo: false, |
528 negatable: false); | 535 negatable: false); |
529 parser.addOption(INCREMENTAL_RESOLUTION_LOG, | 536 parser.addOption(INCREMENTAL_RESOLUTION_LOG, |
530 help: "set a destination for the incremental resolver's log"); | 537 help: "set a destination for the incremental resolver's log"); |
531 parser.addFlag(INCREMENTAL_RESOLUTION_VALIDATION, | 538 parser.addFlag(INCREMENTAL_RESOLUTION_VALIDATION, |
532 help: "enable validation of incremental resolution results (slow)", | 539 help: "enable validation of incremental resolution results (slow)", |
533 defaultsTo: false, | 540 defaultsTo: false, |
534 negatable: false); | 541 negatable: false); |
| 542 parser.addFlag(ENABLE_NEW_ANALYSIS_DRIVER, |
| 543 help: "enable using new analysis driver", |
| 544 defaultsTo: false, |
| 545 negatable: false); |
535 parser.addFlag(ENABLE_PUB_SUMMARY_MANAGER, | 546 parser.addFlag(ENABLE_PUB_SUMMARY_MANAGER, |
536 help: "enable using summaries for pub cache packages", | 547 help: "enable using summaries for pub cache packages", |
537 defaultsTo: false, | 548 defaultsTo: false, |
538 negatable: false); | 549 negatable: false); |
539 parser.addFlag(FINER_GRAINED_INVALIDATION, | 550 parser.addFlag(FINER_GRAINED_INVALIDATION, |
540 help: "enable finer grained invalidation", | 551 help: "enable finer grained invalidation", |
541 defaultsTo: false, | 552 defaultsTo: false, |
542 negatable: false); | 553 negatable: false); |
543 parser.addOption(INSTRUMENTATION_LOG_FILE, | 554 parser.addOption(INSTRUMENTATION_LOG_FILE, |
544 help: | 555 help: |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
637 */ | 648 */ |
638 static void _rollLogFiles(String path, int numOld) { | 649 static void _rollLogFiles(String path, int numOld) { |
639 for (int i = numOld - 1; i >= 0; i--) { | 650 for (int i = numOld - 1; i >= 0; i--) { |
640 try { | 651 try { |
641 String oldPath = i == 0 ? path : '$path.$i'; | 652 String oldPath = i == 0 ? path : '$path.$i'; |
642 new File(oldPath).renameSync('$path.${i+1}'); | 653 new File(oldPath).renameSync('$path.${i+1}'); |
643 } catch (e) {} | 654 } catch (e) {} |
644 } | 655 } |
645 } | 656 } |
646 } | 657 } |
OLD | NEW |