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

Unified Diff: pkg/front_end/lib/compiler_options.dart

Issue 2426773004: First cut at a file system abstraction for the front end. (Closed)
Patch Set: Created 4 years, 2 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 | « no previous file | pkg/front_end/lib/file_system.dart » ('j') | pkg/front_end/lib/file_system.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1c496f10bc1cc88c86ba48bbe6b57a210a44f107..b5406b652fb33afb87f6e2b3b52a97c6dc4e857a 100644
--- a/pkg/front_end/lib/compiler_options.dart
+++ b/pkg/front_end/lib/compiler_options.dart
@@ -5,14 +5,12 @@
library front_end.compiler_options;
import 'compilation_error.dart';
+import 'file_system.dart';
/// Callback used to report errors encountered during compilation.
typedef void ErrorHandler(CompilationError error);
/// Front-end options relevant to compiler back ends.
-///
-/// TODO(paulberry): add a mechanism to allow file system operations to be
-/// stubbed out for testing.
class CompilerOptions {
/// The path to the Dart SDK.
///
@@ -88,4 +86,15 @@ class CompilerOptions {
/// The declared variables for use by configurable imports and constant
/// evaluation.
Map<String, String> declaredVariables;
+
+ /// The [FileSystem] which should be used by the front end to access files.
+ ///
+ /// TODO(paulberry): once an implementation of [FileSystem] has been created
+ /// which uses the actual physical filesystem, make that the default.
+ ///
+ /// All file system access performed by the front end goes through this
+ /// mechanism, with one exception: if no value is specified for
+ /// [packagesFilePath], the packages file is located using the actual physical
+ /// filesystem. TODO(paulberry): fix this.
+ FileSystem fileSystem;
}
« no previous file with comments | « no previous file | pkg/front_end/lib/file_system.dart » ('j') | pkg/front_end/lib/file_system.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698