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

Unified Diff: pkg/compiler/lib/src/dart2js_resolver.dart

Issue 3009813002: Delete dart2js_resolver and fix some typos in README (Closed)
Patch Set: Created 3 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/bin/resolver.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/dart2js_resolver.dart
diff --git a/pkg/compiler/lib/src/dart2js_resolver.dart b/pkg/compiler/lib/src/dart2js_resolver.dart
deleted file mode 100644
index 46ba18e441af387436023edabe2acbf2e807d8cf..0000000000000000000000000000000000000000
--- a/pkg/compiler/lib/src/dart2js_resolver.dart
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:io';
-import 'dart:async';
-
-import 'package:compiler/src/apiimpl.dart';
-import 'package:compiler/src/filenames.dart';
-import 'package:compiler/src/null_compiler_output.dart';
-import 'package:compiler/src/options.dart';
-import 'package:compiler/src/serialization/json_serializer.dart';
-import 'package:compiler/src/source_file_provider.dart';
-import 'package:package_config/discovery.dart';
-import 'package:compiler/src/elements/elements.dart';
-
-Future<String> resolve(List<Uri> inputs,
- {List<String> deps: const <String>[],
- List<String> bazelSearchPaths,
- String root,
- String packages,
- Uri packageRoot,
- String platformConfig}) async {
- var resolutionInputs = deps
- .map((uri) => currentDirectory.resolve(nativeToUriPath(uri)))
- .toList();
- var libraryRoot = root == null
- ? Platform.script.resolve('../../../sdk/')
- : currentDirectory.resolve(nativeToUriPath(root));
-
- var options = new CompilerOptions(
- libraryRoot: libraryRoot,
- resolveOnly: true,
- analyzeMain: true,
- resolutionInputs: resolutionInputs,
- packageRoot: packageRoot,
- packageConfig:
- packages != null ? currentDirectory.resolve(packages) : null,
- packagesDiscoveryProvider: findPackages,
- platformConfigUri:
- platformConfig != null ? libraryRoot.resolve(platformConfig) : null);
-
- var inputProvider = bazelSearchPaths != null
- ? new BazelInputProvider(bazelSearchPaths)
- : new CompilerSourceFileProvider();
-
- var outputProvider = const NullCompilerOutput();
- var diagnostics = new FormattingDiagnosticHandler(inputProvider)
- ..enableColors = !Platform.isWindows;
- var compiler =
- new CompilerImpl(inputProvider, outputProvider, diagnostics, options);
-
- await compiler.setupSdk();
- await compiler.setupPackages(inputs.first);
-
- var librariesToSerialize = <LibraryElement>[];
- for (var uri in inputs) {
- var library = await compiler.analyzeUri(uri);
- if (library != null) {
- // [library] is `null` if [uri] is a part file.
- librariesToSerialize.add(library);
- }
- }
-
- if (librariesToSerialize.isEmpty) {
- print('no library input files');
- exit(1);
- }
-
- var serializer =
- compiler.serialization.createSerializer(librariesToSerialize);
- return serializer.toText(const JsonSerializationEncoder());
-}
« no previous file with comments | « pkg/compiler/bin/resolver.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698