Chromium Code Reviews| Index: pkg/compiler/lib/src/apiimpl.dart |
| diff --git a/pkg/compiler/lib/src/apiimpl.dart b/pkg/compiler/lib/src/apiimpl.dart |
| index d569bcdba7c004d9fd00336ebeaad3548362705d..4dfe9229211907bd4b242c6a5418d65da593c01d 100644 |
| --- a/pkg/compiler/lib/src/apiimpl.dart |
| +++ b/pkg/compiler/lib/src/apiimpl.dart |
| @@ -222,7 +222,8 @@ class CompilerImpl extends Compiler { |
| .load(options.platformConfigUri, provider) |
| .then((Map<String, Uri> mapping) { |
| resolvedUriTranslator.resolvedUriTranslator = |
| - new ResolvedUriTranslator(mapping, reporter); |
| + new ResolvedUriTranslator( |
| + mapping, reporter, options.platformConfigUri); |
| }); |
| }); |
| } |
| @@ -392,6 +393,19 @@ class _Environment implements Environment { |
| } |
| return "true"; |
| } |
| + |
| + // Note: we return false on `dart:io` here, even if we allow users to |
|
sra1
2017/02/07 21:33:48
'false' -> 'null' ?
Siggi Cherem (dart-lang)
2017/02/07 22:02:02
Done.
|
| + // unconditionally import it. |
| + // |
| + // In the past it was invalid to import `dart:io` for client apps. We just |
| + // made it valid to import it as a stopgap measure to support packages like |
| + // `http`. This is temporary until we support config-imports in the |
| + // language. |
| + // |
| + // Because it is meant to be temporary and because the returned `dart:io` |
| + // implementation will throw on most APIs, we still preserve that |
| + // when compiling client apps the `dart:io` library is technically not |
| + // supported, and so `const bool.fromEnvironment(dart.library.io)` is false. |
| return null; |
| } |
| } |