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

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

Issue 3005573002: Revert "Remove check for scheme in source-loader." (Closed)
Patch Set: Created 3 years, 4 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
« no previous file with comments | « pkg/front_end/lib/src/fasta/fasta_codes_generated.dart ('k') | pkg/front_end/messages.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3734675ef92012e66997a2229242408605f06d7a..638598d4494f17fb86f20b74a180dbf487d1cbcd 100644
--- a/pkg/front_end/lib/src/fasta/source/source_loader.dart
+++ b/pkg/front_end/lib/src/fasta/source/source_loader.dart
@@ -34,8 +34,6 @@ import '../compiler_context.dart' show CompilerContext;
import '../deprecated_problems.dart' show deprecated_inputError;
-import '../problems.dart' show internalProblem;
-
import '../export.dart' show Export;
import '../fasta_codes.dart'
@@ -47,7 +45,6 @@ import '../fasta_codes.dart'
templateIllegalMixin,
templateIllegalMixinDueToConstructors,
templateIllegalMixinDueToConstructorsCause,
- templateInternalProblemUriMissingScheme,
templateUnspecified;
import '../kernel/kernel_shadow_ast.dart' show KernelTypeInferenceEngine;
@@ -99,14 +96,11 @@ class SourceLoader<L> extends Loader<L> {
Future<Token> tokenize(SourceLibraryBuilder library,
{bool suppressLexicalErrors: false}) async {
Uri uri = library.fileUri;
- if (uri == null) {
+ // TODO(sigmund): source-loader shouldn't check schemes, but defer to the
+ // underlying file system to decide whether it is supported.
+ if (uri == null || uri.scheme != "file" && uri.scheme != "multi-root") {
return deprecated_inputError(
library.uri, -1, "Not found: ${library.uri}.");
- } else if (!uri.hasScheme) {
- return internalProblem(
- templateInternalProblemUriMissingScheme.withArguments(uri),
- -1,
- library.uri);
}
// Get the library text from the cache, or read from the file system.
« no previous file with comments | « pkg/front_end/lib/src/fasta/fasta_codes_generated.dart ('k') | pkg/front_end/messages.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698