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

Side by Side Diff: lib/src/options.dart

Issue 1143683002: cleanup: simplify creation of AnalysisContext (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « lib/src/multi_package_resolver.dart ('k') | lib/src/testing.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 /// Set of flags and options passed to the compiler 5 /// Set of flags and options passed to the compiler
6 library dev_compiler.src.options; 6 library dev_compiler.src.options;
7 7
8 import 'dart:io'; 8 import 'dart:io';
9 9
10 import 'package:args/args.dart'; 10 import 'package:args/args.dart';
11 import 'package:cli_util/cli_util.dart' show getSdkDir; 11 import 'package:cli_util/cli_util.dart' show getSdkDir;
12 import 'package:dev_compiler/config.dart'; 12 import 'package:dev_compiler/config.dart';
13 import 'package:logging/logging.dart' show Level; 13 import 'package:logging/logging.dart' show Level;
14 import 'package:path/path.dart' as path; 14 import 'package:path/path.dart' as path;
15 import 'package:yaml/yaml.dart'; 15 import 'package:yaml/yaml.dart';
16 16
17 /// Options used by our TypeResolver. 17 /// Options used by our checker.
18 // TODO(jmesserly): useMultiPackage/packageRoot don't apply anymore.
vsm 2015/05/18 15:51:16 Don't we still need this for g3?
Jennifer Messerly 2015/05/18 16:24:41 yes, I'll reword. The problem is they are not used
18 class ResolverOptions { 19 class ResolverOptions {
19 /// Whether to resolve 'package:' uris using the multi-package resolver. 20 /// Whether to resolve 'package:' uris using the multi-package resolver.
20 final bool useMultiPackage; 21 final bool useMultiPackage;
21 22
22 /// Package root when resolving 'package:' urls the standard way. 23 /// Package root when resolving 'package:' urls the standard way.
23 final String packageRoot; 24 final String packageRoot;
24 25
25 /// List of paths used for the multi-package resolver. 26 /// List of paths used for the multi-package resolver.
26 final List<String> packagePaths; 27 final List<String> packagePaths;
27 28
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 // The pub-cache directory is two levels up, but we verify that the layout 446 // The pub-cache directory is two levels up, but we verify that the layout
446 // looks correct. 447 // looks correct.
447 if (path.basename(dir) != 'dev_compiler') return null; 448 if (path.basename(dir) != 'dev_compiler') return null;
448 dir = path.dirname(dir); 449 dir = path.dirname(dir);
449 if (path.basename(dir) != 'global_packages') return null; 450 if (path.basename(dir) != 'global_packages') return null;
450 dir = path.dirname(dir); 451 dir = path.dirname(dir);
451 return path.join(dir, cacheDir, 'lib', 'runtime'); 452 return path.join(dir, cacheDir, 'lib', 'runtime');
452 } 453 }
453 return null; 454 return null;
454 } 455 }
OLDNEW
« no previous file with comments | « lib/src/multi_package_resolver.dart ('k') | lib/src/testing.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698