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

Unified Diff: pkg/analysis_server/lib/src/server/driver.dart

Issue 857283003: Addition of the new flag "file-read-mode" into the analysis server to fix the offset bug with Intel… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Comments addressed Created 5 years, 11 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/analysis_server/lib/src/analysis_server.dart ('k') | pkg/analysis_server/lib/src/socket_server.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/server/driver.dart
diff --git a/pkg/analysis_server/lib/src/server/driver.dart b/pkg/analysis_server/lib/src/server/driver.dart
index dc275175addebdd88281eff42936c4efbf782a65..62d875847a76fdf3f3838a56f56fc41842fa98dc 100644
--- a/pkg/analysis_server/lib/src/server/driver.dart
+++ b/pkg/analysis_server/lib/src/server/driver.dart
@@ -122,11 +122,16 @@ class Driver implements ServerStarter {
static const String SDK_OPTION = "sdk";
/**
- * The name of the option used to disable error notifications.
+ * The name of the flag used to disable error notifications.
*/
static const String NO_ERROR_NOTIFICATION = "no-error-notification";
/**
+ * The name of the option used to set the file read mode.
+ */
+ static const String FILE_READ_MODE = "file-read-mode";
+
+ /**
* The instrumentation server that is to be used by the analysis server.
*/
InstrumentationServer instrumentationServer;
@@ -201,6 +206,7 @@ class Driver implements ServerStarter {
analysisServerOptions.enableIncrementalResolutionValidation =
results[INCREMENTAL_RESOLUTION_VALIDATION];
analysisServerOptions.noErrorNotification = results[NO_ERROR_NOTIFICATION];
+ analysisServerOptions.fileReadMode = results[FILE_READ_MODE];
_initIncrementalLogger(results[INCREMENTAL_RESOLUTION_LOG]);
@@ -328,6 +334,17 @@ class Driver implements ServerStarter {
help: "disable sending all analysis error notifications to the server",
defaultsTo: false,
negatable: false);
+ parser.addOption(
+ FILE_READ_MODE,
+ help: "an option of the ways files can be read from disk, " +
+ "some clients normalize end of line characters which would make " +
+ "the file offset and range information incorrect.",
+ allowed: ["as-is", "normalize-eol-always"],
+ allowedHelp: {
+ "as-is": "file contents are read as-is, no file changes occur",
+ "normalize-eol-always":
+ "file contents normalize the end of line characters to the single character new line `\n`"
+ }, defaultsTo: "as-is");
return parser;
}
« no previous file with comments | « pkg/analysis_server/lib/src/analysis_server.dart ('k') | pkg/analysis_server/lib/src/socket_server.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698