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

Unified Diff: pkg/analyzer/lib/src/task/dart_work_manager.dart

Issue 2229603003: Extract unresolved AST parsing (PARSED_UNIT1) from full parsing, which includes UriBasedDirective(s… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Update task graph. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/lib/src/task/dart.dart ('k') | pkg/analyzer/lib/task/dart.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/task/dart_work_manager.dart
diff --git a/pkg/analyzer/lib/src/task/dart_work_manager.dart b/pkg/analyzer/lib/src/task/dart_work_manager.dart
index f3dd0b66dbbe034df1acb3da04bbd43f8a98b183..4c36832329a06b7310e7c2a1f16c90bfd7253289 100644
--- a/pkg/analyzer/lib/src/task/dart_work_manager.dart
+++ b/pkg/analyzer/lib/src/task/dart_work_manager.dart
@@ -29,6 +29,7 @@ class DartWorkManager implements WorkManager {
BUILD_DIRECTIVES_ERRORS,
BUILD_LIBRARY_ERRORS,
PARSE_ERRORS,
+ RESOLVE_DIRECTIVES_ERRORS,
SCAN_ERRORS
];
@@ -303,10 +304,10 @@ class DartWorkManager implements WorkManager {
}
}
// Update parts in libraries.
- if (isDartLibrarySource) {
- Source library = target;
+ {
List<Source> includedParts = outputs[INCLUDED_PARTS] as List<Source>;
- if (includedParts != null) {
+ if (includedParts != null && !includedParts.isEmpty) {
+ Source library = target;
libraryPartsMap[library] = includedParts;
for (Source part in includedParts) {
List<Source> libraries =
@@ -322,7 +323,7 @@ class DartWorkManager implements WorkManager {
if (isDartSource) {
bool shouldSetErrors = false;
outputs.forEach((ResultDescriptor descriptor, value) {
- if (descriptor == PARSED_UNIT && value != null) {
+ if (descriptor == PARSED_UNIT1 && value != null) {
context.getNotice(target).parsedDartUnit = value;
shouldSetErrors = true;
}
@@ -425,6 +426,7 @@ class DartWorkManager implements WorkManager {
if (entry != null) {
// TODO(scheglov) we invalidate too much.
// Would be nice to invalidate just URLs resolution.
+ entry.setState(PARSED_UNIT1, CacheState.INVALID);
entry.setState(PARSED_UNIT, CacheState.INVALID);
entry.setState(IMPORTED_LIBRARIES, CacheState.INVALID);
entry.setState(EXPLICITLY_IMPORTED_LIBRARIES, CacheState.INVALID);
« no previous file with comments | « pkg/analyzer/lib/src/task/dart.dart ('k') | pkg/analyzer/lib/task/dart.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698