diff --git a/pkg/front_end/lib/src/fasta/incremental_compiler.dart b/pkg/front_end/lib/src/fasta/incremental_compiler.dart index 9975660a4fd..96d190dd456 100644 --- a/pkg/front_end/lib/src/fasta/incremental_compiler.dart +++ b/pkg/front_end/lib/src/fasta/incremental_compiler.dart @@ -106,24 +106,30 @@ class IncrementalCompiler implements IncrementalKernelGenerator { Set invalidatedFileUris = invalidatedUris.toSet(); // Maps all non-platform LibraryBuilders from their import URI. - Map builders = {}; + Map builders = {}; // Invalidated URIs translated back to their import URI (package:, dart:, // etc.). List invalidatedImportUris = []; // Compute [builders] and [invalidatedImportUris]. - userCode.loader.builders.forEach((Uri uri, LibraryBuilder library) { - if (library.loader != platform.loader) { - assert(library is SourceLibraryBuilder); + addBuilderAndInvalidateUris(Uri uri, LibraryBuilder libraryBuilder) { + if (libraryBuilder.loader != platform.loader) { + assert(libraryBuilder is SourceLibraryBuilder); + SourceLibraryBuilder library = libraryBuilder; builders[uri] = library; if (invalidatedFileUris.contains(uri) || (uri != library.fileUri && invalidatedFileUris.contains(library.fileUri))) { invalidatedImportUris.add(uri); } + for (var part in library.parts) { + addBuilderAndInvalidateUris(part.uri, part); + } } - }); + } + + userCode.loader.builders.forEach(addBuilderAndInvalidateUris); SourceGraph graph = new SourceGraph(builders); @@ -153,7 +159,7 @@ class IncrementalCompiler implements IncrementalKernelGenerator { } } - return builders.values.toList(); + return builders.values.where((builder) => !builder.isPart).toList(); } @override diff --git a/pkg/front_end/testcases/incremental.status b/pkg/front_end/testcases/incremental.status index 775e406cbc2..f14d52e3b38 100644 --- a/pkg/front_end/testcases/incremental.status +++ b/pkg/front_end/testcases/incremental.status @@ -4,7 +4,6 @@ # Status file for the test suite ../test/fasta/incremental_test.dart. -dartino/change_in_part.incremental: Fail # Issue 31908 (parts aren't handled correctly) dartino/override_field_with_method_conflict.incremental: Fail # These tests are the incremental version of tests like language_2/field_override* and language_2/override_field_method* dartino/override_getter_with_method_conflict.incremental: Fail # These tests are the incremental version of tests like language_2/field_override* and language_2/override_field_method* dartino/override_method_with_field_conflict.incremental: Fail # These tests are the incremental version of tests like language_2/field_override* and language_2/override_field_method*