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

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

Issue 2091883002: Add '--finer-grained-invalidation' option to Analysis Server. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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
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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 static const String INCREMENTAL_RESOLUTION_LOG = "incremental-resolution-log"; 237 static const String INCREMENTAL_RESOLUTION_LOG = "incremental-resolution-log";
238 238
239 /** 239 /**
240 * The name of the option used to enable validation of incremental resolution 240 * The name of the option used to enable validation of incremental resolution
241 * results. 241 * results.
242 */ 242 */
243 static const String INCREMENTAL_RESOLUTION_VALIDATION = 243 static const String INCREMENTAL_RESOLUTION_VALIDATION =
244 "incremental-resolution-validation"; 244 "incremental-resolution-validation";
245 245
246 /** 246 /**
247 * The name of the option used to enable fined grained invalidation.
248 */
249 static const String FINER_GRAINED_INVALIDATION = 'finer-grained-invalidation';
250
251 /**
247 * 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
248 * a local file. 253 * a local file.
249 */ 254 */
250 static const String INSTRUMENTATION_LOG_FILE = "instrumentation-log-file"; 255 static const String INSTRUMENTATION_LOG_FILE = "instrumentation-log-file";
251 256
252 /** 257 /**
253 * 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
254 * console instead of being intercepted. 259 * console instead of being intercepted.
255 */ 260 */
256 static const String INTERNAL_DELAY_FREQUENCY = 'internal-delay-frequency'; 261 static const String INTERNAL_DELAY_FREQUENCY = 'internal-delay-frequency';
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 exitCode = 1; 372 exitCode = 1;
368 return; 373 return;
369 } 374 }
370 } 375 }
371 376
372 AnalysisServerOptions analysisServerOptions = new AnalysisServerOptions(); 377 AnalysisServerOptions analysisServerOptions = new AnalysisServerOptions();
373 analysisServerOptions.enableIncrementalResolutionApi = 378 analysisServerOptions.enableIncrementalResolutionApi =
374 results[ENABLE_INCREMENTAL_RESOLUTION_API]; 379 results[ENABLE_INCREMENTAL_RESOLUTION_API];
375 analysisServerOptions.enableIncrementalResolutionValidation = 380 analysisServerOptions.enableIncrementalResolutionValidation =
376 results[INCREMENTAL_RESOLUTION_VALIDATION]; 381 results[INCREMENTAL_RESOLUTION_VALIDATION];
382 analysisServerOptions.finerGrainedInvalidation =
383 results[FINER_GRAINED_INVALIDATION];
377 analysisServerOptions.noErrorNotification = results[NO_ERROR_NOTIFICATION]; 384 analysisServerOptions.noErrorNotification = results[NO_ERROR_NOTIFICATION];
378 analysisServerOptions.noIndex = results[NO_INDEX]; 385 analysisServerOptions.noIndex = results[NO_INDEX];
379 analysisServerOptions.useAnalysisHighlight2 = 386 analysisServerOptions.useAnalysisHighlight2 =
380 results[USE_ANALISYS_HIGHLIGHT2]; 387 results[USE_ANALISYS_HIGHLIGHT2];
381 analysisServerOptions.fileReadMode = results[FILE_READ_MODE]; 388 analysisServerOptions.fileReadMode = results[FILE_READ_MODE];
382 389
383 _initIncrementalLogger(results[INCREMENTAL_RESOLUTION_LOG]); 390 _initIncrementalLogger(results[INCREMENTAL_RESOLUTION_LOG]);
384 391
385 // 392 //
386 // Process all of the plugins so that extensions are registered. 393 // Process all of the plugins so that extensions are registered.
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 parser.addFlag(HELP_OPTION, 524 parser.addFlag(HELP_OPTION,
518 help: "print this help message without starting a server", 525 help: "print this help message without starting a server",
519 defaultsTo: false, 526 defaultsTo: false,
520 negatable: false); 527 negatable: false);
521 parser.addOption(INCREMENTAL_RESOLUTION_LOG, 528 parser.addOption(INCREMENTAL_RESOLUTION_LOG,
522 help: "set a destination for the incremental resolver's log"); 529 help: "set a destination for the incremental resolver's log");
523 parser.addFlag(INCREMENTAL_RESOLUTION_VALIDATION, 530 parser.addFlag(INCREMENTAL_RESOLUTION_VALIDATION,
524 help: "enable validation of incremental resolution results (slow)", 531 help: "enable validation of incremental resolution results (slow)",
525 defaultsTo: false, 532 defaultsTo: false,
526 negatable: false); 533 negatable: false);
534 parser.addFlag(FINER_GRAINED_INVALIDATION,
535 help: "enable finer grained invalidation",
536 defaultsTo: false,
537 negatable: false);
527 parser.addOption(INSTRUMENTATION_LOG_FILE, 538 parser.addOption(INSTRUMENTATION_LOG_FILE,
528 help: 539 help:
529 "the path of the file to which instrumentation data will be written" ); 540 "the path of the file to which instrumentation data will be written" );
530 parser.addFlag(INTERNAL_PRINT_TO_CONSOLE, 541 parser.addFlag(INTERNAL_PRINT_TO_CONSOLE,
531 help: "enable sending `print` output to the console", 542 help: "enable sending `print` output to the console",
532 defaultsTo: false, 543 defaultsTo: false,
533 negatable: false); 544 negatable: false);
534 parser.addOption(PORT_OPTION, 545 parser.addOption(PORT_OPTION,
535 help: "the http diagnostic port on which the server provides" 546 help: "the http diagnostic port on which the server provides"
536 " status and performance information"); 547 " status and performance information");
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 */ 623 */
613 static void _rollLogFiles(String path, int numOld) { 624 static void _rollLogFiles(String path, int numOld) {
614 for (int i = numOld - 1; i >= 0; i--) { 625 for (int i = numOld - 1; i >= 0; i--) {
615 try { 626 try {
616 String oldPath = i == 0 ? path : '$path.$i'; 627 String oldPath = i == 0 ? path : '$path.$i';
617 new File(oldPath).renameSync('$path.${i+1}'); 628 new File(oldPath).renameSync('$path.${i+1}');
618 } catch (e) {} 629 } catch (e) {}
619 } 630 }
620 } 631 }
621 } 632 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/analysis_server.dart ('k') | pkg/analyzer/lib/src/context/context.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698