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 13 matching lines...) Expand all Loading... |
24 /// TODO(paulberry): remove dependencies on analyzer. | 24 /// TODO(paulberry): remove dependencies on analyzer. |
25 final subpackageRules = { | 25 final subpackageRules = { |
26 'lib': new SubpackageRules( | 26 'lib': new SubpackageRules( |
27 mayImportAnalyzer: true, | 27 mayImportAnalyzer: true, |
28 allowedDependencies: ['lib/src', 'lib/src/base']), | 28 allowedDependencies: ['lib/src', 'lib/src/base']), |
29 'lib/src': new SubpackageRules( | 29 'lib/src': new SubpackageRules( |
30 mayImportAnalyzer: true, | 30 mayImportAnalyzer: true, |
31 allowedDependencies: ['lib', 'lib/src/base', 'lib/src/scanner']), | 31 allowedDependencies: ['lib', 'lib/src/base', 'lib/src/scanner']), |
32 'lib/src/base': new SubpackageRules( | 32 'lib/src/base': new SubpackageRules( |
33 mayImportAnalyzer: true, allowedDependencies: ['lib']), | 33 mayImportAnalyzer: true, allowedDependencies: ['lib']), |
| 34 'lib/src/codegen': new SubpackageRules(), |
34 'lib/src/fasta': | 35 'lib/src/fasta': |
35 new SubpackageRules(mayImportAnalyzer: false, allowedDependencies: [ | 36 new SubpackageRules(mayImportAnalyzer: false, allowedDependencies: [ |
36 'lib/src/fasta/builder', | 37 'lib/src/fasta/builder', |
37 'lib/src/fasta/dill', | 38 'lib/src/fasta/dill', |
38 'lib/src/fasta/kernel', | 39 'lib/src/fasta/kernel', |
39 'lib/src/fasta/parser', | 40 'lib/src/fasta/parser', |
40 'lib/src/fasta/scanner', | 41 'lib/src/fasta/scanner', |
41 'lib/src/fasta/testing', | 42 'lib/src/fasta/testing', |
42 'lib/src/fasta/util', | 43 'lib/src/fasta/util', |
43 ]), | 44 ]), |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 problem('Uri $src is inside package:front_end but is not in any known ' | 235 problem('Uri $src is inside package:front_end but is not in any known ' |
235 'subpackage'); | 236 'subpackage'); |
236 } else if (!subpackageRules[subpackage].allowSubdirs && | 237 } else if (!subpackageRules[subpackage].allowSubdirs && |
237 pathWithinSubpackage.contains('/')) { | 238 pathWithinSubpackage.contains('/')) { |
238 problem('Uri $src is in a subfolder of $subpackage, but that ' | 239 problem('Uri $src is in a subfolder of $subpackage, but that ' |
239 'subpackage does not allow dart files in subdirectories.'); | 240 'subpackage does not allow dart files in subdirectories.'); |
240 } | 241 } |
241 return subpackage; | 242 return subpackage; |
242 } | 243 } |
243 } | 244 } |
OLD | NEW |