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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 'lib/src/scanner': new SubpackageRules(allowedDependencies: [ | 132 'lib/src/scanner': new SubpackageRules(allowedDependencies: [ |
133 'lib/src/base', | 133 'lib/src/base', |
134 // For error codes. | 134 // For error codes. |
135 'lib/src/fasta', | 135 'lib/src/fasta', |
136 // fasta scanner produces analyzer scanner tokens | 136 // fasta scanner produces analyzer scanner tokens |
137 'lib/src/fasta/scanner', | 137 'lib/src/fasta/scanner', |
138 ]), | 138 ]), |
139 'lib/src/testing': new SubpackageRules(allowedDependencies: [ | 139 'lib/src/testing': new SubpackageRules(allowedDependencies: [ |
140 'lib', | 140 'lib', |
141 ]), | 141 ]), |
142 'lib/src/vm': new SubpackageRules(allowedDependencies: []), | |
143 }; | 142 }; |
144 | 143 |
145 /// Rules for what a subpackage may depend directly on. | 144 /// Rules for what a subpackage may depend directly on. |
146 class SubpackageRules { | 145 class SubpackageRules { |
147 /// Indicates whether the subpackage may directly depend on analyzer. | 146 /// Indicates whether the subpackage may directly depend on analyzer. |
148 final bool mayImportAnalyzer; | 147 final bool mayImportAnalyzer; |
149 | 148 |
150 /// Indicates whether dart files may exist in subdirectories of this | 149 /// Indicates whether dart files may exist in subdirectories of this |
151 /// subpackage. | 150 /// subpackage. |
152 /// | 151 /// |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 if (subpackageRules[subpackage].allowSubdirs) { | 297 if (subpackageRules[subpackage].allowSubdirs) { |
299 subpackageRules[subpackage].actuallyHasSubdirs = true; | 298 subpackageRules[subpackage].actuallyHasSubdirs = true; |
300 } else { | 299 } else { |
301 problem('Uri $src is in a subfolder of $subpackage, but that ' | 300 problem('Uri $src is in a subfolder of $subpackage, but that ' |
302 'subpackage does not allow dart files in subdirectories.'); | 301 'subpackage does not allow dart files in subdirectories.'); |
303 } | 302 } |
304 } | 303 } |
305 return subpackage; | 304 return subpackage; |
306 } | 305 } |
307 } | 306 } |
OLD | NEW |