| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 new SubpackageRules(mayImportAnalyzer: true, allowedDependencies: [ | 45 new SubpackageRules(mayImportAnalyzer: true, allowedDependencies: [ |
| 46 'lib/src/scanner', | 46 'lib/src/scanner', |
| 47 'lib/src/fasta', | 47 'lib/src/fasta', |
| 48 'lib/src/fasta/builder', | 48 'lib/src/fasta/builder', |
| 49 'lib/src/fasta/dill', | 49 'lib/src/fasta/dill', |
| 50 'lib/src/fasta/kernel', | 50 'lib/src/fasta/kernel', |
| 51 'lib/src/fasta/parser', | 51 'lib/src/fasta/parser', |
| 52 'lib/src/fasta/scanner', | 52 'lib/src/fasta/scanner', |
| 53 'lib/src/fasta/source', | 53 'lib/src/fasta/source', |
| 54 ]), | 54 ]), |
| 55 'lib/src/fasta/bin': new SubpackageRules(allowedDependencies: [ | |
| 56 'lib/src/fasta', | |
| 57 ]), | |
| 58 'lib/src/fasta/builder': new SubpackageRules(allowedDependencies: [ | 55 'lib/src/fasta/builder': new SubpackageRules(allowedDependencies: [ |
| 59 'lib/src/fasta', | 56 'lib/src/fasta', |
| 60 'lib/src/fasta/dill', | 57 'lib/src/fasta/dill', |
| 61 'lib/src/fasta/parser', | 58 'lib/src/fasta/parser', |
| 62 'lib/src/fasta/source', | 59 'lib/src/fasta/source', |
| 63 'lib/src/fasta/util', | 60 'lib/src/fasta/util', |
| 64 ]), | 61 ]), |
| 65 'lib/src/fasta/dill': new SubpackageRules(allowedDependencies: [ | 62 'lib/src/fasta/dill': new SubpackageRules(allowedDependencies: [ |
| 66 'lib/src/fasta', | 63 'lib/src/fasta', |
| 67 'lib/src/fasta/kernel', | 64 'lib/src/fasta/kernel', |
| (...skipping 27 matching lines...) Expand all Loading... |
| 95 'lib/src/fasta/parser', | 92 'lib/src/fasta/parser', |
| 96 'lib/src/fasta/scanner', | 93 'lib/src/fasta/scanner', |
| 97 'lib/src/fasta/util', | 94 'lib/src/fasta/util', |
| 98 ]), | 95 ]), |
| 99 'lib/src/fasta/testing': | 96 'lib/src/fasta/testing': |
| 100 new SubpackageRules(mayImportAnalyzer: true, allowedDependencies: [ | 97 new SubpackageRules(mayImportAnalyzer: true, allowedDependencies: [ |
| 101 'lib/src/fasta', | 98 'lib/src/fasta', |
| 102 'lib/src/fasta/dill', | 99 'lib/src/fasta/dill', |
| 103 'lib/src/fasta/kernel', | 100 'lib/src/fasta/kernel', |
| 104 'lib/src/fasta/analyzer', | 101 'lib/src/fasta/analyzer', |
| 102 'lib/src/fasta/scanner', |
| 105 ]), | 103 ]), |
| 106 'lib/src/fasta/util': new SubpackageRules(), | 104 'lib/src/fasta/util': new SubpackageRules(), |
| 107 'lib/src/scanner': new SubpackageRules(allowedDependencies: [ | 105 'lib/src/scanner': new SubpackageRules(allowedDependencies: [ |
| 108 'lib/src/base', | 106 'lib/src/base', |
| 109 ]), | 107 ]), |
| 110 }; | 108 }; |
| 111 | 109 |
| 112 /// Rules for what a subpackage may depend directly on. | 110 /// Rules for what a subpackage may depend directly on. |
| 113 class SubpackageRules { | 111 class SubpackageRules { |
| 114 /// Indicates whether the subpackage may directly depend on analyzer. | 112 /// Indicates whether the subpackage may directly depend on analyzer. |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 problem('Uri $src is inside package:front_end but is not in any known ' | 230 problem('Uri $src is inside package:front_end but is not in any known ' |
| 233 'subpackage'); | 231 'subpackage'); |
| 234 } else if (!subpackageRules[subpackage].allowSubdirs && | 232 } else if (!subpackageRules[subpackage].allowSubdirs && |
| 235 pathWithinSubpackage.contains('/')) { | 233 pathWithinSubpackage.contains('/')) { |
| 236 problem('Uri $src is in a subfolder of $subpackage, but that ' | 234 problem('Uri $src is in a subfolder of $subpackage, but that ' |
| 237 'subpackage does not allow dart files in subdirectories.'); | 235 'subpackage does not allow dart files in subdirectories.'); |
| 238 } | 236 } |
| 239 return subpackage; | 237 return subpackage; |
| 240 } | 238 } |
| 241 } | 239 } |
| OLD | NEW |