Chromium Code Reviews| Index: pkg/front_end/lib/compiler_options.dart |
| diff --git a/pkg/front_end/lib/compiler_options.dart b/pkg/front_end/lib/compiler_options.dart |
| index 5230f4e47fb31f7025e7d65351f99091280f44a6..aa8e8e6c2a352daa49d61cf448adaf62dd1870cf 100644 |
| --- a/pkg/front_end/lib/compiler_options.dart |
| +++ b/pkg/front_end/lib/compiler_options.dart |
| @@ -18,13 +18,13 @@ typedef void ErrorHandler(CompilationError error); |
| /// |
| /// Not intended to be implemented or extended by clients. |
| class CompilerOptions { |
| - /// The path to the Dart SDK. |
| + /// The URI of the Dart SDK (typically a "file:" URI). |
| /// |
| /// If `null`, the SDK will be searched for using |
| /// [Platform.resolvedExecutable] as a starting point. |
| /// |
| /// This option is mutually exclusive with [sdkSummary]. |
| - String sdkPath; |
| + Uri sdkPath; |
|
danrubel
2017/01/08 17:07:38
Since this is no longer a path, perhaps rename sdk
Paul Berry
2017/01/09 17:24:42
Done.
|
| /// Callback to which compilation errors should be delivered. |
| /// |
| @@ -32,21 +32,22 @@ class CompilerOptions { |
| /// type [CompilationError]. |
| ErrorHandler onError = defaultErrorHandler; |
| - /// Path to the ".packages" file. |
| + /// URI of the ".packages" file (typically a "file:" URI). |
| /// |
| /// If `null`, the ".packages" file will be found via the standard |
| /// package_config search algorithm. |
| /// |
| - /// If the empty string, no packages file will be used. |
| - String packagesFilePath; |
| + /// If the URI's path component is empty (e.g. `new Uri()`), no packages file |
| + /// will be used. |
| + Uri packagesFilePath; |
|
danrubel
2017/01/08 17:07:38
Same as above... packagesFileUri?
Paul Berry
2017/01/09 17:24:42
Done.
|
| - /// Paths to the input summary files (excluding the SDK summary). These files |
| - /// should all be linked summaries. They should also be closed, in the sense |
| - /// that any libraries they reference should also appear in [inputSummaries] |
| - /// or [sdkSummary]. |
| - List<String> inputSummaries = []; |
| + /// URIs of input summary files (excluding the SDK summary; typically these |
| + /// will be "file:" URIs). These files should all be linked summaries. They |
| + /// should also be closed, in the sense that any libraries they reference |
| + /// should also appear in [inputSummaries] or [sdkSummary]. |
| + List<Uri> inputSummaries = []; |
| - /// Path to the SDK summary file. |
| + /// URI of the SDK summary file (typically a "file:" URI). |
| /// |
| /// This should be a linked summary. If `null`, the SDK summary will be |
| /// searched for at a default location within [sdkPath]. |
| @@ -54,34 +55,34 @@ class CompilerOptions { |
| /// This option is mutually exclusive with [sdkPath]. TODO(paulberry): if the |
| /// VM does not contain a pickled copy of the SDK, we might need to change |
| /// this. |
| - String sdkSummary; |
| + Uri sdkSummary; |
| /// URI override map. |
| /// |
| - /// This is a map from Uri to file path. Any URI override listed in this map |
| - /// takes precedence over the URI resolution that would be implied by the |
| - /// packages file (see [packagesFilePath]) and/or [bazelRoots]. |
| + /// This is a map from URIs that might appear in import/export/part statements |
| + /// to URIs that should be used to locate the corresponding files in the |
| + /// [fileSystem]. Any URI override listed in this map takes precedence over |
| + /// the URI resolution that would be implied by the packages file (see |
| + /// [packagesFilePath]) and/or [multiRoots]. |
| /// |
| /// If a URI is not listed in this map, then the normal URI resolution |
| /// algorithm will be used. |
| /// |
| /// TODO(paulberry): transition analyzer and dev_compiler to use the |
| - /// "file:///bazel-root" mechanism, and then remove this. |
| + /// "multi-root:" mechanism, and then remove this. |
| @deprecated |
| - Map<Uri, String> uriOverride = {}; |
| + Map<Uri, Uri> uriOverride = {}; |
| - /// Bazel roots. |
| + /// Multi-roots. |
| /// |
| - /// Any Uri that resolves to "file:///bazel-root/$rest" will be searched for |
| - /// at "$root/$rest" ("$root\\$rest" in Windows), where "$root" is drawn from |
| - /// this list. If the file is not found at any of those locations, the URI |
| - /// "file:///bazel-root/$rest" will be used directly. |
| + /// Any Uri that resolves to "multi-root:///$rest" will be searched for |
| + /// at "$root/$rest", where "$root" is drawn from this list. |
| /// |
| /// Intended use: if the Bazel workspace is located at path "$workspace", this |
| - /// could be set to `['$workspace', '$workspace/bazel-bin', |
| - /// '$workspace/bazel-genfiles']`, effectively overlaying source and generated |
| - /// files. |
| - List<String> bazelRoots = []; |
| + /// could be set to the file URIs corresponding to the paths for "$workspace", |
| + /// "$workspace/bazel-bin", and "$workspace/bazel-genfiles", effectively |
| + /// overlaying source and generated files. |
| + List<Uri> multiRoots = []; |
| /// Sets the platform bit, which determines which patch files should be |
| /// applied to the SDK. |