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

Unified Diff: lib/src/options.dart

Issue 1213233006: Option to disable message widget (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 6 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 | « lib/src/dependency_graph.dart ('k') | lib/src/testing.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/options.dart
diff --git a/lib/src/options.dart b/lib/src/options.dart
index 994f74a90db7b17be7775b8eb91593199c67cd88..b6c2cdf562e093da4598cc134b8a09f0f10ceaad 100644
--- a/lib/src/options.dart
+++ b/lib/src/options.dart
@@ -102,6 +102,9 @@ class CompilerOptions {
/// Whether to enable hash-based caching of files.
final bool enableHashing;
+ /// Whether to serve the error / warning widget.
+ final bool widget;
+
/// Port used for the HTTP server when [serverMode] is on.
final int port;
@@ -118,8 +121,8 @@ class CompilerOptions {
this.codegenOptions: const CodegenOptions(), this.checkSdk: false,
this.dumpInfo: false, this.dumpInfoFile, this.useColors: true,
this.help: false, this.logLevel: Level.SEVERE, this.serverMode: false,
- this.enableHashing: false, this.host: 'localhost', this.port: 8080,
- this.runtimeDir});
+ this.enableHashing: false, this.widget: true, this.host: 'localhost',
+ this.port: 8080, this.runtimeDir});
}
/// Parses options from the command-line
@@ -195,6 +198,7 @@ CompilerOptions parseOptions(List<String> argv) {
logLevel: logLevel,
serverMode: serverMode,
enableHashing: enableHashing,
+ widget: args['widget'],
host: args['host'],
port: int.parse(args['port']),
runtimeDir: runtimeDir);
@@ -237,6 +241,9 @@ final ArgParser argParser = StrongModeOptions.addArguments(new ArgParser()
..addFlag('server', help: 'Run as a development server.', defaultsTo: false)
..addFlag('hashing',
help: 'Enable hash-based file caching.', defaultsTo: null)
+ ..addFlag('widget',
+ help: 'Serve embedded widget with static errors and warnings.',
+ defaultsTo: true)
..addOption('host',
help: 'Host name or address to serve files from, e.g. --host=0.0.0.0\n'
'to listen on all interfaces (used only when --serve is on)',
« no previous file with comments | « lib/src/dependency_graph.dart ('k') | lib/src/testing.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698