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

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

Issue 2964323002: Add support for multi-roots (Closed)
Patch Set: Created 3 years, 6 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..8af2fe1a474edea7f5f90cd85de4f8e5f9015003 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,8 @@ 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;
+ if (uri == null || (scheme != "file" && scheme != "multi-root")) {
Siggi Cherem (dart-lang) 2017/07/01 04:09:57 I'm not super happy with this part of the change,
Paul Berry 2017/07/04 15:32:17 Agreed, I'm not thrilled with this either. A part
Siggi Cherem (dart-lang) 2017/07/05 22:48:30 I like your suggestion. In dart2js we also have a
return inputError(library.uri, -1, "Not found: ${library.uri}.");
}

Powered by Google App Engine
This is Rietveld 408576698