| OLD | NEW |
| 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 /// Tracks the shape of the import/export graph and dependencies between files. | 5 /// Tracks the shape of the import/export graph and dependencies between files. |
| 6 library dev_compiler.src.dependency_graph; | 6 library dev_compiler.src.dependency_graph; |
| 7 | 7 |
| 8 import 'dart:collection' show HashSet, HashMap; | 8 import 'dart:collection' show HashSet, HashMap; |
| 9 | 9 |
| 10 import 'package:analyzer/analyzer.dart' show parseDirectives; | 10 import 'package:analyzer/analyzer.dart' show parseDirectives; |
| 11 import 'package:analyzer/src/generated/ast.dart' | 11 import 'package:analyzer/src/generated/ast.dart' |
| 12 show | 12 show |
| 13 AstNode, | 13 AstNode, |
| 14 CompilationUnit, | 14 CompilationUnit, |
| 15 ExportDirective, | 15 ExportDirective, |
| 16 Identifier, | 16 Identifier, |
| 17 ImportDirective, | 17 ImportDirective, |
| 18 LibraryDirective, | 18 LibraryDirective, |
| 19 PartDirective, | 19 PartDirective, |
| 20 PartOfDirective, | 20 PartOfDirective, |
| 21 UriBasedDirective; | 21 UriBasedDirective; |
| 22 import 'package:analyzer/src/generated/engine.dart' | 22 import 'package:analyzer/src/generated/engine.dart' show AnalysisContext; |
| 23 show ParseDartTask, AnalysisContext; | 23 import 'package:analyzer/src/task/dart.dart' show ParseDartTask; |
| 24 import 'package:analyzer/src/generated/error.dart'; | 24 import 'package:analyzer/src/generated/error.dart'; |
| 25 import 'package:analyzer/src/generated/source.dart' show Source, SourceKind; | 25 import 'package:analyzer/src/generated/source.dart' show Source, SourceKind; |
| 26 import 'package:html/dom.dart' show Document, Node, Element; | 26 import 'package:html/dom.dart' show Document, Node, Element; |
| 27 import 'package:html/parser.dart' as html; | 27 import 'package:html/parser.dart' as html; |
| 28 import 'package:logging/logging.dart' show Logger, Level; | 28 import 'package:logging/logging.dart' show Logger, Level; |
| 29 import 'package:path/path.dart' as path; | 29 import 'package:path/path.dart' as path; |
| 30 | 30 |
| 31 import '../compiler.dart' show defaultRuntimeFiles; | 31 import '../compiler.dart' show defaultRuntimeFiles; |
| 32 import '../info.dart'; | 32 import '../info.dart'; |
| 33 import '../options.dart'; | 33 import '../options.dart'; |
| (...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 519 var deps = includeParts ? node.allDeps : node.depsWithoutParts; | 519 var deps = includeParts ? node.allDeps : node.depsWithoutParts; |
| 520 deps.forEach(helper); | 520 deps.forEach(helper); |
| 521 action(node); | 521 action(node); |
| 522 } | 522 } |
| 523 helper(start); | 523 helper(start); |
| 524 } | 524 } |
| 525 | 525 |
| 526 bool _same(Set a, Set b) => a.length == b.length && a.containsAll(b); | 526 bool _same(Set a, Set b) => a.length == b.length && a.containsAll(b); |
| 527 | 527 |
| 528 final _log = new Logger('dev_compiler.dependency_graph'); | 528 final _log = new Logger('dev_compiler.dependency_graph'); |
| OLD | NEW |