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

Unified Diff: pkg/front_end/lib/src/base/processed_options.dart

Issue 2614063007: Use URIs rather than paths in front end API. (Closed)
Patch Set: Minor fixes Created 3 years, 11 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
Index: pkg/front_end/lib/src/base/processed_options.dart
diff --git a/pkg/front_end/lib/src/base/processed_options.dart b/pkg/front_end/lib/src/base/processed_options.dart
index e1a4ef4dcba72e84d6bc9f71f7b25b8c2c3a905e..ba676513579993a56b77861062c31bb3963d7901 100644
--- a/pkg/front_end/lib/src/base/processed_options.dart
+++ b/pkg/front_end/lib/src/base/processed_options.dart
@@ -39,11 +39,11 @@ class ProcessedOptions {
/// Get the [FileSystem] which should be used by the front end to access
/// files.
///
- /// If the client supplied bazel roots using [CompilerOptions.bazelRoots], the
+ /// If the client supplied roots using [CompilerOptions.multiRoots], the
/// returned [FileSystem] will automatically perform the appropriate mapping.
FileSystem get fileSystem {
- // TODO(paulberry): support bazelRoots.
- assert(_raw.bazelRoots.isEmpty);
+ // TODO(paulberry): support multiRoots.
+ assert(_raw.multiRoots.isEmpty);
return _raw.fileSystem;
}
@@ -70,13 +70,12 @@ class ProcessedOptions {
if (_packages == null) {
if (_raw.packagesFilePath == null) {
throw new UnimplementedError(); // TODO(paulberry): search for .packages
- } else if (_raw.packagesFilePath.isEmpty) {
+ } else if (_raw.packagesFilePath.path.isEmpty) {
_packages = {};
} else {
var contents =
- await fileSystem.entityForPath(_raw.packagesFilePath).readAsBytes();
- var baseLocation = fileSystem.context.toUri(_raw.packagesFilePath);
- _packages = package_config.parse(contents, baseLocation);
+ await fileSystem.entityForUri(_raw.packagesFilePath).readAsBytes();
+ _packages = package_config.parse(contents, _raw.packagesFilePath);
}
}
return _packages;

Powered by Google App Engine
This is Rietveld 408576698