| OLD | NEW |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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 import 'dart:async'; | 5 import 'dart:async'; |
| 6 import 'dart:io'; | 6 import 'dart:io'; |
| 7 | 7 |
| 8 import 'package:front_end/compiler_options.dart'; | 8 import 'package:front_end/compiler_options.dart'; |
| 9 import 'package:front_end/dependency_grapher.dart'; | 9 import 'package:front_end/dependency_grapher.dart'; |
| 10 import 'package:path/path.dart' as pathos; | 10 import 'package:path/path.dart' as pathos; |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 'lib/src/fasta/source', | 70 'lib/src/fasta/source', |
| 71 'lib/src/fasta/util', | 71 'lib/src/fasta/util', |
| 72 ]), | 72 ]), |
| 73 'lib/src/fasta/parser': new SubpackageRules(allowedDependencies: [ | 73 'lib/src/fasta/parser': new SubpackageRules(allowedDependencies: [ |
| 74 'lib/src/fasta', | 74 'lib/src/fasta', |
| 75 'lib/src/fasta/scanner', | 75 'lib/src/fasta/scanner', |
| 76 'lib/src/fasta/util', | 76 'lib/src/fasta/util', |
| 77 ]), | 77 ]), |
| 78 'lib/src/fasta/scanner': new SubpackageRules(allowedDependencies: [ | 78 'lib/src/fasta/scanner': new SubpackageRules(allowedDependencies: [ |
| 79 'lib/src/fasta', | 79 'lib/src/fasta', |
| 80 'lib/src/fasta/parser', | |
| 81 // fasta scanner produces analyzer scanner tokens | 80 // fasta scanner produces analyzer scanner tokens |
| 82 'lib/src/scanner', | 81 'lib/src/scanner', |
| 83 'lib/src/fasta/util', | 82 'lib/src/fasta/util', |
| 84 ]), | 83 ]), |
| 85 'lib/src/fasta/source': new SubpackageRules(allowedDependencies: [ | 84 'lib/src/fasta/source': new SubpackageRules(allowedDependencies: [ |
| 86 'lib/src/fasta', | 85 'lib/src/fasta', |
| 87 'lib/src/fasta/builder', | 86 'lib/src/fasta/builder', |
| 88 'lib/src/fasta/dill', | 87 'lib/src/fasta/dill', |
| 89 'lib/src/fasta/kernel', | 88 'lib/src/fasta/kernel', |
| 90 'lib/src/fasta/parser', | 89 'lib/src/fasta/parser', |
| 91 'lib/src/fasta/scanner', | 90 'lib/src/fasta/scanner', |
| 92 'lib/src/fasta/util', | 91 'lib/src/fasta/util', |
| 93 ]), | 92 ]), |
| 94 'lib/src/fasta/testing': | 93 'lib/src/fasta/testing': |
| 95 new SubpackageRules(mayImportAnalyzer: true, allowedDependencies: [ | 94 new SubpackageRules(mayImportAnalyzer: true, allowedDependencies: [ |
| 96 'lib/src/fasta', | 95 'lib/src/fasta', |
| 97 'lib/src/fasta/dill', | 96 'lib/src/fasta/dill', |
| 98 'lib/src/fasta/kernel', | 97 'lib/src/fasta/kernel', |
| 99 'lib/src/fasta/analyzer', | 98 'lib/src/fasta/analyzer', |
| 100 'lib/src/fasta/scanner', | 99 'lib/src/fasta/scanner', |
| 101 ]), | 100 ]), |
| 102 'lib/src/fasta/util': new SubpackageRules(), | 101 'lib/src/fasta/util': new SubpackageRules(), |
| 103 'lib/src/scanner': new SubpackageRules(allowedDependencies: [ | 102 'lib/src/scanner': new SubpackageRules(allowedDependencies: [ |
| 104 'lib/src/base', | 103 'lib/src/base', |
| 104 // For error codes. |
| 105 'lib/src/fasta', |
| 105 // fasta scanner produces analyzer scanner tokens | 106 // fasta scanner produces analyzer scanner tokens |
| 106 'lib/src/fasta/scanner', | 107 'lib/src/fasta/scanner', |
| 107 ]), | 108 ]), |
| 108 }; | 109 }; |
| 109 | 110 |
| 110 /// Rules for what a subpackage may depend directly on. | 111 /// Rules for what a subpackage may depend directly on. |
| 111 class SubpackageRules { | 112 class SubpackageRules { |
| 112 /// Indicates whether the subpackage may directly depend on analyzer. | 113 /// Indicates whether the subpackage may directly depend on analyzer. |
| 113 final bool mayImportAnalyzer; | 114 final bool mayImportAnalyzer; |
| 114 | 115 |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 if (subpackageRules[subpackage].allowSubdirs) { | 264 if (subpackageRules[subpackage].allowSubdirs) { |
| 264 subpackageRules[subpackage].actuallyHasSubdirs = true; | 265 subpackageRules[subpackage].actuallyHasSubdirs = true; |
| 265 } else { | 266 } else { |
| 266 problem('Uri $src is in a subfolder of $subpackage, but that ' | 267 problem('Uri $src is in a subfolder of $subpackage, but that ' |
| 267 'subpackage does not allow dart files in subdirectories.'); | 268 'subpackage does not allow dart files in subdirectories.'); |
| 268 } | 269 } |
| 269 } | 270 } |
| 270 return subpackage; | 271 return subpackage; |
| 271 } | 272 } |
| 272 } | 273 } |
| OLD | NEW |