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
[messages] Rework message decoding and validation.
Reworks the message code generation logic so that the contents of the
`messages.yaml` files are (nearly) fully validated at the time they
are decoded.
The only fields that are not validated are those whose names are
passed to `MessageYaml.allowExtraKeys`. These fields are validated
elsewhere:
- The fields `bytes`, `declaration`, `exampleAllowMultipleReports`,
`exampleAllowOtherCodes`, `experiments`, `expression`, `external`,
`includeErrorContext`, `script`, and `statement`, when they appear
in `pkg/_fe_analyzer_shared/messages.yaml` or
`pkg/front_end/messages.yaml`. These fields are validated by the
logic in `messages_suite.dart`, as part of verifying that the front
end produces the expected diagnostics.
- The field `experiment`, when it appears in
`pkg/analyzer/messages.yaml` or `pkg/linter/messages.yaml`. This
field is validated by the logic in `verify_diagnostics_test.dart`,
as part of verifying that the analyzer produces the expected
diagnostics.
- The fields `categories`, `deprecatedDetails`, and `state`, when they
appear in `pkg/linter/messages.yaml`. These fields are validated by
the logic in `pkg/linter/tool/messages_info.dart`.
Change-Id: I6a6a69648bb3f5c3248489701bdf2ccc082a59ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/458067
Reviewed-by: Konstantin Shcheglov <[email protected]>
Commit-Queue: Paul Berry <[email protected]>
0 commit comments