Index: lib/src/server/dependency_graph.dart |
diff --git a/lib/src/server/dependency_graph.dart b/lib/src/server/dependency_graph.dart |
index 9ab8d3d03d05462e833ca24a8eb556385765230e..7d66768ec092a217753d0f26c2cda919d95ac488 100644 |
--- a/lib/src/server/dependency_graph.dart |
+++ b/lib/src/server/dependency_graph.dart |
@@ -157,6 +157,22 @@ abstract class SourceNode { |
} |
} |
+/// A unique node representing all entry points in the graph. This is just for |
+/// graph algorthm convenience. |
+class EntryNode extends SourceNode { |
+ final Iterable<SourceNode> entryPoints; |
+ |
+ @override |
+ Iterable<SourceNode> get allDeps => entryPoints; |
+ |
+ @override |
+ Iterable<SourceNode> get depsWithoutParts => entryPoints; |
+ |
+ EntryNode(SourceGraph graph, Uri uri, Iterable<SourceNode> nodes) |
+ : entryPoints = nodes, |
+ super(graph, uri, null); |
+} |
+ |
/// A node representing an entry HTML source file. |
class HtmlSourceNode extends SourceNode { |
/// Resources included by default on any application. |
@@ -467,7 +483,7 @@ rebuild(SourceNode start, bool build(SourceNode node)) { |
bool shouldBuildNode(SourceNode n) { |
if (n.needsRebuild) return true; |
if (n is HtmlSourceNode) return htmlNeedsRebuild; |
- if (n is ResourceSourceNode) return false; |
+ if (n is ResourceSourceNode || n is EntryNode) return false; |
return (n as DartSourceNode) |
.imports |
.any((i) => apiChangeDetected.contains(i)); |