| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library leg_apiimpl; | 5 library leg_apiimpl; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:convert'; | 8 import 'dart:convert'; |
| 9 | 9 |
| 10 import 'package:package_config/packages.dart'; | 10 import 'package:package_config/packages.dart'; |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 return callUserPackagesDiscovery(uri).then((p) { | 198 return callUserPackagesDiscovery(uri).then((p) { |
| 199 packages = p; | 199 packages = p; |
| 200 }); | 200 }); |
| 201 } | 201 } |
| 202 } | 202 } |
| 203 return new Future.value(); | 203 return new Future.value(); |
| 204 } | 204 } |
| 205 | 205 |
| 206 Future<Null> setupSdk() { | 206 Future<Null> setupSdk() { |
| 207 Future future = new Future.value(null); | 207 Future future = new Future.value(null); |
| 208 if (options.resolutionInput != null) { | 208 if (options.resolutionInputs != null) { |
| 209 reporter.log('Reading serialized data from ${options.resolutionInput}'); | 209 future = Future.forEach(options.resolutionInputs, (Uri resolutionInput) { |
| 210 future = callUserProvider(options.resolutionInput) | 210 reporter.log('Reading serialized data from ${resolutionInput}'); |
| 211 .then((SourceFile sourceFile) { | 211 return callUserProvider(resolutionInput).then((SourceFile sourceFile) { |
| 212 serialization.deserializeFromText(sourceFile.slowText()); | 212 serialization.deserializeFromText( |
| 213 resolutionInput, sourceFile.slowText()); |
| 214 }); |
| 213 }); | 215 }); |
| 214 } | 216 } |
| 215 if (resolvedUriTranslator.isNotSet) { | 217 if (resolvedUriTranslator.isNotSet) { |
| 216 future = future.then((_) { | 218 future = future.then((_) { |
| 217 return platform_configuration | 219 return platform_configuration |
| 218 .load(options.platformConfigUri, provider) | 220 .load(options.platformConfigUri, provider) |
| 219 .then((Map<String, Uri> mapping) { | 221 .then((Map<String, Uri> mapping) { |
| 220 resolvedUriTranslator.resolvedUriTranslator = | 222 resolvedUriTranslator.resolvedUriTranslator = |
| 221 new ResolvedUriTranslator(mapping, reporter); | 223 new ResolvedUriTranslator(mapping, reporter); |
| 222 }); | 224 }); |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 } | 392 } |
| 391 } | 393 } |
| 392 | 394 |
| 393 /// For every 'dart:' library, a corresponding environment variable is set | 395 /// For every 'dart:' library, a corresponding environment variable is set |
| 394 /// to "true". The environment variable's name is the concatenation of | 396 /// to "true". The environment variable's name is the concatenation of |
| 395 /// this prefix and the name (without the 'dart:'. | 397 /// this prefix and the name (without the 'dart:'. |
| 396 /// | 398 /// |
| 397 /// For example 'dart:html' has the environment variable 'dart.library.html' set | 399 /// For example 'dart:html' has the environment variable 'dart.library.html' set |
| 398 /// to "true". | 400 /// to "true". |
| 399 const String _dartLibraryEnvironmentPrefix = 'dart.library.'; | 401 const String _dartLibraryEnvironmentPrefix = 'dart.library.'; |
| OLD | NEW |