Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Side by Side Diff: pkg/front_end/test/subpackage_relationships_test.dart

Issue 2828583003: remove dependencies to analyzer from lib/src/fasta (Closed)
Patch Set: add copyright Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 14 matching lines...) Expand all
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/codegen': new SubpackageRules(),
35 'lib/src/fasta': 35 'lib/src/fasta': new SubpackageRules(allowedDependencies: [
36 new SubpackageRules(mayImportAnalyzer: false, allowedDependencies: [
37 'lib/src/fasta/builder', 36 'lib/src/fasta/builder',
38 'lib/src/fasta/dill', 37 'lib/src/fasta/dill',
39 'lib/src/fasta/kernel', 38 'lib/src/fasta/kernel',
40 'lib/src/fasta/parser', 39 'lib/src/fasta/parser',
41 'lib/src/fasta/scanner', 40 'lib/src/fasta/scanner',
42 'lib/src/fasta/testing',
43 'lib/src/fasta/util', 41 'lib/src/fasta/util',
44 'lib/src/scanner', 42 'lib/src/scanner',
45 ]), 43 ]),
46 'lib/src/fasta/analyzer':
47 new SubpackageRules(mayImportAnalyzer: true, allowedDependencies: [
48 'lib/src/fasta',
49 'lib/src/fasta/builder',
50 'lib/src/fasta/dill',
51 'lib/src/fasta/kernel',
52 'lib/src/fasta/source',
53 ]),
54 'lib/src/fasta/builder': new SubpackageRules(allowedDependencies: [ 44 'lib/src/fasta/builder': new SubpackageRules(allowedDependencies: [
55 'lib/src/fasta', 45 'lib/src/fasta',
56 'lib/src/fasta/parser', 46 'lib/src/fasta/parser',
57 'lib/src/fasta/source', 47 'lib/src/fasta/source',
58 'lib/src/fasta/util', 48 'lib/src/fasta/util',
59 ]), 49 ]),
60 'lib/src/fasta/dill': new SubpackageRules(allowedDependencies: [ 50 'lib/src/fasta/dill': new SubpackageRules(allowedDependencies: [
61 'lib/src/fasta', 51 'lib/src/fasta',
62 'lib/src/fasta/kernel', 52 'lib/src/fasta/kernel',
63 ]), 53 ]),
(...skipping 24 matching lines...) Expand all
88 'lib/src/fasta', 78 'lib/src/fasta',
89 'lib/src/base', 79 'lib/src/base',
90 'lib/src/fasta/builder', 80 'lib/src/fasta/builder',
91 'lib/src/fasta/dill', 81 'lib/src/fasta/dill',
92 'lib/src/fasta/kernel', 82 'lib/src/fasta/kernel',
93 'lib/src/fasta/parser', 83 'lib/src/fasta/parser',
94 'lib/src/fasta/scanner', 84 'lib/src/fasta/scanner',
95 'lib/src/fasta/type_inference', 85 'lib/src/fasta/type_inference',
96 'lib/src/fasta/util', 86 'lib/src/fasta/util',
97 ]), 87 ]),
98 'lib/src/fasta/testing': 88 'lib/src/fasta/testing': new SubpackageRules(allowedDependencies: [
99 new SubpackageRules(mayImportAnalyzer: true, allowedDependencies: [
100 'lib/src/fasta', 89 'lib/src/fasta',
101 'lib/src/base', 90 'lib/src/base',
102 'lib/src/fasta/dill',
103 'lib/src/fasta/kernel', 91 'lib/src/fasta/kernel',
104 'lib/src/fasta/analyzer',
105 'lib/src/fasta/scanner', 92 'lib/src/fasta/scanner',
106 ]), 93 ]),
107 'lib/src/fasta/type_inference': new SubpackageRules(allowedDependencies: [ 94 'lib/src/fasta/type_inference': new SubpackageRules(allowedDependencies: [
108 'lib/src/base', 95 'lib/src/base',
109 ]), 96 ]),
110 'lib/src/fasta/util': new SubpackageRules(), 97 'lib/src/fasta/util': new SubpackageRules(),
111 'lib/src/scanner': new SubpackageRules(allowedDependencies: [ 98 'lib/src/scanner': new SubpackageRules(allowedDependencies: [
112 'lib/src/base', 99 'lib/src/base',
113 // For error codes. 100 // For error codes.
114 'lib/src/fasta', 101 'lib/src/fasta',
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 if (subpackageRules[subpackage].allowSubdirs) { 260 if (subpackageRules[subpackage].allowSubdirs) {
274 subpackageRules[subpackage].actuallyHasSubdirs = true; 261 subpackageRules[subpackage].actuallyHasSubdirs = true;
275 } else { 262 } else {
276 problem('Uri $src is in a subfolder of $subpackage, but that ' 263 problem('Uri $src is in a subfolder of $subpackage, but that '
277 'subpackage does not allow dart files in subdirectories.'); 264 'subpackage does not allow dart files in subdirectories.');
278 } 265 }
279 } 266 }
280 return subpackage; 267 return subpackage;
281 } 268 }
282 } 269 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698