Chromium Code Reviews| 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 23 matching lines...) Expand all Loading... | |
| 34 /// | 34 /// |
| 35 /// Each listed directory is considered a subpackage. Each package contains all | 35 /// Each listed directory is considered a subpackage. Each package contains all |
| 36 /// of its descendant files that are not in a more deeply nested subpackage. | 36 /// of its descendant files that are not in a more deeply nested subpackage. |
| 37 /// | 37 /// |
| 38 /// TODO(paulberry): stuff in lib/src shouldn't depend on lib; lib should just | 38 /// TODO(paulberry): stuff in lib/src shouldn't depend on lib; lib should just |
| 39 /// re-export stuff in lib/src. | 39 /// re-export stuff in lib/src. |
| 40 final subpackageRules = { | 40 final subpackageRules = { |
| 41 'lib': new SubpackageRules(allowedDependencies: [ | 41 'lib': new SubpackageRules(allowedDependencies: [ |
| 42 'lib/src', | 42 'lib/src', |
| 43 'lib/src/base', | 43 'lib/src/base', |
| 44 'lib/src/byte_store', | |
| 44 'lib/src/fasta', | 45 'lib/src/fasta', |
| 45 'lib/src/incremental', | |
| 46 ]), | 46 ]), |
| 47 'lib/src': new SubpackageRules(allowedDependencies: [ | 47 'lib/src': new SubpackageRules(allowedDependencies: [ |
| 48 'lib', | 48 'lib', |
| 49 'lib/src/base', | 49 'lib/src/base', |
| 50 'lib/src/fasta', | 50 'lib/src/fasta', |
| 51 "lib/src/fasta/dill", | 51 "lib/src/fasta/dill", |
| 52 "lib/src/fasta/kernel", | 52 "lib/src/fasta/kernel", |
| 53 'lib/src/fasta/source', | 53 'lib/src/fasta/source', |
| 54 'lib/src/incremental', | 54 'lib/src/incremental', |
| 55 ]), | 55 ]), |
| 56 'lib/src/base': new SubpackageRules(allowedDependencies: [ | 56 'lib/src/base': new SubpackageRules(allowedDependencies: [ |
| 57 'lib', | 57 'lib', |
| 58 'lib/src', | 58 'lib/src', |
| 59 'lib/src/byte_store', | |
| 59 'lib/src/fasta', | 60 'lib/src/fasta', |
| 60 'lib/src/fasta/util', | 61 'lib/src/fasta/util', |
| 61 'lib/src/incremental' | |
| 62 ]), | 62 ]), |
| 63 'lib/src/byte_store': new SubpackageRules(allowedDependencies: []), | |
|
Siggi Cherem (dart-lang)
2017/08/07 17:44:05
let's add a comment here to say that this folder s
Paul Berry
2017/08/07 17:48:03
Done.
ahe
2017/08/08 14:00:00
But that's not what Paul said was the intent of th
| |
| 63 'lib/src/codegen': new SubpackageRules(), | 64 'lib/src/codegen': new SubpackageRules(), |
| 64 'lib/src/fasta': new SubpackageRules(allowedDependencies: [ | 65 'lib/src/fasta': new SubpackageRules(allowedDependencies: [ |
| 65 'lib', | 66 'lib', |
| 66 'lib/src', | 67 'lib/src', |
| 67 'lib/src/base', | 68 'lib/src/base', |
| 68 'lib/src/fasta/builder', | 69 'lib/src/fasta/builder', |
| 69 'lib/src/fasta/dill', | 70 'lib/src/fasta/dill', |
| 70 'lib/src/fasta/kernel', | 71 'lib/src/fasta/kernel', |
| 71 'lib/src/fasta/parser', | 72 'lib/src/fasta/parser', |
| 72 'lib/src/fasta/scanner', | 73 'lib/src/fasta/scanner', |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 133 'lib/src', | 134 'lib/src', |
| 134 'lib/src/base', | 135 'lib/src/base', |
| 135 'lib/src/fasta', | 136 'lib/src/fasta', |
| 136 'lib/src/fasta/kernel', | 137 'lib/src/fasta/kernel', |
| 137 ]), | 138 ]), |
| 138 'lib/src/fasta/util': new SubpackageRules(), | 139 'lib/src/fasta/util': new SubpackageRules(), |
| 139 'lib/src/incremental': new SubpackageRules(allowedDependencies: [ | 140 'lib/src/incremental': new SubpackageRules(allowedDependencies: [ |
| 140 'lib', | 141 'lib', |
| 141 'lib/src', | 142 'lib/src', |
| 142 'lib/src/base', | 143 'lib/src/base', |
| 144 'lib/src/byte_store', | |
| 143 'lib/src/fasta', | 145 'lib/src/fasta', |
| 144 'lib/src/fasta/dill', | 146 'lib/src/fasta/dill', |
| 145 'lib/src/fasta/kernel', | 147 'lib/src/fasta/kernel', |
| 146 'lib/src/fasta/parser', | 148 'lib/src/fasta/parser', |
| 147 'lib/src/fasta/scanner', | 149 'lib/src/fasta/scanner', |
| 148 'lib/src/fasta/source', | 150 'lib/src/fasta/source', |
| 149 ]), | 151 ]), |
| 150 'lib/src/scanner': new SubpackageRules(allowedDependencies: [ | 152 'lib/src/scanner': new SubpackageRules(allowedDependencies: [ |
| 151 'lib/src/base', | 153 'lib/src/base', |
| 152 // For error codes. | 154 // For error codes. |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 318 if (subpackageRules[subpackage].allowSubdirs) { | 320 if (subpackageRules[subpackage].allowSubdirs) { |
| 319 subpackageRules[subpackage].actuallyHasSubdirs = true; | 321 subpackageRules[subpackage].actuallyHasSubdirs = true; |
| 320 } else { | 322 } else { |
| 321 problem('Uri $src is in a subfolder of $subpackage, but that ' | 323 problem('Uri $src is in a subfolder of $subpackage, but that ' |
| 322 'subpackage does not allow dart files in subdirectories.'); | 324 'subpackage does not allow dart files in subdirectories.'); |
| 323 } | 325 } |
| 324 } | 326 } |
| 325 return subpackage; | 327 return subpackage; |
| 326 } | 328 } |
| 327 } | 329 } |
| OLD | NEW |