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

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: Address additional code review comments 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') | no next file with comments »
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 a497f5779149a0b5b6225af8df96d959eb4baed5..f9f2f29841cc70541d270834627ee7a159a9c948 100644
--- a/pkg/front_end/lib/compiler_options.dart
+++ b/pkg/front_end/lib/compiler_options.dart
@@ -5,15 +5,13 @@
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.
-///
/// Not intended to be implemented or extended by clients.
class CompilerOptions {
/// The path to the Dart SDK.
@@ -90,4 +88,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 file system, 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
+ /// file system. TODO(paulberry): fix this.
+ FileSystem fileSystem;
}
« no previous file with comments | « no previous file | pkg/front_end/lib/file_system.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698