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

Unified Diff: sdk/lib/_internal/compiler/implementation/dart2js.dart

Issue 15915013: Revert "Add --version option to dart2js and add version information (if available) to generated cod… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 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 | « sdk/bin/dart2js.bat ('k') | sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/dart2js.dart
diff --git a/sdk/lib/_internal/compiler/implementation/dart2js.dart b/sdk/lib/_internal/compiler/implementation/dart2js.dart
index c4242ca84a84ef86f37b7d37e74410a8ef976ae5..8d3c7da267dd827a5c2765fd143b337892ddbe12 100644
--- a/sdk/lib/_internal/compiler/implementation/dart2js.dart
+++ b/sdk/lib/_internal/compiler/implementation/dart2js.dart
@@ -86,7 +86,6 @@ void compile(List<String> argv) {
List<String> options = new List<String>();
bool explicitOut = false;
bool wantHelp = false;
- bool wantVersion = false;
String outputLanguage = 'JavaScript';
bool stripArgumentSet = false;
bool analyzeOnly = false;
@@ -198,7 +197,6 @@ void compile(List<String> argv) {
(_) => diagnosticHandler.showWarnings = false),
new OptionHandler('--output-type=dart|--output-type=js', setOutputType),
new OptionHandler('--verbose', setVerbose),
- new OptionHandler('--version', (_) => wantVersion = true),
new OptionHandler('--library-root=.+', setLibraryRoot),
new OptionHandler('--out=.+|-o.+', setOutput),
new OptionHandler('--allow-mock-compilation', passThrough),
@@ -237,9 +235,7 @@ void compile(List<String> argv) {
];
parseCommandLine(handlers, argv);
- if (wantHelp || wantVersion) {
- helpAndExit(wantHelp, wantVersion, diagnosticHandler.verbose);
- }
+ if (wantHelp) helpAndExit(diagnosticHandler.verbose);
if (outputLanguage != OUTPUT_LANGUAGE_DART && stripArgumentSet) {
helpAndFail('Error: --force-strip may only be used with '
@@ -417,9 +413,6 @@ Supported options:
-v, --verbose
Display verbose information.
- --version
- Display version information.
-
-p<path>, --package-root=<path>
Where to find packages, that is, "package:..." imports.
@@ -494,19 +487,11 @@ be removed in a future version:
'''.trim());
}
-void helpAndExit(bool wantHelp, bool wantVersion, bool verbose) {
- if (wantVersion) {
- var version = (BUILD_ID == null)
- ? '<non-SDK build>'
- : BUILD_ID;
- print('Dart-to-JavaScript compiler (dart2js) version: $version');
- }
- if (wantHelp) {
- if (verbose) {
- verboseHelp();
- } else {
- help();
- }
+void helpAndExit(bool verbose) {
+ if (verbose) {
+ verboseHelp();
+ } else {
+ help();
}
exit(0);
}
« no previous file with comments | « sdk/bin/dart2js.bat ('k') | sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698