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

Unified Diff: pkg/front_end/lib/src/fasta/source/source_loader.dart

Issue 2964323002: Add support for multi-roots (Closed)
Patch Set: extra test Created 3 years, 5 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/fasta/source/source_loader.dart
diff --git a/pkg/front_end/lib/src/fasta/source/source_loader.dart b/pkg/front_end/lib/src/fasta/source/source_loader.dart
index 1764e5b2bb3e2c31bac01a94fdfcff617e325faa..d259f005c518c90986cf5f3a0848af950de4ff26 100644
--- a/pkg/front_end/lib/src/fasta/source/source_loader.dart
+++ b/pkg/front_end/lib/src/fasta/source/source_loader.dart
@@ -80,7 +80,11 @@ class SourceLoader<L> extends Loader<L> {
Future<Token> tokenize(SourceLibraryBuilder library,
{bool suppressLexicalErrors: false}) async {
Uri uri = library.fileUri;
- if (uri == null || uri.scheme != "file") {
+ String scheme = uri?.scheme;
+
+ // TODO(sigmund): source-loader shouldn't check schemes, but defer to the
+ // underlying file system to decide whether it is supported.
+ if (uri == null || (scheme != "file" && scheme != "multi-root")) {
return inputError(library.uri, -1, "Not found: ${library.uri}.");
}
« no previous file with comments | « pkg/front_end/lib/src/base/processed_options.dart ('k') | pkg/front_end/lib/src/multi_root_file_system.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698