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

Unified Diff: lib/src/server/dependency_graph.dart

Issue 1266483003: format with dart_style 0.2.0-rc.3 (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 5 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 | « lib/src/options.dart ('k') | lib/src/server/server.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/server/dependency_graph.dart
diff --git a/lib/src/server/dependency_graph.dart b/lib/src/server/dependency_graph.dart
index 055dc01ec72f313e933662a9d94b67c5e3ccf0ba..4a591bc9b2fdc784a4c7ac419fd81fe158c4046d 100644
--- a/lib/src/server/dependency_graph.dart
+++ b/lib/src/server/dependency_graph.dart
@@ -197,7 +197,9 @@ class HtmlSourceNode extends SourceNode {
for (var script in tags) {
var src = script.attributes['src'];
if (src == null) {
- _reportError(graph, 'inlined script tags not supported at this time '
+ _reportError(
+ graph,
+ 'inlined script tags not supported at this time '
'(see https://github.com/dart-lang/dart-dev-compiler/issues/54).',
script);
continue;
@@ -452,32 +454,36 @@ rebuild(SourceNode start, bool build(SourceNode node)) {
if (n.needsRebuild) return true;
if (n is HtmlSourceNode) return htmlNeedsRebuild;
if (n is ResourceSourceNode) return false;
- return (n as DartSourceNode).imports
+ return (n as DartSourceNode)
+ .imports
.any((i) => apiChangeDetected.contains(i));
}
- visitInPostOrder(start, (n) {
- if (n.structureChanged) htmlNeedsRebuild = true;
- if (shouldBuildNode(n)) {
- var oldHash = n.cachingHash;
- if (build(n)) apiChangeDetected.add(n);
- if (oldHash != n.cachingHash) htmlNeedsRebuild = true;
- } else if (n is DartSourceNode &&
- n.exports.any((e) => apiChangeDetected.contains(e))) {
- apiChangeDetected.add(n);
- }
- n.needsRebuild = false;
- n.structureChanged = false;
- if (n is DartSourceNode) {
- // Note: clearing out flags in the parts could be a problem if someone
- // tries to use a file both as a part and a library at the same time.
- // In that case, we might not correctly propagate changes in the places
- // where it is used as a library. Technically it's not allowed to have a
- // file as a part and a library at once, and the analyzer should report an
- // error in that case.
- n.parts.forEach((p) => p.needsRebuild = p.structureChanged = false);
- }
- }, includeParts: false);
+ visitInPostOrder(
+ start,
+ (n) {
+ if (n.structureChanged) htmlNeedsRebuild = true;
+ if (shouldBuildNode(n)) {
+ var oldHash = n.cachingHash;
+ if (build(n)) apiChangeDetected.add(n);
+ if (oldHash != n.cachingHash) htmlNeedsRebuild = true;
+ } else if (n is DartSourceNode &&
+ n.exports.any((e) => apiChangeDetected.contains(e))) {
+ apiChangeDetected.add(n);
+ }
+ n.needsRebuild = false;
+ n.structureChanged = false;
+ if (n is DartSourceNode) {
+ // Note: clearing out flags in the parts could be a problem if someone
+ // tries to use a file both as a part and a library at the same time.
+ // In that case, we might not correctly propagate changes in the
+ // places where it is used as a library.
+ // Technically it's not allowed to have a file as a part and a library
+ // at once, and the analyzer should report an error in that case.
+ n.parts.forEach((p) => p.needsRebuild = p.structureChanged = false);
+ }
+ },
+ includeParts: false);
}
/// Helper that runs [action] on nodes reachable from [start] in pre-order.
« no previous file with comments | « lib/src/options.dart ('k') | lib/src/server/server.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698