Parts. Remove diagnostics related to augmentation imports.
Change-Id: I70a8765d6e9514064a450c3b25b7b66869c12bc8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/384044
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
diff --git a/pkg/analysis_server/lib/src/services/correction/error_fix_status.yaml b/pkg/analysis_server/lib/src/services/correction/error_fix_status.yaml
index 7b8a063..6204088 100644
--- a/pkg/analysis_server/lib/src/services/correction/error_fix_status.yaml
+++ b/pkg/analysis_server/lib/src/services/correction/error_fix_status.yaml
@@ -221,12 +221,6 @@
We could rename the type parameter, this is purely local operation.
CompileTimeErrorCode.AUGMENTATION_WITHOUT_DECLARATION:
status: noFix
-CompileTimeErrorCode.AUGMENTATION_WITHOUT_IMPORT:
- status: needsFix
- notes: |-
- The fix is to add `import augment`.
-CompileTimeErrorCode.AUGMENTATION_WITHOUT_LIBRARY:
- status: noFix
CompileTimeErrorCode.AUGMENTED_EXPRESSION_IS_NOT_SETTER:
status: noFix
CompileTimeErrorCode.AUGMENTED_EXPRESSION_IS_SETTER:
@@ -517,8 +511,6 @@
CompileTimeErrorCode.DISALLOWED_TYPE_INSTANTIATION_EXPRESSION:
status: needsFix
since: 2.15
-CompileTimeErrorCode.DUPLICATE_AUGMENTATION_IMPORT:
- status: hasFix
CompileTimeErrorCode.DUPLICATE_CONSTRUCTOR_DEFAULT:
status: noFix
notes: |-
@@ -836,10 +828,6 @@
status: hasFix
CompileTimeErrorCode.IMPORT_OF_NON_LIBRARY:
status: hasFix
-CompileTimeErrorCode.IMPORT_OF_NOT_AUGMENTATION:
- status: needsFix
- notes: |-
- Remove the import.
CompileTimeErrorCode.INCONSISTENT_CASE_EXPRESSION_TYPES:
status: noFix
CompileTimeErrorCode.INCONSISTENT_INHERITANCE:
diff --git a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
index 06d68fe..dc5d257 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
@@ -985,9 +985,6 @@
RemoveDefaultValue.new,
RemoveRequired.new,
],
- CompileTimeErrorCode.DUPLICATE_AUGMENTATION_IMPORT: [
- RemoveUnusedImport.new,
- ],
CompileTimeErrorCode.EMPTY_MAP_PATTERN: [
ReplaceEmptyMapPattern.any,
ReplaceEmptyMapPattern.empty,
diff --git a/pkg/analyzer/lib/src/error/codes.g.dart b/pkg/analyzer/lib/src/error/codes.g.dart
index 9fe34ca..7e467d4 100644
--- a/pkg/analyzer/lib/src/error/codes.g.dart
+++ b/pkg/analyzer/lib/src/error/codes.g.dart
@@ -294,22 +294,6 @@
"Try changing the augmentation to match an existing declaration.",
);
- static const CompileTimeErrorCode AUGMENTATION_WITHOUT_IMPORT =
- CompileTimeErrorCode(
- 'AUGMENTATION_WITHOUT_IMPORT',
- "The library does not import this augmentation.",
- correctionMessage:
- "Try updating the augmented library to import this augmentation.",
- );
-
- static const CompileTimeErrorCode AUGMENTATION_WITHOUT_LIBRARY =
- CompileTimeErrorCode(
- 'AUGMENTATION_WITHOUT_LIBRARY',
- "The URI does not resolve to a library.",
- correctionMessage:
- "Try updating the URI to reference the augmented library.",
- );
-
static const CompileTimeErrorCode AUGMENTED_EXPRESSION_IS_NOT_SETTER =
CompileTimeErrorCode(
'AUGMENTED_EXPRESSION_IS_NOT_SETTER',
@@ -1384,17 +1368,6 @@
hasPublishedDocs: true,
);
- /// Parameters:
- /// 0: the URI of the duplicate augmentation
- static const CompileTimeErrorCode DUPLICATE_AUGMENTATION_IMPORT =
- CompileTimeErrorCode(
- 'DUPLICATE_AUGMENTATION_IMPORT',
- "The library already contains an augmentation with the URI '{0}'.",
- correctionMessage:
- "Try removing all except one of the duplicated augmentation "
- "directives.",
- );
-
/// No parameters.
static const CompileTimeErrorCode DUPLICATE_CONSTRUCTOR_DEFAULT =
CompileTimeErrorCode(
@@ -2456,17 +2429,6 @@
hasPublishedDocs: true,
);
- /// Parameters:
- /// 0: the URI of the imported file
- static const CompileTimeErrorCode IMPORT_OF_NOT_AUGMENTATION =
- CompileTimeErrorCode(
- 'IMPORT_OF_NOT_AUGMENTATION',
- "The imported file '{0}' isn't an augmentation of this library.",
- correctionMessage:
- "Try adding an 'augment library' directive referencing this library to "
- "the imported file.",
- );
-
/// 13.9 Switch: It is a compile-time error if values of the expressions
/// <i>e<sub>k</sub></i> are not instances of the same class <i>C</i>, for all
/// <i>1 <= k <= n</i>.
diff --git a/pkg/analyzer/lib/src/error/error_code_values.g.dart b/pkg/analyzer/lib/src/error/error_code_values.g.dart
index 139d933..2d94e9f 100644
--- a/pkg/analyzer/lib/src/error/error_code_values.g.dart
+++ b/pkg/analyzer/lib/src/error/error_code_values.g.dart
@@ -71,8 +71,6 @@
CompileTimeErrorCode.AUGMENTATION_TYPE_PARAMETER_COUNT,
CompileTimeErrorCode.AUGMENTATION_TYPE_PARAMETER_NAME,
CompileTimeErrorCode.AUGMENTATION_WITHOUT_DECLARATION,
- CompileTimeErrorCode.AUGMENTATION_WITHOUT_IMPORT,
- CompileTimeErrorCode.AUGMENTATION_WITHOUT_LIBRARY,
CompileTimeErrorCode.AUGMENTED_EXPRESSION_IS_NOT_SETTER,
CompileTimeErrorCode.AUGMENTED_EXPRESSION_IS_SETTER,
CompileTimeErrorCode.AUGMENTED_EXPRESSION_NOT_OPERATOR,
@@ -172,7 +170,6 @@
CompileTimeErrorCode.DEFERRED_IMPORT_OF_EXTENSION,
CompileTimeErrorCode.DEFINITELY_UNASSIGNED_LATE_LOCAL_VARIABLE,
CompileTimeErrorCode.DISALLOWED_TYPE_INSTANTIATION_EXPRESSION,
- CompileTimeErrorCode.DUPLICATE_AUGMENTATION_IMPORT,
CompileTimeErrorCode.DUPLICATE_CONSTRUCTOR_DEFAULT,
CompileTimeErrorCode.DUPLICATE_CONSTRUCTOR_NAME,
CompileTimeErrorCode.DUPLICATE_DEFINITION,
@@ -274,7 +271,6 @@
CompileTimeErrorCode.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER,
CompileTimeErrorCode.IMPORT_INTERNAL_LIBRARY,
CompileTimeErrorCode.IMPORT_OF_NON_LIBRARY,
- CompileTimeErrorCode.IMPORT_OF_NOT_AUGMENTATION,
CompileTimeErrorCode.INCONSISTENT_CASE_EXPRESSION_TYPES,
CompileTimeErrorCode.INCONSISTENT_INHERITANCE,
CompileTimeErrorCode.INCONSISTENT_INHERITANCE_GETTER_AND_METHOD,
diff --git a/pkg/analyzer/messages.yaml b/pkg/analyzer/messages.yaml
index 24460a8..f5932cf 100644
--- a/pkg/analyzer/messages.yaml
+++ b/pkg/analyzer/messages.yaml
@@ -1170,14 +1170,6 @@
problemMessage: The declaration being augmented doesn't exist.
correctionMessage: Try changing the augmentation to match an existing declaration.
hasPublishedDocs: false
- AUGMENTATION_WITHOUT_IMPORT:
- problemMessage: The library does not import this augmentation.
- correctionMessage: Try updating the augmented library to import this augmentation.
- hasPublishedDocs: false
- AUGMENTATION_WITHOUT_LIBRARY:
- problemMessage: The URI does not resolve to a library.
- correctionMessage: Try updating the URI to reference the augmented library.
- hasPublishedDocs: false
AUGMENTED_EXPRESSION_IS_NOT_SETTER:
problemMessage: The augmented declaration is not a setter, it can't be used to write a value.
correctionMessage: Try assigning a value to a setter.
@@ -3838,13 +3830,6 @@
print(i);
}
```
- DUPLICATE_AUGMENTATION_IMPORT:
- problemMessage: "The library already contains an augmentation with the URI '{0}'."
- correctionMessage: Try removing all except one of the duplicated augmentation directives.
- hasPublishedDocs: false
- comment: |-
- Parameters:
- 0: the URI of the duplicate augmentation
DUPLICATE_CONSTRUCTOR_NAME:
sharedName: DUPLICATE_CONSTRUCTOR
problemMessage: "The constructor with name '{0}' is already defined."
@@ -7431,13 +7416,6 @@
Import the library that contains the [part file][] rather than the
[part file][] itself.
- IMPORT_OF_NOT_AUGMENTATION:
- problemMessage: "The imported file '{0}' isn't an augmentation of this library."
- correctionMessage: Try adding an 'augment library' directive referencing this library to the imported file.
- hasPublishedDocs: false
- comment: |-
- Parameters:
- 0: the URI of the imported file
INCONSISTENT_CASE_EXPRESSION_TYPES:
problemMessage: "Case expressions must have the same types, '{0}' isn't a '{1}'."
hasPublishedDocs: false