Index: pkg/compiler/lib/src/dart2js.dart |
diff --git a/pkg/compiler/lib/src/dart2js.dart b/pkg/compiler/lib/src/dart2js.dart |
index 1b41be1a4e07b0999fd1ed3a6861c239a28ed71c..183d59d832a59ce97e8c262e9b66060f00e4e809 100644 |
--- a/pkg/compiler/lib/src/dart2js.dart |
+++ b/pkg/compiler/lib/src/dart2js.dart |
@@ -115,8 +115,6 @@ Future<api.CompilationResult> compile(List<String> argv) { |
List<String> explicitOutputArguments = <String>[]; |
bool wantHelp = false; |
bool wantVersion = false; |
- String outputLanguage = 'JavaScript'; |
- bool stripArgumentSet = false; |
bool analyzeOnly = false; |
bool analyzeAll = false; |
bool resolveOnly = false; |
@@ -173,20 +171,10 @@ Future<api.CompilationResult> compile(List<String> argv) { |
optionsImplyCompilation.add(argument); |
if (argument == '--output-type=dart' || |
argument == '--output-type=dart-multi') { |
- outputLanguage = OUTPUT_LANGUAGE_DART; |
- if (explicitOutputArguments.isNotEmpty) { |
- out = currentDirectory.resolve('out.dart'); |
- sourceMapOut = currentDirectory.resolve('out.dart.map'); |
- } |
- diagnosticHandler( |
- null, |
- null, |
- null, |
- "--output-type=dart is deprecated. It will remain available " |
- "in Dart 1.11, but will be removed in Dart 1.12.", |
- api.Diagnostic.WARNING); |
+ helpAndFail( |
+ "--output-type=dart is no longer supported. It was deprecated " |
+ "since Dart 1.11 and removed in Dart 1.19."); |
} |
- passThrough(argument); |
} |
void setResolutionInput(String argument) { |
@@ -208,14 +196,14 @@ Future<api.CompilationResult> compile(List<String> argv) { |
return filenames.join("\n"); |
} |
- void implyCompilation(String argument) { |
+ implyCompilation(String argument) { |
optionsImplyCompilation.add(argument); |
passThrough(argument); |
} |
- void setStrip(String argument) { |
- stripArgumentSet = true; |
- implyCompilation(argument); |
+ setStrip(String argument) { |
+ helpAndFail("Option '--force-strip' is not in use now that" |
+ "--output-type=dart is no longer supported."); |
} |
void setAnalyzeOnly(String argument) { |
@@ -326,6 +314,7 @@ Future<api.CompilationResult> compile(List<String> argv) { |
new OptionHandler(Flags.fatalWarnings, passThrough), |
new OptionHandler( |
Flags.suppressHints, (_) => diagnosticHandler.showHints = false), |
+ // TODO(sigmund): remove entirely after Dart 1.20 |
new OptionHandler( |
'--output-type=dart|--output-type=dart-multi|--output-type=js', |
setOutputType), |
@@ -370,7 +359,7 @@ Future<api.CompilationResult> compile(List<String> argv) { |
new OptionHandler(Flags.disableTypeInference, implyCompilation), |
new OptionHandler(Flags.terse, passThrough), |
new OptionHandler('--deferred-map=.+', implyCompilation), |
- new OptionHandler(Flags.dumpInfo, setDumpInfo), |
+ new OptionHandler(Flags.dumpInfo, implyCompilation), |
new OptionHandler( |
'--disallow-unsafe-eval', (_) => hasDisallowUnsafeEval = true), |
new OptionHandler(Option.showPackageWarnings, passThrough), |
@@ -429,10 +418,6 @@ Future<api.CompilationResult> compile(List<String> argv) { |
" '$precompiledName'."); |
} |
- if (outputLanguage != OUTPUT_LANGUAGE_DART && stripArgumentSet) { |
- helpAndFail("Option '--force-strip' may only be used with " |
- "'--output-type=dart'."); |
- } |
if (arguments.isEmpty) { |
helpAndFail('No Dart file specified.'); |
} |
@@ -487,10 +472,6 @@ Future<api.CompilationResult> compile(List<String> argv) { |
"in combination with the '${Flags.analyzeOnly}' option."); |
} |
} |
- if (dumpInfo && outputLanguage == OUTPUT_LANGUAGE_DART) { |
- helpAndFail("Option '${Flags.dumpInfo}' is not supported in " |
- "combination with the '--output-type=dart' option."); |
- } |
options.add('--out=$out'); |
options.add('--source-map=$sourceMapOut'); |
@@ -511,11 +492,11 @@ Future<api.CompilationResult> compile(List<String> argv) { |
diagnosticHandler |
.info('Compiled ${inputProvider.dartCharactersRead} characters Dart ' |
'-> ${outputProvider.totalCharactersWritten} characters ' |
- '$outputLanguage in ' |
+ 'JavaScript in ' |
'${relativize(currentDirectory, out, Platform.isWindows)}'); |
if (diagnosticHandler.verbose) { |
String input = uriPathToNative(arguments[0]); |
- print('Dart file ($input) compiled to $outputLanguage.'); |
+ print('Dart file ($input) compiled to JavaScript.'); |
print('Wrote the following files:'); |
for (String filename in outputProvider.allOutputFiles) { |
print(" $filename"); |
@@ -523,7 +504,7 @@ Future<api.CompilationResult> compile(List<String> argv) { |
} else if (explicitOutputArguments.isNotEmpty) { |
String input = uriPathToNative(arguments[0]); |
String output = relativize(currentDirectory, out, Platform.isWindows); |
- print('Dart file ($input) compiled to $outputLanguage: $output'); |
+ print('Dart file ($input) compiled to JavaScript: $output'); |
} |
return result; |
} |