Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(108)

Side by Side Diff: pkg/analysis_server/lib/src/server/driver.dart

Issue 2243003002: Add a new Analysis Server flag '--enable-pub-summary-manager'. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pkg/analysis_server/lib/src/analysis_server.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 static const String INCREMENTAL_RESOLUTION_LOG = "incremental-resolution-log"; 236 static const String INCREMENTAL_RESOLUTION_LOG = "incremental-resolution-log";
237 237
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.
247 */
248 static const String ENABLE_PUB_SUMMARY_MANAGER = 'enable-pub-summary-manager';
249
250 /**
246 * The name of the option used to enable fined grained invalidation. 251 * The name of the option used to enable fined grained invalidation.
247 */ 252 */
248 static const String FINER_GRAINED_INVALIDATION = 'finer-grained-invalidation'; 253 static const String FINER_GRAINED_INVALIDATION = 'finer-grained-invalidation';
249 254
250 /** 255 /**
251 * 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
252 * a local file. 257 * a local file.
253 */ 258 */
254 static const String INSTRUMENTATION_LOG_FILE = "instrumentation-log-file"; 259 static const String INSTRUMENTATION_LOG_FILE = "instrumentation-log-file";
255 260
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 exitCode = 1; 376 exitCode = 1;
372 return; 377 return;
373 } 378 }
374 } 379 }
375 380
376 AnalysisServerOptions analysisServerOptions = new AnalysisServerOptions(); 381 AnalysisServerOptions analysisServerOptions = new AnalysisServerOptions();
377 analysisServerOptions.enableIncrementalResolutionApi = 382 analysisServerOptions.enableIncrementalResolutionApi =
378 results[ENABLE_INCREMENTAL_RESOLUTION_API]; 383 results[ENABLE_INCREMENTAL_RESOLUTION_API];
379 analysisServerOptions.enableIncrementalResolutionValidation = 384 analysisServerOptions.enableIncrementalResolutionValidation =
380 results[INCREMENTAL_RESOLUTION_VALIDATION]; 385 results[INCREMENTAL_RESOLUTION_VALIDATION];
386 analysisServerOptions.enablePubSummaryManager =
387 results[ENABLE_PUB_SUMMARY_MANAGER];
381 analysisServerOptions.finerGrainedInvalidation = 388 analysisServerOptions.finerGrainedInvalidation =
382 results[FINER_GRAINED_INVALIDATION]; 389 results[FINER_GRAINED_INVALIDATION];
383 analysisServerOptions.noErrorNotification = results[NO_ERROR_NOTIFICATION]; 390 analysisServerOptions.noErrorNotification = results[NO_ERROR_NOTIFICATION];
384 analysisServerOptions.noIndex = results[NO_INDEX]; 391 analysisServerOptions.noIndex = results[NO_INDEX];
385 analysisServerOptions.useAnalysisHighlight2 = 392 analysisServerOptions.useAnalysisHighlight2 =
386 results[USE_ANALISYS_HIGHLIGHT2]; 393 results[USE_ANALISYS_HIGHLIGHT2];
387 analysisServerOptions.fileReadMode = results[FILE_READ_MODE]; 394 analysisServerOptions.fileReadMode = results[FILE_READ_MODE];
388 395
389 _initIncrementalLogger(results[INCREMENTAL_RESOLUTION_LOG]); 396 _initIncrementalLogger(results[INCREMENTAL_RESOLUTION_LOG]);
390 397
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 parser.addFlag(HELP_OPTION, 534 parser.addFlag(HELP_OPTION,
528 help: "print this help message without starting a server", 535 help: "print this help message without starting a server",
529 defaultsTo: false, 536 defaultsTo: false,
530 negatable: false); 537 negatable: false);
531 parser.addOption(INCREMENTAL_RESOLUTION_LOG, 538 parser.addOption(INCREMENTAL_RESOLUTION_LOG,
532 help: "set a destination for the incremental resolver's log"); 539 help: "set a destination for the incremental resolver's log");
533 parser.addFlag(INCREMENTAL_RESOLUTION_VALIDATION, 540 parser.addFlag(INCREMENTAL_RESOLUTION_VALIDATION,
534 help: "enable validation of incremental resolution results (slow)", 541 help: "enable validation of incremental resolution results (slow)",
535 defaultsTo: false, 542 defaultsTo: false,
536 negatable: false); 543 negatable: false);
544 parser.addFlag(ENABLE_PUB_SUMMARY_MANAGER,
545 help: "enable using summaries for pub cache packages",
546 defaultsTo: false,
547 negatable: false);
537 parser.addFlag(FINER_GRAINED_INVALIDATION, 548 parser.addFlag(FINER_GRAINED_INVALIDATION,
538 help: "enable finer grained invalidation", 549 help: "enable finer grained invalidation",
539 defaultsTo: false, 550 defaultsTo: false,
540 negatable: false); 551 negatable: false);
541 parser.addOption(INSTRUMENTATION_LOG_FILE, 552 parser.addOption(INSTRUMENTATION_LOG_FILE,
542 help: 553 help:
543 "the path of the file to which instrumentation data will be written" ); 554 "the path of the file to which instrumentation data will be written" );
544 parser.addFlag(INTERNAL_PRINT_TO_CONSOLE, 555 parser.addFlag(INTERNAL_PRINT_TO_CONSOLE,
545 help: "enable sending `print` output to the console", 556 help: "enable sending `print` output to the console",
546 defaultsTo: false, 557 defaultsTo: false,
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 */ 637 */
627 static void _rollLogFiles(String path, int numOld) { 638 static void _rollLogFiles(String path, int numOld) {
628 for (int i = numOld - 1; i >= 0; i--) { 639 for (int i = numOld - 1; i >= 0; i--) {
629 try { 640 try {
630 String oldPath = i == 0 ? path : '$path.$i'; 641 String oldPath = i == 0 ? path : '$path.$i';
631 new File(oldPath).renameSync('$path.${i+1}'); 642 new File(oldPath).renameSync('$path.${i+1}');
632 } catch (e) {} 643 } catch (e) {}
633 } 644 }
634 } 645 }
635 } 646 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/analysis_server.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698