You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add experiment keys to experiment-related diagnostics
In a recent discussion we decided to add an `experiment` key to the
entries in the analyzer's `messages.yaml` file with the same semantics
as they have in the front-end messages file. This is an initial attempt
to add them.
I'm reasonably confident that all of the markes diagnostics are related
to the specified experiment, but there might well be others. I'm happy
to update this CL to capture those as well, but we can always add the
map entry later as we discover diagnostics that were missed.
Change-Id: I31ec94bae905828e64a1769fdf905ef7a19a8d11
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430120
Reviewed-by: Kallen Tu <[email protected]>
Reviewed-by: Konstantin Shcheglov <[email protected]>
Commit-Queue: Brian Wilkerson <[email protected]>
Copy file name to clipboardExpand all lines: pkg/analyzer/messages.yaml
+17Lines changed: 17 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1148,24 +1148,28 @@ CompileTimeErrorCode:
1148
1148
}
1149
1149
```
1150
1150
AUGMENTATION_EXTENDS_CLAUSE_ALREADY_PRESENT:
1151
+
experiment: augmentations
1151
1152
problemMessage: The augmentation has an 'extends' clause, but an augmentation target already includes an 'extends' clause and it isn't allowed to be repeated or changed.
1152
1153
correctionMessage: Try removing the 'extends' clause, either here or in the augmentation target.
1153
1154
hasPublishedDocs: false
1154
1155
AUGMENTATION_MODIFIER_EXTRA:
1156
+
experiment: augmentations
1155
1157
problemMessage: The augmentation has the '{0}' modifier that the declaration doesn't have.
1156
1158
correctionMessage: Try removing the '{0}' modifier, or adding it to the declaration.
1157
1159
hasPublishedDocs: false
1158
1160
comment: |-
1159
1161
Parameters:
1160
1162
0: the lexeme of the modifier.
1161
1163
AUGMENTATION_MODIFIER_MISSING:
1164
+
experiment: augmentations
1162
1165
problemMessage: The augmentation is missing the '{0}' modifier that the declaration has.
1163
1166
correctionMessage: Try adding the '{0}' modifier, or removing it from the declaration.
1164
1167
hasPublishedDocs: false
1165
1168
comment: |-
1166
1169
Parameters:
1167
1170
0: the lexeme of the modifier.
1168
1171
AUGMENTATION_OF_DIFFERENT_DECLARATION_KIND:
1172
+
experiment: augmentations
1169
1173
problemMessage: Can't augment a {0} with a {1}.
1170
1174
correctionMessage: Try changing the augmentation to match the declaration kind.
1171
1175
hasPublishedDocs: false
@@ -1174,30 +1178,37 @@ CompileTimeErrorCode:
1174
1178
0: the name of the declaration kind.
1175
1179
1: the name of the augmentation kind.
1176
1180
AUGMENTATION_TYPE_PARAMETER_BOUND:
1181
+
experiment: augmentations
1177
1182
problemMessage: The augmentation type parameter must have the same bound as the corresponding type parameter of the declaration.
1178
1183
correctionMessage: Try changing the augmentation to match the declaration type parameters.
1179
1184
hasPublishedDocs: false
1180
1185
AUGMENTATION_TYPE_PARAMETER_COUNT:
1186
+
experiment: augmentations
1181
1187
problemMessage: The augmentation must have the same number of type parameters as the declaration.
1182
1188
correctionMessage: Try changing the augmentation to match the declaration type parameters.
1183
1189
hasPublishedDocs: false
1184
1190
AUGMENTATION_TYPE_PARAMETER_NAME:
1191
+
experiment: augmentations
1185
1192
problemMessage: The augmentation type parameter must have the same name as the corresponding type parameter of the declaration.
1186
1193
correctionMessage: Try changing the augmentation to match the declaration type parameters.
1187
1194
hasPublishedDocs: false
1188
1195
AUGMENTATION_WITHOUT_DECLARATION:
1196
+
experiment: augmentations
1189
1197
problemMessage: The declaration being augmented doesn't exist.
1190
1198
correctionMessage: Try changing the augmentation to match an existing declaration.
1191
1199
hasPublishedDocs: false
1192
1200
AUGMENTED_EXPRESSION_IS_NOT_SETTER:
1201
+
experiment: augmentations
1193
1202
problemMessage: The augmented declaration is not a setter, it can't be used to write a value.
1194
1203
correctionMessage: Try assigning a value to a setter.
1195
1204
hasPublishedDocs: false
1196
1205
AUGMENTED_EXPRESSION_IS_SETTER:
1206
+
experiment: augmentations
1197
1207
problemMessage: The augmented declaration is a setter, it can't be used to read a value.
1198
1208
correctionMessage: Try assigning a value to the augmented setter.
1199
1209
hasPublishedDocs: false
1200
1210
AUGMENTED_EXPRESSION_NOT_OPERATOR:
1211
+
experiment: augmentations
1201
1212
problemMessage: The enclosing augmentation doesn't augment the operator '{0}'.
1202
1213
correctionMessage: Try augmenting or invoking the correct operator.
1203
1214
hasPublishedDocs: false
@@ -3865,10 +3876,12 @@ CompileTimeErrorCode:
3865
3876
Parameters:
3866
3877
0: the name of the duplicate entity
3867
3878
DOT_SHORTHAND_MISSING_CONTEXT:
3879
+
experiment: dot-shorthands
3868
3880
problemMessage: "A dot shorthand can't be used where there is no context type."
3869
3881
hasPublishedDocs: false
3870
3882
DOT_SHORTHAND_UNDEFINED_GETTER:
3871
3883
sharedName: DOT_SHORTHAND_UNDEFINED_MEMBER
3884
+
experiment: dot-shorthands
3872
3885
problemMessage: "The static getter '{0}' isn't defined for the context type '{1}'."
3873
3886
correctionMessage: "Try correcting the name to the name of an existing static getter, or defining a getter or field named '{0}'."
3874
3887
hasPublishedDocs: false
@@ -3878,6 +3891,7 @@ CompileTimeErrorCode:
3878
3891
1: the name of the enclosing type where the getter is being looked for
3879
3892
DOT_SHORTHAND_UNDEFINED_INVOCATION:
3880
3893
sharedName: DOT_SHORTHAND_UNDEFINED_MEMBER
3894
+
experiment: dot-shorthands
3881
3895
problemMessage: "The static method or constructor '{0}' isn't defined for the type '{1}'."
3882
3896
correctionMessage: "Try correcting the name to the name of an existing static method or constructor, or defining a static method or constructor named '{0}'."
0 commit comments