-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
FailureNote JSON value is not useful #60425
Copy link
Copy link
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Currently the
FailureNotediagnostic level serializes to the empty string. This results in JSON messages containinglevel: "", which I'm not sure how to interpret.This was added in #48684, though reading that PR I can't really figure out why it was added and how it relates to compiletest changes.
An easy way to see this is to trigger a diagnostic that prints "For more information…", for example:
will emit a JSON value like this:
{ "message": "For more information about this error, try `rustc --explain E0005`.", "code": null, "level": "", "spans": [], "children": [], "rendered": "For more information about this error, try `rustc --explain E0005`.\n" }The empty string is not very descriptive of how to handle the message. I would suggest having it serialize to something more deliberate, such as "failure-note". I can't really tell what the intent of
FailureNoteis, so it's hard to say what it should be.cc @GuillaumeGomez who might know more.