mirror of
https://github.com/dart-lang/sdk
synced 2024-09-06 00:59:09 +00:00
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:
parent
18110717fe
commit
ddf67772bb
|
@ -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);
|
||||
|
|
|
@ -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[@]}" "$@"
|
||||
|
|
Loading…
Reference in a new issue