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

Side by Side Diff: pkg/analyzer_cli/lib/src/build_mode.dart

Issue 1897973005: Clear analyzer caches after each persistent worker build step. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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 | « no previous file | 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 analyzer_cli.src.build_mode; 5 library analyzer_cli.src.build_mode;
6 6
7 import 'dart:core' hide Resource; 7 import 'dart:core' hide Resource;
8 import 'dart:io' as io; 8 import 'dart:io' as io;
9 9
10 import 'package:analyzer/dart/ast/ast.dart' show CompilationUnit; 10 import 'package:analyzer/dart/ast/ast.dart' show CompilationUnit;
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 SyncWorkerConnection connection = new StdSyncWorkerConnection( 290 SyncWorkerConnection connection = new StdSyncWorkerConnection(
291 stdinStream: stdinStream, stdoutStream: stdoutStream); 291 stdinStream: stdinStream, stdoutStream: stdoutStream);
292 return new AnalyzerWorkerLoop(connection, dartSdkPath: dartSdkPath); 292 return new AnalyzerWorkerLoop(connection, dartSdkPath: dartSdkPath);
293 } 293 }
294 294
295 /** 295 /**
296 * Performs analysis with given [options]. 296 * Performs analysis with given [options].
297 */ 297 */
298 void analyze(CommandLineOptions options) { 298 void analyze(CommandLineOptions options) {
299 new BuildMode(options, new AnalysisStats()).analyze(); 299 new BuildMode(options, new AnalysisStats()).analyze();
300 AnalysisEngine.instance.clearCaches();
300 } 301 }
301 302
302 /** 303 /**
303 * Perform a single loop step. 304 * Perform a single loop step.
304 */ 305 */
305 WorkResponse performRequest(WorkRequest request) { 306 WorkResponse performRequest(WorkRequest request) {
306 errorBuffer.clear(); 307 errorBuffer.clear();
307 outBuffer.clear(); 308 outBuffer.clear();
308 try { 309 try {
309 // Add in the dart-sdk argument if `dartSdkPath` is not null, otherwise it 310 // Add in the dart-sdk argument if `dartSdkPath` is not null, otherwise it
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 String msg = ''; 351 String msg = '';
351 if (errorBuffer.isNotEmpty) { 352 if (errorBuffer.isNotEmpty) {
352 msg += errorBuffer.toString() + '\n'; 353 msg += errorBuffer.toString() + '\n';
353 } 354 }
354 if (outBuffer.isNotEmpty) { 355 if (outBuffer.isNotEmpty) {
355 msg += outBuffer.toString() + '\n'; 356 msg += outBuffer.toString() + '\n';
356 } 357 }
357 return msg; 358 return msg;
358 } 359 }
359 } 360 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698