Skip to content

Commit fae8a34

Browse files
srawlinsCommit Queue
authored andcommitted
analyzer: Remove deprecated ErrorCode, ErrorSeverity, ErrorType
Change-Id: I914d0906ea417e186139c765b8d42a735dd263d6 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/455461 Reviewed-by: Konstantin Shcheglov <[email protected]> Commit-Queue: Samuel Rawlins <[email protected]>
1 parent d05ef6e commit fae8a34

File tree

4 files changed

+4
-33
lines changed

4 files changed

+4
-33
lines changed

pkg/_fe_analyzer_shared/lib/src/base/errors.dart

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -35,23 +35,6 @@ String formatList(String pattern, List<Object?>? arguments) {
3535
});
3636
}
3737

38-
/// A diagnostic code associated with an `AnalysisError`.
39-
///
40-
/// Generally, messages should follow the [Guide for Writing
41-
/// Diagnostics](https://github.com/dart-lang/sdk/blob/main/pkg/front_end/lib/src/base/diagnostics.md).
42-
@AnalyzerPublicApi(message: 'exported by package:analyzer/error/error.dart')
43-
@Deprecated("Use 'DiagnosticCode' instead.")
44-
typedef ErrorCode = DiagnosticCode;
45-
46-
/// The severity of a [DiagnosticCode].
47-
@AnalyzerPublicApi(message: 'exported by package:analyzer/error/error.dart')
48-
@Deprecated("Use 'DiagnosticSeverity' instead.")
49-
typedef ErrorSeverity = DiagnosticSeverity;
50-
51-
@AnalyzerPublicApi(message: 'exported by package:analyzer/error/error.dart')
52-
@Deprecated("Use 'DiagnosticType' instead.")
53-
typedef ErrorType = DiagnosticType;
54-
5538
/// A diagnostic, as defined by the [Diagnostic Design Guidelines][guidelines]:
5639
///
5740
/// > An indication of a specific problem at a specific location within the

pkg/analyzer/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
* Remove deprecated `PartDirective.configurations`.
1515
* Remove deprecated `TypeDefiningElement`.
1616
* Remove deprecated `TypeAliasElement.aliasedElement`.
17+
* Remove deprecated `ErrorCode`.
18+
* Remove deprecated `ErrorSeverity`.
19+
* Remove deprecated `ErrorType`.
1720

1821
## 8.4.0
1922
* Add the `experimental_member_use` warning, which warns about any reference to

pkg/analyzer/api.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4573,9 +4573,6 @@ package:analyzer/error/error.dart:
45734573
url (getter: String?)
45744574
== (method: bool Function(Object))
45754575
AnalysisError (type alias for Diagnostic, deprecated)
4576-
ErrorCode (type alias for DiagnosticCode, deprecated)
4577-
ErrorSeverity (type alias for DiagnosticSeverity, deprecated)
4578-
ErrorType (type alias for DiagnosticType, deprecated)
45794576
package:analyzer/error/listener.dart:
45804577
AnalysisErrorListener (class extends Object implements DiagnosticOrErrorListener, deprecated):
45814578
new (constructor: AnalysisErrorListener Function())

pkg/analyzer/lib/error/error.dart

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,7 @@ import 'package:_fe_analyzer_shared/src/base/errors.dart';
1111
import 'package:analyzer/src/diagnostic/diagnostic_code_values.dart';
1212

1313
export 'package:_fe_analyzer_shared/src/base/errors.dart'
14-
show
15-
DiagnosticCode,
16-
DiagnosticSeverity,
17-
DiagnosticType,
18-
// Continue exporting the deprecated element until it is removed.
19-
// ignore: deprecated_member_use
20-
ErrorCode,
21-
// Continue exporting the deprecated element until it is removed.
22-
// ignore: deprecated_member_use
23-
ErrorSeverity,
24-
// Continue exporting the deprecated element until it is removed.
25-
// ignore: deprecated_member_use
26-
ErrorType;
14+
show DiagnosticCode, DiagnosticSeverity, DiagnosticType;
2715
export 'package:analyzer/src/dart/error/lint_codes.dart' show LintCode;
2816
export 'package:analyzer/src/diagnostic/diagnostic_code_values.dart'
2917
show diagnosticCodeValues, errorCodeValues;

0 commit comments

Comments
 (0)