Remove warning about inferring packages URI from dart2js

Change-Id: I37ee171b0359e1fa6720d7af9e403f4dfab76e9e
Reviewed-on: https://dart-review.googlesource.com/c/79480
Auto-Submit: Peter von der Ahé <ahe@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
This commit is contained in:
Peter von der Ahé 2018-10-12 07:37:23 +00:00 committed by commit-bot@chromium.org
parent 18110717fe
commit ddf67772bb
2 changed files with 10 additions and 5 deletions

View file

@ -7,6 +7,7 @@ library dart2js.cmdline;
import 'dart:async' show Future;
import 'dart:convert' show utf8, LineSplitter;
import 'dart:io' show exit, File, FileMode, Platform, stdin, stderr;
import 'dart:isolate' show Isolate;
import 'package:front_end/src/api_unstable/dart2js.dart' as fe;
import 'package:package_config/discovery.dart' show findPackages;
@ -20,7 +21,7 @@ import 'util/command_line.dart';
import 'util/uri_extras.dart';
import 'util/util.dart' show stackTraceFilePrefix;
const String LIBRARY_ROOT = '../../../../../sdk';
const String LIBRARY_ROOT = '../../../../sdk';
const String OUTPUT_LANGUAGE_DART = 'Dart';
/**
@ -561,9 +562,13 @@ void fail(String message) {
}
Future<api.CompilationResult> compilerMain(List<String> arguments,
{fe.InitializedCompilerState kernelInitializedCompilerState}) {
var root = uriPathToNative("/$LIBRARY_ROOT");
arguments = <String>['--library-root=${Platform.script.toFilePath()}$root']
{fe.InitializedCompilerState kernelInitializedCompilerState}) async {
Uri script = Platform.script;
if (script.isScheme("package")) {
script = await Isolate.resolvePackageUri(script);
}
Uri libraryRoot = script.resolve(LIBRARY_ROOT);
arguments = <String>['--library-root=${libraryRoot.toFilePath()}']
..addAll(arguments);
return compile(arguments,
kernelInitializedCompilerState: kernelInitializedCompilerState);

View file

@ -50,6 +50,6 @@ fi
DART_ROOT="$(cd "${SDK_DIR}/.." ; pwd -P)"
DART2JS="$DART_ROOT/pkg/compiler/lib/src/dart2js.dart"
DART2JS="package:compiler/src/dart2js.dart"
exec "$DART" "--packages=$DART_ROOT/.packages" "${EXTRA_VM_OPTIONS[@]}" "$DART2JS" "${EXTRA_OPTIONS[@]}" "$@"