| Index: pkg/compiler/lib/src/dart2js.dart
|
| diff --git a/pkg/compiler/lib/src/dart2js.dart b/pkg/compiler/lib/src/dart2js.dart
|
| index 098e09ccfbdf00d345e8e2329de5e7f9ae10175b..3f92322cc26fec05dca834ba5e220b519def3341 100644
|
| --- a/pkg/compiler/lib/src/dart2js.dart
|
| +++ b/pkg/compiler/lib/src/dart2js.dart
|
| @@ -19,7 +19,6 @@ import 'util/uri_extras.dart';
|
| import 'util/util.dart' show stackTraceFilePrefix;
|
| import 'util/command_line.dart';
|
| import 'package:_internal/libraries.dart';
|
| -import 'package:package_config/discovery.dart' show findPackages;
|
|
|
| const String LIBRARY_ROOT = '../../../../../sdk';
|
| const String OUTPUT_LANGUAGE_DART = 'Dart';
|
| @@ -106,7 +105,6 @@ Future<api.CompilationResult> compile(List<String> argv) {
|
| Uri libraryRoot = currentDirectory;
|
| Uri out = currentDirectory.resolve('out.js');
|
| Uri sourceMapOut = currentDirectory.resolve('out.js.map');
|
| - Uri packageConfig = null;
|
| Uri packageRoot = null;
|
| List<String> options = new List<String>();
|
| bool explicitOut = false;
|
| @@ -142,10 +140,6 @@ Future<api.CompilationResult> compile(List<String> argv) {
|
| packageRoot = currentDirectory.resolve(extractPath(argument));
|
| }
|
|
|
| - setPackageConfig(String argument) {
|
| - packageConfig = currentDirectory.resolve(extractPath(argument));
|
| - }
|
| -
|
| setOutput(Iterator<String> arguments) {
|
| optionsImplyCompilation.add(arguments.current);
|
| String path;
|
| @@ -335,7 +329,6 @@ Future<api.CompilationResult> compile(List<String> argv) {
|
| (_) => setTrustPrimitives(
|
| '--trust-primitives')),
|
| new OptionHandler(r'--help|/\?|/h', (_) => wantHelp = true),
|
| - new OptionHandler('--packages=.+', setPackageConfig),
|
| new OptionHandler('--package-root=.+|-p.+', setPackageRoot),
|
| new OptionHandler('--analyze-all', setAnalyzeAll),
|
| new OptionHandler('--analyze-only', setAnalyzeOnly),
|
| @@ -410,8 +403,9 @@ Future<api.CompilationResult> compile(List<String> argv) {
|
| "checked mode.");
|
| }
|
|
|
| - if (packageRoot != null && packageConfig != null) {
|
| - helpAndFail("Cannot specify both '--package-root' and '--packages.");
|
| + Uri uri = currentDirectory.resolve(arguments[0]);
|
| + if (packageRoot == null) {
|
| + packageRoot = uri.resolve('./packages/');
|
| }
|
|
|
| if ((analyzeOnly || analyzeAll) && !optionsImplyCompilation.isEmpty) {
|
| @@ -437,6 +431,8 @@ Future<api.CompilationResult> compile(List<String> argv) {
|
| "combination with the '--output-type=dart' option.");
|
| }
|
|
|
| + diagnosticHandler.info('Package root is $packageRoot');
|
| +
|
| options.add('--out=$out');
|
| options.add('--source-map=$sourceMapOut');
|
|
|
| @@ -471,10 +467,9 @@ Future<api.CompilationResult> compile(List<String> argv) {
|
| return result;
|
| }
|
|
|
| - Uri uri = currentDirectory.resolve(arguments[0]);
|
| - return compileFunc(uri, libraryRoot, packageRoot, inputProvider,
|
| - diagnosticHandler, options, outputProvider, environment,
|
| - packageConfig, findPackages)
|
| + return compileFunc(uri, libraryRoot, packageRoot,
|
| + inputProvider, diagnosticHandler,
|
| + options, outputProvider, environment)
|
| .then(compilationDone);
|
| }
|
|
|
| @@ -556,12 +551,7 @@ Supported options:
|
| Display version information.
|
|
|
| -p<path>, --package-root=<path>
|
| - Where to find packages, that is, "package:..." imports. This option cannot
|
| - be used with --packages.
|
| -
|
| - --packages=<path>
|
| - Path to the package resolution configuration file, which supplies a mapping
|
| - of package names to paths. This option cannot be used with --package-root.
|
| + Where to find packages, that is, "package:..." imports.
|
|
|
| --analyze-all
|
| Analyze all code. Without this option, the compiler only analyzes
|
|
|