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 | 6 |
7 import 'dart:collection' show HashSet, HashMap; | 7 import 'dart:collection' show HashSet, HashMap; |
8 | 8 |
9 import 'package:analyzer/analyzer.dart' show parseDirectives; | 9 import 'package:analyzer/analyzer.dart' show parseDirectives; |
10 import 'package:analyzer/src/generated/ast.dart' | 10 import 'package:analyzer/dart/ast/ast.dart' |
11 show | 11 show |
12 AstNode, | 12 AstNode, |
13 CompilationUnit, | 13 CompilationUnit, |
14 ExportDirective, | 14 ExportDirective, |
15 Identifier, | 15 Identifier, |
16 ImportDirective, | 16 ImportDirective, |
17 LibraryDirective, | 17 LibraryDirective, |
18 PartDirective, | 18 PartDirective, |
19 PartOfDirective, | 19 PartOfDirective, |
20 UriBasedDirective; | 20 UriBasedDirective; |
21 import 'package:analyzer/src/generated/engine.dart' show AnalysisContext; | 21 import 'package:analyzer/src/generated/engine.dart' show AnalysisContext; |
22 import 'package:analyzer/src/task/dart.dart' show ParseDartTask; | |
23 import 'package:analyzer/src/generated/error.dart'; | 22 import 'package:analyzer/src/generated/error.dart'; |
24 import 'package:analyzer/src/generated/source.dart' show Source, SourceKind; | 23 import 'package:analyzer/src/generated/source.dart' show Source, SourceKind; |
| 24 import 'package:analyzer/src/task/dart.dart' show ParseDartTask; |
25 import 'package:html/dom.dart' show Document, Node, Element; | 25 import 'package:html/dom.dart' show Document, Node, Element; |
26 import 'package:html/parser.dart' as html; | 26 import 'package:html/parser.dart' as html; |
27 import 'package:logging/logging.dart' show Logger, Level; | 27 import 'package:logging/logging.dart' show Logger, Level; |
28 import 'package:path/path.dart' as path; | 28 import 'package:path/path.dart' as path; |
29 | 29 |
30 import '../compiler.dart' show defaultRuntimeFiles; | 30 import '../compiler.dart' show defaultRuntimeFiles; |
31 import '../info.dart'; | 31 import '../info.dart'; |
32 import '../options.dart'; | 32 import '../options.dart'; |
33 import '../report.dart'; | 33 import '../report.dart'; |
34 import '../report/html_reporter.dart'; | 34 import '../report/html_reporter.dart'; |
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
534 var deps = includeParts ? node.allDeps : node.depsWithoutParts; | 534 var deps = includeParts ? node.allDeps : node.depsWithoutParts; |
535 deps.forEach(helper); | 535 deps.forEach(helper); |
536 action(node); | 536 action(node); |
537 } | 537 } |
538 helper(start); | 538 helper(start); |
539 } | 539 } |
540 | 540 |
541 bool _same(Set a, Set b) => a.length == b.length && a.containsAll(b); | 541 bool _same(Set a, Set b) => a.length == b.length && a.containsAll(b); |
542 | 542 |
543 final _log = new Logger('dev_compiler.dependency_graph'); | 543 final _log = new Logger('dev_compiler.dependency_graph'); |
OLD | NEW |