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

Side by Side Diff: pkg/analyzer/lib/src/task/dart_work_manager.dart

Issue 2008133002: Fix cross-partition dependency handling (issue 26466) (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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) 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.src.task.dart_work_manager; 5 library analyzer.src.task.dart_work_manager;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analyzer/src/context/cache.dart'; 9 import 'package:analyzer/src/context/cache.dart';
10 import 'package:analyzer/src/generated/engine.dart' 10 import 'package:analyzer/src/generated/engine.dart'
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 /** 75 /**
76 * A table mapping part sources to the library sources that include them. 76 * A table mapping part sources to the library sources that include them.
77 */ 77 */
78 final HashMap<Source, List<Source>> partLibrariesMap = 78 final HashMap<Source, List<Source>> partLibrariesMap =
79 new HashMap<Source, List<Source>>(); 79 new HashMap<Source, List<Source>>();
80 80
81 /** 81 /**
82 * Initialize a newly created manager. 82 * Initialize a newly created manager.
83 */ 83 */
84 DartWorkManager(this.context) { 84 DartWorkManager(this.context) {
85 analysisCache.onResultInvalidated.listen((InvalidatedResult event) { 85 context.onResultInvalidated.listen((InvalidatedResult event) {
86 if (event.descriptor == LIBRARY_ERRORS_READY) { 86 if (event.descriptor == LIBRARY_ERRORS_READY) {
87 CacheEntry entry = event.entry; 87 CacheEntry entry = event.entry;
88 if (entry.explicitlyAdded && 88 if (entry.explicitlyAdded &&
89 entry.getValue(SOURCE_KIND) == SourceKind.LIBRARY) { 89 entry.getValue(SOURCE_KIND) == SourceKind.LIBRARY) {
90 librarySourceQueue.add(entry.target); 90 librarySourceQueue.add(entry.target);
91 } 91 }
92 } 92 }
93 }); 93 });
94 } 94 }
95 95
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 } 470 }
471 } 471 }
472 472
473 bool _shouldErrorsBeComputed(Source source) => 473 bool _shouldErrorsBeComputed(Source source) =>
474 context.shouldErrorsBeAnalyzed(source); 474 context.shouldErrorsBeAnalyzed(source);
475 475
476 static bool _isDartSource(AnalysisTarget target) { 476 static bool _isDartSource(AnalysisTarget target) {
477 return target is Source && AnalysisEngine.isDartFileName(target.fullName); 477 return target is Source && AnalysisEngine.isDartFileName(target.fullName);
478 } 478 }
479 } 479 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698