Deprecate and remove the implementation of an older flag.
Change-Id: I650f5c7cc14c53b1109b8555a7e68544266ad65a
Reviewed-on: https://dart-review.googlesource.com/63860
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
diff --git a/pkg/analyzer_cli/lib/src/error_severity.dart b/pkg/analyzer_cli/lib/src/error_severity.dart
index 79a2111..71a2d7a 100644
--- a/pkg/analyzer_cli/lib/src/error_severity.dart
+++ b/pkg/analyzer_cli/lib/src/error_severity.dart
@@ -26,10 +26,7 @@
}
}
- if (!commandLineOptions.enableTypeChecks &&
- error.errorCode.type == ErrorType.CHECKED_MODE_COMPILE_TIME_ERROR) {
- return ErrorSeverity.INFO;
- } else if (commandLineOptions.lintsAreFatal && error.errorCode is LintCode) {
+ if (commandLineOptions.lintsAreFatal && error.errorCode is LintCode) {
return ErrorSeverity.ERROR;
}
diff --git a/pkg/analyzer_cli/lib/src/options.dart b/pkg/analyzer_cli/lib/src/options.dart
index 2fcf27e..ccfcb03 100644
--- a/pkg/analyzer_cli/lib/src/options.dart
+++ b/pkg/analyzer_cli/lib/src/options.dart
@@ -91,10 +91,6 @@
/// Whether to display version information
final bool displayVersion;
- /// Whether to treat type mismatches found during constant evaluation as
- /// errors.
- final bool enableTypeChecks;
-
/// Whether to ignore unrecognized flags
final bool ignoreUnrecognizedFlags;
@@ -185,7 +181,6 @@
disableCacheFlushing = args['disable-cache-flushing'],
disableHints = args['no-hints'],
displayVersion = args['version'],
- enableTypeChecks = args['enable_type_checks'],
ignoreUnrecognizedFlags = args['ignore-unrecognized-flags'],
lints = args[lintsFlag],
log = args['log'],
@@ -471,10 +466,10 @@
negatable: false,
hide: hide)
..addFlag('enable_type_checks',
- help: 'Check types in constant evaluation.',
+ help: 'Check types in constant evaluation (deprecated).',
defaultsTo: false,
negatable: false,
- hide: hide)
+ hide: true)
// TODO(brianwilkerson) Remove the following option after we're sure that
// it's no longer being used.
..addFlag('enable-assert-initializers',
diff --git a/pkg/analyzer_cli/test/options_test.dart b/pkg/analyzer_cli/test/options_test.dart
index 712f212..52e576e 100644
--- a/pkg/analyzer_cli/test/options_test.dart
+++ b/pkg/analyzer_cli/test/options_test.dart
@@ -61,7 +61,6 @@
expect(options.lints, isFalse);
expect(options.displayVersion, isFalse);
expect(options.enableSuperMixins, isFalse);
- expect(options.enableTypeChecks, isFalse);
expect(options.infosAreFatal, isFalse);
expect(options.ignoreUnrecognizedFlags, isFalse);
expect(options.log, isFalse);
@@ -103,12 +102,6 @@
expect(options.enableSuperMixins, isTrue);
});
- test('enable type checks', () {
- CommandLineOptions options = CommandLineOptions
- .parse(['--dart-sdk', '.', '--enable_type_checks', 'foo.dart']);
- expect(options.enableTypeChecks, isTrue);
- });
-
test('hintsAreFatal', () {
CommandLineOptions options = CommandLineOptions
.parse(['--dart-sdk', '.', '--fatal-hints', 'foo.dart']);
diff --git a/tools/testing/dart/compiler_configuration.dart b/tools/testing/dart/compiler_configuration.dart
index 689bd12..439f46c 100644
--- a/tools/testing/dart/compiler_configuration.dart
+++ b/tools/testing/dart/compiler_configuration.dart
@@ -689,7 +689,7 @@
///
/// Warning: this command removes temporary file and violates tracking of
/// dependencies between commands, which may cause problems if multiple
- /// almost identical configurations are tested simultaneosly.
+ /// almost identical configurations are tested simultaneously.
Command computeRemoveKernelFileCommand(String tempDir, List arguments,
Map<String, String> environmentOverrides) {
String exec;
@@ -819,7 +819,7 @@
/// tests by 60%.
/// Warning: this command removes temporary file and violates tracking of
/// dependencies between commands, which may cause problems if multiple
- /// almost identical configurations are tested simultaneosly.
+ /// almost identical configurations are tested simultaneously.
Command computeRemoveAssemblyCommand(String tempDir, List arguments,
Map<String, String> environmentOverrides) {
var exec = 'rm';
@@ -999,9 +999,6 @@
CommandArtifact computeCompilationArtifact(String tempDir,
List<String> arguments, Map<String, String> environmentOverrides) {
arguments = arguments.toList();
- if (_isChecked || previewDart2) {
- arguments.add('--enable_type_checks');
- }
if (!previewDart2) {
throw new ArgumentError('--no-preview-dart-2 not supported');
}
diff --git a/tools/testing/dart/test_configurations.dart b/tools/testing/dart/test_configurations.dart
index 6e05015..dc945ca 100644
--- a/tools/testing/dart/test_configurations.dart
+++ b/tools/testing/dart/test_configurations.dart
@@ -137,7 +137,7 @@
} else if (configuration.runtime.isSafari) {
// Safari does not allow us to run from a fresh profile, so we can only
// use one browser. Additionally, you can not start two simulators
- // for mobile safari simultainiously.
+ // for mobile safari simultaneously.
maxBrowserProcesses = 1;
} else if (configuration.runtime == Runtime.chrome &&
Platform.operatingSystem == 'macos') {