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; |
} |